[Libreoffice-commits] core.git: connectivity/source dbaccess/source desktop/source extensions/source framework/source sc/source sfx2/source svx/source toolkit/source vcl/unx xmloff/source

Noel Grandin noel at peralex.com
Mon Dec 9 02:53:48 PST 2013


 connectivity/source/drivers/jdbc/DatabaseMetaData.cxx        |    4 
 dbaccess/source/core/api/FilteredContainer.cxx               |    4 
 dbaccess/source/ui/dlg/tablespage.cxx                        |    2 
 desktop/source/migration/migration.cxx                       |    2 
 extensions/source/update/feed/updatefeed.cxx                 |    2 
 framework/source/uielement/comboboxtoolbarcontroller.cxx     |   38 +++---
 framework/source/uielement/dropdownboxtoolbarcontroller.cxx  |   26 ++--
 framework/source/uielement/imagebuttontoolbarcontroller.cxx  |    6 -
 framework/source/uielement/spinfieldtoolbarcontroller.cxx    |   32 ++---
 framework/source/uielement/togglebuttontoolbarcontroller.cxx |   26 ++--
 framework/source/uielement/toolbarwrapper.cxx                |    2 
 framework/source/uifactory/addonstoolboxfactory.cxx          |    6 -
 sc/source/core/tool/formulaopt.cxx                           |    4 
 sc/source/filter/xml/XMLTrackedChangesContext.cxx            |    2 
 sc/source/filter/xml/xmlcvali.cxx                            |    4 
 sc/source/filter/xml/xmlexprt.cxx                            |    2 
 sc/source/ui/app/inputhdl.cxx                                |   32 ++---
 sfx2/source/control/unoctitm.cxx                             |   10 -
 svx/source/xoutdev/xattr.cxx                                 |    4 
 toolkit/source/controls/dialogcontrol.cxx                    |    2 
 toolkit/source/controls/unocontrol.cxx                       |   14 +-
 vcl/unx/generic/dtrans/X11_selection.cxx                     |   10 -
 xmloff/source/draw/XMLImageMapExport.cxx                     |    2 
 xmloff/source/script/XMLEventExport.cxx                      |    2 
 xmloff/source/text/txtflde.cxx                               |   64 +++++------
 xmloff/source/text/txtparae.cxx                              |    3 
 26 files changed, 148 insertions(+), 157 deletions(-)

New commits:
commit c5b7a5fd191a8ec65a64980fe3197832dba1ffae
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Dec 9 12:51:35 2013 +0200

    fix equalsAscii conversion. Noticed in fdo#72391
    
    In commit 363cc397172f2b0a94d9c4dc44fc8d95072795a3
    "convert equalsAsciiL calls to startWith calls where possible"
    I incorrectly converted equalsAsciiL calls to startsWith calls.
    This commit fixes those places to use the == OUString operator.
    
    Change-Id: If76993baf73e3d8fb3bbcf6e8314e59fdc1207b6

diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index c257a39..f563c51 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -135,7 +135,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
             bool bIncludeAllTypes = false;
             for ( sal_Int32 i=0; i<typeFilterCount; ++i, ++typeFilter )
             {
-                if ( typeFilter->startsWith( "%" ) )
+                if ( *typeFilter == "%" )
                 {
                     bIncludeAllTypes = true;
                     break;
@@ -163,7 +163,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
             aCatalogFilter = m_pConnection->getCatalogRestriction();
         // similar for schema
         Any aSchemaFilter;
-        if ( schemaPattern.startsWith( "%" ) )
+        if ( schemaPattern == "%" )
             aSchemaFilter = m_pConnection->getSchemaRestriction();
         else
             aSchemaFilter <<= schemaPattern;
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index dfa656c..7e5de81 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -168,7 +168,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto
 
         // first, filter for the table names
         sal_Int32 nTableFilterCount = _tableFilter.getLength();
-        sal_Bool dontFilterTableNames = ( ( nTableFilterCount == 1 ) && _tableFilter[0].startsWith( "%" ) );
+        sal_Bool dontFilterTableNames = ( ( nTableFilterCount == 1 ) && _tableFilter[0] == "%" );
         if( dontFilterTableNames )
         {
             aFilteredTables = _unfilteredTables;
@@ -198,7 +198,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto
 
         // second, filter for the table types
         sal_Int32 nTableTypeFilterCount = _tableTypeFilter.getLength();
-        sal_Bool dontFilterTableTypes = ( ( nTableTypeFilterCount == 1 ) && _tableTypeFilter[0].startsWith( "%" ) );
+        sal_Bool dontFilterTableTypes = ( ( nTableTypeFilterCount == 1 ) && _tableTypeFilter[0] == "%" );
         dontFilterTableTypes = dontFilterTableTypes || ( nTableTypeFilterCount == 0 );
             // (for TableTypeFilter, unlike TableFilter, "empty" means "do not filter at all")
         if ( !dontFilterTableTypes )
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 36f8615..c1fbf55 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -217,7 +217,7 @@ DBG_NAME(OTableSubscriptionPage)
         }
         else
         {
-            if ((1 == _rTableFilter.getLength()) && _rTableFilter[0].startsWith("%"))
+            if ((1 == _rTableFilter.getLength()) && _rTableFilter[0] == "%")
             {   // all tables visible
                 CheckAll(sal_True);
             }
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 64cf32e..974515f 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -1054,7 +1054,7 @@ void MigrationImpl::runServices()
                     {
                         OUString sExtension(sToolbarName.copy(nIndex));
                         OUString sToolbarResourceName(sToolbarName.copy(0, nIndex));
-                        if (!sToolbarResourceName.isEmpty() && sExtension.startsWith(".xml"))
+                        if (!sToolbarResourceName.isEmpty() && sExtension == ".xml")
                             aModuleInfo.m_vToolbars.push_back(sToolbarResourceName);
                     }
                 }
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index b6b1374..86a8d93 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -566,7 +566,7 @@ UpdateInformationProvider::getUpdateInformationEnumeration(
 
             if( xElement.is() )
             {
-                if( xElement->getNodeName().startsWith("feed") )
+                if( xElement->getNodeName() == "feed" )
                 {
                     OUString aXPathExpression;
 
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index 9e2003f..6310d92 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -263,11 +263,11 @@ long ComboboxToolbarController::PreNotify( NotifyEvent& rNEvt )
 
 void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand )
 {
-    if ( rControlCommand.Command.startsWith( "SetText" ))
+    if ( rControlCommand.Command == "SetText" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Text"))
+            if ( rControlCommand.Arguments[i].Name == "Text" )
             {
                 OUString aText;
                 rControlCommand.Arguments[i].Value >>= aText;
@@ -279,11 +279,11 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetList" ))
+    else if ( rControlCommand.Command == "SetList" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "List" ))
+            if ( rControlCommand.Arguments[i].Name == "List" )
             {
                 Sequence< OUString > aList;
                 m_pComboBox->Clear();
@@ -304,13 +304,13 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "AddEntry" ))
+    else if ( rControlCommand.Command == "AddEntry" )
     {
         sal_uInt16      nPos( COMBOBOX_APPEND );
         OUString   aText;
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Text" ))
+            if ( rControlCommand.Arguments[i].Name == "Text" )
             {
                 if ( rControlCommand.Arguments[i].Value >>= aText )
                     m_pComboBox->InsertEntry( aText, nPos );
@@ -318,13 +318,13 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "InsertEntry" ))
+    else if ( rControlCommand.Command == "InsertEntry" )
     {
         sal_uInt16      nPos( COMBOBOX_APPEND );
         OUString   aText;
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Pos" ))
+            if ( rControlCommand.Arguments[i].Name == "Pos" )
             {
                 sal_Int32 nTmpPos = 0;
                 if ( rControlCommand.Arguments[i].Value >>= nTmpPos )
@@ -334,17 +334,17 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
                         nPos = sal_uInt16( nTmpPos );
                 }
             }
-            else if ( rControlCommand.Arguments[i].Name.startsWith( "Text" ))
+            else if ( rControlCommand.Arguments[i].Name == "Text" )
                 rControlCommand.Arguments[i].Value >>= aText;
         }
 
         m_pComboBox->InsertEntry( aText, nPos );
     }
-    else if ( rControlCommand.Command.startsWith( "RemoveEntryPos" ))
+    else if ( rControlCommand.Command == "RemoveEntryPos" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Pos" ))
+            if ( rControlCommand.Arguments[i].Name == "Pos" )
             {
                 sal_Int32 nPos( -1 );
                 if ( rControlCommand.Arguments[i].Value >>= nPos )
@@ -356,11 +356,11 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "RemoveEntryText" ))
+    else if ( rControlCommand.Command == "RemoveEntryText" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Text"))
+            if ( rControlCommand.Arguments[i].Name == "Text")
             {
                 OUString aText;
                 if ( rControlCommand.Arguments[i].Value >>= aText )
@@ -369,11 +369,11 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetDropDownLines" ))
+    else if ( rControlCommand.Command == "SetDropDownLines" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Lines" ))
+            if ( rControlCommand.Arguments[i].Name == "Lines" )
             {
                 sal_Int32 nValue( 5 );
                 rControlCommand.Arguments[i].Value >>= nValue;
@@ -382,11 +382,11 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetBackgroundColor" ))
+    else if ( rControlCommand.Command == "SetBackgroundColor" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Color" ))
+            if ( rControlCommand.Arguments[i].Name == "Color" )
             {
                 com::sun::star::util::Color aColor(0);
                 if ( rControlCommand.Arguments[i].Value >>= aColor )
@@ -398,11 +398,11 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetTextColor" ))
+    else if ( rControlCommand.Command == "SetTextColor" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Color" ))
+            if ( rControlCommand.Arguments[i].Name == "Color" )
             {
                 com::sun::star::util::Color aColor(0);
                 if ( rControlCommand.Arguments[i].Value >>= aColor )
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 9a5e6e7..2bca097 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -214,11 +214,11 @@ long DropdownToolbarController::PreNotify( NotifyEvent& /*rNEvt*/ )
 
 void DropdownToolbarController::executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand )
 {
-    if ( rControlCommand.Command.startsWith( "SetList" ))
+    if ( rControlCommand.Command == "SetList" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "List" ))
+            if ( rControlCommand.Arguments[i].Name == "List" )
             {
                 Sequence< OUString > aList;
                 m_pListBoxControl->Clear();
@@ -241,13 +241,13 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "AddEntry" ))
+    else if ( rControlCommand.Command == "AddEntry" )
     {
         sal_uInt16      nPos( LISTBOX_APPEND );
         OUString   aText;
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Text" ))
+            if ( rControlCommand.Arguments[i].Name == "Text" )
             {
                 if ( rControlCommand.Arguments[i].Value >>= aText )
                     m_pListBoxControl->InsertEntry( aText, nPos );
@@ -255,13 +255,13 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "InsertEntry" ))
+    else if ( rControlCommand.Command == "InsertEntry" )
     {
         sal_uInt16      nPos( LISTBOX_APPEND );
         OUString   aText;
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Pos" ))
+            if ( rControlCommand.Arguments[i].Name == "Pos" )
             {
                 sal_Int32 nTmpPos = 0;
                 if ( rControlCommand.Arguments[i].Value >>= nTmpPos )
@@ -271,17 +271,17 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f
                         nPos = sal_uInt16( nTmpPos );
                 }
             }
-            else if ( rControlCommand.Arguments[i].Name.startsWith( "Text" ))
+            else if ( rControlCommand.Arguments[i].Name == "Text" )
                 rControlCommand.Arguments[i].Value >>= aText;
         }
 
         m_pListBoxControl->InsertEntry( aText, nPos );
     }
-    else if ( rControlCommand.Command.startsWith( "RemoveEntryPos" ))
+    else if ( rControlCommand.Command == "RemoveEntryPos" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Pos" ))
+            if ( rControlCommand.Arguments[i].Name == "Pos" )
             {
                 sal_Int32 nPos( -1 );
                 if ( rControlCommand.Arguments[i].Value >>= nPos )
@@ -293,11 +293,11 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "RemoveEntryText" ))
+    else if ( rControlCommand.Command == "RemoveEntryText" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Text" ))
+            if ( rControlCommand.Arguments[i].Name == "Text" )
             {
                 OUString aText;
                 if ( rControlCommand.Arguments[i].Value >>= aText )
@@ -306,11 +306,11 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetDropDownLines" ))
+    else if ( rControlCommand.Command == "SetDropDownLines" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Lines" ))
+            if ( rControlCommand.Arguments[i].Name == "Lines" )
             {
                 sal_Int32 nValue( 5 );
                 rControlCommand.Arguments[i].Value >>= nValue;
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index 26a3919..f6f6bdb 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -135,12 +135,12 @@ void ImageButtonToolbarController::executeControlCommand( const ::com::sun::star
 {
     SolarMutexGuard aSolarMutexGuard;
     // i73486 to be downward compatible use old and "wrong" also!
-    if (( rControlCommand.Command.startsWith( "SetImag" )) ||
-        ( rControlCommand.Command.startsWith( "SetImage" )) )
+    if( rControlCommand.Command == "SetImag" ||
+        rControlCommand.Command == "SetImage" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "URL" ))
+            if ( rControlCommand.Arguments[i].Name == "URL" )
             {
                 OUString aURL;
                 rControlCommand.Arguments[i].Value >>= aURL;
diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
index 687e265..ad0f09d 100644
--- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx
+++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
@@ -346,11 +346,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
     OUString aStep;
     bool          bFloatValue( false );
 
-    if ( rControlCommand.Command.startsWith( "SetStep" ))
+    if ( rControlCommand.Command == "SetStep" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Step" ))
+            if ( rControlCommand.Arguments[i].Name == "Step" )
             {
                 sal_Int32   nValue;
                 double      fValue;
@@ -362,11 +362,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetValue" ))
+    else if ( rControlCommand.Command == "SetValue" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "Value" ))
+            if ( rControlCommand.Arguments[i].Name == "Value" )
             {
                 sal_Int32   nValue;
                 double      fValue;
@@ -381,7 +381,7 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetValues" ))
+    else if ( rControlCommand.Command == "SetValues" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
@@ -392,30 +392,30 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
             OUString aName = rControlCommand.Arguments[i].Name;
             if ( impl_getValue( rControlCommand.Arguments[i].Value, nValue, fValue, bFloat ))
             {
-                if ( aName.startsWith( "Value" ))
+                if ( aName == "Value" )
                 {
                     aValue = bFloat ? OUString::number( fValue ) : OUString::number( nValue );
                     bFloatValue = bFloat;
                 }
-                else if ( aName.startsWith( "Step" ))
+                else if ( aName == "Step" )
                     aStep = bFloat ? OUString::number( fValue ) :
                                      OUString::number( nValue );
-                else if ( aName.startsWith( "LowerLimit" ))
+                else if ( aName == "LowerLimit" )
                     aMin = bFloat ? OUString::number( fValue ) :
                                     OUString::number( nValue );
-                else if ( aName.startsWith( "UpperLimit" ))
+                else if ( aName == "UpperLimit" )
                     aMax = bFloat ? OUString::number( fValue ) :
                                     OUString::number( nValue );
             }
-            else if ( aName.startsWith( "OutputFormat" ))
+            else if ( aName == "OutputFormat" )
                 rControlCommand.Arguments[i].Value >>= m_aOutFormat;
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetLowerLimit" ))
+    else if ( rControlCommand.Command == "SetLowerLimit" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "LowerLimit" ))
+            if ( rControlCommand.Arguments[i].Name == "LowerLimit" )
             {
                 sal_Int32   nValue;
                 double      fValue;
@@ -427,11 +427,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetUpperLimit" ))
+    else if ( rControlCommand.Command == "SetUpperLimit" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "UpperLimit" ))
+            if ( rControlCommand.Arguments[i].Name == "UpperLimit" )
             {
                 sal_Int32   nValue;
                 double      fValue;
@@ -443,11 +443,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
             }
         }
     }
-    else if ( rControlCommand.Command.startsWith( "SetOutputFormat" ))
+    else if ( rControlCommand.Command == "SetOutputFormat" )
     {
         for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
         {
-            if ( rControlCommand.Arguments[i].Name.startsWith( "OutputFormat" ))
+            if ( rControlCommand.Arguments[i].Name == "OutputFormat" )
             {
                 rControlCommand.Arguments[i].Value >>= m_aOutFormat;
                 break;
diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
index 27ec394..58bddce 100644
--- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
@@ -142,11 +142,11 @@ void ToggleButtonToolbarController::executeControlCommand( const ::com::sun::sta
     if (( m_eStyle == STYLE_DROPDOWNBUTTON ) ||
         ( m_eStyle == STYLE_TOGGLE_DROPDOWNBUTTON ))
     {
-        if ( rControlCommand.Command.startsWith( "SetList" ))
+        if ( rControlCommand.Command == "SetList" )
         {
             for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
             {
-                if ( rControlCommand.Arguments[i].Name.startsWith( "List" ))
+                if ( rControlCommand.Arguments[i].Name == "List" )
                 {
                     Sequence< OUString > aList;
                     m_aDropdownMenuList.clear();
@@ -167,11 +167,11 @@ void ToggleButtonToolbarController::executeControlCommand( const ::com::sun::sta
                 }
             }
         }
-        else if ( rControlCommand.Command.startsWith( "CheckItemPos" ))
+        else if ( rControlCommand.Command == "CheckItemPos" )
         {
             for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
             {
-                if ( rControlCommand.Arguments[i].Name.startsWith( "Pos" ))
+                if ( rControlCommand.Arguments[i].Name == "Pos" )
                 {
                     sal_Int32 nPos( -1 );
 
@@ -194,12 +194,12 @@ void ToggleButtonToolbarController::executeControlCommand( const ::com::sun::sta
                 }
             }
         }
-        else if ( rControlCommand.Command.startsWith( "AddEntry" ))
+        else if ( rControlCommand.Command == "AddEntry" )
         {
             OUString   aText;
             for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
             {
-                if ( rControlCommand.Arguments[i].Name.startsWith( "Text" ))
+                if ( rControlCommand.Arguments[i].Name == "Text" )
                 {
                     if ( rControlCommand.Arguments[i].Value >>= aText )
                         m_aDropdownMenuList.push_back( aText );
@@ -207,14 +207,14 @@ void ToggleButtonToolbarController::executeControlCommand( const ::com::sun::sta
                 }
             }
         }
-        else if ( rControlCommand.Command.startsWith( "InsertEntry"))
+        else if ( rControlCommand.Command == "InsertEntry" )
         {
             sal_Int32      nPos( COMBOBOX_APPEND );
             sal_Int32      nSize = sal_Int32( m_aDropdownMenuList.size() );
             OUString  aText;
             for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
             {
-                if ( rControlCommand.Arguments[i].Name.startsWith( "Pos" ))
+                if ( rControlCommand.Arguments[i].Name == "Pos" )
                 {
                     sal_Int32 nTmpPos = 0;
                     if ( rControlCommand.Arguments[i].Value >>= nTmpPos )
@@ -223,7 +223,7 @@ void ToggleButtonToolbarController::executeControlCommand( const ::com::sun::sta
                             nPos = nTmpPos;
                     }
                 }
-                else if ( rControlCommand.Arguments[i].Name.startsWith( "Text" ))
+                else if ( rControlCommand.Arguments[i].Name == "Text" )
                     rControlCommand.Arguments[i].Value >>= aText;
             }
 
@@ -231,11 +231,11 @@ void ToggleButtonToolbarController::executeControlCommand( const ::com::sun::sta
             aIter += nPos;
             m_aDropdownMenuList.insert( aIter, aText );
         }
-        else if ( rControlCommand.Command.startsWith( "RemoveEntryPos" ))
+        else if ( rControlCommand.Command == "RemoveEntryPos" )
         {
             for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
             {
-                if ( rControlCommand.Arguments[i].Name.startsWith( "Pos" ))
+                if ( rControlCommand.Arguments[i].Name == "Pos" )
                 {
                     sal_Int32 nPos( -1 );
                     if ( rControlCommand.Arguments[i].Value >>= nPos )
@@ -249,11 +249,11 @@ void ToggleButtonToolbarController::executeControlCommand( const ::com::sun::sta
                 }
             }
         }
-        else if ( rControlCommand.Command.startsWith( "RemoveEntryText" ))
+        else if ( rControlCommand.Command == "RemoveEntryText" )
         {
             for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
             {
-                if ( rControlCommand.Arguments[i].Name.startsWith( "Text" ))
+                if ( rControlCommand.Arguments[i].Name == "Text" )
                 {
                     OUString aText;
                     if ( rControlCommand.Arguments[i].Value >>= aText )
diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx
index dc65910..5f518f7 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -130,7 +130,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th
             PropertyValue aPropValue;
             if ( aArguments[i] >>= aPropValue )
             {
-                if ( aPropValue.Name.startsWith( "PopupMode" ))
+                if ( aPropValue.Name == "PopupMode" )
                 {
                     aPropValue.Value >>= bPopupMode;
                     break;
diff --git a/framework/source/uifactory/addonstoolboxfactory.cxx b/framework/source/uifactory/addonstoolboxfactory.cxx
index 7c7261e..2c51b9d 100644
--- a/framework/source/uifactory/addonstoolboxfactory.cxx
+++ b/framework/source/uifactory/addonstoolboxfactory.cxx
@@ -113,18 +113,18 @@ sal_Bool AddonsToolBoxFactory::hasButtonsInContext(
         const Sequence< PropertyValue >& rPropSeq = rPropSeqSeq[i];
         for ( sal_uInt32 j = 0; j < (sal_uInt32)rPropSeq.getLength(); j++ )
         {
-            if ( rPropSeq[j].Name.startsWith( "Context" ))
+            if ( rPropSeq[j].Name == "Context" )
             {
                 OUString aContextList;
                 if ( rPropSeq[j].Value >>= aContextList )
                     bIsCorrectContext = IsCorrectContext( aModuleIdentifier, aContextList );
                 nPropChecked++;
             }
-            else if ( rPropSeq[j].Name.startsWith( "URL" ))
+            else if ( rPropSeq[j].Name == "URL" )
             {
                 OUString aURL;
                 rPropSeq[j].Value >>= aURL;
-                bIsButton = !aURL.startsWith( "private:separator" );
+                bIsButton = aURL != "private:separator" ;
                 nPropChecked++;
             }
 
diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx
index 181f9d6..ebeece1 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -73,7 +73,7 @@ void ScFormulaOptions::GetDefaultFormulaSeparators(
 
     const Locale& rLocale = *ScGlobal::GetLocale();
     const OUString& rLang = rLocale.Language;
-    if (rLang.startsWith("ru"))
+    if (rLang == "ru")
         // Don't do automatic guess for these languages, and fall back to
         // the old separator set.
         return;
@@ -97,7 +97,7 @@ void ScFormulaOptions::GetDefaultFormulaSeparators(
         cListSep = ',';
 
     // Special case for de_CH locale.
-    if (rLocale.Language.startsWith("de") && rLocale.Country.startsWith("CH"))
+    if (rLocale.Language == "de" && rLocale.Country == "CH")
         cListSep = ';';
 
     // by default, the parameter separator equals the locale-specific
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index db4b1ee..e2af132 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -1816,7 +1816,7 @@ SvXMLImportContext *ScXMLDeletionContext::CreateChildContext( sal_uInt16 nPrefix
             pContext = new ScXMLDependingsContext(GetScImport(), nPrefix, rLocalName, xAttrList, pChangeTrackingImportHelper);
         else if (IsXMLToken(rLocalName, XML_DELETIONS))
             pContext = new ScXMLDeletionsContext(GetScImport(), nPrefix, rLocalName, xAttrList, pChangeTrackingImportHelper);
-        else if (IsXMLToken(rLocalName, XML_CUT_OFFS) || rLocalName.startsWith("cut_offs"))
+        else if (IsXMLToken(rLocalName, XML_CUT_OFFS) || rLocalName == "cut_offs")
             pContext = new ScXMLCutOffsContext(GetScImport(), nPrefix, rLocalName, xAttrList, pChangeTrackingImportHelper);
         else
         {
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index fc127f8..92a2f8d 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -427,8 +427,8 @@ void ScXMLContentValidationContext::EndElement()
         for( sal_Int32 i = 0; i < nLength; i++ )
         {
             // #i47525# must allow "MacroName" or "Script"
-            if ( aValues[i].Name.startsWith( "MacroName" ) ||
-                 aValues[i].Name.startsWith( "Script" ) )
+            if ( aValues[i].Name == "MacroName" ||
+                 aValues[i].Name == "Script" )
             {
                 aValues[i].Value >>= sErrorTitle;
                 break;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 8fbeb8a..eadcd3b 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2149,7 +2149,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
                     if (bGetMerge)
                         bGetMerge = GetMerged(pAddresses, xTable);
                     pCellStyles->AddRangeStyleName(*pAddresses, nIndex, false, nValidationIndex, nNumberFormat);
-                    if (!sStyleName.startsWith("Default") || nValidationIndex != -1)
+                    if( sStyleName != "Default" || nValidationIndex != -1 )
                     {
                         pSharedData->SetLastColumn(nTable, pAddresses->EndColumn);
                         pSharedData->SetLastRow(nTable, pAddresses->EndRow);
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 08996c4..d0e030c 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2761,36 +2761,28 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
             if ( pAuto )
             {
                 OUString aReplace(pAuto->GetStartDoubleQuote());
-                if (aReplace.isEmpty())
+                if( aReplace.isEmpty() )
                     aReplace = ScGlobal::pLocaleData->getDoubleQuotationMarkStart();
-                if (!aReplace.startsWith("\""))
-                    aString = aString.replaceAll(
-                        aReplace,
-                        OUString("\""));
+                if( aReplace != "\"" )
+                    aString = aString.replaceAll( aReplace, "\"" );
 
                 aReplace = OUString(pAuto->GetEndDoubleQuote());
-                if (aReplace.isEmpty())
+                if( aReplace.isEmpty() )
                     aReplace = ScGlobal::pLocaleData->getDoubleQuotationMarkEnd();
-                if (!aReplace.startsWith("\""))
-                    aString = aString.replaceAll(
-                        aReplace,
-                        OUString("\""));
+                if( aReplace != "\"" )
+                    aString = aString.replaceAll( aReplace, "\"" );
 
                 aReplace = OUString(pAuto->GetStartSingleQuote());
-                if (aReplace.isEmpty())
+                if( aReplace.isEmpty() )
                     aReplace = ScGlobal::pLocaleData->getQuotationMarkStart();
-                if (!aReplace.startsWith("'"))
-                    aString = aString.replaceAll(
-                        aReplace,
-                        OUString("'"));
+                if( aReplace != "'" )
+                    aString = aString.replaceAll( aReplace, "'" );
 
                 aReplace = OUString(pAuto->GetEndSingleQuote());
-                if (aReplace.isEmpty())
+                if( aReplace.isEmpty() )
                     aReplace = ScGlobal::pLocaleData->getQuotationMarkEnd();
-                if (!aReplace.startsWith("'"))
-                    aString = aString.replaceAll(
-                        aReplace,
-                        OUString("'"));
+                if( aReplace != "'" )
+                    aString = aString.replaceAll( aReplace, "'");
             }
         }
 
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 146245a..beb36f7 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -602,8 +602,8 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
     if (
         pDispatch &&
         (
-         (aURL.Protocol.startsWith( ".uno:" ) && aURL.Path == aDispatchURL.Path) ||
-         (aURL.Protocol.startsWith( "slot:" ) && aURL.Path.toInt32() == GetId())
+         (aURL.Protocol == ".uno:" && aURL.Path == aDispatchURL.Path) ||
+         (aURL.Protocol == "slot:" && aURL.Path.toInt32() == GetId())
         )
        )
     {
@@ -629,17 +629,17 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
         for( sal_Int32 n=0; n<nCount; n++ )
         {
             const ::com::sun::star::beans::PropertyValue& rProp = aArgs[n];
-            if( rProp.Name.startsWith("SynchronMode"))
+            if( rProp.Name == "SynchronMode" )
             {
                 if( rProp.Value >>=bTemp )
                     nCall = bTemp ? SFX_CALLMODE_SYNCHRON : SFX_CALLMODE_ASYNCHRON;
             }
-            else if( rProp.Name.startsWith("Bookmark"))
+            else if( rProp.Name == "Bookmark" )
             {
                 nMarkArg = n;
                 aAddArgs.push_back( aArgs[n] );
             }
-            else if( rProp.Name.startsWith("KeyModifier"))
+            else if( rProp.Name == "KeyModifier" )
                 rProp.Value >>= nModifier;
             else
                 aAddArgs.push_back( aArgs[n] );
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 10e950f..06325fe 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -889,9 +889,9 @@ bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
             {
                 for ( sal_Int32 n = 0; n < aPropSeq.getLength(); n++ )
                 {
-                    if ( aPropSeq[n].Name.startsWith( "Name"  ))
+                    if ( aPropSeq[n].Name == "Name" )
                         aPropSeq[n].Value >>= aName;
-                    else if ( aPropSeq[n].Name.startsWith( "LineDash" ))
+                    else if ( aPropSeq[n].Name == "LineDash" )
                     {
                         if ( aPropSeq[n].Value >>= aLineDash )
                             bLineDash = true;
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 5e0bdb2..163085b 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -599,7 +599,7 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang
         const PropertyChangeEvent& rEvt = rEvents.getConstArray()[i];
         Reference< XControlModel > xModel( rEvt.Source, UNO_QUERY );
         sal_Bool bOwnModel = (XControlModel*)xModel.get() == (XControlModel*)getModel().get();
-        if ( bOwnModel && rEvt.PropertyName.startsWith( "ImageURL" ))
+        if ( bOwnModel && rEvt.PropertyName == "ImageURL" )
         {
             OUString aImageURL;
             Reference< graphic::XGraphic > xGraphic;
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index de9ffde..c6d268d 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -269,12 +269,12 @@ void UnoControl::ImplSetPeerProperty( const OUString& rPropName, const Any& rVal
         {
             // We now support a mapping for language dependent properties. This is the
             // central method to implement it.
-            if (( rPropName.startsWith( "Text"           )) ||
-                ( rPropName.startsWith( "Label"          )) ||
-                ( rPropName.startsWith( "Title"          )) ||
-                ( rPropName.startsWith( "HelpText"       )) ||
-                ( rPropName.startsWith( "CurrencySymbol" )) ||
-                ( rPropName.startsWith( "StringItemList" )) )
+            if( rPropName == "Text"            ||
+                rPropName == "Label"           ||
+                rPropName == "Title"           ||
+                rPropName == "HelpText"        ||
+                rPropName == "CurrencySymbol"  ||
+                rPropName == "StringItemList"  )
             {
                 OUString aValue;
                 uno::Sequence< OUString > aSeqValue;
@@ -505,7 +505,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent
 
             // Detect changes on our resource resolver which invalidates
             // automatically some language dependent properties.
-            if ( pEvents->PropertyName.startsWith( "ResourceResolver" ))
+            if ( pEvents->PropertyName == "ResourceResolver" )
             {
                 Reference< resource::XStringResourceResolver > xStrResolver;
                 if ( pEvents->NewValue >>= xStrResolver )
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index fcd5e25..c3b878d 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -167,7 +167,7 @@ rtl_TextEncoding x11::getTextPlainEncoding( const OUString& rMimeType )
     rtl_TextEncoding aEncoding = RTL_TEXTENCODING_DONTKNOW;
     OUString aMimeType( rMimeType.toAsciiLowerCase() );
     sal_Int32 nIndex = 0;
-    if( aMimeType.getToken( 0, ';', nIndex ).startsWith( "text/plain" ) )
+    if( aMimeType.getToken( 0, ';', nIndex ) == "text/plain" )
     {
         if( aMimeType.getLength() == 10 ) // only "text/plain"
             aEncoding = RTL_TEXTENCODING_ISO_8859_1;
@@ -177,7 +177,7 @@ rtl_TextEncoding x11::getTextPlainEncoding( const OUString& rMimeType )
             {
                 OUString aToken = aMimeType.getToken( 0, ';', nIndex );
                 sal_Int32 nPos = 0;
-                if( aToken.getToken( 0, '=', nPos ).startsWith( "charset" ) )
+                if( aToken.getToken( 0, '=', nPos ) == "charset" )
                 {
                     OString aEncToken = OUStringToOString( aToken.getToken( 0, '=', nPos ), RTL_TEXTENCODING_ISO_8859_1 );
                     aEncoding = rtl_getTextEncodingFromUnixCharset( aEncToken.getStr() );
@@ -1051,7 +1051,7 @@ bool SelectionManager::getPasteData( Atom selection, const OUString& rType, Sequ
              OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
 #endif
 
-    if( rType.startsWith( "text/plain;charset=utf-16" ) )
+    if( rType == "text/plain;charset=utf-16" )
     {
         // lets see if we have UTF16 else try to find something convertible
         if( it->second->m_aTypes.getLength() && ! it->second->m_bHaveUTF16 )
@@ -1105,7 +1105,7 @@ bool SelectionManager::getPasteData( Atom selection, const OUString& rType, Sequ
             }
         }
     }
-    else if( rType.startsWith( "image/bmp" ) )
+    else if( rType == "image/bmp" )
     {
         // #i83376# try if someone has the data in image/bmp already before
         // doing the PIXMAP stuff (e.g. the gimp has this)
@@ -1350,7 +1350,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
                 pFlavors->MimeType = convertTypeFromNative( *pAtoms, selection, nFormat );
                 pFlavors->DataType = getCppuType( (Sequence< sal_Int8 >*)0 );
                 sal_Int32 nIndex = 0;
-                if( pFlavors->MimeType.getToken( 0, ';', nIndex ).startsWith( "text/plain" ) )
+                if( pFlavors->MimeType.getToken( 0, ';', nIndex ) == "text/plain" )
                 {
                     OUString aToken(pFlavors->MimeType.getToken( 0, ';', nIndex ));
                     // omit text/plain;charset=unicode since it is not well defined
diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx
index 02bc33a..2a0bfba 100644
--- a/xmloff/source/draw/XMLImageMapExport.cxx
+++ b/xmloff/source/draw/XMLImageMapExport.cxx
@@ -193,7 +193,7 @@ void XMLImageMapExport::ExportMapEntry(
 
             mrExport.AddAttribute(
                 XML_NAMESPACE_XLINK, XML_SHOW,
-                sTargt.startsWith( "_blank" ) ? XML_NEW : XML_REPLACE );
+                sTargt == "_blank" ? XML_NEW : XML_REPLACE );
         }
 
         // name
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index 4d496a7..6a303e6 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -242,7 +242,7 @@ void XMLEventExport::ExportEvent(
             }
             else
             {
-                if (! sType.startsWith("None"))
+                if ( sType != "None" )
                 {
                     OSL_FAIL("unknown event type returned by API");
                     // unknown type -> error (ignore)
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index af4e9d2..e52160f 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2716,7 +2716,7 @@ void XMLTextFieldExport::ProcessBibliographyData(
     sal_Int32 nLength = aValues.getLength();
     for (sal_Int32 i = 0; i < nLength; i++)
     {
-        if (aValues[i].Name.startsWith("BibiliographicType"))
+        if( aValues[i].Name == "BibiliographicType" )
         {
             sal_Int16 nTypeId = 0;
             aValues[i].Value >>= nTypeId;
@@ -3327,127 +3327,127 @@ enum XMLTokenEnum XMLTextFieldExport::MapBibliographyFieldName(OUString sName)
 {
     enum XMLTokenEnum eName = XML_TOKEN_INVALID;
 
-    if (sName.startsWith("Identifier"))
+    if( sName == "Identifier" )
     {
         eName = XML_IDENTIFIER;
     }
-    else if (sName.startsWith("BibiliographicType"))
+    else if( sName == "BibiliographicType" )
     {
         eName = XML_BIBLIOGRAPHY_TYPE;
     }
-    else if (sName.startsWith("Address"))
+    else if( sName == "Address" )
     {
         eName = XML_ADDRESS;
     }
-    else if (sName.startsWith("Annote"))
+    else if( sName == "Annote" )
     {
         eName = XML_ANNOTE;
     }
-    else if (sName.startsWith("Author"))
+    else if( sName == "Author" )
     {
         eName = XML_AUTHOR;
     }
-    else if (sName.startsWith("Booktitle"))
+    else if( sName == "Booktitle" )
     {
         eName = XML_BOOKTITLE;
     }
-    else if (sName.startsWith("Chapter"))
+    else if( sName == "Chapter" )
     {
         eName = XML_CHAPTER;
     }
-    else if (sName.startsWith("Edition"))
+    else if( sName == "Edition" )
     {
         eName = XML_EDITION;
     }
-    else if (sName.startsWith("Editor"))
+    else if( sName == "Editor" )
     {
         eName = XML_EDITOR;
     }
-    else if (sName.startsWith("Howpublished"))
+    else if( sName == "Howpublished" )
     {
         eName = XML_HOWPUBLISHED;
     }
-    else if (sName.startsWith("Institution"))
+    else if( sName == "Institution" )
     {
         eName = XML_INSTITUTION;
     }
-    else if (sName.startsWith("Journal"))
+    else if( sName == "Journal" )
     {
         eName = XML_JOURNAL;
     }
-    else if (sName.startsWith("Month"))
+    else if( sName =="Month" )
     {
         eName = XML_MONTH;
     }
-    else if (sName.startsWith("Note"))
+    else if( sName == "Note" )
     {
         eName = XML_NOTE;
     }
-    else if (sName.startsWith("Number"))
+    else if( sName == "Number" )
     {
         eName = XML_NUMBER;
     }
-    else if (sName.startsWith("Organizations"))
+    else if( sName == "Organizations" )
     {
         eName = XML_ORGANIZATIONS;
     }
-    else if (sName.startsWith("Pages"))
+    else if( sName == "Pages" )
     {
         eName = XML_PAGES;
     }
-    else if (sName.startsWith("Publisher"))
+    else if( sName == "Publisher" )
     {
         eName = XML_PUBLISHER;
     }
-    else if (sName.startsWith("School"))
+    else if( sName == "School" )
     {
         eName = XML_SCHOOL;
     }
-    else if (sName.startsWith("Series"))
+    else if( sName == "Series" )
     {
         eName = XML_SERIES;
     }
-    else if (sName.startsWith("Title"))
+    else if( sName == "Title" )
     {
         eName = XML_TITLE;
     }
-    else if (sName.startsWith("Report_Type"))
+    else if( sName == "Report_Type" )
     {
         eName = XML_REPORT_TYPE;
     }
-    else if (sName.startsWith("Volume"))
+    else if( sName == "Volume" )
     {
         eName = XML_VOLUME;
     }
-    else if (sName.startsWith("Year"))
+    else if( sName == "Year" )
     {
         eName = XML_YEAR;
     }
-    else if (sName.startsWith("URL"))
+    else if( sName == "URL" )
     {
         eName = XML_URL;
     }
-    else if (sName.startsWith("Custom1"))
+    else if( sName == "Custom1" )
     {
         eName = XML_CUSTOM1;
     }
-    else if (sName.startsWith("Custom2"))
+    else if( sName == "Custom2" )
     {
         eName = XML_CUSTOM2;
     }
-    else if (sName.startsWith("Custom3"))
+    else if( sName == "Custom3" )
     {
         eName = XML_CUSTOM3;
     }
-    else if (sName.startsWith("Custom4"))
+    else if( sName == "Custom4" )
     {
         eName = XML_CUSTOM4;
     }
-    else if (sName.startsWith("Custom5"))
+    else if( sName == "Custom5" )
     {
         eName = XML_CUSTOM5;
     }
-    else if (sName.startsWith("ISBN"))
+    else if( sName == "ISBN" )
     {
         eName = XML_ISBN;
     }
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 8ee117d..4b5dead 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3304,8 +3304,7 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
         {
             GetExport().AddAttribute( XML_NAMESPACE_OFFICE,
                                       XML_TARGET_FRAME_NAME, sTargetFrame );
-            enum XMLTokenEnum eTok =
-                sTargetFrame.startsWith( "_blank" ) ? XML_NEW : XML_REPLACE;
+            enum XMLTokenEnum eTok = sTargetFrame == "_blank" ? XML_NEW : XML_REPLACE;
             GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, eTok );
         }
 


More information about the Libreoffice-commits mailing list