summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 14:09:04 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-04-08 19:24:00 +0200
commite4fb171d3ad15ae9abbc93d9db956674498c9dd5 (patch)
tree6d297c3054a7de5a8baee08db9237d0f01fffb52 /sw/source
parent8e5318b0b971580f8dabecc1318c74e799e84d53 (diff)
Replaced a few equal calls with ==
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unobkm.cxx4
-rw-r--r--sw/source/core/unocore/unocoll.cxx2
-rw-r--r--sw/source/core/unocore/unodraw.cxx14
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/filter/xml/wrtxml.cxx4
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx4
6 files changed, 13 insertions, 17 deletions
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;
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index fe1395e5f700..ec13da0a2a09 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -365,9 +365,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
if ( xModule.is() )
{
::rtl::OUString aModuleID = xModule->getIdentifier();
- bStoreMeta = ( !aModuleID.isEmpty()
- && ( aModuleID.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.FormDesign" ) ) )
- || aModuleID.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.TextReportDesign" ) ) ) ) );
+ bStoreMeta = ( !aModuleID.isEmpty() && ( aModuleID == "com.sun.star.sdb.FormDesign" || aModuleID == "com.sun.star.sdb.TextReportDesign" ) );
}
}
catch( uno::Exception& )
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index 6dfcc14b99bb..b934aacdd638 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -95,7 +95,7 @@ public:
}
virtual uno::Any getPropertyValue( const rtl::OUString& rPropName )
{
- if ( rPropName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("EditingDuration" ) ) ) )
+ if ( rPropName == "EditingDuration" )
{
sal_Int32 nSecs = 0;
mxProps->getPropertyValue( rPropName ) >>= nSecs;
@@ -143,7 +143,7 @@ public:
OSL_TRACE("Got exception");
}
uno::Any aReturn;
- if ( rPropName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineCount")) ) ) // special processing needed
+ if ( rPropName == "LineCount" ) // special processing needed
{
if ( mpDocShell )
{