diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:53:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:54:52 +0100 |
commit | a3f32769fc4bb23c64168b412dd10ec769a3854d (patch) | |
tree | 92bb435946dcfc422c9816bc05c150069a2da3c3 /sc | |
parent | 35539318cecddc9ccb2904573a894ea05adc432c (diff) |
Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to
startsWith calls" should rather have converted to oprator ==.
Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/tool/appoptio.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/foptmgr.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/styleuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaworkbook.cxx | 6 |
7 files changed, 13 insertions, 13 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 5d7a3c47628e..357f596ce869 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -3451,7 +3451,7 @@ void Test::testCopyPaste() fValue = m_pDoc->GetValue(ScAddress(1,1,1)); ASSERT_DOUBLES_EQUAL_MESSAGE("formula should return 2 after redo", fValue, 2); aString = m_pDoc->GetString(2, 1, 1); - CPPUNIT_ASSERT_MESSAGE("Cell Sheet2.C2 should contain: test", aString.startsWith("test")); + CPPUNIT_ASSERT_MESSAGE("Cell Sheet2.C2 should contain: test", aString == "test"); m_pDoc->GetFormula(1,1,1, aString); CPPUNIT_ASSERT_MESSAGE("Formula should be correct again", aString == aFormulaString); @@ -3551,13 +3551,13 @@ void Test::testCopyPasteTranspose() //check cell content after transposed copy/paste OUString aString = m_pDoc->GetString(3, 3, 1); - CPPUNIT_ASSERT_MESSAGE("Cell Sheet2.D4 should contain: test", aString.startsWith("test")); + CPPUNIT_ASSERT_MESSAGE("Cell Sheet2.D4 should contain: test", aString == "test"); double fValue = m_pDoc->GetValue(ScAddress(3,1,1)); ASSERT_DOUBLES_EQUAL_MESSAGE("transposed copied cell should return 1", fValue, 1); fValue = m_pDoc->GetValue(ScAddress(3,2,1)); ASSERT_DOUBLES_EQUAL_MESSAGE("transposed copied formula should return 2", fValue, 2); m_pDoc->GetFormula(3, 2, 1, aString); - CPPUNIT_ASSERT_MESSAGE("transposed formula should point on Sheet2.D2", aString.startsWith("=D2+1")); + CPPUNIT_ASSERT_MESSAGE("transposed formula should point on Sheet2.D2", aString == "=D2+1"); // check notes after transposed copy/paste CPPUNIT_ASSERT_MESSAGE("There should be a note on Sheet2.D2", m_pDoc->HasNote(ScAddress(3, 1, 1))); @@ -3616,9 +3616,9 @@ void Test::testMoveBlock() //check cell content OUString aString = m_pDoc->GetString(3, 0, 0); - CPPUNIT_ASSERT_MESSAGE("Cell D1 should contain: test", aString.startsWith("test")); + CPPUNIT_ASSERT_MESSAGE("Cell D1 should contain: test", aString == "test"); m_pDoc->GetFormula(2, 0, 0, aString); - CPPUNIT_ASSERT_MESSAGE("Cell C1 should contain an updated formula", aString.startsWith("=B1+1")); + CPPUNIT_ASSERT_MESSAGE("Cell C1 should contain an updated formula", aString == "=B1+1"); double fValue = m_pDoc->GetValue(aAddrB1); ASSERT_DOUBLES_EQUAL_MESSAGE("Cell B1 should contain 1", fValue, 1); diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx index 28012c19c4ee..5c3a060d5d14 100644 --- a/sc/source/core/tool/appoptio.cxx +++ b/sc/source/core/tool/appoptio.cxx @@ -176,7 +176,7 @@ static void lcl_SetSortList( const Any& rValue ) // if setting is "default", keep default values from ScUserList ctor //! mark "default" in a safe way - sal_Bool bDefault = ( nCount == 1 && pArray[0].startsWith( "NULL" ) ); + sal_Bool bDefault = ( nCount == 1 && pArray[0] == "NULL" ); if (!bDefault) { diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index bdf57025a2d6..3471246db22d 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -159,7 +159,7 @@ void ScFilterOptionsMgr::Init() } } - if ( !theDbName.startsWith(STR_DB_LOCAL_NONAME) ) + if ( theDbName != STR_DB_LOCAL_NONAME ) { theDbArea.append(" ("); theDbArea.append(theDbName).append(')'); diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 13588ff0c523..13f42cabf304 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -199,7 +199,7 @@ bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData ) bool bUndo = pDoc->IsUndoEnabled(); ScDBData* pData = NULL; - if (rNewData.GetName().startsWith(STR_DB_LOCAL_NONAME)) + if (rNewData.GetName() == STR_DB_LOCAL_NONAME) { ScRange aRange; rNewData.GetArea(aRange); diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 40664158cfb3..d5339545d9f2 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1796,7 +1796,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum Reference< beans::XPropertySet > xSeqProp( xLS->getValues(), uno::UNO_QUERY ); OUString aRole; if( xSeqProp.is() && (xSeqProp->getPropertyValue("Role") >>= aRole) && - aRole.startsWith("categories") ) + aRole == "categories" ) bThisIsCategories = bHasCategories = true; } diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index fb0cd202117a..f45b0fa04cb8 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -1843,7 +1843,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName ) SolarMutexGuard aGuard; uno::Any aAny; - if ( aPropertyName.startsWith( SC_UNONAME_DISPNAME ) ) // read-only + if ( aPropertyName == SC_UNONAME_DISPNAME ) // read-only { // core always has the display name SfxStyleSheetBase* pStyle = GetStyle_Impl(); diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index 0dbaef67a9cf..db401bd118f2 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -151,7 +151,7 @@ ScVbaWorkbook::getFileFormat( ) throw (::uno::RuntimeException) aArgs[1].Value >>= aFilterName; } - if (aFilterName.startsWith("Text - txt - csv (StarCalc)")) { + if (aFilterName == "Text - txt - csv (StarCalc)") { aFileFormat = excel::XlFileFormat::xlCSV; //xlFileFormat. } @@ -179,7 +179,7 @@ ScVbaWorkbook::getFileFormat( ) throw (::uno::RuntimeException) aFileFormat = excel::XlFileFormat::xlExcel9795; } - if (aFilterName.startsWith("HTML (StarCalc)")) { + if (aFilterName == "HTML (StarCalc)") { aFileFormat = excel::XlFileFormat::xlHtml; } @@ -187,7 +187,7 @@ ScVbaWorkbook::getFileFormat( ) throw (::uno::RuntimeException) aFileFormat = excel::XlFileFormat::xlTemplate; } - if (aFilterName.startsWith("StarOffice XML (Calc)")) { + if (aFilterName == "StarOffice XML (Calc)") { aFileFormat = excel::XlFileFormat::xlWorkbookNormal; } if ( aFilterName == "calc8" ) { |