Kaydet (Commit) ff7d968b authored tarafından Matteo Casalin's avatar Matteo Casalin

Avoid getTokenCount()

Change-Id: I769660ab1832e76ed7ac272d0d2c973d14171c06
üst be6e05e8
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <unocrsr.hxx> #include <unocrsr.hxx>
#include <unotools.hxx> #include <unotools.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <ucbhelper/content.hxx> #include <ucbhelper/content.hxx>
#include <com/sun/star/text/AutoTextContainer.hpp> #include <com/sun/star/text/AutoTextContainer.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker3.hpp> #include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
...@@ -606,12 +605,12 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl, Button*, void) ...@@ -606,12 +605,12 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl, Button*, void)
//check if at least one glossary path is write enabled //check if at least one glossary path is write enabled
SvtPathOptions aPathOpt; SvtPathOptions aPathOpt;
const OUString& sGlosPath( aPathOpt.GetAutoTextPath() ); const OUString& sGlosPath( aPathOpt.GetAutoTextPath() );
const sal_Int32 nPaths = comphelper::string::getTokenCount(sGlosPath, ';');
bool bIsWritable = false; bool bIsWritable = false;
for(sal_Int32 nPath = 0; nPath < nPaths; nPath++) sal_Int32 nIdx {sGlosPath.isEmpty() ? -1 : 0};
while (nIdx>=0)
{ {
const OUString sPath = URIHelper::SmartRel2Abs( const OUString sPath = URIHelper::SmartRel2Abs(
INetURLObject(), sGlosPath.getToken(nPath, ';'), INetURLObject(), sGlosPath.getToken(0, ';', nIdx),
URIHelper::GetMaybeFileHdl()); URIHelper::GetMaybeFileHdl());
try try
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment