diff options
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/dialogs/PlaceEditDialog.cxx | 9 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 2 | ||||
-rw-r--r-- | svtools/source/svhtml/htmlkywd.cxx | 2 | ||||
-rw-r--r-- | svtools/source/svhtml/htmlout.cxx | 5 |
4 files changed, 7 insertions, 11 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; } diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx index b345a48e5cfc..de34418d37ce 100644 --- a/svtools/source/svhtml/htmlkywd.cxx +++ b/svtools/source/svhtml/htmlkywd.cxx @@ -200,7 +200,7 @@ HtmlTokenId GetHTMLToken( const OUString& rName ) HtmlTokenId nRet = HtmlTokenId::NONE; - if( !rName.compareTo( OOO_STRING_SVTOOLS_HTML_comment, 3 ) ) + if( rName.startsWith( OOO_STRING_SVTOOLS_HTML_comment )) return HtmlTokenId::COMMENT; void* pFound; diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index c52207e10f32..f3993cba8dbe 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -980,10 +980,9 @@ OString HTMLOutFuncs::CreateTableDataOptionsValNum( bool HTMLOutFuncs::PrivateURLToInternalImg( OUString& rURL ) { - if( rURL.getLength() > 14 && - rURL.compareTo( OOO_STRING_SVTOOLS_HTML_private_image, 14 ) == 0 ) + if( rURL.startsWith(OOO_STRING_SVTOOLS_HTML_private_image) ) { - rURL = rURL.copy( 14 ); + rURL = rURL.copy( strlen(OOO_STRING_SVTOOLS_HTML_private_image) ); return true; } |