diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-10 12:42:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-10 15:53:13 +0200 |
commit | 43a6b59539ad573436f43303e9fbe17c12dc9c84 (patch) | |
tree | 24cbf3a9fc84ad38e17ed92ed0a50db48f20f2c5 /svtools/source/dialogs/PlaceEditDialog.cxx | |
parent | f2a1298ea409141a9190c7789b39546644084980 (diff) |
simplify some OUString compareTo calls
to either startsWith or == or !=
Change-Id: Ie4b4662f5b8e4532cbc1ab36910389e0b3d41ef0
Reviewed-on: https://gerrit.libreoffice.org/39750
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/dialogs/PlaceEditDialog.cxx')
-rw-r--r-- | svtools/source/dialogs/PlaceEditDialog.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 8305ea557b94..031edde3755a 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -226,13 +226,10 @@ IMPL_LINK( PlaceEditDialog, OKHdl, Button*, /*pBtn*/, void) if ( m_xCurrentDetails.get() ) { OUString sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DecodeMechanism::WithCharset ); - OUString sGDriveHost( GDRIVE_BASE_URL ); - OUString sAlfrescoHost( ALFRESCO_CLOUD_BASE_URL ); - OUString sOneDriveHost( ONEDRIVE_BASE_URL ); - if ( sUrl.compareTo( sGDriveHost, sGDriveHost.getLength() ) == 0 - || sUrl.compareTo( sAlfrescoHost, sAlfrescoHost.getLength() ) == 0 - || sUrl.compareTo( sOneDriveHost, sOneDriveHost.getLength() ) == 0 ) + if ( sUrl.startsWith( GDRIVE_BASE_URL ) + || sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL ) + || sUrl.startsWith( ONEDRIVE_BASE_URL ) ) { m_pBTRepoRefresh->Click(); |