diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 19:49:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 20:03:42 +0200 |
commit | d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch) | |
tree | b5a12df1fcae025715633469b75ab4c9b6f6d279 /sd/source | |
parent | 0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/CustomAnimationEffect.cxx | 7 | ||||
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/grf/sdgrffilter.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptinanimations.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/table/TableDesignPane.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 14 |
9 files changed, 24 insertions, 40 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index bb1862c0be3e..d87ab92e9b05 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -1322,9 +1322,7 @@ bool CustomAnimationEffect::setProperty( sal_Int32 nNodeType, const OUString& rA static bool implIsColorAttribute( const OUString& rAttributeName ) { - return rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FillColor") ) || - rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("LineColor") ) || - rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("CharColor") ); + return rAttributeName == "FillColor" || rAttributeName == "LineColor" || rAttributeName == "CharColor"; } // -------------------------------------------------------------------- @@ -1824,8 +1822,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::append( const CustomAnimationPres while( nLength-- ) { - if( !p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "text-only" ) ) && - !p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-property" ) ) ) + if( p->Name != "text-only" && p->Name != "preset-property" ) { aNewUserData.push_back( *p ); bFilter = true; diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 6e8f8ca83208..1b1aa5bc6b18 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -2359,7 +2359,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a sal_uInt32 nMirrorFlags; rtl::OUString sCustomShapeType; MSO_SPT eShapeType = aPropOpt.GetCustomShapeType( mXShape, nMirrorFlags, sCustomShapeType ); - if ( sCustomShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "col-502ad400" ) ) || sCustomShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "col-60da8460" ) ) ) + if ( sCustomShapeType == "col-502ad400" || sCustomShapeType == "col-60da8460" ) { // sj: creating metafile for customshapes that can't be saved to ms format properly ImplCreateShape( ESCHER_ShpInst_PictureFrame, 0xa00, aSolverContainer ); if ( aPropOpt.CreateGraphicProperties( mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "MetaFile" ) ), sal_False ) ) diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index f4d4d0215760..35aba8c170ce 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -399,7 +399,7 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su if( !bIsLinked ) xGraphicSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MimeType" ) ) ) >>= aMimeType; - if( bIsLinked || aMimeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "image/x-vclgraphic" ) ) || aMimeType.isEmpty() ) + if( bIsLinked || aMimeType == "image/x-vclgraphic" || aMimeType.isEmpty() ) { // this failed, try to detect it from graphic stream and URL OUString aURL( sGraphicURL ); @@ -421,7 +421,7 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su } } - if( aMimeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "image/x-vclgraphic" ) ) || aMimeType.isEmpty() ) + if( aMimeType == "image/x-vclgraphic" || aMimeType.isEmpty() ) { // this also failed, now set a mimetype that fits graphic best diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index dcdfbd64455b..1035f5bdae31 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -684,7 +684,7 @@ bool AnimationImporter::convertAnimationNode( const Reference< XAnimationNode >& OUString aAttributeName( xAnimate->getAttributeName() ); - if( (nNodeType == AnimationNodeType::SET) && aAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "fill.on" ) ) ) + if( (nNodeType == AnimationNodeType::SET) && aAttributeName == "fill.on" ) return false; const ImplAttributeNameConversion* p = gImplConversionList; @@ -967,7 +967,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any OUString aString; if( rValue >>= aString ) { - rValue <<= aString.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "solid" ) ) ? FillStyle_SOLID : FillStyle_NONE; + rValue <<= aString == "solid" ? FillStyle_SOLID : FillStyle_NONE; bRet = true; } } @@ -978,7 +978,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any OUString aString; if( rValue >>= aString ) { - rValue <<= aString.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "true" ) ) ? ::com::sun::star::drawing::LineStyle_SOLID : ::com::sun::star::drawing::LineStyle_NONE; + rValue <<= aString == "true" ? ::com::sun::star::drawing::LineStyle_SOLID : ::com::sun::star::drawing::LineStyle_NONE; bRet = true; } } @@ -989,7 +989,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any OUString aString; if( rValue >>= aString ) { - rValue <<= aString.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bold" ) ) ? com::sun::star::awt::FontWeight::BOLD : com::sun::star::awt::FontWeight::NORMAL; + rValue <<= aString == "bold" ? com::sun::star::awt::FontWeight::BOLD : com::sun::star::awt::FontWeight::NORMAL; bRet = true; } } @@ -1000,7 +1000,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any OUString aString; if( rValue >>= aString ) { - rValue <<= aString.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "italic" ) ) ? com::sun::star::awt::FontSlant_ITALIC : com::sun::star::awt::FontSlant_NONE; + rValue <<= aString == "italic" ? com::sun::star::awt::FontSlant_ITALIC : com::sun::star::awt::FontSlant_NONE; bRet = true; } } @@ -1011,7 +1011,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any OUString aString; if( rValue >>= aString ) { - rValue <<= aString.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "true" ) ) ? com::sun::star::awt::FontUnderline::SINGLE : com::sun::star::awt::FontUnderline::NONE; + rValue <<= aString == "true" ? com::sun::star::awt::FontUnderline::SINGLE : com::sun::star::awt::FontUnderline::NONE; bRet = true; } } @@ -1034,7 +1034,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any OUString aString; if( rValue >>= aString ) { - rValue <<= aString.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "visible" ) ) ? sal_True : sal_False; + rValue <<= aString == "visible" ? sal_True : sal_False; bRet = true; } } @@ -1679,7 +1679,7 @@ void AnimationImporter::importAnimateAttributeTargetContainer( const Atom* pAtom OUString aContext; if( aSet.getProperty( DFF_ANIM_RUNTIMECONTEXT ) >>= aContext ) { - if( !aContext.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("PPT") ) ) + if( aContext != "PPT" ) bWrongContext = true; } } diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 56c587b0a6c5..f2ec94b5b562 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1256,10 +1256,8 @@ static sal_Bool hasVisibleShape( const Reference< XShape >& xShape ) { const OUString sShapeType( xShape->getShapeType() ); - if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TitleTextShape") ) || - sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.OutlinerShape") ) || - sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.SubtitleShape") ) || - sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape") ) ) + if( sShapeType == "com.sun.star.presentation.TitleTextShape" || sShapeType == "com.sun.star.presentation.OutlinerShape" || + sShapeType == "com.sun.star.presentation.SubtitleShape" || sShapeType == "com.sun.star.drawing.TextShape" ) { const OUString sFillStyle( RTL_CONSTASCII_USTRINGPARAM("FillStyle" ) ); const OUString sLineStyle( RTL_CONSTASCII_USTRINGPARAM("LineStyle" ) ); diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 0d3adff367b2..9059672a99d1 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -258,9 +258,7 @@ void SAL_CALL AnnotationManagerImpl::disposing () // XEventListener void SAL_CALL AnnotationManagerImpl::notifyEvent( const ::com::sun::star::document::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException) { - if( aEvent.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnAnnotationInserted") ) || - aEvent.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnAnnotationRemoved") ) || - aEvent.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnAnnotationChanged" )) ) + if( aEvent.EventName == "OnAnnotationInserted" || aEvent.EventName == "OnAnnotationRemoved" || aEvent.EventName == "OnAnnotationChanged" ) { UpdateTags(); } diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 3e85d2384000..5384808b731b 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -798,9 +798,7 @@ bool SlideshowImpl::startPreview( const Sequence<OUString> supportedServices( xServiceInfo->getSupportedServiceNames() ); for ( sal_Int32 pos = supportedServices.getLength(); pos--; ) { - if (supportedServices[pos].equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "com.sun.star.drawing.MasterPage") )) { + if ( supportedServices[pos] == "com.sun.star.drawing.MasterPage" ) { OSL_FAIL("sd::SlideshowImpl::startPreview() " "not allowed on master page!"); return false; @@ -1355,8 +1353,7 @@ void SlideshowImpl::registerShapeEvents( Reference< XShapes >& xShapes ) throw( Reference< XShape > xShape; xShapes->getByIndex( nShape ) >>= xShape; - if( xShape.is() && - xShape->getShapeType().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape") ) ) + if( xShape.is() && xShape->getShapeType() == "com.sun.star.drawing.GroupShape" ) { Reference< XShapes > xSubShapes( xShape, UNO_QUERY ); if( xSubShapes.is() ) diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 2c4a9299698f..2263f8df1767 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -341,9 +341,7 @@ void TableDesignPane::onSelectionChanged() } Reference< XShapeDescriptor > xDesc( aSel, UNO_QUERY ); - if( xDesc.is() && - ( xDesc->getShapeType().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.TableShape" ) ) || - xDesc->getShapeType().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.TableShape" ) ) ) ) + if( xDesc.is() && ( xDesc->getShapeType() == "com.sun.star.drawing.TableShape" || xDesc->getShapeType() == "com.sun.star.presentation.TableShape" ) ) { xNewSelection = Reference< XPropertySet >::query( xDesc ); } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 3bf776a1102f..9190eb3ccc4c 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1158,19 +1158,15 @@ sal_Bool SAL_CALL SdXImpressDocument::supportsService( const OUString& ServiceNa { ::SolarMutexGuard aGuard; - if ( - (ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.OfficeDocument"))) || - (ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GenericDrawingDocument"))) || - (ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DrawingDocumentFactory"))) - ) + if ( ServiceName == "com.sun.star.document.OfficeDocument" + || ServiceName == "com.sun.star.drawing.GenericDrawingDocument" + || ServiceName == "com.sun.star.drawing.DrawingDocumentFactory" ) { return sal_True; } - return ( - ( mbImpressDoc && ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.PresentationDocument"))) || - (!mbImpressDoc && ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DrawingDocument"))) - ); + return ( ( mbImpressDoc && ServiceName == "com.sun.star.presentation.PresentationDocument" ) + || ( !mbImpressDoc && ServiceName == "com.sun.star.drawing.DrawingDocument" ) ); } uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getSupportedServiceNames() throw(uno::RuntimeException) |