diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:36:49 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:36:49 +0100 |
commit | e53db9461e1cc7ad25ecf5e96021a2f4e70857b1 (patch) | |
tree | 768cc65694d0bf8c01e7a7cc192ad55240b58993 | |
parent | 1a3834d7b9382968cf7ba3755d41a6e317997aec (diff) |
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Ief66447f04245b8ab0a4acbf097eb7283529d45d
91 files changed, 398 insertions, 440 deletions
diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx index 8dc111bacf5e..c4fab7cd85f7 100644 --- a/sc/qa/extras/new_cond_format.cxx +++ b/sc/qa/extras/new_cond_format.cxx @@ -73,7 +73,7 @@ uno::Reference< uno::XInterface > ScConditionalFormatTest::init(sal_Int32 nIndex { // get the test file OUString aFileURL; - createFileURL(OUString("new_cond_format_api.ods"), aFileURL); + createFileURL("new_cond_format_api.ods", aFileURL); mxComponent = loadFromDesktop(aFileURL); } CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is()); diff --git a/sc/qa/extras/scannotationobj.cxx b/sc/qa/extras/scannotationobj.cxx index 85316528b211..e0b25000acc9 100644 --- a/sc/qa/extras/scannotationobj.cxx +++ b/sc/qa/extras/scannotationobj.cxx @@ -82,7 +82,7 @@ uno::Reference< uno::XInterface > ScAnnontationObj::init() // get the test file OUString aFileURL; - createFileURL(OUString("ScAnnotationObj.ods"), aFileURL); + createFileURL("ScAnnotationObj.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL); CPPUNIT_ASSERT_MESSAGE("Component not loaded",mxComponent.is()); diff --git a/sc/qa/extras/scannotationsobj.cxx b/sc/qa/extras/scannotationsobj.cxx index 109c0654b08c..84b51245d8ee 100644 --- a/sc/qa/extras/scannotationsobj.cxx +++ b/sc/qa/extras/scannotationsobj.cxx @@ -73,7 +73,7 @@ uno::Reference< uno::XInterface > ScAnnontationsObj::init() { // get the test file OUString aFileURL; - createFileURL(OUString("ScAnnotationObj.ods"), aFileURL); + createFileURL("ScAnnotationObj.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL); CPPUNIT_ASSERT_MESSAGE("Component not loaded",mxComponent.is()); diff --git a/sc/qa/extras/sccondformats.cxx b/sc/qa/extras/sccondformats.cxx index 43d0d6ee948f..85a9d592bba0 100644 --- a/sc/qa/extras/sccondformats.cxx +++ b/sc/qa/extras/sccondformats.cxx @@ -65,7 +65,7 @@ uno::Reference< uno::XInterface > ScConditionalFormatTest::init() { // get the test file OUString aFileURL; - createFileURL(OUString("new_cond_format_test.ods"), aFileURL); + createFileURL("new_cond_format_test.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL); CPPUNIT_ASSERT_MESSAGE("Component not loaded",mxComponent.is()); @@ -124,7 +124,7 @@ void ScConditionalFormatTest::testUndoAnchor() { const OString sFailedMessage = OString("Failed on :"); OUString aFileURL; - createFileURL(OUString("document_with_linked_graphic.ods"), aFileURL); + createFileURL("document_with_linked_graphic.ods", aFileURL); // open the document with graphic included uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileURL); CPPUNIT_ASSERT(xComponent.is()); diff --git a/sc/qa/extras/scdatapilotfieldobj.cxx b/sc/qa/extras/scdatapilotfieldobj.cxx index d2d9bd0c2c23..d97cd1ffa189 100644 --- a/sc/qa/extras/scdatapilotfieldobj.cxx +++ b/sc/qa/extras/scdatapilotfieldobj.cxx @@ -60,7 +60,7 @@ ScDataPilotFieldObj::ScDataPilotFieldObj() uno::Reference< uno::XInterface > ScDataPilotFieldObj::init() { OUString aFileURL; - createFileURL(OUString("scdatapilotfieldobj.ods"), aFileURL); + createFileURL("scdatapilotfieldobj.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT(mxComponent.is()); diff --git a/sc/qa/extras/scdatapilottableobj.cxx b/sc/qa/extras/scdatapilottableobj.cxx index a39a4c3635b8..88e31a545d2d 100644 --- a/sc/qa/extras/scdatapilottableobj.cxx +++ b/sc/qa/extras/scdatapilottableobj.cxx @@ -112,7 +112,7 @@ uno::Reference< uno::XInterface > ScDataPilotTableObj::getSheets() uno::Reference< uno::XInterface > ScDataPilotTableObj::initDP2() { OUString aFileURL; - createFileURL(OUString("ScDataPilotTableObj.ods"), aFileURL); + createFileURL("ScDataPilotTableObj.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT(mxComponent.is()); diff --git a/sc/qa/extras/scmodelobj.cxx b/sc/qa/extras/scmodelobj.cxx index dbddb106f532..929e76d3703a 100644 --- a/sc/qa/extras/scmodelobj.cxx +++ b/sc/qa/extras/scmodelobj.cxx @@ -47,7 +47,7 @@ uno::Reference< lang::XComponent > ScModelObj::mxComponent; uno::Reference< uno::XInterface > ScModelObj::init() { OUString aFileURL; - createFileURL(OUString("ScModelObj.ods"), aFileURL); + createFileURL("ScModelObj.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT(mxComponent.is()); diff --git a/sc/qa/extras/scnamedrangeobj.cxx b/sc/qa/extras/scnamedrangeobj.cxx index 20dfa517bb61..4b01d6a26030 100644 --- a/sc/qa/extras/scnamedrangeobj.cxx +++ b/sc/qa/extras/scnamedrangeobj.cxx @@ -66,7 +66,7 @@ ScNamedRangeObj::ScNamedRangeObj(): uno::Reference< sheet::XNamedRanges > ScNamedRangeObj::init_impl() { OUString aFileURL; - createFileURL(OUString("ScNamedRangeObj.ods"), aFileURL); + createFileURL("ScNamedRangeObj.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT(mxComponent.is()); @@ -90,7 +90,7 @@ uno::Reference< sheet::XNamedRange> ScNamedRangeObj::getNamedRange(const OUStrin uno::Reference< uno::XInterface > ScNamedRangeObj::init() { - return getNamedRange(OUString("NamedRange")); + return getNamedRange("NamedRange"); } void ScNamedRangeObj::setUp() diff --git a/sc/qa/extras/scnamedrangesobj.cxx b/sc/qa/extras/scnamedrangesobj.cxx index 4a176b906cd8..4eb341a46b25 100644 --- a/sc/qa/extras/scnamedrangesobj.cxx +++ b/sc/qa/extras/scnamedrangesobj.cxx @@ -54,7 +54,7 @@ ScNamedRangesObj::ScNamedRangesObj() uno::Reference< uno::XInterface > ScNamedRangesObj::init(sal_Int32 nSheet) { OUString aFileURL; - createFileURL(OUString("ScNamedRangeObj.ods"), aFileURL); + createFileURL("ScNamedRangeObj.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT(mxComponent.is()); diff --git a/sc/qa/extras/scoutlineobj.cxx b/sc/qa/extras/scoutlineobj.cxx index b275a57f2676..979cbbcc4443 100644 --- a/sc/qa/extras/scoutlineobj.cxx +++ b/sc/qa/extras/scoutlineobj.cxx @@ -57,7 +57,7 @@ uno::Reference< uno::XInterface > ScOutlineObj::init() { // get the test file OUString aFileURL; - createFileURL(OUString("ScOutlineObj.ods"), aFileURL); + createFileURL("ScOutlineObj.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL); CPPUNIT_ASSERT_MESSAGE("Component not loaded",mxComponent.is()); diff --git a/sc/qa/extras/scstyleloaderobj.cxx b/sc/qa/extras/scstyleloaderobj.cxx index 7e8d576bd2d8..000da4040e2e 100644 --- a/sc/qa/extras/scstyleloaderobj.cxx +++ b/sc/qa/extras/scstyleloaderobj.cxx @@ -93,7 +93,7 @@ uno::Reference< lang::XComponent > ScStyleLoaderObj::getSourceComponent(){ OUString ScStyleLoaderObj::getTestURL(){ OUString aFileURL; - createFileURL(OUString("ScStyleLoaderObj.ods"), aFileURL); + createFileURL("ScStyleLoaderObj.ods", aFileURL); return aFileURL; } diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx index f13efd2b845f..0d34f0b35e43 100644 --- a/sc/qa/extras/sctablesheetobj.cxx +++ b/sc/qa/extras/sctablesheetobj.cxx @@ -56,7 +56,7 @@ ScTableSheetObj::ScTableSheetObj(): uno::Reference< uno::XInterface > ScTableSheetObj::init() { OUString aFileURL; - createFileURL(OUString("ScTableSheetObj.ods"), aFileURL); + createFileURL("ScTableSheetObj.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT(mxComponent.is()); diff --git a/sc/qa/extras/sctablesheetsobj.cxx b/sc/qa/extras/sctablesheetsobj.cxx index 570b95765696..b062f271a049 100644 --- a/sc/qa/extras/sctablesheetsobj.cxx +++ b/sc/qa/extras/sctablesheetsobj.cxx @@ -80,7 +80,7 @@ uno::Reference< lang::XComponent > ScTableSheetsObj::loadFromDesktop(const OUStr uno::Reference< uno::XInterface > ScTableSheetsObj::init() { OUString aFileURL; - createFileURL(OUString("rangenamessrc.ods"), aFileURL); + createFileURL("rangenamessrc.ods", aFileURL); if(!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL); CPPUNIT_ASSERT(mxComponent.is()); diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx index 1c83f8ae3ffe..0c2d43b57862 100644 --- a/sc/qa/unit/bugfix-test.cxx +++ b/sc/qa/unit/bugfix-test.cxx @@ -107,7 +107,7 @@ void ScFiltersTest::testTdf64229() //test hard recalc: document has an incorrect cached formula result //hard recalc should have updated to the correct result - createCSVPath(OUString("fdo64229b."), aCSVFileName); + createCSVPath("fdo64229b.", aCSVFileName); testFile(aCSVFileName, rDoc, 0); xDocSh->DoClose(); @@ -125,7 +125,7 @@ void ScFiltersTest::testTdf36933() //test hard recalc: document has an incorrect cached formula result //hard recalc should have updated to the correct result - createCSVPath(OUString("fdo36933test."), aCSVFileName); + createCSVPath("fdo36933test.", aCSVFileName); testFile(aCSVFileName, rDoc, 0); xDocSh->DoClose(); @@ -143,7 +143,7 @@ void ScFiltersTest::testTdf43700() //test hard recalc: document has an incorrect cached formula result //hard recalc should have updated to the correct result - createCSVPath(OUString("fdo43700test."), aCSVFileName); + createCSVPath("fdo43700test.", aCSVFileName); testFile(aCSVFileName, rDoc, 0); xDocSh->DoClose(); @@ -161,7 +161,7 @@ void ScFiltersTest::testTdf43534() //test hard recalc: document has an incorrect cached formula result //hard recalc should have updated to the correct result - createCSVPath(OUString("fdo43534test."), aCSVFileName); + createCSVPath("fdo43534test.", aCSVFileName); // testFile(aCSVFileName, rDoc, 0); xDocSh->DoClose(); diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index 1f90e7a24a59..3509ea55dd97 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -128,22 +128,22 @@ bool ScFiltersTest::load(const OUString &rFilter, const OUString &rURL, void ScFiltersTest::testCVEs() { #ifndef DISABLE_CVE_TESTS - testDir(OUString("Quattro Pro 6.0"), + testDir("Quattro Pro 6.0", getURLFromSrc("/sc/qa/unit/data/qpro/"), OUString()); //warning, the current "sylk filter" in sc (docsh.cxx) automatically //chains on failure on trying as csv, rtf, etc. so "success" may //not indicate that it imported as .slk. - testDir(OUString("SYLK"), + testDir("SYLK", getURLFromSrc("/sc/qa/unit/data/slk/"), OUString()); - testDir(OUString("MS Excel 97"), + testDir("MS Excel 97", getURLFromSrc("/sc/qa/unit/data/xls/"), OUString()); - testDir(OUString("dBase"), + testDir("dBase", getURLFromSrc("/sc/qa/unit/data/dbf/"), OUString()); - testDir(OUString("Lotus"), + testDir("Lotus", getURLFromSrc("/sc/qa/unit/data/wks/"), OUString()); #endif diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 5eff7d4bf7d6..2ac7ee8cf33b 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -177,7 +177,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat) { //test Sheet1 with csv file OUString aCSVFileName; - pTest->createCSVPath(OUString("numberFormat."), aCSVFileName); + pTest->createCSVPath("numberFormat.", aCSVFileName); testFile(aCSVFileName, *pDoc, 0, PureString); //need to test the color of B3 //it's not a font color! @@ -249,7 +249,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat) //test Sheet3 only for ods and xlsx if ( nFormat == ODS || nFormat == XLSX ) { - pTest->createCSVPath(OUString("conditionalFormatting."), aCSVFileName); + pTest->createCSVPath("conditionalFormatting.", aCSVFileName); testCondFile(aCSVFileName, pDoc, 2); // test parent cell style import ( fdo#55198 ) if ( nFormat == XLSX ) diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 0ab499bd6fbf..24ebd599a45c 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -279,7 +279,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt pExportFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT); aStoreMedium.SetFilter(pExportFilter); SfxItemSet* pExportSet = aStoreMedium.GetItemSet(); - uno::Sequence< beans::NamedValue > aEncryptionData = comphelper::OStorageHelper::CreatePackageEncryptionData( OUString("test") ); + uno::Sequence< beans::NamedValue > aEncryptionData = comphelper::OStorageHelper::CreatePackageEncryptionData( "test" ); uno::Any xEncryptionData; xEncryptionData <<= aEncryptionData; pExportSet->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, xEncryptionData)); diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index d362b2d596e2..b4c0451ef358 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -481,7 +481,7 @@ void ScFiltersTest::testHardRecalcODS() //test hard recalc: document has an incorrect cached formula result //hard recalc should have updated to the correct result - createCSVPath(OUString("hard-recalc."), aCSVFileName); + createCSVPath("hard-recalc.", aCSVFileName); testFile(aCSVFileName, rDoc, 0); xDocSh->DoClose(); @@ -497,22 +497,22 @@ void ScFiltersTest::testFunctionsODS() OUString aCSVFileName; //test logical functions - createCSVPath(OUString("logical-functions."), aCSVFileName); + createCSVPath("logical-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 0); //test spreadsheet functions - createCSVPath(OUString("spreadsheet-functions."), aCSVFileName); + createCSVPath("spreadsheet-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 1); //test mathematical functions - createCSVPath(OUString("mathematical-functions."), aCSVFileName); + createCSVPath("mathematical-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 2, PureString); //test information functions - createCSVPath(OUString("information-functions."), aCSVFileName); + createCSVPath("information-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 3); // text functions - createCSVPath(OUString("text-functions."), aCSVFileName); + createCSVPath("text-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 4, PureString); // statistical functions - createCSVPath(OUString("statistical-functions."), aCSVFileName); + createCSVPath("statistical-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 5); // financial functions createCSVPath("financial-functions.", aCSVFileName); @@ -581,19 +581,19 @@ void ScFiltersTest::testCachedFormulaResultsODS() OUString aCSVFileName; //test cached formula results of logical functions - createCSVPath(OUString("logical-functions."), aCSVFileName); + createCSVPath("logical-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 0); //test cached formula results of spreadsheet functions - createCSVPath(OUString("spreadsheet-functions."), aCSVFileName); + createCSVPath("spreadsheet-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 1); //test cached formula results of mathematical functions - createCSVPath(OUString("mathematical-functions."), aCSVFileName); + createCSVPath("mathematical-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 2, PureString); //test cached formula results of information functions - createCSVPath(OUString("information-functions."), aCSVFileName); + createCSVPath("information-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 3); // text functions - createCSVPath(OUString("text-functions."), aCSVFileName); + createCSVPath("text-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 4, PureString); xDocSh->DoClose(); @@ -850,7 +850,7 @@ void ScFiltersTest::testMatrixODS() ScDocument& rDoc = xDocSh->GetDocument(); OUString aCSVFileName; - createCSVPath(OUString("matrix."), aCSVFileName); + createCSVPath("matrix.", aCSVFileName); testFile(aCSVFileName, rDoc, 0); xDocSh->DoClose(); @@ -865,7 +865,7 @@ void ScFiltersTest::testMatrixXLS() ScDocument& rDoc = xDocSh->GetDocument(); OUString aCSVFileName; - createCSVPath(OUString("matrix."), aCSVFileName); + createCSVPath("matrix.", aCSVFileName); testFile(aCSVFileName, rDoc, 0); xDocSh->DoClose(); @@ -1031,7 +1031,7 @@ void ScFiltersTest::testBugFixesODS() { // fdo#40967 OUString aCSVFileName; - createCSVPath(OUString("bugFix_Sheet2."), aCSVFileName); + createCSVPath("bugFix_Sheet2.", aCSVFileName); testFile(aCSVFileName, rDoc, 1); } @@ -1102,7 +1102,7 @@ void ScFiltersTest::testMergedCellsODS() //check sheet1 content OUString aCSVFileName1; - createCSVPath(OUString("merged1."), aCSVFileName1); + createCSVPath("merged1.", aCSVFileName1); testFile(aCSVFileName1, rDoc, 0); //check sheet1 merged cells @@ -1112,7 +1112,7 @@ void ScFiltersTest::testMergedCellsODS() //check sheet2 content OUString aCSVFileName2; - createCSVPath(OUString("merged2."), aCSVFileName2); + createCSVPath("merged2.", aCSVFileName2); testFile(aCSVFileName2, rDoc, 1); //check sheet2 merged cells @@ -1128,12 +1128,12 @@ void ScFiltersTest::testRepeatedColumnsODS() //text OUString aCSVFileName1; - createCSVPath(OUString("repeatedColumns1."), aCSVFileName1); + createCSVPath("repeatedColumns1.", aCSVFileName1); testFile(aCSVFileName1, rDoc, 0); //numbers OUString aCSVFileName2; - createCSVPath(OUString("repeatedColumns2."), aCSVFileName2); + createCSVPath("repeatedColumns2.", aCSVFileName2); testFile(aCSVFileName2, rDoc, 1); xDocSh->DoClose(); @@ -1278,11 +1278,11 @@ void ScFiltersTest::testDataValidityODS() //check each sheet's content OUString aCSVFileName1; - createCSVPath(OUString("dataValidity1."), aCSVFileName1); + createCSVPath("dataValidity1.", aCSVFileName1); testFile(aCSVFileName1, rDoc, 0); OUString aCSVFileName2; - createCSVPath(OUString("dataValidity2."), aCSVFileName2); + createCSVPath("dataValidity2.", aCSVFileName2); testFile(aCSVFileName2, rDoc, 1); xDocSh->DoClose(); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 0ef8cdc17930..169f03dada59 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4361,7 +4361,7 @@ void Test::testSearchCells() m_pDoc->SetString(ScAddress(0,6,0), "C"); SvxSearchItem aItem(SID_SEARCH_ITEM); - aItem.SetSearchString(OUString("A")); + aItem.SetSearchString("A"); aItem.SetCommand(SvxSearchCmd::FIND_ALL); ScMarkData aMarkData; aMarkData.SelectOneTable(0); diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 6972517a7d00..ab55094b8865 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -3359,16 +3359,16 @@ void Test::testFuncPRODUCT() ScAddress aPos(3, 0, 0); m_pDoc->SetValue(0, 0, 0, 3.0); // A1 - m_pDoc->SetString(aPos, OUString("=PRODUCT(A1)")); + m_pDoc->SetString(aPos, "=PRODUCT(A1)"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT failed", 3.0, m_pDoc->GetValue(aPos)); m_pDoc->SetValue(0, 0, 0, -3.0); // A1 CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT failed", -3.0, m_pDoc->GetValue(aPos)); - m_pDoc->SetString(aPos, OUString("=PRODUCT(B1)")); + m_pDoc->SetString(aPos, "=PRODUCT(B1)"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT failed", 0.0, m_pDoc->GetValue(aPos)); m_pDoc->SetValue(1, 0, 0, 10.0); // B1 CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT failed", 10.0, m_pDoc->GetValue(aPos)); - m_pDoc->SetString(aPos, OUString("=PRODUCT(A1:C3)")); + m_pDoc->SetString(aPos, "=PRODUCT(A1:C3)"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT failed", -30.0, m_pDoc->GetValue(aPos)); m_pDoc->SetValue(1, 1, 0, -1.0); // B2 CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT failed", 30.0, m_pDoc->GetValue(aPos)); @@ -3387,18 +3387,18 @@ void Test::testFuncPRODUCT() m_pDoc->SetValue(2, 2, 0, 0.0); // C3 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of PRODUCT failed", 0.0, m_pDoc->GetValue(aPos), 10e-4); - m_pDoc->SetString(aPos, OUString("=PRODUCT({2;3;4})")); + m_pDoc->SetString(aPos, "=PRODUCT({2;3;4})"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT with inline array failed", 24.0, m_pDoc->GetValue(aPos)); - m_pDoc->SetString(aPos, OUString("=PRODUCT({2;-2;2})")); + m_pDoc->SetString(aPos, "=PRODUCT({2;-2;2})"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT with inline array failed", -8.0, m_pDoc->GetValue(aPos)); - m_pDoc->SetString(aPos, OUString("=PRODUCT({8;0.125;-1})")); + m_pDoc->SetString(aPos, "=PRODUCT({8;0.125;-1})"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT with inline array failed", -1.0, m_pDoc->GetValue(aPos)); - m_pDoc->SetString(aPos, OUString("=PRODUCT({2;3};{4;5})")); + m_pDoc->SetString(aPos, "=PRODUCT({2;3};{4;5})"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT with inline array failed", 120.0, m_pDoc->GetValue(aPos)); - m_pDoc->SetString(aPos, OUString("=PRODUCT({10;-8};{3;-1};{15;30};{7})")); + m_pDoc->SetString(aPos, "=PRODUCT({10;-8};{3;-1};{15;30};{7})"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT with inline array failed", 756000.0, m_pDoc->GetValue(aPos)); - m_pDoc->SetString(aPos, OUString("=PRODUCT({10;-0.1;8};{0.125;4;0.25;2};{0.5};{1};{-1})")); + m_pDoc->SetString(aPos, "=PRODUCT({10;-0.1;8};{0.125;4;0.25;2};{0.5};{1};{-1})"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of PRODUCT with inline array failed", 1.0, m_pDoc->GetValue(aPos)); m_pDoc->DeleteTab(0); @@ -3457,7 +3457,7 @@ void Test::testFuncSUMXMY2() CPPUNIT_ASSERT_EQUAL(9.0, m_pDoc->GetValue(aPos)); double result = 0.0; - m_pDoc->SetString(0, 4, 0, OUString("=SUMXMY2({2;3;4};{4;3;2})")); + m_pDoc->SetString(0, 4, 0, "=SUMXMY2({2;3;4};{4;3;2})"); m_pDoc->GetValue(0, 4, 0, result); CPPUNIT_ASSERT_MESSAGE("Calculation of SUMXMY2 with inline arrays failed", result == 8.0); @@ -3528,38 +3528,38 @@ void Test::testFuncN() // Put values to reference. double val = 0; m_pDoc->SetValue(0, 0, 0, val); - m_pDoc->SetString(0, 2, 0, OUString("Text")); + m_pDoc->SetString(0, 2, 0, "Text"); val = 1; m_pDoc->SetValue(0, 3, 0, val); val = -1; m_pDoc->SetValue(0, 4, 0, val); val = 12.3; m_pDoc->SetValue(0, 5, 0, val); - m_pDoc->SetString(0, 6, 0, OUString("'12.3")); + m_pDoc->SetString(0, 6, 0, "'12.3"); // Cell references - m_pDoc->SetString(1, 0, 0, OUString("=N(A1)")); - m_pDoc->SetString(1, 1, 0, OUString("=N(A2)")); - m_pDoc->SetString(1, 2, 0, OUString("=N(A3)")); - m_pDoc->SetString(1, 3, 0, OUString("=N(A4)")); - m_pDoc->SetString(1, 4, 0, OUString("=N(A5)")); - m_pDoc->SetString(1, 5, 0, OUString("=N(A6)")); - m_pDoc->SetString(1, 6, 0, OUString("=N(A9)")); + m_pDoc->SetString(1, 0, 0, "=N(A1)"); + m_pDoc->SetString(1, 1, 0, "=N(A2)"); + m_pDoc->SetString(1, 2, 0, "=N(A3)"); + m_pDoc->SetString(1, 3, 0, "=N(A4)"); + m_pDoc->SetString(1, 4, 0, "=N(A5)"); + m_pDoc->SetString(1, 5, 0, "=N(A6)"); + m_pDoc->SetString(1, 6, 0, "=N(A9)"); // In-line values - m_pDoc->SetString(1, 7, 0, OUString("=N(0)")); - m_pDoc->SetString(1, 8, 0, OUString("=N(1)")); - m_pDoc->SetString(1, 9, 0, OUString("=N(-1)")); - m_pDoc->SetString(1, 10, 0, OUString("=N(123)")); - m_pDoc->SetString(1, 11, 0, OUString("=N(\"\")")); - m_pDoc->SetString(1, 12, 0, OUString("=N(\"12\")")); - m_pDoc->SetString(1, 13, 0, OUString("=N(\"foo\")")); + m_pDoc->SetString(1, 7, 0, "=N(0)"); + m_pDoc->SetString(1, 8, 0, "=N(1)"); + m_pDoc->SetString(1, 9, 0, "=N(-1)"); + m_pDoc->SetString(1, 10, 0, "=N(123)"); + m_pDoc->SetString(1, 11, 0, "=N(\"\")"); + m_pDoc->SetString(1, 12, 0, "=N(\"12\")"); + m_pDoc->SetString(1, 13, 0, "=N(\"foo\")"); // Range references - m_pDoc->SetString(2, 2, 0, OUString("=N(A1:A8)")); - m_pDoc->SetString(2, 3, 0, OUString("=N(A1:A8)")); - m_pDoc->SetString(2, 4, 0, OUString("=N(A1:A8)")); - m_pDoc->SetString(2, 5, 0, OUString("=N(A1:A8)")); + m_pDoc->SetString(2, 2, 0, "=N(A1:A8)"); + m_pDoc->SetString(2, 3, 0, "=N(A1:A8)"); + m_pDoc->SetString(2, 4, 0, "=N(A1:A8)"); + m_pDoc->SetString(2, 5, 0, "=N(A1:A8)"); // Calculate and check the results. m_pDoc->CalcAll(); @@ -3669,8 +3669,8 @@ void Test::testFuncCOUNTIF() // Clear A1:A2. clearRange(m_pDoc, ScRange(0, 0, 0, 0, 1, 0)); - m_pDoc->SetString(0, 0, 0, OUString("=\"\"")); - m_pDoc->SetString(0, 1, 0, OUString("=COUNTIF(A1;1)")); + m_pDoc->SetString(0, 0, 0, "=\"\""); + m_pDoc->SetString(0, 1, 0, "=COUNTIF(A1;1)"); double result = m_pDoc->GetValue(0, 1, 0); CPPUNIT_ASSERT_MESSAGE("We shouldn't count empty string as valid number.", result == 0.0); @@ -3850,7 +3850,7 @@ void Test::testFuncSHEET() CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet", m_pDoc->InsertTab (SC_TAB_APPEND, aTabName1)); - m_pDoc->SetString(0, 0, 0, OUString("=SHEETS()")); + m_pDoc->SetString(0, 0, 0, "=SHEETS()"); m_pDoc->CalcFormulaTree(false, false); double original; m_pDoc->GetValue(0, 0, 0, original); @@ -3884,7 +3884,7 @@ void Test::testFuncNOW() double val = 1; m_pDoc->SetValue(0, 0, 0, val); - m_pDoc->SetString(0, 1, 0, OUString("=IF(A1>0;NOW();0")); + m_pDoc->SetString(0, 1, 0, "=IF(A1>0;NOW();0"); double now1; m_pDoc->GetValue(0, 1, 0, now1); CPPUNIT_ASSERT_MESSAGE("Value of NOW() should be positive.", now1 > 0.0); @@ -5109,8 +5109,8 @@ void Test::testExternalRef() // Test external references on the main document while the external // document is still in memory. - m_pDoc->InsertTab(0, OUString("Test Sheet")); - m_pDoc->SetString(0, 0, 0, OUString("='file:///extdata.fake'#Data1.A1")); + m_pDoc->InsertTab(0, "Test Sheet"); + m_pDoc->SetString(0, 0, 0, "='file:///extdata.fake'#Data1.A1"); OUString test = m_pDoc->GetString(0, 0, 0); CPPUNIT_ASSERT_MESSAGE("Value is different from the original", test.equals(name)); @@ -5127,15 +5127,15 @@ void Test::testExternalRef() CPPUNIT_ASSERT_MESSAGE("Unexpected sheet name.", aTabNames[1].equals(aExtSh2Name)); CPPUNIT_ASSERT_MESSAGE("Unexpected sheet name.", aTabNames[2].equals(aExtSh3Name)); - m_pDoc->SetString(1, 0, 0, OUString("='file:///extdata.fake'#Data1.B1")); + m_pDoc->SetString(1, 0, 0, "='file:///extdata.fake'#Data1.B1"); test = m_pDoc->GetString(1, 0, 0); CPPUNIT_ASSERT_MESSAGE("Value is different from the original", test.equals(value)); - m_pDoc->SetString(0, 1, 0, OUString("='file:///extdata.fake'#Data1.A2")); - m_pDoc->SetString(0, 2, 0, OUString("='file:///extdata.fake'#Data1.A3")); - m_pDoc->SetString(0, 3, 0, OUString("='file:///extdata.fake'#Data1.A4")); - m_pDoc->SetString(0, 4, 0, OUString("='file:///extdata.fake'#Data1.A5")); - m_pDoc->SetString(0, 5, 0, OUString("='file:///extdata.fake'#Data1.A6")); + m_pDoc->SetString(0, 1, 0, "='file:///extdata.fake'#Data1.A2"); + m_pDoc->SetString(0, 2, 0, "='file:///extdata.fake'#Data1.A3"); + m_pDoc->SetString(0, 3, 0, "='file:///extdata.fake'#Data1.A4"); + m_pDoc->SetString(0, 4, 0, "='file:///extdata.fake'#Data1.A5"); + m_pDoc->SetString(0, 5, 0, "='file:///extdata.fake'#Data1.A6"); { // Referencing an empty cell should display '0'. @@ -5146,11 +5146,11 @@ void Test::testExternalRef() CPPUNIT_ASSERT_MESSAGE("Unexpected cell value.", test.equalsAscii(pChecks[i])); } } - m_pDoc->SetString(1, 1, 0, OUString("='file:///extdata.fake'#Data1.B2")); - m_pDoc->SetString(1, 2, 0, OUString("='file:///extdata.fake'#Data1.B3")); - m_pDoc->SetString(1, 3, 0, OUString("='file:///extdata.fake'#Data1.B4")); - m_pDoc->SetString(1, 4, 0, OUString("='file:///extdata.fake'#Data1.B5")); - m_pDoc->SetString(1, 5, 0, OUString("='file:///extdata.fake'#Data1.B6")); + m_pDoc->SetString(1, 1, 0, "='file:///extdata.fake'#Data1.B2"); + m_pDoc->SetString(1, 2, 0, "='file:///extdata.fake'#Data1.B3"); + m_pDoc->SetString(1, 3, 0, "='file:///extdata.fake'#Data1.B4"); + m_pDoc->SetString(1, 4, 0, "='file:///extdata.fake'#Data1.B5"); + m_pDoc->SetString(1, 5, 0, "='file:///extdata.fake'#Data1.B6"); { double pChecks[] = { 10, 11, 12, 13, 0 }; for (size_t i = 0; i < SAL_N_ELEMENTS(pChecks); ++i) @@ -5160,10 +5160,10 @@ void Test::testExternalRef() } } - m_pDoc->SetString(2, 0, 0, OUString("='file:///extdata.fake'#Data3.A1")); - m_pDoc->SetString(2, 1, 0, OUString("='file:///extdata.fake'#Data3.A2")); - m_pDoc->SetString(2, 2, 0, OUString("='file:///extdata.fake'#Data3.A3")); - m_pDoc->SetString(2, 3, 0, OUString("='file:///extdata.fake'#Data3.A4")); + m_pDoc->SetString(2, 0, 0, "='file:///extdata.fake'#Data3.A1"); + m_pDoc->SetString(2, 1, 0, "='file:///extdata.fake'#Data3.A2"); + m_pDoc->SetString(2, 2, 0, "='file:///extdata.fake'#Data3.A3"); + m_pDoc->SetString(2, 3, 0, "='file:///extdata.fake'#Data3.A4"); { const char* pChecks[] = { "Name", "Edward", "Frank", "George" }; for (size_t i = 0; i < SAL_N_ELEMENTS(pChecks); ++i) @@ -5173,10 +5173,10 @@ void Test::testExternalRef() } } - m_pDoc->SetString(3, 0, 0, OUString("='file:///extdata.fake'#Data3.B1")); - m_pDoc->SetString(3, 1, 0, OUString("='file:///extdata.fake'#Data3.B2")); - m_pDoc->SetString(3, 2, 0, OUString("='file:///extdata.fake'#Data3.B3")); - m_pDoc->SetString(3, 3, 0, OUString("='file:///extdata.fake'#Data3.B4")); + m_pDoc->SetString(3, 0, 0, "='file:///extdata.fake'#Data3.B1"); + m_pDoc->SetString(3, 1, 0, "='file:///extdata.fake'#Data3.B2"); + m_pDoc->SetString(3, 2, 0, "='file:///extdata.fake'#Data3.B3"); + m_pDoc->SetString(3, 3, 0, "='file:///extdata.fake'#Data3.B4"); { const char* pChecks[] = { "Value", "99", "98", "97" }; for (size_t i = 0; i < SAL_N_ELEMENTS(pChecks); ++i) @@ -5236,7 +5236,7 @@ void Test::testExternalRangeName() pRangeName->insert(pRangeData); m_pDoc->InsertTab(0, "Test Sheet"); - m_pDoc->SetString(0, 1, 0, OUString("='file:///extdata.fake'#ExternalName")); + m_pDoc->SetString(0, 1, 0, "='file:///extdata.fake'#ExternalName"); double nVal = m_pDoc->GetValue(0, 1, 0); ASSERT_DOUBLES_EQUAL(123.456, nVal); @@ -5252,12 +5252,12 @@ void testExtRefFuncT(ScDocument* pDoc, ScDocument& rExtDoc) Test::clearRange(pDoc, ScRange(0, 0, 0, 1, 9, 0)); Test::clearRange(&rExtDoc, ScRange(0, 0, 0, 1, 9, 0)); - rExtDoc.SetString(0, 0, 0, OUString("'1.2")); - rExtDoc.SetString(0, 1, 0, OUString("Foo")); + rExtDoc.SetString(0, 0, 0, "'1.2"); + rExtDoc.SetString(0, 1, 0, "Foo"); rExtDoc.SetValue(0, 2, 0, 12.3); - pDoc->SetString(0, 0, 0, OUString("=T('file:///extdata.fake'#Data.A1)")); - pDoc->SetString(0, 1, 0, OUString("=T('file:///extdata.fake'#Data.A2)")); - pDoc->SetString(0, 2, 0, OUString("=T('file:///extdata.fake'#Data.A3)")); + pDoc->SetString(0, 0, 0, "=T('file:///extdata.fake'#Data.A1)"); + pDoc->SetString(0, 1, 0, "=T('file:///extdata.fake'#Data.A2)"); + pDoc->SetString(0, 2, 0, "=T('file:///extdata.fake'#Data.A3)"); pDoc->CalcAll(); OUString aRes = pDoc->GetString(0, 0, 0); @@ -5332,7 +5332,7 @@ void Test::testExternalRefFunctions() // Populate the external source document. ScDocument& rExtDoc = xExtDocSh->GetDocument(); - rExtDoc.InsertTab(0, OUString("Data")); + rExtDoc.InsertTab(0, "Data"); double val = 1; rExtDoc.SetValue(0, 0, 0, val); // leave cell B1 empty. @@ -5346,7 +5346,7 @@ void Test::testExternalRefFunctions() rExtDoc.SetValue(0, 3, 0, val); rExtDoc.SetValue(1, 3, 0, val); - m_pDoc->InsertTab(0, OUString("Test")); + m_pDoc->InsertTab(0, "Test"); struct { const char* pFormula; double fResult; diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx index 1e78f2303778..53d1019d0edb 100644 --- a/sc/qa/unit/ucalc_pivottable.cxx +++ b/sc/qa/unit/ucalc_pivottable.cxx @@ -186,8 +186,8 @@ ScRange refreshGroups(ScDPCollection* pDPs, ScDPObject* pDPObj) void Test::testPivotTable() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Dimension definition DPFieldDef aFields[] = { @@ -343,7 +343,7 @@ void Test::testPivotTable() // Insert a brand new pivot table object once again, but this time, don't // create the output to avoid creating a data cache. m_pDoc->DeleteTab(1); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(1, "Table"); pDPObj = createDPFromRange( m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, nFieldCount, false); @@ -370,8 +370,8 @@ void Test::testPivotTable() void Test::testPivotTableLabels() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Dimension definition DPFieldDef aFields[] = { @@ -426,8 +426,8 @@ void Test::testPivotTableLabels() void Test::testPivotTableDateLabels() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Dimension definition DPFieldDef aFields[] = { @@ -502,8 +502,8 @@ void Test::testPivotTableDateLabels() void Test::testPivotTableFilters() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Dimension definition DPFieldDef aFields[] = { @@ -564,7 +564,7 @@ void Test::testPivotTableFilters() ScAddress aFormulaAddr = aOutRange.aEnd; aFormulaAddr.IncRow(2); m_pDoc->SetString(aFormulaAddr.Col(), aFormulaAddr.Row(), aFormulaAddr.Tab(), - OUString("=B6")); + "=B6"); double fTest = m_pDoc->GetValue(aFormulaAddr); CPPUNIT_ASSERT_MESSAGE("Incorrect formula value that references a cell in the pivot table output.", fTest == 80.0); @@ -572,7 +572,7 @@ void Test::testPivotTableFilters() pDPObj->BuildAllDimensionMembers(); ScDPSaveData aSaveData(*pDPObj->GetSaveData()); ScDPSaveDimension* pPageDim = aSaveData.GetDimensionByName( - OUString("Group2")); + "Group2"); CPPUNIT_ASSERT_MESSAGE("Dimension not found", pPageDim); OUString aPage("A"); pPageDim->SetCurrentPage(&aPage); @@ -655,8 +655,8 @@ void Test::testPivotTableFilters() void Test::testPivotTableNamedSource() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Dimension definition DPFieldDef aFields[] = { @@ -755,7 +755,7 @@ void Test::testPivotTableNamedSource() void Test::testPivotTableCache() { - m_pDoc->InsertTab(0, OUString("Data")); + m_pDoc->InsertTab(0, "Data"); // Raw data const char* aData[][3] = { @@ -940,8 +940,8 @@ void Test::testPivotTableCache() void Test::testPivotTableDuplicateDataFields() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Raw data const char* aData[][2] = { @@ -1037,8 +1037,8 @@ void Test::testPivotTableDuplicateDataFields() void Test::testPivotTableNormalGrouping() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Raw data const char* aData[][2] = { @@ -1109,9 +1109,9 @@ void Test::testPivotTableNormalGrouping() CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName == "Group1"); ScDPSaveGroupItem aGroup(aGroupName); - aGroup.AddElement(OUString("A")); - aGroup.AddElement(OUString("B")); - aGroup.AddElement(OUString("C")); + aGroup.AddElement("A"); + aGroup.AddElement("B"); + aGroup.AddElement("C"); aGroupDim.AddGroupItem(aGroup); pDimData->AddGroupDimension(aGroupDim); @@ -1151,9 +1151,9 @@ void Test::testPivotTableNormalGrouping() CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName == "Group2"); ScDPSaveGroupItem aGroup(aGroupName); - aGroup.AddElement(OUString("D")); - aGroup.AddElement(OUString("E")); - aGroup.AddElement(OUString("F")); + aGroup.AddElement("D"); + aGroup.AddElement("E"); + aGroup.AddElement("F"); pGroupDim->AddGroupItem(aGroup); } @@ -1188,8 +1188,8 @@ void Test::testPivotTableNormalGrouping() void Test::testPivotTableNumberGrouping() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Raw data const char* aData[][2] = { @@ -1283,8 +1283,8 @@ void Test::testPivotTableNumberGrouping() void Test::testPivotTableDateGrouping() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Raw data const char* aData[][2] = { @@ -1392,9 +1392,9 @@ void Test::testPivotTableDateGrouping() { // Let's hide year 2012. pSaveData = pDPObj->GetSaveData(); - ScDPSaveDimension* pDim = pSaveData->GetDimensionByName(OUString("Years")); + ScDPSaveDimension* pDim = pSaveData->GetDimensionByName("Years"); CPPUNIT_ASSERT_MESSAGE("Years dimension should exist.", pDim); - ScDPSaveMember* pMem = pDim->GetMemberByName(OUString("2012")); + ScDPSaveMember* pMem = pDim->GetMemberByName("2012"); CPPUNIT_ASSERT_MESSAGE("Member should exist.", pMem); pMem->SetIsVisible(false); } @@ -1457,8 +1457,8 @@ void Test::testPivotTableDateGrouping() void Test::testPivotTableEmptyRows() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Raw data const char* aData[][2] = { @@ -1570,8 +1570,8 @@ void Test::testPivotTableEmptyRows() void Test::testPivotTableTextNumber() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Raw data const char* aData[][2] = { @@ -1674,8 +1674,8 @@ void Test::testPivotTableTextNumber() void Test::testPivotTableCaseInsensitiveStrings() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Raw data const char* aData[][2] = { @@ -1766,8 +1766,8 @@ void Test::testPivotTableNumStability() { "Total", sheet::DataPilotFieldOrientation_DATA, sheet::GeneralFunction_SUM, false }, }; - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); size_t nRowCount = SAL_N_ELEMENTS(aData); ScAddress aPos(1,1,0); @@ -1835,8 +1835,8 @@ void Test::testPivotTableNumStability() void Test::testPivotTableFieldReference() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Raw data const char* aData[][2] = { @@ -2325,8 +2325,8 @@ void Test::testFuncGETPIVOTDATALeafAccess() void Test::testPivotTableRepeatItemLabels() { - m_pDoc->InsertTab(0, OUString("Data")); - m_pDoc->InsertTab(1, OUString("Table")); + m_pDoc->InsertTab(0, "Data"); + m_pDoc->InsertTab(1, "Table"); // Dimension definition DPFieldDef aFields[] = { diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index 6ae65c7d20e4..41814d9e2ee5 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -177,7 +177,7 @@ ScDocument::HardRecalcState ScBroadcastAreaSlot::CheckHardRecalcStateCondition() OSL_ENSURE( pShell, "Missing DocShell :-/" ); if ( pShell ) - pShell->SetError( SCWARN_CORE_HARD_RECALC, OUString( OSL_LOG_PREFIX ) ); + pShell->SetError( SCWARN_CORE_HARD_RECALC, OSL_LOG_PREFIX ); pDoc->SetAutoCalc( false ); eState = ScDocument::HARDRECALCSTATE_ETERNAL; diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 0c52b11221e5..5ae996cb4bc8 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -275,11 +275,11 @@ sal_uInt16 lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSup if ( xDimProp.is() ) { bFound = ScUnoHelpFunctions::GetBoolProperty( xDimProp, - OUString(SC_UNO_DP_ISDATALAYOUT) ); + SC_UNO_DP_ISDATALAYOUT ); //TODO: error checking -- is "IsDataLayoutDimension" property required?? if (bFound) nRet = ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_ORIENTATION), + xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); } } @@ -1049,11 +1049,11 @@ bool ScDPObject::GetMembers( sal_Int32 nDim, sal_Int32 nHier, vector<ScDPLabelDa Reference<beans::XPropertySet> xMemProp(xMember, UNO_QUERY); if (xMemProp.is()) { - aMem.mbVisible = ScUnoHelpFunctions::GetBoolProperty(xMemProp, OUString(SC_UNO_DP_ISVISIBLE)); - aMem.mbShowDetails = ScUnoHelpFunctions::GetBoolProperty(xMemProp, OUString(SC_UNO_DP_SHOWDETAILS)); + aMem.mbVisible = ScUnoHelpFunctions::GetBoolProperty(xMemProp, SC_UNO_DP_ISVISIBLE); + aMem.mbShowDetails = ScUnoHelpFunctions::GetBoolProperty(xMemProp, SC_UNO_DP_SHOWDETAILS); aMem.maLayoutName = ScUnoHelpFunctions::GetStringProperty( - xMemProp, OUString(SC_UNO_DP_LAYOUTNAME), OUString()); + xMemProp, SC_UNO_DP_LAYOUTNAME, OUString()); } aMembers.push_back(aMem); @@ -1207,7 +1207,7 @@ bool ScDPObject::IsDimNameInUse(const OUString& rName) const continue; OUString aLayoutName = ScUnoHelpFunctions::GetStringProperty( - xPropSet, OUString(SC_UNO_DP_LAYOUTNAME), OUString()); + xPropSet, SC_UNO_DP_LAYOUTNAME, OUString()); if (aLayoutName.equalsIgnoreAsciiCase(rName)) return true; } @@ -1233,7 +1233,7 @@ OUString ScDPObject::GetDimName( long nDim, bool& rIsDataLayout, sal_Int32* pFla if ( xDimName.is() && xDimProp.is() ) { bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp, - OUString(SC_UNO_DP_ISDATALAYOUT) ); + SC_UNO_DP_ISDATALAYOUT ); //TODO: error checking -- is "IsDataLayoutDimension" property required?? OUString aName; @@ -1251,7 +1251,7 @@ OUString ScDPObject::GetDimName( long nDim, bool& rIsDataLayout, sal_Int32* pFla if (pFlags) *pFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp, - OUString(SC_UNO_DP_FLAGS) ); + SC_UNO_DP_FLAGS ); } } } @@ -1701,9 +1701,9 @@ bool ScDPObject::ParseFilters( uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY ); uno::Reference<sheet::XHierarchiesSupplier> xDimSupp( xDim, uno::UNO_QUERY ); bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, - OUString(SC_UNO_DP_ISDATALAYOUT) ); + SC_UNO_DP_ISDATALAYOUT ); sal_Int32 nOrient = ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_ORIENTATION), + xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); if ( !bDataLayout ) { @@ -1721,7 +1721,7 @@ bool ScDPObject::ParseFilters( uno::Reference<container::XIndexAccess> xHiers = new ScNameToIndexAccess( xDimSupp->getHierarchies() ); sal_Int32 nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp, - OUString(SC_UNO_DP_USEDHIERARCHY) ); + SC_UNO_DP_USEDHIERARCHY ); if ( nHierarchy >= xHiers->getCount() ) nHierarchy = 0; @@ -1906,7 +1906,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY ); bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, - OUString(SC_UNO_DP_ISDATALAYOUT) ); + SC_UNO_DP_ISDATALAYOUT ); if (bDataLayout) { // the elements of the data layout dimension can't be found by their names @@ -1964,7 +1964,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb if ( xMbrProp.is() ) { bShowDetails = ScUnoHelpFunctions::GetBoolProperty( xMbrProp, - OUString(SC_UNO_DP_SHOWDETAILS) ); + SC_UNO_DP_SHOWDETAILS ); //TODO: don't set bFound if property is unknown? bFound = true; } @@ -1999,7 +1999,7 @@ static sal_uInt16 lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& { uno::Reference<container::XIndexAccess> xHiers = new ScNameToIndexAccess( xDimSupp->getHierarchies() ); long nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp, - OUString(SC_UNO_DP_USEDHIERARCHY) ); + SC_UNO_DP_USEDHIERARCHY ); if ( nHierarchy >= xHiers->getCount() ) nHierarchy = 0; @@ -2083,7 +2083,7 @@ void lcl_FillOldFields( ScPivotFieldVector& rFields, // dimension orientation, hidden by default. long nDimOrient = ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_ORIENTATION), + xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); if ( xDimProp.is() && nDimOrient == nOrient ) @@ -2095,7 +2095,7 @@ void lcl_FillOldFields( ScPivotFieldVector& rFields, if ( nOrient == sheet::DataPilotFieldOrientation_DATA ) { sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_FUNCTION), + xDimProp, SC_UNO_DP_FUNCTION, sheet::GeneralFunction_NONE ); if ( eFunc == sheet::GeneralFunction_AUTO ) { @@ -2109,7 +2109,7 @@ void lcl_FillOldFields( ScPivotFieldVector& rFields, // is this data layout dimension? bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( - xDimProp, OUString(SC_UNO_DP_ISDATALAYOUT)); + xDimProp, SC_UNO_DP_ISDATALAYOUT); // is this dimension cloned? long nDupSource = -1; @@ -2156,7 +2156,7 @@ void lcl_FillOldFields( ScPivotFieldVector& rFields, rField.nFuncMask = nMask; rField.mnDupCount = nDupCount; long nPos = ScUnoHelpFunctions::GetLongProperty( - xDimProp, OUString(SC_UNO_DP_POSITION)); + xDimProp, SC_UNO_DP_POSITION); aPos.push_back(nPos); try @@ -2223,15 +2223,15 @@ bool ScDPObject::FillOldParam(ScPivotParam& rParam) const try { rParam.bMakeTotalCol = ScUnoHelpFunctions::GetBoolProperty( xProp, - OUString(SC_UNO_DP_COLGRAND), true ); + SC_UNO_DP_COLGRAND, true ); rParam.bMakeTotalRow = ScUnoHelpFunctions::GetBoolProperty( xProp, - OUString(SC_UNO_DP_ROWGRAND), true ); + SC_UNO_DP_ROWGRAND, true ); // following properties may be missing for external sources rParam.bIgnoreEmptyRows = ScUnoHelpFunctions::GetBoolProperty( xProp, - OUString(SC_UNO_DP_IGNOREEMPTY) ); + SC_UNO_DP_IGNOREEMPTY ); rParam.bDetectCategories = ScUnoHelpFunctions::GetBoolProperty( xProp, - OUString(SC_UNO_DP_REPEATEMPTY) ); + SC_UNO_DP_REPEATEMPTY ); } catch(uno::Exception&) { @@ -2249,7 +2249,7 @@ static void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans uno::Reference<container::XIndexAccess> xHiers = new ScNameToIndexAccess( xDimSupp->getHierarchies() ); long nHierarchy = ScUnoHelpFunctions::GetLongProperty( - xDimProp, OUString(SC_UNO_DP_USEDHIERARCHY)); + xDimProp, SC_UNO_DP_USEDHIERARCHY); if ( nHierarchy >= xHiers->getCount() ) nHierarchy = 0; rData.mnUsedHier = nHierarchy; @@ -2271,10 +2271,10 @@ static void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans return; rData.mbShowAll = ScUnoHelpFunctions::GetBoolProperty( - xLevProp, OUString(SC_UNO_DP_SHOWEMPTY)); + xLevProp, SC_UNO_DP_SHOWEMPTY); rData.mbRepeatItemLabels = ScUnoHelpFunctions::GetBoolProperty( - xLevProp, OUString(SC_UNO_DP_REPEATITEMLABELS)); + xLevProp, SC_UNO_DP_REPEATITEMLABELS); try { @@ -2302,7 +2302,7 @@ bool ScDPObject::FillLabelDataForDimension( return false; bool bData = ScUnoHelpFunctions::GetBoolProperty( - xDimProp, OUString(SC_UNO_DP_ISDATALAYOUT)); + xDimProp, SC_UNO_DP_ISDATALAYOUT); //TODO: error checking -- is "IsDataLayoutDimension" property required?? sal_Int32 nOrigPos = -1; @@ -2318,10 +2318,10 @@ bool ScDPObject::FillLabelDataForDimension( } OUString aLayoutName = ScUnoHelpFunctions::GetStringProperty( - xDimProp, OUString(SC_UNO_DP_LAYOUTNAME), OUString()); + xDimProp, SC_UNO_DP_LAYOUTNAME, OUString()); OUString aSubtotalName = ScUnoHelpFunctions::GetStringProperty( - xDimProp, OUString(SC_UNO_DP_FIELD_SUBTOTALNAME), OUString()); + xDimProp, SC_UNO_DP_FIELD_SUBTOTALNAME, OUString()); bool bIsValue = true; //TODO: check @@ -2349,7 +2349,7 @@ bool ScDPObject::FillLabelDataForDimension( GetMembers(nDim, GetUsedHierarchy(nDim), rLabelData.maMembers); lcl_FillLabelData(rLabelData, xDimProp); rLabelData.mnFlags = ScUnoHelpFunctions::GetLongProperty( - xDimProp, OUString(SC_UNO_DP_FLAGS) ); + xDimProp, SC_UNO_DP_FLAGS ); } return true; } @@ -2429,7 +2429,7 @@ sal_Int32 ScDPObject::GetUsedHierarchy( sal_Int32 nDim ) uno::Reference<container::XIndexAccess> xIntDims(new ScNameToIndexAccess( xDimsName )); uno::Reference<beans::XPropertySet> xDim(xIntDims->getByIndex( nDim ), uno::UNO_QUERY); if (xDim.is()) - nHier = ScUnoHelpFunctions::GetLongProperty( xDim, OUString( SC_UNO_DP_USEDHIERARCHY ) ); + nHier = ScUnoHelpFunctions::GetLongProperty( xDim, SC_UNO_DP_USEDHIERARCHY ); return nHier; } diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index cea5a7d44ca8..da6cbe03e325 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -356,14 +356,14 @@ void lcl_FillNumberFormats( sal_uInt32*& rFormats, long& rCount, { sheet::DataPilotFieldOrientation eDimOrient = (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_ORIENTATION), + xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA ) { aDataNames[nDataCount] = xDimName->getName(); long nFormat = ScUnoHelpFunctions::GetLongProperty( xDimProp, - OUString(SC_UNONAME_NUMFMT) ); + SC_UNONAME_NUMFMT ); nDataFormats[nDataCount] = nFormat; ++nDataCount; } @@ -420,13 +420,13 @@ sal_uInt32 lcl_GetFirstNumberFormat( const uno::Reference<container::XIndexAcces { sheet::DataPilotFieldOrientation eDimOrient = (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_ORIENTATION), + xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA ) { long nFormat = ScUnoHelpFunctions::GetLongProperty( xDimProp, - OUString(SC_UNONAME_NUMFMT) ); + SC_UNONAME_NUMFMT ); return nFormat; // use format from first found data dimension } @@ -554,14 +554,14 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS { sheet::DataPilotFieldOrientation eDimOrient = (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_ORIENTATION), + xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); long nDimPos = ScUnoHelpFunctions::GetLongProperty( xDimProp, - OUString(SC_UNO_DP_POSITION) ); + SC_UNO_DP_POSITION ); bool bIsDataLayout = ScUnoHelpFunctions::GetBoolProperty( - xDimProp, OUString(SC_UNO_DP_ISDATALAYOUT)); + xDimProp, SC_UNO_DP_ISDATALAYOUT); bool bHasHiddenMember = ScUnoHelpFunctions::GetBoolProperty( - xDimProp, OUString(SC_UNO_DP_HAS_HIDDEN_MEMBER)); + xDimProp, SC_UNO_DP_HAS_HIDDEN_MEMBER); sal_Int32 nNumFmt = ScUnoHelpFunctions::GetLongProperty( xDimProp, SC_UNO_DP_NUMBERFO); @@ -571,7 +571,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS new ScNameToIndexAccess( xDimSupp->getHierarchies() ); long nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp, - OUString(SC_UNO_DP_USEDHIERARCHY) ); + SC_UNO_DP_USEDHIERARCHY ); if ( nHierarchy >= xHiers->getCount() ) nHierarchy = 0; @@ -600,7 +600,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS // #i108948# use ScUnoHelpFunctions::GetStringProperty, because // LayoutName is new and may not be present in external implementation OUString aCaption = ScUnoHelpFunctions::GetStringProperty( xPropSet, - OUString(SC_UNO_DP_LAYOUTNAME), aName ); + SC_UNO_DP_LAYOUTNAME, aName ); bool bRowFieldHasMember = false; switch ( eDimOrient ) @@ -1270,12 +1270,12 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s uno::Reference<beans::XPropertySet> xSrcProp( xSource, uno::UNO_QUERY ); bool bColGrand = ScUnoHelpFunctions::GetBoolProperty( - xSrcProp, OUString(SC_UNO_DP_COLGRAND)); + xSrcProp, SC_UNO_DP_COLGRAND); if ( bColGrand ) rGrandTotalCols = 1; // default if data layout not in columns bool bRowGrand = ScUnoHelpFunctions::GetBoolProperty( - xSrcProp, OUString(SC_UNO_DP_ROWGRAND)); + xSrcProp, SC_UNO_DP_ROWGRAND); if ( bRowGrand ) rGrandTotalRows = 1; // default if data layout not in rows @@ -1296,10 +1296,10 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s { sheet::DataPilotFieldOrientation eDimOrient = (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_ORIENTATION), + xDimProp, SC_UNO_DP_ORIENTATION, sheet::DataPilotFieldOrientation_HIDDEN ); if ( ScUnoHelpFunctions::GetBoolProperty( xDimProp, - OUString(SC_UNO_DP_ISDATALAYOUT) ) ) + SC_UNO_DP_ISDATALAYOUT ) ) { rDataLayoutIndex = nDim; rDataOrient = eDimOrient; @@ -1374,7 +1374,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa if (xPropSet.is()) { sal_Int32 nDataFieldCount = ScUnoHelpFunctions::GetLongProperty( xPropSet, - OUString(SC_UNO_DP_DATAFIELDCOUNT) ); + SC_UNO_DP_DATAFIELDCOUNT ); if (nDataFieldCount > 0) aResData.DataFieldIndex = (nRow - nDataStartRow) % nDataFieldCount; } @@ -1456,7 +1456,7 @@ bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>& return false; sal_Int32 nDataFieldCount = ScUnoHelpFunctions::GetLongProperty( xPropSet, - OUString(SC_UNO_DP_DATAFIELDCOUNT) ); + SC_UNO_DP_DATAFIELDCOUNT ); if (nDataFieldCount == 0) // No data field is present in this datapilot table. return false; @@ -1590,7 +1590,7 @@ void ScDPOutput::GetDataDimensionNames( //TODO: Should use a stored name when available sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_FUNCTION), + xDimProp, SC_UNO_DP_FUNCTION, sheet::GeneralFunction_NONE ); rGivenName = lcl_GetDataFieldName( rSourceName, eFunc ); } diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 21875084bf85..f9d1526d6e28 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -151,11 +151,11 @@ void ScDPSaveMember::WriteToSource( const uno::Reference<uno::XInterface>& xMemb if ( nVisibleMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xMembProp, - OUString(SC_UNO_DP_ISVISIBLE), (bool)nVisibleMode ); + SC_UNO_DP_ISVISIBLE, (bool)nVisibleMode ); if ( nShowDetailsMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xMembProp, - OUString(SC_UNO_DP_SHOWDETAILS), (bool)nShowDetailsMode ); + SC_UNO_DP_SHOWDETAILS, (bool)nShowDetailsMode ); if (mpLayoutName) ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, SC_UNO_DP_LAYOUTNAME, *mpLayoutName); @@ -645,10 +645,10 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD } if ( nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xLevProp, - OUString(SC_UNO_DP_SHOWEMPTY), (bool)nShowEmptyMode ); + SC_UNO_DP_SHOWEMPTY, (bool)nShowEmptyMode ); lcl_SetBoolProperty( xLevProp, - OUString(SC_UNO_DP_REPEATITEMLABELS), bRepeatItemLabels ); + SC_UNO_DP_REPEATITEMLABELS, bRepeatItemLabels ); if ( pSortInfo ) ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_DP_SORTING, *pSortInfo); @@ -1181,10 +1181,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie { if ( nIgnoreEmptyMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xSourceProp, - OUString(SC_UNO_DP_IGNOREEMPTY), (bool)nIgnoreEmptyMode ); + SC_UNO_DP_IGNOREEMPTY, (bool)nIgnoreEmptyMode ); if ( nRepeatEmptyMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xSourceProp, - OUString(SC_UNO_DP_REPEATEMPTY), (bool)nRepeatEmptyMode ); + SC_UNO_DP_REPEATEMPTY, (bool)nRepeatEmptyMode ); } catch(uno::Exception&) { @@ -1232,7 +1232,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie if ( xDimProp.is() ) { bFound = ScUnoHelpFunctions::GetBoolProperty( xDimProp, - OUString(SC_UNO_DP_ISDATALAYOUT) ); + SC_UNO_DP_ISDATALAYOUT ); //TODO: error checking -- is "IsDataLayoutDimension" property required?? } } @@ -1271,10 +1271,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie { if ( nColumnGrandMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xSourceProp, - OUString(SC_UNO_DP_COLGRAND), (bool)nColumnGrandMode ); + SC_UNO_DP_COLGRAND, (bool)nColumnGrandMode ); if ( nRowGrandMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xSourceProp, - OUString(SC_UNO_DP_ROWGRAND), (bool)nRowGrandMode ); + SC_UNO_DP_ROWGRAND, (bool)nRowGrandMode ); } } catch(uno::Exception&) diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 071f39861af2..9ee6ed0c4a81 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -291,11 +291,11 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const OUString& rName ) : rPool.FreezeIdRanges(); // the pool is also used directly SdrLayerAdmin& rAdmin = GetLayerAdmin(); - rAdmin.NewLayer(OUString("vorne"), SC_LAYER_FRONT); - rAdmin.NewLayer(OUString("hinten"), SC_LAYER_BACK); - rAdmin.NewLayer(OUString("intern"), SC_LAYER_INTERN); - rAdmin.NewLayer(OUString("Controls"), SC_LAYER_CONTROLS); - rAdmin.NewLayer(OUString("hidden"), SC_LAYER_HIDDEN); + rAdmin.NewLayer("vorne", SC_LAYER_FRONT); + rAdmin.NewLayer("hinten", SC_LAYER_BACK); + rAdmin.NewLayer("intern", SC_LAYER_INTERN); + rAdmin.NewLayer("Controls", SC_LAYER_CONTROLS); + rAdmin.NewLayer("hidden", SC_LAYER_HIDDEN); // "Controls" is new - must also be created when loading // Set link for URL-Fields diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 1cd32b33ef1e..16d5466ef899 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -896,7 +896,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, const SdrM } SfxStringItem aUrl( SID_FILE_NAME, rURL ); SfxStringItem aTarget( SID_TARGETNAME, rTarget ); - aTarget.SetValue(OUString("_blank")); + aTarget.SetValue("_blank"); SfxViewFrame* pFrame = NULL; OUString aReferName; if ( pScActiveViewShell ) diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 558a8e3d4e5e..f754d2094551 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -3464,58 +3464,47 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config, ft->Children[i], new OpIf, nResultSize)); break; case ocExternal: - if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getEffect")))) + if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getEffect"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpEffective, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getCumipmt")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getCumipmt"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCumipmt, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getNominal")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getNominal"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpNominal, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getCumprinc")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getCumprinc"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCumprinc, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getXnpv")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getXnpv"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpXNPV, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getPricemat")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getPricemat"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpPriceMat, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getReceived")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getReceived"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpReceived, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getTbilleq")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getTbilleq"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpTbilleq, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getTbillprice")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getTbillprice"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpTbillprice, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getTbillyield")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getTbillyield"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpTbillyield, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getFvschedule")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getFvschedule"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpFvschedule, nResultSize)); } @@ -3524,64 +3513,52 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config, { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpYield)); }*/ - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getYielddisc")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getYielddisc"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpYielddisc, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getYieldmat")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getYieldmat"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpYieldmat, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getAccrintm")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getAccrintm"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpAccrintm, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getCoupdaybs")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getCoupdaybs"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCoupdaybs, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getDollarde")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getDollarde"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpDollarde, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getDollarfr")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getDollarfr"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpDollarfr, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getCoupdays")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getCoupdays"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCoupdays, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getCoupdaysnc")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getCoupdaysnc"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCoupdaysnc, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getDisc")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getDisc"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpDISC, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getIntrate")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getIntrate"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpINTRATE, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getPrice")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getPrice"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpPrice, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getCoupnum")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getCoupnum"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCoupnum, nResultSize)); @@ -3592,116 +3569,97 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config, mvSubArguments.push_back( SoPHelper(mCalcConfig, ts, ft->Children[i], new OpDuration_ADD)); }*/ - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getAmordegrc")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getAmordegrc"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpAmordegrc, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getAmorlinc")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getAmorlinc"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpAmorlinc, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getMduration")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getMduration"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpMDuration, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getXirr")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getXirr"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpXirr, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getOddlprice")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getOddlprice"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpOddlprice, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getOddlyield")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getOddlyield"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpOddlyield, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getPricedisc")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getPricedisc"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpPriceDisc, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getCouppcd")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getCouppcd"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCouppcd, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getCoupncd")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getCoupncd"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpCoupncd, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getAccrint")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getAccrint"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpAccrint, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getSqrtpi")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getSqrtpi"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpSqrtPi, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getConvert")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getConvert"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpConvert, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getIseven")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getIseven"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpIsEven, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getIsodd")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getIsodd"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpIsOdd, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getMround")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getMround"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpMROUND, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getQuotient")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getQuotient"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpQuotient, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getSeriessum")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getSeriessum"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpSeriesSum, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getBesselj")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getBesselj"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpBesselj, nResultSize)); } - else if (!(pChild->GetExternal().compareTo(OUString( - "com.sun.star.sheet.addin.Analysis.getGestep")))) + else if (!(pChild->GetExternal().compareTo("com.sun.star.sheet.addin.Analysis.getGestep"))) { mvSubArguments.push_back(SoPHelper(mCalcConfig, ts, ft->Children[i], new OpGestep, nResultSize)); diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index b1efc9e8a2c3..4fd195311367 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -1002,7 +1002,7 @@ bool ScAutoFormat::Load() SvtPathOptions aPathOpt; aURL.SetSmartURL( aPathOpt.GetUserConfigPath() ); aURL.setFinalSlash(); - aURL.Append( OUString( sAutoTblFmtName ) ); + aURL.Append( sAutoTblFmtName ); SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READ ); SvStream* pStream = aMedium.GetInStream(); diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx index eba465ec8eab..0297d7fe297a 100644 --- a/sc/source/core/tool/charthelper.cxx +++ b/sc/source/core/tool/charthelper.cxx @@ -438,7 +438,7 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, Sd aProperties[ 0 ].Name = "Name"; aProperties[ 0 ].Value <<= aChartName; - pModelObj->NotifyChanges( OUString( "insert-chart" ), aChangeRanges, aProperties ); + pModelObj->NotifyChanges( "insert-chart", aChangeRanges, aProperties ); } } } diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 13c47b85f05f..1045196e7537 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -3247,7 +3247,7 @@ static OUString lcl_convertIntoHalfWidth( const OUString & rStr ) if( bFirstASCCall ) { - aTrans.loadModuleByImplName( OUString( "FULLWIDTH_HALFWIDTH_LIKE_ASC" ), LANGUAGE_SYSTEM ); + aTrans.loadModuleByImplName( "FULLWIDTH_HALFWIDTH_LIKE_ASC", LANGUAGE_SYSTEM ); bFirstASCCall = false; } @@ -3261,7 +3261,7 @@ static OUString lcl_convertIntoFullWidth( const OUString & rStr ) if( bFirstJISCall ) { - aTrans.loadModuleByImplName( OUString( "HALFWIDTH_FULLWIDTH_LIKE_JIS" ), LANGUAGE_SYSTEM ); + aTrans.loadModuleByImplName( "HALFWIDTH_FULLWIDTH_LIKE_JIS", LANGUAGE_SYSTEM ); bFirstJISCall = false; } diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 75eff67959bd..de6359692573 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -381,7 +381,7 @@ void ImportExcel8::ReadBasic() rFilterOpt.IsLoadExcelBasicExecutable() ) { // see if we have the XCB stream - tools::SvRef<SotStorageStream> xXCB = xRootStrg->OpenSotStream( OUString("XCB"), STREAM_STD_READ | StreamMode::NOCREATE ); + tools::SvRef<SotStorageStream> xXCB = xRootStrg->OpenSotStream( "XCB", STREAM_STD_READ | StreamMode::NOCREATE ); if ( xXCB.Is()|| SVSTREAM_OK == xXCB->GetError() ) { ScCTBWrapper wrapper; diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx index eb2f567bf586..8cff635d0867 100644 --- a/sc/source/filter/excel/expop2.cxx +++ b/sc/source/filter/excel/expop2.cxx @@ -107,7 +107,7 @@ FltError ExportBiff5::Write() SvxImportMSVBasic aBasicImport( *pDocShell, *xRootStrg ); const ErrCode nErr = aBasicImport.SaveOrDelMSVBAStorage( true, EXC_STORAGE_VBA_PROJECT ); if( nErr != ERRCODE_NONE ) - pDocShell->SetError( nErr, OUString( OSL_LOG_PREFIX ) ); + pDocShell->SetError( nErr, OSL_LOG_PREFIX ); } pExcDoc->ReadDoc(); // ScDoc -> ExcDoc diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index af1bfae9a03d..f98c3cac40aa 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -200,8 +200,8 @@ void XclExpSstImpl::SaveXml( XclExpXmlStream& rStrm ) return; sax_fastparser::FSHelperPtr pSst = rStrm.CreateOutputStream( - OUString( "xl/sharedStrings.xml"), - OUString( "sharedStrings.xml" ), + "xl/sharedStrings.xml", + "sharedStrings.xml", rStrm.GetCurrentStream()->getOutputStream(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" ); diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 0b64dce2865c..6c78cc2bfe05 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -525,7 +525,7 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc // meta file //TODO - needs check Reference< XPropertySet > xShapePS( xShape, UNO_QUERY ); - if( xShapePS.is() && aPropOpt.CreateGraphicProperties( xShapePS, OUString( "MetaFile" ), false ) ) + if( xShapePS.is() && aPropOpt.CreateGraphicProperties( xShapePS, "MetaFile", false ) ) { sal_uInt32 nBlipId; if( aPropOpt.GetOpt( ESCHER_Prop_pib, nBlipId ) ) diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index ca2a5e3567ed..8b2dfb61e4ad 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -3170,8 +3170,8 @@ XclExpXmlStyleSheet::XclExpXmlStyleSheet( const XclExpRoot& rRoot ) void XclExpXmlStyleSheet::SaveXml( XclExpXmlStream& rStrm ) { sax_fastparser::FSHelperPtr aStyleSheet = rStrm.CreateOutputStream( - OUString( "xl/styles.xml"), - OUString( "styles.xml" ), + "xl/styles.xml", + "styles.xml", rStrm.GetCurrentStream()->getOutputStream(), "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" ); diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 909e3eacd664..79ba6eab2522 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -348,7 +348,7 @@ void IconSetRule::importCfvo( const AttributeList& rAttribs ) void IconSetRule::importAttribs( const AttributeList& rAttribs ) { - maIconSetType = rAttribs.getString( XML_iconSet, OUString("3TrafficLights1") ); + maIconSetType = rAttribs.getString( XML_iconSet, "3TrafficLights1" ); mxFormatData->mbShowValue = rAttribs.getBool( XML_showValue, true ); mxFormatData->mbReverse = rAttribs.getBool( XML_reverse, false ); mbCustom = rAttribs.getBool(XML_custom, false); diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index e1d569557eb0..d830ccdb2b29 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -1618,7 +1618,7 @@ OUString FormulaProcessorBase::generateApiString( const OUString& rString ) OUString aRetString = rString; sal_Int32 nQuotePos = aRetString.getLength(); while( (nQuotePos = aRetString.lastIndexOf( '"', nQuotePos )) >= 0 ) - aRetString = aRetString.replaceAt( nQuotePos, 1, OUString( "\"\"" ) ); + aRetString = aRetString.replaceAt( nQuotePos, 1, "\"\"" ); return "\"" + aRetString + "\""; } diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx index 867cddb27b34..54b5ac2815c8 100644 --- a/sc/source/filter/orcus/orcusfiltersimpl.cxx +++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx @@ -72,7 +72,7 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, SfxMedium& rMedium) const } catch (const std::exception&) { - rDoc.InsertTab(SC_TAB_APPEND, OUString("Foo")); + rDoc.InsertTab(SC_TAB_APPEND, "Foo"); rDoc.SetString(0, 0, 0, "Failed to load!!!"); return false; } diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index 6ba163c2169c..970459fe6dc4 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -1641,8 +1641,8 @@ void XclExpChangeTrack::Write() static void lcl_WriteUserNamesXml( XclExpXmlStream& rWorkbookStrm ) { sax_fastparser::FSHelperPtr pUserNames = rWorkbookStrm.CreateOutputStream( - OUString( "xl/revisions/userNames.xml" ), - OUString( "revisions/userNames.xml" ), + "xl/revisions/userNames.xml", + "revisions/userNames.xml", rWorkbookStrm.GetCurrentStream()->getOutputStream(), "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml", CREATE_OFFICEDOC_RELATION_TYPE("usernames")); @@ -1665,8 +1665,8 @@ void XclExpChangeTrack::WriteXml( XclExpXmlStream& rWorkbookStrm ) lcl_WriteUserNamesXml( rWorkbookStrm ); sax_fastparser::FSHelperPtr pRevisionHeaders = rWorkbookStrm.CreateOutputStream( - OUString( "xl/revisions/revisionHeaders.xml" ), - OUString( "revisions/revisionHeaders.xml" ), + "xl/revisions/revisionHeaders.xml", + "revisions/revisionHeaders.xml", rWorkbookStrm.GetCurrentStream()->getOutputStream(), "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml", CREATE_OFFICEDOC_RELATION_TYPE("revisionHeaders")); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 9909bc7d8306..d71b4b3651a0 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -896,7 +896,7 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd void ScXMLExport::ExportExternalRefCacheStyles() { sal_Int32 nEntryIndex = GetCellStylesPropertySetMapper()->FindEntryIndex( - "NumberFormat", XML_NAMESPACE_STYLE, OUString("data-style-name")); + "NumberFormat", XML_NAMESPACE_STYLE, "data-style-name"); if (nEntryIndex < 0) // No entry index for the number format is found. @@ -936,7 +936,7 @@ void ScXMLExport::ExportExternalRefCacheStyles() { bool bIsAuto; nIndex = pCellStyles->GetIndexOfStyleName( - aName, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX), bIsAuto); + aName, XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX, bIsAuto); } // store the number format to index mapping for later use. @@ -1899,7 +1899,7 @@ void ScXMLExport::_ExportStyles( bool bUsed ) { uno::Reference <beans::XPropertySet> xProperties(xMultiServiceFactory->createInstance("com.sun.star.sheet.Defaults"), uno::UNO_QUERY); if (xProperties.is()) - aStylesExp->exportDefaultStyle(xProperties, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME), xCellStylesExportPropertySetMapper); + aStylesExp->exportDefaultStyle(xProperties, XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME, xCellStylesExportPropertySetMapper); if (pSharedData->HasShapes()) { GetShapeExport()->ExportGraphicDefaults(); diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 3bcfc6745bd5..aecabd5aa620 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -1046,9 +1046,9 @@ void ScMasterPageContext::Finish( bool bOverwrite ) { XMLTextMasterPageContext::Finish(bOverwrite); if (!bContainsRightFooter) - ClearContent(OUString(SC_UNO_PAGE_RIGHTFTRCON)); + ClearContent(SC_UNO_PAGE_RIGHTFTRCON); if (!bContainsRightHeader) - ClearContent(OUString(SC_UNO_PAGE_RIGHTHDRCON)); + ClearContent(SC_UNO_PAGE_RIGHTHDRCON); } ScCellTextStyleContext::ScCellTextStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index f0cfb52f612b..feeea1b72372 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -510,7 +510,7 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError ) nStylesRetval = ImportFromComponent(xContext, xModel, xXMLParser, aParserInput, bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisStylesImporter") : OUString("com.sun.star.comp.Calc.XMLStylesImporter"), - OUString("styles.xml"), + "styles.xml", "", aStylesArgs, true); SAL_INFO( "sc.filter", "styles import end" ); @@ -535,8 +535,8 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError ) nDocRetval = ImportFromComponent(xContext, xModel, xXMLParser, aParserInput, bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisContentImporter") : OUString("com.sun.star.comp.Calc.XMLContentImporter"), - OUString("content.xml"), - OUString("Content.xml"), aDocArgs, + "content.xml", + "Content.xml", aDocArgs, true); SAL_INFO( "sc.filter", "content import end" ); @@ -868,7 +868,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) SAL_INFO( "sc.filter", "meta export start" ); bMetaRet = ExportToComponent(xContext, xModel, xWriter, aDescriptor, - OUString("meta.xml"), + "meta.xml", sTextMediaType, bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisMetaExporter") : OUString("com.sun.star.comp.Calc.XMLMetaExporter"), @@ -909,7 +909,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) SAL_INFO( "sc.filter", "styles export start" ); bStylesRet = ExportToComponent(xContext, xModel, xWriter, aDescriptor, - OUString("styles.xml"), + "styles.xml", sTextMediaType, bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisStylesExporter") : OUString("com.sun.star.comp.Calc.XMLStylesExporter"), @@ -933,7 +933,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) SAL_INFO( "sc.filter", "content export start" ); bDocRet = ExportToComponent(xContext, xModel, xWriter, aDescriptor, - OUString("content.xml"), + "content.xml", sTextMediaType, bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisContentExporter") : OUString("com.sun.star.comp.Calc.XMLContentExporter"), @@ -961,7 +961,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) SAL_INFO( "sc.filter", "settings export start" ); bSettingsRet = ExportToComponent(xContext, xModel, xWriter, aDescriptor, - OUString("settings.xml"), + "settings.xml", sTextMediaType, bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisSettingsExporter") : OUString("com.sun.star.comp.Calc.XMLSettingsExporter"), diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx index ce2b9cc1e135..58ce83085854 100644 --- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx +++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx @@ -399,13 +399,13 @@ void ScAccessibleEditObject::CreateTextHelper() sal_Int32 SAL_CALL ScAccessibleEditObject::getForeground( ) throw (css::uno::RuntimeException, std::exception) { - return GetFgBgColor(OUString(SC_UNONAME_CCOLOR)); + return GetFgBgColor(SC_UNONAME_CCOLOR); } sal_Int32 SAL_CALL ScAccessibleEditObject::getBackground( ) throw (css::uno::RuntimeException, std::exception) { - return GetFgBgColor(OUString(SC_UNONAME_CELLBACK)); + return GetFgBgColor(SC_UNONAME_CELLBACK); } sal_Int32 ScAccessibleEditObject::GetFgBgColor( const OUString &strPropColor) diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx index a5e9520e5d36..0416a688c66a 100644 --- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx @@ -307,7 +307,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, output.nextColumn(); // Sum of Squares - OUString aSSPart = lclCreateMultiParameterFormula(aRangeList, OUString("DEVSQ(%RANGE%)"), strWildcardRange, mDocument, mAddressDetails); + OUString aSSPart = lclCreateMultiParameterFormula(aRangeList, "DEVSQ(%RANGE%)", strWildcardRange, mDocument, mAddressDetails); aTemplate.setTemplate("=SUM(%RANGE%)"); aTemplate.applyString(strWildcardRange, aSSPart); aTemplate.autoReplaceAddress("%WITHIN_SS%", output.current()); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index f50615cbd6df..b2621a3e07ad 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2071,7 +2071,7 @@ ScPosWnd::ScPosWnd( vcl::Window* pParent ) : nTipVisible ( 0 ), bFormulaMode( false ) { - Size aSize( GetTextWidth( OUString("GW99999:GW99999") ), + Size aSize( GetTextWidth( "GW99999:GW99999" ), GetTextHeight() ); aSize.Width() += 25; // FIXME: ?? aSize.Height() = CalcWindowSizePixel(11); // Functions: 10 MRU + "others..." diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 37ac39c0f8fd..c9761f5c9527 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -119,7 +119,7 @@ void ScDLL::Init() ScModule* pMod = new ScModule( &ScDocShell::Factory() ); (*ppShlPtr) = pMod; - ScDocShell::Factory().SetDocumentServiceName( OUString( "com.sun.star.sheet.SpreadsheetDocument" ) ); + ScDocShell::Factory().SetDocumentServiceName( "com.sun.star.sheet.SpreadsheetDocument" ); // Not until the ResManager is initialized // The AppOptions must be initialized not until after ScGlobal::Init diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 72982730cc0b..9c9315362145 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -159,7 +159,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) : mbIsInSharedDocSaving( false ) { // The ResManager (DLL data) is not yet initalized in the ctor! - SetName(OUString("StarCalc")); // for Basic + SetName("StarCalc"); // for Basic ResetDragObject(); SetClipObject( NULL, NULL ); diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 594cf11fd1dd..8f7a3a9ec771 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -82,7 +82,7 @@ ScMenuFloatingWindow::ScMenuFloatingWindow(vcl::Window* pParent, ScDocument* pDo mpParentMenu(dynamic_cast<ScMenuFloatingWindow*>(pParent)) { SetMenuStackLevel(nMenuStackLevel); - SetText(OUString("ScMenuFloatingWindow")); + SetText("ScMenuFloatingWindow"); const StyleSettings& rStyle = GetSettings().GetStyleSettings(); diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index cb428a2843d7..79d1ccb9142a 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -295,7 +295,7 @@ void ScZoomSliderWnd::MouseButtonDown( const MouseEvent& rMEvt ) aArgs[0].Name = "ScalingFactor"; aArgs[0].Value = a; - SfxToolBoxControl::Dispatch( m_xDispatchProvider, OUString(".uno:ScalingFactor"), aArgs ); + SfxToolBoxControl::Dispatch( m_xDispatchProvider, ".uno:ScalingFactor", aArgs ); mpImpl->mbOmitPaint = false; } @@ -333,7 +333,7 @@ void ScZoomSliderWnd::MouseMove( const MouseEvent& rMEvt ) aArgs[0].Name = "ScalingFactor"; aArgs[0].Value = a; - SfxToolBoxControl::Dispatch( m_xDispatchProvider, OUString(".uno:ScalingFactor"), aArgs ); + SfxToolBoxControl::Dispatch( m_xDispatchProvider, ".uno:ScalingFactor", aArgs ); mpImpl->mbOmitPaint = false; } diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 3ec832926404..aa0c6f75c938 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -657,7 +657,7 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString, while (pXmlNode != NULL && bRetVal) { - sTagName = OUStringToOString(OUString("Index"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Index", RTL_TEXTENCODING_UTF8); if (xmlStrcmp(pXmlNode->name, reinterpret_cast<xmlChar const *>(sTagName.getStr())) == 0) { if (pXmlNode->children != NULL && pXmlNode->children->type == XML_TEXT_NODE) @@ -671,7 +671,7 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString, } } - sTagName = OUStringToOString(OUString("Type"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Type", RTL_TEXTENCODING_UTF8); if (xmlStrcmp(pXmlNode->name, reinterpret_cast<xmlChar const *>(sTagName.getStr())) == 0) { if (pXmlNode->children != NULL && pXmlNode->children->type == XML_TEXT_NODE) @@ -685,7 +685,7 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString, } } - sTagName = OUStringToOString(OUString("Managed"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Managed", RTL_TEXTENCODING_UTF8); if (xmlStrcmp(pXmlNode->name, reinterpret_cast<xmlChar const *>(sTagName.getStr())) == 0) { if (pXmlNode->children != NULL && pXmlNode->children->type == XML_TEXT_NODE) @@ -726,13 +726,13 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, xmlDocPtr pXmlDoc = xmlNewDoc(reinterpret_cast<const xmlChar*>("1.0")); - sTagName = OUStringToOString(OUString("ScCondFormatDlg"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("ScCondFormatDlg", RTL_TEXTENCODING_UTF8); pTagName = reinterpret_cast<const xmlChar*>(sTagName.getStr()); pXmlRoot = xmlNewDocNode(pXmlDoc, NULL, pTagName, NULL); xmlDocSetRootElement(pXmlDoc, pXmlRoot); - sTagName = OUStringToOString(OUString("Index"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Index", RTL_TEXTENCODING_UTF8); sTagValue = OUStringToOString(OUString::number(nIndex), RTL_TEXTENCODING_UTF8); pTagName = reinterpret_cast<const xmlChar*>(sTagName.getStr()); pTagValue = reinterpret_cast<const xmlChar*>(sTagValue.getStr()); @@ -740,7 +740,7 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, xmlAddChild(pXmlRoot, pXmlNode); - sTagName = OUStringToOString(OUString("Type"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Type", RTL_TEXTENCODING_UTF8); sTagValue = OUStringToOString(OUString::number(nType), RTL_TEXTENCODING_UTF8); pTagName = reinterpret_cast<const xmlChar*>(sTagName.getStr()); pTagValue = reinterpret_cast<const xmlChar*>(sTagValue.getStr()); @@ -748,7 +748,7 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, xmlAddChild(pXmlRoot, pXmlNode); - sTagName = OUStringToOString(OUString("Managed"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Managed", RTL_TEXTENCODING_UTF8); sTagValue = OUStringToOString(OUString::boolean(bManaged), RTL_TEXTENCODING_UTF8); pTagName = reinterpret_cast<const xmlChar*>(sTagName.getStr()); pTagValue = reinterpret_cast<const xmlChar*>(sTagValue.getStr()); diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 55deff8753ba..4c995bf905f6 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1503,7 +1503,7 @@ void ScIconSetFrmtDataEntry::SetFirstEntry() maEdEntry->Hide(); maLbEntryType->Hide(); maFtEntry->Hide(); - maEdEntry->SetText(OUString("0")); + maEdEntry->SetText("0"); maLbEntryType->SelectEntryPos(1); } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 9124f0769909..4f8dd2b39c20 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -452,7 +452,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css bRet = aImport.Import(ScXMLImportWrapper::ALL, nError); if ( nError ) - pLoadMedium->SetError( nError, OUString( OSL_LOG_PREFIX ) ); + pLoadMedium->SetError( nError, OSL_LOG_PREFIX ); processDataStream(*this, aImport.GetImportPostProcessData()); @@ -584,10 +584,10 @@ bool ScDocShell::Load( SfxMedium& rMedium ) } if (!bRet && !rMedium.GetError()) - rMedium.SetError( SVSTREAM_FILEFORMAT_ERROR, OUString( OSL_LOG_PREFIX ) ); + rMedium.SetError( SVSTREAM_FILEFORMAT_ERROR, OSL_LOG_PREFIX ); if (rMedium.GetError()) - SetError( rMedium.GetError(), OUString( OSL_LOG_PREFIX ) ); + SetError( rMedium.GetError(), OSL_LOG_PREFIX ); InitItems(); CalcOutputFactor(); @@ -922,7 +922,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } if ( !bSuccess ) - SetError( ERRCODE_IO_ABORT, OUString( OSL_LOG_PREFIX ) ); // this error code will produce no error message, but will break the further saving process + SetError( ERRCODE_IO_ABORT, OSL_LOG_PREFIX ); // this error code will produce no error message, but will break the further saving process } #endif @@ -939,7 +939,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if( RET_NO == aBox->Execute()) { - SetError( ERRCODE_IO_ABORT, OUString( OSL_LOG_PREFIX ) ); // this error code will produce no error message, but will break the further saving process + SetError( ERRCODE_IO_ABORT, OSL_LOG_PREFIX ); // this error code will produce no error message, but will break the further saving process } } } // fall through @@ -1074,7 +1074,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else bRet = true; @@ -1103,7 +1103,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; @@ -1140,13 +1140,13 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError == SCWARN_IMPORT_RANGE_OVERFLOW) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); bRet = true; } else if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else bRet = true; @@ -1217,7 +1217,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else if (!GetError() && (bOverflowRow || bOverflowCol || bOverflowCell)) { @@ -1225,7 +1225,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) FltError nWarn = (bOverflowRow ? SCWARN_IMPORT_ROW_OVERFLOW : (bOverflowCol ? SCWARN_IMPORT_COLUMN_OVERFLOW : SCWARN_IMPORT_CELL_OVERFLOW)); - SetError( nWarn, OUString( OSL_LOG_PREFIX )); + SetError( nWarn, OSL_LOG_PREFIX); } bSetColWidths = true; bSetSimpleTextColWidths = true; @@ -1257,7 +1257,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); bRet = ( eError == SCWARN_IMPORT_RANGE_OVERFLOW ); } else @@ -1295,7 +1295,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; @@ -1331,7 +1331,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) } if ( eError != eERR_OK && !GetError() ) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); bSetColWidths = true; bSetSimpleTextColWidths = true; bSetRowHeights = true; @@ -1342,7 +1342,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError( eError, OUString( OSL_LOG_PREFIX ) ); + SetError( eError, OSL_LOG_PREFIX ); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; } @@ -1368,7 +1368,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; @@ -1388,7 +1388,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) } if ( eError != eERR_OK && !GetError() ) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else if (aFltName == pFilterHtml || aFltName == pFilterHtmlWebQ) { @@ -1420,7 +1420,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; @@ -1439,12 +1439,12 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) } if ( eError != eERR_OK && !GetError() ) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else { if (!GetError()) - SetError(SCERR_IMPORT_NI, OUString( OSL_LOG_PREFIX )); + SetError(SCERR_IMPORT_NI, OSL_LOG_PREFIX); } if (!bCalc3) @@ -2256,7 +2256,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) FltError eError = ScFormatFilter::Get().ScExportExcel5( rMed, &aDocument, eFormat, RTL_TEXTENCODING_MS_1252 ); if( eError && !GetError() ) - SetError( eError, OUString( OSL_LOG_PREFIX ) ); + SetError( eError, OSL_LOG_PREFIX ); // don't return false for warnings bRet = ((eError & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK) || (eError == eERR_OK); @@ -2264,7 +2264,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) else { // export aborted, i.e. "Save without password" warning - SetError( ERRCODE_ABORT, OUString( OSL_LOG_PREFIX ) ); + SetError( ERRCODE_ABORT, OSL_LOG_PREFIX ); } } else if (aFltName == pFilterAscii) @@ -2297,7 +2297,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) if (aDocument.GetTableCount() > 1) if (!rMed.GetError()) - rMed.SetError(SCWARN_EXPORT_ASCII, OUString( OSL_LOG_PREFIX )); + rMed.SetError(SCWARN_EXPORT_ASCII, OSL_LOG_PREFIX); } } else if (aFltName == pFilterDBase) @@ -2334,11 +2334,11 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) INetURLObject aTmpFile( rMed.GetPhysicalName(), INetProtocol::File ); if ( bHasMemo ) - aTmpFile.setExtension(OUString("dbt")); + aTmpFile.setExtension("dbt"); if ( eError != eERR_OK ) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if ( bHasMemo && IsDocument( aTmpFile ) ) KillFile( aTmpFile ); } @@ -2350,7 +2350,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) const SfxStringItem* pNameItem = static_cast<const SfxStringItem*>( rMed.GetItemSet()->GetItem( SID_FILE_NAME ) ); INetURLObject aDbtFile( pNameItem->GetValue(), INetProtocol::File ); - aDbtFile.setExtension(OUString("dbt")); + aDbtFile.setExtension("dbt"); if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) ) bRet = false; if ( bRet && !MoveFile( aTmpFile, aDbtFile ) ) @@ -2359,7 +2359,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) { KillFile( aTmpFile ); if ( !GetError() ) - SetError( SCERR_EXPORT_DATA, OUString( OSL_LOG_PREFIX ) ); + SetError( SCERR_EXPORT_DATA, OSL_LOG_PREFIX ); } } } @@ -2393,7 +2393,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) if (aDocument.GetTableCount() > 1) if (!rMed.GetError()) - rMed.SetError(SCWARN_EXPORT_ASCII, OUString( OSL_LOG_PREFIX )); + rMed.SetError(SCWARN_EXPORT_ASCII, OSL_LOG_PREFIX); } } else if (aFltName == pFilterSylk) @@ -2435,14 +2435,14 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) SetError(*new StringErrorInfo( SCWARN_EXPORT_NONCONVERTIBLE_CHARS, aImExport.GetNonConvertibleChars(), - ERRCODE_BUTTON_OK | ERRCODE_MSG_INFO), OUString(OSL_LOG_PREFIX)); + ERRCODE_BUTTON_OK | ERRCODE_MSG_INFO), OSL_LOG_PREFIX); } } } else { if (GetError()) - SetError(SCERR_IMPORT_NI, OUString(OSL_LOG_PREFIX)); + SetError(SCERR_IMPORT_NI, OSL_LOG_PREFIX); } return bRet; } diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index c708bdcc4ce5..46468de4cfd7 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -205,7 +205,7 @@ bool ScDocShell::KillFile( const INetURLObject& rURL ) ::ucbhelper::Content aCnt( rURL.GetMainURL(INetURLObject::NO_DECODE), uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aCnt.executeCommand( OUString( "delete" ), + aCnt.executeCommand( "delete", comphelper::makeBoolAny( true ) ); } catch( uno::Exception& ) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index d24b9aed94dd..c442f1b84818 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2396,7 +2396,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt { // Generate a relative file path. INetURLObject aBaseURL(getOwnDocumentName()); - aBaseURL.insertName(OUString("content.xml")); + aBaseURL.insertName("content.xml"); OUString aStr = URIHelper::simpleNormalizedMakeRelative( aBaseURL.GetMainURL(INetURLObject::NO_DECODE), aFile); @@ -2557,7 +2557,7 @@ void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(const OUString& // Formulate the absolute file path from the relative path. const OUString& rRelPath = maRelativeName; INetURLObject aBaseURL(rOwnDocName); - aBaseURL.insertName(OUString("content.xml")); + aBaseURL.insertName("content.xml"); bool bWasAbs = false; maRealFileName = aBaseURL.smartRel2Abs(rRelPath, bWasAbs).GetMainURL(INetURLObject::NO_DECODE); } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index bf3fe8f68916..55bbaede553f 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1957,7 +1957,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm ) SCROW nEndRow = aRange.aEnd.Row(); OUString aCellStr; OUString aValStr; - lcl_WriteSimpleString( rStrm, OUString("ID;PCALCOOO32") ); + lcl_WriteSimpleString( rStrm, "ID;PCALCOOO32" ); WriteUnicodeOrByteEndl( rStrm ); for (nRow = nStartRow; nRow <= nEndRow; nRow++) diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx index 9e08c74498c1..5b9bd95d1716 100644 --- a/sc/source/ui/drawfunc/chartsh.cxx +++ b/sc/source/ui/drawfunc/chartsh.cxx @@ -61,7 +61,7 @@ ScChartShell::ScChartShell(ScViewData* pData) : ScDrawShell(pData) { SetHelpId( HID_SCSHELL_CHARTSH ); - SetName( OUString("ChartObject") ); + SetName( "ChartObject" ); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Chart)); } diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 24d69a1907bb..67382ca32c01 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -68,7 +68,7 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId( HID_SCSHELL_DRAWSH ); - SetName(OUString("Drawing")); + SetName("Drawing"); mpSelectionChangeHandler->Connect(); } diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx index 5ecefc4a9a8a..231a69873f43 100644 --- a/sc/source/ui/drawfunc/drformsh.cxx +++ b/sc/source/ui/drawfunc/drformsh.cxx @@ -56,7 +56,7 @@ ScDrawFormShell::ScDrawFormShell(ScViewData* pData) : ScDrawShell(pData) { SetHelpId(HID_SCSHELL_DRAWFORMSH); - SetName(OUString("DrawForm")); + SetName("DrawForm"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Form)); } diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 1b07ca88bd57..80462cddc245 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -128,7 +128,7 @@ ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) : } SetHelpId( HID_SCSHELL_DRTXTOB ); - SetName(OUString("DrawText")); + SetName("DrawText"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawText)); } diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index b3145732e6e6..48bde978398b 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -57,7 +57,7 @@ ScGraphicShell::ScGraphicShell(ScViewData* pData) : ScDrawShell(pData) { SetHelpId(HID_SCSHELL_GRAPHIC); - SetName(OUString("GraphicObject")); + SetName("GraphicObject"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Graphic)); } diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx index 779129964a95..900eb417a3fb 100644 --- a/sc/source/ui/drawfunc/oleobjsh.cxx +++ b/sc/source/ui/drawfunc/oleobjsh.cxx @@ -56,7 +56,7 @@ ScOleObjectShell::ScOleObjectShell(ScViewData* pData) : ScDrawShell(pData) { SetHelpId(HID_SCSHELL_OLEOBEJCTSH); - SetName(OUString("OleObject")); + SetName("OleObject"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_OLE)); } diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index a317ccfda475..6f8a5e6a4e94 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -106,7 +106,7 @@ void AlignmentPropertyPanel::Initialize() { mpFTLeftIndent->Disable(); mpMFLeftIndent->Disable(); - mpMFLeftIndent->SetAccessibleName(OUString( "Left Indent")); //wj acc + mpMFLeftIndent->SetAccessibleName("Left Indent"); //wj acc Link<Edit&,void> aLink = LINK(this, AlignmentPropertyPanel, MFLeftIndentMdyHdl); mpMFLeftIndent->SetModifyHdl ( aLink ); @@ -115,7 +115,7 @@ void AlignmentPropertyPanel::Initialize() mpCBXWrapText->SetClickHdl ( LINK(this, AlignmentPropertyPanel, CBOXWrapTextClkHdl) ); //rotation - mpMtrAngle->SetAccessibleName(OUString( "Text Orientation")); //wj acc + mpMtrAngle->SetAccessibleName("Text Orientation"); //wj acc mpMtrAngle->SetModifyHdl(LINK( this, AlignmentPropertyPanel, AngleModifiedHdl)); mpMtrAngle->EnableAutocomplete( false ); mpCBStacked->SetClickHdl(LINK(this, AlignmentPropertyPanel, ClickStackHdl)); diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 747a0b2138f5..e3e7569eb0af 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -89,15 +89,15 @@ void NumberFormatPropertyPanel::Initialize() { mpLbCategory->SetSelectHdl ( LINK(this, NumberFormatPropertyPanel, NumFormatSelectHdl) ); mpLbCategory->SelectEntryPos(0); - mpLbCategory->SetAccessibleName(OUString( "Category")); + mpLbCategory->SetAccessibleName("Category"); mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount()); Link<Edit&,void> aLink = LINK(this, NumberFormatPropertyPanel, NumFormatValueHdl); mpEdDecimals->SetModifyHdl( aLink ); mpEdLeadZeroes->SetModifyHdl( aLink ); - mpEdDecimals->SetAccessibleName(OUString( "Decimal Places")); - mpEdLeadZeroes->SetAccessibleName(OUString( "Leading Zeroes")); + mpEdDecimals->SetAccessibleName("Decimal Places"); + mpEdLeadZeroes->SetAccessibleName("Leading Zeroes"); mpBtnNegRed->SetClickHdl( LINK(this, NumberFormatPropertyPanel, NumFormatValueClickHdl) ); mpBtnThousand->SetClickHdl( LINK(this, NumberFormatPropertyPanel, NumFormatValueClickHdl) ); diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx index 44f9cd5bf540..ae58c527aced 100644 --- a/sc/source/ui/unoobj/celllistsource.cxx +++ b/sc/source/ui/unoobj/celllistsource.cxx @@ -54,7 +54,7 @@ namespace calc // register our property at the base class CellRangeAddress aInitialPropValue; registerPropertyNoMember( - OUString( "CellRange" ), + "CellRange", PROP_HANDLE_RANGE_ADDRESS, PropertyAttribute::BOUND | PropertyAttribute::READONLY, cppu::UnoType<decltype(aInitialPropValue)>::get(), diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 7033bc576fb9..eb9ed61085c2 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -3363,7 +3363,7 @@ void SAL_CALL ScCellRangesBase::addChartDataChangeEventListener( const uno::Refe ScDocument& rDoc = pDocShell->GetDocument(); ScRangeListRef aRangesRef( new ScRangeList(aRanges) ); ScChartListenerCollection* pColl = rDoc.GetChartListenerCollection(); - OUString aName = pColl->getUniqueName(OUString("__Uno")); + OUString aName = pColl->getUniqueName("__Uno"); if (aName.isEmpty()) // failed to create unique name. return; diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx index 1d4ce4849024..c34fb023ee87 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -58,7 +58,7 @@ namespace calc // register our property at the base class CellAddress aInitialPropValue; registerPropertyNoMember( - OUString( "BoundCell" ), + "BoundCell", PROP_HANDLE_BOUND_CELL, PropertyAttribute::BOUND | PropertyAttribute::READONLY, cppu::UnoType<decltype(aInitialPropValue)>::get(), diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index aef5ea31a7f8..58fc2584e4c6 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -450,7 +450,7 @@ ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN) pDocShell->GetDocument().AddUnoObject(*this); uno::Sequence< table::CellRangeAddress > aInitialPropValue; - registerPropertyNoMember( OUString( "RelatedCellRanges" ), + registerPropertyNoMember( "RelatedCellRanges", PROP_HANDLE_RELATED_CELLRANGES, beans::PropertyAttribute::MAYBEVOID, cppu::UnoType<decltype(aInitialPropValue)>::get(), &aInitialPropValue ); } diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index d054d8227862..04cdd8822f59 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1644,7 +1644,7 @@ static bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSour OUString sOriginalName( lcl_GetOriginalName( xDimName ) ); rFieldId.maFieldName = sOriginalName; rFieldId.mbDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDim, - OUString(SC_UNO_DP_ISDATALAYOUT) ); + SC_UNO_DP_ISDATALAYOUT ); sal_Int32 nRepeat = 0; if ( rOrient.hasValue() && lcl_IsDuplicated( xDim ) ) @@ -2621,7 +2621,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons OUString aGroupDimName = pGroupDimension->GetGroupDimName(); //! localized prefix string - OUString aGroupName = pGroupDimension->CreateGroupName( OUString( "Group" ) ); + OUString aGroupName = pGroupDimension->CreateGroupName( "Group" ); ScDPSaveGroupItem aGroup( aGroupName ); Reference< XNameAccess > xMembers = GetMembers(); if (!xMembers.is()) diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 54cfc9defbc8..09d834533225 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -461,7 +461,7 @@ ScVbaApplication::wait( double time ) throw (uno::RuntimeException, std::excepti SbxVariableRef aRef = new SbxVariable; aRef->PutDouble( time ); aArgs->Put( aRef, 1 ); - SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( OUString("WaitUntil"), SbxCLASS_METHOD )); + SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( "WaitUntil", SbxCLASS_METHOD )); if ( pMeth ) { @@ -752,7 +752,7 @@ ScVbaApplication::setDisplayFullScreen( sal_Bool bSet ) throw (uno::RuntimeExce // #FIXME calling ScViewUtil::SetFullScreen( *pShell, bSet ); // directly results in a strange crash, using dispatch instead if ( bSet != getDisplayFullScreen() ) - dispatchRequests( getCurrentDocument(), OUString(".uno:FullScreen") ); + dispatchRequests( getCurrentDocument(), ".uno:FullScreen" ); } sal_Bool SAL_CALL @@ -894,19 +894,19 @@ ScVbaApplication::setDefaultFilePath( const OUString& DefaultFilePath ) throw (u OUString SAL_CALL ScVbaApplication::getDefaultFilePath() throw (uno::RuntimeException, std::exception) { - return getOfficePath( OUString("Work")); + return getOfficePath( "Work"); } OUString SAL_CALL ScVbaApplication::getLibraryPath() throw (uno::RuntimeException, std::exception) { - return getOfficePath( OUString("Basic")); + return getOfficePath( "Basic"); } OUString SAL_CALL ScVbaApplication::getTemplatesPath() throw (uno::RuntimeException, std::exception) { - return getOfficePath( OUString("Template")); + return getOfficePath( "Template"); } OUString SAL_CALL @@ -1260,7 +1260,7 @@ uno::Any SAL_CALL ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException, std::exception ) { StarBASIC* pBasic = SfxApplication::GetBasic(); - SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( OUString("FuncCaller"), SbxCLASS_METHOD )); + SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( "FuncCaller", SbxCLASS_METHOD )); uno::Any aRet; if ( pMeth ) { diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index a5506b11ade0..d90af26d212a 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -262,7 +262,7 @@ try case xlSurfaceWireframe: case xlSurfaceTopView: case xlSurfaceTopViewWireframe: - setDiagram( OUString("com.sun.star.chart.BarDiagram")); + setDiagram( "com.sun.star.chart.BarDiagram"); break; case xlLine: case xl3DLine: @@ -271,7 +271,7 @@ try case xlLineMarkers: case xlLineMarkersStacked: case xlLineMarkersStacked100: - setDiagram( OUString("com.sun.star.chart.LineDiagram")); + setDiagram( "com.sun.star.chart.LineDiagram"); break; case xl3DArea: case xlArea: @@ -279,17 +279,17 @@ try case xlAreaStacked100: case xl3DAreaStacked: case xl3DAreaStacked100: - setDiagram( OUString("com.sun.star.chart.AreaDiagram") ); + setDiagram( "com.sun.star.chart.AreaDiagram" ); break; case xlDoughnut: case xlDoughnutExploded: - setDiagram( OUString("com.sun.star.chart.DonutDiagram") ); + setDiagram( "com.sun.star.chart.DonutDiagram" ); break; case xlStockHLC: case xlStockOHLC: case xlStockVHLC: case xlStockVOHLC: - setDiagram( OUString("com.sun.star.chart.StockDiagram")); + setDiagram( "com.sun.star.chart.StockDiagram"); mxDiagramPropertySet->setPropertyValue( UPDOWN, uno::makeAny((_nChartType == xlStockOHLC) || (_nChartType == xlStockVOHLC))); mxDiagramPropertySet->setPropertyValue( VOLUME, uno::makeAny((_nChartType == xlStockVHLC) || (_nChartType == xlStockVOHLC))); break; @@ -300,13 +300,13 @@ try case xl3DPie: case xlPie: case xlBarOfPie: // not possible (Zoom pie) - setDiagram( OUString("com.sun.star.chart.PieDiagram")); + setDiagram( "com.sun.star.chart.PieDiagram"); break; case xlRadar: case xlRadarMarkers: case xlRadarFilled: - setDiagram( OUString("com.sun.star.chart.NetDiagram")); + setDiagram( "com.sun.star.chart.NetDiagram"); break; case xlXYScatter: case xlBubble: // not possible @@ -315,7 +315,7 @@ try case xlXYScatterLinesNoMarkers: case xlXYScatterSmooth: case xlXYScatterSmoothNoMarkers: - setDiagram( OUString("com.sun.star.chart.XYDiagram")); + setDiagram( "com.sun.star.chart.XYDiagram"); switch(_nChartType) { case xlXYScatter: diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 3d64cf9f2077..812ff0363fef 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -141,7 +141,7 @@ ScVbaChartObjects::Add( double _nX, double _nY, double _nWidth, double _nHeight aRectangle.Width = Millimeter::getInHundredthsOfOneMillimeter(_nWidth); aRectangle.Height = Millimeter::getInHundredthsOfOneMillimeter(_nHeight); // Note the space at the end of the stem ("Chart "). In ChartSheets only "Chart" is the stem - OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), OUString( "Chart " ) , OUString(), 1); + OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), "Chart " , OUString(), 1); xTableCharts->addNewByName(sPersistChartName, aRectangle, aCellRangeAddress, true, false ); uno::Reference< excel::XChartObject > xChartObject( getItemByStringIndex( sPersistChartName ), uno::UNO_QUERY_THROW ); xChartObject->getChart()->setChartType(excel::XlChartType::xlColumnClustered); diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx index 7d73d2702d04..c3a10695262b 100644 --- a/sc/source/ui/vba/vbacondition.cxx +++ b/sc/source/ui/vba/vbacondition.cxx @@ -146,7 +146,7 @@ ScVbaCondition< Ifc... >::Operator(bool _bIncludeFormulaValue) throw ( script::B } case sheet::ConditionOperator_NONE: default: - DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, OUString("Operator not supported")); + DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "Operator not supported"); break; } return retvalue; diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index 5f0a6f50c7d1..8c14d4087631 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -65,7 +65,7 @@ ScVbaFormat< Ifc... >::ScVbaFormat( const uno::Reference< XHelperInterface >& xP try { if ( !mxModel.is() ) - DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, OUString( "XModel Interface could not be retrieved") ); + DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "XModel Interface could not be retrieved" ); // mxServiceInfo is unused, // mxNumberFormatsSupplier is initialized when needed in initializeNumberFormats. } @@ -120,7 +120,7 @@ ScVbaFormat< Ifc... >::getVerticalAlignment( ) throw (script::BasicErrorExcepti uno::Any aResult = aNULL(); try { - if (!isAmbiguous( OUString( SC_UNONAME_CELLVJUS ) ) ) + if (!isAmbiguous( SC_UNONAME_CELLVJUS ) ) { sal_Int32 aAPIAlignment = table::CellVertJustify2::STANDARD; mxPropertySet->getPropertyValue( SC_UNONAME_CELLVJUS ) >>= aAPIAlignment; @@ -275,7 +275,7 @@ ScVbaFormat< Ifc... >::getOrientation( ) throw (script::BasicErrorException, un uno::Any NRetOrientation = aNULL(); try { - if (!isAmbiguous(OUString( SC_UNONAME_CELLORI ))) + if (!isAmbiguous(SC_UNONAME_CELLORI)) { table::CellOrientation aOrientation = table::CellOrientation_STANDARD; if ( !( mxPropertySet->getPropertyValue( SC_UNONAME_CELLORI ) >>= aOrientation ) ) diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 557cd51ef45d..dc9a9adbee1c 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -253,7 +253,7 @@ ScVbaFormatConditions::getStyleName() if ( !pStyles ) DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, OUString() ); uno::Sequence< OUString > sCellStyleNames = pStyles->getStyleNames(); - return ContainerUtilities::getUniqueName(sCellStyleNames, sStyleNamePrefix, OUString("_")); + return ContainerUtilities::getUniqueName(sCellStyleNames, sStyleNamePrefix, "_"); } void diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a50929c52a88..28e8d132ff39 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3510,7 +3510,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& uno::Reference< util::XSortable > xSort( mxRange, uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > sortDescriptor = xSort->createSortDescriptor(); - sal_Int32 nTableSortFieldIndex = findSortPropertyIndex( sortDescriptor, OUString( "SortFields" ) ); + sal_Int32 nTableSortFieldIndex = findSortPropertyIndex( sortDescriptor, "SortFields" ); uno::Sequence< table::TableSortField > sTableFields(1); sal_Int32 nTableIndex = 0; @@ -3528,7 +3528,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& } sortDescriptor[ nTableSortFieldIndex ].Value <<= sTableFields; - sal_Int32 nIndex = findSortPropertyIndex( sortDescriptor, OUString("IsSortColumns") ); + sal_Int32 nIndex = findSortPropertyIndex( sortDescriptor, "IsSortColumns" ); sortDescriptor[ nIndex ].Value <<= bIsSortColumns; nIndex = findSortPropertyIndex( sortDescriptor, CONTS_HEADER ); diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx index 6c960839d6f6..0f651b4b0f94 100644 --- a/sc/source/ui/vba/vbastyle.cxx +++ b/sc/source/ui/vba/vbastyle.cxx @@ -44,7 +44,7 @@ lcl_getStyleProps( const OUString& sStyleName, const uno::Reference< frame::XMod void ScVbaStyle::initialise() throw ( uno::RuntimeException, script::BasicErrorException ) { if (!mxModel.is() ) - DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, OUString( "XModel Interface could not be retrieved") ); + DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "XModel Interface could not be retrieved" ); uno::Reference< lang::XServiceInfo > xServiceInfo( mxPropertySet, uno::UNO_QUERY_THROW ); if ( !xServiceInfo->supportsService("com.sun.star.style.CellStyle") ) { diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx index 57a95438498f..124351873d12 100644 --- a/sc/source/ui/view/auditsh.cxx +++ b/sc/source/ui/view/auditsh.cxx @@ -56,7 +56,7 @@ ScAuditingShell::ScAuditingShell(ScViewData* pData) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId( HID_SCSHELL_AUDIT ); - SetName(OUString("Auditing")); + SetName("Auditing"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Auditing)); } diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index ca925e4c6e4b..735e2c7e8527 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -80,7 +80,7 @@ ScCellShell::ScCellShell(ScViewData* pData) : bPastePossible(false) { SetHelpId(HID_SCSHELL_CELLSH); - SetName(OUString("Cell")); + SetName("Cell"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Cell)); } diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index dca465866afb..79a1f1092175 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -100,7 +100,7 @@ ScEditShell::ScEditShell(EditView* pView, ScViewData* pData) : { SetPool( pEditView->GetEditEngine()->GetEmptyItemSet().GetPool() ); SetUndoManager( &pEditView->GetEditEngine()->GetUndoManager() ); - SetName(OUString("EditCell")); + SetName("EditCell"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_EditCell)); } diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 4d2f2504d281..f10a078d1789 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -143,7 +143,7 @@ ScFormatShell::ScFormatShell(ScViewData* pData) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId(HID_SCSHELL_FORMATSH); - SetName(OUString("Format")); + SetName("Format"); } ScFormatShell::~ScFormatShell() diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index ece03625ac4d..2018821d0bcc 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -76,14 +76,14 @@ ScHeaderControl::ScHeaderControl( vcl::Window* pParent, SelectionEngine* pSelect bBoldSet = true; Size aSize = LogicToPixel( Size( - GetTextWidth(OUString("8888")), + GetTextWidth("8888"), GetTextHeight() ) ); aSize.Width() += 4; // place for highlight border aSize.Height() += 3; SetSizePixel( aSize ); nWidth = nSmallWidth = aSize.Width(); - nBigWidth = LogicToPixel( Size( GetTextWidth(OUString("8888888")), 0 ) ).Width() + 5; + nBigWidth = LogicToPixel( Size( GetTextWidth("8888888"), 0 ) ).Width() + 5; SetBackground(); } diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index f610daaee0ff..d40483a16624 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -551,7 +551,7 @@ bool ScDrawStringsVars::SetText( ScRefCellValue& rCell ) void ScDrawStringsVars::SetHashText() { - SetAutoText(OUString("###")); + SetAutoText("###"); } void ScDrawStringsVars::RepeatToFill( long nColWidth ) diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx index 89b3222c9906..d4c8df0dde1a 100644 --- a/sc/source/ui/view/pgbrksh.cxx +++ b/sc/source/ui/view/pgbrksh.cxx @@ -55,7 +55,7 @@ ScPageBreakShell::ScPageBreakShell( ScTabViewShell* pViewSh ) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId( HID_SCSHELL_PAGEBREAK ); - SetName(OUString("PageBreak")); + SetName("PageBreak"); } ScPageBreakShell::~ScPageBreakShell() diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index 55ade8b614ab..3e83de30cf47 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -65,7 +65,7 @@ ScPivotShell::ScPivotShell( ScTabViewShell* pViewSh ) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId( HID_SCSHELL_PIVOTSH ); - SetName(OUString("Pivot")); + SetName("Pivot"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Pivot)); } diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 2b9f1234e65c..b31044a42176 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -144,7 +144,7 @@ void ScPreviewShell::Construct( vcl::Window* pParent ) pVerScroll->Show( false ); pCorner->Show(); SetHelpId( HID_SCSHELL_PREVWSH ); - SetName(OUString("Preview")); + SetName("Preview"); } ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame, diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 4e9f6c4c9af1..8512061f164e 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1849,7 +1849,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData ScAutoFontColorMode eColorMode = bUseStyleColor ? SC_AUTOCOL_DISPLAY : SC_AUTOCOL_PRINT; static_cast<const ScPatternAttr&>(pDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)).GetFont( aMarkFont, eColorMode ); pDev->SetFont( aMarkFont ); - long nMarkLen = pDev->GetTextWidth(OUString("GW99999:")); + long nMarkLen = pDev->GetTextWidth("GW99999:"); // without Space-Char, because it rarely arrives there Size aDataSize = aPageRect.GetSize(); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 0ef1f40881a7..15c4194706b8 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1438,7 +1438,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode ) EnableAutoSpell(rDoc.GetDocOptions().IsAutoSpell()); - SetName(OUString("View")); // for SBX + SetName("View"); // for SBX Color aColBlack( COL_BLACK ); SetPool( &SC_MOD()->GetPool() ); SetWindow( GetActiveWin() ); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index d04433b7ea27..24dd690c9b41 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2598,7 +2598,7 @@ void ScViewFunc::MoveTable( { while (pDestDoc->GetTableCount() > 1) pDestDoc->DeleteTab(0); - pDestDoc->RenameTab( 0, OUString("______42_____"), + pDestDoc->RenameTab( 0, "______42_____", false ); } diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index d84f3e078a31..95ae35f073f7 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -473,8 +473,8 @@ void ScViewFunc::PasteFromSystem() TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); { - SotClipboardFormatId nBiff8 = SotExchange::RegisterFormatName(OUString("Biff8")); - SotClipboardFormatId nBiff5 = SotExchange::RegisterFormatName(OUString("Biff5")); + SotClipboardFormatId nBiff8 = SotExchange::RegisterFormatName("Biff8"); + SotClipboardFormatId nBiff5 = SotExchange::RegisterFormatName("Biff5"); SotExchangeDest nDestination = SotExchangeDest::SCDOC_FREE_AREA; sal_uInt16 nSourceOptions = EXCHG_IN_ACTION_COPY; @@ -623,8 +623,8 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran { TransferableDataHelper aDataHelper( rxTransferable ); { - SotClipboardFormatId nBiff8 = SotExchange::RegisterFormatName(OUString("Biff8")); - SotClipboardFormatId nBiff5 = SotExchange::RegisterFormatName(OUString("Biff5")); + SotClipboardFormatId nBiff8 = SotExchange::RegisterFormatName("Biff8"); + SotClipboardFormatId nBiff5 = SotExchange::RegisterFormatName("Biff5"); SotClipboardFormatId nFormatId = SotClipboardFormatId::NONE; // first SvDraw-model, then drawing // (only one drawing is allowed) diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 2da15480a718..2bff93479c03 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -2533,7 +2533,7 @@ void ScViewFunc::ChangeNumFmtDecimals( bool bIncrement ) for ( sal_Int32 i=1 ; i<sExponentialStandardFormat.getLength() ; i++ ) { if ( sExponentialStandardFormat[i] >= '1' && sExponentialStandardFormat[i] <= '9' ) - sExponentialStandardFormat = sExponentialStandardFormat.replaceAt( i, 1, OUString( "0" ) ); + sExponentialStandardFormat = sExponentialStandardFormat.replaceAt( i, 1, "0" ); } aOut = aOut.copy( 0, nIndexE ); // remove exponential part } |