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

Avoid getToken index for single call

Change-Id: Ibefd5b0737de7d29a47bab0709ed96901a5e028e
Reviewed-on: https://gerrit.libreoffice.org/66227
Tested-by: Jenkins
Reviewed-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst 7b954849
...@@ -2813,8 +2813,7 @@ static OUString lcl_ExctractVariableAndHint( const OUString& rCommand, OUString& ...@@ -2813,8 +2813,7 @@ static OUString lcl_ExctractVariableAndHint( const OUString& rCommand, OUString&
++nIndex; ++nIndex;
OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK " OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK "
nIndex = 0; sShortCommand = sShortCommand.getToken(0, '\\');
sShortCommand = sShortCommand.getToken( 0, '\\', nIndex);
nIndex = 0; nIndex = 0;
OUString sRet = sShortCommand.getToken( 0, ' ', nIndex); OUString sRet = sShortCommand.getToken( 0, ' ', nIndex);
if( nIndex > 0) if( nIndex > 0)
...@@ -3813,8 +3812,7 @@ void DomainMapper_Impl::handleToc ...@@ -3813,8 +3812,7 @@ void DomainMapper_Impl::handleToc
// \t Builds a table of contents by using style names other than the standard outline styles // \t Builds a table of contents by using style names other than the standard outline styles
if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue )) if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue ))
{ {
sal_Int32 nPos = 0; OUString sToken = sValue.getToken(1, '"');
OUString sToken = sValue.getToken( 1, '"', nPos);
sTemplate = sToken.isEmpty() ? sValue : sToken; sTemplate = sToken.isEmpty() ? sValue : sToken;
} }
// \u Builds a table of contents by using the applied paragraph outline level // \u Builds a table of contents by using the applied paragraph outline level
...@@ -4339,12 +4337,9 @@ void DomainMapper_Impl::CloseFieldCommand() ...@@ -4339,12 +4337,9 @@ void DomainMapper_Impl::CloseFieldCommand()
} }
break; break;
case FIELD_FILLIN : case FIELD_FILLIN :
{
sal_Int32 nIndex = 0;
if (xFieldProperties.is()) if (xFieldProperties.is())
xFieldProperties->setPropertyValue( xFieldProperties->setPropertyValue(
getPropertyName(PROP_HINT), uno::makeAny( pContext->GetCommand().getToken( 1, '\"', nIndex))); getPropertyName(PROP_HINT), uno::makeAny( pContext->GetCommand().getToken(1, '\"')));
}
break; break;
case FIELD_FILENAME: case FIELD_FILENAME:
{ {
......
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