summaryrefslogtreecommitdiff
path: root/svtools/source/dialogs
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 12:42:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 15:53:13 +0200
commit43a6b59539ad573436f43303e9fbe17c12dc9c84 (patch)
tree24cbf3a9fc84ad38e17ed92ed0a50db48f20f2c5 /svtools/source/dialogs
parentf2a1298ea409141a9190c7789b39546644084980 (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')
-rw-r--r--svtools/source/dialogs/PlaceEditDialog.cxx9
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx2
2 files changed, 4 insertions, 7 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();
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index f35d174df05c..6262bcdee23b 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -853,7 +853,7 @@ void AssignmentPersistentData::ImplCommit()
for (;pTableNames != pEnd; ++pTableNames)
{
m_pTable->InsertEntry(*pTableNames);
- if (0 == pTableNames->compareTo(sOldTable))
+ if (*pTableNames == sOldTable)
bKnowOldTable = true;
}