summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 19:49:53 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 20:03:42 +0200
commitd6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch)
treeb5a12df1fcae025715633469b75ab4c9b6f6d279 /slideshow
parent0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/animationnodes/animationcommandnode.cxx4
-rw-r--r--slideshow/source/engine/shapes/drawshape.cxx2
-rw-r--r--slideshow/source/engine/shapes/shapeimporter.cxx34
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx51
-rw-r--r--slideshow/test/demoshow.cxx3
5 files changed, 27 insertions, 67 deletions
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
index b01ca3009e0e..40cdef517b55 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
@@ -80,9 +80,7 @@ void AnimationCommandNode::activate_st()
{
double fMediaTime=0.0;
beans::PropertyValue aMediaTime;
- if( (mxCommandNode->getParameter() >>= aMediaTime) &&
- aMediaTime.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("MediaTime") ))
+ if( (mxCommandNode->getParameter() >>= aMediaTime) && aMediaTime.Name == "MediaTime" )
{
aMediaTime.Value >>= fMediaTime;
}
diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx
index 17ac98f6615f..a0ca97a979e0 100644
--- a/slideshow/source/engine/shapes/drawshape.cxx
+++ b/slideshow/source/engine/shapes/drawshape.cxx
@@ -204,7 +204,7 @@ namespace slideshow
uno::Reference<beans::XPropertySet> xProp( xSource, uno::UNO_QUERY );
rtl::OUString sCLSID;
getPropertyValue( sCLSID, xProp, OUSTR("CLSID"));
- if( sCLSID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("12DCAE26-281F-416F-a234-c3086127382e")) && local_getMetafileForChart( xSource, xContainingPage, rMtf ) )
+ if( sCLSID == "12DCAE26-281F-416F-a234-c3086127382e" && local_getMetafileForChart( xSource, xContainingPage, rMtf ) )
return true;
return getMetaFile( xSource, xContainingPage, rMtf, mtfLoadFlags, rxContext );
}
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index 2c45996f18a3..227f4c8cce50 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -283,18 +283,14 @@ ShapeSharedPtr ShapeImporter::createShape(
uno::Reference<beans::XPropertySet> const& xPropSet,
rtl::OUString const& shapeType ) const
{
- if( shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape") ) ||
- shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.MediaShape") ) )
+ if( shapeType == "com.sun.star.drawing.MediaShape" || shapeType == "com.sun.star.presentation.MediaShape" )
{
// Media shape (video etc.). This is a special object
return createMediaShape(xCurrShape,
mnAscendingPrio,
mrContext);
}
- else if( shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape") ))
+ else if( shapeType == "com.sun.star.drawing.PluginShape" )
{
// PropertyValues to copy from XShape to plugin
static const char* aPropertyValues[] =
@@ -314,8 +310,7 @@ ShapeSharedPtr ShapeImporter::createShape(
SAL_N_ELEMENTS(aPropertyValues),
mrContext );
}
- else if( shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape") ))
+ else if( shapeType == "com.sun.star.drawing.AppletShape" )
{
// PropertyValues to copy from XShape to applet
static const char* aPropertyValues[] =
@@ -337,10 +332,7 @@ ShapeSharedPtr ShapeImporter::createShape(
SAL_N_ELEMENTS(aPropertyValues),
mrContext );
}
- else if( shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape") ) ||
- shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.OLE2Shape") ) )
+ else if( shapeType == "com.sun.star.drawing.OLE2Shape" || shapeType == "com.sun.star.presentation.OLE2Shape" )
{
// #i46224# Mark OLE shapes as foreign content - scan them for
// unsupported actions, and fallback to bitmap, if necessary
@@ -350,12 +342,7 @@ ShapeSharedPtr ShapeImporter::createShape(
true,
mrContext );
}
- else if( shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM(
- "com.sun.star.drawing.GraphicObjectShape") ) ||
- shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM(
- "com.sun.star.presentation.GraphicObjectShape") ) )
+ else if( shapeType == "com.sun.star.drawing.GraphicObjectShape" || shapeType == "com.sun.star.presentation.GraphicObjectShape" )
{
GraphicObject aGraphicObject;
@@ -491,12 +478,7 @@ bool ShapeImporter::isSkip(
// they can be non empty when user edits the default texts
if(mbConvertingMasterPage)
{
- if(shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation."
- "TitleTextShape") ) ||
- shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation."
- "OutlinerShape") ))
+ if( shapeType == "com.sun.star.presentation.TitleTextShape" || shapeType == "com.sun.star.presentation.OutlinerShape" )
{
return true;
}
@@ -602,9 +584,7 @@ ShapeSharedPtr ShapeImporter::importShape() // throw (ShapeLoadFailedException)
// is this shape presentation-invisible?
if( !isSkip(xPropSet, shapeType, xDrawnInSlideshow) )
{
- bIsGroupShape = shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM(
- "com.sun.star.drawing.GroupShape") );
+ bIsGroupShape = shapeType == "com.sun.star.drawing.GroupShape";
if( rTop.mpGroupShape ) // in group particle mode?
{
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index cd04953062da..ca91a6cd3424 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1045,8 +1045,7 @@ public:
{}
void operator()( beans::PropertyValue const& rProperty ) const {
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("Prefetch") ))
+ if (rProperty.Name == "Prefetch" )
{
uno::Sequence<uno::Any> seq;
if ((rProperty.Value >>= seq) && seq.getLength() == 2)
@@ -1055,13 +1054,11 @@ public:
seq[1] >>= mpSlideShowImpl->mxPrefetchAnimationNode;
}
}
- else if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("SkipAllMainSequenceEffects") ))
+ else if ( rProperty.Name == "SkipAllMainSequenceEffects" )
{
rProperty.Value >>= mrbSkipAllMainSequenceEffects;
}
- else if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("SkipSlideTransition") ))
+ else if ( rProperty.Name == "SkipSlideTransition" )
{
rProperty.Value >>= mrbSkipSlideTransition;
}
@@ -1572,8 +1569,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("AutomaticAdvancement") ))
+ if ( rProperty.Name == "AutomaticAdvancement" )
{
double nTimeout(0.0);
mbAutomaticAdvancementMode = (rProperty.Value >>= nTimeout);
@@ -1585,8 +1581,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("UserPaintColor") ))
+ if ( rProperty.Name == "UserPaintColor" )
{
sal_Int32 nColor(0);
if (rProperty.Value >>= nColor)
@@ -1616,8 +1611,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
}
//adding support for erasing features in UserPaintOverlay
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("EraseAllInk") ))
+ if ( rProperty.Name == "EraseAllInk" )
{
bool nEraseAllInk(false);
if (rProperty.Value >>= nEraseAllInk)
@@ -1633,8 +1627,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("SwitchPenMode") ))
+ if ( rProperty.Name == "SwitchPenMode" )
{
bool nSwitchPenMode(false);
if (rProperty.Value >>= nSwitchPenMode)
@@ -1651,8 +1644,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("SwitchEraserMode") ))
+ if ( rProperty.Name == "SwitchEraserMode" )
{
bool nSwitchEraserMode(false);
if (rProperty.Value >>= nSwitchEraserMode)
@@ -1669,8 +1661,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("EraseInk") ))
+ if ( rProperty.Name == "EraseInk" )
{
sal_Int32 nEraseInk(100);
if (rProperty.Value >>= nEraseInk)
@@ -1687,8 +1678,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
}
// new Property for pen's width
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("UserPaintStrokeWidth") ))
+ if ( rProperty.Name == "UserPaintStrokeWidth" )
{
double nWidth(4.0);
if (rProperty.Value >>= nWidth)
@@ -1702,8 +1692,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("AdvanceOnClick") ))
+ if ( rProperty.Name == "AdvanceOnClick" )
{
sal_Bool bAdvanceOnClick = sal_False;
if (! (rProperty.Value >>= bAdvanceOnClick))
@@ -1712,8 +1701,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("DisableAnimationZOrder") ))
+ if ( rProperty.Name == "DisableAnimationZOrder" )
{
sal_Bool bDisableAnimationZOrder = sal_False;
if (! (rProperty.Value >>= bDisableAnimationZOrder))
@@ -1722,8 +1710,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("ImageAnimationsAllowed") ) )
+ if ( rProperty.Name == "ImageAnimationsAllowed" )
{
if (! (rProperty.Value >>= mbImageAnimationsAllowed))
return false;
@@ -1740,8 +1727,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("MouseVisible") ))
+ if ( rProperty.Name == "MouseVisible" )
{
if (! (rProperty.Value >>= mbMouseVisible))
return false;
@@ -1751,14 +1737,12 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("ForceManualAdvance") ))
+ if ( rProperty.Name == "ForceManualAdvance" )
{
return (rProperty.Value >>= mbForceManualAdvance);
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("RehearseTimings") ))
+ if ( rProperty.Name == "RehearseTimings" )
{
bool bRehearseTimings = false;
if (! (rProperty.Value >>= bRehearseTimings))
@@ -1788,8 +1772,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("WaitSymbolBitmap") ))
+ if ( rProperty.Name == "WaitSymbolBitmap" )
{
uno::Reference<rendering::XBitmap> xBitmap;
if (! (rProperty.Value >>= xBitmap))
diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx
index 315822064a50..a9322fdbfa85 100644
--- a/slideshow/test/demoshow.cxx
+++ b/slideshow/test/demoshow.cxx
@@ -522,8 +522,7 @@ void DemoApp::Main()
{
::rtl::OUString aParam = GetCommandLineParam( i );
- if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--help" ) ) ||
- aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ) ) )
+ if( aParam == "--help" || aParam == "-h" )
bHelp = true;
}