summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-12-09 12:51:35 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-12-09 16:50:46 +0000
commitee107cd95b4e449391da5f1fe9246682bcf1e6ce (patch)
tree24e2e6e2dcdfc86045f2a3a5dea7a28a0afb0fc3 /framework
parent8351eb25302a28c70ef5b2aaa1189db949dcf443 (diff)
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 Reviewed-on: https://gerrit.libreoffice.org/7008 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx38
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx26
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx6
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx32
-rw-r--r--framework/source/uielement/togglebuttontoolbarcontroller.cxx26
-rw-r--r--framework/source/uielement/toolbarwrapper.cxx2
-rw-r--r--framework/source/uifactory/addonstoolboxfactory.cxx6
7 files changed, 68 insertions, 68 deletions
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index 9e2003ffb09c..6310d92cef19 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 9a5e6e7bb249..2bca0970361a 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 26a39196ee2d..f6f6bdbdf172 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 687e2658616f..ad0f09dc4071 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 27ec3940199d..58bddcecfb67 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 dc659100c6cc..5f518f760009 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 7c7261ed1743..2c51b9d8d425 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++;
}