summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 14:28:18 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 14:30:05 +0200
commit8a01ee624318ac08800af89d988971114637a04e (patch)
treee4acf35e42ab0c1d0b593bd8970fa2c435f90c95 /sc
parent6cf547f02c79278430ee75483a3128076cfc609e (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\) ) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/addinhelpid.cxx4
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx2
-rw-r--r--sc/source/ui/unoobj/celllistsource.cxx2
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx12
-rw-r--r--sc/source/ui/unoobj/docuno.cxx16
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx20
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx4
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx10
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx4
10 files changed, 38 insertions, 38 deletions
diff --git a/sc/source/core/tool/addinhelpid.cxx b/sc/source/core/tool/addinhelpid.cxx
index 10832d41ce6a..67bae51bcef2 100644
--- a/sc/source/core/tool/addinhelpid.cxx
+++ b/sc/source/core/tool/addinhelpid.cxx
@@ -169,12 +169,12 @@ void ScUnoAddInHelpIdGenerator::SetServiceName( const ::rtl::OUString& rServiceN
pCurrHelpIds = NULL;
sal_uInt32 nSize = 0;
- if( rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.addin.Analysis" ) ) )
+ if ( rServiceName == "com.sun.star.sheet.addin.Analysis" )
{
pCurrHelpIds = pAnalysisHelpIds;
nSize = sizeof( pAnalysisHelpIds );
}
- else if( rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.addin.DateFunctions" ) ) )
+ else if ( rServiceName == "com.sun.star.sheet.addin.DateFunctions" )
{
pCurrHelpIds = pDateFuncHelpIds;
nSize = sizeof( pDateFuncHelpIds );
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index d81881d202ed..5ef81a38a34a 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -807,7 +807,7 @@ bool ScOptSolverDlg::FindTimeout( sal_Int32& rTimeout )
for (sal_Int32 nProp=0; nProp<nPropCount && !bFound; ++nProp)
{
const beans::PropertyValue& rValue = maProperties[nProp];
- if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_TIMEOUT ) ) )
+ if ( rValue.Name == SC_UNONAME_TIMEOUT )
bFound = ( rValue.Value >>= rTimeout );
}
return bFound;
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index 54dbfce66149..bbc620a98381 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -372,7 +372,7 @@ namespace calc
NamedValue aValue;
if ( *pLoop >>= aValue )
{
- if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CellRange" ) ) )
+ if ( aValue.Name == "CellRange" )
{
if ( aValue.Value >>= aRangeAddress )
bFoundAddress = sal_True;
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index 4df865820c55..6ed9bec9d0c5 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -589,7 +589,7 @@ namespace calc
NamedValue aValue;
if ( *pLoop >>= aValue )
{
- if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BoundCell" ) ) )
+ if ( aValue.Name == "BoundCell" )
{
if ( aValue.Value >>= aAddress )
bFoundAddress = sal_True;
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 45a88e7a32ac..30a26fee657b 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -3442,11 +3442,11 @@ void SAL_CALL ScDataPilotItemObj::setPropertyValue( const OUString& aPropertyNam
if (pMember)
{
bool bGetNewIndex = false;
- if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_SHOWDETAIL ) ) )
+ if ( aPropertyName == SC_UNONAME_SHOWDETAIL )
pMember->SetShowDetails(cppu::any2bool(aValue));
- else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN ) ) )
+ else if ( aPropertyName == SC_UNONAME_ISHIDDEN )
pMember->SetIsVisible(!cppu::any2bool(aValue));
- else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_POS ) ) )
+ else if ( aPropertyName == SC_UNONAME_POS )
{
sal_Int32 nNewPos = 0;
if ( ( aValue >>= nNewPos ) && nNewPos >= 0 && nNewPos < nCount )
@@ -3492,7 +3492,7 @@ Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName
Reference< XNamed > xMember( xMembersIndex->getByIndex( mnIndex ), UNO_QUERY );
String sName( xMember->getName() );
ScDPSaveMember* pMember = pDim->GetExistingMemberByName( sName );
- if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_SHOWDETAIL ) ) )
+ if ( aPropertyName == SC_UNONAME_SHOWDETAIL )
{
if (pMember && pMember->HasShowDetails())
{
@@ -3507,7 +3507,7 @@ Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName
aRet <<= true;
}
}
- else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN ) ) )
+ else if ( aPropertyName == SC_UNONAME_ISHIDDEN )
{
if (pMember && pMember->HasIsVisible())
{
@@ -3522,7 +3522,7 @@ Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName
aRet <<= false;
}
}
- else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_POS ) ) )
+ else if ( aPropertyName == SC_UNONAME_POS )
{
aRet <<= mnIndex;
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 3ca264e036dd..030395c587e4 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -367,12 +367,12 @@ void ScPrintUIOptions::SetDefaults()
for (sal_Int32 nPropPos=0; nPropPos<aUIProp.getLength(); ++nPropPos)
{
rtl::OUString aName = aUIProp[nPropPos].Name;
- if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Property" ) ) )
+ if ( aName == "Property" )
{
beans::PropertyValue aPropertyValue;
if ( aUIProp[nPropPos].Value >>= aPropertyValue )
{
- if ( aPropertyValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintContent" ) ) )
+ if ( aPropertyValue.Name == "PrintContent" )
{
aPropertyValue.Value <<= nContent;
aUIProp[nPropPos].Value <<= aPropertyValue;
@@ -824,28 +824,28 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
for( sal_Int32 i = 0, nLen = rOptions.getLength(); i < nLen; i++ )
{
- if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsOnlySelectedSheets" ) ) )
+ if ( rOptions[i].Name == "IsOnlySelectedSheets" )
{
rOptions[i].Value >>= bSelectedSheetsOnly;
}
- else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsIncludeEmptyPages" ) ) )
+ else if ( rOptions[i].Name == "IsIncludeEmptyPages" )
{
rOptions[i].Value >>= bIncludeEmptyPages;
}
- else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageRange" ) ) )
+ else if ( rOptions[i].Name == "PageRange" )
{
rOptions[i].Value >>= aPageRange;
}
- else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintRange" ) ) )
+ else if ( rOptions[i].Name == "PrintRange" )
{
rOptions[i].Value >>= nPrintRange;
}
- else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintContent" ) ) )
+ else if ( rOptions[i].Name == "PrintContent" )
{
bHasPrintContent = true;
rOptions[i].Value >>= nPrintContent;
}
- else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "View" ) ) )
+ else if ( rOptions[i].Name == "View" )
{
rOptions[i].Value >>= xView;
}
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index d4b2461e1d25..a2b135bff15d 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -300,12 +300,12 @@ void SAL_CALL ScTableConditionalFormat::addNew(
{
const beans::PropertyValue& rProp = pPropArray[i];
- if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_OPERATOR ) ) )
+ if ( rProp.Name == SC_UNONAME_OPERATOR )
{
sal_Int32 eOper = ScUnoHelpFunctions::GetEnumFromAny( rProp.Value );
aEntry.meMode = lcl_ConditionOperatorToModeNew( eOper );
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_FORMULA1 ) ) )
+ else if ( rProp.Name == SC_UNONAME_FORMULA1 )
{
rtl::OUString aStrVal;
uno::Sequence<sheet::FormulaToken> aTokens;
@@ -317,7 +317,7 @@ void SAL_CALL ScTableConditionalFormat::addNew(
aEntry.maTokens1 = aTokens;
}
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_FORMULA2 ) ) )
+ else if ( rProp.Name == SC_UNONAME_FORMULA2 )
{
rtl::OUString aStrVal;
uno::Sequence<sheet::FormulaToken> aTokens;
@@ -329,44 +329,44 @@ void SAL_CALL ScTableConditionalFormat::addNew(
aEntry.maTokens2 = aTokens;
}
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_SOURCEPOS ) ) )
+ else if ( rProp.Name == SC_UNONAME_SOURCEPOS )
{
table::CellAddress aAddress;
if ( rProp.Value >>= aAddress )
aEntry.maPos = ScAddress( (SCCOL)aAddress.Column, (SCROW)aAddress.Row, aAddress.Sheet );
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_SOURCESTR ) ) )
+ else if ( rProp.Name == SC_UNONAME_SOURCESTR )
{
rtl::OUString aStrVal;
if ( rProp.Value >>= aStrVal )
aEntry.maPosStr = String( aStrVal );
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_STYLENAME ) ) )
+ else if ( rProp.Name == SC_UNONAME_STYLENAME )
{
rtl::OUString aStrVal;
if ( rProp.Value >>= aStrVal )
aEntry.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName(
aStrVal, SFX_STYLE_FAMILY_PARA );
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_FORMULANMSP1 ) ) )
+ else if ( rProp.Name == SC_UNONAME_FORMULANMSP1 )
{
rtl::OUString aStrVal;
if ( rProp.Value >>= aStrVal )
aEntry.maExprNmsp1 = aStrVal;
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_FORMULANMSP2 ) ) )
+ else if ( rProp.Name == SC_UNONAME_FORMULANMSP2 )
{
rtl::OUString aStrVal;
if ( rProp.Value >>= aStrVal )
aEntry.maExprNmsp2 = aStrVal;
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_GRAMMAR1 ) ) )
+ else if ( rProp.Name == SC_UNONAME_GRAMMAR1 )
{
sal_Int32 nVal = 0;
if ( rProp.Value >>= nVal )
aEntry.meGrammar1 = static_cast< FormulaGrammar::Grammar >( nVal );
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_GRAMMAR2 ) ) )
+ else if ( rProp.Name == SC_UNONAME_GRAMMAR2 )
{
sal_Int32 nVal = 0;
if ( rProp.Value >>= nVal )
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index f162a756551c..13c63979008b 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -313,7 +313,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue(
{
SolarMutexGuard aGuard;
- if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsArrayFunction" ) ) )
+ if ( aPropertyName == "IsArrayFunction" )
{
if( !(aValue >>= mbArray) )
throw lang::IllegalArgumentException();
@@ -337,7 +337,7 @@ uno::Any SAL_CALL ScFunctionAccess::getPropertyValue( const rtl::OUString& aProp
{
SolarMutexGuard aGuard;
- if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsArrayFunction" ) ) )
+ if ( aPropertyName == "IsArrayFunction" )
return uno::Any( mbArray );
if ( !pOptions )
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 5158394febd3..9119c1ee1af0 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -396,7 +396,7 @@ void SAL_CALL ScNamedRangeObj::setPropertyValue(
uno::RuntimeException)
{
SolarMutexGuard aGuard;
- if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISSHAREDFMLA ) ) )
+ if ( rPropertyName == SC_UNONAME_ISSHAREDFMLA )
{
bool bIsShared = false;
if( aValue >>= bIsShared )
@@ -413,21 +413,21 @@ uno::Any SAL_CALL ScNamedRangeObj::getPropertyValue( const rtl::OUString& rPrope
{
SolarMutexGuard aGuard;
uno::Any aRet;
- if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNO_LINKDISPBIT ) ) )
+ if ( rPropertyName == SC_UNO_LINKDISPBIT )
{
// no target bitmaps for individual entries (would be all equal)
// ScLinkTargetTypeObj::SetLinkTargetBitmap( aRet, SC_LINKTARGETTYPE_RANGENAME );
}
- else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNO_LINKDISPNAME ) ) )
+ else if ( rPropertyName == SC_UNO_LINKDISPNAME )
aRet <<= rtl::OUString( aName );
- else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_TOKENINDEX ) ) )
+ else if ( rPropertyName == SC_UNONAME_TOKENINDEX )
{
// get index for use in formula tokens (read-only)
ScRangeData* pData = GetRangeData_Impl();
if (pData)
aRet <<= static_cast<sal_Int32>(pData->GetIndex());
}
- else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISSHAREDFMLA ) ) )
+ else if ( rPropertyName == SC_UNONAME_ISSHAREDFMLA )
{
if( ScRangeData* pData = GetRangeData_Impl() )
aRet <<= static_cast< bool >( pData->HasType( RT_SHARED ) );
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 09b665519106..63d8a140fbaa 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1463,7 +1463,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
case ATTR_PAGE_SCALETO:
{
const ScPageScaleToItem aItem((const ScPageScaleToItem&)pItemSet->Get(nWhich));
- if (aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SC_UNO_PAGE_SCALETOX )))
+ if ( aPropertyName == SC_UNO_PAGE_SCALETOX )
aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetWidth()));
else
aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetHeight()));
@@ -1843,7 +1843,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
rtl::OUString aName;
if ( *pValue >>= aName )
{
- if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_PAPERBIN_DEFAULTNAME ) ) )
+ if ( aName == SC_PAPERBIN_DEFAULTNAME )
bFound = sal_True;
else
{