summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-06 09:36:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-06 09:36:49 +0100
commite53db9461e1cc7ad25ecf5e96021a2f4e70857b1 (patch)
tree768cc65694d0bf8c01e7a7cc192ad55240b58993 /sc/qa
parent1a3834d7b9382968cf7ba3755d41a6e317997aec (diff)
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Ief66447f04245b8ab0a4acbf097eb7283529d45d
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/extras/new_cond_format.cxx2
-rw-r--r--sc/qa/extras/scannotationobj.cxx2
-rw-r--r--sc/qa/extras/scannotationsobj.cxx2
-rw-r--r--sc/qa/extras/sccondformats.cxx4
-rw-r--r--sc/qa/extras/scdatapilotfieldobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilottableobj.cxx2
-rw-r--r--sc/qa/extras/scmodelobj.cxx2
-rw-r--r--sc/qa/extras/scnamedrangeobj.cxx4
-rw-r--r--sc/qa/extras/scnamedrangesobj.cxx2
-rw-r--r--sc/qa/extras/scoutlineobj.cxx2
-rw-r--r--sc/qa/extras/scstyleloaderobj.cxx2
-rw-r--r--sc/qa/extras/sctablesheetobj.cxx2
-rw-r--r--sc/qa/extras/sctablesheetsobj.cxx2
-rw-r--r--sc/qa/unit/bugfix-test.cxx8
-rw-r--r--sc/qa/unit/filters-test.cxx10
-rw-r--r--sc/qa/unit/helper/qahelper.cxx4
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx2
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx42
-rw-r--r--sc/qa/unit/ucalc.cxx2
-rw-r--r--sc/qa/unit/ucalc_formula.cxx126
-rw-r--r--sc/qa/unit/ucalc_pivottable.cxx84
21 files changed, 154 insertions, 154 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[] = {