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

Simplify: getToken+getLength ==> indexOf

Change-Id: I50de21b635d791ca8f7299dcc8dafaf4e89a9fc6
Reviewed-on: https://gerrit.libreoffice.org/65680
Tested-by: Jenkins
Reviewed-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst bd61ef0c
...@@ -2405,8 +2405,7 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt ) ...@@ -2405,8 +2405,7 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
if ( xContent.is() ) if ( xContent.is() )
{ {
OUString sName = xContent->getIdentifier()->getContentIdentifier(); OUString sName = xContent->getIdentifier()->getContentIdentifier();
sal_Int32 nIndex = 0; sName = sName.copy(sName.indexOf('/') + 1);
sName = sName.copy(sName.getToken(0,'/',nIndex).getLength() + 1);
if ( m_aAsyncDrop.aUrl.getLength() >= sName.getLength() && m_aAsyncDrop.aUrl.startsWith(sName) ) if ( m_aAsyncDrop.aUrl.getLength() >= sName.getLength() && m_aAsyncDrop.aUrl.startsWith(sName) )
{ {
m_aAsyncDrop.aDroppedData.clear(); m_aAsyncDrop.aDroppedData.clear();
......
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