diff options
Diffstat (limited to 'sc/qa/extras/scdatapilotfieldgroupobj.cxx')
-rw-r--r-- | sc/qa/extras/scdatapilotfieldgroupobj.cxx | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/sc/qa/extras/scdatapilotfieldgroupobj.cxx b/sc/qa/extras/scdatapilotfieldgroupobj.cxx index 8057725d7f4f..78282f2717b1 100644 --- a/sc/qa/extras/scdatapilotfieldgroupobj.cxx +++ b/sc/qa/extras/scdatapilotfieldgroupobj.cxx @@ -88,12 +88,12 @@ private: }; ScDataPilotFieldGroupObj::ScDataPilotFieldGroupObj() - : UnoApiTest("/sc/qa/extras/testdocuments") + : UnoApiTest(u"/sc/qa/extras/testdocuments"_ustr) , XElementAccess(cppu::UnoType<container::XNamed>::get()) , XIndexAccess(2) - , XNameAccess("aName") - , XNamed("Group1") - , XServiceInfo("ScDataPilotFieldGroupObj", "com.sun.star.sheet.DataPilotFieldGroup") + , XNameAccess(u"aName"_ustr) + , XNamed(u"Group1"_ustr) + , XServiceInfo(u"ScDataPilotFieldGroupObj"_ustr, u"com.sun.star.sheet.DataPilotFieldGroup"_ustr) { } @@ -105,7 +105,7 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupObj::init() uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), uno::UNO_SET_THROW); uno::Reference<container::XIndexAccess> xIA(xSheets, uno::UNO_QUERY_THROW); - xSheets->insertNewByName("Some Sheet", 0); + xSheets->insertNewByName(u"Some Sheet"_ustr, 0); uno::Reference<sheet::XSpreadsheet> xSheet0(xIA->getByIndex(0), uno::UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(1), uno::UNO_QUERY_THROW); @@ -127,11 +127,11 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupObj::init() } } - xSheet0->getCellByPosition(1, 1)->setFormula("aName"); - xSheet0->getCellByPosition(1, 2)->setFormula("otherName"); - xSheet0->getCellByPosition(1, 3)->setFormula("una"); - xSheet0->getCellByPosition(1, 4)->setFormula("otherName"); - xSheet0->getCellByPosition(1, 5)->setFormula("somethingelse"); + xSheet0->getCellByPosition(1, 1)->setFormula(u"aName"_ustr); + xSheet0->getCellByPosition(1, 2)->setFormula(u"otherName"_ustr); + xSheet0->getCellByPosition(1, 3)->setFormula(u"una"_ustr); + xSheet0->getCellByPosition(1, 4)->setFormula(u"otherName"_ustr); + xSheet0->getCellByPosition(1, 5)->setFormula(u"somethingelse"_ustr); xSheet0->getCellByPosition(1, 5); xSheet0->getCellByPosition(aCellAddress.Column, aCellAddress.Row + 3); @@ -145,19 +145,21 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupObj::init() uno::Reference<beans::XPropertySet> xPropertySet0(xDPD->getDataPilotFields()->getByIndex(0), uno::UNO_QUERY_THROW); - xPropertySet0->setPropertyValue("Orientation", uno::Any(sheet::DataPilotFieldOrientation_ROW)); + xPropertySet0->setPropertyValue(u"Orientation"_ustr, + uno::Any(sheet::DataPilotFieldOrientation_ROW)); uno::Reference<beans::XPropertySet> xPropertySet1(xDPD->getDataPilotFields()->getByIndex(1), uno::UNO_QUERY_THROW); - xPropertySet1->setPropertyValue("Function", uno::Any(sheet::GeneralFunction_SUM)); - xPropertySet1->setPropertyValue("Orientation", uno::Any(sheet::DataPilotFieldOrientation_DATA)); + xPropertySet1->setPropertyValue(u"Function"_ustr, uno::Any(sheet::GeneralFunction_SUM)); + xPropertySet1->setPropertyValue(u"Orientation"_ustr, + uno::Any(sheet::DataPilotFieldOrientation_DATA)); uno::Reference<beans::XPropertySet> xPropertySet2(xDPD->getDataPilotFields()->getByIndex(2), uno::UNO_QUERY_THROW); - xPropertySet2->setPropertyValue("Orientation", + xPropertySet2->setPropertyValue(u"Orientation"_ustr, uno::Any(sheet::DataPilotFieldOrientation_COLUMN)); - xDPT->insertNewByName("DataPilotTable", aCellAddress, xDPD); + xDPT->insertNewByName(u"DataPilotTable"_ustr, aCellAddress, xDPD); uno::Reference<container::XIndexAccess> xIA_DPT0(xDPTS->getDataPilotTables(), uno::UNO_QUERY_THROW); @@ -167,7 +169,7 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupObj::init() uno::Reference<sheet::XDataPilotFieldGrouping> xDPFG(xIA_RF0->getByIndex(0), uno::UNO_QUERY_THROW); - xDPFG->createNameGroup({ "aName", "otherName" }); + xDPFG->createNameGroup({ u"aName"_ustr, u"otherName"_ustr }); uno::Reference<container::XIndexAccess> xIA_DPT1(xDPTS->getDataPilotTables(), uno::UNO_QUERY_THROW); @@ -180,9 +182,9 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupObj::init() { uno::Reference<beans::XPropertySet> xPropertySet(xIA_RF1->getByIndex(i), uno::UNO_QUERY_THROW); - if (::comphelper::getBOOL(xPropertySet->getPropertyValue("IsGroupField"))) + if (::comphelper::getBOOL(xPropertySet->getPropertyValue(u"IsGroupField"_ustr))) { - CPPUNIT_ASSERT(xPropertySet->getPropertyValue("GroupInfo") >>= aDPFGI); + CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"GroupInfo"_ustr) >>= aDPFGI); } } @@ -196,7 +198,7 @@ void ScDataPilotFieldGroupObj::setUp() { UnoApiTest::setUp(); // create calc document - mxComponent = loadFromDesktop("private:factory/scalc"); + mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr); } CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotFieldGroupObj); |