summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-15 10:14:25 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-15 10:14:25 +0100
commitac97f3388dadfe0127ee2b5c97ccadfb9dd64f39 (patch)
tree22bb2161b60a5b5b58d0d926f76cc657cd858010 /sc
parentreportdesign: Use appropriate OUString functions on string constants (diff)
downloadcore-ac97f3388dadfe0127ee2b5c97ccadfb9dd64f39.tar.gz
core-ac97f3388dadfe0127ee2b5c97ccadfb9dd64f39.zip
sc: Use appropriate OUString functions on string constants
Change-Id: Ib4c0df8d7637bff7d7a45d24482fff4342169fae
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/editutil.hxx2
-rw-r--r--sc/inc/miscuno.hxx4
-rw-r--r--sc/qa/unit/ucalc_pivottable.cxx26
-rw-r--r--sc/source/core/data/dptabsrc.cxx110
-rw-r--r--sc/source/core/tool/chgtrack.cxx14
-rw-r--r--sc/source/core/tool/compiler.cxx4
-rw-r--r--sc/source/core/tool/editutil.cxx4
-rw-r--r--sc/source/core/tool/interpr1.cxx28
-rw-r--r--sc/source/core/tool/interpr5.cxx10
-rw-r--r--sc/source/core/tool/rangeutl.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx2
-rw-r--r--sc/source/filter/excel/xihelper.cxx2
-rw-r--r--sc/source/filter/xml/xmldrani.cxx4
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx24
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx47
-rw-r--r--sc/source/filter/xml/xmlsorti.cxx4
-rw-r--r--sc/source/ui/app/inputhdl.cxx11
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx8
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/imoptdlg.cxx6
-rw-r--r--sc/source/ui/docshell/docsh.cxx83
-rw-r--r--sc/source/ui/docshell/servobj.cxx6
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx2
-rw-r--r--sc/source/ui/undo/undodat.cxx2
-rw-r--r--sc/source/ui/unoobj/addruno.cxx20
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx24
-rw-r--r--sc/source/ui/unoobj/appluno.cxx72
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx8
-rw-r--r--sc/source/ui/unoobj/confuno.cxx120
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx112
-rw-r--r--sc/source/ui/unoobj/datauno.cxx150
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx8
-rw-r--r--sc/source/ui/unoobj/docuno.cxx146
-rw-r--r--sc/source/ui/unoobj/eventuno.cxx6
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx12
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx50
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx40
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx40
-rw-r--r--sc/source/ui/unoobj/srchuno.cxx52
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx12
-rw-r--r--sc/source/ui/unoobj/targuno.cxx4
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx24
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx94
-rw-r--r--sc/source/ui/vba/vbachartobject.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx4
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
-rw-r--r--sc/source/ui/view/viewdata.cxx90
47 files changed, 742 insertions, 759 deletions
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index 142650fa9fa1..3b9b53a40d0e 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -47,8 +47,6 @@ class ScEditUtil
Fraction aZoomX;
Fraction aZoomY;
- static const char pCalcDelimiters[];
-
public:
static OUString ModifyDelimiters( const OUString& rOld );
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index e1fd07c32acf..38e57f190634 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -34,7 +34,7 @@
OUString SAL_CALL ClassName::getImplementationName() \
throw(::com::sun::star::uno::RuntimeException, std::exception) \
{ \
- return OUString::createFromAscii(ClassNameAscii); \
+ return OUString(ClassNameAscii); \
} \
sal_Bool SAL_CALL ClassName::supportsService( const OUString& ServiceName ) \
throw(::com::sun::star::uno::RuntimeException, std::exception) \
@@ -47,7 +47,7 @@ sal_Bool SAL_CALL ClassName::supportsService( const OUString& ServiceName ) \
{ \
::com::sun::star::uno::Sequence< OUString > aRet(1); \
OUString* pArray = aRet.getArray(); \
- pArray[0] = OUString::createFromAscii(ServiceAscii); \
+ pArray[0] = ServiceAscii; \
return aRet; \
}
diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index ef24b4959a63..2e31241268b7 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -775,11 +775,11 @@ void Test::testPivotTableCache()
long nDimCount = aCache.GetColumnCount();
CPPUNIT_ASSERT_MESSAGE("wrong dimension count.", nDimCount == 3);
OUString aDimName = aCache.GetDimensionName(0);
- CPPUNIT_ASSERT_MESSAGE("wrong dimension name", aDimName.equalsAscii("F1"));
+ CPPUNIT_ASSERT_MESSAGE("wrong dimension name", aDimName == "F1");
aDimName = aCache.GetDimensionName(1);
- CPPUNIT_ASSERT_MESSAGE("wrong dimension name", aDimName.equalsAscii("F2"));
+ CPPUNIT_ASSERT_MESSAGE("wrong dimension name", aDimName == "F2");
aDimName = aCache.GetDimensionName(2);
- CPPUNIT_ASSERT_MESSAGE("wrong dimension name", aDimName.equalsAscii("F3"));
+ CPPUNIT_ASSERT_MESSAGE("wrong dimension name", aDimName == "F3");
// In each dimension, member ID values also represent their sort order (in
// source dimensions only, not in group dimensions). Value items are
@@ -796,23 +796,23 @@ void Test::testPivotTableCache()
pItem = aCache.GetItemDataById(0, 1);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
- pItem->GetString().equalsAscii("A"));
+ pItem->GetString() == "A");
pItem = aCache.GetItemDataById(0, 2);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
- pItem->GetString().equalsAscii("F"));
+ pItem->GetString() == "F");
pItem = aCache.GetItemDataById(0, 3);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
- pItem->GetString().equalsAscii("R"));
+ pItem->GetString() == "R");
pItem = aCache.GetItemDataById(0, 4);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
- pItem->GetString().equalsAscii("Y"));
+ pItem->GetString() == "Y");
pItem = aCache.GetItemDataById(0, 5);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
- pItem->GetString().equalsAscii("Z"));
+ pItem->GetString() == "Z");
pItem = aCache.GetItemDataById(0, 6);
CPPUNIT_ASSERT_MESSAGE("wrong item value", !pItem);
@@ -822,15 +822,15 @@ void Test::testPivotTableCache()
pItem = aCache.GetItemDataById(1, 0);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
- pItem->GetString().equalsAscii("A"));
+ pItem->GetString() == "A");
pItem = aCache.GetItemDataById(1, 1);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
- pItem->GetString().equalsAscii("B"));
+ pItem->GetString() == "B");
pItem = aCache.GetItemDataById(1, 2);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
- pItem->GetString().equalsAscii("C"));
+ pItem->GetString() == "C");
pItem = aCache.GetItemDataById(1, 3);
CPPUNIT_ASSERT_MESSAGE("wrong item value", !pItem);
@@ -1104,7 +1104,7 @@ void Test::testPivotTableNormalGrouping()
// Group A, B and C together.
ScDPSaveGroupDimension aGroupDim(aBaseDimName, aGroupDimName);
OUString aGroupName = aGroupDim.CreateGroupName(aGroupPrefix);
- CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName.equalsAscii("Group1"));
+ CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName == "Group1");
ScDPSaveGroupItem aGroup(aGroupName);
aGroup.AddElement(OUString("A"));
@@ -1146,7 +1146,7 @@ void Test::testPivotTableNormalGrouping()
ScDPSaveGroupDimension* pGroupDim = pDimData->GetGroupDimAccForBase(aBaseDimName);
CPPUNIT_ASSERT_MESSAGE("There should be an existing group dimension.", pGroupDim);
OUString aGroupName = pGroupDim->CreateGroupName(aGroupPrefix);
- CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName.equalsAscii("Group2"));
+ CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName == "Group2");
ScDPSaveGroupItem aGroup(aGroupName);
aGroup.AddElement(OUString("D"));
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 95d221ec47a0..d45f235d975c 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1143,15 +1143,15 @@ void SAL_CALL ScDPSource::setPropertyValue( const OUString& aPropertyName, const
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException, std::exception)
{
- if (aPropertyName.equalsAscii(SC_UNO_DP_COLGRAND))
+ if (aPropertyName == SC_UNO_DP_COLGRAND)
bColumnGrand = lcl_GetBoolFromAny(aValue);
- else if (aPropertyName.equalsAscii(SC_UNO_DP_ROWGRAND))
+ else if (aPropertyName == SC_UNO_DP_ROWGRAND)
bRowGrand = lcl_GetBoolFromAny(aValue);
- else if (aPropertyName.equalsAscii(SC_UNO_DP_IGNOREEMPTY))
+ else if (aPropertyName == SC_UNO_DP_IGNOREEMPTY)
setIgnoreEmptyRows( lcl_GetBoolFromAny( aValue ) );
- else if (aPropertyName.equalsAscii(SC_UNO_DP_REPEATEMPTY))
+ else if (aPropertyName == SC_UNO_DP_REPEATEMPTY)
setRepeatIfEmpty( lcl_GetBoolFromAny( aValue ) );
- else if (aPropertyName.equalsAscii(SC_UNO_DP_GRANDTOTAL_NAME))
+ else if (aPropertyName == SC_UNO_DP_GRANDTOTAL_NAME)
{
OUString aName;
if (aValue >>= aName)
@@ -1169,23 +1169,23 @@ uno::Any SAL_CALL ScDPSource::getPropertyValue( const OUString& aPropertyName )
uno::RuntimeException, std::exception)
{
uno::Any aRet;
- if ( aPropertyName.equalsAscii( SC_UNO_DP_COLGRAND ) )
+ if ( aPropertyName == SC_UNO_DP_COLGRAND )
lcl_SetBoolInAny(aRet, bColumnGrand);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_ROWGRAND ) )
+ else if ( aPropertyName == SC_UNO_DP_ROWGRAND )
lcl_SetBoolInAny(aRet, bRowGrand);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_IGNOREEMPTY ) )
+ else if ( aPropertyName == SC_UNO_DP_IGNOREEMPTY )
lcl_SetBoolInAny(aRet, bIgnoreEmptyRows);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_REPEATEMPTY ) )
+ else if ( aPropertyName == SC_UNO_DP_REPEATEMPTY )
lcl_SetBoolInAny(aRet, bRepeatIfEmpty);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_DATADESC ) ) // read-only
+ else if ( aPropertyName == SC_UNO_DP_DATADESC ) // read-only
aRet <<= getDataDescription();
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_ROWFIELDCOUNT ) ) // read-only
+ else if ( aPropertyName == SC_UNO_DP_ROWFIELDCOUNT ) // read-only
aRet <<= static_cast<sal_Int32>(maRowDims.size());
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_COLUMNFIELDCOUNT ) ) // read-only
+ else if ( aPropertyName == SC_UNO_DP_COLUMNFIELDCOUNT ) // read-only
aRet <<= static_cast<sal_Int32>(maColDims.size());
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_DATAFIELDCOUNT ) ) // read-only
+ else if ( aPropertyName == SC_UNO_DP_DATAFIELDCOUNT ) // read-only
aRet <<= static_cast<sal_Int32>(maDataDims.size());
- else if (aPropertyName.equalsAscii(SC_UNO_DP_GRANDTOTAL_NAME))
+ else if (aPropertyName == SC_UNO_DP_GRANDTOTAL_NAME)
{
if (mpGrandTotalName.get())
aRet <<= *mpGrandTotalName;
@@ -1525,27 +1525,27 @@ void SAL_CALL ScDPDimension::setPropertyValue( const OUString& aPropertyName, co
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException, std::exception)
{
- if ( aPropertyName.equalsAscii( SC_UNO_DP_USEDHIERARCHY ) )
+ if ( aPropertyName == SC_UNO_DP_USEDHIERARCHY )
{
sal_Int32 nInt = 0;
if (aValue >>= nInt)
setUsedHierarchy( nInt );
}
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_ORIENTATION ) )
+ else if ( aPropertyName == SC_UNO_DP_ORIENTATION )
{
sheet::DataPilotFieldOrientation eEnum;
if (aValue >>= eEnum)
setOrientation( sal::static_int_cast<sal_uInt16>(eEnum) );
}
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_FUNCTION ) )
+ else if ( aPropertyName == SC_UNO_DP_FUNCTION )
{
sheet::GeneralFunction eEnum;
if (aValue >>= eEnum)
setFunction( sal::static_int_cast<sal_uInt16>(eEnum) );
}
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_REFVALUE ) )
+ else if ( aPropertyName == SC_UNO_DP_REFVALUE )
aValue >>= aReferenceValue;
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_FILTER ) )
+ else if ( aPropertyName == SC_UNO_DP_FILTER )
{
bool bDone = false;
uno::Sequence<sheet::TableFilterField> aSeq;
@@ -1576,19 +1576,19 @@ void SAL_CALL ScDPDimension::setPropertyValue( const OUString& aPropertyName, co
}
DELETEZ( pSelectedData ); // invalid after changing aSelectedPage
}
- else if (aPropertyName.equalsAscii(SC_UNO_DP_LAYOUTNAME))
+ else if (aPropertyName == SC_UNO_DP_LAYOUTNAME)
{
OUString aTmpName;
if (aValue >>= aTmpName)
mpLayoutName.reset(new OUString(aTmpName));
}
- else if (aPropertyName.equalsAscii(SC_UNO_DP_FIELD_SUBTOTALNAME))
+ else if (aPropertyName == SC_UNO_DP_FIELD_SUBTOTALNAME)
{
OUString aTmpName;
if (aValue >>= aTmpName)
mpSubtotalName.reset(new OUString(aTmpName));
}
- else if (aPropertyName.equalsAscii(SC_UNO_DP_HAS_HIDDEN_MEMBER))
+ else if (aPropertyName == SC_UNO_DP_HAS_HIDDEN_MEMBER)
{
bool b = false;
aValue >>= b;
@@ -1606,25 +1606,25 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const OUString& aPropertyName
uno::RuntimeException, std::exception)
{
uno::Any aRet;
- if ( aPropertyName.equalsAscii( SC_UNO_DP_POSITION ) )
+ if ( aPropertyName == SC_UNO_DP_POSITION )
aRet <<= (sal_Int32) getPosition();
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_USEDHIERARCHY ) )
+ else if ( aPropertyName == SC_UNO_DP_USEDHIERARCHY )
aRet <<= (sal_Int32) getUsedHierarchy();
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_ORIENTATION ) )
+ else if ( aPropertyName == SC_UNO_DP_ORIENTATION )
{
sheet::DataPilotFieldOrientation eVal = (sheet::DataPilotFieldOrientation)getOrientation();
aRet <<= eVal;
}
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_FUNCTION ) )
+ else if ( aPropertyName == SC_UNO_DP_FUNCTION )
{
sheet::GeneralFunction eVal = (sheet::GeneralFunction)getFunction();
aRet <<= eVal;
}
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_REFVALUE ) )
+ else if ( aPropertyName == SC_UNO_DP_REFVALUE )
aRet <<= aReferenceValue;
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_ISDATALAYOUT ) ) // read-only properties
+ else if ( aPropertyName == SC_UNO_DP_ISDATALAYOUT ) // read-only properties
lcl_SetBoolInAny( aRet, getIsDataLayoutDimension() );
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_NUMBERFO ) )
+ else if ( aPropertyName == SC_UNO_DP_NUMBERFO )
{
sal_Int32 nFormat = 0;
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)getFunction();
@@ -1650,19 +1650,19 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const OUString& aPropertyName
aRet <<= nFormat;
}
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_ORIGINAL ) )
+ else if ( aPropertyName == SC_UNO_DP_ORIGINAL )
{
uno::Reference<container::XNamed> xOriginal;
if (nSourceDim >= 0)
xOriginal = pSource->GetDimensionsObject()->getByIndex(nSourceDim);
aRet <<= xOriginal;
}
- else if (aPropertyName.equalsAscii(SC_UNO_DP_ORIGINAL_POS))
+ else if (aPropertyName == SC_UNO_DP_ORIGINAL_POS)
{
sal_Int32 nPos = static_cast<sal_Int32>(nSourceDim);
aRet <<= nPos;
}
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_FILTER ) )
+ else if ( aPropertyName == SC_UNO_DP_FILTER )
{
if ( bHasSelectedPage )
{
@@ -1674,13 +1674,13 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const OUString& aPropertyName
else
aRet <<= uno::Sequence<sheet::TableFilterField>(0);
}
- else if (aPropertyName.equalsAscii(SC_UNO_DP_LAYOUTNAME))
+ else if (aPropertyName == SC_UNO_DP_LAYOUTNAME)
aRet <<= mpLayoutName.get() ? *mpLayoutName : OUString("");
- else if (aPropertyName.equalsAscii(SC_UNO_DP_FIELD_SUBTOTALNAME))
+ else if (aPropertyName == SC_UNO_DP_FIELD_SUBTOTALNAME)
aRet <<= mpSubtotalName.get() ? *mpSubtotalName : OUString("");
- else if (aPropertyName.equalsAscii(SC_UNO_DP_HAS_HIDDEN_MEMBER))
+ else if (aPropertyName == SC_UNO_DP_HAS_HIDDEN_MEMBER)
aRet <<= mbHasHiddenMember;
- else if (aPropertyName.equalsAscii(SC_UNO_DP_FLAGS))
+ else if (aPropertyName == SC_UNO_DP_FLAGS)
{
sal_Int32 nFlags = 0; // tabular data: all orientations are possible
aRet <<= nFlags;
@@ -2216,15 +2216,15 @@ void SAL_CALL ScDPLevel::setPropertyValue( const OUString& aPropertyName, const
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException, std::exception)
{
- if ( aPropertyName.equalsAscii( SC_UNO_DP_SHOWEMPTY ) )
+ if ( aPropertyName == SC_UNO_DP_SHOWEMPTY )
bShowEmpty = lcl_GetBoolFromAny(aValue);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_SUBTOTAL ) )
+ else if ( aPropertyName == SC_UNO_DP_SUBTOTAL )
aValue >>= aSubTotals;
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_SORTING ) )
+ else if ( aPropertyName == SC_UNO_DP_SORTING )
aValue >>= aSortInfo;
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_AUTOSHOW ) )
+ else if ( aPropertyName == SC_UNO_DP_AUTOSHOW )
aValue >>= aAutoShowInfo;
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_LAYOUT ) )
+ else if ( aPropertyName == SC_UNO_DP_LAYOUT )
aValue >>= aLayoutInfo;
else
{
@@ -2237,20 +2237,20 @@ uno::Any SAL_CALL ScDPLevel::getPropertyValue( const OUString& aPropertyName )
uno::RuntimeException, std::exception)
{
uno::Any aRet;
- if ( aPropertyName.equalsAscii( SC_UNO_DP_SHOWEMPTY ) )
+ if ( aPropertyName == SC_UNO_DP_SHOWEMPTY )
lcl_SetBoolInAny(aRet, bShowEmpty);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_SUBTOTAL ) )
+ else if ( aPropertyName == SC_UNO_DP_SUBTOTAL )
{
uno::Sequence<sheet::GeneralFunction> aSeq = getSubTotals(); //! avoid extra copy?
aRet <<= aSeq;
}
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_SORTING ) )
+ else if ( aPropertyName == SC_UNO_DP_SORTING )
aRet <<= aSortInfo;
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_AUTOSHOW ) )
+ else if ( aPropertyName == SC_UNO_DP_AUTOSHOW )
aRet <<= aAutoShowInfo;
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_LAYOUT ) )
+ else if ( aPropertyName == SC_UNO_DP_LAYOUT )
aRet <<= aLayoutInfo;
- else if (aPropertyName.equalsAscii(SC_UNO_DP_LAYOUTNAME))
+ else if (aPropertyName == SC_UNO_DP_LAYOUTNAME)
{
// read only property
long nSrcDim = pSource->GetSourceDim(nDim);
@@ -2660,13 +2660,13 @@ void SAL_CALL ScDPMember::setPropertyValue( const OUString& aPropertyName, const
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException, std::exception)
{
- if ( aPropertyName.equalsAscii( SC_UNO_DP_ISVISIBLE ) )
+ if ( aPropertyName == SC_UNO_DP_ISVISIBLE )
bVisible = lcl_GetBoolFromAny(aValue);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_SHOWDETAILS ) )
+ else if ( aPropertyName == SC_UNO_DP_SHOWDETAILS )
bShowDet = lcl_GetBoolFromAny(aValue);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_POSITION ) )
+ else if ( aPropertyName == SC_UNO_DP_POSITION )
aValue >>= nPosition;
- else if (aPropertyName.equalsAscii(SC_UNO_DP_LAYOUTNAME))
+ else if (aPropertyName == SC_UNO_DP_LAYOUTNAME)
{
OUString aName;
if (aValue >>= aName)
@@ -2683,13 +2683,13 @@ uno::Any SAL_CALL ScDPMember::getPropertyValue( const OUString& aPropertyName )
uno::RuntimeException, std::exception)
{
uno::Any aRet;
- if ( aPropertyName.equalsAscii( SC_UNO_DP_ISVISIBLE ) )
+ if ( aPropertyName == SC_UNO_DP_ISVISIBLE )
lcl_SetBoolInAny(aRet, bVisible);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_SHOWDETAILS ) )
+ else if ( aPropertyName == SC_UNO_DP_SHOWDETAILS )
lcl_SetBoolInAny(aRet, bShowDet);
- else if ( aPropertyName.equalsAscii( SC_UNO_DP_POSITION ) )
+ else if ( aPropertyName == SC_UNO_DP_POSITION )
aRet <<= nPosition;
- else if (aPropertyName.equalsAscii(SC_UNO_DP_LAYOUTNAME))
+ else if (aPropertyName == SC_UNO_DP_LAYOUTNAME)
aRet <<= mpLayoutName.get() ? *mpLayoutName : OUString();
else
{
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index a2d080cf6e43..18006ac0d452 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -714,7 +714,7 @@ void ScChangeActionIns::GetDescription(
}
OUString aRsc = ScGlobal::GetRscString(STR_CHANGED_INSERT);
- sal_Int32 nPos = aRsc.indexOfAsciiL("#1", 2);
+ sal_Int32 nPos = aRsc.indexOf("#1");
if (nPos >= 0)
{
// Construct a range string to replace '#1' first.
@@ -965,7 +965,7 @@ void ScChangeActionDel::GetDescription(
}
OUString aRsc = ScGlobal::GetRscString(STR_CHANGED_DELETE);
- sal_Int32 nPos = aRsc.indexOfAsciiL("#1", 2);
+ sal_Int32 nPos = aRsc.indexOf("#1");
if (nPos >= 0)
{
// Build a string to replace with.
@@ -1195,7 +1195,7 @@ void ScChangeActionMove::GetDescription(
OUString aRsc = ScGlobal::GetRscString(STR_CHANGED_MOVE);
OUString aTmpStr = ScChangeAction::GetRefString(GetFromRange(), pDoc, bFlag3D);
- sal_Int32 nPos = aRsc.indexOfAsciiL("#1", 2);
+ sal_Int32 nPos = aRsc.indexOf("#1");
if (nPos >= 0)
{
aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);
@@ -1203,7 +1203,7 @@ void ScChangeActionMove::GetDescription(
}
aTmpStr = ScChangeAction::GetRefString(GetBigRange(), pDoc, bFlag3D);
- nPos = nPos >= 0 ? aRsc.indexOfAsciiL("#2", 2, nPos) : -1;
+ nPos = nPos >= 0 ? aRsc.indexOf("#2", nPos) : -1;
if (nPos >= 0)
{
aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);
@@ -1459,7 +1459,7 @@ void ScChangeActionContent::GetDescription(
GetRefString(aTmpStr, pDoc);
sal_Int32 nPos = 0;
- nPos = aRsc.indexOfAsciiL("#1", 2, nPos);
+ nPos = aRsc.indexOf("#1", nPos);
if (nPos >= 0)
{
aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);
@@ -1470,7 +1470,7 @@ void ScChangeActionContent::GetDescription(
if (aTmpStr.isEmpty())
aTmpStr = ScGlobal::GetRscString( STR_CHANGED_BLANK );
- nPos = nPos >= 0 ? aRsc.indexOfAsciiL("#2", 2, nPos) : -1;
+ nPos = nPos >= 0 ? aRsc.indexOf("#2", nPos) : -1;
if (nPos >= 0)
{
aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);
@@ -1481,7 +1481,7 @@ void ScChangeActionContent::GetDescription(
if (aTmpStr.isEmpty())
aTmpStr = ScGlobal::GetRscString( STR_CHANGED_BLANK );
- nPos = nPos >= 0 ? aRsc.indexOfAsciiL("#3", 2, nPos) : -1;
+ nPos = nPos >= 0 ? aRsc.indexOf("#3", nPos) : -1;
if (nPos >= 0)
{
aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 5320d7e9bd9b..53d327fa2684 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -620,7 +620,7 @@ static bool lcl_parseExternalName(
if (aTmpName[nNameLen-1] == '!')
{
// Check against #REF!.
- if (aTmpName.equalsAscii("#REF!"))
+ if (aTmpName == "#REF!")
return false;
}
@@ -2930,7 +2930,7 @@ bool ScCompiler::IsExternalNamedRange( const OUString& rSymbol )
bool ScCompiler::IsDBRange( const OUString& rName )
{
- if (rName.equalsAscii("[]"))
+ if (rName == "[]")
{
if (maRawToken.GetOpCode() == ocDBArea)
{
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 26e8d60683e4..74ccd35cf669 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -53,13 +53,11 @@ using namespace com::sun::star;
// STATIC DATA
// Delimiters zusaetzlich zu EditEngine-Default:
-const sal_Char ScEditUtil::pCalcDelimiters[] = "=()+-*/^&<>";
-
OUString ScEditUtil::ModifyDelimiters( const OUString& rOld )
{
// underscore is used in function argument names
OUString aRet = OUString( comphelper::string::remove(rOld, '_') ) +
- OUString::createFromAscii( pCalcDelimiters ) +
+ "=()+-*/^&<>" +
ScCompiler::GetNativeSymbol(ocSep); // argument separator is localized.
return aRet;
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 552770e98892..93d6fc65087b 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2151,25 +2151,25 @@ void ScInterpreter::ScCell()
ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), ocCell);
// *** ADDRESS INFO ***
- if( aInfoType.equalsAscii( "COL" ) )
+ if( aInfoType == "COL" )
{ // column number (1-based)
PushInt( aCellPos.Col() + 1 );
}
- else if( aInfoType.equalsAscii( "ROW" ) )
+ else if( aInfoType == "ROW" )
{ // row number (1-based)
PushInt( aCellPos.Row() + 1 );
}
- else if( aInfoType.equalsAscii( "SHEET" ) )
+ else if( aInfoType == "SHEET" )
{ // table number (1-based)
PushInt( aCellPos.Tab() + 1 );
}
- else if( aInfoType.equalsAscii( "ADDRESS" ) )
+ else if( aInfoType == "ADDRESS" )
{ // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
sal_uInt16 nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D);
OUString aStr(aCellPos.Format(nFlags, pDok, pDok->GetAddressConvention()));
PushString(aStr);
}
- else if( aInfoType.equalsAscii( "FILENAME" ) )
+ else if( aInfoType == "FILENAME" )
{ // file name and table name: 'FILENAME'#$TABLE
SCTAB nTab = aCellPos.Tab();
OUString aFuncResult;
@@ -2196,7 +2196,7 @@ void ScInterpreter::ScCell()
}
PushString( aFuncResult );
}
- else if( aInfoType.equalsAscii( "COORD" ) )
+ else if( aInfoType == "COORD" )
{ // address, lotus 1-2-3 formatted: $TABLE:$COL$ROW
// Yes, passing tab as col is intentional!
OUStringBuffer aFuncResult;
@@ -2212,7 +2212,7 @@ void ScInterpreter::ScCell()
}
// *** CELL PROPERTIES ***
- else if( aInfoType.equalsAscii( "CONTENTS" ) )
+ else if( aInfoType == "CONTENTS" )
{ // contents of the cell, no formatting
if (aCell.hasString())
{
@@ -2223,7 +2223,7 @@ void ScInterpreter::ScCell()
else
PushDouble(GetCellValue(aCellPos, aCell));
}
- else if( aInfoType.equalsAscii( "TYPE" ) )
+ else if( aInfoType == "TYPE" )
{ // b = blank; l = string (label); v = otherwise (value)
sal_Unicode c;
if (aCell.hasString())
@@ -2232,7 +2232,7 @@ void ScInterpreter::ScCell()
c = aCell.hasNumeric() ? 'v' : 'b';
PushString( OUString(c) );
}
- else if( aInfoType.equalsAscii( "WIDTH" ) )
+ else if( aInfoType == "WIDTH" )
{ // column width (rounded off as count of zero characters in standard font and size)
Printer* pPrinter = pDok->GetPrinter();
MapMode aOldMode( pPrinter->GetMapMode() );
@@ -2249,7 +2249,7 @@ void ScInterpreter::ScCell()
int nZeroCount = (int)(pDok->GetColWidth( aCellPos.Col(), aCellPos.Tab() ) / nZeroWidth);
PushInt( nZeroCount );
}
- else if( aInfoType.equalsAscii( "PREFIX" ) )
+ else if( aInfoType == "PREFIX" )
{ // ' = left; " = right; ^ = centered
sal_Unicode c = 0;
if (aCell.hasString())
@@ -2268,7 +2268,7 @@ void ScInterpreter::ScCell()
}
PushString( OUString(c) );
}
- else if( aInfoType.equalsAscii( "PROTECT" ) )
+ else if( aInfoType == "PROTECT" )
{ // 1 = cell locked
const ScProtectionAttr* pProtAttr = static_cast<const ScProtectionAttr*>(
pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_PROTECTION ));
@@ -2276,19 +2276,19 @@ void ScInterpreter::ScCell()
}
// *** FORMATTING ***
- else if( aInfoType.equalsAscii( "FORMAT" ) )
+ else if( aInfoType == "FORMAT" )
{ // specific format code for standard formats
OUString aFuncResult;
sal_uLong nFormat = pDok->GetNumberFormat( aCellPos );
getFormatString(pFormatter, nFormat, aFuncResult);
PushString( aFuncResult );
}
- else if( aInfoType.equalsAscii( "COLOR" ) )
+ else if( aInfoType == "COLOR" )
{ // 1 = negative values are colored, otherwise 0
const SvNumberformat* pFormat = pFormatter->GetEntry( pDok->GetNumberFormat( aCellPos ) );
PushInt( lcl_FormatHasNegColor( pFormat ) ? 1 : 0 );
}
- else if( aInfoType.equalsAscii( "PARENTHESES" ) )
+ else if( aInfoType == "PARENTHESES" )
{ // 1 = format string contains a '(' character, otherwise 0
const SvNumberformat* pFormat = pFormatter->GetEntry( pDok->GetNumberFormat( aCellPos ) );
PushInt( lcl_FormatHasOpenPar( pFormat ) ? 1 : 0 );
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index e33484658837..9475f3f288fe 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -3264,15 +3264,15 @@ void ScInterpreter::ScInfo()
{
OUString aStr = GetString().getString();
ScCellKeywordTranslator::transKeyword(aStr, ScGlobal::GetLocale(), ocInfo);
- if( aStr.equalsAscii( "SYSTEM" ) )
+ if( aStr == "SYSTEM" )
PushString( OUString( SC_INFO_OSVERSION ) );
- else if( aStr.equalsAscii( "OSVERSION" ) )
+ else if( aStr == "OSVERSION" )
PushString( OUString( "Windows (32-bit) NT 5.01" ) );
- else if( aStr.equalsAscii( "RELEASE" ) )
+ else if( aStr == "RELEASE" )
PushString( ::utl::Bootstrap::getBuildIdData( OUString() ) );
- else if( aStr.equalsAscii( "NUMFILE" ) )
+ else if( aStr == "NUMFILE" )
PushDouble( 1 );
- else if( aStr.equalsAscii( "RECALC" ) )
+ else if( aStr == "RECALC" )
PushString( ScGlobal::GetRscString( pDok->GetAutoCalc() ? STR_RECALC_AUTO : STR_RECALC_MANUAL ) );
else
PushIllegalArgument();
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 4598bdf5a275..ae6b608437b5 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -254,7 +254,7 @@ bool ScRangeUtil::MakeRangeFromName (
//first handle ui names like local1 (Sheet1), which point to a local range name
OUString aName(rName);
sal_Int32 nEndPos = aName.lastIndexOf(')');
- sal_Int32 nStartPos = aName.lastIndexOfAsciiL(" (",2);
+ sal_Int32 nStartPos = aName.lastIndexOf(" (");
SCTAB nTable = nCurTab;
if (nEndPos != -1 && nStartPos != -1)
{
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 5b49205df033..9e96d1e9cc70 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1315,7 +1315,7 @@ OUString GetNumberFormatCode(XclRoot& rRoot, const sal_uInt16 nScNumFmt, SvNumbe
}
aFormatStr = pEntry->GetMappedFormatstring( *pKeywordTable, *xFormatter->GetLocaleData() );
- if( aFormatStr.equalsAscii( "Standard" ) )
+ if( aFormatStr == "Standard" )
aFormatStr = "General";
}
}
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 37e8d0e51166..b83df30905f8 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -623,7 +623,7 @@ void XclImpUrlHelper::DecodeUrl(
sal_Unicode cCurrDrive = 0;
OUString aDosBase( INetURLObject( rRoot.GetBasePath() ).getFSysPath( INetURLObject::FSYS_DOS ) );
- if( (aDosBase.getLength() > 2) && aDosBase.copy(1,2).equalsAscii( ":\\" ) )
+ if( aDosBase.match(":\\", 1) )
cCurrDrive = aDosBase[0];
const sal_Unicode* pChar = rEncodedUrl.getStr();
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 51d650642c77..7c36dc21af70 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -55,8 +55,6 @@
#include <memory>
-#define SC_USERLIST "UserList"
-
using namespace com::sun::star;
using namespace xmloff::token;
@@ -854,7 +852,7 @@ ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport,
if (sValue.getLength() > 8)
{
OUString sTemp = sValue.copy(0, 8);
- if (sTemp.equalsAscii(SC_USERLIST))
+ if (sTemp == "UserList")
{
pDatabaseRangeContext->SetSubTotalsEnabledUserList(true);
sTemp = sValue.copy(8);
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index f89b033daab4..f48894257f3c 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -395,9 +395,9 @@ void ScXMLConditionContext::GetOperator(
rParam.bRegExp = true;
rEntry.eOp = SC_NOT_EQUAL;
}
- else if (aOpStr.equalsAscii("="))
+ else if (aOpStr == "=")
rEntry.eOp = SC_EQUAL;
- else if (aOpStr.equalsAscii("!="))
+ else if (aOpStr == "!=")
rEntry.eOp = SC_NOT_EQUAL;
else if (IsXMLToken(aOpStr, XML_BOTTOM_PERCENT))
rEntry.eOp = SC_BOTPERC;
@@ -405,13 +405,13 @@ void ScXMLConditionContext::GetOperator(
rEntry.eOp = SC_BOTVAL;
else if (IsXMLToken(aOpStr, XML_EMPTY))
rEntry.SetQueryByEmpty();
- else if (aOpStr.equalsAscii(">"))
+ else if (aOpStr == ">")
rEntry.eOp = SC_GREATER;
- else if (aOpStr.equalsAscii(">="))
+ else if (aOpStr == ">=")
rEntry.eOp = SC_GREATER_EQUAL;
- else if (aOpStr.equalsAscii("<"))
+ else if (aOpStr == "<")
rEntry.eOp = SC_LESS;
- else if (aOpStr.equalsAscii("<="))
+ else if (aOpStr == "<=")
rEntry.eOp = SC_LESS_EQUAL;
else if (IsXMLToken(aOpStr, XML_NOEMPTY))
rEntry.SetQueryByNonEmpty();
@@ -835,21 +835,21 @@ void ScXMLDPConditionContext::getOperatorXML(
bUseRegularExpressions = true;
aFilterOperator = SC_NOT_EQUAL;
}
- else if (sTempOperator.equalsAscii("="))
+ else if (sTempOperator == "=")
aFilterOperator = SC_EQUAL;
- else if (sTempOperator.equalsAscii("!="))
+ else if (sTempOperator == "!=")
aFilterOperator = SC_NOT_EQUAL;
else if (IsXMLToken(sTempOperator, XML_BOTTOM_PERCENT))
aFilterOperator = SC_BOTPERC;
else if (IsXMLToken(sTempOperator, XML_BOTTOM_VALUES))
aFilterOperator = SC_BOTVAL;
- else if (sTempOperator.equalsAscii(">"))
+ else if (sTempOperator == ">")
aFilterOperator = SC_GREATER;
- else if (sTempOperator.equalsAscii(">="))
+ else if (sTempOperator == ">=")
aFilterOperator = SC_GREATER_EQUAL;
- else if (sTempOperator.equalsAscii("<"))
+ else if (sTempOperator == "<")
aFilterOperator = SC_LESS;
- else if (sTempOperator.equalsAscii("<="))
+ else if (sTempOperator == "<=")
aFilterOperator = SC_LESS_EQUAL;
else if (IsXMLToken(sTempOperator, XML_TOP_PERCENT))
aFilterOperator = SC_TOPPERC;
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 84c1ad898cbb..e990b665cbdc 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -101,7 +101,6 @@
#define SC_LOCALE "Locale"
#define SC_STANDARDFORMAT "StandardFormat"
#define SC_CURRENCYSYMBOL "CurrencySymbol"
-#define SC_REPEAT_COLUMN "repeat-column"
#define SC_REPEAT_ROW "repeat-row"
#define SC_FILTER "filter"
#define SC_PRINT_RANGE "print-range"
@@ -2462,20 +2461,20 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
for (sal_Int32 i = 0; i < nCount; ++i)
{
OUString sName(rChangeProps[i].Name);
- if (sName.equalsAscii("ShowChanges"))
+ if (sName == "ShowChanges")
pViewSettings->SetShowChanges(::cppu::any2bool(rChangeProps[i].Value));
- else if (sName.equalsAscii("ShowAcceptedChanges"))
+ else if (sName == "ShowAcceptedChanges")
pViewSettings->SetShowAccepted(::cppu::any2bool(rChangeProps[i].Value));
- else if (sName.equalsAscii("ShowRejectedChanges"))
+ else if (sName == "ShowRejectedChanges")
pViewSettings->SetShowRejected(::cppu::any2bool(rChangeProps[i].Value));
- else if (sName.equalsAscii("ShowChangesByDatetime"))
+ else if (sName == "ShowChangesByDatetime")
pViewSettings->SetHasDate(::cppu::any2bool(rChangeProps[i].Value));
- else if (sName.equalsAscii("ShowChangesByDatetimeMode"))
+ else if (sName == "ShowChangesByDatetimeMode")
{
if (rChangeProps[i].Value >>= nTemp16)
pViewSettings->SetTheDateMode(ScChgsDateMode(nTemp16));
}
- else if (sName.equalsAscii("ShowChangesByDatetimeFirstDatetime"))
+ else if (sName == "ShowChangesByDatetimeFirstDatetime")
{
util::DateTime aDateTime;
if (rChangeProps[i].Value >>= aDateTime)
@@ -2485,7 +2484,7 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
pViewSettings->SetTheFirstDateTime(aCoreDateTime);
}
}
- else if (sName.equalsAscii("ShowChangesByDatetimeSecondDatetime"))
+ else if (sName == "ShowChangesByDatetimeSecondDatetime")
{
util::DateTime aDateTime;
if (rChangeProps[i].Value >>= aDateTime)
@@ -2495,9 +2494,9 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
pViewSettings->SetTheLastDateTime(aCoreDateTime);
}
}
- else if (sName.equalsAscii("ShowChangesByAuthor"))
+ else if (sName == "ShowChangesByAuthor")
pViewSettings->SetHasAuthor(::cppu::any2bool(rChangeProps[i].Value));
- else if (sName.equalsAscii("ShowChangesByAuthorName"))
+ else if (sName == "ShowChangesByAuthorName")
{
OUString sOUName;
if (rChangeProps[i].Value >>= sOUName)
@@ -2506,9 +2505,9 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
pViewSettings->SetTheAuthorToShow(sAuthorName);
}
}
- else if (sName.equalsAscii("ShowChangesByComment"))
+ else if (sName == "ShowChangesByComment")
pViewSettings->SetHasComment(::cppu::any2bool(rChangeProps[i].Value));
- else if (sName.equalsAscii("ShowChangesByCommentText"))
+ else if (sName == "ShowChangesByCommentText")
{
OUString sOUComment;
if (rChangeProps[i].Value >>= sOUComment)
@@ -2517,9 +2516,9 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
pViewSettings->SetTheComment(sComment);
}
}
- else if (sName.equalsAscii("ShowChangesByRanges"))
+ else if (sName == "ShowChangesByRanges")
pViewSettings->SetHasRange(::cppu::any2bool(rChangeProps[i].Value));
- else if (sName.equalsAscii("ShowChangesByRangesList"))
+ else if (sName == "ShowChangesByRangesList")
{
OUString sRanges;
if ((rChangeProps[i].Value >>= sRanges) && !sRanges.isEmpty())
@@ -2546,15 +2545,15 @@ void ScXMLImport::SetViewSettings(const uno::Sequence<beans::PropertyValue>& aVi
for (sal_Int32 i = 0; i < nCount; ++i)
{
OUString sName(aViewProps[i].Name);
- if (sName.equalsAscii("VisibleAreaHeight"))
+ if (sName == "VisibleAreaHeight")
aViewProps[i].Value >>= nHeight;
- else if (sName.equalsAscii("VisibleAreaLeft"))
+ else if (sName == "VisibleAreaLeft")
aViewProps[i].Value >>= nLeft;
- else if (sName.equalsAscii("VisibleAreaTop"))
+ else if (sName == "VisibleAreaTop")
aViewProps[i].Value >>= nTop;
- else if (sName.equalsAscii("VisibleAreaWidth"))
+ else if (sName == "VisibleAreaWidth")
aViewProps[i].Value >>= nWidth;
- else if (sName.equalsAscii("TrackedChangesViewSettings"))
+ else if (sName == "TrackedChangesViewSettings")
{
uno::Sequence<beans::PropertyValue> aChangeProps;
if(aViewProps[i].Value >>= aChangeProps)
@@ -3033,13 +3032,13 @@ sal_Int32 ScXMLImport::GetRangeType(const OUString& sRangeType) const
if ((i == sRangeType.getLength()) || (sRangeType[i] == ' '))
{
OUString sTemp = sBuffer.makeStringAndClear();
- if (sTemp.equalsAscii(SC_REPEAT_COLUMN))
+ if (sTemp == "repeat-column")
nRangeType |= sheet::NamedRangeFlag::COLUMN_HEADER;
- else if (sTemp.equalsAscii(SC_REPEAT_ROW))
+ else if (sTemp == SC_REPEAT_ROW)
nRangeType |= sheet::NamedRangeFlag::ROW_HEADER;
- else if (sTemp.equalsAscii(SC_FILTER))
+ else if (sTemp == SC_FILTER)
nRangeType |= sheet::NamedRangeFlag::FILTER_CRITERIA;
- else if (sTemp.equalsAscii(SC_PRINT_RANGE))
+ else if (sTemp == SC_PRINT_RANGE)
nRangeType |= sheet::NamedRangeFlag::PRINT_AREA;
}
else if (i < sRangeType.getLength())
@@ -3198,7 +3197,7 @@ void SAL_CALL ScXMLImport::endDocument()
for (sal_Int32 i = 0; i < nCount; ++i)
{
OUString sName(aSeq[i].Name);
- if (sName.equalsAscii(SC_ACTIVETABLE))
+ if (sName == SC_ACTIVETABLE)
{
OUString sValue;
if(aSeq[i].Value >>= sValue)
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index 85163e674579..4c9894f50c78 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -29,8 +29,6 @@
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmltoken.hxx>
-#define SC_USERLIST "UserList"
-
using namespace com::sun::star;
using namespace xmloff::token;
@@ -176,7 +174,7 @@ void ScXMLSortContext::AddSortField(const OUString& sFieldNumber, const OUString
if (sDataType.getLength() > 8)
{
OUString sTemp = sDataType.copy(0, 8);
- if (sTemp.equalsAscii(SC_USERLIST))
+ if (sTemp == "UserList")
{
bEnabledUserList = true;
sTemp = sDataType.copy(8);
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 482a56fc6cb2..bd071180463d 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -94,11 +94,6 @@ extern sal_uInt16 nEditAdjust; //! Member of ViewData
namespace {
-// Delimiters (in addition to ScEditUtil) needed for range finder:
-// only characters that are allowed in formulas next to references
-// and the quotation mark (so string constants can be skipped)
-const sal_Char pMinDelimiters[] = " !\"";
-
// Formula data replacement character for a pair of parentheses at end of
// function name, to force sorting parentheses before all other characters.
// Collation may treat parentheses differently.
@@ -209,8 +204,10 @@ void ScInputHandler::InitRangeFinder( const OUString& rFormula )
if ( !pActiveViewSh || !SC_MOD()->GetInputOptions().GetRangeFinder() )
return;
- OUString aDelimiters = ScEditUtil::ModifyDelimiters(
- OUString::createFromAscii( pMinDelimiters ) );
+ OUString aDelimiters = ScEditUtil::ModifyDelimiters(" !\"");
+ // delimiters (in addition to ScEditUtil): only characters that are
+ // allowed in formulas next to references and the quotation mark (so
+ // string constants can be skipped)
sal_Int32 nColon = aDelimiters.indexOf( ':' );
if ( nColon != -1 )
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index b4a72d10d5fe..b57ed3fce935 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -175,7 +175,7 @@ static OUString lcl_decodeSepString( const OUString & rSepNums, bool & o_bMergeF
for (sal_Int32 i=0; i<nSub; ++i)
{
OUString aCode = rSepNums.getToken( i, '/' );
- if ( aCode.equalsAscii(pStrMrg) )
+ if ( aCode == pStrMrg )
o_bMergeFieldSeps = true;
else
{
@@ -201,7 +201,7 @@ void ScAsciiOptions::ReadFromString( const OUString& rString )
bFixedLen = bMergeFieldSeps = false;
aToken = rString.getToken(0,',');
- if ( aToken.equalsAscii(pStrFix) )
+ if ( aToken == pStrFix )
bFixedLen = true;
aFieldSeps = lcl_decodeSepString( aToken, bMergeFieldSeps);
}
@@ -265,14 +265,14 @@ void ScAsciiOptions::ReadFromString( const OUString& rString )
if (nCount >= 7)
{
aToken = rString.getToken(6, ',');
- bQuotedFieldAsText = aToken.equalsAscii("true");
+ bQuotedFieldAsText = aToken == "true";
}
// Detect special numbers.
if (nCount >= 8)
{
aToken = rString.getToken(7, ',');
- bDetectSpecialNumber = aToken.equalsAscii("true");
+ bDetectSpecialNumber = aToken == "true";
}
else
bDetectSpecialNumber = true; // default of versions that didn't add the parameter
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index b6910bbaf299..fef3575368ba 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -393,7 +393,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl)
if ( !aNewName.isEmpty() && !aNewArea.isEmpty() )
{
- if ( ScRangeData::IsNameValid( aNewName, pDoc ) && !aNewName.equalsAscii(STR_DB_LOCAL_NONAME) )
+ if ( ScRangeData::IsNameValid( aNewName, pDoc ) && aNewName != STR_DB_LOCAL_NONAME )
{
// weil jetzt editiert werden kann, muss erst geparst werden
ScRange aTmpRange;
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index 1f4c7ddf9e49..13c348fdd0fe 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -65,11 +65,11 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
{
// look at the same positions as in ScAsciiOptions
if ( nTokenCount >= 7 )
- bQuoteAllText = rStr.getToken(6, ',').equalsAscii("true");
+ bQuoteAllText = rStr.getToken(6, ',') == "true";
if ( nTokenCount >= 9 )
- bSaveAsShown = rStr.getToken(8, ',').equalsAscii("true");
+ bSaveAsShown = rStr.getToken(8, ',') == "true";
if ( nTokenCount >= 10 )
- bSaveFormulas = rStr.getToken(9, ',').equalsAscii("true");
+ bSaveFormulas = rStr.getToken(9, ',') == "true";
}
}
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 1dd391c16efb..005ac8920d50 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -144,9 +144,6 @@ using ::std::vector;
// Filter names (like in sclib.cxx)
static const sal_Char pFilterSc50[] = "StarCalc 5.0";
-static const sal_Char pFilterSc40[] = "StarCalc 4.0";
-static const sal_Char pFilterSc30[] = "StarCalc 3.0";
-static const sal_Char pFilterSc10[] = "StarCalc 1.0";
static const sal_Char pFilterXML[] = "StarOffice XML (Calc)";
static const sal_Char pFilterAscii[] = "Text - txt - csv (StarCalc)";
static const sal_Char pFilterLotus[] = "Lotus";
@@ -1064,14 +1061,14 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
OUString aFltName = pFilter->GetFilterName();
- bool bCalc3 = ( aFltName.equalsAscii(pFilterSc30) );
- bool bCalc4 = ( aFltName.equalsAscii(pFilterSc40) );
+ bool bCalc3 = aFltName == "StarCalc 3.0";
+ bool bCalc4 = aFltName == "StarCalc 4.0";
if (!bCalc3 && !bCalc4)
aDocument.SetInsertingFromOtherDoc( true );
- if (aFltName.equalsAscii(pFilterXML))
+ if (aFltName == pFilterXML)
bRet = LoadXML( &rMedium, NULL );
- else if (aFltName.equalsAscii(pFilterSc10))
+ else if (aFltName == "StarCalc 1.0")
{
SvStream* pStream = rMedium.GetInStream();
if (pStream)
@@ -1086,7 +1083,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
bRet = true;
}
}
- else if (aFltName.equalsAscii(pFilterLotus))
+ else if (aFltName == pFilterLotus)
{
OUString sItStr;
SfxItemSet* pSet = rMedium.GetItemSet();
@@ -1119,18 +1116,18 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
bSetColWidths = true;
bSetRowHeights = true;
}
- else if ( aFltName.equalsAscii(pFilterExcel4) || aFltName.equalsAscii(pFilterExcel5) ||
- aFltName.equalsAscii(pFilterExcel95) || aFltName.equalsAscii(pFilterExcel97) ||
- aFltName.equalsAscii(pFilterEx4Temp) || aFltName.equalsAscii(pFilterEx5Temp) ||
- aFltName.equalsAscii(pFilterEx95Temp) || aFltName.equalsAscii(pFilterEx97Temp) )
+ else if ( aFltName == pFilterExcel4 || aFltName == pFilterExcel5 ||
+ aFltName == pFilterExcel95 || aFltName == pFilterExcel97 ||
+ aFltName == pFilterEx4Temp || aFltName == pFilterEx5Temp ||
+ aFltName == pFilterEx95Temp || aFltName == pFilterEx97Temp )
{
EXCIMPFORMAT eFormat = EIF_AUTO;
- if ( aFltName.equalsAscii(pFilterExcel4) || aFltName.equalsAscii(pFilterEx4Temp) )
+ if ( aFltName == pFilterExcel4 || aFltName == pFilterEx4Temp )
eFormat = EIF_BIFF_LE4;
- else if ( aFltName.equalsAscii(pFilterExcel5) || aFltName.equalsAscii(pFilterExcel95) ||
- aFltName.equalsAscii(pFilterEx5Temp) || aFltName.equalsAscii(pFilterEx95Temp) )
+ else if ( aFltName == pFilterExcel5 || aFltName == pFilterExcel95 ||
+ aFltName == pFilterEx5Temp || aFltName == pFilterEx95Temp )
eFormat = EIF_BIFF5;
- else if ( aFltName.equalsAscii(pFilterExcel97) || aFltName.equalsAscii(pFilterEx97Temp) )
+ else if ( aFltName == pFilterExcel97 || aFltName == pFilterEx97Temp )
eFormat = EIF_BIFF8;
MakeDrawLayer(); //! In the filter
@@ -1157,7 +1154,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
else
bRet = true;
}
- else if (aFltName.equalsAscii(pFilterAscii))
+ else if (aFltName == pFilterAscii)
{
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
@@ -1228,7 +1225,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
bSetColWidths = true;
bSetSimpleTextColWidths = true;
}
- else if (aFltName.equalsAscii(pFilterDBase))
+ else if (aFltName == pFilterDBase)
{
OUString sItStr;
SfxItemSet* pSet = rMedium.GetItemSet();
@@ -1265,7 +1262,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
bSetColWidths = true;
bSetSimpleTextColWidths = true;
}
- else if (aFltName.equalsAscii(pFilterDif))
+ else if (aFltName == pFilterDif)
{
SvStream* pStream = rMedium.GetInStream();
if (pStream)
@@ -1305,7 +1302,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
bSetSimpleTextColWidths = true;
bSetRowHeights = true;
}
- else if (aFltName.equalsAscii(pFilterSylk))
+ else if (aFltName == pFilterSylk)
{
FltError eError = SCERR_IMPORT_UNKNOWN;
if( !rMedium.IsStorage() )
@@ -1334,7 +1331,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
bSetSimpleTextColWidths = true;
bSetRowHeights = true;
}
- else if (aFltName.equalsAscii(pFilterQPro6))
+ else if (aFltName == pFilterQPro6)
{
FltError eError = ScFormatFilter::Get().ScImportQuattroPro( rMedium, &aDocument);
if (eError != eERR_OK)
@@ -1352,7 +1349,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
// wrapping enabled look nicer..
bSetRowHeights = true;
}
- else if (aFltName.equalsAscii(pFilterRtf))
+ else if (aFltName == pFilterRtf)
{
FltError eError = SCERR_IMPORT_UNKNOWN;
if( !rMedium.IsStorage() )
@@ -1388,10 +1385,10 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
if ( eError != eERR_OK && !GetError() )
SetError(eError, OUString( OSL_LOG_PREFIX ));
}
- else if (aFltName.equalsAscii(pFilterHtml) || aFltName.equalsAscii(pFilterHtmlWebQ))
+ else if (aFltName == pFilterHtml || aFltName == pFilterHtmlWebQ)
{
FltError eError = SCERR_IMPORT_UNKNOWN;
- bool bWebQuery = aFltName.equalsAscii(pFilterHtmlWebQ);
+ bool bWebQuery = aFltName == pFilterHtmlWebQ;
if( !rMedium.IsStorage() )
{
SvStream* pInStream = rMedium.GetInStream();
@@ -2203,15 +2200,15 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
bool bRet = false;
OUString aFltName = rMed.GetFilter()->GetFilterName();
- if (aFltName.equalsAscii(pFilterXML))
+ if (aFltName == pFilterXML)
{
//TODO/LATER: this shouldn't happen!
OSL_FAIL("XML filter in ConvertFrom?!");
bRet = SaveXML( &rMed, NULL );
}
- else if (aFltName.equalsAscii(pFilterExcel5) || aFltName.equalsAscii(pFilterExcel95) ||
- aFltName.equalsAscii(pFilterExcel97) || aFltName.equalsAscii(pFilterEx5Temp) ||
- aFltName.equalsAscii(pFilterEx95Temp) || aFltName.equalsAscii(pFilterEx97Temp))
+ else if (aFltName == pFilterExcel5 || aFltName == pFilterExcel95 ||
+ aFltName == pFilterExcel97 || aFltName == pFilterEx5Temp ||
+ aFltName == pFilterEx95Temp || aFltName == pFilterEx97Temp)
{
WaitObject aWait( GetActiveDialogParent() );
@@ -2249,7 +2246,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
if( bDoSave )
{
ExportFormatExcel eFormat = ExpBiff5;
- if( aFltName.equalsAscii( pFilterExcel97 ) || aFltName.equalsAscii( pFilterEx97Temp ) )
+ if( aFltName == pFilterExcel97 || aFltName == pFilterEx97Temp )
eFormat = ExpBiff8;
FltError eError = ScFormatFilter::Get().ScExportExcel5( rMed, &aDocument, eFormat, RTL_TEXTENCODING_MS_1252 );
@@ -2265,7 +2262,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
SetError( ERRCODE_ABORT, OUString( OSL_LOG_PREFIX ) );
}
}
- else if (aFltName.equalsAscii(pFilterAscii))
+ else if (aFltName == pFilterAscii)
{
SvStream* pStream = rMed.GetOutStream();
if (pStream)
@@ -2298,7 +2295,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
rMed.SetError(SCWARN_EXPORT_ASCII, OUString( OSL_LOG_PREFIX ));
}
}
- else if (aFltName.equalsAscii(pFilterDBase))
+ else if (aFltName == pFilterDBase)
{
OUString sCharSet;
SfxItemSet* pSet = rMed.GetItemSet();
@@ -2362,7 +2359,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
}
}
}
- else if (aFltName.equalsAscii(pFilterDif))
+ else if (aFltName == pFilterDif)
{
SvStream* pStream = rMed.GetOutStream();
if (pStream)
@@ -2394,7 +2391,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
rMed.SetError(SCWARN_EXPORT_ASCII, OUString( OSL_LOG_PREFIX ));
}
}
- else if (aFltName.equalsAscii(pFilterSylk))
+ else if (aFltName == pFilterSylk)
{
SvStream* pStream = rMed.GetOutStream();
if ( pStream )
@@ -2411,7 +2408,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
bRet = aImExport.ExportStream( *pStream, rMed.GetBaseURL( true ), SOT_FORMATSTR_ID_SYLK );
}
}
- else if (aFltName.equalsAscii(pFilterHtml))
+ else if (aFltName == pFilterHtml)
{
SvStream* pStream = rMed.GetOutStream();
if ( pStream )
@@ -2603,15 +2600,15 @@ bool ScDocShell::HasAutomaticTableName( const OUString& rFilter )
// sal_True for those filters that keep the default table name
// (which is language specific)
- return rFilter.equalsAscii( pFilterAscii )
- || rFilter.equalsAscii( pFilterLotus )
- || rFilter.equalsAscii( pFilterExcel4 )
- || rFilter.equalsAscii( pFilterEx4Temp )
- || rFilter.equalsAscii( pFilterDBase )
- || rFilter.equalsAscii( pFilterDif )
- || rFilter.equalsAscii( pFilterSylk )
- || rFilter.equalsAscii( pFilterHtml )
- || rFilter.equalsAscii( pFilterRtf );
+ return rFilter == pFilterAscii
+ || rFilter == pFilterLotus
+ || rFilter == pFilterExcel4
+ || rFilter == pFilterEx4Temp
+ || rFilter == pFilterDBase
+ || rFilter == pFilterDif
+ || rFilter == pFilterSylk
+ || rFilter == pFilterHtml
+ || rFilter == pFilterRtf;
}
#if ! ENABLE_TELEPATHY
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index 26208b2771cf..6c2ca1000557 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -168,8 +168,7 @@ bool ScServerObject::GetData(
ScImportExport aObj( &rDoc, aRange );
if( aDdeTextFmt[0] == 'F' )
aObj.SetFormulas( true );
- if( aDdeTextFmt.equalsAscii( "SYLK" ) ||
- aDdeTextFmt.equalsAscii( "FSYLK" ) )
+ if( aDdeTextFmt == "SYLK" || aDdeTextFmt == "FSYLK" )
{
OString aByteData;
if( aObj.ExportByteString( aByteData, osl_getThreadTextEncoding(), SOT_FORMATSTR_ID_SYLK ) )
@@ -181,8 +180,7 @@ bool ScServerObject::GetData(
}
return false;
}
- if( aDdeTextFmt.equalsAscii( "CSV" ) ||
- aDdeTextFmt.equalsAscii( "FCSV" ) )
+ if( aDdeTextFmt == "CSV" || aDdeTextFmt == "FCSV" )
aObj.SetSeparator( ',' );
aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, ' ', false ) );
return aObj.ExportData( rMimeType, rData );
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index b85753ee1f1b..7ecd73885cee 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -112,7 +112,7 @@ IMPL_LINK_NOARG(ScLinkedAreaDlg, FileHdl)
return 0;
// #i53241# replace HTML filter with DataQuery filter
- if (aFilter.equalsAscii(FILTERNAME_HTML))
+ if (aFilter == FILTERNAME_HTML)
aFilter = OUString(FILTERNAME_QUERY);
LoadDocument( aEntered, aFilter, aOptions );
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 980fd7b878a4..9fd47025438c 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -931,7 +931,7 @@ void ScUndoAutoFilter::DoChange( bool bUndo )
ScDocument& rDoc = pDocShell->GetDocument();
ScDBData* pDBData=NULL;
- if (aDBName.equalsAscii(STR_DB_LOCAL_NONAME))
+ if (aDBName == STR_DB_LOCAL_NONAME)
{
SCTAB nTab = aOriginalRange.aStart.Tab();
pDBData = rDoc.GetAnonymousDBData(nTab);
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 0c2cb0b76a01..9a8a759adf9c 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -140,7 +140,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const OUString& aPropert
bool bSuccess = false;
OUString aNameStr(aPropertyName);
- if ( aNameStr.equalsAscii( SC_UNONAME_ADDRESS ) )
+ if ( aNameStr == SC_UNONAME_ADDRESS )
{
// read the cell/range address from API struct
if ( bIsRange )
@@ -162,7 +162,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const OUString& aPropert
}
}
}
- else if ( aNameStr.equalsAscii( SC_UNONAME_REFSHEET ) )
+ else if ( aNameStr == SC_UNONAME_REFSHEET )
{
// set the reference sheet
sal_Int32 nIntVal = 0;
@@ -172,7 +172,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const OUString& aPropert
bSuccess = true;
}
}
- else if ( aNameStr.equalsAscii( SC_UNONAME_UIREPR ) )
+ else if ( aNameStr == SC_UNONAME_UIREPR )
{
// parse the UI representation string
OUString sRepresentation;
@@ -182,9 +182,9 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const OUString& aPropert
bSuccess = ParseUIString( aUIString );
}
}
- else if ( aNameStr.equalsAscii( SC_UNONAME_PERSREPR ) || aNameStr.equalsAscii( SC_UNONAME_XLA1REPR ) )
+ else if ( aNameStr == SC_UNONAME_PERSREPR || aNameStr == SC_UNONAME_XLA1REPR )
{
- ::formula::FormulaGrammar::AddressConvention eConv = aNameStr.equalsAscii( SC_UNONAME_XLA1REPR ) ?
+ ::formula::FormulaGrammar::AddressConvention eConv = aNameStr == SC_UNONAME_XLA1REPR ?
::formula::FormulaGrammar::CONV_XL_A1 : ::formula::FormulaGrammar::CONV_OOO;
// parse the file format string
@@ -228,7 +228,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const OUString& aPro
uno::Any aRet;
OUString aNameStr(aPropertyName);
- if ( aNameStr.equalsAscii( SC_UNONAME_ADDRESS ) )
+ if ( aNameStr == SC_UNONAME_ADDRESS )
{
if ( bIsRange )
{
@@ -243,11 +243,11 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const OUString& aPro
aRet <<= aCellAddress;
}
}
- else if ( aNameStr.equalsAscii( SC_UNONAME_REFSHEET ) )
+ else if ( aNameStr == SC_UNONAME_REFSHEET )
{
aRet <<= nRefSheet;
}
- else if ( aNameStr.equalsAscii( SC_UNONAME_UIREPR ) )
+ else if ( aNameStr == SC_UNONAME_UIREPR )
{
// generate UI representation string - include sheet only if different from ref sheet
OUString aFormatStr;
@@ -260,9 +260,9 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const OUString& aPro
aFormatStr = aRange.aStart.Format(nFlags, &rDoc);
aRet <<= aFormatStr;
}
- else if ( aNameStr.equalsAscii( SC_UNONAME_PERSREPR ) || aNameStr.equalsAscii( SC_UNONAME_XLA1REPR ) )
+ else if ( aNameStr == SC_UNONAME_PERSREPR || aNameStr == SC_UNONAME_XLA1REPR )
{
- ::formula::FormulaGrammar::AddressConvention eConv = aNameStr.equalsAscii( SC_UNONAME_XLA1REPR ) ?
+ ::formula::FormulaGrammar::AddressConvention eConv = aNameStr == SC_UNONAME_XLA1REPR ?
::formula::FormulaGrammar::CONV_XL_A1 : ::formula::FormulaGrammar::CONV_OOO;
// generate file format string - always include sheet
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index cf927611a8c1..c08a1f424a0f 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -584,17 +584,17 @@ void SAL_CALL ScAutoFormatObj::setPropertyValue(
OUString aPropString(aPropertyName);
bool bBool;
- if (aPropString.equalsAscii( SC_UNONAME_INCBACK ) && (aValue >>= bBool))
+ if (aPropString == SC_UNONAME_INCBACK && (aValue >>= bBool))
pData->SetIncludeBackground( bBool );
- else if (aPropString.equalsAscii( SC_UNONAME_INCBORD ) && (aValue >>= bBool))
+ else if (aPropString == SC_UNONAME_INCBORD && (aValue >>= bBool))
pData->SetIncludeFrame( bBool );
- else if (aPropString.equalsAscii( SC_UNONAME_INCFONT ) && (aValue >>= bBool))
+ else if (aPropString == SC_UNONAME_INCFONT && (aValue >>= bBool))
pData->SetIncludeFont( bBool );
- else if (aPropString.equalsAscii( SC_UNONAME_INCJUST ) && (aValue >>= bBool))
+ else if (aPropString == SC_UNONAME_INCJUST && (aValue >>= bBool))
pData->SetIncludeJustify( bBool );
- else if (aPropString.equalsAscii( SC_UNONAME_INCNUM ) && (aValue >>= bBool))
+ else if (aPropString == SC_UNONAME_INCNUM && (aValue >>= bBool))
pData->SetIncludeValueFormat( bBool );
- else if (aPropString.equalsAscii( SC_UNONAME_INCWIDTH ) && (aValue >>= bBool))
+ else if (aPropString == SC_UNONAME_INCWIDTH && (aValue >>= bBool))
pData->SetIncludeWidthHeight( bBool );
// else Fehler
@@ -620,17 +620,17 @@ uno::Any SAL_CALL ScAutoFormatObj::getPropertyValue( const OUString& aPropertyNa
bool bValue;
bool bError = false;
- if (aPropertyName.equalsAscii( SC_UNONAME_INCBACK ))
+ if (aPropertyName == SC_UNONAME_INCBACK)
bValue = pData->GetIncludeBackground();
- else if (aPropertyName.equalsAscii( SC_UNONAME_INCBORD ))
+ else if (aPropertyName == SC_UNONAME_INCBORD)
bValue = pData->GetIncludeFrame();
- else if (aPropertyName.equalsAscii( SC_UNONAME_INCFONT ))
+ else if (aPropertyName == SC_UNONAME_INCFONT)
bValue = pData->GetIncludeFont();
- else if (aPropertyName.equalsAscii( SC_UNONAME_INCJUST ))
+ else if (aPropertyName == SC_UNONAME_INCJUST)
bValue = pData->GetIncludeJustify();
- else if (aPropertyName.equalsAscii( SC_UNONAME_INCNUM ))
+ else if (aPropertyName == SC_UNONAME_INCNUM)
bValue = pData->GetIncludeValueFormat();
- else if (aPropertyName.equalsAscii( SC_UNONAME_INCWIDTH ))
+ else if (aPropertyName == SC_UNONAME_INCWIDTH)
bValue = pData->GetIncludeWidthHeight();
else
bError = true; // unbekannte Property
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index e10ec30807e2..bd9fadaf2504 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -373,72 +373,72 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
bool bSaveInp = false;
// print options aren't loaded until needed
- if (aString.equalsAscii( SC_UNONAME_DOAUTOCP ))
+ if (aString == SC_UNONAME_DOAUTOCP)
{
aAppOpt.SetAutoComplete( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveApp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_ENTERED ))
+ else if (aString == SC_UNONAME_ENTERED)
{
aInpOpt.SetEnterEdit( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_EXPREF ))
+ else if (aString == SC_UNONAME_EXPREF)
{
aInpOpt.SetExpandRefs( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_EXTFMT ))
+ else if (aString == SC_UNONAME_EXTFMT)
{
aInpOpt.SetExtendFormat( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_LINKUPD ))
+ else if (aString == SC_UNONAME_LINKUPD)
{
aAppOpt.SetLinkMode( (ScLkUpdMode) ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
bSaveApp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_MARKHDR ))
+ else if (aString == SC_UNONAME_MARKHDR)
{
aInpOpt.SetMarkHeader( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_MOVESEL ))
+ else if (aString == SC_UNONAME_MOVESEL)
{
aInpOpt.SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_RANGEFIN ))
+ else if (aString == SC_UNONAME_RANGEFIN)
{
aInpOpt.SetRangeFinder( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_USETABCOL ))
+ else if (aString == SC_UNONAME_USETABCOL)
{
aInpOpt.SetUseTabCol( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_PRMETRICS ))
+ else if (aString == SC_UNONAME_PRMETRICS)
{
aInpOpt.SetTextWysiwyg( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_REPLWARN ))
+ else if (aString == SC_UNONAME_REPLWARN)
{
aInpOpt.SetReplaceCellsWarn( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_METRIC ))
+ else if (aString == SC_UNONAME_METRIC)
{
aAppOpt.SetAppMetric( (FieldUnit) ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
bSaveApp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_MOVEDIR ))
+ else if (aString == SC_UNONAME_MOVEDIR)
{
aInpOpt.SetMoveDir( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
bSaveInp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_SCALE ))
+ else if (aString == SC_UNONAME_SCALE)
{
short nVal = ScUnoHelpFunctions::GetInt16FromAny( aValue );
if ( nVal < 0 )
@@ -459,12 +459,12 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
}
bSaveApp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_STBFUNC ))
+ else if (aString == SC_UNONAME_STBFUNC)
{
aAppOpt.SetStatusFunc( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
bSaveApp = true;
}
- else if (aString.equalsAscii( SC_UNONAME_ULISTS ))
+ else if (aString == SC_UNONAME_ULISTS)
{
ScUserList* pUserList = ScGlobal::GetUserList();
uno::Sequence<OUString> aSeq;
@@ -485,13 +485,13 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
bSaveApp = true; // Liste wird mit den App-Optionen gespeichert
}
}
- else if (aString.equalsAscii( SC_UNONAME_PRALLSH ))
+ else if (aString == SC_UNONAME_PRALLSH)
{
ScPrintOptions aPrintOpt(pScMod->GetPrintOptions());
aPrintOpt.SetAllSheets( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
pScMod->SetPrintOptions( aPrintOpt );
}
- else if (aString.equalsAscii( SC_UNONAME_PREMPTY ))
+ else if (aString == SC_UNONAME_PREMPTY)
{
ScPrintOptions aPrintOpt(pScMod->GetPrintOptions());
aPrintOpt.SetSkipEmpty( !ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); // reversed
@@ -518,21 +518,21 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aProp
ScInputOptions aInpOpt = pScMod->GetInputOptions();
// print options aren't loaded until needed
- if (aString.equalsAscii( SC_UNONAME_DOAUTOCP )) ScUnoHelpFunctions::SetBoolInAny( aRet, aAppOpt.GetAutoComplete() );
- else if (aString.equalsAscii( SC_UNONAME_ENTERED )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetEnterEdit() );
- else if (aString.equalsAscii( SC_UNONAME_EXPREF )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetExpandRefs() );
- else if (aString.equalsAscii( SC_UNONAME_EXTFMT )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetExtendFormat() );
- else if (aString.equalsAscii( SC_UNONAME_LINKUPD )) aRet <<= (sal_Int16) aAppOpt.GetLinkMode();
- else if (aString.equalsAscii( SC_UNONAME_MARKHDR )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetMarkHeader() );
- else if (aString.equalsAscii( SC_UNONAME_MOVESEL )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetMoveSelection() );
- else if (aString.equalsAscii( SC_UNONAME_RANGEFIN )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetRangeFinder() );
- else if (aString.equalsAscii( SC_UNONAME_USETABCOL )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetUseTabCol() );
- else if (aString.equalsAscii( SC_UNONAME_PRMETRICS )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetTextWysiwyg() );
- else if (aString.equalsAscii( SC_UNONAME_REPLWARN )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetReplaceCellsWarn() );
- else if (aString.equalsAscii( SC_UNONAME_METRIC )) aRet <<= (sal_Int16) aAppOpt.GetAppMetric();
- else if (aString.equalsAscii( SC_UNONAME_MOVEDIR )) aRet <<= (sal_Int16) aInpOpt.GetMoveDir();
- else if (aString.equalsAscii( SC_UNONAME_STBFUNC )) aRet <<= (sal_Int16) aAppOpt.GetStatusFunc();
- else if (aString.equalsAscii( SC_UNONAME_SCALE ))
+ if (aString == SC_UNONAME_DOAUTOCP) ScUnoHelpFunctions::SetBoolInAny( aRet, aAppOpt.GetAutoComplete() );
+ else if (aString == SC_UNONAME_ENTERED ) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetEnterEdit() );
+ else if (aString == SC_UNONAME_EXPREF ) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetExpandRefs() );
+ else if (aString == SC_UNONAME_EXTFMT ) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetExtendFormat() );
+ else if (aString == SC_UNONAME_LINKUPD ) aRet <<= (sal_Int16) aAppOpt.GetLinkMode();
+ else if (aString == SC_UNONAME_MARKHDR ) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetMarkHeader() );
+ else if (aString == SC_UNONAME_MOVESEL ) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetMoveSelection() );
+ else if (aString == SC_UNONAME_RANGEFIN ) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetRangeFinder() );
+ else if (aString == SC_UNONAME_USETABCOL ) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetUseTabCol() );
+ else if (aString == SC_UNONAME_PRMETRICS ) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetTextWysiwyg() );
+ else if (aString == SC_UNONAME_REPLWARN ) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetReplaceCellsWarn() );
+ else if (aString == SC_UNONAME_METRIC ) aRet <<= (sal_Int16) aAppOpt.GetAppMetric();
+ else if (aString == SC_UNONAME_MOVEDIR ) aRet <<= (sal_Int16) aInpOpt.GetMoveDir();
+ else if (aString == SC_UNONAME_STBFUNC ) aRet <<= (sal_Int16) aAppOpt.GetStatusFunc();
+ else if (aString == SC_UNONAME_SCALE )
{
sal_Int16 nZoomVal = 0;
switch ( aAppOpt.GetZoomType() )
@@ -548,7 +548,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aProp
}
aRet <<= (sal_Int16) nZoomVal;
}
- else if (aString.equalsAscii( SC_UNONAME_ULISTS ))
+ else if (aString == SC_UNONAME_ULISTS )
{
ScUserList* pUserList = ScGlobal::GetUserList();
if (pUserList)
@@ -564,9 +564,9 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aProp
aRet <<= aSeq;
}
}
- else if (aString.equalsAscii( SC_UNONAME_PRALLSH ))
+ else if (aString == SC_UNONAME_PRALLSH )
ScUnoHelpFunctions::SetBoolInAny( aRet, pScMod->GetPrintOptions().GetAllSheets() );
- else if (aString.equalsAscii( SC_UNONAME_PREMPTY ))
+ else if (aString == SC_UNONAME_PREMPTY )
ScUnoHelpFunctions::SetBoolInAny( aRet, !pScMod->GetPrintOptions().GetSkipEmpty() ); // reversed
return aRet;
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 346092e3d84e..a8a52d7e3e98 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -501,13 +501,13 @@ void ScChartObj::GetData_Impl( ScRangeListRef& rRanges, bool& rColHeaders, bool&
const beans::PropertyValue& rProp = pPropArray[i];
OUString aPropName(rProp.Name);
- if (aPropName.equalsAscii( "CellRangeRepresentation" ))
+ if (aPropName == "CellRangeRepresentation")
rProp.Value >>= aRanges;
- else if (aPropName.equalsAscii( "DataRowSource" ))
+ else if (aPropName == "DataRowSource")
eDataRowSource = (chart::ChartDataRowSource)ScUnoHelpFunctions::GetEnumFromAny( rProp.Value );
- else if (aPropName.equalsAscii( "HasCategories" ))
+ else if (aPropName == "HasCategories")
bHasCategories = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( "FirstCellAsLabel" ))
+ else if (aPropName == "FirstCellAsLabel")
bFirstCellAsLabel = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
}
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 636180fdf94d..ceafa0738f1a 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -133,17 +133,17 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
ScViewOptions aViewOpt(rDoc.GetViewOptions());
/*Stampit enable/disable print cancel */
- if ( aPropertyName.equalsAscii( SC_UNO_ALLOWPRINTJOBCANCEL ) )
+ if ( aPropertyName == SC_UNO_ALLOWPRINTJOBCANCEL )
pDocShell->Stamp_SetPrintCancelState( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
/*Stampit enable/disable print cancel */
- else if ( aPropertyName.equalsAscii( SC_UNO_SHOWZERO ) )
+ else if ( aPropertyName == SC_UNO_SHOWZERO )
aViewOpt.SetOption(VOPT_NULLVALS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_SHOWNOTES ) )
+ else if ( aPropertyName == SC_UNO_SHOWNOTES )
aViewOpt.SetOption(VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_SHOWGRID ) )
+ else if ( aPropertyName == SC_UNO_SHOWGRID )
aViewOpt.SetOption(VOPT_GRID, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_GRIDCOLOR ) )
+ else if ( aPropertyName == SC_UNO_GRIDCOLOR )
{
sal_Int64 nColor = 0;
if (aValue >>= nColor)
@@ -153,19 +153,19 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
aViewOpt.SetGridColor(aColor, aColorName);
}
}
- else if ( aPropertyName.equalsAscii( SC_UNO_SHOWPAGEBR ) )
+ else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
aViewOpt.SetOption(VOPT_PAGEBREAKS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNONAME_LINKUPD ) )
+ else if ( aPropertyName == SC_UNONAME_LINKUPD )
rDoc.SetLinkMode( static_cast<ScLkUpdMode> ( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_COLROWHDR ) )
+ else if ( aPropertyName == SC_UNO_COLROWHDR )
aViewOpt.SetOption(VOPT_HEADER, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_SHEETTABS ) )
+ else if ( aPropertyName == SC_UNO_SHEETTABS )
aViewOpt.SetOption(VOPT_TABCONTROLS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_OUTLSYMB ) )
+ else if ( aPropertyName == SC_UNO_OUTLSYMB )
aViewOpt.SetOption(VOPT_OUTLINER, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_AUTOCALC ) )
+ else if ( aPropertyName == SC_UNO_AUTOCALC )
rDoc.SetAutoCalc( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_PRINTERNAME ) )
+ else if ( aPropertyName == SC_UNO_PRINTERNAME )
{
OUString sPrinterName;
if ( aValue >>= sPrinterName )
@@ -192,7 +192,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
else
throw lang::IllegalArgumentException();
}
- else if ( aPropertyName.equalsAscii( SC_UNO_PRINTERSETUP ) )
+ else if ( aPropertyName == SC_UNO_PRINTERSETUP )
{
uno::Sequence<sal_Int8> aSequence;
if ( aValue >>= aSequence )
@@ -213,47 +213,47 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
}
}
}
- else if ( aPropertyName.equalsAscii( SC_UNO_APPLYDOCINF ) )
+ else if ( aPropertyName == SC_UNO_APPLYDOCINF )
{
bool bTmp=true;
if ( aValue >>= bTmp )
pDocShell->SetUseUserData( bTmp );
}
- else if ( aPropertyName.equalsAscii( SC_UNO_FORBIDDEN ) )
+ else if ( aPropertyName == SC_UNO_FORBIDDEN )
{
// read-only - should not be set
}
- else if ( aPropertyName.equalsAscii( SC_UNO_CHARCOMP ) )
+ else if ( aPropertyName == SC_UNO_CHARCOMP )
{
// Int16 contains CharacterCompressionType values
sal_Int16 nUno = ScUnoHelpFunctions::GetInt16FromAny( aValue );
rDoc.SetAsianCompression( (sal_uInt8) nUno );
bUpdateHeights = true;
}
- else if ( aPropertyName.equalsAscii( SC_UNO_ASIANKERN ) )
+ else if ( aPropertyName == SC_UNO_ASIANKERN )
{
rDoc.SetAsianKerning( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
bUpdateHeights = true;
}
- else if ( aPropertyName.equalsAscii( SCSAVEVERSION ) )
+ else if ( aPropertyName == SCSAVEVERSION )
{
bool bTmp=false;
if ( aValue >>= bTmp )
pDocShell->SetSaveVersionOnClose( bTmp );
}
- else if ( aPropertyName.equalsAscii( SC_UNO_UPDTEMPL ) )
+ else if ( aPropertyName == SC_UNO_UPDTEMPL )
{
bool bTmp=true;
if ( aValue >>= bTmp )
pDocShell->SetQueryLoadTemplate( bTmp );
}
- else if ( aPropertyName.equalsAscii( SC_UNO_LOADREADONLY ) )
+ else if ( aPropertyName == SC_UNO_LOADREADONLY )
{
bool bTmp=false;
if ( aValue >>= bTmp )
pDocShell->SetLoadReadonly( bTmp );
}
- else if ( aPropertyName.equalsAscii( SC_UNO_SHAREDOC ) )
+ else if ( aPropertyName == SC_UNO_SHAREDOC )
{
#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
bool bDocShared = false;
@@ -263,7 +263,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
}
#endif
}
- else if ( aPropertyName.equalsAscii( SC_UNO_MODIFYPASSWORDINFO ) )
+ else if ( aPropertyName == SC_UNO_MODIFYPASSWORDINFO )
{
uno::Sequence< beans::PropertyValue > aInfo;
if ( !( aValue >>= aInfo ) )
@@ -276,7 +276,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
throw beans::PropertyVetoException(
"The hash is not allowed to be changed now!" );
}
- else if ( aPropertyName.equalsAscii( SC_UNO_EMBED_FONTS ) )
+ else if ( aPropertyName == SC_UNO_EMBED_FONTS )
{
bool bVal = false;
if ( aValue >>=bVal )
@@ -288,19 +288,19 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
else
{
ScGridOptions aGridOpt(aViewOpt.GetGridOptions());
- if ( aPropertyName.equalsAscii( SC_UNO_SNAPTORASTER ) )
+ if ( aPropertyName == SC_UNO_SNAPTORASTER )
aGridOpt.SetUseGridSnap( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERVIS ) )
+ else if ( aPropertyName == SC_UNO_RASTERVIS )
aGridOpt.SetGridVisible( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERRESX ) )
+ else if ( aPropertyName == SC_UNO_RASTERRESX )
aGridOpt.SetFldDrawX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERRESY ) )
+ else if ( aPropertyName == SC_UNO_RASTERRESY )
aGridOpt.SetFldDrawY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSUBX ) )
+ else if ( aPropertyName == SC_UNO_RASTERSUBX )
aGridOpt.SetFldDivisionX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSUBY ) )
+ else if ( aPropertyName == SC_UNO_RASTERSUBY )
aGridOpt.SetFldDivisionY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( aValue ) ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSYNC ) )
+ else if ( aPropertyName == SC_UNO_RASTERSYNC )
aGridOpt.SetSynchronize( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
else
throw beans::UnknownPropertyException();
@@ -335,35 +335,35 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
const ScViewOptions& aViewOpt = rDoc.GetViewOptions();
/*Stampit enable/disable print cancel */
- if ( aPropertyName.equalsAscii( SC_UNO_ALLOWPRINTJOBCANCEL ) )
+ if ( aPropertyName == SC_UNO_ALLOWPRINTJOBCANCEL )
ScUnoHelpFunctions::SetBoolInAny( aRet, pDocShell->Stamp_GetPrintCancelState() );
/*Stampit enable/disable print cancel */
- else if ( aPropertyName.equalsAscii( SC_UNO_SHOWZERO ) )
+ else if ( aPropertyName == SC_UNO_SHOWZERO )
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_NULLVALS ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_SHOWNOTES ) )
+ else if ( aPropertyName == SC_UNO_SHOWNOTES )
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_NOTES ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_SHOWGRID ) )
+ else if ( aPropertyName == SC_UNO_SHOWGRID )
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_GRID ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_GRIDCOLOR ) )
+ else if ( aPropertyName == SC_UNO_GRIDCOLOR )
{
OUString aColorName;
Color aColor = aViewOpt.GetGridColor(&aColorName);
aRet <<= static_cast<sal_Int64>(aColor.GetColor());
}
- else if ( aPropertyName.equalsAscii( SC_UNO_SHOWPAGEBR ) )
+ else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_PAGEBREAKS ) );
- else if ( aPropertyName.equalsAscii( SC_UNONAME_LINKUPD ) )
+ else if ( aPropertyName == SC_UNONAME_LINKUPD )
aRet <<= static_cast<sal_Int16> ( rDoc.GetLinkMode() );
- else if ( aPropertyName.equalsAscii( SC_UNO_COLROWHDR ) )
+ else if ( aPropertyName == SC_UNO_COLROWHDR )
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_HEADER ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_SHEETTABS ) )
+ else if ( aPropertyName == SC_UNO_SHEETTABS )
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_TABCONTROLS ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_OUTLSYMB ) )
+ else if ( aPropertyName == SC_UNO_OUTLSYMB )
ScUnoHelpFunctions::SetBoolInAny( aRet, aViewOpt.GetOption( VOPT_OUTLINER ) );
- else if ( aPropertyName.equalsAscii( SC_UNO_AUTOCALC ) )
+ else if ( aPropertyName == SC_UNO_AUTOCALC )
ScUnoHelpFunctions::SetBoolInAny( aRet, rDoc.GetAutoCalc() );
- else if ( aPropertyName.equalsAscii( SC_UNO_PRINTERNAME ) )
+ else if ( aPropertyName == SC_UNO_PRINTERNAME )
{
// #i75610# don't create the printer, return empty string if no printer created yet
// (as in SwXDocumentSettings)
@@ -373,7 +373,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
else
aRet <<= OUString();
}
- else if ( aPropertyName.equalsAscii( SC_UNO_PRINTERSETUP ) )
+ else if ( aPropertyName == SC_UNO_PRINTERSETUP )
{
// #i75610# don't create the printer, return empty sequence if no printer created yet
// (as in SwXDocumentSettings)
@@ -392,31 +392,31 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
else
aRet <<= uno::Sequence<sal_Int8>();
}
- else if ( aPropertyName.equalsAscii( SC_UNO_APPLYDOCINF ) )
+ else if ( aPropertyName == SC_UNO_APPLYDOCINF )
aRet <<= pDocShell->IsUseUserData();
- else if ( aPropertyName.equalsAscii( SC_UNO_FORBIDDEN ) )
+ else if ( aPropertyName == SC_UNO_FORBIDDEN )
{
aRet <<= uno::Reference<i18n::XForbiddenCharacters>(new ScForbiddenCharsObj( pDocShell ));
}
- else if ( aPropertyName.equalsAscii( SC_UNO_CHARCOMP ) )
+ else if ( aPropertyName == SC_UNO_CHARCOMP )
aRet <<= static_cast<sal_Int16> ( rDoc.GetAsianCompression() );
- else if ( aPropertyName.equalsAscii( SC_UNO_ASIANKERN ) )
+ else if ( aPropertyName == SC_UNO_ASIANKERN )
ScUnoHelpFunctions::SetBoolInAny( aRet, rDoc.GetAsianKerning() );
- else if ( aPropertyName.equalsAscii( SCSAVEVERSION ) )
+ else if ( aPropertyName == SCSAVEVERSION )
aRet <<= pDocShell->IsSaveVersionOnClose();
- else if ( aPropertyName.equalsAscii( SC_UNO_UPDTEMPL ) )
+ else if ( aPropertyName == SC_UNO_UPDTEMPL )
aRet <<= pDocShell->IsQueryLoadTemplate();
- else if ( aPropertyName.equalsAscii( SC_UNO_LOADREADONLY ) )
+ else if ( aPropertyName == SC_UNO_LOADREADONLY )
aRet <<= pDocShell->IsLoadReadonly();
- else if ( aPropertyName.equalsAscii( SC_UNO_SHAREDOC ) )
+ else if ( aPropertyName == SC_UNO_SHAREDOC )
{
#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
ScUnoHelpFunctions::SetBoolInAny( aRet, pDocShell->HasSharedXMLFlagSet() );
#endif
}
- else if ( aPropertyName.equalsAscii( SC_UNO_MODIFYPASSWORDINFO ) )
+ else if ( aPropertyName == SC_UNO_MODIFYPASSWORDINFO )
aRet <<= pDocShell->GetModifyPasswordInfo();
- else if ( aPropertyName.equalsAscii( SC_UNO_EMBED_FONTS ) )
+ else if ( aPropertyName == SC_UNO_EMBED_FONTS )
{
aRet <<= rDoc.IsUsingEmbededFonts();
}
@@ -424,19 +424,19 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
else
{
const ScGridOptions& aGridOpt = aViewOpt.GetGridOptions();
- if ( aPropertyName.equalsAscii( SC_UNO_SNAPTORASTER ) )
+ if ( aPropertyName == SC_UNO_SNAPTORASTER )
ScUnoHelpFunctions::SetBoolInAny( aRet, aGridOpt.GetUseGridSnap() );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERVIS ) )
+ else if ( aPropertyName == SC_UNO_RASTERVIS )
ScUnoHelpFunctions::SetBoolInAny( aRet, aGridOpt.GetGridVisible() );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERRESX ) )
+ else if ( aPropertyName == SC_UNO_RASTERRESX )
aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFldDrawX() );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERRESY ) )
+ else if ( aPropertyName == SC_UNO_RASTERRESY )
aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFldDrawY() );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSUBX ) )
+ else if ( aPropertyName == SC_UNO_RASTERSUBX )
aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFldDivisionX() );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSUBY ) )
+ else if ( aPropertyName == SC_UNO_RASTERSUBY )
aRet <<= static_cast<sal_Int32> ( aGridOpt.GetFldDivisionY() );
- else if ( aPropertyName.equalsAscii( SC_UNO_RASTERSYNC ) )
+ else if ( aPropertyName == SC_UNO_RASTERSYNC )
ScUnoHelpFunctions::SetBoolInAny( aRet, aGridOpt.GetSynchronize() );
else
throw beans::UnknownPropertyException();
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 57d055994913..3ccacbb06b3d 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -760,37 +760,37 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp
ScDPSaveData aNewData( *pOldData );
OUString aNameString = aPropertyName;
- if ( aNameString.equalsAscii( SC_UNO_DP_COLGRAND ) )
+ if ( aNameString == SC_UNO_DP_COLGRAND )
{
aNewData.SetColumnGrand(::cppu::any2bool( aValue ));
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_IGNORE_EMPTYROWS ) )
+ else if ( aNameString == SC_UNO_DP_IGNORE_EMPTYROWS )
{
aNewData.SetIgnoreEmptyRows(::cppu::any2bool( aValue ));
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_REPEATEMPTY ) )
+ else if ( aNameString == SC_UNO_DP_REPEATEMPTY )
{
aNewData.SetRepeatIfEmpty(::cppu::any2bool( aValue ));
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_ROWGRAND ) )
+ else if ( aNameString == SC_UNO_DP_ROWGRAND )
{
aNewData.SetRowGrand(::cppu::any2bool( aValue ));
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_SHOWFILTER ) )
+ else if ( aNameString == SC_UNO_DP_SHOWFILTER )
{
aNewData.SetFilterButton(::cppu::any2bool( aValue ));
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_DRILLDOWN ) )
+ else if ( aNameString == SC_UNO_DP_DRILLDOWN )
{
aNewData.SetDrillDown(::cppu::any2bool( aValue ));
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_GRANDTOTAL_NAME ) )
+ else if ( aNameString == SC_UNO_DP_GRANDTOTAL_NAME )
{
OUString aStrVal;
if ( aValue >>= aStrVal )
aNewData.SetGrandTotalName(aStrVal);
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_IMPORTDESC ) )
+ else if ( aNameString == SC_UNO_DP_IMPORTDESC )
{
uno::Sequence<beans::PropertyValue> aArgSeq;
if ( aValue >>= aArgSeq )
@@ -822,7 +822,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp
pDPObject->SetImportDesc( aImportDesc );
}
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_SOURCESERVICE ) )
+ else if ( aNameString == SC_UNO_DP_SOURCESERVICE )
{
OUString aStrVal;
if ( aValue >>= aStrVal )
@@ -839,7 +839,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp
pDPObject->SetServiceData( aServiceDesc );
}
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_SERVICEARG ) )
+ else if ( aNameString == SC_UNO_DP_SERVICEARG )
{
uno::Sequence<beans::PropertyValue> aArgSeq;
if ( aValue >>= aArgSeq )
@@ -858,22 +858,22 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp
const beans::PropertyValue& rProp = aArgSeq[nArgPos];
OUString aPropName(rProp.Name);
- if (aPropName.equalsAscii( SC_UNO_DP_SOURCENAME ))
+ if (aPropName == SC_UNO_DP_SOURCENAME)
{
if ( rProp.Value >>= aStrVal )
aServiceDesc.aParSource = aStrVal;
}
- else if (aPropName.equalsAscii( SC_UNO_DP_OBJECTNAME ))
+ else if (aPropName == SC_UNO_DP_OBJECTNAME)
{
if ( rProp.Value >>= aStrVal )
aServiceDesc.aParName = aStrVal;
}
- else if (aPropName.equalsAscii( SC_UNO_DP_USERNAME ))
+ else if (aPropName == SC_UNO_DP_USERNAME)
{
if ( rProp.Value >>= aStrVal )
aServiceDesc.aParUser = aStrVal;
}
- else if (aPropName.equalsAscii( SC_UNO_DP_PASSWORD ))
+ else if (aPropName == SC_UNO_DP_PASSWORD)
{
if ( rProp.Value >>= aStrVal )
aServiceDesc.aParPass = aStrVal;
@@ -910,37 +910,37 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope
ScDPSaveData aNewData( *pOldData );
OUString aNameString = aPropertyName;
- if ( aNameString.equalsAscii( SC_UNO_DP_COLGRAND ) )
+ if ( aNameString == SC_UNO_DP_COLGRAND )
{
aRet <<= aNewData.GetColumnGrand();
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_IGNORE_EMPTYROWS ) )
+ else if ( aNameString == SC_UNO_DP_IGNORE_EMPTYROWS )
{
aRet <<= aNewData.GetIgnoreEmptyRows();
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_REPEATEMPTY ) )
+ else if ( aNameString == SC_UNO_DP_REPEATEMPTY )
{
aRet <<= aNewData.GetRepeatIfEmpty();
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_ROWGRAND ) )
+ else if ( aNameString == SC_UNO_DP_ROWGRAND )
{
aRet <<= aNewData.GetRowGrand();
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_SHOWFILTER ) )
+ else if ( aNameString == SC_UNO_DP_SHOWFILTER )
{
aRet <<= aNewData.GetFilterButton();
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_DRILLDOWN ) )
+ else if ( aNameString == SC_UNO_DP_DRILLDOWN )
{
aRet <<= aNewData.GetDrillDown();
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_GRANDTOTAL_NAME ) )
+ else if ( aNameString == SC_UNO_DP_GRANDTOTAL_NAME )
{
const OUString* pGrandTotalName = aNewData.GetGrandTotalName();
if (pGrandTotalName)
aRet <<= *pGrandTotalName; // same behavior as in ScDPSource
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_IMPORTDESC ) )
+ else if ( aNameString == SC_UNO_DP_IMPORTDESC )
{
const ScImportSourceDesc* pImportDesc = pDPObject->GetImportSourceDesc();
if ( pImportDesc )
@@ -965,7 +965,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope
aRet <<= aEmpty;
}
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_SOURCESERVICE ) )
+ else if ( aNameString == SC_UNO_DP_SOURCESERVICE )
{
OUString aServiceName;
const ScDPServiceDesc* pServiceDesc = pDPObject->GetDPServiceDesc();
@@ -973,7 +973,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope
aServiceName = pServiceDesc->aServiceName;
aRet <<= aServiceName; // empty string if no ServiceDesc set
}
- else if ( aNameString.equalsAscii( SC_UNO_DP_SERVICEARG ) )
+ else if ( aNameString == SC_UNO_DP_SERVICEARG )
{
const ScDPServiceDesc* pServiceDesc = pDPObject->GetDPServiceDesc();
if (pServiceDesc)
@@ -1867,92 +1867,92 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
{
SolarMutexGuard aGuard;
OUString aNameString(aPropertyName);
- if ( aNameString.equalsAscii( SC_UNONAME_FUNCTION ) )
+ if ( aNameString == SC_UNONAME_FUNCTION )
{
// #i109350# use GetEnumFromAny because it also allows sal_Int32
GeneralFunction eFunction = (GeneralFunction)
ScUnoHelpFunctions::GetEnumFromAny( aValue );
setFunction( eFunction );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_SUBTOTALS ) )
+ else if ( aNameString == SC_UNONAME_SUBTOTALS )
{
Sequence< GeneralFunction > aSubtotals;
if( aValue >>= aSubtotals )
setSubtotals( aSubtotals );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_ORIENT ) )
+ else if ( aNameString == SC_UNONAME_ORIENT )
{
//! test for correct enum type?
DataPilotFieldOrientation eOrient = (DataPilotFieldOrientation)
ScUnoHelpFunctions::GetEnumFromAny( aValue );
setOrientation( eOrient );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_SELPAGE ) )
+ else if ( aNameString == SC_UNONAME_SELPAGE )
{
OUString sCurrentPage;
if (aValue >>= sCurrentPage)
setCurrentPage(sCurrentPage);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_USESELPAGE ) )
+ else if ( aNameString == SC_UNONAME_USESELPAGE )
{
setUseCurrentPage(cppu::any2bool(aValue));
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HASAUTOSHOW ) )
+ else if ( aNameString == SC_UNONAME_HASAUTOSHOW )
{
if (!cppu::any2bool(aValue))
setAutoShowInfo(NULL);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_AUTOSHOW ) )
+ else if ( aNameString == SC_UNONAME_AUTOSHOW )
{
DataPilotFieldAutoShowInfo aInfo;
if (aValue >>= aInfo)
setAutoShowInfo(&aInfo);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HASLAYOUTINFO ) )
+ else if ( aNameString == SC_UNONAME_HASLAYOUTINFO )
{
if (!cppu::any2bool(aValue))
setLayoutInfo(NULL);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_LAYOUTINFO ) )
+ else if ( aNameString == SC_UNONAME_LAYOUTINFO )
{
DataPilotFieldLayoutInfo aInfo;
if (aValue >>= aInfo)
setLayoutInfo(&aInfo);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HASREFERENCE ) )
+ else if ( aNameString == SC_UNONAME_HASREFERENCE )
{
if (!cppu::any2bool(aValue))
setReference(NULL);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_REFERENCE ) )
+ else if ( aNameString == SC_UNONAME_REFERENCE )
{
DataPilotFieldReference aRef;
if (aValue >>= aRef)
setReference(&aRef);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HASSORTINFO ) )
+ else if ( aNameString == SC_UNONAME_HASSORTINFO )
{
if (!cppu::any2bool(aValue))
setSortInfo(NULL);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_SORTINFO ) )
+ else if ( aNameString == SC_UNONAME_SORTINFO )
{
DataPilotFieldSortInfo aInfo;
if (aValue >>= aInfo)
setSortInfo(&aInfo);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_ISGROUP ) )
+ else if ( aNameString == SC_UNONAME_ISGROUP )
{
if (!cppu::any2bool(aValue))
setGroupInfo(NULL);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_GROUPINFO ) )
+ else if ( aNameString == SC_UNONAME_GROUPINFO )
{
DataPilotFieldGroupInfo aInfo;
if (aValue >>= aInfo)
setGroupInfo(&aInfo);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_SHOWEMPTY ) )
+ else if ( aNameString == SC_UNONAME_SHOWEMPTY )
{
setShowEmpty(cppu::any2bool(aValue));
}
@@ -1966,55 +1966,55 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
OUString aNameString(aPropertyName);
Any aRet;
- if ( aNameString.equalsAscii( SC_UNONAME_FUNCTION ) )
+ if ( aNameString == SC_UNONAME_FUNCTION )
aRet <<= getFunction();
- else if ( aNameString.equalsAscii( SC_UNONAME_SUBTOTALS ) )
+ else if ( aNameString == SC_UNONAME_SUBTOTALS )
aRet <<= getSubtotals();
- else if ( aNameString.equalsAscii( SC_UNONAME_ORIENT ) )
+ else if ( aNameString == SC_UNONAME_ORIENT )
aRet <<= getOrientation();
- else if ( aNameString.equalsAscii( SC_UNONAME_SELPAGE ) )
+ else if ( aNameString == SC_UNONAME_SELPAGE )
aRet <<= getCurrentPage();
- else if ( aNameString.equalsAscii( SC_UNONAME_USESELPAGE ) )
+ else if ( aNameString == SC_UNONAME_USESELPAGE )
aRet <<= getUseCurrentPage();
- else if ( aNameString.equalsAscii( SC_UNONAME_HASAUTOSHOW ) )
+ else if ( aNameString == SC_UNONAME_HASAUTOSHOW )
aRet <<= (getAutoShowInfo() != NULL);
- else if ( aNameString.equalsAscii( SC_UNONAME_AUTOSHOW ) )
+ else if ( aNameString == SC_UNONAME_AUTOSHOW )
{
const DataPilotFieldAutoShowInfo* pInfo = getAutoShowInfo();
if (pInfo)
aRet <<= DataPilotFieldAutoShowInfo(*pInfo);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HASLAYOUTINFO ) )
+ else if ( aNameString == SC_UNONAME_HASLAYOUTINFO )
aRet <<= (getLayoutInfo() != NULL);
- else if ( aNameString.equalsAscii( SC_UNONAME_LAYOUTINFO ) )
+ else if ( aNameString == SC_UNONAME_LAYOUTINFO )
{
const DataPilotFieldLayoutInfo* pInfo = getLayoutInfo();
if (pInfo)
aRet <<= DataPilotFieldLayoutInfo(*pInfo);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HASREFERENCE ) )
+ else if ( aNameString == SC_UNONAME_HASREFERENCE )
aRet <<= (getReference() != NULL);
- else if ( aNameString.equalsAscii( SC_UNONAME_REFERENCE ) )
+ else if ( aNameString == SC_UNONAME_REFERENCE )
{
const DataPilotFieldReference* pRef = getReference();
if (pRef)
aRet <<= DataPilotFieldReference(*pRef);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HASSORTINFO ) )
+ else if ( aNameString == SC_UNONAME_HASSORTINFO )
aRet <<= (getSortInfo() != NULL);
- else if ( aNameString.equalsAscii( SC_UNONAME_SORTINFO ) )
+ else if ( aNameString == SC_UNONAME_SORTINFO )
{
const DataPilotFieldSortInfo* pInfo = getSortInfo();
if (pInfo)
aRet <<= DataPilotFieldSortInfo(*pInfo);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_ISGROUP ) )
+ else if ( aNameString == SC_UNONAME_ISGROUP )
aRet <<= (hasGroupInfo());
- else if ( aNameString.equalsAscii( SC_UNONAME_GROUPINFO ) )
+ else if ( aNameString == SC_UNONAME_GROUPINFO )
{
aRet <<= getGroupInfo();
}
- else if ( aNameString.equalsAscii( SC_UNONAME_SHOWEMPTY ) )
+ else if ( aNameString == SC_UNONAME_SHOWEMPTY )
aRet <<= getShowEmpty();
return aRet;
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index f79d7866fb66..d4fb7721dfa2 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -215,24 +215,24 @@ void ScImportDescriptor::FillImportParam( ScImportParam& rParam, const uno::Sequ
const beans::PropertyValue& rProp = pPropArray[i];
OUString aPropName(rProp.Name);
- if (aPropName.equalsAscii( SC_UNONAME_ISNATIVE ))
+ if (aPropName == SC_UNONAME_ISNATIVE)
rParam.bNative = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( SC_UNONAME_DBNAME ))
+ else if (aPropName == SC_UNONAME_DBNAME)
{
if ( rProp.Value >>= aStrVal )
rParam.aDBName = aStrVal;
}
- else if (aPropName.equalsAscii( SC_UNONAME_CONRES ))
+ else if (aPropName == SC_UNONAME_CONRES)
{
if ( rProp.Value >>= aStrVal )
rParam.aDBName = aStrVal;
}
- else if (aPropName.equalsAscii( SC_UNONAME_SRCOBJ ))
+ else if (aPropName == SC_UNONAME_SRCOBJ)
{
if ( rProp.Value >>= aStrVal )
rParam.aStatement = aStrVal;
}
- else if (aPropName.equalsAscii( SC_UNONAME_SRCTYPE ))
+ else if (aPropName == SC_UNONAME_SRCTYPE)
{
//! test for correct enum type?
sheet::DataImportMode eMode = (sheet::DataImportMode)
@@ -346,20 +346,20 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
const beans::PropertyValue& rProp = pPropArray[nProp];
OUString aPropName(rProp.Name);
- if (aPropName.equalsAscii( SC_UNONAME_ORIENT ))
+ if (aPropName == SC_UNONAME_ORIENT)
{
//! test for correct enum type?
table::TableOrientation eOrient = (table::TableOrientation)
ScUnoHelpFunctions::GetEnumFromAny( rProp.Value );
rParam.bByRow = ( eOrient != table::TableOrientation_COLUMNS );
}
- else if (aPropName.equalsAscii( SC_UNONAME_ISSORTCOLUMNS ))
+ else if (aPropName == SC_UNONAME_ISSORTCOLUMNS)
{
rParam.bByRow = !::cppu::any2bool(rProp.Value);
}
- else if (aPropName.equalsAscii( SC_UNONAME_CONTHDR ))
+ else if (aPropName == SC_UNONAME_CONTHDR)
rParam.bHasHeader = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( SC_UNONAME_MAXFLD ))
+ else if (aPropName == SC_UNONAME_MAXFLD)
{
sal_Int32 nVal;
if ( (rProp.Value >>= nVal) && nVal > nSortSize )
@@ -368,7 +368,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
//! throw lang::IllegalArgumentException();
}
}
- else if (aPropName.equalsAscii( SC_UNONAME_SORTFLD ))
+ else if (aPropName == SC_UNONAME_SORTFLD)
{
uno::Sequence<util::SortField> aSeq;
uno::Sequence<table::TableSortField> aNewSeq;
@@ -420,15 +420,15 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
rParam.maKeyState[i].bDoSort = false;
}
}
- else if (aPropName.equalsAscii( SC_UNONAME_ISCASE ))
+ else if (aPropName == SC_UNONAME_ISCASE)
{
rParam.bCaseSens = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
}
- else if (aPropName.equalsAscii( SC_UNONAME_BINDFMT ))
+ else if (aPropName == SC_UNONAME_BINDFMT)
rParam.bIncludePattern = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( SC_UNONAME_COPYOUT ))
+ else if (aPropName == SC_UNONAME_COPYOUT)
rParam.bInplace = !ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( SC_UNONAME_OUTPOS ))
+ else if (aPropName == SC_UNONAME_OUTPOS)
{
table::CellAddress aAddress;
if ( rProp.Value >>= aAddress )
@@ -438,19 +438,19 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
rParam.nDestRow = (SCROW)aAddress.Row;
}
}
- else if (aPropName.equalsAscii( SC_UNONAME_ISULIST ))
+ else if (aPropName == SC_UNONAME_ISULIST)
rParam.bUserDef = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( SC_UNONAME_UINDEX ))
+ else if (aPropName == SC_UNONAME_UINDEX)
{
sal_Int32 nVal = 0;
if ( rProp.Value >>= nVal )
rParam.nUserIndex = (sal_uInt16)nVal;
}
- else if (aPropName.equalsAscii( SC_UNONAME_COLLLOC ))
+ else if (aPropName == SC_UNONAME_COLLLOC)
{
rProp.Value >>= rParam.aCollatorLocale;
}
- else if (aPropName.equalsAscii( SC_UNONAME_COLLALG ))
+ else if (aPropName == SC_UNONAME_COLLALG)
{
OUString sStr;
if ( rProp.Value >>= sStr )
@@ -702,25 +702,25 @@ void SAL_CALL ScSubTotalDescriptorBase::setPropertyValue(
// some old property names are for 5.2 compatibility
- if (aString.equalsAscii( SC_UNONAME_CASE ) || aString.equalsAscii( SC_UNONAME_ISCASE ))
+ if (aString == SC_UNONAME_CASE || aString == SC_UNONAME_ISCASE )
aParam.bCaseSens = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if (aString.equalsAscii( SC_UNONAME_FORMATS ) || aString.equalsAscii( SC_UNONAME_BINDFMT ))
+ else if (aString == SC_UNONAME_FORMATS || aString == SC_UNONAME_BINDFMT )
aParam.bIncludePattern = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if (aString.equalsAscii( SC_UNONAME_ENABSORT ))
+ else if (aString == SC_UNONAME_ENABSORT )
aParam.bDoSort = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if (aString.equalsAscii( SC_UNONAME_SORTASC ))
+ else if (aString == SC_UNONAME_SORTASC )
aParam.bAscending = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if (aString.equalsAscii( SC_UNONAME_INSBRK ))
+ else if (aString == SC_UNONAME_INSBRK )
aParam.bPagebreak = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if (aString.equalsAscii( SC_UNONAME_ULIST ) || aString.equalsAscii( SC_UNONAME_ENUSLIST ))
+ else if (aString == SC_UNONAME_ULIST || aString == SC_UNONAME_ENUSLIST )
aParam.bUserDef = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if (aString.equalsAscii( SC_UNONAME_UINDEX ) || aString.equalsAscii( SC_UNONAME_USINDEX ))
+ else if (aString == SC_UNONAME_UINDEX || aString == SC_UNONAME_USINDEX )
{
sal_Int32 nVal = 0;
if ( aValue >>= nVal )
aParam.nUserIndex = (sal_uInt16)nVal;
}
- else if (aString.equalsAscii( SC_UNONAME_MAXFLD ))
+ else if (aString == SC_UNONAME_MAXFLD )
{
sal_Int32 nVal = 0;
if ( (aValue >>= nVal) && nVal > sal::static_int_cast<sal_Int32>(MAXSUBTOTAL) )
@@ -745,21 +745,21 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getPropertyValue( const OUString& aP
// some old property names are for 5.2 compatibility
- if (aString.equalsAscii( SC_UNONAME_CASE ) || aString.equalsAscii( SC_UNONAME_ISCASE ))
+ if (aString == SC_UNONAME_CASE || aString == SC_UNONAME_ISCASE )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bCaseSens );
- else if (aString.equalsAscii( SC_UNONAME_FORMATS ) || aString.equalsAscii( SC_UNONAME_BINDFMT ))
+ else if (aString == SC_UNONAME_FORMATS || aString == SC_UNONAME_BINDFMT )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bIncludePattern );
- else if (aString.equalsAscii( SC_UNONAME_ENABSORT ))
+ else if (aString == SC_UNONAME_ENABSORT )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bDoSort );
- else if (aString.equalsAscii( SC_UNONAME_SORTASC ))
+ else if (aString == SC_UNONAME_SORTASC )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bAscending );
- else if (aString.equalsAscii( SC_UNONAME_INSBRK ))
+ else if (aString == SC_UNONAME_INSBRK )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bPagebreak );
- else if (aString.equalsAscii( SC_UNONAME_ULIST ) || aString.equalsAscii( SC_UNONAME_ENUSLIST ))
+ else if (aString == SC_UNONAME_ULIST || aString == SC_UNONAME_ENUSLIST )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bUserDef );
- else if (aString.equalsAscii( SC_UNONAME_UINDEX ) || aString.equalsAscii( SC_UNONAME_USINDEX ))
+ else if (aString == SC_UNONAME_UINDEX || aString == SC_UNONAME_USINDEX )
aRet <<= (sal_Int32) aParam.nUserIndex;
- else if (aString.equalsAscii( SC_UNONAME_MAXFLD ))
+ else if (aString == SC_UNONAME_MAXFLD )
aRet <<= (sal_Int32) MAXSUBTOTAL;
return aRet;
@@ -1459,24 +1459,24 @@ void SAL_CALL ScFilterDescriptorBase::setPropertyValue(
GetData(aParam);
OUString aString(aPropertyName);
- if (aString.equalsAscii( SC_UNONAME_CONTHDR ))
+ if (aString == SC_UNONAME_CONTHDR)
aParam.bHasHeader = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if (aString.equalsAscii( SC_UNONAME_COPYOUT ))
+ else if (aString == SC_UNONAME_COPYOUT)
aParam.bInplace = !(ScUnoHelpFunctions::GetBoolFromAny( aValue ));
- else if (aString.equalsAscii( SC_UNONAME_ISCASE ))
+ else if (aString == SC_UNONAME_ISCASE)
aParam.bCaseSens = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if (aString.equalsAscii( SC_UNONAME_MAXFLD ))
+ else if (aString == SC_UNONAME_MAXFLD)
{
// silently ignored
}
- else if (aString.equalsAscii( SC_UNONAME_ORIENT ))
+ else if (aString == SC_UNONAME_ORIENT)
{
//! test for correct enum type?
table::TableOrientation eOrient = (table::TableOrientation)
ScUnoHelpFunctions::GetEnumFromAny( aValue );
aParam.bByRow = ( eOrient != table::TableOrientation_COLUMNS );
}
- else if (aString.equalsAscii( SC_UNONAME_OUTPOS ))
+ else if (aString == SC_UNONAME_OUTPOS)
{
table::CellAddress aAddress;
if ( aValue >>= aAddress )
@@ -1486,11 +1486,11 @@ void SAL_CALL ScFilterDescriptorBase::setPropertyValue(
aParam.nDestRow = (SCROW)aAddress.Row;
}
}
- else if (aString.equalsAscii( SC_UNONAME_SAVEOUT ))
+ else if (aString == SC_UNONAME_SAVEOUT)
aParam.bDestPers = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if (aString.equalsAscii( SC_UNONAME_SKIPDUP ))
+ else if (aString == SC_UNONAME_SKIPDUP)
aParam.bDuplicate = !(ScUnoHelpFunctions::GetBoolFromAny( aValue ));
- else if (aString.equalsAscii( SC_UNONAME_USEREGEX ))
+ else if (aString == SC_UNONAME_USEREGEX)
aParam.bRegExp = ScUnoHelpFunctions::GetBoolFromAny( aValue );
PutData(aParam);
@@ -1507,21 +1507,21 @@ uno::Any SAL_CALL ScFilterDescriptorBase::getPropertyValue( const OUString& aPro
OUString aString(aPropertyName);
uno::Any aRet;
- if (aString.equalsAscii( SC_UNONAME_CONTHDR ))
+ if (aString == SC_UNONAME_CONTHDR )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bHasHeader );
- else if (aString.equalsAscii( SC_UNONAME_COPYOUT ))
+ else if (aString == SC_UNONAME_COPYOUT )
ScUnoHelpFunctions::SetBoolInAny( aRet, !(aParam.bInplace) );
- else if (aString.equalsAscii( SC_UNONAME_ISCASE ))
+ else if (aString == SC_UNONAME_ISCASE )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bCaseSens );
- else if (aString.equalsAscii( SC_UNONAME_MAXFLD ))
+ else if (aString == SC_UNONAME_MAXFLD )
aRet <<= (sal_Int32) aParam.GetEntryCount();
- else if (aString.equalsAscii( SC_UNONAME_ORIENT ))
+ else if (aString == SC_UNONAME_ORIENT )
{
table::TableOrientation eOrient = aParam.bByRow ? table::TableOrientation_ROWS :
table::TableOrientation_COLUMNS;
aRet <<= eOrient;
}
- else if (aString.equalsAscii( SC_UNONAME_OUTPOS ))
+ else if (aString == SC_UNONAME_OUTPOS )
{
table::CellAddress aOutPos;
aOutPos.Sheet = aParam.nDestTab;
@@ -1529,11 +1529,11 @@ uno::Any SAL_CALL ScFilterDescriptorBase::getPropertyValue( const OUString& aPro
aOutPos.Row = aParam.nDestRow;
aRet <<= aOutPos;
}
- else if (aString.equalsAscii( SC_UNONAME_SAVEOUT ))
+ else if (aString == SC_UNONAME_SAVEOUT )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bDestPers );
- else if (aString.equalsAscii( SC_UNONAME_SKIPDUP ))
+ else if (aString == SC_UNONAME_SKIPDUP )
ScUnoHelpFunctions::SetBoolInAny( aRet, !(aParam.bDuplicate) );
- else if (aString.equalsAscii( SC_UNONAME_USEREGEX ))
+ else if (aString == SC_UNONAME_USEREGEX )
ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bRegExp );
return aRet;
@@ -2030,13 +2030,13 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
bool bDo = true;
OUString aString(aPropertyName);
- if ( aString.equalsAscii( SC_UNONAME_KEEPFORM ) )
+ if ( aString == SC_UNONAME_KEEPFORM )
aNewData.SetKeepFmt( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNONAME_MOVCELLS ) )
+ else if ( aString == SC_UNONAME_MOVCELLS )
aNewData.SetDoSize( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNONAME_STRIPDAT ) )
+ else if ( aString == SC_UNONAME_STRIPDAT )
aNewData.SetStripData( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNONAME_AUTOFLT ))
+ else if (aString == SC_UNONAME_AUTOFLT )
{
bool bAutoFilter(ScUnoHelpFunctions::GetBoolFromAny( aValue ));
aNewData.SetAutoFilter(bAutoFilter);
@@ -2055,7 +2055,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
aPaintRange.aEnd.SetRow(aPaintRange.aStart.Row());
pDocShell->PostPaint(aPaintRange, PAINT_GRID);
}
- else if (aString.equalsAscii( SC_UNONAME_USEFLTCRT ))
+ else if (aString == SC_UNONAME_USEFLTCRT )
{
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -2067,7 +2067,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
else
aNewData.SetAdvancedQuerySource(NULL);
}
- else if (aString.equalsAscii( SC_UNONAME_FLTCRT ))
+ else if (aString == SC_UNONAME_FLTCRT )
{
table::CellRangeAddress aRange;
if (aValue >>= aRange)
@@ -2078,11 +2078,11 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
aNewData.SetAdvancedQuerySource(&aCoreRange);
}
}
- else if (aString.equalsAscii( SC_UNONAME_FROMSELECT ))
+ else if (aString == SC_UNONAME_FROMSELECT )
{
aNewData.SetImportSelection(::cppu::any2bool(aValue));
}
- else if (aString.equalsAscii( SC_UNONAME_REFPERIOD ))
+ else if (aString == SC_UNONAME_REFPERIOD )
{
sal_Int32 nRefresh = 0;
if (aValue >>= nRefresh)
@@ -2096,7 +2096,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
}
}
}
- else if (aString.equalsAscii( SC_UNONAME_CONRES ))
+ else if (aString == SC_UNONAME_CONRES )
{
}
else
@@ -2120,39 +2120,39 @@ uno::Any SAL_CALL ScDatabaseRangeObj::getPropertyValue( const OUString& aPropert
if ( pData )
{
OUString aString(aPropertyName);
- if ( aString.equalsAscii( SC_UNONAME_KEEPFORM ) )
+ if ( aString == SC_UNONAME_KEEPFORM )
ScUnoHelpFunctions::SetBoolInAny( aRet, pData->IsKeepFmt() );
- else if ( aString.equalsAscii( SC_UNONAME_MOVCELLS ) )
+ else if ( aString == SC_UNONAME_MOVCELLS )
ScUnoHelpFunctions::SetBoolInAny( aRet, pData->IsDoSize() );
- else if ( aString.equalsAscii( SC_UNONAME_STRIPDAT ) )
+ else if ( aString == SC_UNONAME_STRIPDAT )
ScUnoHelpFunctions::SetBoolInAny( aRet, pData->IsStripData() );
- else if ( aString.equalsAscii( SC_UNONAME_ISUSER ) )
+ else if ( aString == SC_UNONAME_ISUSER )
{
// all database ranges except "unnamed" are user defined
ScUnoHelpFunctions::SetBoolInAny(
- aRet, !pData->GetName().equalsAscii(STR_DB_LOCAL_NONAME));
+ aRet, pData->GetName() != STR_DB_LOCAL_NONAME);
}
- else if ( aString.equalsAscii( SC_UNO_LINKDISPBIT ) )
+ else if ( aString == SC_UNO_LINKDISPBIT )
{
// no target bitmaps for individual entries (would be all equal)
// ScLinkTargetTypeObj::SetLinkTargetBitmap( aRet, SC_LINKTARGETTYPE_DBAREA );
}
- else if ( aString.equalsAscii( SC_UNO_LINKDISPNAME ) )
+ else if ( aString == SC_UNO_LINKDISPNAME )
aRet <<= OUString( aName );
- else if (aString.equalsAscii( SC_UNONAME_AUTOFLT ))
+ else if (aString == SC_UNONAME_AUTOFLT )
{
bool bAutoFilter(GetDBData_Impl()->HasAutoFilter());
ScUnoHelpFunctions::SetBoolInAny( aRet, bAutoFilter );
}
- else if (aString.equalsAscii( SC_UNONAME_USEFLTCRT ))
+ else if (aString == SC_UNONAME_USEFLTCRT )
{
ScRange aRange;
bool bIsAdvancedSource(GetDBData_Impl()->GetAdvancedQuerySource(aRange));
ScUnoHelpFunctions::SetBoolInAny( aRet, bIsAdvancedSource );
}
- else if (aString.equalsAscii( SC_UNONAME_FLTCRT ))
+ else if (aString == SC_UNONAME_FLTCRT )
{
table::CellRangeAddress aRange;
ScRange aCoreRange;
@@ -2161,19 +2161,19 @@ uno::Any SAL_CALL ScDatabaseRangeObj::getPropertyValue( const OUString& aPropert
aRet <<= aRange;
}
- else if (aString.equalsAscii( SC_UNONAME_FROMSELECT ))
+ else if (aString == SC_UNONAME_FROMSELECT )
{
ScUnoHelpFunctions::SetBoolInAny( aRet, GetDBData_Impl()->HasImportSelection() );
}
- else if (aString.equalsAscii( SC_UNONAME_REFPERIOD ))
+ else if (aString == SC_UNONAME_REFPERIOD )
{
sal_Int32 nRefresh(GetDBData_Impl()->GetRefreshDelay());
aRet <<= nRefresh;
}
- else if (aString.equalsAscii( SC_UNONAME_CONRES ))
+ else if (aString == SC_UNONAME_CONRES )
{
}
- else if (aString.equalsAscii( SC_UNONAME_TOKENINDEX ))
+ else if (aString == SC_UNONAME_TOKENINDEX )
{
// get index for use in formula tokens (read-only)
aRet <<= static_cast<sal_Int32>(GetDBData_Impl()->GetIndex());
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index 0fb8f8f9dd77..9e3b939c03d1 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -134,7 +134,7 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
throw beans::UnknownPropertyException();
if(!pEntry->nWID)
{
- if(aPropertyName.equalsAscii(SC_UNO_STANDARDDEC) )
+ if(aPropertyName ==SC_UNO_STANDARDDEC)
{
ScDocument& rDoc = pDocShell->GetDocument();
ScDocOptions aDocOpt(rDoc.GetDocOptions());
@@ -145,7 +145,7 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
rDoc.SetDocOptions(aDocOpt);
}
}
- else if (aPropertyName.equalsAscii(SC_UNO_TABSTOPDIS) )
+ else if (aPropertyName == SC_UNO_TABSTOPDIS)
{
ScDocument& rDoc = pDocShell->GetDocument();
ScDocOptions aDocOpt(rDoc.GetDocOptions());
@@ -220,7 +220,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyValue( const OUString& aPropertyN
if (!pEntry->nWID)
{
- if(aPropertyName.equalsAscii(SC_UNO_STANDARDDEC) )
+ if(aPropertyName == SC_UNO_STANDARDDEC)
{
ScDocument& rDoc = pDocShell->GetDocument();
const ScDocOptions& aDocOpt = rDoc.GetDocOptions();
@@ -231,7 +231,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyValue( const OUString& aPropertyN
if (nPrec <= ::std::numeric_limits<sal_Int16>::max())
aRet <<= static_cast<sal_Int16> (nPrec);
}
- else if (aPropertyName.equalsAscii(SC_UNO_TABSTOPDIS) )
+ else if (aPropertyName == SC_UNO_TABSTOPDIS)
{
ScDocument& rDoc = pDocShell->GetDocument();
const ScDocOptions& aDocOpt = rDoc.GetDocOptions();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index bf89e009ae94..7a893984067e 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -702,7 +702,7 @@ static OutputDevice* lcl_GetRenderDevice( const uno::Sequence<beans::PropertyVal
const beans::PropertyValue& rProp = pPropArray[i];
OUString aPropName(rProp.Name);
- if (aPropName.equalsAscii( SC_UNONAME_RENDERDEV ))
+ if (aPropName == SC_UNONAME_RENDERDEV)
{
uno::Reference<awt::XDevice> xRenderDevice(rProp.Value, uno::UNO_QUERY);
if ( xRenderDevice.is() )
@@ -1649,12 +1649,12 @@ void SAL_CALL ScModelObj::setPropertyValue(
if (bOpt)
{
// done...
- if ( aString.equalsAscii( SC_UNO_IGNORECASE ) ||
- aString.equalsAscii( SC_UNONAME_REGEXP ) ||
- aString.equalsAscii( SC_UNO_LOOKUPLABELS ) )
+ if ( aString == SC_UNO_IGNORECASE ||
+ aString == SC_UNONAME_REGEXP ||
+ aString == SC_UNO_LOOKUPLABELS )
bHardRecalc = false;
}
- else if ( aString.equalsAscii( SC_UNONAME_CLOCAL ) )
+ else if ( aString == SC_UNONAME_CLOCAL )
{
lang::Locale aLocale;
if ( aValue >>= aLocale )
@@ -1665,13 +1665,13 @@ void SAL_CALL ScModelObj::setPropertyValue(
rDoc.SetLanguage( eLatin, eCjk, eCtl );
}
}
- else if ( aString.equalsAscii( SC_UNO_CODENAME ) )
+ else if ( aString == SC_UNO_CODENAME )
{
OUString sCodeName;
if ( aValue >>= sCodeName )
rDoc.SetCodeName( sCodeName );
}
- else if ( aString.equalsAscii( SC_UNO_CJK_CLOCAL ) )
+ else if ( aString == SC_UNO_CJK_CLOCAL )
{
lang::Locale aLocale;
if ( aValue >>= aLocale )
@@ -1682,7 +1682,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
rDoc.SetLanguage( eLatin, eCjk, eCtl );
}
}
- else if ( aString.equalsAscii( SC_UNO_CTL_CLOCAL ) )
+ else if ( aString == SC_UNO_CTL_CLOCAL )
{
lang::Locale aLocale;
if ( aValue >>= aLocale )
@@ -1693,7 +1693,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
rDoc.SetLanguage( eLatin, eCjk, eCtl );
}
}
- else if ( aString.equalsAscii( SC_UNO_APPLYFMDES ) )
+ else if ( aString == SC_UNO_APPLYFMDES )
{
// model is created if not there
ScDrawLayer* pModel = pDocShell->MakeDrawLayer();
@@ -1703,7 +1703,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
if (pBindings)
pBindings->Invalidate( SID_FM_OPEN_READONLY );
}
- else if ( aString.equalsAscii( SC_UNO_AUTOCONTFOC ) )
+ else if ( aString == SC_UNO_AUTOCONTFOC )
{
// model is created if not there
ScDrawLayer* pModel = pDocShell->MakeDrawLayer();
@@ -1713,11 +1713,11 @@ void SAL_CALL ScModelObj::setPropertyValue(
if (pBindings)
pBindings->Invalidate( SID_FM_AUTOCONTROLFOCUS );
}
- else if ( aString.equalsAscii( SC_UNO_ISLOADED ) )
+ else if ( aString == SC_UNO_ISLOADED )
{
pDocShell->SetEmpty( !ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
}
- else if ( aString.equalsAscii( SC_UNO_ISUNDOENABLED ) )
+ else if ( aString == SC_UNO_ISUNDOENABLED )
{
bool bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue );
rDoc.EnableUndo( bUndoEnabled );
@@ -1725,33 +1725,33 @@ void SAL_CALL ScModelObj::setPropertyValue(
bUndoEnabled
? officecfg::Office::Common::Undo::Steps::get() : 0);
}
- else if ( aString.equalsAscii( SC_UNO_ISADJUSTHEIGHTENABLED ) )
+ else if ( aString == SC_UNO_ISADJUSTHEIGHTENABLED )
{
bool bOldAdjustHeightEnabled = rDoc.IsAdjustHeightEnabled();
bool bAdjustHeightEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if( bOldAdjustHeightEnabled != bAdjustHeightEnabled )
rDoc.EnableAdjustHeight( bAdjustHeightEnabled );
}
- else if ( aString.equalsAscii( SC_UNO_ISEXECUTELINKENABLED ) )
+ else if ( aString == SC_UNO_ISEXECUTELINKENABLED )
{
rDoc.EnableExecuteLink( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
}
- else if ( aString.equalsAscii( SC_UNO_ISCHANGEREADONLYENABLED ) )
+ else if ( aString == SC_UNO_ISCHANGEREADONLYENABLED )
{
rDoc.EnableChangeReadOnly( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
}
- else if ( aString.equalsAscii( "BuildId" ) )
+ else if ( aString == "BuildId" )
{
aValue >>= maBuildId;
}
- else if ( aString.equalsAscii( "SavedObject" ) ) // set from chart after saving
+ else if ( aString == "SavedObject" ) // set from chart after saving
{
OUString aObjName;
aValue >>= aObjName;
if ( !aObjName.isEmpty() )
rDoc.RestoreChartListener( aObjName );
}
- else if ( aString.equalsAscii( SC_UNO_INTEROPGRABBAG ) )
+ else if ( aString == SC_UNO_INTEROPGRABBAG )
{
setGrabBagItem(aValue);
}
@@ -1784,7 +1784,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
{
// done...
}
- else if ( aString.equalsAscii( SC_UNONAME_CLOCAL ) )
+ else if ( aString == SC_UNONAME_CLOCAL )
{
LanguageType eLatin, eCjk, eCtl;
rDoc.GetLanguage( eLatin, eCjk, eCtl );
@@ -1793,13 +1793,13 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
ScUnoConversion::FillLocale( aLocale, eLatin );
aRet <<= aLocale;
}
- else if ( aString.equalsAscii( SC_UNO_CODENAME ) )
+ else if ( aString == SC_UNO_CODENAME )
{
OUString sCodeName = rDoc.GetCodeName();
aRet <<= sCodeName;
}
- else if ( aString.equalsAscii( SC_UNO_CJK_CLOCAL ) )
+ else if ( aString == SC_UNO_CJK_CLOCAL )
{
LanguageType eLatin, eCjk, eCtl;
rDoc.GetLanguage( eLatin, eCjk, eCtl );
@@ -1808,7 +1808,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
ScUnoConversion::FillLocale( aLocale, eCjk );
aRet <<= aLocale;
}
- else if ( aString.equalsAscii( SC_UNO_CTL_CLOCAL ) )
+ else if ( aString == SC_UNO_CTL_CLOCAL )
{
LanguageType eLatin, eCjk, eCtl;
rDoc.GetLanguage( eLatin, eCjk, eCtl );
@@ -1817,73 +1817,73 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
ScUnoConversion::FillLocale( aLocale, eCtl );
aRet <<= aLocale;
}
- else if ( aString.equalsAscii( SC_UNO_NAMEDRANGES ) )
+ else if ( aString == SC_UNO_NAMEDRANGES )
{
aRet <<= uno::Reference<sheet::XNamedRanges>(new ScGlobalNamedRangesObj( pDocShell ));
}
- else if ( aString.equalsAscii( SC_UNO_DATABASERNG ) )
+ else if ( aString == SC_UNO_DATABASERNG )
{
aRet <<= uno::Reference<sheet::XDatabaseRanges>(new ScDatabaseRangesObj( pDocShell ));
}
- else if ( aString.equalsAscii( SC_UNO_UNNAMEDDBRNG ) )
+ else if ( aString == SC_UNO_UNNAMEDDBRNG )
{
aRet <<= uno::Reference<sheet::XUnnamedDatabaseRanges>(new ScUnnamedDatabaseRangesObj(pDocShell));
}
- else if ( aString.equalsAscii( SC_UNO_COLLABELRNG ) )
+ else if ( aString == SC_UNO_COLLABELRNG )
{
aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, true ));
}
- else if ( aString.equalsAscii( SC_UNO_ROWLABELRNG ) )
+ else if ( aString == SC_UNO_ROWLABELRNG )
{
aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, false ));
}
- else if ( aString.equalsAscii( SC_UNO_AREALINKS ) )
+ else if ( aString == SC_UNO_AREALINKS )
{
aRet <<= uno::Reference<sheet::XAreaLinks>(new ScAreaLinksObj( pDocShell ));
}
- else if ( aString.equalsAscii( SC_UNO_DDELINKS ) )
+ else if ( aString == SC_UNO_DDELINKS )
{
aRet <<= uno::Reference<container::XNameAccess>(new ScDDELinksObj( pDocShell ));
}
- else if ( aString.equalsAscii( SC_UNO_EXTERNALDOCLINKS ) )
+ else if ( aString == SC_UNO_EXTERNALDOCLINKS )
{
aRet <<= uno::Reference<sheet::XExternalDocLinks>(new ScExternalDocLinksObj(pDocShell));
}
- else if ( aString.equalsAscii( SC_UNO_SHEETLINKS ) )
+ else if ( aString == SC_UNO_SHEETLINKS )
{
aRet <<= uno::Reference<container::XNameAccess>(new ScSheetLinksObj( pDocShell ));
}
- else if ( aString.equalsAscii( SC_UNO_APPLYFMDES ) )
+ else if ( aString == SC_UNO_APPLYFMDES )
{
// default for no model is TRUE
ScDrawLayer* pModel = rDoc.GetDrawLayer();
bool bOpenInDesign = pModel ? pModel->GetOpenInDesignMode() : sal_True;
ScUnoHelpFunctions::SetBoolInAny( aRet, bOpenInDesign );
}
- else if ( aString.equalsAscii( SC_UNO_AUTOCONTFOC ) )
+ else if ( aString == SC_UNO_AUTOCONTFOC )
{
// default for no model is FALSE
ScDrawLayer* pModel = rDoc.GetDrawLayer();
bool bAutoControlFocus = pModel && pModel->GetAutoControlFocus();
ScUnoHelpFunctions::SetBoolInAny( aRet, bAutoControlFocus );
}
- else if ( aString.equalsAscii( SC_UNO_FORBIDDEN ) )
+ else if ( aString == SC_UNO_FORBIDDEN )
{
aRet <<= uno::Reference<i18n::XForbiddenCharacters>(new ScForbiddenCharsObj( pDocShell ));
}
- else if ( aString.equalsAscii( SC_UNO_HASDRAWPAGES ) )
+ else if ( aString == SC_UNO_HASDRAWPAGES )
{
ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetDocument().GetDrawLayer() != 0) );
}
- else if ( aString.equalsAscii( SC_UNO_BASICLIBRARIES ) )
+ else if ( aString == SC_UNO_BASICLIBRARIES )
{
aRet <<= pDocShell->GetBasicContainer();
}
- else if ( aString.equalsAscii( SC_UNO_DIALOGLIBRARIES ) )
+ else if ( aString == SC_UNO_DIALOGLIBRARIES )
{
aRet <<= pDocShell->GetDialogContainer();
}
- else if ( aString.equalsAscii( SC_UNO_VBAGLOBNAME ) )
+ else if ( aString == SC_UNO_VBAGLOBNAME )
{
/* #i111553# This property provides the name of the constant that
will be used to store this model in the global Basic manager.
@@ -1892,49 +1892,49 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
constant can co-exist, as required by VBA. */
aRet <<= OUString( "ThisExcelDoc" );
}
- else if ( aString.equalsAscii( SC_UNO_RUNTIMEUID ) )
+ else if ( aString == SC_UNO_RUNTIMEUID )
{
aRet <<= getRuntimeUID();
}
- else if ( aString.equalsAscii( SC_UNO_HASVALIDSIGNATURES ) )
+ else if ( aString == SC_UNO_HASVALIDSIGNATURES )
{
aRet <<= hasValidSignatures();
}
- else if ( aString.equalsAscii( SC_UNO_ISLOADED ) )
+ else if ( aString == SC_UNO_ISLOADED )
{
ScUnoHelpFunctions::SetBoolInAny( aRet, !pDocShell->IsEmpty() );
}
- else if ( aString.equalsAscii( SC_UNO_ISUNDOENABLED ) )
+ else if ( aString == SC_UNO_ISUNDOENABLED )
{
ScUnoHelpFunctions::SetBoolInAny( aRet, rDoc.IsUndoEnabled() );
}
- else if ( aString.equalsAscii( SC_UNO_ISADJUSTHEIGHTENABLED ) )
+ else if ( aString == SC_UNO_ISADJUSTHEIGHTENABLED )
{
ScUnoHelpFunctions::SetBoolInAny( aRet, rDoc.IsAdjustHeightEnabled() );
}
- else if ( aString.equalsAscii( SC_UNO_ISEXECUTELINKENABLED ) )
+ else if ( aString == SC_UNO_ISEXECUTELINKENABLED )
{
ScUnoHelpFunctions::SetBoolInAny( aRet, rDoc.IsExecuteLinkEnabled() );
}
- else if ( aString.equalsAscii( SC_UNO_ISCHANGEREADONLYENABLED ) )
+ else if ( aString == SC_UNO_ISCHANGEREADONLYENABLED )
{
ScUnoHelpFunctions::SetBoolInAny( aRet, rDoc.IsChangeReadOnlyEnabled() );
}
- else if ( aString.equalsAscii( SC_UNO_REFERENCEDEVICE ) )
+ else if ( aString == SC_UNO_REFERENCEDEVICE )
{
VCLXDevice* pXDev = new VCLXDevice();
pXDev->SetOutputDevice( rDoc.GetRefDevice() );
aRet <<= uno::Reference< awt::XDevice >( pXDev );
}
- else if ( aString.equalsAscii( "BuildId" ) )
+ else if ( aString == "BuildId" )
{
aRet <<= maBuildId;
}
- else if ( aString.equalsAscii( "InternalDocument" ) )
+ else if ( aString == "InternalDocument" )
{
ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetCreateMode() == SFX_CREATE_MODE_INTERNAL) );
}
- else if ( aString.equalsAscii( SC_UNO_INTEROPGRABBAG ) )
+ else if ( aString == SC_UNO_INTEROPGRABBAG )
{
getGrabBagItem(aRet);
}
@@ -2226,7 +2226,7 @@ void ScModelObj::NotifyChanges( const OUString& rOperation, const ScRangeList& r
// handle sheet events
//! separate method with ScMarkData? Then change HasChangesListeners back.
- if ( rOperation.equalsAscii("cell-change") && pDocShell )
+ if ( rOperation == "cell-change" && pDocShell )
{
ScMarkData aMarkData;
aMarkData.MarkFromRangeList( rRanges, false );
@@ -3155,21 +3155,21 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue(
OUString aNameString(aPropertyName);
ScDocFunc& rFunc = pDocShell->GetDocFunc();
- if ( aNameString.equalsAscii( SC_UNONAME_CELLWID ) )
+ if ( aNameString == SC_UNONAME_CELLWID )
{
sal_Int32 nNewWidth = 0;
if ( aValue >>= nNewWidth )
rFunc.SetWidthOrHeight(
true, aColArr, nTab, SC_SIZE_ORIGINAL, (sal_uInt16)HMMToTwips(nNewWidth), true, true);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_CELLVIS ) )
+ else if ( aNameString == SC_UNONAME_CELLVIS )
{
bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
rFunc.SetWidthOrHeight(true, aColArr, nTab, eMode, 0, true, true);
// SC_SIZE_DIRECT with size 0: hide
}
- else if ( aNameString.equalsAscii( SC_UNONAME_OWIDTH ) )
+ else if ( aNameString == SC_UNONAME_OWIDTH )
{
bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
@@ -3177,7 +3177,7 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue(
true, aColArr, nTab, SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, true, true);
// sal_False for columns currently has no effect
}
- else if ( aNameString.equalsAscii( SC_UNONAME_NEWPAGE ) || aNameString.equalsAscii( SC_UNONAME_MANPAGE ) )
+ else if ( aNameString == SC_UNONAME_NEWPAGE || aNameString == SC_UNONAME_MANPAGE )
{
//! single function to set/remove all breaks?
bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
@@ -3203,28 +3203,28 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const OUString& aProperty
//! loop over all columns for current state?
- if ( aNameString.equalsAscii( SC_UNONAME_CELLWID ) )
+ if ( aNameString == SC_UNONAME_CELLWID )
{
// for hidden column, return original height
sal_uInt16 nWidth = rDoc.GetOriginalWidth( nStartCol, nTab );
aAny <<= (sal_Int32)TwipsToHMM(nWidth);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_CELLVIS ) )
+ else if ( aNameString == SC_UNONAME_CELLVIS )
{
bool bVis = !rDoc.ColHidden(nStartCol, nTab);
ScUnoHelpFunctions::SetBoolInAny( aAny, bVis );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_OWIDTH ) )
+ else if ( aNameString == SC_UNONAME_OWIDTH )
{
bool bOpt = !(rDoc.GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_NEWPAGE ) )
+ else if ( aNameString == SC_UNONAME_NEWPAGE )
{
ScBreakType nBreak = rDoc.HasColBreak(nStartCol, nTab);
ScUnoHelpFunctions::SetBoolInAny( aAny, nBreak );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_MANPAGE ) )
+ else if ( aNameString == SC_UNONAME_MANPAGE )
{
ScBreakType nBreak = rDoc.HasColBreak(nStartCol, nTab);
ScUnoHelpFunctions::SetBoolInAny( aAny, (nBreak & BREAK_MANUAL) != 0 );
@@ -3375,7 +3375,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
std::vector<sc::ColRowSpan> aRowArr(1, sc::ColRowSpan(nStartRow,nEndRow));
OUString aNameString(aPropertyName);
- if ( aNameString.equalsAscii( SC_UNONAME_OHEIGHT ) )
+ if ( aNameString == SC_UNONAME_OHEIGHT )
{
sal_Int32 nNewHeight = 0;
if ( rDoc.IsImportingXML() && ( aValue >>= nNewHeight ) )
@@ -3397,7 +3397,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
}
}
}
- else if ( aNameString.equalsAscii( SC_UNONAME_CELLHGT ) )
+ else if ( aNameString == SC_UNONAME_CELLHGT )
{
sal_Int32 nNewHeight = 0;
if ( aValue >>= nNewHeight )
@@ -3415,20 +3415,20 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
false, aRowArr, nTab, SC_SIZE_ORIGINAL, (sal_uInt16)HMMToTwips(nNewHeight), true, true);
}
}
- else if ( aNameString.equalsAscii( SC_UNONAME_CELLVIS ) )
+ else if ( aNameString == SC_UNONAME_CELLVIS )
{
bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
rFunc.SetWidthOrHeight(false, aRowArr, nTab, eMode, 0, true, true);
// SC_SIZE_DIRECT with size 0: hide
}
- else if ( aNameString.equalsAscii( SC_UNONAME_VISFLAG ) )
+ else if ( aNameString == SC_UNONAME_VISFLAG )
{
// #i116460# Shortcut to only set the flag, without drawing layer update etc.
// Should only be used from import filters.
rDoc.SetRowHidden(nStartRow, nEndRow, nTab, !ScUnoHelpFunctions::GetBoolFromAny( aValue ));
}
- else if ( aNameString.equalsAscii( SC_UNONAME_CELLFILT ) )
+ else if ( aNameString == SC_UNONAME_CELLFILT )
{
//! undo etc.
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
@@ -3436,7 +3436,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
else
rDoc.SetRowFiltered(nStartRow, nEndRow, nTab, false);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_NEWPAGE) || aNameString.equalsAscii( SC_UNONAME_MANPAGE) )
+ else if ( aNameString == SC_UNONAME_NEWPAGE || aNameString == SC_UNONAME_MANPAGE )
{
//! single function to set/remove all breaks?
bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
@@ -3446,7 +3446,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
else
rFunc.RemovePageBreak( false, ScAddress(0,nRow,nTab), true, true, true );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_CELLBACK ) || aNameString.equalsAscii( SC_UNONAME_CELLTRAN ) )
+ else if ( aNameString == SC_UNONAME_CELLBACK || aNameString == SC_UNONAME_CELLTRAN )
{
// #i57867# Background color is specified for row styles in the file format,
// so it has to be supported along with the row properties (import only).
@@ -3474,39 +3474,39 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const OUString& aPropertyNam
//! loop over all rows for current state?
- if ( aNameString.equalsAscii( SC_UNONAME_CELLHGT ) )
+ if ( aNameString == SC_UNONAME_CELLHGT )
{
// for hidden row, return original height
sal_uInt16 nHeight = rDoc.GetOriginalHeight( nStartRow, nTab );
aAny <<= (sal_Int32)TwipsToHMM(nHeight);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_CELLVIS ) )
+ else if ( aNameString == SC_UNONAME_CELLVIS )
{
SCROW nLastRow;
bool bVis = !rDoc.RowHidden(nStartRow, nTab, NULL, &nLastRow);
ScUnoHelpFunctions::SetBoolInAny( aAny, bVis );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_CELLFILT ) )
+ else if ( aNameString == SC_UNONAME_CELLFILT )
{
bool bVis = rDoc.RowFiltered(nStartRow, nTab);
ScUnoHelpFunctions::SetBoolInAny( aAny, bVis );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_OHEIGHT ) )
+ else if ( aNameString == SC_UNONAME_OHEIGHT )
{
bool bOpt = !(rDoc.GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_NEWPAGE ) )
+ else if ( aNameString == SC_UNONAME_NEWPAGE )
{
ScBreakType nBreak = rDoc.HasRowBreak(nStartRow, nTab);
ScUnoHelpFunctions::SetBoolInAny( aAny, nBreak );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_MANPAGE ) )
+ else if ( aNameString == SC_UNONAME_MANPAGE )
{
ScBreakType nBreak = rDoc.HasRowBreak(nStartRow, nTab);
ScUnoHelpFunctions::SetBoolInAny( aAny, (nBreak & BREAK_MANUAL) != 0 );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_CELLBACK ) || aNameString.equalsAscii( SC_UNONAME_CELLTRAN ) )
+ else if ( aNameString == SC_UNONAME_CELLBACK || aNameString == SC_UNONAME_CELLTRAN )
{
// Use ScCellRangeObj to get the property from the cell range
// (for completeness only, this is not used by the XML filter).
diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx
index 80aabff01b53..0303b21167cb 100644
--- a/sc/source/ui/unoobj/eventuno.cxx
+++ b/sc/source/ui/unoobj/eventuno.cxx
@@ -91,17 +91,17 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno:
for (sal_Int32 nPos=0; nPos<nPropCount; ++nPos)
{
const beans::PropertyValue& rProp = aPropSeq[nPos];
- if ( rProp.Name.equalsAscii( SC_UNO_EVENTTYPE ) )
+ if ( rProp.Name == SC_UNO_EVENTTYPE )
{
OUString aEventType;
if ( rProp.Value >>= aEventType )
{
// only "Script" is supported
- if ( ! aEventType.equalsAscii( SC_UNO_SCRIPT ) )
+ if ( aEventType != SC_UNO_SCRIPT )
throw lang::IllegalArgumentException();
}
}
- else if ( rProp.Name.equalsAscii( SC_UNO_SCRIPT ) )
+ else if ( rProp.Name == SC_UNO_SCRIPT )
rProp.Value >>= aScript;
}
}
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 17f0547eeb51..a2e6cedc3f33 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -67,7 +67,7 @@ static void load_CharSet( rtl_TextEncoding &nCharSet, bool bExport )
ScLinkConfigItem aItem( OUString::createFromAscii(
bExport?DBF_SEP_PATH_EXPORT:DBF_SEP_PATH_IMPORT ) );
- pNames[0] = OUString::createFromAscii( DBF_CHAR_SET );
+ pNames[0] = DBF_CHAR_SET;
aValues = aItem.GetProperties( aNames );
pProperties = aValues.getConstArray();
@@ -94,7 +94,7 @@ static void save_CharSet( rtl_TextEncoding nCharSet, bool bExport )
ScLinkConfigItem aItem( OUString::createFromAscii(
bExport?DBF_SEP_PATH_EXPORT:DBF_SEP_PATH_IMPORT ) );
- pNames[0] = OUString::createFromAscii( DBF_CHAR_SET );
+ pNames[0] = DBF_CHAR_SET;
aValues = aItem.GetProperties( aNames );
pProperties = aValues.getArray();
pProperties[0] <<= (sal_Int32) nCharSet;
@@ -158,13 +158,13 @@ void SAL_CALL ScFilterOptionsObj::setPropertyValues( const uno::Sequence<beans::
const beans::PropertyValue& rProp = pPropArray[i];
OUString aPropName(rProp.Name);
- if ( aPropName.equalsAscii( SC_UNONAME_FILENAME ) )
+ if ( aPropName == SC_UNONAME_FILENAME )
rProp.Value >>= aFileName;
- else if ( aPropName.equalsAscii( SC_UNONAME_FILTERNAME ) )
+ else if ( aPropName == SC_UNONAME_FILTERNAME )
rProp.Value >>= aFilterName;
- else if ( aPropName.equalsAscii( SC_UNONAME_FILTEROPTIONS ) )
+ else if ( aPropName == SC_UNONAME_FILTEROPTIONS )
rProp.Value >>= aFilterOptions;
- else if ( aPropName.equalsAscii( SC_UNONAME_INPUTSTREAM ) )
+ else if ( aPropName == SC_UNONAME_INPUTSTREAM )
rProp.Value >>= xInputStream;
}
}
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 89fcd26aef25..d710ed7565bc 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -836,35 +836,35 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
SolarMutexGuard aGuard;
OUString aString(aPropertyName);
- if ( aString.equalsAscii( SC_UNONAME_SHOWINP ) ) bShowInput = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if ( aString.equalsAscii( SC_UNONAME_SHOWERR ) ) bShowError = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if ( aString.equalsAscii( SC_UNONAME_IGNOREBL ) ) bIgnoreBlank = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- else if ( aString.equalsAscii( SC_UNONAME_SHOWLIST ) ) aValue >>= nShowList;
- else if ( aString.equalsAscii( SC_UNONAME_INPTITLE ) )
+ if ( aString == SC_UNONAME_SHOWINP ) bShowInput = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ else if ( aString == SC_UNONAME_SHOWERR ) bShowError = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ else if ( aString == SC_UNONAME_IGNOREBL ) bIgnoreBlank = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ else if ( aString == SC_UNONAME_SHOWLIST ) aValue >>= nShowList;
+ else if ( aString == SC_UNONAME_INPTITLE )
{
OUString aStrVal;
if ( aValue >>= aStrVal )
aInputTitle = aStrVal;
}
- else if ( aString.equalsAscii( SC_UNONAME_INPMESS ) )
+ else if ( aString == SC_UNONAME_INPMESS )
{
OUString aStrVal;
if ( aValue >>= aStrVal )
aInputMessage = aStrVal;
}
- else if ( aString.equalsAscii( SC_UNONAME_ERRTITLE ) )
+ else if ( aString == SC_UNONAME_ERRTITLE )
{
OUString aStrVal;
if ( aValue >>= aStrVal )
aErrorTitle = aStrVal;
}
- else if ( aString.equalsAscii( SC_UNONAME_ERRMESS ) )
+ else if ( aString == SC_UNONAME_ERRMESS )
{
OUString aStrVal;
if ( aValue >>= aStrVal )
aErrorMessage = aStrVal;
}
- else if ( aString.equalsAscii( SC_UNONAME_TYPE ) )
+ else if ( aString == SC_UNONAME_TYPE )
{
sheet::ValidationType eType = (sheet::ValidationType)
ScUnoHelpFunctions::GetEnumFromAny( aValue );
@@ -884,7 +884,7 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
}
}
}
- else if ( aString.equalsAscii( SC_UNONAME_ERRALSTY ) )
+ else if ( aString == SC_UNONAME_ERRALSTY )
{
sheet::ValidationAlertStyle eStyle = (sheet::ValidationAlertStyle)
ScUnoHelpFunctions::GetEnumFromAny( aValue );
@@ -900,7 +900,7 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
}
}
}
- else if ( aString.equalsAscii( SC_UNONAME_SOURCESTR ) )
+ else if ( aString == SC_UNONAME_SOURCESTR )
{
// internal - only for XML filter, not in PropertySetInfo, only set
@@ -908,7 +908,7 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
if ( aValue >>= aStrVal )
aPosString = aStrVal;
}
- else if ( aString.equalsAscii( SC_UNONAME_FORMULANMSP1 ) )
+ else if ( aString == SC_UNONAME_FORMULANMSP1 )
{
// internal - only for XML filter, not in PropertySetInfo, only set
@@ -916,7 +916,7 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
if ( aValue >>= aStrVal )
maExprNmsp1 = aStrVal;
}
- else if ( aString.equalsAscii( SC_UNONAME_FORMULANMSP2 ) )
+ else if ( aString == SC_UNONAME_FORMULANMSP2 )
{
// internal - only for XML filter, not in PropertySetInfo, only set
@@ -924,7 +924,7 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
if ( aValue >>= aStrVal )
maExprNmsp2 = aStrVal;
}
- else if ( aString.equalsAscii( SC_UNONAME_GRAMMAR1 ) )
+ else if ( aString == SC_UNONAME_GRAMMAR1 )
{
// internal - only for XML filter, not in PropertySetInfo, only set
@@ -932,7 +932,7 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
if ( aValue >>= nVal )
meGrammar1 = static_cast< FormulaGrammar::Grammar >(nVal);
}
- else if ( aString.equalsAscii( SC_UNONAME_GRAMMAR2 ) )
+ else if ( aString == SC_UNONAME_GRAMMAR2 )
{
// internal - only for XML filter, not in PropertySetInfo, only set
@@ -950,15 +950,15 @@ uno::Any SAL_CALL ScTableValidationObj::getPropertyValue( const OUString& aPrope
OUString aString(aPropertyName);
uno::Any aRet;
- if ( aString.equalsAscii( SC_UNONAME_SHOWINP ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, bShowInput );
- else if ( aString.equalsAscii( SC_UNONAME_SHOWERR ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, bShowError );
- else if ( aString.equalsAscii( SC_UNONAME_IGNOREBL ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, bIgnoreBlank );
- else if ( aString.equalsAscii( SC_UNONAME_SHOWLIST ) ) aRet <<= nShowList;
- else if ( aString.equalsAscii( SC_UNONAME_INPTITLE ) ) aRet <<= OUString( aInputTitle );
- else if ( aString.equalsAscii( SC_UNONAME_INPMESS ) ) aRet <<= OUString( aInputMessage );
- else if ( aString.equalsAscii( SC_UNONAME_ERRTITLE ) ) aRet <<= OUString( aErrorTitle );
- else if ( aString.equalsAscii( SC_UNONAME_ERRMESS ) ) aRet <<= OUString( aErrorMessage );
- else if ( aString.equalsAscii( SC_UNONAME_TYPE ) )
+ if ( aString == SC_UNONAME_SHOWINP ) ScUnoHelpFunctions::SetBoolInAny( aRet, bShowInput );
+ else if ( aString == SC_UNONAME_SHOWERR ) ScUnoHelpFunctions::SetBoolInAny( aRet, bShowError );
+ else if ( aString == SC_UNONAME_IGNOREBL ) ScUnoHelpFunctions::SetBoolInAny( aRet, bIgnoreBlank );
+ else if ( aString == SC_UNONAME_SHOWLIST ) aRet <<= nShowList;
+ else if ( aString == SC_UNONAME_INPTITLE ) aRet <<= OUString( aInputTitle );
+ else if ( aString == SC_UNONAME_INPMESS ) aRet <<= OUString( aInputMessage );
+ else if ( aString == SC_UNONAME_ERRTITLE ) aRet <<= OUString( aErrorTitle );
+ else if ( aString == SC_UNONAME_ERRMESS ) aRet <<= OUString( aErrorMessage );
+ else if ( aString == SC_UNONAME_TYPE )
{
sheet::ValidationType eType = sheet::ValidationType_ANY;
switch (nValMode)
@@ -974,7 +974,7 @@ uno::Any SAL_CALL ScTableValidationObj::getPropertyValue( const OUString& aPrope
}
aRet <<= eType;
}
- else if ( aString.equalsAscii( SC_UNONAME_ERRALSTY ) )
+ else if ( aString == SC_UNONAME_ERRALSTY )
{
sheet::ValidationAlertStyle eStyle = sheet::ValidationAlertStyle_STOP;
switch (nErrorStyle)
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index df41763763ff..5833e33ca691 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -220,28 +220,28 @@ void SAL_CALL ScSheetLinkObj::setPropertyValue(
SolarMutexGuard aGuard;
OUString aNameString(aPropertyName);
OUString aValStr;
- if ( aNameString.equalsAscii( SC_UNONAME_LINKURL ) )
+ if ( aNameString == SC_UNONAME_LINKURL )
{
if ( aValue >>= aValStr )
setFileName( aValStr );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_FILTER ) )
+ else if ( aNameString == SC_UNONAME_FILTER )
{
if ( aValue >>= aValStr )
setFilter( aValStr );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_FILTOPT ) )
+ else if ( aNameString == SC_UNONAME_FILTOPT )
{
if ( aValue >>= aValStr )
setFilterOptions( aValStr );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_REFPERIOD ) )
+ else if ( aNameString == SC_UNONAME_REFPERIOD )
{
sal_Int32 nRefresh = 0;
if ( aValue >>= nRefresh )
setRefreshDelay( nRefresh );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_REFDELAY ) )
+ else if ( aNameString == SC_UNONAME_REFDELAY )
{
sal_Int32 nRefresh = 0;
if ( aValue >>= nRefresh )
@@ -256,15 +256,15 @@ uno::Any SAL_CALL ScSheetLinkObj::getPropertyValue( const OUString& aPropertyNam
SolarMutexGuard aGuard;
OUString aNameString(aPropertyName);
uno::Any aRet;
- if ( aNameString.equalsAscii( SC_UNONAME_LINKURL ) )
+ if ( aNameString == SC_UNONAME_LINKURL )
aRet <<= getFileName();
- else if ( aNameString.equalsAscii( SC_UNONAME_FILTER ) )
+ else if ( aNameString == SC_UNONAME_FILTER )
aRet <<= getFilter();
- else if ( aNameString.equalsAscii( SC_UNONAME_FILTOPT ) )
+ else if ( aNameString == SC_UNONAME_FILTOPT )
aRet <<= getFilterOptions();
- else if ( aNameString.equalsAscii( SC_UNONAME_REFPERIOD ) )
+ else if ( aNameString == SC_UNONAME_REFPERIOD )
aRet <<= getRefreshDelay();
- else if ( aNameString.equalsAscii( SC_UNONAME_REFDELAY ) )
+ else if ( aNameString == SC_UNONAME_REFDELAY )
aRet <<= getRefreshDelay();
return aRet;
}
@@ -768,28 +768,28 @@ void SAL_CALL ScAreaLinkObj::setPropertyValue(
SolarMutexGuard aGuard;
OUString aNameString(aPropertyName);
OUString aValStr;
- if ( aNameString.equalsAscii( SC_UNONAME_LINKURL ) )
+ if ( aNameString == SC_UNONAME_LINKURL )
{
if ( aValue >>= aValStr )
setFileName( aValStr );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_FILTER ) )
+ else if ( aNameString == SC_UNONAME_FILTER )
{
if ( aValue >>= aValStr )
setFilter( aValStr );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_FILTOPT ) )
+ else if ( aNameString == SC_UNONAME_FILTOPT )
{
if ( aValue >>= aValStr )
setFilterOptions( aValStr );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_REFPERIOD ) )
+ else if ( aNameString == SC_UNONAME_REFPERIOD )
{
sal_Int32 nRefresh = 0;
if ( aValue >>= nRefresh )
setRefreshDelay( nRefresh );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_REFDELAY ) )
+ else if ( aNameString == SC_UNONAME_REFDELAY )
{
sal_Int32 nRefresh = 0;
if ( aValue >>= nRefresh )
@@ -804,15 +804,15 @@ uno::Any SAL_CALL ScAreaLinkObj::getPropertyValue( const OUString& aPropertyName
SolarMutexGuard aGuard;
OUString aNameString(aPropertyName);
uno::Any aRet;
- if ( aNameString.equalsAscii( SC_UNONAME_LINKURL ) )
+ if ( aNameString == SC_UNONAME_LINKURL )
aRet <<= getFileName();
- else if ( aNameString.equalsAscii( SC_UNONAME_FILTER ) )
+ else if ( aNameString == SC_UNONAME_FILTER )
aRet <<= getFilter();
- else if ( aNameString.equalsAscii( SC_UNONAME_FILTOPT ) )
+ else if ( aNameString == SC_UNONAME_FILTOPT )
aRet <<= getFilterOptions();
- else if ( aNameString.equalsAscii( SC_UNONAME_REFPERIOD ) )
+ else if ( aNameString == SC_UNONAME_REFPERIOD )
aRet <<= getRefreshDelay();
- else if ( aNameString.equalsAscii( SC_UNONAME_REFDELAY ) )
+ else if ( aNameString == SC_UNONAME_REFDELAY )
aRet <<= getRefreshDelay();
return aRet;
}
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 482a5d318c77..94cdf4fc1565 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -328,7 +328,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const
SolarMutexGuard aGuard;
OUString aNameString(aPropertyName);
- if ( aNameString.equalsAscii( SC_UNONAME_ANCHOR ) )
+ if ( aNameString == SC_UNONAME_ANCHOR )
{
uno::Reference<sheet::XCellRangeAddressable> xRangeAdd(aValue, uno::UNO_QUERY);
if (xRangeAdd.is())
@@ -436,7 +436,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const
else
throw lang::IllegalArgumentException("only XCell or XSpreadsheet objects allowed", static_cast<cppu::OWeakObject*>(this), 0);
}
- else if ( aNameString.equalsAscii( SC_UNONAME_IMAGEMAP ) )
+ else if ( aNameString == SC_UNONAME_IMAGEMAP )
{
SdrObject* pObj = GetSdrObject();
if ( pObj )
@@ -460,7 +460,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const
}
}
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HORIPOS ) )
+ else if ( aNameString == SC_UNONAME_HORIPOS )
{
sal_Int32 nPos = 0;
if (aValue >>= nPos)
@@ -558,7 +558,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const
}
}
}
- else if ( aNameString.equalsAscii( SC_UNONAME_VERTPOS ) )
+ else if ( aNameString == SC_UNONAME_VERTPOS )
{
sal_Int32 nPos = 0;
if (aValue >>= nPos)
@@ -627,15 +627,15 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const
}
}
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HYPERLINK ) ||
- aNameString.equalsAscii( SC_UNONAME_URL) )
+ else if ( aNameString == SC_UNONAME_HYPERLINK ||
+ aNameString == SC_UNONAME_URL )
{
OUString sHlink;
ScMacroInfo* pInfo = ScShapeObj_getShapeHyperMacroInfo(this, true);
if ( ( aValue >>= sHlink ) && pInfo )
pInfo->SetHlink( sHlink );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_MOVEPROTECT ) )
+ else if ( aNameString == SC_UNONAME_MOVEPROTECT )
{
if( SdrObject* pObj = this->GetSdrObject() )
{
@@ -660,7 +660,7 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const OUString& aPropertyName )
OUString aNameString = aPropertyName;
uno::Any aAny;
- if ( aNameString.equalsAscii( SC_UNONAME_ANCHOR ) )
+ if ( aNameString == SC_UNONAME_ANCHOR )
{
SdrObject *pObj = GetSdrObject();
if (pObj)
@@ -691,7 +691,7 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const OUString& aPropertyName )
}
}
}
- else if ( aNameString.equalsAscii( SC_UNONAME_IMAGEMAP ) )
+ else if ( aNameString == SC_UNONAME_IMAGEMAP )
{
uno::Reference< uno::XInterface > xImageMap;
SdrObject* pObj = GetSdrObject();
@@ -708,7 +708,7 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const OUString& aPropertyName )
}
aAny <<= uno::Reference< container::XIndexContainer >::query( xImageMap );
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HORIPOS ) )
+ else if ( aNameString == SC_UNONAME_HORIPOS )
{
SdrObject *pObj = GetSdrObject();
if (pObj)
@@ -767,7 +767,7 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const OUString& aPropertyName )
}
}
}
- else if ( aNameString.equalsAscii( SC_UNONAME_VERTPOS ) )
+ else if ( aNameString == SC_UNONAME_VERTPOS )
{
SdrObject *pObj = GetSdrObject();
if (pObj)
@@ -812,15 +812,15 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const OUString& aPropertyName )
}
}
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HYPERLINK ) ||
- aNameString.equalsAscii( SC_UNONAME_URL ) )
+ else if ( aNameString == SC_UNONAME_HYPERLINK ||
+ aNameString == SC_UNONAME_URL )
{
OUString sHlink;
if ( ScMacroInfo* pInfo = ScShapeObj_getShapeHyperMacroInfo(this) )
sHlink = pInfo->GetHlink();
aAny <<= sHlink;
}
- else if ( aNameString.equalsAscii( SC_UNONAME_MOVEPROTECT ) )
+ else if ( aNameString == SC_UNONAME_MOVEPROTECT )
{
bool aProt = false;
if ( SdrObject* pObj = this->GetSdrObject() )
@@ -907,19 +907,19 @@ beans::PropertyState SAL_CALL ScShapeObj::getPropertyState( const OUString& aPro
OUString aNameString(aPropertyName);
beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
- if ( aNameString.equalsAscii( SC_UNONAME_IMAGEMAP ) )
+ if ( aNameString == SC_UNONAME_IMAGEMAP )
{
// ImageMap is always "direct"
}
- else if ( aNameString.equalsAscii( SC_UNONAME_ANCHOR ) )
+ else if ( aNameString == SC_UNONAME_ANCHOR )
{
// Anchor is always "direct"
}
- else if ( aNameString.equalsAscii( SC_UNONAME_HORIPOS ) )
+ else if ( aNameString == SC_UNONAME_HORIPOS )
{
// HoriPos is always "direct"
}
- else if ( aNameString.equalsAscii( SC_UNONAME_VERTPOS ) )
+ else if ( aNameString == SC_UNONAME_VERTPOS )
{
// VertPos is always "direct"
}
@@ -956,7 +956,7 @@ void SAL_CALL ScShapeObj::setPropertyToDefault( const OUString& aPropertyName )
SolarMutexGuard aGuard;
OUString aNameString(aPropertyName);
- if ( aNameString.equalsAscii( SC_UNONAME_IMAGEMAP ) )
+ if ( aNameString == SC_UNONAME_IMAGEMAP )
{
SdrObject* pObj = GetSdrObject();
if ( pObj )
@@ -989,7 +989,7 @@ uno::Any SAL_CALL ScShapeObj::getPropertyDefault( const OUString& aPropertyName
OUString aNameString = aPropertyName;
uno::Any aAny;
- if ( aNameString.equalsAscii( SC_UNONAME_IMAGEMAP ) )
+ if ( aNameString == SC_UNONAME_IMAGEMAP )
{
// default: empty ImageMap
uno::Reference< uno::XInterface > xImageMap(SvUnoImageMap_createInstance( GetSupportedMacroItems() ));
diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx
index d9d800660d96..c98b1bb80f2b 100644
--- a/sc/source/ui/unoobj/srchuno.cxx
+++ b/sc/source/ui/unoobj/srchuno.cxx
@@ -142,19 +142,19 @@ void SAL_CALL ScCellSearchObj::setPropertyValue(
SolarMutexGuard aGuard;
OUString aString(aPropertyName);
- if (aString.equalsAscii( SC_UNO_SRCHBACK )) pSearchItem->SetBackward( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHBYROW )) pSearchItem->SetRowDirection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHCASE )) pSearchItem->SetExact( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHREGEXP )) pSearchItem->SetRegExp( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHSIM )) pSearchItem->SetLevenshtein( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHSIMREL )) pSearchItem->SetLEVRelaxed( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHSTYLES )) pSearchItem->SetPattern( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHWORDS )) pSearchItem->SetWordOnly( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHSIMADD )) pSearchItem->SetLEVLonger( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHSIMEX )) pSearchItem->SetLEVOther( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHSIMREM )) pSearchItem->SetLEVShorter( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHTYPE )) pSearchItem->SetCellType( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- else if (aString.equalsAscii( SC_UNO_SRCHFILTERED )) pSearchItem->SetSearchFiltered( ScUnoHelpFunctions::GetBoolFromAny(aValue) );
+ if (aString == SC_UNO_SRCHBACK) pSearchItem->SetBackward( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHBYROW) pSearchItem->SetRowDirection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHCASE) pSearchItem->SetExact( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHREGEXP) pSearchItem->SetRegExp( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHSIM) pSearchItem->SetLevenshtein( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHSIMREL) pSearchItem->SetLEVRelaxed( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHSTYLES) pSearchItem->SetPattern( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHWORDS) pSearchItem->SetWordOnly( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHSIMADD) pSearchItem->SetLEVLonger( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHSIMEX) pSearchItem->SetLEVOther( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHSIMREM) pSearchItem->SetLEVShorter( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHTYPE) pSearchItem->SetCellType( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
+ else if (aString == SC_UNO_SRCHFILTERED) pSearchItem->SetSearchFiltered( ScUnoHelpFunctions::GetBoolFromAny(aValue) );
}
uno::Any SAL_CALL ScCellSearchObj::getPropertyValue( const OUString& aPropertyName )
@@ -165,19 +165,19 @@ uno::Any SAL_CALL ScCellSearchObj::getPropertyValue( const OUString& aPropertyNa
OUString aString(aPropertyName);
uno::Any aRet;
- if (aString.equalsAscii( SC_UNO_SRCHBACK )) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetBackward() );
- else if (aString.equalsAscii( SC_UNO_SRCHBYROW )) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetRowDirection() );
- else if (aString.equalsAscii( SC_UNO_SRCHCASE )) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetExact() );
- else if (aString.equalsAscii( SC_UNO_SRCHREGEXP )) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetRegExp() );
- else if (aString.equalsAscii( SC_UNO_SRCHSIM )) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->IsLevenshtein() );
- else if (aString.equalsAscii( SC_UNO_SRCHSIMREL )) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->IsLEVRelaxed() );
- else if (aString.equalsAscii( SC_UNO_SRCHSTYLES )) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetPattern() );
- else if (aString.equalsAscii( SC_UNO_SRCHWORDS )) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetWordOnly() );
- else if (aString.equalsAscii( SC_UNO_SRCHSIMADD )) aRet <<= (sal_Int16) pSearchItem->GetLEVLonger();
- else if (aString.equalsAscii( SC_UNO_SRCHSIMEX )) aRet <<= (sal_Int16) pSearchItem->GetLEVOther();
- else if (aString.equalsAscii( SC_UNO_SRCHSIMREM )) aRet <<= (sal_Int16) pSearchItem->GetLEVShorter();
- else if (aString.equalsAscii( SC_UNO_SRCHTYPE )) aRet <<= (sal_Int16) pSearchItem->GetCellType();
- else if (aString.equalsAscii( SC_UNO_SRCHFILTERED )) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->IsSearchFiltered() );
+ if (aString == SC_UNO_SRCHBACK) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetBackward() );
+ else if (aString == SC_UNO_SRCHBYROW) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetRowDirection() );
+ else if (aString == SC_UNO_SRCHCASE) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetExact() );
+ else if (aString == SC_UNO_SRCHREGEXP) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetRegExp() );
+ else if (aString == SC_UNO_SRCHSIM) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->IsLevenshtein() );
+ else if (aString == SC_UNO_SRCHSIMREL) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->IsLEVRelaxed() );
+ else if (aString == SC_UNO_SRCHSTYLES) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetPattern() );
+ else if (aString == SC_UNO_SRCHWORDS) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->GetWordOnly() );
+ else if (aString == SC_UNO_SRCHSIMADD) aRet <<= (sal_Int16) pSearchItem->GetLEVLonger();
+ else if (aString == SC_UNO_SRCHSIMEX) aRet <<= (sal_Int16) pSearchItem->GetLEVOther();
+ else if (aString == SC_UNO_SRCHSIMREM) aRet <<= (sal_Int16) pSearchItem->GetLEVShorter();
+ else if (aString == SC_UNO_SRCHTYPE) aRet <<= (sal_Int16) pSearchItem->GetCellType();
+ else if (aString == SC_UNO_SRCHFILTERED) ScUnoHelpFunctions::SetBoolInAny( aRet, pSearchItem->IsSearchFiltered() );
return aRet;
}
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 6146a4ab0ca9..29c9ad616162 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -448,9 +448,9 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName
if ( pDocShell )
{
OUString aNameStr( aName );
- if ( aNameStr.equalsAscii( SC_FAMILYNAME_CELL ) )
+ if ( aNameStr == SC_FAMILYNAME_CELL )
return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PARA );
- else if ( aNameStr.equalsAscii( SC_FAMILYNAME_PAGE ) )
+ else if ( aNameStr == SC_FAMILYNAME_PAGE )
return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
}
// no assertion - called directly from getByName
@@ -520,7 +520,7 @@ sal_Bool SAL_CALL ScStyleFamiliesObj::hasByName( const OUString& aName )
{
SolarMutexGuard aGuard;
OUString aNameStr( aName );
- return ( aNameStr.equalsAscii( SC_FAMILYNAME_CELL ) || aNameStr.equalsAscii( SC_FAMILYNAME_PAGE ) );
+ return aNameStr == SC_FAMILYNAME_CELL || aNameStr == SC_FAMILYNAME_PAGE;
}
// style::XStyleLoader
@@ -598,11 +598,11 @@ void ScStyleFamiliesObj::loadStylesFromDocShell( ScDocShell* pSource,
const beans::PropertyValue& rProp = pPropArray[i];
OUString aPropName(rProp.Name);
- if (aPropName.equalsAscii( SC_UNONAME_OVERWSTL ))
+ if (aPropName == SC_UNONAME_OVERWSTL)
bLoadReplace = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( SC_UNONAME_LOADCELL ))
+ else if (aPropName == SC_UNONAME_LOADCELL)
bLoadCellStyles = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( SC_UNONAME_LOADPAGE ))
+ else if (aPropName == SC_UNONAME_LOADPAGE)
bLoadPageStyles = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
}
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 75777fbadaaf..6b8c897fdde7 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -237,9 +237,9 @@ uno::Any SAL_CALL ScLinkTargetTypeObj::getPropertyValue(const OUString& Property
{
uno::Any aRet;
OUString aNameStr(PropertyName);
- if ( aNameStr.equalsAscii( SC_UNO_LINKDISPBIT ) )
+ if ( aNameStr == SC_UNO_LINKDISPBIT )
SetLinkTargetBitmap( aRet, nType );
- else if ( aNameStr.equalsAscii( SC_UNO_LINKDISPNAME ) )
+ else if ( aNameStr == SC_UNO_LINKDISPNAME )
aRet <<= OUString( aName );
return aRet;
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 207d69a15e43..a918eb3a73e1 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -192,11 +192,11 @@ void SAL_CALL ScFormulaParserObj::setPropertyValue(
{
SolarMutexGuard aGuard;
OUString aString(aPropertyName);
- if ( aString.equalsAscii( SC_UNO_COMPILEFAP ) )
+ if ( aString == SC_UNO_COMPILEFAP )
{
aValue >>= mbCompileFAP;
}
- else if ( aString.equalsAscii( SC_UNO_COMPILEENGLISH ) )
+ else if ( aString == SC_UNO_COMPILEENGLISH )
{
bool bOldEnglish = mbEnglish;
if (aValue >>= mbEnglish)
@@ -215,15 +215,15 @@ void SAL_CALL ScFormulaParserObj::setPropertyValue(
else
throw lang::IllegalArgumentException();
}
- else if ( aString.equalsAscii( SC_UNO_FORMULACONVENTION ) )
+ else if ( aString == SC_UNO_FORMULACONVENTION )
{
aValue >>= mnConv;
}
- else if ( aString.equalsAscii( SC_UNO_IGNORELEADING ) )
+ else if ( aString == SC_UNO_IGNORELEADING )
{
aValue >>= mbIgnoreSpaces;
}
- else if ( aString.equalsAscii( SC_UNO_OPCODEMAP ) )
+ else if ( aString == SC_UNO_OPCODEMAP )
{
if (aValue >>= maOpCodeMapping)
{
@@ -235,7 +235,7 @@ void SAL_CALL ScFormulaParserObj::setPropertyValue(
else
throw lang::IllegalArgumentException();
}
- else if ( aString.equalsAscii( SC_UNO_EXTERNALLINKS ) )
+ else if ( aString == SC_UNO_EXTERNALLINKS )
{
if (!(aValue >>= maExternalLinks))
throw lang::IllegalArgumentException();
@@ -251,27 +251,27 @@ uno::Any SAL_CALL ScFormulaParserObj::getPropertyValue( const OUString& aPropert
SolarMutexGuard aGuard;
uno::Any aRet;
OUString aString(aPropertyName);
- if ( aString.equalsAscii( SC_UNO_COMPILEFAP ) )
+ if ( aString == SC_UNO_COMPILEFAP )
{
aRet <<= mbCompileFAP;
}
- else if ( aString.equalsAscii( SC_UNO_COMPILEENGLISH ) )
+ else if ( aString == SC_UNO_COMPILEENGLISH )
{
aRet <<= mbEnglish;
}
- else if ( aString.equalsAscii( SC_UNO_FORMULACONVENTION ) )
+ else if ( aString == SC_UNO_FORMULACONVENTION )
{
aRet <<= mnConv;
}
- else if ( aString.equalsAscii( SC_UNO_IGNORELEADING ) )
+ else if ( aString == SC_UNO_IGNORELEADING )
{
aRet <<= mbIgnoreSpaces;
}
- else if ( aString.equalsAscii( SC_UNO_OPCODEMAP ) )
+ else if ( aString == SC_UNO_OPCODEMAP )
{
aRet <<= maOpCodeMapping;
}
- else if ( aString.equalsAscii( SC_UNO_EXTERNALLINKS ) )
+ else if ( aString == SC_UNO_EXTERNALLINKS )
{
aRet <<= maExternalLinks;
}
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 769fe6779c21..df47c4f15ce7 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1811,7 +1811,7 @@ void SAL_CALL ScTabViewObj::setPropertyValue(
SolarMutexGuard aGuard;
OUString aString(aPropertyName);
- if ( aString.equalsAscii(SC_UNO_FILTERED_RANGE_SELECTION) )
+ if ( aString == SC_UNO_FILTERED_RANGE_SELECTION )
{
bFilteredRangeSelection = ScUnoHelpFunctions::GetBoolFromAny(aValue);
return;
@@ -1824,33 +1824,33 @@ void SAL_CALL ScTabViewObj::setPropertyValue(
const ScViewOptions& rOldOpt = pViewSh->GetViewData().GetOptions();
ScViewOptions aNewOpt(rOldOpt);
- if ( aString.equalsAscii( SC_UNO_COLROWHDR ) || aString.equalsAscii( OLD_UNO_COLROWHDR ) )
+ if ( aString == SC_UNO_COLROWHDR || aString == OLD_UNO_COLROWHDR )
aNewOpt.SetOption( VOPT_HEADER, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_HORSCROLL ) || aString.equalsAscii( OLD_UNO_HORSCROLL ) )
+ else if ( aString == SC_UNO_HORSCROLL || aString == OLD_UNO_HORSCROLL )
aNewOpt.SetOption( VOPT_HSCROLL, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_OUTLSYMB ) || aString.equalsAscii( OLD_UNO_OUTLSYMB ) )
+ else if ( aString == SC_UNO_OUTLSYMB || aString == OLD_UNO_OUTLSYMB )
aNewOpt.SetOption( VOPT_OUTLINER, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_SHEETTABS ) || aString.equalsAscii( OLD_UNO_SHEETTABS ) )
+ else if ( aString == SC_UNO_SHEETTABS || aString == OLD_UNO_SHEETTABS )
aNewOpt.SetOption( VOPT_TABCONTROLS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWANCHOR ) )
+ else if ( aString == SC_UNO_SHOWANCHOR )
aNewOpt.SetOption( VOPT_ANCHOR, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWFORM ) )
+ else if ( aString == SC_UNO_SHOWFORM )
aNewOpt.SetOption( VOPT_FORMULAS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWGRID ) )
+ else if ( aString == SC_UNO_SHOWGRID )
aNewOpt.SetOption( VOPT_GRID, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWHELP ) )
+ else if ( aString == SC_UNO_SHOWHELP )
aNewOpt.SetOption( VOPT_HELPLINES, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWNOTES ) )
+ else if ( aString == SC_UNO_SHOWNOTES )
aNewOpt.SetOption( VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWPAGEBR ) )
+ else if ( aString == SC_UNO_SHOWPAGEBR )
aNewOpt.SetOption( VOPT_PAGEBREAKS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWZERO ) )
+ else if ( aString == SC_UNO_SHOWZERO )
aNewOpt.SetOption( VOPT_NULLVALS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_VALUEHIGH ) || aString.equalsAscii( OLD_UNO_VALUEHIGH ) )
+ else if ( aString == SC_UNO_VALUEHIGH || aString == OLD_UNO_VALUEHIGH )
aNewOpt.SetOption( VOPT_SYNTAX, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_VERTSCROLL ) || aString.equalsAscii( OLD_UNO_VERTSCROLL ) )
+ else if ( aString == SC_UNO_VERTSCROLL || aString == OLD_UNO_VERTSCROLL )
aNewOpt.SetOption( VOPT_VSCROLL, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWOBJ ) )
+ else if ( aString == SC_UNO_SHOWOBJ )
{
sal_Int16 nIntVal = 0;
if ( aValue >>= nIntVal )
@@ -1861,7 +1861,7 @@ void SAL_CALL ScTabViewObj::setPropertyValue(
aNewOpt.SetObjMode( VOBJ_TYPE_OLE, (ScVObjMode)nIntVal);
}
}
- else if ( aString.equalsAscii( SC_UNO_SHOWCHARTS ) )
+ else if ( aString == SC_UNO_SHOWCHARTS )
{
sal_Int16 nIntVal = 0;
if ( aValue >>= nIntVal )
@@ -1872,7 +1872,7 @@ void SAL_CALL ScTabViewObj::setPropertyValue(
aNewOpt.SetObjMode( VOBJ_TYPE_CHART, (ScVObjMode)nIntVal);
}
}
- else if ( aString.equalsAscii( SC_UNO_SHOWDRAW ) )
+ else if ( aString == SC_UNO_SHOWDRAW )
{
sal_Int16 nIntVal = 0;
if ( aValue >>= nIntVal )
@@ -1883,19 +1883,19 @@ void SAL_CALL ScTabViewObj::setPropertyValue(
aNewOpt.SetObjMode( VOBJ_TYPE_DRAW, (ScVObjMode)nIntVal);
}
}
- else if ( aString.equalsAscii( SC_UNO_GRIDCOLOR ) )
+ else if ( aString == SC_UNO_GRIDCOLOR )
{
sal_Int32 nIntVal = 0;
if ( aValue >>= nIntVal )
aNewOpt.SetGridColor( nIntVal, OUString() );
}
- else if ( aString.equalsAscii( SC_UNO_ZOOMTYPE ) )
+ else if ( aString == SC_UNO_ZOOMTYPE )
{
sal_Int16 nIntVal = 0;
if ( aValue >>= nIntVal )
SetZoomType(nIntVal);
}
- else if ( aString.equalsAscii( SC_UNO_ZOOMVALUE ) )
+ else if ( aString == SC_UNO_ZOOMVALUE )
{
sal_Int16 nIntVal = 0;
if ( aValue >>= nIntVal )
@@ -1935,7 +1935,7 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const OUString& aPropertyName
OUString aString(aPropertyName);
uno::Any aRet;
- if ( aString.equalsAscii(SC_UNO_FILTERED_RANGE_SELECTION) )
+ if ( aString == SC_UNO_FILTERED_RANGE_SELECTION )
{
ScUnoHelpFunctions::SetBoolInAny(aRet, bFilteredRangeSelection);
return aRet;
@@ -1946,33 +1946,33 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const OUString& aPropertyName
{
const ScViewOptions& rOpt = pViewSh->GetViewData().GetOptions();
- if ( aString.equalsAscii( SC_UNO_COLROWHDR ) || aString.equalsAscii( OLD_UNO_COLROWHDR ) )
+ if ( aString == SC_UNO_COLROWHDR || aString == OLD_UNO_COLROWHDR )
ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_HEADER ) );
- else if ( aString.equalsAscii( SC_UNO_HORSCROLL ) || aString.equalsAscii( OLD_UNO_HORSCROLL ) )
+ else if ( aString == SC_UNO_HORSCROLL || aString == OLD_UNO_HORSCROLL )
ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_HSCROLL ) );
- else if ( aString.equalsAscii( SC_UNO_OUTLSYMB ) || aString.equalsAscii( OLD_UNO_OUTLSYMB ) )
+ else if ( aString == SC_UNO_OUTLSYMB || aString == OLD_UNO_OUTLSYMB )
ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_OUTLINER ) );
- else if ( aString.equalsAscii( SC_UNO_SHEETTABS ) || aString.equalsAscii( OLD_UNO_SHEETTABS ) )
+ else if ( aString == SC_UNO_SHEETTABS || aString == OLD_UNO_SHEETTABS )
ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_TABCONTROLS ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWANCHOR ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_ANCHOR ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWFORM ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_FORMULAS ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWGRID ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_GRID ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWHELP ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_HELPLINES ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWNOTES ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_NOTES ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWPAGEBR ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_PAGEBREAKS ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWZERO ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_NULLVALS ) );
- else if ( aString.equalsAscii( SC_UNO_VALUEHIGH ) || aString.equalsAscii( OLD_UNO_VALUEHIGH ) )
+ else if ( aString == SC_UNO_SHOWANCHOR ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_ANCHOR ) );
+ else if ( aString == SC_UNO_SHOWFORM ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_FORMULAS ) );
+ else if ( aString == SC_UNO_SHOWGRID ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_GRID ) );
+ else if ( aString == SC_UNO_SHOWHELP ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_HELPLINES ) );
+ else if ( aString == SC_UNO_SHOWNOTES ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_NOTES ) );
+ else if ( aString == SC_UNO_SHOWPAGEBR ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_PAGEBREAKS ) );
+ else if ( aString == SC_UNO_SHOWZERO ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_NULLVALS ) );
+ else if ( aString == SC_UNO_VALUEHIGH || aString == OLD_UNO_VALUEHIGH )
ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_SYNTAX ) );
- else if ( aString.equalsAscii( SC_UNO_VERTSCROLL ) || aString.equalsAscii( OLD_UNO_VERTSCROLL ) )
+ else if ( aString == SC_UNO_VERTSCROLL || aString == OLD_UNO_VERTSCROLL )
ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.GetOption( VOPT_VSCROLL ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWOBJ ) ) aRet <<= (sal_Int16)( rOpt.GetObjMode( VOBJ_TYPE_OLE ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWCHARTS ) ) aRet <<= (sal_Int16)( rOpt.GetObjMode( VOBJ_TYPE_CHART ) );
- else if ( aString.equalsAscii( SC_UNO_SHOWDRAW ) ) aRet <<= (sal_Int16)( rOpt.GetObjMode( VOBJ_TYPE_DRAW ) );
- else if ( aString.equalsAscii( SC_UNO_GRIDCOLOR ) ) aRet <<= (sal_Int32)( rOpt.GetGridColor().GetColor() );
- else if ( aString.equalsAscii( SC_UNO_VISAREA ) ) aRet <<= GetVisArea();
- else if ( aString.equalsAscii( SC_UNO_ZOOMTYPE ) ) aRet <<= GetZoomType();
- else if ( aString.equalsAscii( SC_UNO_ZOOMVALUE ) ) aRet <<= GetZoom();
- else if ( aString.equalsAscii( SC_UNO_VISAREASCREEN ) )
+ else if ( aString == SC_UNO_SHOWOBJ ) aRet <<= (sal_Int16)( rOpt.GetObjMode( VOBJ_TYPE_OLE ) );
+ else if ( aString == SC_UNO_SHOWCHARTS ) aRet <<= (sal_Int16)( rOpt.GetObjMode( VOBJ_TYPE_CHART ) );
+ else if ( aString == SC_UNO_SHOWDRAW ) aRet <<= (sal_Int16)( rOpt.GetObjMode( VOBJ_TYPE_DRAW ) );
+ else if ( aString == SC_UNO_GRIDCOLOR ) aRet <<= (sal_Int32)( rOpt.GetGridColor().GetColor() );
+ else if ( aString == SC_UNO_VISAREA ) aRet <<= GetVisArea();
+ else if ( aString == SC_UNO_ZOOMTYPE ) aRet <<= GetZoomType();
+ else if ( aString == SC_UNO_ZOOMVALUE ) aRet <<= GetZoom();
+ else if ( aString == SC_UNO_VISAREASCREEN )
{
ScViewData& rViewData = pViewSh->GetViewData();
vcl::Window* pActiveWin = rViewData.GetActiveWin();
@@ -2065,21 +2065,21 @@ void SAL_CALL ScTabViewObj::startRangeSelection(
const beans::PropertyValue& rProp = pPropArray[i];
OUString aPropName(rProp.Name);
- if (aPropName.equalsAscii( SC_UNONAME_CLOSEONUP ))
+ if (aPropName == SC_UNONAME_CLOSEONUP )
bCloseOnButtonUp = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( SC_UNONAME_TITLE ))
+ else if (aPropName == SC_UNONAME_TITLE )
{
if ( rProp.Value >>= aStrVal )
aTitle = aStrVal;
}
- else if (aPropName.equalsAscii( SC_UNONAME_INITVAL ))
+ else if (aPropName == SC_UNONAME_INITVAL )
{
if ( rProp.Value >>= aStrVal )
aInitVal = aStrVal;
}
- else if (aPropName.equalsAscii( SC_UNONAME_SINGLECELL ))
+ else if (aPropName == SC_UNONAME_SINGLECELL )
bSingleCell = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
- else if (aPropName.equalsAscii( SC_UNONAME_MULTISEL ))
+ else if (aPropName == SC_UNONAME_MULTISEL )
bMultiSelection = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
}
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx
index a4a39e67581f..f28b49519223 100644
--- a/sc/source/ui/vba/vbachartobject.cxx
+++ b/sc/source/ui/vba/vbachartobject.cxx
@@ -57,7 +57,7 @@ ScVbaChartObject::setShape() throw ( script::BasicErrorException )
for (int i = 0; i < nItems; i++)
{
xShape.set( xDrawPage->getByIndex(i), uno::UNO_QUERY_THROW );
- if (xShape->getShapeType().equalsAscii("com.sun.star.drawing.OLE2Shape") )
+ if (xShape->getShapeType() == "com.sun.star.drawing.OLE2Shape")
{
uno::Reference< beans::XPropertySet > xShapePropertySet(xShape, uno::UNO_QUERY_THROW );
OUString sName;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index a026d38e5064..872cc5815ecd 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -361,9 +361,9 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
else if ( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, true, &pFamItem ) )
{
OUString sFamily = static_cast<const SfxStringItem*>(pFamItem)->GetValue();
- if (sFamily.equalsAscii("CellStyles"))
+ if (sFamily == "CellStyles")
eFamily = SFX_STYLE_FAMILY_PARA;
- else if (sFamily.equalsAscii("PageStyles"))
+ else if (sFamily == "PageStyles")
eFamily = SFX_STYLE_FAMILY_PAGE;
}
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 8582b5614ead..d9a6f52a2744 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -972,13 +972,13 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV
for(sal_Int32 i = 0; i < nCount; i++, pSeq++)
{
OUString sName(pSeq->Name);
- if(sName.equalsAscii(SC_ZOOMVALUE))
+ if(sName == SC_ZOOMVALUE)
{
sal_Int32 nTemp = 0;
if (pSeq->Value >>= nTemp)
pPreview->SetZoom(sal_uInt16(nTemp));
}
- else if (sName.equalsAscii("PageNumber"))
+ else if (sName == "PageNumber")
{
sal_Int32 nTemp = 0;
if (pSeq->Value >>= nTemp)
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 87aaddc5bc84..7cc8f2ab0a92 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -174,102 +174,102 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
for (sal_Int32 i = 0; i < nCount; i++)
{
OUString sName(aSettings[i].Name);
- if (sName.equalsAscii(SC_CURSORPOSITIONX) )
+ if (sName == SC_CURSORPOSITIONX)
{
aSettings[i].Value >>= nTemp32;
nCurX = SanitizeCol( static_cast<SCCOL>(nTemp32));
}
- else if (sName.equalsAscii(SC_CURSORPOSITIONY) )
+ else if (sName == SC_CURSORPOSITIONY)
{
aSettings[i].Value >>= nTemp32;
nCurY = SanitizeRow( static_cast<SCROW>(nTemp32));
}
- else if (sName.equalsAscii(SC_HORIZONTALSPLITMODE) )
+ else if (sName == SC_HORIZONTALSPLITMODE)
{
aSettings[i].Value >>= nTemp16;
eHSplitMode = static_cast<ScSplitMode>(nTemp16);
}
- else if (sName.equalsAscii(SC_VERTICALSPLITMODE) )
+ else if (sName == SC_VERTICALSPLITMODE)
{
aSettings[i].Value >>= nTemp16;
eVSplitMode = static_cast<ScSplitMode>(nTemp16);
}
- else if (sName.equalsAscii(SC_HORIZONTALSPLITPOSITION) )
+ else if (sName == SC_HORIZONTALSPLITPOSITION)
{
aSettings[i].Value >>= nTempPosH;
bHasHSplitInTwips = false;
}
- else if (sName.equalsAscii(SC_VERTICALSPLITPOSITION) )
+ else if (sName == SC_VERTICALSPLITPOSITION)
{
aSettings[i].Value >>= nTempPosV;
bHasVSplitInTwips = false;
}
- else if (sName.equalsAscii(SC_HORIZONTALSPLITPOSITION_TWIPS) )
+ else if (sName == SC_HORIZONTALSPLITPOSITION_TWIPS)
{
aSettings[i].Value >>= nTempPosHTw;
bHasHSplitInTwips = true;
}
- else if (sName.equalsAscii(SC_VERTICALSPLITPOSITION_TWIPS) )
+ else if (sName == SC_VERTICALSPLITPOSITION_TWIPS)
{
aSettings[i].Value >>= nTempPosVTw;
bHasVSplitInTwips = true;
}
- else if (sName.equalsAscii(SC_ACTIVESPLITRANGE) )
+ else if (sName == SC_ACTIVESPLITRANGE)
{
aSettings[i].Value >>= nTemp16;
eWhichActive = static_cast<ScSplitPos>(nTemp16);
}
- else if (sName.equalsAscii(SC_POSITIONLEFT) )
+ else if (sName == SC_POSITIONLEFT)
{
aSettings[i].Value >>= nTemp32;
nPosX[SC_SPLIT_LEFT] = SanitizeCol( static_cast<SCCOL>(nTemp32));
}
- else if (sName.equalsAscii(SC_POSITIONRIGHT) )
+ else if (sName == SC_POSITIONRIGHT)
{
aSettings[i].Value >>= nTemp32;
nPosX[SC_SPLIT_RIGHT] = SanitizeCol( static_cast<SCCOL>(nTemp32));
}
- else if (sName.equalsAscii(SC_POSITIONTOP) )
+ else if (sName == SC_POSITIONTOP)
{
aSettings[i].Value >>= nTemp32;
nPosY[SC_SPLIT_TOP] = SanitizeRow( static_cast<SCROW>(nTemp32));
}
- else if (sName.equalsAscii(SC_POSITIONBOTTOM) )
+ else if (sName == SC_POSITIONBOTTOM)
{
aSettings[i].Value >>= nTemp32;
nPosY[SC_SPLIT_BOTTOM] = SanitizeRow( static_cast<SCROW>(nTemp32));
}
- else if (sName.equalsAscii(SC_ZOOMTYPE) )
+ else if (sName == SC_ZOOMTYPE)
{
aSettings[i].Value >>= nTemp16;
eZoomType = SvxZoomType(nTemp16);
rHasZoom = true; // set if there is any zoom information
}
- else if (sName.equalsAscii(SC_ZOOMVALUE) )
+ else if (sName == SC_ZOOMVALUE)
{
aSettings[i].Value >>= nTemp32;
Fraction aZoom(nTemp32, 100);
aZoomX = aZoomY = aZoom;
rHasZoom = true;
}
- else if (sName.equalsAscii(SC_PAGEVIEWZOOMVALUE) )
+ else if (sName == SC_PAGEVIEWZOOMVALUE)
{
aSettings[i].Value >>= nTemp32;
Fraction aZoom(nTemp32, 100);
aPageZoomX = aPageZoomY = aZoom;
rHasZoom = true;
}
- else if (sName.equalsAscii(SC_UNO_SHOWGRID) )
+ else if (sName == SC_UNO_SHOWGRID)
{
aSettings[i].Value >>= bShowGrid;
}
- else if (sName.equalsAscii(SC_TABLESELECTED) )
+ else if (sName == SC_TABLESELECTED)
{
bool bSelected = false;
aSettings[i].Value >>= bSelected;
rViewData.GetMarkData().SelectTable( nTab, bSelected );
}
- else if (sName.equalsAscii(SC_UNONAME_TABCOLOR) )
+ else if (sName == SC_UNONAME_TABCOLOR)
{
// There are documents out there that have their tab color defined as a view setting.
sal_Int32 nColor = COL_AUTO;
@@ -2737,7 +2737,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
{
// SC_VIEWID has to parse and use by mba
OUString sName(rSettings[i].Name);
- if (sName.equalsAscii(SC_TABLES) )
+ if (sName == SC_TABLES)
{
uno::Reference<container::XNameContainer> xNameContainer;
if ((rSettings[i].Value >>= xNameContainer) && xNameContainer->hasElements())
@@ -2765,7 +2765,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
}
}
}
- else if (sName.equalsAscii(SC_ACTIVETABLE) )
+ else if (sName == SC_ACTIVETABLE)
{
OUString sValue;
if(rSettings[i].Value >>= sValue)
@@ -2776,23 +2776,23 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
nTabNo = nTab;
}
}
- else if (sName.equalsAscii(SC_HORIZONTALSCROLLBARWIDTH) )
+ else if (sName == SC_HORIZONTALSCROLLBARWIDTH)
{
if (rSettings[i].Value >>= nTemp32)
pView->SetTabBarWidth(nTemp32);
}
- else if (sName.equalsAscii(SC_RELHORIZONTALTABBARWIDTH) )
+ else if (sName == SC_RELHORIZONTALTABBARWIDTH)
{
double fWidth = 0.0;
if (rSettings[i].Value >>= fWidth)
pView->SetPendingRelTabBarWidth( fWidth );
}
- else if (sName.equalsAscii(SC_ZOOMTYPE) )
+ else if (sName == SC_ZOOMTYPE)
{
if (rSettings[i].Value >>= nTemp16)
eDefZoomType = SvxZoomType(nTemp16);
}
- else if (sName.equalsAscii(SC_ZOOMVALUE) )
+ else if (sName == SC_ZOOMVALUE)
{
if (rSettings[i].Value >>= nTemp32)
{
@@ -2800,7 +2800,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
aDefZoomX = aDefZoomY = aZoom;
}
}
- else if (sName.equalsAscii(SC_PAGEVIEWZOOMVALUE) )
+ else if (sName == SC_PAGEVIEWZOOMVALUE)
{
if (rSettings[i].Value >>= nTemp32)
{
@@ -2808,15 +2808,15 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
aDefPageZoomX = aDefPageZoomY = aZoom;
}
}
- else if (sName.equalsAscii(SC_SHOWPAGEBREAKPREVIEW) )
+ else if (sName == SC_SHOWPAGEBREAKPREVIEW)
bPageMode = ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value );
- else if ( sName.equalsAscii( SC_UNO_SHOWZERO ) )
+ else if ( sName == SC_UNO_SHOWZERO )
pOptions->SetOption(VOPT_NULLVALS, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
- else if ( sName.equalsAscii( SC_UNO_SHOWNOTES ) )
+ else if ( sName == SC_UNO_SHOWNOTES )
pOptions->SetOption(VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
- else if ( sName.equalsAscii( SC_UNO_SHOWGRID ) )
+ else if ( sName == SC_UNO_SHOWGRID )
pOptions->SetOption(VOPT_GRID, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
- else if ( sName.equalsAscii( SC_UNO_GRIDCOLOR ) )
+ else if ( sName == SC_UNO_GRIDCOLOR )
{
sal_Int64 nColor = 0;
if (rSettings[i].Value >>= nColor)
@@ -2829,27 +2829,27 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
pOptions->SetGridColor(aColor, aColorName);
}
}
- else if ( sName.equalsAscii( SC_UNO_SHOWPAGEBR ) )
+ else if ( sName == SC_UNO_SHOWPAGEBR )
pOptions->SetOption(VOPT_PAGEBREAKS, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
- else if ( sName.equalsAscii( SC_UNO_COLROWHDR ) )
+ else if ( sName == SC_UNO_COLROWHDR )
pOptions->SetOption(VOPT_HEADER, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
- else if ( sName.equalsAscii( SC_UNO_SHEETTABS ) )
+ else if ( sName == SC_UNO_SHEETTABS )
pOptions->SetOption(VOPT_TABCONTROLS, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
- else if ( sName.equalsAscii( SC_UNO_OUTLSYMB ) )
+ else if ( sName == SC_UNO_OUTLSYMB )
pOptions->SetOption(VOPT_OUTLINER, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
- else if ( sName.equalsAscii( SC_UNO_SHOWOBJ ) )
+ else if ( sName == SC_UNO_SHOWOBJ )
{
// #i80528# placeholders not supported anymore
if ( rSettings[i].Value >>= nTemp16 )
pOptions->SetObjMode( VOBJ_TYPE_OLE, (nTemp16 == 1) ? VOBJ_MODE_HIDE : VOBJ_MODE_SHOW );
}
- else if ( sName.equalsAscii( SC_UNO_SHOWCHARTS ) )
+ else if ( sName == SC_UNO_SHOWCHARTS )
{
// #i80528# placeholders not supported anymore
if ( rSettings[i].Value >>= nTemp16 )
pOptions->SetObjMode( VOBJ_TYPE_CHART, (nTemp16 == 1) ? VOBJ_MODE_HIDE : VOBJ_MODE_SHOW );
}
- else if ( sName.equalsAscii( SC_UNO_SHOWDRAW ) )
+ else if ( sName == SC_UNO_SHOWDRAW )
{
// #i80528# placeholders not supported anymore
if ( rSettings[i].Value >>= nTemp16 )
@@ -2858,19 +2858,19 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
else
{
ScGridOptions aGridOpt(pOptions->GetGridOptions());
- if ( sName.equalsAscii( SC_UNO_SNAPTORASTER ) )
+ if ( sName == SC_UNO_SNAPTORASTER )
aGridOpt.SetUseGridSnap( ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
- else if ( sName.equalsAscii( SC_UNO_RASTERVIS ) )
+ else if ( sName == SC_UNO_RASTERVIS )
aGridOpt.SetGridVisible( ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
- else if ( sName.equalsAscii( SC_UNO_RASTERRESX ) )
+ else if ( sName == SC_UNO_RASTERRESX )
aGridOpt.SetFldDrawX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( rSettings[i].Value ) ) );
- else if ( sName.equalsAscii( SC_UNO_RASTERRESY ))
+ else if ( sName == SC_UNO_RASTERRESY )
aGridOpt.SetFldDrawY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( rSettings[i].Value ) ) );
- else if ( sName.equalsAscii( SC_UNO_RASTERSUBX ) )
+ else if ( sName == SC_UNO_RASTERSUBX )
aGridOpt.SetFldDivisionX( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( rSettings[i].Value ) ) );
- else if ( sName.equalsAscii( SC_UNO_RASTERSUBY ) )
+ else if ( sName == SC_UNO_RASTERSUBY )
aGridOpt.SetFldDivisionY( static_cast <sal_uInt32> ( ScUnoHelpFunctions::GetInt32FromAny( rSettings[i].Value ) ) );
- else if ( sName.equalsAscii( SC_UNO_RASTERSYNC ) )
+ else if ( sName == SC_UNO_RASTERSYNC )
aGridOpt.SetSynchronize( ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
pOptions->SetGridOptions(aGridOpt);
}