diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-19 12:47:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-19 12:49:29 +0200 |
commit | 363cc397172f2b0a94d9c4dc44fc8d95072795a3 (patch) | |
tree | 16a23a796e2db536d7af3f0144bce8fd01570e26 /framework | |
parent | 02a2203580226766c4b3b8778430774ff76f90e9 (diff) |
convert equalsAsciiL calls to startWith calls where possible
Simplify code like:
aStr.equalsAsciiL( "%", 1 )
to
aStr.startsWith( "%" )
Change-Id: Iee0e4e60b0ae6d567fa8f72db5d616fffbec3c00
Diffstat (limited to 'framework')
8 files changed, 70 insertions, 70 deletions
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 54bc4c2b088d..9e2003ffb09c 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.equalsAsciiL( "SetText", 7 )) + if ( rControlCommand.Command.startsWith( "SetText" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Text", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "Text")) { OUString aText; rControlCommand.Arguments[i].Value >>= aText; @@ -279,11 +279,11 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f } } } - else if ( rControlCommand.Command.equalsAsciiL( "SetList", 7 )) + else if ( rControlCommand.Command.startsWith( "SetList" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "List", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "List" )) { Sequence< OUString > aList; m_pComboBox->Clear(); @@ -304,13 +304,13 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f } } } - else if ( rControlCommand.Command.equalsAsciiL( "AddEntry", 8 )) + else if ( rControlCommand.Command.startsWith( "AddEntry" )) { sal_uInt16 nPos( COMBOBOX_APPEND ); OUString aText; for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Text", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "InsertEntry", 11 )) + else if ( rControlCommand.Command.startsWith( "InsertEntry" )) { sal_uInt16 nPos( COMBOBOX_APPEND ); OUString aText; for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Pos", 3 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "Text", 4 )) + else if ( rControlCommand.Arguments[i].Name.startsWith( "Text" )) rControlCommand.Arguments[i].Value >>= aText; } m_pComboBox->InsertEntry( aText, nPos ); } - else if ( rControlCommand.Command.equalsAsciiL( "RemoveEntryPos", 14 )) + else if ( rControlCommand.Command.startsWith( "RemoveEntryPos" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Pos", 3 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "RemoveEntryText", 15 )) + else if ( rControlCommand.Command.startsWith( "RemoveEntryText" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Text", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "SetDropDownLines", 16 )) + else if ( rControlCommand.Command.startsWith( "SetDropDownLines" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Lines", 5 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "SetBackgroundColor", 18 )) + else if ( rControlCommand.Command.startsWith( "SetBackgroundColor" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Color", 5 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "SetTextColor", 12 )) + else if ( rControlCommand.Command.startsWith( "SetTextColor" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Color", 5 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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 b87987b8d1eb..9a5e6e7bb249 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.equalsAsciiL( "SetList", 7 )) + if ( rControlCommand.Command.startsWith( "SetList" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "List", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "List" )) { Sequence< OUString > aList; m_pListBoxControl->Clear(); @@ -241,13 +241,13 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f } } } - else if ( rControlCommand.Command.equalsAsciiL( "AddEntry", 8 )) + else if ( rControlCommand.Command.startsWith( "AddEntry" )) { sal_uInt16 nPos( LISTBOX_APPEND ); OUString aText; for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Text", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "InsertEntry", 11 )) + else if ( rControlCommand.Command.startsWith( "InsertEntry" )) { sal_uInt16 nPos( LISTBOX_APPEND ); OUString aText; for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Pos", 3 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "Text", 4 )) + else if ( rControlCommand.Arguments[i].Name.startsWith( "Text" )) rControlCommand.Arguments[i].Value >>= aText; } m_pListBoxControl->InsertEntry( aText, nPos ); } - else if ( rControlCommand.Command.equalsAsciiL( "RemoveEntryPos", 14 )) + else if ( rControlCommand.Command.startsWith( "RemoveEntryPos" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Pos", 3 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "RemoveEntryText", 15 )) + else if ( rControlCommand.Command.startsWith( "RemoveEntryText" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Text", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "SetDropDownLines", 16 )) + else if ( rControlCommand.Command.startsWith( "SetDropDownLines" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Lines", 5 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "Lines" )) { sal_Int32 nValue( 5 ); rControlCommand.Arguments[i].Value >>= nValue; diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx index d4bb63311f63..251f5b508fe0 100644 --- a/framework/source/uielement/edittoolbarcontroller.cxx +++ b/framework/source/uielement/edittoolbarcontroller.cxx @@ -218,11 +218,11 @@ long EditToolbarController::PreNotify( NotifyEvent& rNEvt ) void EditToolbarController::executeControlCommand( const ::com::sun::star::frame::ControlCommand& rControlCommand ) { - if ( rControlCommand.Command.equalsAsciiL( "SetText", 7 )) + if ( rControlCommand.Command.startsWith( "SetText" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Text", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "Text" )) { OUString aText; rControlCommand.Arguments[i].Value >>= aText; diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index 0abd71760c19..26a39196ee2d 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.equalsAsciiL( "SetImag", 7 )) || - ( rControlCommand.Command.equalsAsciiL( "SetImage", 8 )) ) + if (( rControlCommand.Command.startsWith( "SetImag" )) || + ( rControlCommand.Command.startsWith( "SetImage" )) ) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "URL", 3 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "URL" )) { OUString aURL; rControlCommand.Arguments[i].Value >>= aURL; diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 26480d1d7768..687e2658616f 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.equalsAsciiL( "SetStep", 7 )) + if ( rControlCommand.Command.startsWith( "SetStep" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Step", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "Step" )) { sal_Int32 nValue; double fValue; @@ -362,11 +362,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: } } } - else if ( rControlCommand.Command.equalsAsciiL( "SetValue", 8 )) + else if ( rControlCommand.Command.startsWith( "SetValue" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Value", 5 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "Value" )) { sal_Int32 nValue; double fValue; @@ -381,7 +381,7 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: } } } - else if ( rControlCommand.Command.equalsAsciiL( "SetValues", 9 )) + else if ( rControlCommand.Command.startsWith( "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.equalsAsciiL( "Value", 5 )) + if ( aName.startsWith( "Value" )) { aValue = bFloat ? OUString::number( fValue ) : OUString::number( nValue ); bFloatValue = bFloat; } - else if ( aName.equalsAsciiL( "Step", 4 )) + else if ( aName.startsWith( "Step" )) aStep = bFloat ? OUString::number( fValue ) : OUString::number( nValue ); - else if ( aName.equalsAsciiL( "LowerLimit", 10 )) + else if ( aName.startsWith( "LowerLimit" )) aMin = bFloat ? OUString::number( fValue ) : OUString::number( nValue ); - else if ( aName.equalsAsciiL( "UpperLimit", 10 )) + else if ( aName.startsWith( "UpperLimit" )) aMax = bFloat ? OUString::number( fValue ) : OUString::number( nValue ); } - else if ( aName.equalsAsciiL( "OutputFormat", 12 )) + else if ( aName.startsWith( "OutputFormat" )) rControlCommand.Arguments[i].Value >>= m_aOutFormat; } } - else if ( rControlCommand.Command.equalsAsciiL( "SetLowerLimit", 13 )) + else if ( rControlCommand.Command.startsWith( "SetLowerLimit" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "LowerLimit", 10 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "LowerLimit" )) { sal_Int32 nValue; double fValue; @@ -427,11 +427,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: } } } - else if ( rControlCommand.Command.equalsAsciiL( "SetUpperLimit", 13 )) + else if ( rControlCommand.Command.startsWith( "SetUpperLimit" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "UpperLimit", 10 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "UpperLimit" )) { sal_Int32 nValue; double fValue; @@ -443,11 +443,11 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star:: } } } - else if ( rControlCommand.Command.equalsAsciiL( "SetOutputFormat", 15 )) + else if ( rControlCommand.Command.startsWith( "SetOutputFormat" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "OutputFormat", 10 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "OutputFormat" )) { rControlCommand.Arguments[i].Value >>= m_aOutFormat; break; diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index b015338148d2..27ec3940199d 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.equalsAsciiL( "SetList", 7 )) + if ( rControlCommand.Command.startsWith( "SetList" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "List", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "List" )) { Sequence< OUString > aList; m_aDropdownMenuList.clear(); @@ -167,11 +167,11 @@ void ToggleButtonToolbarController::executeControlCommand( const ::com::sun::sta } } } - else if ( rControlCommand.Command.equalsAsciiL( "CheckItemPos", 12 )) + else if ( rControlCommand.Command.startsWith( "CheckItemPos" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Pos", 3 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "Pos" )) { sal_Int32 nPos( -1 ); @@ -194,12 +194,12 @@ void ToggleButtonToolbarController::executeControlCommand( const ::com::sun::sta } } } - else if ( rControlCommand.Command.equalsAsciiL( "AddEntry", 8 )) + else if ( rControlCommand.Command.startsWith( "AddEntry" )) { OUString aText; for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Text", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "InsertEntry", 11 )) + else if ( rControlCommand.Command.startsWith( "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.equalsAsciiL( "Pos", 3 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "Text", 4 )) + else if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "RemoveEntryPos", 14 )) + else if ( rControlCommand.Command.startsWith( "RemoveEntryPos" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Pos", 3 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "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.equalsAsciiL( "RemoveEntryText", 15 )) + else if ( rControlCommand.Command.startsWith( "RemoveEntryText" )) { for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { - if ( rControlCommand.Arguments[i].Name.equalsAsciiL( "Text", 4 )) + if ( rControlCommand.Arguments[i].Name.startsWith( "Text" )) { OUString aText; if ( rControlCommand.Arguments[i].Value >>= aText ) diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 29263c7f17a4..dc659100c6cc 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.equalsAsciiL( "PopupMode", 9 )) + if ( aPropValue.Name.startsWith( "PopupMode" )) { aPropValue.Value >>= bPopupMode; break; diff --git a/framework/source/uifactory/addonstoolboxfactory.cxx b/framework/source/uifactory/addonstoolboxfactory.cxx index 1a7822b58364..7c7261ed1743 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.equalsAsciiL( "Context", 7 )) + if ( rPropSeq[j].Name.startsWith( "Context" )) { OUString aContextList; if ( rPropSeq[j].Value >>= aContextList ) bIsCorrectContext = IsCorrectContext( aModuleIdentifier, aContextList ); nPropChecked++; } - else if ( rPropSeq[j].Name.equalsAsciiL( "URL", 3 )) + else if ( rPropSeq[j].Name.startsWith( "URL" )) { OUString aURL; rPropSeq[j].Value >>= aURL; - bIsButton = !aURL.equalsAsciiL( "private:separator", 17 ); + bIsButton = !aURL.startsWith( "private:separator" ); nPropChecked++; } |