diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:35:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:08 +0200 |
commit | 5285beeaa49f6678b471d472868c305c7d9da5f9 (patch) | |
tree | a3dbd28995142ab16b448f28e95821115ef5408f /sc | |
parent | aeb41c9b9b7559c6d87bf92807acdc0df9e104cc (diff) |
remove redundant calls to OUString constructor in if expression
Convert code like:
if( aStr == OUString("xxxx") )
to this:
if( aStr == "xxxx" )
Change-Id: I8d201f048477731eff590fb988259ef0935c080c
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/filters-test.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xename.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/mvtabdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/namedlg/namemgrtable.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/undo/undotab.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/linkuno.cxx | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index 45cd1b2a4fd1..ce5f4b462e07 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -250,9 +250,9 @@ void testContentImpl(ScDocument* pDoc, sal_Int32 nFormat ) //same code for ods, OUString aString = pDoc->GetString(1, 0, 0); //check string import - CPPUNIT_ASSERT_MESSAGE("string imported not correctly", aString == OUString("String1")); + CPPUNIT_ASSERT_MESSAGE("string imported not correctly", aString == "String1"); aString = pDoc->GetString(1, 1, 0); - CPPUNIT_ASSERT_MESSAGE("string not imported correctly", aString == OUString("String2")); + CPPUNIT_ASSERT_MESSAGE("string not imported correctly", aString == "String2"); //check basic formula import // in case of DIF it just contains values diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx index 7dccf6f629ad..b645d5851722 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -492,7 +492,7 @@ sal_uInt16 XclExpNameManagerImpl::FindBuiltInNameIdx( { /* Get built-in index from the name. Special case: the database range 'unnamed' will be mapped to Excel's built-in '_FilterDatabase' name. */ - sal_Unicode cBuiltIn = (bDBRange && (rName == OUString(STR_DB_LOCAL_NONAME))) ? + sal_Unicode cBuiltIn = (bDBRange && (rName == STR_DB_LOCAL_NONAME)) ? EXC_BUILTIN_FILTERDATABASE : XclTools::GetBuiltInDefNameIndex( rName ); if( cBuiltIn < EXC_BUILTIN_UNKNOWN ) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 66e7ba518d9f..676352af77c0 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2373,7 +2373,7 @@ void ScExternalRefManager::convertToAbsName(OUString& rFile) const ScDocShell* pShell = static_cast<ScDocShell*>(SfxObjectShell::GetFirst(&aType, false)); while (pShell) { - if (rFile == OUString(pShell->GetName())) + if (rFile == pShell->GetName()) return; pShell = static_cast<ScDocShell*>(SfxObjectShell::GetNext(*pShell, &aType, false)); diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 3c7dc4328cde..7c169ba531fb 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -301,7 +301,7 @@ IMPL_LINK_NOARG(ScMoveTableDlg, OkHdl) ScDocument* pDoc = GetSelectedDoc(); if (pDoc) pDoc->CreateValidTabName(aCopyName); - if (aCopyName == OUString(pEdTabName->GetText())) + if (aCopyName == pEdTabName->GetText()) pEdTabName->SetText( OUString() ); } else diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx index c3df2e12b478..e8f831e98d21 100644 --- a/sc/source/ui/namedlg/namemgrtable.cxx +++ b/sc/source/ui/namedlg/namemgrtable.cxx @@ -215,8 +215,8 @@ void ScRangeManagerTable::SetEntry(const ScRangeNameLine& rLine) { for (SvTreeListEntry* pEntry = First(); pEntry; pEntry = Next(pEntry)) { - if (rLine.aName == OUString(GetEntryText(pEntry, 0)) - && rLine.aScope == OUString(GetEntryText(pEntry, 2))) + if (rLine.aName == GetEntryText(pEntry, 0) + && rLine.aScope == GetEntryText(pEntry, 2)) { SetCurEntry(pEntry); } diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 4bb09ab5a01e..f4fce0f7e0c6 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -1052,7 +1052,7 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const OUString& rDoc ) : { sal_uInt8 nMode = pDoc->GetLinkMode(i); if (nMode) - if (pDoc->GetLinkDoc(i) == OUString(aDocName)) + if (pDoc->GetLinkDoc(i) == aDocName) { if (!nCount) { diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index 98ce4589fff4..2d19a4631db0 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -295,7 +295,7 @@ void ScSheetLinkObj::setFileName(const OUString& rNewName) ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if ( pDoc->IsLinked(nTab) && pDoc->GetLinkDoc(nTab) == OUString(aFileName) ) // alte Datei + if ( pDoc->IsLinked(nTab) && pDoc->GetLinkDoc(nTab) == aFileName ) // alte Datei pDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), aNewStr, pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab), pDoc->GetLinkTab(nTab), |