[Libreoffice-commits] core.git: dbaccess/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Dec 28 16:20:03 UTC 2018


 dbaccess/source/ui/app/AppController.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 56e4ae786cfe9deec065a686c46a7eb457ce7049
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Fri Dec 28 11:48:07 2018 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Fri Dec 28 17:19:41 2018 +0100

    Simplify: getToken+getLength ==> indexOf
    
    Change-Id: I50de21b635d791ca8f7299dcc8dafaf4e89a9fc6
    Reviewed-on: https://gerrit.libreoffice.org/65680
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 0f49fdd4cb9f..39ef3acd5069 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2405,8 +2405,7 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
         if ( xContent.is() )
         {
             OUString sName = xContent->getIdentifier()->getContentIdentifier();
-            sal_Int32 nIndex = 0;
-            sName = sName.copy(sName.getToken(0,'/',nIndex).getLength() + 1);
+            sName = sName.copy(sName.indexOf('/') + 1);
             if ( m_aAsyncDrop.aUrl.getLength() >= sName.getLength() && m_aAsyncDrop.aUrl.startsWith(sName) )
             {
                 m_aAsyncDrop.aDroppedData.clear();


More information about the Libreoffice-commits mailing list