summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-02-19 23:27:29 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-02-19 23:28:55 +0900
commit96cb767123c9e8f5db197454b4da02c8f7583d2b (patch)
tree4790978cfa591fb5cf5fd0920159abee7d6f1ac8 /framework
parente34e95aef33262c7aad006883e02cb76e5bb9947 (diff)
Prefer equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("..."))
to equalsIgnoreAsciiCaseAscii("...")
Diffstat (limited to 'framework')
-rw-r--r--framework/source/dispatch/closedispatcher.cxx2
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx6
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx83
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx3
4 files changed, 61 insertions, 33 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index b595da772413..2a8d20b02abf 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -605,7 +605,7 @@ void CloseDispatcher::implts_notifyResultListener(const css::uno::Reference< css
css::uno::Reference< css::frame::XFrame > CloseDispatcher::static_impl_searchRightTargetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame ,
const ::rtl::OUString& sTarget)
{
- if (sTarget.equalsIgnoreAsciiCaseAscii("_self"))
+ if (sTarget.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("_self")))
return xFrame;
OSL_ENSURE(sTarget.isEmpty(), "CloseDispatch used for unexpected target. Magic things will happen now .-)");
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index 07ff57d514fb..c963a2b1fbad 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -197,8 +197,8 @@ void SAL_CALL TitleHelper::titleChanged(const css::frame::TitleChangedEvent& aEv
void SAL_CALL TitleHelper::notifyEvent(const css::document::EventObject& aEvent)
throw (css::uno::RuntimeException)
{
- if ( ! aEvent.EventName.equalsIgnoreAsciiCaseAscii ("OnSaveAsDone")
- && ! aEvent.EventName.equalsIgnoreAsciiCaseAscii ("OnTitleChanged"))
+ if ( ! aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnSaveAsDone"))
+ && ! aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnTitleChanged")))
return;
// SYNCHRONIZED ->
@@ -211,7 +211,7 @@ void SAL_CALL TitleHelper::notifyEvent(const css::document::EventObject& aEvent)
if (
aEvent.Source != xOwner ||
- (aEvent.EventName.equalsIgnoreAsciiCaseAscii ("OnTitleChanged") && !xOwner.is())
+ (aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnTitleChanged")) && !xOwner.is())
)
{
return;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 0020a2eaf4b6..e25d74b7de18 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -490,11 +490,15 @@ uno::Reference< ui::XUIElement > LayoutManager::implts_findElement( const rtl::O
::rtl::OUString aElementName;
parseResourceURL( aName, aElementType, aElementName );
- if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ))
+ if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) )
return m_xMenuBar;
- else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == aName ))
+ else if (( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) ) ||
+ ( m_aStatusBarElement.m_aName == aName ))
return m_aStatusBarElement.m_xUIElement;
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) )
return m_aProgressBarElement.m_xUIElement;
return uno::Reference< ui::XUIElement >();
@@ -1494,7 +1498,8 @@ throw (RuntimeException)
bNotify = m_pToolbarManager->createToolbar( aName );
bMustBeLayouted = m_pToolbarManager->isLayoutDirty();
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) )
{
// #i38743# don't create a menubar if frame isn't top
if ( !bInPlaceMenu && !m_xMenuBar.is() && implts_isFrameOrWindowTop( xFrame ))
@@ -1545,17 +1550,20 @@ throw (RuntimeException)
}
aWriteLock.unlock();
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && ( implts_isFrameOrWindowTop(xFrame) || implts_isEmbeddedLayoutManager() ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) &&
+ ( implts_isFrameOrWindowTop(xFrame) || implts_isEmbeddedLayoutManager() ))
{
implts_createStatusBar( aName );
bNotify = sal_True;
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) && implts_isFrameOrWindowTop(xFrame) )
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) &&
+ implts_isFrameOrWindowTop(xFrame) )
{
implts_createProgressBar();
bNotify = sal_True;
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("dockingwindow")))
{
// Add layout manager as listener for docking and other window events
uno::Reference< uno::XInterface > xThis( static_cast< OWeakObject* >(this), uno::UNO_QUERY );
@@ -1598,7 +1606,8 @@ throw (RuntimeException)
Reference< XComponent > xComponent;
parseResourceURL( aName, aElementType, aElementName );
- if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ))
+ if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) )
{
if ( !m_bInplaceMenuSet )
{
@@ -1607,7 +1616,8 @@ throw (RuntimeException)
bNotify = true;
}
}
- else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) ||
+ else if (( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) ) ||
( m_aStatusBarElement.m_aName == aName ))
{
aWriteLock.unlock();
@@ -1615,7 +1625,8 @@ throw (RuntimeException)
bMustBeLayouted = true;
bNotify = true;
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) )
{
aWriteLock.unlock();
implts_createProgressBar();
@@ -1628,7 +1639,7 @@ throw (RuntimeException)
bNotify = m_pToolbarManager->destroyToolbar( aName );
bMustBeLayouted = m_pToolbarManager->isLayoutDirty();
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("dockingwindow")))
{
uno::Reference< frame::XFrame > xFrame( m_xFrame );
uno::Reference< lang::XMultiServiceFactory > xSMGR( m_xSMGR );
@@ -1670,7 +1681,9 @@ throw (uno::RuntimeException)
::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US );
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s requested.", aResName.getStr() );
- if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == rResourceURL ))
+ if (( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) ) ||
+ ( m_aStatusBarElement.m_aName == rResourceURL ))
{
implts_readStatusBarState( rResourceURL );
if ( m_aStatusBarElement.m_bVisible && !m_aStatusBarElement.m_bMasterHide )
@@ -1697,7 +1710,8 @@ throw (uno::RuntimeException)
}
}
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ) )
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) )
{
aWriteLock.unlock();
implts_showProgressBar();
@@ -1716,7 +1730,7 @@ throw (uno::RuntimeException)
bNotify = pToolbarManager->requestToolbar( rResourceURL );
}
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("dockingwindow")))
{
uno::Reference< frame::XFrame > xFrame( m_xFrame );
aWriteLock.unlock();
@@ -1801,7 +1815,8 @@ throw (RuntimeException)
::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US );
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() );
- if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ))
+ if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) )
{
WriteGuard aWriteLock( m_aLock );
m_bMenuVisible = sal_True;
@@ -1810,7 +1825,9 @@ throw (RuntimeException)
bResult = implts_resetMenuBar();
bNotify = bResult;
}
- else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == aName ))
+ else if (( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) ) ||
+ ( m_aStatusBarElement.m_aName == aName ))
{
WriteGuard aWriteLock( m_aLock );
if ( m_aStatusBarElement.m_xUIElement.is() && !m_aStatusBarElement.m_bMasterHide &&
@@ -1824,7 +1841,8 @@ throw (RuntimeException)
bNotify = true;
}
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) )
{
bNotify = bResult = implts_showProgressBar();
}
@@ -1841,7 +1859,7 @@ throw (RuntimeException)
bMustLayout = pToolbarManager->isLayoutDirty();
}
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("dockingwindow")))
{
ReadGuard aReadGuard( m_aLock );
uno::Reference< frame::XFrame > xFrame( m_xFrame );
@@ -1850,7 +1868,7 @@ throw (RuntimeException)
impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, true );
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolpanel" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("toolpanel")))
{
ReadGuard aReadGuard( m_aLock );
uno::Reference< frame::XFrame > xFrame( m_xFrame );
@@ -1881,7 +1899,8 @@ throw (RuntimeException)
::rtl::OString aResName = rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US );
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() );
- if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ))
+ if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) )
{
WriteGuard aWriteLock( m_aLock );
@@ -1902,7 +1921,9 @@ throw (RuntimeException)
}
}
}
- else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == aName ))
+ else if (( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) ) ||
+ ( m_aStatusBarElement.m_aName == aName ))
{
WriteGuard aWriteLock( m_aLock );
if ( m_aStatusBarElement.m_xUIElement.is() && !m_aStatusBarElement.m_bMasterHide &&
@@ -1913,7 +1934,8 @@ throw (RuntimeException)
bNotify = sal_True;
}
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) )
{
bNotify = implts_hideProgressBar();
}
@@ -1927,7 +1949,7 @@ throw (RuntimeException)
bNotify = pToolbarManager->hideToolbar( aName );
bMustLayout = pToolbarManager->isLayoutDirty();
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("dockingwindow")))
{
ReadGuard aReadGuard( m_aLock );
uno::Reference< frame::XFrame > xFrame( m_xFrame );
@@ -2114,7 +2136,8 @@ throw (RuntimeException)
::rtl::OUString aElementName;
parseResourceURL( aName, aElementType, aElementName );
- if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ))
+ if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) )
{
ReadGuard aReadLock( m_aLock );
if ( m_xContainerWindow.is() )
@@ -2136,7 +2159,9 @@ throw (RuntimeException)
}
}
}
- else if (( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "statusbar" )) || ( m_aStatusBarElement.m_aName == aName ))
+ else if (( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("statusbar")) ) ||
+ ( m_aStatusBarElement.m_aName == aName ))
{
if ( m_aStatusBarElement.m_xUIElement.is() )
{
@@ -2151,7 +2176,8 @@ throw (RuntimeException)
}
}
}
- else if (( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("progressbar")) )
{
if ( m_aProgressBarElement.m_xUIElement.is() )
return m_aProgressBarElement.m_bVisible;
@@ -2166,7 +2192,7 @@ throw (RuntimeException)
if ( pToolbarManager )
return pToolbarManager->isToolbarVisible( aName );
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" ))
+ else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("dockingwindow")))
{
ReadGuard aReadGuard( m_aLock );
uno::Reference< frame::XFrame > xFrame( m_xFrame );
@@ -3084,7 +3110,8 @@ void SAL_CALL LayoutManager::elementRemoved( const ui::ConfigurationEvent& Event
// No settings anymore, element must be destroyed
if ( xContainerWindow.is() && bNoSettings )
{
- if ( aElementType.equalsIgnoreAsciiCaseAscii( "menubar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "menubar" ))
+ if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) &&
+ aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("menubar")) )
{
SystemWindow* pSysWindow = getTopSystemWindow( xContainerWindow );
if ( pSysWindow && !m_bInplaceMenuSet )
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 8b8d86fe8968..0c0a241a9fcd 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1151,7 +1151,8 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars()
// Check that we only create:
// - Toolbars (the statusbar is also member of the persistent window state)
// - Not custom toolbars, there are created with their own method (implts_createCustomToolbars)
- if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && aElementName.indexOf( m_aCustomTbxPrefix ) == -1 )
+ if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("toolbar")) &&
+ aElementName.indexOf( m_aCustomTbxPrefix ) == -1 )
{
UIElement aNewToolbar = implts_findToolbar( aName );
bool bFound = ( aNewToolbar.m_aName == aName );