[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Feb 4 22:02:15 UTC 2019


 sw/source/ui/dialog/uiregionsw.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit d4fe30d494bcedcaf7396a772ce729641c667534
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Fri Feb 1 07:43:17 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 23:01:53 2019 +0100

    Use indexed getToken()
    
    Change-Id: I7637728bac4b7f0df56c564b204dce08db1298e8
    Reviewed-on: https://gerrit.libreoffice.org/67326
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 783e2b0b1f2b..877083ceaf34 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -242,8 +242,9 @@ void SectRepr::SetFilter( const OUString& rFilter )
 {
     OUString sNewFile;
     const OUString sOldFileName( m_SectionData.GetLinkFileName() );
-    const OUString sFile( sOldFileName.getToken( 0, sfx2::cTokenSeparator ) );
-    const OUString sSub( sOldFileName.getToken( 2, sfx2::cTokenSeparator ) );
+    sal_Int32 nIdx{ 0 };
+    const OUString sFile( sOldFileName.getToken( 0, sfx2::cTokenSeparator, nIdx ) ); // token 0
+    const OUString sSub( sOldFileName.getToken( 1, sfx2::cTokenSeparator, nIdx ) );  // token 2
 
     if( !sFile.isEmpty() )
         sNewFile = sFile + OUStringLiteral1(sfx2::cTokenSeparator) +


More information about the Libreoffice-commits mailing list