summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 19:49:53 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 20:03:42 +0200
commitd6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch)
treeb5a12df1fcae025715633469b75ab4c9b6f6d279 /framework
parent0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'framework')
-rw-r--r--framework/source/accelerators/keymapping.cxx2
-rw-r--r--framework/source/classes/menumanager.cxx21
-rw-r--r--framework/source/dispatch/dispatchprovider.cxx7
-rw-r--r--framework/source/fwe/xml/statusbardocumenthandler.cxx20
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx4
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx3
-rw-r--r--framework/source/lomenubar/FrameHelper.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx20
8 files changed, 31 insertions, 48 deletions
diff --git a/framework/source/accelerators/keymapping.cxx b/framework/source/accelerators/keymapping.cxx
index 65a3400878bc..fdf6fe70fb4c 100644
--- a/framework/source/accelerators/keymapping.cxx
+++ b/framework/source/accelerators/keymapping.cxx
@@ -225,7 +225,7 @@ sal_Bool KeyMapping::impl_st_interpretIdentifierAsPureKeyCode(const ::rtl::OUStr
// 0 is normaly an error of the called method toInt32() ...
// But we must be aware, that the identifier is "0"!
rCode = 0;
- return sIdentifier.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("0"));
+ return sIdentifier == "0";
}
} // namespace framework
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 40f329cd432c..f1e10511cfc4 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -177,9 +177,8 @@ MenuManager::MenuManager(
{
// Create addon popup menu if there exist elements and this is the tools popup menu
- if (( nItemId == SID_ADDONLIST ||
- aItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSlotSpecialToolsMenu)) ) &&
- AddonMenuManager::HasAddonMenuElements() )
+ if ( ( nItemId == SID_ADDONLIST || aItemCommand == aSlotSpecialToolsMenu )
+ && AddonMenuManager::HasAddonMenuElements() )
{
AddonMenu* pSubMenu = AddonMenuManager::CreateAddonMenu( rFrame );
if ( pSubMenu && ( pSubMenu->GetItemCount() > 0 ))
@@ -215,8 +214,7 @@ MenuManager::MenuManager(
}
else
{
- if ( nItemId == SID_NEWDOCDIRECT ||
- aItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSlotNewDocDirect)) )
+ if ( nItemId == SID_NEWDOCDIRECT || aItemCommand == aSlotNewDocDirect )
{
MenuConfiguration aMenuCfg( getServiceFactory() );
BmkMenu* pSubMenu = (BmkMenu*)aMenuCfg.CreateBookmarkMenu( rFrame, BOOKMARK_NEWMENU );
@@ -230,8 +228,7 @@ MenuManager::MenuManager(
pMenu->SetItemImage( nItemId, aImage );
}
}
- else if ( nItemId == SID_AUTOPILOTMENU ||
- aItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSlotAutoPilot)) )
+ else if ( nItemId == SID_AUTOPILOTMENU || aItemCommand == aSlotAutoPilot )
{
MenuConfiguration aMenuCfg( getServiceFactory() );
BmkMenu* pSubMenu = (BmkMenu*)aMenuCfg.CreateBookmarkMenu( rFrame, BOOKMARK_WIZARDMENU );
@@ -790,14 +787,10 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
aCommand = aCommand.copy(RTL_CONSTASCII_LENGTH(UNO_COMMAND));
}
- if ( m_aMenuItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSpecialFileMenu)) ||
- m_aMenuItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSlotSpecialFileMenu)) ||
- aCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSpecialFileCommand)) )
+ if ( m_aMenuItemCommand == aSpecialFileMenu || m_aMenuItemCommand == aSlotSpecialFileMenu || aCommand == aSpecialFileCommand )
UpdateSpecialFileMenu( pMenu );
- else if ( m_aMenuItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSpecialWindowMenu)) ||
- m_aMenuItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSlotSpecialWindowMenu)) ||
- aCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSpecialWindowCommand)) )
- UpdateSpecialWindowMenu( pMenu,getServiceFactory(),m_aLock );
+ else if ( m_aMenuItemCommand == aSpecialWindowMenu || m_aMenuItemCommand == aSlotSpecialWindowMenu || aCommand == aSpecialWindowCommand )
+ UpdateSpecialWindowMenu( pMenu, getServiceFactory(), m_aLock );
// Check if some modes have changed so we have to update our menu images
if ( bShowMenuImages != m_bShowMenuImages )
diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx
index eead1818dcfd..9b86bb661986 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -187,7 +187,7 @@ css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL Disp
::sal_Bool lcl_isStartModuleDispatch (const css::util::URL& aURL)
{
- return (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_UNO_SHOWSTARTMODULE)));
+ return aURL.Complete == CMD_UNO_SHOWSTARTMODULE;
}
/**
@@ -412,10 +412,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
)
{
// There exist a hard coded interception for special URLs.
- if (
- (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CloseDoc"))) ||
- (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CloseWin")))
- )
+ if ( aURL.Complete == ".uno:CloseDoc" || aURL.Complete == ".uno:CloseWin" )
{
css::uno::Reference< css::frame::XDispatchProvider > xParent( xFrame->getCreator(), css::uno::UNO_QUERY );
// In case the frame is not a top one, is not based on system window and has a parent,
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index 3da7cc6d7899..ba54467ca4cb 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -291,17 +291,17 @@ throw( SAXException, RuntimeException )
case SB_ATTRIBUTE_ALIGN:
{
- if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ALIGN_LEFT )) )
+ if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_ALIGN_LEFT )
{
nItemBits |= ItemStyle::ALIGN_LEFT;
nItemBits &= ~ItemStyle::ALIGN_CENTER;
}
- else if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ALIGN_CENTER )) )
+ else if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_ALIGN_CENTER )
{
nItemBits |= ItemStyle::ALIGN_CENTER;
nItemBits &= ~ItemStyle::ALIGN_LEFT;
}
- else if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ALIGN_RIGHT )) )
+ else if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_ALIGN_RIGHT )
{
nItemBits |= ItemStyle::ALIGN_RIGHT;
}
@@ -316,17 +316,17 @@ throw( SAXException, RuntimeException )
case SB_ATTRIBUTE_STYLE:
{
- if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_STYLE_IN )) )
+ if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_STYLE_IN )
{
nItemBits |= ItemStyle::DRAW_IN3D;
nItemBits &= ~ItemStyle::DRAW_OUT3D;
}
- else if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_STYLE_OUT )) )
+ else if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_STYLE_OUT )
{
nItemBits |= ItemStyle::DRAW_OUT3D;
nItemBits &= ~ItemStyle::DRAW_IN3D;
}
- else if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_STYLE_FLAT )) )
+ else if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_STYLE_FLAT )
{
nItemBits |= ItemStyle::DRAW_FLAT;
}
@@ -341,9 +341,9 @@ throw( SAXException, RuntimeException )
case SB_ATTRIBUTE_AUTOSIZE:
{
- if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) )
+ if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_BOOLEAN_TRUE )
nItemBits |= ItemStyle::AUTO_SIZE;
- else if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) )
+ else if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_BOOLEAN_FALSE )
nItemBits &= ~ItemStyle::AUTO_SIZE;
else
{
@@ -356,9 +356,9 @@ throw( SAXException, RuntimeException )
case SB_ATTRIBUTE_OWNERDRAW:
{
- if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) )
+ if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_BOOLEAN_TRUE )
nItemBits |= ItemStyle::OWNER_DRAW;
- else if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) )
+ else if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_BOOLEAN_FALSE )
nItemBits &= ~ItemStyle::OWNER_DRAW;
else
{
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 58ee88f09e13..6a0e32b5e994 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -353,9 +353,9 @@ throw( SAXException, RuntimeException )
case TB_ATTRIBUTE_VISIBLE:
{
- if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) )
+ if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_BOOLEAN_TRUE )
bVisible = sal_True;
- else if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) )
+ else if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_BOOLEAN_FALSE )
bVisible = sal_False;
else
{
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index ff6ea0b04513..0845c00bbd98 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -782,8 +782,7 @@ bool ToolbarLayoutManager::dockAllToolbars()
UIElementVector::iterator pIter;
for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter )
{
- if ( pIter->m_aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("toolbar")) && pIter->m_xUIElement.is() &&
- pIter->m_bFloating && pIter->m_bVisible )
+ if ( pIter->m_aType == "toolbar" && pIter->m_xUIElement.is() && pIter->m_bFloating && pIter->m_bVisible )
aToolBarNameVector.push_back( pIter->m_aName );
}
aReadLock.unlock();
diff --git a/framework/source/lomenubar/FrameHelper.cxx b/framework/source/lomenubar/FrameHelper.cxx
index b31335102fc7..1d39e9df2ba6 100644
--- a/framework/source/lomenubar/FrameHelper.cxx
+++ b/framework/source/lomenubar/FrameHelper.cxx
@@ -654,7 +654,7 @@ FrameHelper::getLabelFromCommandURL (OUString commandURL)
for (sal_Int32 i = 0; i < commandProps.getLength(); i++)
{
- if ( commandProps[i].Name.equalsAsciiL (RTL_CONSTASCII_STRINGPARAM ("Label")))
+ if ( commandProps[i].Name == "Label" )
{
commandProps[i].Value >>= label;
label = label.replace ((sal_Unicode)0x007e, (sal_Unicode)0x005f);
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 38b14b1d8114..f1075e9611fe 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -518,11 +518,8 @@ throw ( RuntimeException )
#ifdef UNIX
//enable some slots hardly, because UNIX clipboard does not notify all changes
// Can be removed if follow up task will be fixed directly within applications.
- if (
- ( pMenuItemHandler->aMenuItemURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Paste"))) ||
- ( pMenuItemHandler->aMenuItemURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:PasteSpecial"))) ||
- ( pMenuItemHandler->aMenuItemURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:PasteClipboard"))) // special for draw/impress
- )
+ if ( pMenuItemHandler->aMenuItemURL == ".uno:Paste" || pMenuItemHandler->aMenuItemURL == ".uno:PasteSpecial"
+ || pMenuItemHandler->aMenuItemURL == ".uno:PasteClipboard" ) // special for draw/impress
bEnabledItem = sal_True;
#endif
@@ -842,9 +839,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
m_bActive = sal_True;
::rtl::OUString aMenuCommand( m_aMenuItemCommand );
- if ( m_aMenuItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSpecialWindowMenu)) ||
- m_aMenuItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSlotSpecialWindowMenu)) ||
- aMenuCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSpecialWindowCommand)) )
+ if ( m_aMenuItemCommand == aSpecialWindowMenu || m_aMenuItemCommand == aSlotSpecialWindowMenu || aMenuCommand == aSpecialWindowCommand )
MenuManager::UpdateSpecialWindowMenu( pMenu,getServiceFactory(),m_aLock );
// Check if some modes have changed so we have to update our menu images
@@ -1253,8 +1248,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
{
sal_uInt16 nItemId = pMenu->GetItemId( nPos );
::rtl::OUString aCommand = pMenu->GetItemCommand( nItemId );
- if ( nItemId == SID_MDIWINDOWLIST ||
- aCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSpecialWindowCommand)) )
+ if ( nItemId == SID_MDIWINDOWLIST || aCommand == aSpecialWindowCommand)
{
// Retrieve addon popup menus and add them to our menu bar
Reference< com::sun::star::frame::XModel > xModel;
@@ -1354,13 +1348,13 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
xPopupMenuDispatchProvider = pAttributes->xDispatchProvider;
// Check if this is the help menu. Add menu item if needed
- if ( nItemId == SID_HELPMENU || aItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSlotHelpMenu)) || aItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aCmdHelpMenu)) )
+ if ( nItemId == SID_HELPMENU || aItemCommand == aSlotHelpMenu || aItemCommand == aCmdHelpMenu )
{
// Check if this is the help menu. Add menu item if needed
CheckAndAddMenuExtension( pPopup );
}
- else if (( nItemId == SID_ADDONLIST || aItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aSlotSpecialToolsMenu)) || aItemCommand.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aCmdToolsMenu)) ) &&
- AddonMenuManager::HasAddonMenuElements() )
+ else if (( nItemId == SID_ADDONLIST || aItemCommand == aSlotSpecialToolsMenu || aItemCommand == aCmdToolsMenu ) &&
+ AddonMenuManager::HasAddonMenuElements() )
{
// Create addon popup menu if there exist elements and this is the tools popup menu
AddonMenu* pSubMenu = AddonMenuManager::CreateAddonMenu( rFrame );