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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Dec 28 23:01:35 UTC 2018


 cui/source/tabpages/chardlg.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 7ee8f2e34d1d50599a39b4d6f289ff03612ca6a3
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Fri Dec 28 11:36:14 2018 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Sat Dec 29 00:01:13 2018 +0100

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

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 8ac253999f85..a2eaf26e7da4 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2682,10 +2682,11 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
 
     if ( !sUser.isEmpty() )
     {
-        m_nSuperEsc = static_cast<short>(sUser.getToken( 0, ';' ).toInt32());
-        m_nSubEsc = static_cast<short>(sUser.getToken( 1, ';' ).toInt32());
-        m_nSuperProp = static_cast<sal_uInt8>(sUser.getToken( 2, ';' ).toInt32());
-        m_nSubProp = static_cast<sal_uInt8>(sUser.getToken( 3, ';' ).toInt32());
+        sal_Int32 nIdx {0};
+        m_nSuperEsc = static_cast<short>(sUser.getToken( 0, ';', nIdx ).toInt32());
+        m_nSubEsc = static_cast<short>(sUser.getToken( 0, ';', nIdx ).toInt32());
+        m_nSuperProp = static_cast<sal_uInt8>(sUser.getToken( 0, ';', nIdx ).toInt32());
+        m_nSubProp = static_cast<sal_uInt8>(sUser.getToken( 0, ';', nIdx ).toInt32());
 
         //fdo#75307 validate all the entries and discard all of them if any are
         //out of range


More information about the Libreoffice-commits mailing list