Kaydet (Commit) afb28021 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

sdext: Use appropriate OUString functions on string constants

Change-Id: I0e9800f1c828294e5b97e513dae30a4f2d1161fe
üst fc6e89ef
...@@ -54,7 +54,7 @@ Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizer::queryDispat ...@@ -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 ) const URL& aURL, const OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException, std::exception )
{ {
Reference < XDispatch > xRet; 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" ) ) // if ( aURL.Path.equalsAscii( "Function1" ) )
xRet = this; xRet = this;
...@@ -84,9 +84,9 @@ Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizer: ...@@ -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 ) void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyValue >& lArguments )
throw( RuntimeException, std::exception ) 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() ); Reference< XModel > xModel( mxController->getModel() );
if ( xModel.is() ) if ( xModel.is() )
......
...@@ -74,7 +74,7 @@ Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::query ...@@ -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 ) const URL& aURL, const OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException, std::exception )
{ {
Reference < XDispatch > xRet; 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; xRet = this;
return xRet; return xRet;
...@@ -98,9 +98,9 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL, ...@@ -98,9 +98,9 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
throw( RuntimeException, std::exception ) 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 try
{ {
...@@ -133,7 +133,7 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL, ...@@ -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 ) if ( mpOptimizerDialog )
mpOptimizerDialog->UpdateStatus( rArguments ); mpOptimizerDialog->UpdateStatus( rArguments );
......
...@@ -365,9 +365,9 @@ namespace ...@@ -365,9 +365,9 @@ namespace
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMask received two properties", CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMask received two properties",
(sal_Int32) 3, xBitmap.getLength() ); (sal_Int32) 3, xBitmap.getLength() );
CPPUNIT_ASSERT_MESSAGE( "drawMask got URL param", CPPUNIT_ASSERT_MESSAGE( "drawMask got URL param",
xBitmap[0].Name.equalsAscii( "URL" ) ); xBitmap[0].Name == "URL" );
CPPUNIT_ASSERT_MESSAGE( "drawMask got InputStream param", 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 virtual void drawImage(const uno::Sequence<beans::PropertyValue>& xBitmap ) SAL_OVERRIDE
...@@ -375,9 +375,9 @@ namespace ...@@ -375,9 +375,9 @@ namespace
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawImage received two properties", CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawImage received two properties",
(sal_Int32) 3, xBitmap.getLength() ); (sal_Int32) 3, xBitmap.getLength() );
CPPUNIT_ASSERT_MESSAGE( "drawImage got URL param", CPPUNIT_ASSERT_MESSAGE( "drawImage got URL param",
xBitmap[0].Name.equalsAscii( "URL" ) ); xBitmap[0].Name == "URL" );
CPPUNIT_ASSERT_MESSAGE( "drawImage got InputStream param", CPPUNIT_ASSERT_MESSAGE( "drawImage got InputStream param",
xBitmap[1].Name.equalsAscii( "InputStream" ) ); xBitmap[1].Name == "InputStream" );
m_bImageSeen = true; m_bImageSeen = true;
} }
...@@ -387,9 +387,9 @@ namespace ...@@ -387,9 +387,9 @@ namespace
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawColorMaskedImage received two properties", CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawColorMaskedImage received two properties",
(sal_Int32) 3, xBitmap.getLength() ); (sal_Int32) 3, xBitmap.getLength() );
CPPUNIT_ASSERT_MESSAGE( "drawColorMaskedImage got URL param", CPPUNIT_ASSERT_MESSAGE( "drawColorMaskedImage got URL param",
xBitmap[0].Name.equalsAscii( "URL" ) ); xBitmap[0].Name == "URL" );
CPPUNIT_ASSERT_MESSAGE( "drawColorMaskedImage got InputStream param", 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, virtual void drawMaskedImage(const uno::Sequence<beans::PropertyValue>& xBitmap,
...@@ -399,16 +399,16 @@ namespace ...@@ -399,16 +399,16 @@ namespace
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #1", CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #1",
(sal_Int32) 3, xBitmap.getLength() ); (sal_Int32) 3, xBitmap.getLength() );
CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got URL param #1", 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", 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", CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #2",
(sal_Int32) 3, xMask.getLength() ); (sal_Int32) 3, xMask.getLength() );
CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got URL param #2", 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", 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, virtual void drawAlphaMaskedImage(const uno::Sequence<beans::PropertyValue>& xBitmap,
...@@ -417,16 +417,16 @@ namespace ...@@ -417,16 +417,16 @@ namespace
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #1", CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #1",
(sal_Int32) 3, xBitmap.getLength() ); (sal_Int32) 3, xBitmap.getLength() );
CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got URL param #1", 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", 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", CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #2",
(sal_Int32) 3, xMask.getLength() ); (sal_Int32) 3, xMask.getLength() );
CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got URL param #2", 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", CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got InputStream param #2",
xMask[1].Name.equalsAscii( "InputStream" ) ); xMask[1].Name == "InputStream" );
} }
virtual void setTextRenderMode( sal_Int32 ) SAL_OVERRIDE virtual void setTextRenderMode( sal_Int32 ) SAL_OVERRIDE
......
...@@ -243,7 +243,7 @@ Reference<XResource> PresenterPaneFactory::CreatePane ( ...@@ -243,7 +243,7 @@ Reference<XResource> PresenterPaneFactory::CreatePane (
rxPaneId, rxPaneId,
rsTitle, rsTitle,
xParentPane, xParentPane,
rxPaneId->getFullResourceURL().Arguments.equalsAscii("Sprite=1") ); rxPaneId->getFullResourceURL().Arguments == "Sprite=1");
} }
catch (Exception&) catch (Exception&)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment