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

getToken() ==> copy() since separator positions are known

Change-Id: Ib13f279fd764538deb77b3ee871e58baf8676be2
Reviewed-on: https://gerrit.libreoffice.org/69242
Tested-by: Jenkins
Reviewed-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst b85b58fe
......@@ -462,19 +462,15 @@ void RemoteFilesDialog::InitSize()
OUString sCfgStr;
if( aUserData >>= sCfgStr )
{
int nPos = sCfgStr.indexOf( "|" );
if( nPos != -1 )
{
nPos = sCfgStr.indexOf( "|", nPos + 1 );
if( nPos != -1 )
{
sal_Int32 nIdx = 0;
m_nWidth = sCfgStr.getToken( 0, '|', nIdx ).toInt32();
m_nHeight = sCfgStr.getToken( 0, '|', nIdx ).toInt32();
m_pFileView->SetConfigString( sCfgStr.copy( nPos + 1) );
}
}
sal_Int32 nPos1{ sCfgStr.indexOf('|') };
if (nPos1<0)
return;
sal_Int32 nPos2{ sCfgStr.indexOf('|', nPos1+1 ) };
if (nPos2<0)
return;
m_nWidth = sCfgStr.copy(0, nPos1++).toInt32();
m_nHeight = sCfgStr.copy(nPos1, nPos2-nPos1).toInt32();
m_pFileView->SetConfigString( sCfgStr.copy(nPos2+1) );
}
}
else
......
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