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
a53b9bb3
Kaydet (Commit)
a53b9bb3
authored
Ara 16, 2010
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tidy tools::getProcessWorkingDir
üst
d8fb26b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
getprocessworkingdir.hxx
tools/inc/tools/getprocessworkingdir.hxx
+4
-4
getprocessworkingdir.cxx
tools/source/misc/getprocessworkingdir.cxx
+13
-10
No files found.
tools/inc/tools/getprocessworkingdir.hxx
Dosyayı görüntüle @
a53b9bb3
...
...
@@ -39,10 +39,10 @@ namespace tools {
// get the process's current working directory, taking OOO_CWD into account
//
// @param
u
rl
//
a non-null pointer that receives the directory URL (with or without a fina
l
//
slash) upon successful
return, and the empty string upon unsuccessful return
TOOLS_DLLPUBLIC
bool
getProcessWorkingDir
(
rtl
::
OUString
*
u
rl
);
// @param
rU
rl
//
Receives the directory URL (with or without a final slash) upon successfu
l
// return, and the empty string upon unsuccessful return
TOOLS_DLLPUBLIC
bool
getProcessWorkingDir
(
rtl
::
OUString
&
rU
rl
);
}
...
...
tools/source/misc/getprocessworkingdir.cxx
Dosyayı görüntüle @
a53b9bb3
...
...
@@ -41,24 +41,27 @@
namespace
tools
{
bool
getProcessWorkingDir
(
rtl
::
OUString
*
url
)
{
OSL_ASSERT
(
url
!=
NULL
);
bool
getProcessWorkingDir
(
rtl
::
OUString
&
rUrl
)
{
rUrl
=
rtl
::
OUString
();
rtl
::
OUString
s
(
RTL_CONSTASCII_USTRINGPARAM
(
"$OOO_CWD"
));
rtl
::
Bootstrap
::
expandMacros
(
s
);
if
(
s
.
getLength
()
==
0
)
{
if
(
osl_getProcessWorkingDir
(
&
url
->
pData
)
==
osl_Process_E_None
)
{
if
(
s
.
getLength
()
==
0
)
{
if
(
osl_getProcessWorkingDir
(
&
rUrl
.
pData
)
==
osl_Process_E_None
)
return
true
;
}
}
else
if
(
s
[
0
]
==
'1'
)
{
*
url
=
s
.
copy
(
1
);
}
else
if
(
s
[
0
]
==
'1'
)
{
rUrl
=
s
.
copy
(
1
);
return
true
;
}
else
if
(
s
[
0
]
==
'2'
&&
(
osl
::
FileBase
::
getFileURLFromSystemPath
(
s
.
copy
(
1
),
*
url
)
==
}
else
if
(
s
[
0
]
==
'2'
&&
(
osl
::
FileBase
::
getFileURLFromSystemPath
(
s
.
copy
(
1
),
rUrl
)
==
osl
::
FileBase
::
E_None
))
{
return
true
;
}
*
url
=
rtl
::
OUString
();
return
false
;
}
...
...
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