[Libreoffice-commits] core.git: sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Feb 13 06:51:24 UTC 2019
sfx2/source/dialog/splitwin.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit ac200764897f738f3faac47fc664048409fe37f8
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Feb 10 15:55:07 2019 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Wed Feb 13 07:51:01 2019 +0100
Use indexed getToken()
Change-Id: I070cd4903a1aae0c5b22f0991ebf274b8dc09974
Reviewed-on: https://gerrit.libreoffice.org/67632
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 9dd57d90615a..9a97c291aaed 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -234,24 +234,24 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
aWinData = aTemp;
if ( aWinData.startsWith("V") )
{
- pEmptyWin->nState = static_cast<sal_uInt16>(aWinData.getToken( 1, ',' ).toInt32());
+ sal_Int32 nIdx{ 0 };
+ pEmptyWin->nState = static_cast<sal_uInt16>(aWinData.getToken( 1, ',', nIdx ).toInt32());
if ( pEmptyWin->nState & 2 )
pEmptyWin->bFadeIn = true;
bPinned = true; // always assume pinned - floating mode not used anymore
- sal_uInt16 i=2;
- sal_uInt16 nCount = static_cast<sal_uInt16>(aWinData.getToken(i++, ',').toInt32());
+ sal_uInt16 nCount = static_cast<sal_uInt16>(aWinData.getToken(0, ',', nIdx).toInt32());
for ( sal_uInt16 n=0; n<nCount; n++ )
{
std::unique_ptr<SfxDock_Impl> pDock(new SfxDock_Impl);
pDock->pWin = nullptr;
pDock->bNewLine = false;
pDock->bHide = true;
- pDock->nType = static_cast<sal_uInt16>(aWinData.getToken(i++, ',').toInt32());
+ pDock->nType = static_cast<sal_uInt16>(aWinData.getToken(0, ',', nIdx).toInt32());
if ( !pDock->nType )
{
// could mean NewLine
- pDock->nType = static_cast<sal_uInt16>(aWinData.getToken(i++, ',').toInt32());
+ pDock->nType = static_cast<sal_uInt16>(aWinData.getToken(0, ',', nIdx).toInt32());
if ( !pDock->nType )
{
// Read error
More information about the Libreoffice-commits
mailing list