summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 12:42:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 15:53:13 +0200
commit43a6b59539ad573436f43303e9fbe17c12dc9c84 (patch)
tree24cbf3a9fc84ad38e17ed92ed0a50db48f20f2c5 /framework
parentf2a1298ea409141a9190c7789b39546644084980 (diff)
simplify some OUString compareTo calls
to either startsWith or == or != Change-Id: Ie4b4662f5b8e4532cbc1ab36910389e0b3d41ef0 Reviewed-on: https://gerrit.libreoffice.org/39750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/notebookbarmenucontroller.cxx4
-rw-r--r--framework/source/uielement/toolbarmodemenucontroller.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/framework/source/uielement/notebookbarmenucontroller.cxx b/framework/source/uielement/notebookbarmenucontroller.cxx
index f469628d4bd8..70d7827dd7e2 100644
--- a/framework/source/uielement/notebookbarmenucontroller.cxx
+++ b/framework/source/uielement/notebookbarmenucontroller.cxx
@@ -272,11 +272,11 @@ void SAL_CALL NotebookbarMenuController::itemActivated( const css::awt::MenuEven
return;
// Entries are enabled only when Notebookbar mode is active
- bool bActive = ( comphelper::getString( aModesNode.getNodeValue( "Active" ) ).compareTo("Notebookbar") == 0 );
+ bool bActive = comphelper::getString( aModesNode.getNodeValue( "Active" ) ) == "Notebookbar";
for ( int i = 0; i < m_xPopupMenu->getItemCount(); ++i )
{
- m_xPopupMenu->checkItem( i+1, ( aActive.compareTo( m_xPopupMenu->getCommand( i+1 ) ) == 0 ) );
+ m_xPopupMenu->checkItem( i+1, aActive == m_xPopupMenu->getCommand( i+1 ) );
m_xPopupMenu->enableItem( i+1, bActive );
}
}
diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx
index 698f826a4012..2ac7f4671df8 100644
--- a/framework/source/uielement/toolbarmodemenucontroller.cxx
+++ b/framework/source/uielement/toolbarmodemenucontroller.cxx
@@ -283,7 +283,7 @@ void SAL_CALL ToolbarModeMenuController::itemActivated( const css::awt::MenuEven
OUString aMode = comphelper::getString( aModesNode.getNodeValue( "Active" ) );
for ( int i = 0; i < m_xPopupMenu->getItemCount(); ++i )
- m_xPopupMenu->checkItem( i+1, (aMode.compareTo( m_xPopupMenu->getCommand( i+1 ) ) == 0) );
+ m_xPopupMenu->checkItem( i+1, aMode == m_xPopupMenu->getCommand( i+1 ) );
}
// XPopupMenuController