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
6a7250d7
Kaydet (Commit)
6a7250d7
authored
Şub 06, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String to rtl::OUString & reduce indent levels.
üst
25e019f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
55 deletions
+53
-55
globalx.cxx
sc/source/core/data/globalx.cxx
+53
-55
No files found.
sc/source/core/data/globalx.cxx
Dosyayı görüntüle @
6a7250d7
...
@@ -58,76 +58,74 @@ void ScGlobal::InitAddIns()
...
@@ -58,76 +58,74 @@ void ScGlobal::InitAddIns()
{
{
// multi paths separated by semicolons
// multi paths separated by semicolons
SvtPathOptions
aPathOpt
;
SvtPathOptions
aPathOpt
;
String
aMultiPath
=
aPathOpt
.
GetAddinPath
();
rtl
::
OUString
aMultiPath
=
aPathOpt
.
GetAddinPath
();
if
(
aMultiPath
.
Len
()
>
0
)
if
(
aMultiPath
.
isEmpty
())
return
;
sal_Int32
nTokens
=
comphelper
::
string
::
getTokenCount
(
aMultiPath
,
';'
);
for
(
sal_Int32
j
=
0
;
j
<
nTokens
;
++
j
)
{
{
xub_StrLen
nTokens
=
comphelper
::
string
::
getTokenCount
(
aMultiPath
,
';'
);
rtl
::
OUString
aPath
=
comphelper
::
string
::
getToken
(
aMultiPath
,
j
,
';'
);
xub_StrLen
nIndex
=
0
;
if
(
aPath
.
isEmpty
())
for
(
xub_StrLen
j
=
0
;
j
<
nTokens
;
j
++
)
continue
;
// use LocalFileHelper to convert the path to a URL that always points
// to the file on the server
rtl
::
OUString
aUrl
;
if
(
utl
::
LocalFileHelper
::
ConvertPhysicalNameToURL
(
aPath
,
aUrl
)
)
aPath
=
aUrl
;
INetURLObject
aObj
;
aObj
.
SetSmartURL
(
aPath
);
aObj
.
setFinalSlash
();
try
{
{
String
aPath
(
aMultiPath
.
GetToken
(
0
,
';'
,
nIndex
)
);
::
ucbhelper
::
Content
aCnt
(
aObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
if
(
aPath
.
Len
()
>
0
)
Reference
<
XCommandEnvironment
>
()
);
Reference
<
sdbc
::
XResultSet
>
xResultSet
;
Sequence
<
rtl
::
OUString
>
aProps
;
try
{
xResultSet
=
aCnt
.
createCursor
(
aProps
,
::
ucbhelper
::
INCLUDE_DOCUMENTS_ONLY
);
}
catch
(
Exception
&
)
{
{
//
use LocalFileHelper to convert the path to a URL that always points
//
ucb may throw different exceptions on failure now
//
to the file on the server
//
no assertion if AddIn directory doesn't exist
rtl
::
OUString
aUrl
;
}
if
(
utl
::
LocalFileHelper
::
ConvertPhysicalNameToURL
(
aPath
,
aUrl
)
)
aPath
=
aUrl
;
if
(
xResultSet
.
is
()
)
{
INetURLObject
aObj
;
Reference
<
sdbc
::
XRow
>
xRow
(
xResultSet
,
UNO_QUERY
)
;
aObj
.
SetSmartURL
(
aPath
);
Reference
<
XContentAccess
>
aObj
.
setFinalSlash
(
);
xContentAccess
(
xResultSet
,
UNO_QUERY
);
try
try
{
{
::
ucbhelper
::
Content
aCnt
(
aObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
if
(
xResultSet
->
first
()
)
Reference
<
XCommandEnvironment
>
()
);
Reference
<
sdbc
::
XResultSet
>
xResultSet
;
Sequence
<
rtl
::
OUString
>
aProps
;
try
{
xResultSet
=
aCnt
.
createCursor
(
aProps
,
::
ucbhelper
::
INCLUDE_DOCUMENTS_ONLY
);
}
catch
(
Exception
&
)
{
// ucb may throw different exceptions on failure now
// no assertion if AddIn directory doesn't exist
}
if
(
xResultSet
.
is
()
)
{
{
Reference
<
sdbc
::
XRow
>
xRow
(
xResultSet
,
UNO_QUERY
);
do
Reference
<
XContentAccess
>
xContentAccess
(
xResultSet
,
UNO_QUERY
);
try
{
if
(
xResultSet
->
first
()
)
{
do
{
rtl
::
OUString
aId
(
xContentAccess
->
queryContentIdentifierString
()
);
InitExternalFunc
(
aId
);
}
while
(
xResultSet
->
next
()
);
}
}
catch
(
Exception
&
)
{
{
OSL_FAIL
(
"ResultSetException catched!"
);
rtl
::
OUString
aId
=
xContentAccess
->
queryContentIdentifierString
();
InitExternalFunc
(
aId
);
}
}
while
(
xResultSet
->
next
()
);
}
}
}
}
catch
(
Exception
&
)
catch
(
Exception
&
)
{
{
OSL_FAIL
(
"Exception catched!"
);
OSL_FAIL
(
"ResultSetException caught!"
);
}
catch
(
...
)
{
OSL_FAIL
(
"unexpected exception caught!"
);
}
}
}
}
}
}
catch
(
Exception
&
)
{
OSL_FAIL
(
"Exception caught!"
);
}
catch
(
...
)
{
OSL_FAIL
(
"unexpected exception caught!"
);
}
}
}
}
}
...
...
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