diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-15 10:16:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-15 10:16:27 +0100 |
commit | afb28021e99d92c189adeda27300af52ca2c7bad (patch) | |
tree | fb8916b2d6f3c8572e23107faffb6f31f03a38af /sdext | |
parent | fc6e89ef5004bbc6f39e70d42a97c3c97c2050f4 (diff) |
sdext: Use appropriate OUString functions on string constants
Change-Id: I0e9800f1c828294e5b97e513dae30a4f2d1161fe
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/pppoptimizer.cxx | 6 | ||||
-rw-r--r-- | sdext/source/minimizer/pppoptimizerdialog.cxx | 8 | ||||
-rw-r--r-- | sdext/source/pdfimport/test/tests.cxx | 28 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterPaneFactory.cxx | 2 |
4 files changed, 22 insertions, 22 deletions
diff --git a/sdext/source/minimizer/pppoptimizer.cxx b/sdext/source/minimizer/pppoptimizer.cxx index 51c2b7d9fefb..c2c5b6b16deb 100644 --- a/sdext/source/minimizer/pppoptimizer.cxx +++ b/sdext/source/minimizer/pppoptimizer.cxx @@ -54,7 +54,7 @@ Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizer::queryDispat const URL& aURL, const OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException, std::exception ) { Reference < XDispatch > xRet; - if ( aURL.Protocol.equalsAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) ) + if ( aURL.Protocol.equalsIgnoreAsciiCase( "vnd.com.sun.star.comp.PPPOptimizer:" ) ) { // if ( aURL.Path.equalsAscii( "Function1" ) ) xRet = this; @@ -84,9 +84,9 @@ Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizer: void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyValue >& lArguments ) throw( RuntimeException, std::exception ) { - if ( mxController.is() && rURL.Protocol.equalsAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) ) + if ( mxController.is() && rURL.Protocol.equalsIgnoreAsciiCase( "vnd.com.sun.star.comp.PPPOptimizer:" ) ) { - if ( rURL.Path.equalsAscii( "optimize" ) ) + if ( rURL.Path == "optimize" ) { Reference< XModel > xModel( mxController->getModel() ); if ( xModel.is() ) diff --git a/sdext/source/minimizer/pppoptimizerdialog.cxx b/sdext/source/minimizer/pppoptimizerdialog.cxx index db6c5ff71b41..6be8e712289e 100644 --- a/sdext/source/minimizer/pppoptimizerdialog.cxx +++ b/sdext/source/minimizer/pppoptimizerdialog.cxx @@ -74,7 +74,7 @@ Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::query const URL& aURL, const OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException, std::exception ) { Reference < XDispatch > xRet; - if ( aURL.Protocol.equalsAscii( "vnd.com.sun.star.comp.PresentationMinimizer:" ) ) + if ( aURL.Protocol.equalsIgnoreAsciiCase( "vnd.com.sun.star.comp.PresentationMinimizer:" ) ) xRet = this; return xRet; @@ -98,9 +98,9 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL, throw( RuntimeException, std::exception ) { - if ( mxController.is() && rURL.Protocol.equalsAscii( "vnd.com.sun.star.comp.PresentationMinimizer:" ) ) + if ( mxController.is() && rURL.Protocol.equalsIgnoreAsciiCase( "vnd.com.sun.star.comp.PresentationMinimizer:" ) ) { - if ( rURL.Path.equalsAscii( "execute" ) ) + if ( rURL.Path == "execute" ) { try { @@ -133,7 +133,7 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL, } } - else if ( rURL.Path.equalsAscii( "statusupdate" ) ) + else if ( rURL.Path == "statusupdate" ) { if ( mpOptimizerDialog ) mpOptimizerDialog->UpdateStatus( rArguments ); diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index 9538c66e91dc..101757eb3506 100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -365,9 +365,9 @@ namespace CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMask received two properties", (sal_Int32) 3, xBitmap.getLength() ); CPPUNIT_ASSERT_MESSAGE( "drawMask got URL param", - xBitmap[0].Name.equalsAscii( "URL" ) ); + xBitmap[0].Name == "URL" ); CPPUNIT_ASSERT_MESSAGE( "drawMask got InputStream param", - xBitmap[1].Name.equalsAscii( "InputStream" ) ); + xBitmap[1].Name == "InputStream" ); } virtual void drawImage(const uno::Sequence<beans::PropertyValue>& xBitmap ) SAL_OVERRIDE @@ -375,9 +375,9 @@ namespace CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawImage received two properties", (sal_Int32) 3, xBitmap.getLength() ); CPPUNIT_ASSERT_MESSAGE( "drawImage got URL param", - xBitmap[0].Name.equalsAscii( "URL" ) ); + xBitmap[0].Name == "URL" ); CPPUNIT_ASSERT_MESSAGE( "drawImage got InputStream param", - xBitmap[1].Name.equalsAscii( "InputStream" ) ); + xBitmap[1].Name == "InputStream" ); m_bImageSeen = true; } @@ -387,9 +387,9 @@ namespace CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawColorMaskedImage received two properties", (sal_Int32) 3, xBitmap.getLength() ); CPPUNIT_ASSERT_MESSAGE( "drawColorMaskedImage got URL param", - xBitmap[0].Name.equalsAscii( "URL" ) ); + xBitmap[0].Name == "URL" ); CPPUNIT_ASSERT_MESSAGE( "drawColorMaskedImage got InputStream param", - xBitmap[1].Name.equalsAscii( "InputStream" ) ); + xBitmap[1].Name == "InputStream" ); } virtual void drawMaskedImage(const uno::Sequence<beans::PropertyValue>& xBitmap, @@ -399,16 +399,16 @@ namespace CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #1", (sal_Int32) 3, xBitmap.getLength() ); CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got URL param #1", - xBitmap[0].Name.equalsAscii( "URL" ) ); + xBitmap[0].Name == "URL" ); CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got InputStream param #1", - xBitmap[1].Name.equalsAscii( "InputStream" ) ); + xBitmap[1].Name == "InputStream" ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #2", (sal_Int32) 3, xMask.getLength() ); CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got URL param #2", - xMask[0].Name.equalsAscii( "URL" ) ); + xMask[0].Name == "URL" ); CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got InputStream param #2", - xMask[1].Name.equalsAscii( "InputStream" ) ); + xMask[1].Name == "InputStream" ); } virtual void drawAlphaMaskedImage(const uno::Sequence<beans::PropertyValue>& xBitmap, @@ -417,16 +417,16 @@ namespace CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #1", (sal_Int32) 3, xBitmap.getLength() ); CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got URL param #1", - xBitmap[0].Name.equalsAscii( "URL" ) ); + xBitmap[0].Name == "URL" ); CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got InputStream param #1", - xBitmap[1].Name.equalsAscii( "InputStream" ) ); + xBitmap[1].Name == "InputStream" ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #2", (sal_Int32) 3, xMask.getLength() ); CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got URL param #2", - xMask[0].Name.equalsAscii( "URL" ) ); + xMask[0].Name == "URL" ); CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got InputStream param #2", - xMask[1].Name.equalsAscii( "InputStream" ) ); + xMask[1].Name == "InputStream" ); } virtual void setTextRenderMode( sal_Int32 ) SAL_OVERRIDE diff --git a/sdext/source/presenter/PresenterPaneFactory.cxx b/sdext/source/presenter/PresenterPaneFactory.cxx index 880ff3d573b0..956a5b4c3666 100644 --- a/sdext/source/presenter/PresenterPaneFactory.cxx +++ b/sdext/source/presenter/PresenterPaneFactory.cxx @@ -243,7 +243,7 @@ Reference<XResource> PresenterPaneFactory::CreatePane ( rxPaneId, rsTitle, xParentPane, - rxPaneId->getFullResourceURL().Arguments.equalsAscii("Sprite=1") ); + rxPaneId->getFullResourceURL().Arguments == "Sprite=1"); } catch (Exception&) { |