summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-19 09:22:44 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-19 09:00:26 +0000
commit8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch)
tree2dbddceebf0f96492adc5652697e8efce8a8ba06 /sc/qa
parentfe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff)
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/extras/macros-test.cxx76
-rw-r--r--sc/qa/extras/regression-test.cxx3
-rw-r--r--sc/qa/extras/scannotationobj.cxx2
-rw-r--r--sc/qa/extras/scannotationsobj.cxx2
-rw-r--r--sc/qa/extras/sccellrangeobj.cxx4
-rw-r--r--sc/qa/extras/scdatabaserangeobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilotfieldobj.cxx4
-rw-r--r--sc/qa/extras/scdatapilottableobj.cxx8
-rw-r--r--sc/qa/extras/scmodelobj.cxx2
-rw-r--r--sc/qa/extras/scnamedrangeobj.cxx6
-rw-r--r--sc/qa/extras/scnamedrangesobj.cxx2
-rw-r--r--sc/qa/extras/scoutlineobj.cxx2
-rw-r--r--sc/qa/extras/sctablesheetobj.cxx6
-rw-r--r--sc/qa/extras/sctablesheetsobj.cxx4
-rw-r--r--sc/qa/unit/filters-test.cxx19
-rw-r--r--sc/qa/unit/helper/qahelper.hxx2
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx5
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx57
18 files changed, 101 insertions, 105 deletions
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index da29b141f94e..85d4801519b7 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -109,86 +109,86 @@ void ScMacrosTest::testVba()
{
TestMacroInfo testInfo[] = {
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestAddress.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("TestAddress."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vba.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.Modul1.Modul1?language=Basic&location=document")),
+ rtl::OUString("vba."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.Modul1.Modul1?language=Basic&location=document"),
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MiscRangeTests.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("MiscRangeTests."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bytearraystring.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacro.test?language=Basic&location=document"))
+ rtl::OUString("bytearraystring."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacro.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoFilter.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("AutoFilter."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CalcFont.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("CalcFont."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestIntersection.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("TestIntersection."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestUnion.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("TestUnion."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("range-4.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("range-4."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ranges-3.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("Ranges-3."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestCalc_Rangetest.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("TestCalc_Rangetest."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestCalc_Rangetest2.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("TestCalc_Rangetest2."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
#if FIXRANGEADDRESSING
//ScVbaRange::getRangeForName()/getScRangeListForAddress() seems to get confused
//about the addressing mode of the document vs the addressing mode of a named
//range ( need to fix that )
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ranges-2.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("Ranges-2."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
#endif
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pagesetup.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("pagesetup."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Window.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("Window."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("window2.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("window2."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageBreaks.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("PageBreaks."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Shapes.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("Shapes."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
#if VBA_TEST_WORKING
{
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ranges.")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ rtl::OUString("Ranges."),
+ rtl::OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
#endif
};
diff --git a/sc/qa/extras/regression-test.cxx b/sc/qa/extras/regression-test.cxx
index 174debde8160..d404d335c97c 100644
--- a/sc/qa/extras/regression-test.cxx
+++ b/sc/qa/extras/regression-test.cxx
@@ -164,8 +164,7 @@ void ScChartRegressionTest::setUp()
// This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
// which is a private symbol to us, gets called
m_xCalcComponent =
- getMultiServiceFactory()->createInstance(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.SpreadsheetDocument")));
+ getMultiServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.Calc.SpreadsheetDocument"));
CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is());
mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) );
}
diff --git a/sc/qa/extras/scannotationobj.cxx b/sc/qa/extras/scannotationobj.cxx
index fdbd7486eef6..d5971c0033a2 100644
--- a/sc/qa/extras/scannotationobj.cxx
+++ b/sc/qa/extras/scannotationobj.cxx
@@ -98,7 +98,7 @@ uno::Reference< uno::XInterface > ScAnnontationObj::init()
// get the test file
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScAnnotationObj.ods")), aFileURL);
+ createFileURL(rtl::OUString("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 2c3694aa520a..62d662672352 100644
--- a/sc/qa/extras/scannotationsobj.cxx
+++ b/sc/qa/extras/scannotationsobj.cxx
@@ -87,7 +87,7 @@ uno::Reference< uno::XInterface > ScAnnontationsObj::init()
{
// get the test file
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScAnnotationObj.ods")), aFileURL);
+ createFileURL(rtl::OUString("ScAnnotationObj.ods"), aFileURL);
if(!mxComponent.is())
mxComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT_MESSAGE("Component not loaded",mxComponent.is());
diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx
index 97366dec287f..a65a04878b9a 100644
--- a/sc/qa/extras/sccellrangeobj.cxx
+++ b/sc/qa/extras/sccellrangeobj.cxx
@@ -80,8 +80,8 @@ uno::Reference< lang::XComponent > ScCellRangeObj::mxComponent;
ScCellRangeObj::ScCellRangeObj():
UnoApiTest("/sc/qa/extras/testdocuments"),
- apitest::XSearchable(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("15")), 1),
- apitest::XReplaceable(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("15")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("35")))
+ apitest::XSearchable(rtl::OUString("15"), 1),
+ apitest::XReplaceable(rtl::OUString("15"), rtl::OUString("35"))
{
}
diff --git a/sc/qa/extras/scdatabaserangeobj.cxx b/sc/qa/extras/scdatabaserangeobj.cxx
index c122e4fac742..a54716720883 100644
--- a/sc/qa/extras/scdatabaserangeobj.cxx
+++ b/sc/qa/extras/scdatabaserangeobj.cxx
@@ -80,7 +80,7 @@ uno::Reference< uno::XInterface > ScDatabaseRangeObj::init( const rtl::OUString&
uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW);
uno::Reference< beans::XPropertySet > xPropSet(xDoc, UNO_QUERY_THROW);
- uno::Reference< container::XNameAccess > xNameAccess( xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DatabaseRanges"))), UNO_QUERY_THROW);
+ uno::Reference< container::XNameAccess > xNameAccess( xPropSet->getPropertyValue(rtl::OUString("DatabaseRanges")), UNO_QUERY_THROW);
uno::Reference< sheet::XDatabaseRange > xDBRange( xNameAccess->getByName(rDBName), UNO_QUERY_THROW);
CPPUNIT_ASSERT(xDBRange.is());
return xDBRange;
diff --git a/sc/qa/extras/scdatapilotfieldobj.cxx b/sc/qa/extras/scdatapilotfieldobj.cxx
index ccc7417638da..c52952eeff4f 100644
--- a/sc/qa/extras/scdatapilotfieldobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldobj.cxx
@@ -76,7 +76,7 @@ ScDataPilotFieldObj::ScDataPilotFieldObj()
uno::Reference< uno::XInterface > ScDataPilotFieldObj::init()
{
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("scdatapilotfieldobj.ods")), aFileURL);
+ createFileURL(rtl::OUString("scdatapilotfieldobj.ods"), aFileURL);
if(!mxComponent.is())
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT(mxComponent.is());
@@ -92,7 +92,7 @@ uno::Reference< uno::XInterface > ScDataPilotFieldObj::init()
CPPUNIT_ASSERT(xDPT.is());
uno::Sequence<rtl::OUString> aElementNames = xDPT->getElementNames();
- uno::Reference< sheet::XDataPilotDescriptor > xDPDsc(xDPT->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataPilot1"))),UNO_QUERY_THROW);
+ uno::Reference< sheet::XDataPilotDescriptor > xDPDsc(xDPT->getByName(rtl::OUString("DataPilot1")),UNO_QUERY_THROW);
CPPUNIT_ASSERT(xDPDsc.is());
uno::Reference< container::XIndexAccess > xIA( xDPDsc->getDataPilotFields(), UNO_QUERY_THROW);
uno::Reference< uno::XInterface > xReturnValue( xIA->getByIndex(0), UNO_QUERY_THROW);
diff --git a/sc/qa/extras/scdatapilottableobj.cxx b/sc/qa/extras/scdatapilottableobj.cxx
index 1e9f2a873bad..05a7572d411c 100644
--- a/sc/qa/extras/scdatapilottableobj.cxx
+++ b/sc/qa/extras/scdatapilottableobj.cxx
@@ -84,7 +84,7 @@ uno::Reference< lang::XComponent > ScDataPilotTableObj::mxComponent;
ScDataPilotTableObj::ScDataPilotTableObj()
: UnoApiTest("/sc/qa/extras/testdocuments"),
- apitest::XNamed(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataPilotTable")))
+ apitest::XNamed(rtl::OUString("DataPilotTable"))
{
}
@@ -112,7 +112,7 @@ uno::Reference< uno::XInterface > ScDataPilotTableObj::init()
uno::Reference< sheet::XDataPilotTables > xDPT = xDPTS->getDataPilotTables();
CPPUNIT_ASSERT(xDPT.is());
- uno::Reference< sheet::XDataPilotTable > xDPTable(xDPT->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataPilotTable"))),UNO_QUERY_THROW);
+ uno::Reference< sheet::XDataPilotTable > xDPTable(xDPT->getByName(rtl::OUString("DataPilotTable")),UNO_QUERY_THROW);
CPPUNIT_ASSERT(xDPTable.is());
return xDPTable;
@@ -128,7 +128,7 @@ uno::Reference< uno::XInterface > ScDataPilotTableObj::getSheets()
uno::Reference< uno::XInterface > ScDataPilotTableObj::initDP2()
{
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScDataPilotTableObj.ods")), aFileURL);
+ createFileURL(rtl::OUString("ScDataPilotTableObj.ods"), aFileURL);
if(!mxComponent.is())
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT(mxComponent.is());
@@ -149,7 +149,7 @@ uno::Reference< uno::XInterface > ScDataPilotTableObj::initDP2()
uno::Reference< sheet::XDataPilotTables > xDPT = xDPTS->getDataPilotTables();
CPPUNIT_ASSERT(xDPT.is());
- uno::Reference< sheet::XDataPilotTable > xDPTable(xDPT->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataPilotTable2"))),UNO_QUERY_THROW);
+ uno::Reference< sheet::XDataPilotTable > xDPTable(xDPT->getByName(rtl::OUString("DataPilotTable2")),UNO_QUERY_THROW);
CPPUNIT_ASSERT(xDPTable.is());
return xDPTable;
diff --git a/sc/qa/extras/scmodelobj.cxx b/sc/qa/extras/scmodelobj.cxx
index 167e3b290045..13384e83bd39 100644
--- a/sc/qa/extras/scmodelobj.cxx
+++ b/sc/qa/extras/scmodelobj.cxx
@@ -44,7 +44,7 @@ uno::Reference< lang::XComponent > ScModelObj::mxComponent;
uno::Reference< uno::XInterface > ScModelObj::init()
{
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScModelObj.ods")), aFileURL);
+ createFileURL(rtl::OUString("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 95e2b0f75e25..8403c051b076 100644
--- a/sc/qa/extras/scnamedrangeobj.cxx
+++ b/sc/qa/extras/scnamedrangeobj.cxx
@@ -74,7 +74,7 @@ uno::Reference< lang::XComponent > ScNamedRangeObj::mxComponent;
ScNamedRangeObj::ScNamedRangeObj():
UnoApiTest("/sc/qa/extras/testdocuments"),
- apitest::XNamed(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NamedRange"))),
+ apitest::XNamed(rtl::OUString("NamedRange")),
apitest::XCellRangeReferrer(table::CellRangeAddress(0,1,7,1,7))
{
}
@@ -82,7 +82,7 @@ ScNamedRangeObj::ScNamedRangeObj():
uno::Reference< sheet::XNamedRanges > ScNamedRangeObj::init_impl()
{
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScNamedRangeObj.ods")), aFileURL);
+ createFileURL(rtl::OUString("ScNamedRangeObj.ods"), aFileURL);
if(!mxComponent.is())
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT(mxComponent.is());
@@ -106,7 +106,7 @@ uno::Reference< sheet::XNamedRange> ScNamedRangeObj::getNamedRange(const rtl::OU
uno::Reference< uno::XInterface > ScNamedRangeObj::init()
{
- return getNamedRange(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NamedRange")));
+ return getNamedRange(rtl::OUString("NamedRange"));
}
void ScNamedRangeObj::setUp()
diff --git a/sc/qa/extras/scnamedrangesobj.cxx b/sc/qa/extras/scnamedrangesobj.cxx
index d921932c0900..b52962d85115 100644
--- a/sc/qa/extras/scnamedrangesobj.cxx
+++ b/sc/qa/extras/scnamedrangesobj.cxx
@@ -70,7 +70,7 @@ ScNamedRangesObj::ScNamedRangesObj()
uno::Reference< uno::XInterface > ScNamedRangesObj::init(sal_Int32 nSheet)
{
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScNamedRangeObj.ods")), aFileURL);
+ createFileURL(rtl::OUString("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 f55178bd1e09..4e7f1540c528 100644
--- a/sc/qa/extras/scoutlineobj.cxx
+++ b/sc/qa/extras/scoutlineobj.cxx
@@ -73,7 +73,7 @@ uno::Reference< uno::XInterface > ScOutlineObj::init()
{
// get the test file
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScOutlineObj.ods")), aFileURL);
+ createFileURL(rtl::OUString("ScOutlineObj.ods"), aFileURL);
if(!mxComponent.is())
mxComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT_MESSAGE("Component not loaded",mxComponent.is());
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx
index e10df62997d6..f41d2ac3d83e 100644
--- a/sc/qa/extras/sctablesheetobj.cxx
+++ b/sc/qa/extras/sctablesheetobj.cxx
@@ -65,8 +65,8 @@ uno::Reference< lang::XComponent > ScTableSheetObj::mxComponent;
ScTableSheetObj::ScTableSheetObj():
UnoApiTest("/sc/qa/extras/testdocuments"),
- apitest::XSearchable(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test")), 4),
- apitest::XReplaceable(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("searchReplaceString")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("replaceReplaceString")))
+ apitest::XSearchable(rtl::OUString("test"), 4),
+ apitest::XReplaceable(rtl::OUString("searchReplaceString"), rtl::OUString("replaceReplaceString"))
{
}
@@ -74,7 +74,7 @@ ScTableSheetObj::ScTableSheetObj():
uno::Reference< uno::XInterface > ScTableSheetObj::init()
{
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScTableSheetObj.ods")), aFileURL);
+ createFileURL(rtl::OUString("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 a1e97d5a73e8..cfc771c7b0a9 100644
--- a/sc/qa/extras/sctablesheetsobj.cxx
+++ b/sc/qa/extras/sctablesheetsobj.cxx
@@ -75,7 +75,7 @@ sal_Int32 ScTableSheetsObj::nTest = 0;
ScTableSheetsObj::ScTableSheetsObj():
UnoApiTest("/sc/qa/extras/testdocuments"),
- apitest::XNameContainer(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sheet2")))
+ apitest::XNameContainer(rtl::OUString("Sheet2"))
{
}
@@ -98,7 +98,7 @@ uno::Reference< lang::XComponent > ScTableSheetsObj::loadFromDesktop(const rtl::
uno::Reference< uno::XInterface > ScTableSheetsObj::init()
{
rtl::OUString aFileURL;
- createFileURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rangenamessrc.ods")), aFileURL);
+ createFileURL(rtl::OUString("rangenamessrc.ods"), aFileURL);
if(!mxComponent.is())
mxComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(mxComponent.is());
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 67db72eee7c4..3b23c60f19d5 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -131,16 +131,16 @@ bool ScFiltersTest::load(const OUString &rFilter, const OUString &rURL,
void ScFiltersTest::testCVEs()
{
#ifndef DISABLE_CVE_TESTS
- testDir(OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")),
+ testDir(OUString("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(RTL_CONSTASCII_USTRINGPARAM("SYLK")),
+ testDir(OUString("SYLK"),
getURLFromSrc("/sc/qa/unit/data/slk/"), OUString());
- testDir(OUString(RTL_CONSTASCII_USTRINGPARAM("MS Excel 97")),
+ testDir(OUString("MS Excel 97"),
getURLFromSrc("/sc/qa/unit/data/xls/"), OUString());
#endif
}
@@ -209,16 +209,16 @@ void testRangeNameImpl(ScDocument* pDoc)
{
//check one range data per sheet and one global more detailed
//add some more checks here
- ScRangeData* pRangeData = pDoc->GetRangeName()->findByUpperName(OUString(RTL_CONSTASCII_USTRINGPARAM("GLOBAL1")));
+ ScRangeData* pRangeData = pDoc->GetRangeName()->findByUpperName(OUString("GLOBAL1"));
CPPUNIT_ASSERT_MESSAGE("range name Global1 not found", pRangeData);
double aValue;
pDoc->GetValue(1,0,0,aValue);
CPPUNIT_ASSERT_MESSAGE("range name Global1 should reference Sheet1.A1", aValue == 1);
- pRangeData = pDoc->GetRangeName(0)->findByUpperName(OUString(RTL_CONSTASCII_USTRINGPARAM("LOCAL1")));
+ pRangeData = pDoc->GetRangeName(0)->findByUpperName(OUString("LOCAL1"));
CPPUNIT_ASSERT_MESSAGE("range name Sheet1.Local1 not found", pRangeData);
pDoc->GetValue(1,2,0,aValue);
CPPUNIT_ASSERT_MESSAGE("range name Sheet1.Local1 should reference Sheet1.A3", aValue == 3);
- pRangeData = pDoc->GetRangeName(1)->findByUpperName(OUString(RTL_CONSTASCII_USTRINGPARAM("LOCAL2")));
+ pRangeData = pDoc->GetRangeName(1)->findByUpperName(OUString("LOCAL2"));
CPPUNIT_ASSERT_MESSAGE("range name Sheet2.Local2 not found", pRangeData);
//check for correct results for the remaining formulas
pDoc->GetValue(1,1,0, aValue);
@@ -262,9 +262,9 @@ void testContentImpl(ScDocument* pDoc, sal_Int32 nFormat ) //same code for ods,
OUString aString = pDoc->GetString(1, 0, 0);
//check string import
- CPPUNIT_ASSERT_MESSAGE("string imported not correctly", aString == OUString(RTL_CONSTASCII_USTRINGPARAM("String1")));
+ CPPUNIT_ASSERT_MESSAGE("string imported not correctly", aString == OUString("String1"));
aString = pDoc->GetString(1, 1, 0);
- CPPUNIT_ASSERT_MESSAGE("string not imported correctly", aString == OUString(RTL_CONSTASCII_USTRINGPARAM("String2")));
+ CPPUNIT_ASSERT_MESSAGE("string not imported correctly", aString == OUString("String2"));
//check basic formula import
pDoc->GetValue(2,0,0,fValue);
@@ -462,8 +462,7 @@ void ScFiltersTest::setUp()
// This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
// which is a private symbol to us, gets called
m_xCalcComponent =
- getMultiServiceFactory()->createInstance(OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.SpreadsheetDocument")));
+ getMultiServiceFactory()->createInstance(OUString("com.sun.star.comp.Calc.SpreadsheetDocument"));
CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is());
}
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 0d77c0b0e67a..5325bbc37850 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -217,7 +217,7 @@ public:
SfxFilter* pExportFilter = new SfxFilter(
rFilter,
OUString(), nFormatType, nExportFormat, rTypeName, 0, OUString(),
- rUserData, OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/scalc*")) );
+ rUserData, OUString("private:factory/scalc*") );
pExportFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT);
aStoreMedium.SetFilter(pExportFilter);
pShell->DoSaveAs( aStoreMedium );
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 621a6d77f8c5..d7998a78e28a 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -76,7 +76,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt
SfxFilter* pExportFilter = new SfxFilter(
rFilter,
OUString(), nFormatType, nExportFormat, rTypeName, 0, OUString(),
- rUserData, OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/scalc*")) );
+ rUserData, OUString("private:factory/scalc*") );
pExportFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT);
aStoreMedium.SetFilter(pExportFilter);
SfxItemSet* pExportSet = aStoreMedium.GetItemSet();
@@ -212,8 +212,7 @@ void ScExportTest::setUp()
// This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
// which is a private symbol to us, gets called
m_xCalcComponent =
- getMultiServiceFactory()->createInstance(OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.SpreadsheetDocument")));
+ getMultiServiceFactory()->createInstance(OUString("com.sun.star.comp.Calc.SpreadsheetDocument"));
CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is());
}
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index cdaaa3e8c777..0bb7645944e5 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -239,16 +239,16 @@ void testRangeNameImpl(ScDocument* pDoc)
{
//check one range data per sheet and one global more detailed
//add some more checks here
- ScRangeData* pRangeData = pDoc->GetRangeName()->findByUpperName(OUString(RTL_CONSTASCII_USTRINGPARAM("GLOBAL1")));
+ ScRangeData* pRangeData = pDoc->GetRangeName()->findByUpperName(OUString("GLOBAL1"));
CPPUNIT_ASSERT_MESSAGE("range name Global1 not found", pRangeData);
double aValue;
pDoc->GetValue(1,0,0,aValue);
CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Global1 should reference Sheet1.A1", 1.0, aValue);
- pRangeData = pDoc->GetRangeName(0)->findByUpperName(OUString(RTL_CONSTASCII_USTRINGPARAM("LOCAL1")));
+ pRangeData = pDoc->GetRangeName(0)->findByUpperName(OUString("LOCAL1"));
CPPUNIT_ASSERT_MESSAGE("range name Sheet1.Local1 not found", pRangeData);
pDoc->GetValue(1,2,0,aValue);
CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Sheet1.Local1 should reference Sheet1.A3", 3.0, aValue);
- pRangeData = pDoc->GetRangeName(1)->findByUpperName(OUString(RTL_CONSTASCII_USTRINGPARAM("LOCAL2")));
+ pRangeData = pDoc->GetRangeName(1)->findByUpperName(OUString("LOCAL2"));
CPPUNIT_ASSERT_MESSAGE("range name Sheet2.Local2 not found", pRangeData);
pDoc->GetValue(1,1,1,aValue);
CPPUNIT_ASSERT_EQUAL_MESSAGE("range name Sheet2.Local2 should reference Sheet2.A2", 7.0, aValue);
@@ -323,7 +323,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(RTL_CONSTASCII_USTRINGPARAM("hard-recalc.")), aCSVFileName);
+ createCSVPath(OUString("hard-recalc."), aCSVFileName);
testFile(aCSVFileName, pDoc, 0);
xDocSh->DoClose();
@@ -339,16 +339,16 @@ void ScFiltersTest::testFunctionsODS()
OUString aCSVFileName;
//test logical functions
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("logical-functions.")), aCSVFileName);
+ createCSVPath(OUString("logical-functions."), aCSVFileName);
testFile(aCSVFileName, pDoc, 0);
//test spreadsheet functions
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("spreadsheet-functions.")), aCSVFileName);
+ createCSVPath(OUString("spreadsheet-functions."), aCSVFileName);
testFile(aCSVFileName, pDoc, 1);
//test mathematical functions
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("mathematical-functions.")), aCSVFileName);
+ createCSVPath(OUString("mathematical-functions."), aCSVFileName);
testFile(aCSVFileName, pDoc, 2, PureString);
//test information functions
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("information-functions.")), aCSVFileName);
+ createCSVPath(OUString("information-functions."), aCSVFileName);
testFile(aCSVFileName, pDoc, 3);
xDocSh->DoClose();
@@ -364,16 +364,16 @@ void ScFiltersTest::testCachedFormulaResultsODS()
OUString aCSVFileName;
//test cached formula results of logical functions
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("logical-functions.")), aCSVFileName);
+ createCSVPath(OUString("logical-functions."), aCSVFileName);
testFile(aCSVFileName, pDoc, 0);
//test cached formula results of spreadsheet functions
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("spreadsheet-functions.")), aCSVFileName);
+ createCSVPath(OUString("spreadsheet-functions."), aCSVFileName);
testFile(aCSVFileName, pDoc, 1);
//test cached formula results of mathematical functions
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("mathematical-functions.")), aCSVFileName);
+ createCSVPath(OUString("mathematical-functions."), aCSVFileName);
testFile(aCSVFileName, pDoc, 2, PureString);
//test cached formula results of information functions
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("information-functions.")), aCSVFileName);
+ createCSVPath(OUString("information-functions."), aCSVFileName);
testFile(aCSVFileName, pDoc, 3);
xDocSh->DoClose();
@@ -537,7 +537,7 @@ void testFormats_Impl(ScFiltersTest* pFiltersTest, ScDocument* pDoc, sal_Int32 n
{
//test Sheet1 with csv file
OUString aCSVFileName;
- pFiltersTest->createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("numberFormat.")), aCSVFileName);
+ pFiltersTest->createCSVPath(OUString("numberFormat."), aCSVFileName);
testFile(aCSVFileName, pDoc, 0, PureString);
//need to test the color of B3
//it's not a font color!
@@ -609,7 +609,7 @@ void testFormats_Impl(ScFiltersTest* pFiltersTest, ScDocument* pDoc, sal_Int32 n
//test Sheet3 only for ods
if ( nFormat == ODS || nFormat == XLSX )
{
- pFiltersTest->createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("conditionalFormatting.")), aCSVFileName);
+ pFiltersTest->createCSVPath(OUString("conditionalFormatting."), aCSVFileName);
testCondFile(aCSVFileName, pDoc, 2);
// test parent cell style import ( fdo#55198 )
if ( nFormat == XLSX )
@@ -692,7 +692,7 @@ void ScFiltersTest::testMatrixODS()
ScDocument* pDoc = xDocSh->GetDocument();
OUString aCSVFileName;
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("matrix.")), aCSVFileName);
+ createCSVPath(OUString("matrix."), aCSVFileName);
testFile(aCSVFileName, pDoc, 0);
xDocSh->DoClose();
@@ -707,7 +707,7 @@ void ScFiltersTest::testMatrixXLS()
ScDocument* pDoc = xDocSh->GetDocument();
OUString aCSVFileName;
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("matrix.")), aCSVFileName);
+ createCSVPath(OUString("matrix."), aCSVFileName);
testFile(aCSVFileName, pDoc, 0);
xDocSh->DoClose();
@@ -903,7 +903,7 @@ void ScFiltersTest::testBugFixesODS()
{
// fdo#40967
OUString aCSVFileName;
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("bugFix_Sheet2.")), aCSVFileName);
+ createCSVPath(OUString("bugFix_Sheet2."), aCSVFileName);
testFile(aCSVFileName, pDoc, 1);
}
@@ -976,7 +976,7 @@ void ScFiltersTest::testMergedCellsODS()
//check sheet1 content
OUString aCSVFileName1;
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("merged1.")), aCSVFileName1);
+ createCSVPath(OUString("merged1."), aCSVFileName1);
testFile(aCSVFileName1, pDoc, 0);
//check sheet1 merged cells
@@ -986,7 +986,7 @@ void ScFiltersTest::testMergedCellsODS()
//check sheet2 content
OUString aCSVFileName2;
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("merged2.")), aCSVFileName2);
+ createCSVPath(OUString("merged2."), aCSVFileName2);
testFile(aCSVFileName2, pDoc, 1);
//check sheet2 merged cells
@@ -1002,12 +1002,12 @@ void ScFiltersTest::testRepeatedColumnsODS()
//text
OUString aCSVFileName1;
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("repeatedColumns1.")), aCSVFileName1);
+ createCSVPath(OUString("repeatedColumns1."), aCSVFileName1);
testFile(aCSVFileName1, pDoc, 0);
//numbers
OUString aCSVFileName2;
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("repeatedColumns2.")), aCSVFileName2);
+ createCSVPath(OUString("repeatedColumns2."), aCSVFileName2);
testFile(aCSVFileName2, pDoc, 1);
xDocSh->DoClose();
@@ -1140,11 +1140,11 @@ void ScFiltersTest::testDataValidityODS()
//check each sheet's content
OUString aCSVFileName1;
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("dataValidity1.")), aCSVFileName1);
+ createCSVPath(OUString("dataValidity1."), aCSVFileName1);
testFile(aCSVFileName1, pDoc, 0);
OUString aCSVFileName2;
- createCSVPath(OUString(RTL_CONSTASCII_USTRINGPARAM("dataValidity2.")), aCSVFileName2);
+ createCSVPath(OUString("dataValidity2."), aCSVFileName2);
testFile(aCSVFileName2, pDoc, 1);
xDocSh->DoClose();
@@ -1251,13 +1251,13 @@ void ScFiltersTest::testPassword_Impl(const OUString& aFileNameBase)
SfxFilter* aFilter = new SfxFilter(
aFilterName,
OUString(), aFileFormats[0].nFormatType, nFormat, aFilterType, 0, OUString(),
- OUString(), OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/scalc*")) );
+ OUString(), OUString("private:factory/scalc*") );
aFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT);
ScDocShellRef xDocSh = new ScDocShell;
SfxMedium* pMedium = new SfxMedium(aFileName, STREAM_STD_READWRITE);
SfxItemSet* pSet = pMedium->GetItemSet();
- pSet->Put(SfxStringItem(SID_PASSWORD, OUString(RTL_CONSTASCII_USTRINGPARAM("test"))));
+ pSet->Put(SfxStringItem(SID_PASSWORD, OUString("test")));
pMedium->SetFilter(aFilter);
if (!xDocSh->DoLoad(pMedium))
{
@@ -1795,7 +1795,7 @@ void ScFiltersTest::testColorScaleODS()
ScDocument* pDoc = xDocSh->GetDocument();
OUStringBuffer aBuffer(getSrcRootPath());
- aBuffer.append(m_aBaseString).append(OUString(RTL_CONSTASCII_USTRINGPARAM("/reference/")));
+ aBuffer.append(m_aBaseString).append(OUString("/reference/"));
testColorScale_Impl(pDoc, aBuffer.makeStringAndClear());
xDocSh->DoClose();
@@ -1821,7 +1821,7 @@ void ScFiltersTest::testColorScaleXLSX()
ScDocument* pDoc = xDocSh->GetDocument();
OUStringBuffer aBuffer(getSrcRootPath());
- aBuffer.append(m_aBaseString).append(OUString(RTL_CONSTASCII_USTRINGPARAM("/reference/")));
+ aBuffer.append(m_aBaseString).append(OUString("/reference/"));
testColorScale_Impl(pDoc, aBuffer.makeStringAndClear());
xDocSh->DoClose();
@@ -1974,8 +1974,7 @@ void ScFiltersTest::setUp()
// This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
// which is a private symbol to us, gets called
m_xCalcComponent =
- getMultiServiceFactory()->createInstance(OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.SpreadsheetDocument")));
+ getMultiServiceFactory()->createInstance(OUString("com.sun.star.comp.Calc.SpreadsheetDocument"));
CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is());
}