summaryrefslogtreecommitdiff
path: root/sfx2/source
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 /sfx2/source
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 'sfx2/source')
-rw-r--r--sfx2/source/appl/appserv.cxx12
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx6
2 files changed, 9 insertions, 9 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 363ab7f60ef8..450e74931393 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -744,7 +744,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
aCurrentMode = comphelper::getString( aAppNode.getNodeValue( "Active" ) );
- if ( aCurrentMode.compareTo( aNewName ) == 0 )
+ if ( aCurrentMode == aNewName )
{
bDone = true;
break;
@@ -821,7 +821,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
OUString aCommandArg = comphelper::getString( aModeNode.getNodeValue( "CommandArg" ) );
- if ( aCommandArg.compareTo( aNewName ) == 0 )
+ if ( aCommandArg == aNewName )
{
aMandatoryToolbars = aModeNode.getNodeValue( "Toolbars" ).get< uno::Sequence<OUString> >();
aUserToolbars = aModeNode.getNodeValue( "UserToolbars" ).get< uno::Sequence<OUString> >();
@@ -881,17 +881,17 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
sfx2::sidebar::SidebarController::GetSidebarControllerForFrame( xFrame );
if ( pSidebar )
{
- if ( aSidebarMode.compareTo( "Arrow" ) == 0 )
+ if ( aSidebarMode == "Arrow" )
{
pSidebar->FadeOut();
}
- else if ( aSidebarMode.compareTo( "Tabs" ) == 0 )
+ else if ( aSidebarMode == "Tabs" )
{
pSidebar->FadeIn();
pSidebar->RequestOpenDeck();
pSidebar->RequestCloseDeck();
}
- else if ( aSidebarMode.compareTo( "Opened" ) == 0 )
+ else if ( aSidebarMode == "Opened" )
{
pSidebar->FadeIn();
pSidebar->RequestOpenDeck();
@@ -917,7 +917,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
OUString aCommandArg = comphelper::getString( aModeNode.getNodeValue( "CommandArg" ) );
- if ( aCommandArg.compareTo( aCurrentMode ) == 0 )
+ if ( aCommandArg == aCurrentMode )
{
aModeNode.setNodeValue( "UserToolbars", makeAny( aBackup ) );
break;
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index ca5f95c347d5..023dce7a4e22 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -145,7 +145,7 @@ static const utl::OConfigurationNode lcl_getCurrentImplConfigNode(const Referenc
OUString aCommandArg = comphelper::getString( aImplNode.getNodeValue( "File" ) );
- if ( aCommandArg.compareTo( aActive ) == 0 )
+ if ( aCommandArg == aActive )
{
return aImplNode;
}
@@ -222,7 +222,7 @@ bool SfxNotebookBar::IsActive()
OUString aCommandArg = comphelper::getString( aModeNode.getNodeValue( "CommandArg" ) );
- if ( aCommandArg.compareTo( aActive ) == 0 )
+ if ( aCommandArg == aActive )
{
return comphelper::getBOOL( aModeNode.getNodeValue( "HasNotebookbar" ) );
}
@@ -288,7 +288,7 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
// delete ".ui"
sNewFile = sNewFile.copy( 0, sNewFile.getLength() - 3 );
- bChangedFile = ( sNewFile.compareTo( sCurrentFile ) != 0 );
+ bChangedFile = sNewFile != sCurrentFile;
}
if ( ( !sFile.isEmpty() && bChangedFile ) || !pNotebookBar || !pNotebookBar->IsVisible() )