diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-06 13:10:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-06 20:23:09 +0200 |
commit | 8c77b5670ec0ee6d550d5adba51b8ae76fe2c162 (patch) | |
tree | 9a905004341f2fae7bee3b45bd8826d95f801353 /sd/source/ui | |
parent | make binary functor unary, related tdf#108782 (diff) | |
download | core-8c77b5670ec0ee6d550d5adba51b8ae76fe2c162.tar.gz core-8c77b5670ec0ee6d550d5adba51b8ae76fe2c162.zip |
use OString::operator== in preference to ::equals
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf
Reviewed-on: https://gerrit.libreoffice.org/39646
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/remotecontrol/BluetoothServer.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Receiver.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Server.cxx | 4 |
3 files changed, 16 insertions, 16 deletions
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 148e4422fbed..b0f8574f7300 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -887,13 +887,13 @@ DBusHandlerResult ProfileMessageFunction { SAL_INFO("sdremote.bluetooth", "ProfileMessageFunction||" << dbus_message_get_interface(pMessage) << "||" << dbus_message_get_member(pMessage)); - if (OString(dbus_message_get_interface(pMessage)).equals("org.bluez.Profile1")) + if (OString(dbus_message_get_interface(pMessage)) == "org.bluez.Profile1") { - if (OString(dbus_message_get_member(pMessage)).equals("Release")) + if (OString(dbus_message_get_member(pMessage)) == "Release") { return DBUS_HANDLER_RESULT_HANDLED; } - else if (OString(dbus_message_get_member(pMessage)).equals("NewConnection")) + else if (OString(dbus_message_get_member(pMessage)) == "NewConnection") { if (!dbus_message_has_signature(pMessage, "oha{sv}")) { @@ -944,7 +944,7 @@ DBusHandlerResult ProfileMessageFunction return DBUS_HANDLER_RESULT_HANDLED; } } - else if (OString(dbus_message_get_member(pMessage)).equals("RequestDisconnection")) + else if (OString(dbus_message_get_member(pMessage)) == "RequestDisconnection") { return DBUS_HANDLER_RESULT_HANDLED; } diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx index 3fd6d9a1a9fe..12801b2927fc 100644 --- a/sd/source/ui/remotecontrol/Receiver.cxx +++ b/sd/source/ui/remotecontrol/Receiver.cxx @@ -81,17 +81,17 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) { } - if ( aCommand[0].equals( "transition_next" ) ) + if ( aCommand[0] == "transition_next" ) { if ( xSlideShowController.is() ) xSlideShowController->gotoNextEffect(); } - else if ( aCommand[0].equals( "transition_previous" ) ) + else if ( aCommand[0] == "transition_previous" ) { if ( xSlideShowController.is() ) xSlideShowController->gotoPreviousEffect(); } - else if ( aCommand[0].equals( "goto_slide" ) ) + else if ( aCommand[0] == "goto_slide" ) { // FIXME: if 0 returned, then not a valid number sal_Int32 aSlide = aCommand[1].toInt32(); @@ -101,17 +101,17 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) xSlideShowController->gotoSlideIndex( aSlide ); } } - else if ( aCommand[0].equals( "presentation_start" ) ) + else if ( aCommand[0] == "presentation_start" ) { if ( xPresentation.is() ) xPresentation->start(); } - else if ( aCommand[0].equals( "presentation_stop" ) ) + else if ( aCommand[0] == "presentation_stop" ) { if ( xPresentation.is() ) xPresentation->end(); } - else if ( aCommand[0].equals( "presentation_blank_screen" ) ) + else if ( aCommand[0] == "presentation_blank_screen" ) { if ( aCommand.size() > 1 ) { @@ -123,7 +123,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) xSlideShowController->blankScreen( 0 ); // Default is black } } - else if (aCommand[0].equals( "pointer_started" )) + else if (aCommand[0] == "pointer_started" ) { // std::cerr << "pointer_started" << std::endl; float x = aCommand[1].toFloat(); @@ -164,7 +164,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) SAL_INFO( "sdremote", "Pointer started, we display the pointer on screen" ); } - else if (aCommand[0].equals( "pointer_dismissed" )) + else if (aCommand[0] == "pointer_dismissed" ) { SolarMutexGuard aSolarGuard; if (xSlideShow.is()) try @@ -183,7 +183,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) SAL_INFO( "sdremote", "Pointer dismissed, we hide the pointer on screen" ); } - else if (aCommand[0].equals( "pointer_coordination" )) + else if (aCommand[0] == "pointer_coordination" ) { float x = aCommand[1].toFloat(); float y = aCommand[2].toFloat(); @@ -206,7 +206,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) "exception caught: " << comphelper::anyToString( cppu::getCaughtException() )); } } - else if ( aCommand[0].equals( "presentation_resume" ) ) + else if ( aCommand[0] == "presentation_resume" ) { if ( xSlideShowController.is() ) { diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 047747b70eea..7382ad00a80a 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -110,8 +110,8 @@ void RemoteServer::execute() BufferedStreamSocket *pSocket = new BufferedStreamSocket( aSocket); OString aLine; if ( pSocket->readLine( aLine) - && aLine.equals( "LO_SERVER_CLIENT_PAIR" ) && - pSocket->readLine( aLine ) ) + && aLine == "LO_SERVER_CLIENT_PAIR" + && pSocket->readLine( aLine ) ) { OString aName( aLine ); |