summaryrefslogtreecommitdiff
path: root/oox/source
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 /oox/source
parent0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx3
-rw-r--r--oox/source/dump/dumperbase.cxx2
-rw-r--r--oox/source/dump/oledumper.cxx4
-rw-r--r--oox/source/export/ColorPropertySet.cxx2
-rw-r--r--oox/source/export/chartexport.cxx4
-rw-r--r--oox/source/ole/olehelper.cxx6
-rw-r--r--oox/source/ole/vbacontrol.cxx6
-rw-r--r--oox/source/ole/vbaproject.cxx2
-rw-r--r--oox/source/ppt/timenodelistcontext.cxx2
9 files changed, 14 insertions, 17 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 29a9cb9977df..cd64df06f60e 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -130,8 +130,7 @@ const std::vector<LayoutAtomPtr>& ConditionAtom::getChildren() const
{
bool bDecisionVar=true;
// HACK
- if( maCond.mnFunc==XML_var && maCond.mnArg==XML_dir &&
- maCond.mnOp==XML_equ && !maCond.msVal.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("norm")) )
+ if( maCond.mnFunc == XML_var && maCond.mnArg == XML_dir && maCond.mnOp == XML_equ && maCond.msVal != "norm" )
bDecisionVar=false;
if( bDecisionVar )
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index bcbdb41aedd2..2aaee5d286eb 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -953,7 +953,7 @@ ConfigItemBase::LineType ConfigItemBase::readConfigLine(
OUStringPair aPair = StringHelper::convertStringToPair( aLine );
orKey = aPair.first;
orData = aPair.second;
- return (!orKey.isEmpty() && (!orData.isEmpty() || !orKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "end" ) ))) ?
+ return ( !orKey.isEmpty() && (!orData.isEmpty() || orKey != "end" )) ?
LINETYPE_DATA : LINETYPE_END;
}
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index d400fe1dc99b..e38170219ee8 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -2157,7 +2157,7 @@ VbaStorageObject::VbaStorageObject( const ObjectBase& rParent, const StorageRef&
void VbaStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
{
- if( rStrgPath.isEmpty() && rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "dir" ) ) )
+ if( rStrgPath.isEmpty() && rStrmName == "dir" )
VbaDirStreamObject( *this, rxStrm, rSysFileName, mrVbaData ).dump();
else if( mrVbaData.isModuleStream( rStrmName ) )
VbaModuleStreamObject( *this, rxStrm, rSysFileName, mrVbaData, mrVbaData.getStreamOffset( rStrmName ) ).dump();
@@ -2191,7 +2191,7 @@ VbaProjectStorageObject::VbaProjectStorageObject( const ObjectBase& rParent, con
void VbaProjectStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
{
- if( rStrgPath.isEmpty() && rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PROJECT" ) ) )
+ if( rStrgPath.isEmpty() && rStrmName == "PROJECT" )
TextLineStreamObject( *this, rxStrm, maVbaData.meTextEnc, rSysFileName ).dump();
else
OleStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx
index eb10b35f4756..bdf60bb6327b 100644
--- a/oox/source/export/ColorPropertySet.cxx
+++ b/oox/source/export/ColorPropertySet.cxx
@@ -137,7 +137,7 @@ uno::Any SAL_CALL ColorPropertySet::getPropertyValue( const OUString& aPropertyN
lang::WrappedTargetException,
uno::RuntimeException)
{
- if( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FillStyle")) && m_bIsFillColor )
+ if( aPropertyName == "FillStyle" && m_bIsFillColor )
{
::com::sun::star::drawing::FillStyle aFillStyle = ::com::sun::star::drawing::FillStyle_SOLID;
return uno::makeAny(aFillStyle);
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 4283a48986a8..046c61126840 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -733,9 +733,7 @@ void ChartExport::_ExportContent()
// range string, as this is our only indicator for having own or
// external data. @todo: fix this in the file format!
Reference< lang::XServiceInfo > xDPServiceInfo( xNewDoc->getDataProvider(), uno::UNO_QUERY );
- if( ! (xDPServiceInfo.is() &&
- xDPServiceInfo->getImplementationName().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "com.sun.star.comp.chart.InternalDataProvider" ))))
+ if( ! (xDPServiceInfo.is() && xDPServiceInfo->getImplementationName() == "com.sun.star.comp.chart.InternalDataProvider" ))
{
bIncludeTable = sal_False;
}
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 191c74b024aa..dd9676ede726 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -339,7 +339,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
{
if( bWithGuid )
{
- bool bIsStdFont = importGuid( rInStrm ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(OLE_GUID_STDFONT));
+ bool bIsStdFont = importGuid( rInStrm ) == OLE_GUID_STDFONT;
OSL_ENSURE( bIsStdFont, "OleHelper::importStdFont - unexpected header GUID, expected StdFont" );
if( !bIsStdFont )
return false;
@@ -357,7 +357,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
{
if( bWithGuid )
{
- bool bIsStdPic = importGuid( rInStrm ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(OLE_GUID_STDPIC));
+ bool bIsStdPic = importGuid( rInStrm ) == OLE_GUID_STDPIC;
OSL_ENSURE( bIsStdPic, "OleHelper::importStdPic - unexpected header GUID, expected StdPic" );
if( !bIsStdPic )
return false;
@@ -374,7 +374,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
{
if( bWithGuid )
{
- bool bIsStdHlink = importGuid( rInStrm ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(OLE_GUID_STDHLINK));
+ bool bIsStdHlink = importGuid( rInStrm ) == OLE_GUID_STDHLINK;
OSL_ENSURE( bIsStdHlink, "OleHelper::importStdHlink - unexpected header GUID, expected StdHlink" );
if( !bIsStdHlink )
return false;
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 14768e12021a..9809b3ba5c5c 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -282,11 +282,11 @@ ControlModelRef VbaSiteModel::createControlModel( const AxClassTable& rClassTabl
OSL_ENSURE( pGuid, "VbaSiteModel::createControlModel - invalid class table index" );
if( pGuid )
{
- if( pGuid->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(COMCTL_GUID_SCROLLBAR_60)) )
+ if( *pGuid == COMCTL_GUID_SCROLLBAR_60 )
xCtrlModel.reset( new ComCtlScrollBarModel( 6 ) );
- else if( pGuid->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(COMCTL_GUID_PROGRESSBAR_50)) )
+ else if( *pGuid == COMCTL_GUID_PROGRESSBAR_50 )
xCtrlModel.reset( new ComCtlProgressBarModel( 5 ) );
- else if( pGuid->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(COMCTL_GUID_PROGRESSBAR_60)) )
+ else if( *pGuid == COMCTL_GUID_PROGRESSBAR_60 )
xCtrlModel.reset( new ComCtlProgressBarModel( 6 ) );
}
}
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index 19defae81a9a..0dfb1dc4a133 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -486,7 +486,7 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap
for( ::std::vector< OUString >::iterator aIt = aElements.begin(), aEnd = aElements.end(); aIt != aEnd; ++aIt )
{
// try to open the element as storage
- if( !aIt->equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VBA" ) ) )
+ if( *aIt != "VBA" )
{
StorageRef xSubStrg = rVbaPrjStrg.openSubStorage( *aIt, false );
if( xSubStrg.get() ) try
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index 486cfef0af8f..15a3cbbfba14 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -196,7 +196,7 @@ namespace oox { namespace ppt {
if( maTo >>= aString )
{
OSL_TRACE( "Magic conversion %s", OUSTRING_TO_CSTR( aString ) );
- maTo = makeAny( aString.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "visible" ) ) ? sal_True : sal_False );
+ maTo = makeAny( aString == "visible" ? sal_True : sal_False );
if( !maTo.has<sal_Bool>() )
OSL_TRACE( "conversion failed" );
}