diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:53:55 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-01-21 19:49:40 +0000 |
commit | 592f4e2a716e91a49485eb921f00fd92b2e3dfed (patch) | |
tree | 280e1c71843c25d13471a05cacfb8d176fd3910d /sfx2 | |
parent | de19819871a5ce1faabb9dced0e40df97d18e168 (diff) |
fdo#73618: Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to
startsWith calls" should rather have converted to oprator ==.
(cherry picked from commit a3f32769fc4bb23c64168b412dd10ec769a3854d)
Conflicts:
sc/source/ui/unoobj/nameuno.cxx
sc/source/ui/unoobj/styleuno.cxx
sfx2/source/appl/sfxhelp.cxx
stoc/source/security/permissions.cxx
sw/source/core/unocore/unocrsrhelper.cxx
(None of those bogus startsWith calls seem problematic enough to warrant
backporting also to libreoffice-4-2-0.) <- this is utter nonsense, this
commit actually fixes fdo#73618
Reviewed-on: https://gerrit.libreoffice.org/7578
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 523ad9696c9135a29393a0c4d147ab206b6de4f5)
squashed fixup:
ucb: fix inverted condition in webdav lcl_sendPartialGETRequest
(regression from a3f32769fc4bb23c64168b412dd10ec769a3854d)
(cherry picked from commit 3780738154b8c3b3f9d85c64cccf621d97574886)
Reviewed-on: https://gerrit.libreoffice.org/7581
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
(cherry picked from commit bd121d45f847ff353e3796510fac3181b88a87b1)
Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
Reviewed-on: https://gerrit.libreoffice.org/7580
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 28 | ||||
-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, 22 insertions, 22 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 3640b4616a8c..5736c541c0ec 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -328,22 +328,22 @@ 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("dbbrowser") - || aFactoryShortName.startsWith("swform") ) + else if ( aFactoryShortName == "dbquery" + || aFactoryShortName == "dbbrowser" + || aFactoryShortName == "dbrelation" + || aFactoryShortName == "dbtable" + || aFactoryShortName == "dbapp" + || aFactoryShortName == "dbreport" + || aFactoryShortName == "swreport" + || aFactoryShortName == "dbbrowser" + || 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 22ac9ae2c232..bef3bb83b3c0 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 70e9c3d462ac..1de92d66fdc0 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 3a12c9e1e281..67c2743b5847 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -211,13 +211,13 @@ static void Execute( uno::Any& aEventData, const document::DocumentEvent& aTrigg 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 72643d9b5338..5feb401bf81e 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(); |