From e4fb171d3ad15ae9abbc93d9db956674498c9dd5 Mon Sep 17 00:00:00 2001 From: Szabolcs Dezsi Date: Fri, 6 Apr 2012 14:09:04 +0200 Subject: Replaced a few equal calls with == --- sw/source/core/unocore/unobkm.cxx | 4 ++-- sw/source/core/unocore/unocoll.cxx | 2 +- sw/source/core/unocore/unodraw.cxx | 14 ++++++-------- sw/source/core/unocore/unotbl.cxx | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) (limited to 'sw/source/core') diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index f54775e48d83..d20a5f38a0e6 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -704,7 +704,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, uno::RuntimeException) { SolarMutexGuard g; - if ( PropertyName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Checked") ) ) ) + if ( PropertyName == "Checked" ) { ::sw::mark::ICheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark(); sal_Bool bChecked( sal_False ); @@ -726,7 +726,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { SolarMutexGuard g; - if ( rPropertyName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Checked") ) ) ) + if ( rPropertyName == "Checked" ) { ::sw::mark::ICheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark(); if ( pCheckboxFm ) diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index a8c34d6ace35..1aa58f0ecb98 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -258,7 +258,7 @@ public: { // #FIXME #TODO we really need to be checking against the codename for // ThisDocument - if ( aName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisDocument" ) ) ) ) + if ( aName == "ThisDocument" ) return sal_True; return sal_False; } diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index ea498424276a..662a8ff7756e 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1440,8 +1440,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A // Thus, keep the position, before the caption point is set and // restore it afterwards. awt::Point aKeepedPosition( 0, 0 ); - if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CaptionPoint"))) && - getShapeType().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape"))) ) + if ( rPropertyName == "CaptionPoint" && getShapeType() == "com.sun.star.drawing.CaptionShape" ) { aKeepedPosition = getPosition(); } @@ -1453,8 +1452,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A else xPrSet->setPropertyValue(rPropertyName, aValue); // #i31698# - restore object position, if caption point is set. - if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CaptionPoint"))) && - getShapeType().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape"))) ) + if ( rPropertyName == "CaptionPoint" && getShapeType() == "com.sun.star.drawing.CaptionShape" ) { setPosition( aKeepedPosition ); } @@ -1649,21 +1647,21 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) // #i31698# - convert the position (translation) // of the drawing object in the transformation - if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation"))) ) + if ( rPropertyName == "Transformation" ) { drawing::HomogenMatrix3 aMatrix; aRet >>= aMatrix; aRet <<= _ConvertTransformationToLayoutDir( aMatrix ); } // #i36248# - else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) ) + else if ( rPropertyName == "StartPosition" ) { awt::Point aStartPos; aRet >>= aStartPos; // #i59051# aRet <<= _ConvertStartOrEndPosToLayoutDir( aStartPos ); } - else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) ) + else if ( rPropertyName == "EndPosition" ) { awt::Point aEndPos; aRet >>= aEndPos; @@ -1671,7 +1669,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) aRet <<= _ConvertStartOrEndPosToLayoutDir( aEndPos ); } // #i59051# - else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier"))) ) + else if ( rPropertyName == "PolyPolygonBezier" ) { drawing::PolyPolygonBezierCoords aPath; aRet >>= aPath; diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index cf02450203a5..b8ce6f3f751f 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1047,7 +1047,7 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV if(IsValid()) { // Hack to support hidden property to transfer textDirection - if ( rPropertyName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FRMDirection") ) ) ) + if ( rPropertyName == "FRMDirection" ) { SvxFrameDirection eDir = FRMDIR_ENVIRONMENT; sal_Int16 nNum = 0; -- cgit v1.2.3