summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/column3.cxx3
-rw-r--r--sc/source/filter/excel/xehelper.cxx6
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx2
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx3
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx2
-rw-r--r--sc/source/ui/docshell/docsh5.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx2
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx2
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx58
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/viewfun5.cxx2
13 files changed, 43 insertions, 45 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index fbe114e9eab5..8f6397eebe6f 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -804,8 +804,7 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, sal_uInt16 nFlags, ScDocument& rD
// #TODO #FIXME do we have a localisation issue here?
rForm.GetFormula( aBuf );
rtl::OUString aVal( aBuf.makeStringAndClear() );
- if ( aVal.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "=TRUE()" ) )
- || aVal.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "=FALSE()" ) ) )
+ if ( aVal == "=TRUE()" || aVal == "=FALSE()" )
bForceFormula = true;
}
if (bForceFormula || bCloneFormula)
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 879a08dd35ab..62490f5e0e8e 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -910,13 +910,13 @@ rtl::OUString lclEncodeDosUrl(
rtl::OUString aOldUrl = rUrl;
aBuf.append(EXC_URLSTART_ENCODED);
- if (aOldUrl.getLength() > 2 && aOldUrl.copy(0,2).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("\\\\")))
+ if ( aOldUrl.getLength() > 2 && aOldUrl.copy(0,2) == "\\\\" )
{
// UNC
aBuf.append(EXC_URL_DOSDRIVE).append(sal_Unicode('@'));
aOldUrl = aOldUrl.copy(2);
}
- else if (aOldUrl.getLength() > 2 && aOldUrl.copy(1,2).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(":\\")))
+ else if ( aOldUrl.getLength() > 2 && aOldUrl.copy(1,2) == ":\\" )
{
// drive letter
sal_Unicode cThisDrive = rBase.isEmpty() ? ' ' : rBase.getStr()[0];
@@ -933,7 +933,7 @@ rtl::OUString lclEncodeDosUrl(
sal_Int32 nPos = -1;
while((nPos = aOldUrl.indexOf('\\')) != -1)
{
- if (aOldUrl.copy(0,2).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("..")))
+ if ( aOldUrl.copy(0,2) == ".." )
// parent dir (NOTE: the MS-XLS spec doesn't mention this, and
// Excel seems confused by this token).
aBuf.append(EXC_URL_PARENTDIR);
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 6c8eb507d626..13b1667a98a4 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2835,7 +2835,7 @@ void XclImpPictureObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal
if( (rStrm.GetNextRecId() == EXC_ID3_IMGDATA) && rStrm.StartNextRecord() )
{
// page background is stored as hidden picture with name "__BkgndObj"
- if (IsHidden() && (GetObjName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("__BkgndObj"))))
+ if ( IsHidden() && (GetObjName() == "__BkgndObj") )
GetPageSettings().ReadImgData( rStrm );
else
maGraphic = XclImpDrawing::ReadImgData( GetRoot(), rStrm );
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index 61b686a69067..85ec10243f6d 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -61,7 +61,7 @@ ScMyOLEFixer::~ScMyOLEFixer()
sal_Bool ScMyOLEFixer::IsOLE(uno::Reference< drawing::XShape >& rShape)
{
- return rShape->getShapeType().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape"));
+ return rShape->getShapeType() == "com.sun.star.drawing.OLE2Shape";
}
void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc,
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 82ab2ccabd8e..910c4ee99f60 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -692,8 +692,7 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic
pExport->SetSharedData(pSharedData);
// if there are sheets to copy, get the source stream
- if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("content.xml")) && lcl_HasValidStream(rDoc) &&
- ( pExport->getExportFlags() & EXPORT_OASIS ) )
+ if ( sName == "content.xml" && lcl_HasValidStream(rDoc) && ( pExport->getExportFlags() & EXPORT_OASIS ) )
{
// old stream is still in this file's storage - open read-only
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 9fdaf2ccde43..f879e78e0379 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1406,7 +1406,7 @@ void ScInputHandler::PasteManualTip()
// (wenn wir mal Matrix-Konstanten haben, kann das geaendert werden)
sal_Int32 nTipLen = aManualTip.getLength();
- if ( nTipLen && ( nTipLen < 3 || !aManualTip.copy( nTipLen-3 ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("...")) ) )
+ if ( nTipLen && ( nTipLen < 3 || aManualTip.copy( nTipLen-3 ) != "..." ) )
{
DataChanging(); // kann nicht neu sein
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 493b2db9b94a..3221b7dc60af 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -260,7 +260,7 @@ void ScDbNameDlg::Init()
&& (rEnd.Col() == nCol2) && (rEnd.Row() == nRow2 ) )
{
rtl::OUString aDBName = pDBData->GetName();
- if (!aDBName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)))
+ if ( aDBName != STR_DB_LOCAL_NONAME )
aEdName.SetText(aDBName);
aBtnHeader.Check( pDBData->HasHeader() );
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index bbb1e7eda610..c297ee02bf6d 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -165,7 +165,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
SCCOL nOldCol2;
SCROW nOldRow2;
pData->GetArea( nDummy, nOldCol1,nOldRow1, nOldCol2,nOldRow2 );
- sal_Bool bIsNoName = ( pData->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)) );
+ sal_Bool bIsNoName = ( pData->GetName() == STR_DB_LOCAL_NONAME );
if (!bSelected)
{
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 30a26fee657b..6b424e21c48f 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1717,7 +1717,7 @@ sal_Bool lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName,
// The name "Data" always refers to the data layout field.
rFieldId.maFieldName = rFieldName;
rFieldId.mnFieldIdx = 0;
- rFieldId.mbDataLayout = rFieldName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_DATALAYOUT_NAME ) );
+ rFieldId.mbDataLayout = rFieldName == SC_DATALAYOUT_NAME;
pDPObj->GetSource(); // IsDimNameInUse doesn't update source data
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index efbce663d2bd..167449ffb6ea 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -276,7 +276,7 @@ sal_Bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Po
{
sal_Bool bReturn = false;
rtl::OUString sType(xShape->getShapeType());
- sal_Bool bCaptionShape(sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape")));
+ sal_Bool bCaptionShape( sType == "com.sun.star.drawing.CaptionShape" );
if (bCaptionShape)
{
uno::Reference < beans::XPropertySet > xShapeProp (xShape, uno::UNO_QUERY);
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 8885258f854a..d0201a40d6bd 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1639,7 +1639,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
::rtl::OUString sFileExtension = aURLObj.GetExtension();
if ( sFileExtension.isEmpty() )
{
- sFileExtension = sFirstFilter.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("*.*")) ? sFileExtension : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
+ sFileExtension = sFirstFilter == "*.*" ? sFileExtension : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
aPathStr = sFileExtension.isEmpty() ? aPathStr : aPathStr + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
}
else
@@ -1667,7 +1667,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
}
if ( !bValidFilter )
{
- sFileExtension = sFirstFilter.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("*.*")) ? rtl::OUString()
+ sFileExtension = sFirstFilter == "*.*" ? rtl::OUString()
: sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
aPathStr = sFileExtension.isEmpty() ? aPathStr
: aPathStr + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
@@ -1713,33 +1713,33 @@ ConvertCountryCode(const OUString& language)
{
sal_Int32 nCode = 0;
- if( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ar")) ) nCode = 966; // Arabic
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("cs")) ) nCode = 42; // Czech
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("da")) ) nCode = 45; // Danish
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("de")) ) nCode = 49; // German
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("en")) ) nCode = 1; // English
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("es")) ) nCode = 34; // Spanish
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("el")) ) nCode = 30; // Greek
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("fa")) ) nCode = 98; // Persian = Farsi
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("fi")) ) nCode = 358; // Finnish
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("fr")) ) nCode = 33; // French
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("he")) ) nCode = 972; // Hebrew
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hi")) ) nCode = 91; // Indian = Hindi
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hu")) ) nCode = 36; // Hungarian
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("it")) ) nCode = 39; // Italian
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja")) ) nCode = 81; // Japanese
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko")) ) nCode = 82; // Korean
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("nl")) ) nCode = 31; // Dutch
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("no")) ) nCode = 47; // Norwegian
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pl")) ) nCode = 48; // Polish
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pt")) ) nCode = 351; // Portuguese
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ru")) ) nCode = 7; // Russian
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sv")) ) nCode = 46; // Swedish
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("th")) ) nCode = 66; // Thai
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("tk")) ) nCode = 90; // Turkish
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ur")) ) nCode = 92; // Urdu
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vi")) ) nCode = 84; // Vietnamese
- else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) ) nCode = 86; // Simplified Chinese
+ if( language == "ar" ) nCode = 966; // Arabic
+ else if ( language == "cs" ) nCode = 42; // Czech
+ else if ( language == "da" ) nCode = 45; // Danish
+ else if ( language == "de" ) nCode = 49; // German
+ else if ( language == "en" ) nCode = 1; // English
+ else if ( language == "es" ) nCode = 34; // Spanish
+ else if ( language == "el" ) nCode = 30; // Greek
+ else if ( language == "fa" ) nCode = 98; // Persian = Farsi
+ else if ( language == "fi" ) nCode = 358; // Finnish
+ else if ( language == "fr" ) nCode = 33; // French
+ else if ( language == "he" ) nCode = 972; // Hebrew
+ else if ( language == "hi" ) nCode = 91; // Indian = Hindi
+ else if ( language == "hu" ) nCode = 36; // Hungarian
+ else if ( language == "it" ) nCode = 39; // Italian
+ else if ( language == "ja" ) nCode = 81; // Japanese
+ else if ( language == "ko" ) nCode = 82; // Korean
+ else if ( language == "nl" ) nCode = 31; // Dutch
+ else if ( language == "no" ) nCode = 47; // Norwegian
+ else if ( language == "pl" ) nCode = 48; // Polish
+ else if ( language == "pt" ) nCode = 351; // Portuguese
+ else if ( language == "ru" ) nCode = 7; // Russian
+ else if ( language == "sv" ) nCode = 46; // Swedish
+ else if ( language == "th" ) nCode = 66; // Thai
+ else if ( language == "tk" ) nCode = 90; // Turkish
+ else if ( language == "ur" ) nCode = 92; // Urdu
+ else if ( language == "vi" ) nCode = 84; // Vietnamese
+ else if ( language == "zh" ) nCode = 86; // Simplified Chinese
return nCode;
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 3812183bc7a8..847483fb36f3 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1289,7 +1289,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
nSelPos = pFilterBox->GetEntryPos(rQueryStr);
}
}
- else if (rEntry.eOp == SC_TOPVAL && rQueryStr.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("10")))
+ else if ( rEntry.eOp == SC_TOPVAL && rQueryStr == "10" )
nSelPos = SC_AUTOFILTER_TOP10;
else
nSelPos = SC_AUTOFILTER_CUSTOM;
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 54e8f0e9d59b..f8277d951dfe 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -703,7 +703,7 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
if (aStrs.size() > 3)
pExtra = &aStrs[3];
- if (pExtra && pExtra->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("calc:extref")))
+ if ( pExtra && *pExtra == "calc:extref" )
{
// Paste this as an external reference. Note that paste link always
// uses Calc A1 syntax even when another formula syntax is specified