diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 19:49:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 20:03:42 +0200 |
commit | d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch) | |
tree | b5a12df1fcae025715633469b75ab4c9b6f6d279 /sc | |
parent | 0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 30 | ||||
-rw-r--r-- | sc/source/core/data/column3.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/excel/xehelper.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLTableShapeResizer.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/dbnamdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh5.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/shapeuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaapplication.cxx | 58 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 2 |
14 files changed, 58 insertions, 60 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index c8bd00c0cb57..e9b4d9040f41 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -325,11 +325,11 @@ void Test::testInput() m_pDoc->SetString(0, 0, 0, numstr); m_pDoc->GetString(0, 0, 0, test); - bool bTest = test.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("10.5")); + bool bTest = test == "10.5"; CPPUNIT_ASSERT_MESSAGE("String number should have the first apostrophe stripped.", bTest); m_pDoc->SetString(0, 0, 0, str); m_pDoc->GetString(0, 0, 0, test); - bTest = test.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("'apple'")); + bTest = test == "'apple'"; CPPUNIT_ASSERT_MESSAGE("Text content should have retained the first apostrophe.", bTest); m_pDoc->DeleteTab(0); @@ -1870,7 +1870,7 @@ void Test::testPivotTableNamedSource() m_pDoc->MoveTab(1, 0); rtl::OUString aTabName; m_pDoc->GetName(0, aTabName); - CPPUNIT_ASSERT_MESSAGE("Wrong sheet name.", aTabName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Table"))); + CPPUNIT_ASSERT_MESSAGE( "Wrong sheet name.", aTabName == "Table" ); CPPUNIT_ASSERT_MESSAGE("Pivot table output is on the wrong sheet!", pDPObj->GetOutRange().aStart.Tab() == 0); @@ -2603,7 +2603,7 @@ void Test::testSheetMove() CPPUNIT_ASSERT_MESSAGE("copied sheet should also have all rows visible as the original.", !bHidden && nRow1 == 0 && nRow2 == MAXROW); rtl::OUString aName; m_pDoc->GetName(0, aName); - CPPUNIT_ASSERT_MESSAGE("sheets should have changed places", aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TestTab1"))); + CPPUNIT_ASSERT_MESSAGE( "sheets should have changed places", aName == "TestTab1" ); m_pDoc->SetRowHidden(5, 10, 0, true); bHidden = m_pDoc->RowHidden(0, 0, &nRow1, &nRow2); @@ -2623,7 +2623,7 @@ void Test::testSheetMove() bHidden = m_pDoc->RowHidden(11, 1, &nRow1, &nRow2); CPPUNIT_ASSERT_MESSAGE("rows 11 - maxrow should be visible", !bHidden && nRow1 == 11 && nRow2 == MAXROW); m_pDoc->GetName(0, aName); - CPPUNIT_ASSERT_MESSAGE("sheets should have changed places", aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TestTab2"))); + CPPUNIT_ASSERT_MESSAGE( "sheets should have changed places", aName == "TestTab2" ); m_pDoc->DeleteTab(1); m_pDoc->DeleteTab(0); } @@ -2873,9 +2873,9 @@ void testExtRefFuncT(ScDocument* pDoc, ScDocument* pExtDoc) pDoc->CalcAll(); rtl::OUString aRes = pDoc->GetString(0, 0, 0); - CPPUNIT_ASSERT_MESSAGE("Unexpected result with T.", aRes.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("1.2"))); + CPPUNIT_ASSERT_MESSAGE( "Unexpected result with T.", aRes == "1.2" ); aRes = pDoc->GetString(0, 1, 0); - CPPUNIT_ASSERT_MESSAGE("Unexpected result with T.", aRes.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Foo"))); + CPPUNIT_ASSERT_MESSAGE( "Unexpected result with T.", aRes == "Foo" ); aRes = pDoc->GetString(0, 2, 0); CPPUNIT_ASSERT_MESSAGE("Unexpected result with T.", aRes.isEmpty()); } @@ -3647,22 +3647,22 @@ void Test::testToggleRefFlag() // column relative / row relative -> column absolute / row absolute aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE("Wrong conversion.", aFormula.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=$B$100"))); + CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=$B$100" ); // column absolute / row absolute -> column relative / row absolute aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE("Wrong conversion.", aFormula.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=B$100"))); + CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=B$100" ); // column relative / row absolute -> column absolute / row relative aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE("Wrong conversion.", aFormula.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=$B100"))); + CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=$B100" ); // column absolute / row relative -> column relative / row relative aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE("Wrong conversion.", aFormula.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=B100"))); + CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=B100" ); } { @@ -3678,22 +3678,22 @@ void Test::testToggleRefFlag() // column absolute / row absolute -> column relative / row absolute aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE("Wrong conversion.", aFormula.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=R2C[-3]"))); + CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=R2C[-3]" ); // column relative / row absolute - > column absolute / row relative aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE("Wrong conversion.", aFormula.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=R[-4]C1"))); + CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=R[-4]C1" ); // column absolute / row relative -> column relative / row relative aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE("Wrong conversion.", aFormula.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=R[-4]C[-3]"))); + CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=R[-4]C[-3]" ); // column relative / row relative -> column absolute / row absolute aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE("Wrong conversion.", aFormula.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=R2C1"))); + CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=R2C1" ); } // TODO: Add more test cases esp. for 3D references, Excel A1 syntax, and 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 |