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
3de49689
Kaydet (Commit)
3de49689
authored
Nis 25, 2018
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid comphelper::string::getTokenCount()
Change-Id: I2aae4f106f783969ede076ce7af14e5946a554ae
üst
209a8d4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
basmgr.cxx
basic/source/basmgr/basmgr.cxx
+19
-17
No files found.
basic/source/basmgr/basmgr.cxx
Dosyayı görüntüle @
3de49689
...
...
@@ -32,7 +32,6 @@
#include <tools/diagnose_ex.h>
#include <basic/sbmod.hxx>
#include <unotools/intlwrapper.hxx>
#include <comphelper/string.hxx>
#include <o3tl/make_unique.hxx>
#include <basic/sbuno.hxx>
...
...
@@ -778,15 +777,16 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
if
(
!
aLibs
.
isEmpty
()
)
{
INetURLObject
aCurStorage
(
aStorName
,
INetProtocol
::
File
);
sal_Int32
nLibs
=
comphelper
::
string
::
getTokenCount
(
aLibs
,
LIB_SEP
);
for
(
sal_Int32
nLib
=
0
;
nLib
<
nLibs
;
nLib
++
)
{
OUString
aLibInfo
(
aLibs
.
getToken
(
nLib
,
LIB_SEP
));
// TODO: Remove == 2
DBG_ASSERT
(
(
comphelper
::
string
::
getTokenCount
(
aLibInfo
,
LIBINFO_SEP
)
==
2
)
||
(
comphelper
::
string
::
getTokenCount
(
aLibInfo
,
LIBINFO_SEP
)
==
3
),
"Invalid Lib-Info!"
);
OUString
aLibName
(
aLibInfo
.
getToken
(
0
,
LIBINFO_SEP
)
);
OUString
aLibAbsStorageName
(
aLibInfo
.
getToken
(
1
,
LIBINFO_SEP
)
);
OUString
aLibRelStorageName
(
aLibInfo
.
getToken
(
2
,
LIBINFO_SEP
)
);
sal_Int32
nLibPos
{
0
};
do
{
const
OUString
aLibInfo
(
aLibs
.
getToken
(
0
,
LIB_SEP
,
nLibPos
));
sal_Int32
nInfoPos
{
0
};
const
OUString
aLibName
(
aLibInfo
.
getToken
(
0
,
LIBINFO_SEP
,
nInfoPos
)
);
DBG_ASSERT
(
nInfoPos
>=
0
,
"Invalid Lib-Info!"
);
const
OUString
aLibAbsStorageName
(
aLibInfo
.
getToken
(
0
,
LIBINFO_SEP
,
nInfoPos
)
);
// TODO: fail also here if there are no more tokens?
const
OUString
aLibRelStorageName
(
aLibInfo
.
getToken
(
0
,
LIBINFO_SEP
,
nInfoPos
)
);
DBG_ASSERT
(
nInfoPos
<
0
,
"Invalid Lib-Info!"
);
INetURLObject
aLibAbsStorage
(
aLibAbsStorageName
,
INetProtocol
::
File
);
INetURLObject
aLibRelStorage
(
aStorName
);
...
...
@@ -817,7 +817,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
StringErrorInfo
*
pErrInf
=
new
StringErrorInfo
(
ERRCODE_BASMGR_LIBLOAD
,
aStorName
,
DialogMask
::
ButtonsOk
);
aErrors
.
emplace_back
(
*
pErrInf
,
BasicErrorReason
::
STORAGENOTFOUND
);
}
}
}
while
(
nLibPos
>=
0
);
}
}
...
...
@@ -1562,17 +1562,19 @@ ErrCode BasicManager::ExecuteMacro( OUString const& i_fullyQualifiedName, OUStri
OUStringBuffer
aBuff
;
OUString
sArgs2
=
sArgs
.
makeStringAndClear
();
sal_Int32
nCount
=
comphelper
::
string
::
getTokenCount
(
sArgs2
,
','
);
aBuff
.
append
(
"("
);
for
(
sal_Int32
n
=
0
;
n
<
nCount
;
++
n
)
if
(
!
sArgs2
.
isEmpty
()
)
{
aBuff
.
append
(
"
\"
"
);
aBuff
.
append
(
sArgs2
.
getToken
(
n
,
','
)
);
aBuff
.
append
(
"
\"
"
);
if
(
n
<
nCount
-
1
)
sal_Int32
nPos
{
0
};
for
(;;)
{
aBuff
.
append
(
"
\"
"
);
aBuff
.
append
(
sArgs2
.
getToken
(
0
,
','
,
nPos
)
);
aBuff
.
append
(
"
\"
"
);
if
(
nPos
<
0
)
break
;
aBuff
.
append
(
","
);
}
}
...
...
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