Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
9960535b
Kaydet (Commit)
9960535b
authored
Eyl 19, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix indentation
Change-Id: I7814547ef29ec728a5a815196427b661bf285256
üst
b345b3b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
39 deletions
+38
-39
sourcetreeprovider.cxx
unoidl/source/sourcetreeprovider.cxx
+38
-39
No files found.
unoidl/source/sourcetreeprovider.cxx
Dosyayı görüntüle @
9960535b
...
...
@@ -39,45 +39,44 @@ namespace {
// osl_FileStatus_Mask_Validate):
OUString
getFileName
(
OUString
const
&
uri
,
osl
::
FileStatus
&
status
)
{
#if defined MACOSX
sal_Int32
i
=
uri
.
lastIndexOf
(
'/'
)
+
1
;
OUString
path
;
if
(
osl
::
FileBase
::
getSystemPathFromFileURL
(
uri
.
copy
(
0
,
i
),
path
)
!=
osl
::
FileBase
::
E_None
)
{
SAL_WARN
(
"unoidl"
,
"cannot getSystemPathFromFileURL("
<<
uri
.
copy
(
0
,
i
)
<<
")"
);
return
status
.
getFileName
();
}
OString
dir
(
OUStringToOString
(
path
,
osl_getThreadTextEncoding
()));
OString
name
(
OUStringToOString
(
uri
.
copy
(
i
),
osl_getThreadTextEncoding
()));
DIR
*
d
=
opendir
(
dir
.
getStr
());
if
(
d
==
0
)
{
SAL_WARN
(
"unoidl"
,
"cannot opendir("
<<
dir
<<
")"
);
return
status
.
getFileName
();
}
for
(;;)
{
dirent
ent
;
dirent
*
p
;
int
e
=
readdir_r
(
d
,
&
ent
,
&
p
);
if
(
e
!=
0
)
{
SAL_WARN
(
"unoidl"
,
"cannot readdir_r"
);
closedir
(
d
);
return
status
.
getFileName
();
}
if
(
p
==
0
)
{
SAL_WARN
(
"unoidl"
,
"cannot find "
<<
name
<<
" via readdir of "
<<
dir
);
closedir
(
d
);
return
status
.
getFileName
();
}
if
(
name
.
equalsIgnoreAsciiCase
(
p
->
d_name
))
{
closedir
(
d
);
return
OUString
(
p
->
d_name
,
std
::
strlen
(
p
->
d_name
),
osl_getThreadTextEncoding
());
}
}
sal_Int32
i
=
uri
.
lastIndexOf
(
'/'
)
+
1
;
OUString
path
;
if
(
osl
::
FileBase
::
getSystemPathFromFileURL
(
uri
.
copy
(
0
,
i
),
path
)
!=
osl
::
FileBase
::
E_None
)
{
SAL_WARN
(
"unoidl"
,
"cannot getSystemPathFromFileURL("
<<
uri
.
copy
(
0
,
i
)
<<
")"
);
return
status
.
getFileName
();
}
OString
dir
(
OUStringToOString
(
path
,
osl_getThreadTextEncoding
()));
OString
name
(
OUStringToOString
(
uri
.
copy
(
i
),
osl_getThreadTextEncoding
()));
DIR
*
d
=
opendir
(
dir
.
getStr
());
if
(
d
==
0
)
{
SAL_WARN
(
"unoidl"
,
"cannot opendir("
<<
dir
<<
")"
);
return
status
.
getFileName
();
}
for
(;;)
{
dirent
ent
;
dirent
*
p
;
int
e
=
readdir_r
(
d
,
&
ent
,
&
p
);
if
(
e
!=
0
)
{
SAL_WARN
(
"unoidl"
,
"cannot readdir_r"
);
closedir
(
d
);
return
status
.
getFileName
();
}
if
(
p
==
0
)
{
SAL_WARN
(
"unoidl"
,
"cannot find "
<<
name
<<
" via readdir of "
<<
dir
);
closedir
(
d
);
return
status
.
getFileName
();
}
if
(
name
.
equalsIgnoreAsciiCase
(
p
->
d_name
))
{
closedir
(
d
);
return
OUString
(
p
->
d_name
,
std
::
strlen
(
p
->
d_name
),
osl_getThreadTextEncoding
());
}
}
#else
(
void
)
uri
;
return
status
.
getFileName
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment