diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:53:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:54:52 +0100 |
commit | a3f32769fc4bb23c64168b412dd10ec769a3854d (patch) | |
tree | 92bb435946dcfc422c9816bc05c150069a2da3c3 /sfx2/source | |
parent | 35539318cecddc9ccb2904573a894ea05adc432c (diff) |
Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to
startsWith calls" should rather have converted to oprator ==.
Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 26 | ||||
-rw-r--r-- | sfx2/source/appl/shutdowniconunx.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/notify/eventsupplier.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 2 |
6 files changed, 21 insertions, 21 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 7cf1b210a66e..e7fd583d3a19 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -328,21 +328,21 @@ OUString SfxHelp::GetHelpModuleName_Impl() aFactoryShortName = "schart" ; else if ( aFactoryShortName == "BasicIDE" ) aFactoryShortName = "sbasic"; - else if ( aFactoryShortName.startsWith("sweb") - || aFactoryShortName.startsWith("sglobal") - || aFactoryShortName.startsWith("swxform") ) + else if ( aFactoryShortName == "sweb" + || aFactoryShortName == "sglobal" + || aFactoryShortName == "swxform" ) aFactoryShortName = "swriter" ; - else if ( aFactoryShortName.startsWith("dbquery") - || aFactoryShortName.startsWith("dbbrowser") - || aFactoryShortName.startsWith("dbrelation") - || aFactoryShortName.startsWith("dbtable") - || aFactoryShortName.startsWith("dbapp") - || aFactoryShortName.startsWith("dbreport") - || aFactoryShortName.startsWith("swreport") - || aFactoryShortName.startsWith("swform") ) + else if ( aFactoryShortName == "dbquery" + || aFactoryShortName == "dbbrowser" + || aFactoryShortName == "dbrelation" + || aFactoryShortName == "dbtable" + || aFactoryShortName == "dbapp" + || aFactoryShortName == "dbreport" + || aFactoryShortName == "swreport" + || aFactoryShortName == "swform" ) aFactoryShortName = "sdatabase"; - else if ( aFactoryShortName.startsWith("sbibliography") - || aFactoryShortName.startsWith("StartModule") ) + else if ( aFactoryShortName == "sbibliography" + || aFactoryShortName == "StartModule" ) aFactoryShortName = sDefaultModule; } else diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index 937cabe8de6d..02bde57458a9 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -212,7 +212,7 @@ static void add_ugly_db_item( GtkMenuShell *pMenuShell, const char *pAsciiURL, aEntry[m].Value >>= aDescription; } - if ( aURL.startsWith(BASE_URL) && !aDescription.isEmpty() ) + if ( aURL == BASE_URL && !aDescription.isEmpty() ) { add_item (pMenuShell, pAsciiURL, &aDescription, nResId, pFnCallback); break; diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 8e3e8a692bb1..c74042d487d8 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -498,7 +498,7 @@ sal_uInt16 GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl( const OUS { nResult = BMP_128X128_MATH_DOC; } - else if ( aFactoryShortName.startsWith( "swriter" ) ) + else if ( aFactoryShortName == "swriter" || aFactoryShortName.startsWith("swriter/") ) { nResult = BMP_128X128_WRITER_DOC; } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index d76f2e4894f3..33c1ee8e83b9 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2311,7 +2311,7 @@ sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const datatransfer::DataF && aFlavor.DataType == getCppuType( (const sal_uInt64*) 0 ) ) return sal_True; } - else if ( aFlavor.MimeType.startsWith("application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"") ) + else if ( aFlavor.MimeType == "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) return sal_True; diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index 56e45f40d4ea..4b25de6ed29b 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -211,13 +211,13 @@ void SfxEvents_Impl::Execute( uno::Any& aEventData, const document::DocumentEven nIndex += 1; } - if (aType.startsWith(STAR_BASIC) && !aScript.isEmpty()) + if (aType == STAR_BASIC && !aScript.isEmpty()) { uno::Any aAny; SfxMacroLoader::loadMacro( aScript, aAny, pDoc ); } - else if (aType.startsWith("Service") || - aType.startsWith("Script")) + else if (aType == "Service" || + aType == "Script") { if ( !aScript.isEmpty() ) { @@ -385,7 +385,7 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const uno::Any& rElement, SfxObjectShe ScriptType eType( STARBASIC ); if ( aType == STAR_BASIC ) eType = STARBASIC; - else if (aType.startsWith("Script") && !aScriptURL.isEmpty()) + else if (aType == "Script" && !aScriptURL.isEmpty()) eType = EXTENDED_STYPE; else if ( aType == SVX_MACRO_LANGUAGE_JAVASCRIPT ) eType = JAVASCRIPT; diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index e54258e24af5..a69475464966 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -850,7 +850,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const } } } - else if( sTargetFrameName.startsWith("_self") || sTargetFrameName.isEmpty() ) + else if( sTargetFrameName == "_self" || sTargetFrameName.isEmpty() ) { // check for already loaded URL ... but with additional jumpmark! Reference< frame::XModel > xModel = getModel(); |