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

Avoid using index for single getToken() call

Change-Id: I76eaf140b153199b62606ac3336d712a64205dcc
Reviewed-on: https://gerrit.libreoffice.org/69246
Tested-by: Jenkins
Reviewed-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst cca2e429
......@@ -115,9 +115,7 @@ static SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath )
uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
xProps->getPropertyValue("Title") >>= aName;
sal_Int32 pos = 0;
aName = aName.getToken(0,'-',pos);
aName = aName.trim();
aName = aName.getToken(0, '-').trim();
if( sMacroURLOrPath.lastIndexOf( aName ) >= 0 )
{
pFoundShell = pShell;
......
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