sd/inc/viewopt.hxx | 2 sd/qa/filter/eppt/eppt.cxx | 34 - sd/qa/unit/HtmlExportTest.cxx | 21 sd/qa/unit/PNGExportTests.cxx | 184 +++--- sd/qa/unit/SVGExportTests.cxx | 100 +-- sd/qa/unit/SdrPdfImportTest.cxx | 12 sd/qa/unit/ShapeImportExportTest.cxx | 48 - sd/qa/unit/TextFittingTest.cxx | 2 sd/qa/unit/ThemeTest.cxx | 14 sd/qa/unit/a11y/layout.cxx | 133 ++-- sd/qa/unit/activex-controls-tests.cxx | 494 +++++++++--------- sd/qa/unit/dialogs-test.cxx | 4 sd/qa/unit/export-tests-ooxml1.cxx | 654 ++++++++++++------------ sd/qa/unit/export-tests-ooxml2.cxx | 675 ++++++++++++------------- sd/qa/unit/export-tests-ooxml3.cxx | 406 +++++++-------- sd/qa/unit/export-tests-ooxml4.cxx | 372 ++++++------- sd/qa/unit/export-tests.cxx | 658 +++++++++++++----------- sd/qa/unit/filters-test.cxx | 22 sd/qa/unit/import-tests-smartart.cxx | 370 ++++++------- sd/qa/unit/import-tests.cxx | 313 +++++------ sd/qa/unit/import-tests2.cxx | 276 +++++----- sd/qa/unit/import-tests_skia.cxx | 2 sd/qa/unit/layout-tests.cxx | 81 +-- sd/qa/unit/misc-tests.cxx | 160 +++-- sd/qa/unit/sdmodeltestbase.hxx | 10 sd/qa/unit/tiledrendering/LOKitSearchTest.cxx | 176 +++--- sd/qa/unit/tiledrendering/tiledrendering.cxx | 202 +++---- sd/qa/unit/tiledrendering2/tiledrendering2.cxx | 4 sd/qa/unit/uiimpress.cxx | 210 +++---- 29 files changed, 2874 insertions(+), 2765 deletions(-)
New commits: commit 782eda5992585a2a67f28d4453c7994f01b41ad9 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu May 30 12:38:07 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu May 30 21:03:47 2024 +0200 loplugin:ostr in sd Change-Id: Icfd8d1eb21953f44fb7bfb62188247e911734bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168252 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/inc/viewopt.hxx b/sd/inc/viewopt.hxx index 03ebd2ada659..eb9f16513624 100644 --- a/sd/inc/viewopt.hxx +++ b/sd/inc/viewopt.hxx @@ -28,7 +28,7 @@ struct SdViewOptions // The color of the document background Color mnDocBackgroundColor; // The name of the color scheme - OUString msColorSchemeName = "Default"; + OUString msColorSchemeName = u"Default"_ustr; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/qa/filter/eppt/eppt.cxx b/sd/qa/filter/eppt/eppt.cxx index b84630c971fe..198f2816b534 100644 --- a/sd/qa/filter/eppt/eppt.cxx +++ b/sd/qa/filter/eppt/eppt.cxx @@ -31,7 +31,7 @@ public: }; Test::Test() - : UnoApiXmlTest("/sd/qa/filter/eppt/data/") + : UnoApiXmlTest(u"/sd/qa/filter/eppt/data/"_ustr) { } @@ -39,7 +39,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill) { // Save the bugdoc to PPT. loadFromFile(u"custom-shape-bitmap-fill.pptx"); - saveAndReload("MS PowerPoint 97"); + saveAndReload(u"MS PowerPoint 97"_ustr); // Check if the bitmap shape was lost. uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -50,14 +50,13 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill) // - Expected: com.sun.star.drawing.GraphicObjectShape // - Actual : com.sun.star.drawing.CustomShape // i.e. the custom shape geometry was kept, but the actual bitmap was lost. - CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.GraphicObjectShape"), - xShape->getShapeType()); + CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.GraphicObjectShape"_ustr, xShape->getShapeType()); } CPPUNIT_TEST_FIXTURE(Test, testThemeExport) { // Given a document with a master slide and a theme, lt1 is set to 0x000002: - mxComponent = loadFromDesktop("private:factory/simpress"); + mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr); { uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XMasterPageTarget> xDrawPage( @@ -80,16 +79,16 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeExport) pColorSet->add(model::ThemeColorType::FollowedHyperlink, 0xcccccc); pTheme->setColorSet(pColorSet); - xMasterPage->setPropertyValue("Theme", uno::Any(model::theme::createXTheme(pTheme))); + xMasterPage->setPropertyValue(u"Theme"_ustr, uno::Any(model::theme::createXTheme(pTheme))); } // Export to PPTX and load again: - saveAndReload("Impress Office Open XML"); + saveAndReload(u"Impress Office Open XML"_ustr); // Verify that this color is not lost: - xmlDocUniquePtr pXmlDoc = parseExport("ppt/theme/theme1.xml"); + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/theme/theme1.xml"_ustr); assertXPath(pXmlDoc, "//a:clrScheme/a:lt1/a:srgbClr"_ostr, "val"_ostr, - "222222"); // expected color 22-22-22 + u"222222"_ustr); // expected color 22-22-22 // Check the theme after loading again { @@ -97,17 +96,18 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeExport) uno::Reference<drawing::XMasterPageTarget> xDrawPage( xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xMasterPage(xDrawPage->getMasterPage(), uno::UNO_QUERY); - uno::Reference<util::XTheme> xTheme(xMasterPage->getPropertyValue("Theme"), uno::UNO_QUERY); + uno::Reference<util::XTheme> xTheme(xMasterPage->getPropertyValue(u"Theme"_ustr), + uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(true, xTheme.is()); auto* pUnoTheme = dynamic_cast<UnoTheme*>(xTheme.get()); CPPUNIT_ASSERT(pUnoTheme); auto pTheme = pUnoTheme->getTheme(); - CPPUNIT_ASSERT_EQUAL(OUString("mytheme"), pTheme->GetName()); - CPPUNIT_ASSERT_EQUAL(OUString("mycolorscheme"), pTheme->getColorSet()->getName()); - CPPUNIT_ASSERT_EQUAL(OUString("Office"), pTheme->getFontScheme().getName()); - CPPUNIT_ASSERT_EQUAL(OUString(""), pTheme->getFormatScheme().getName()); + CPPUNIT_ASSERT_EQUAL(u"mytheme"_ustr, pTheme->GetName()); + CPPUNIT_ASSERT_EQUAL(u"mycolorscheme"_ustr, pTheme->getColorSet()->getName()); + CPPUNIT_ASSERT_EQUAL(u"Office"_ustr, pTheme->getFontScheme().getName()); + CPPUNIT_ASSERT_EQUAL(u""_ustr, pTheme->getFormatScheme().getName()); } } @@ -117,16 +117,16 @@ CPPUNIT_TEST_FIXTURE(Test, testLoopingFromAnimation) loadFromFile(u"video-loop.pptx"); // When exporting that to PPTX: - save("Impress Office Open XML"); + save(u"Impress Office Open XML"_ustr); // Then make sure that the "infinite" repeat count is written: - xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); // Without the fix in place, this test would have failed with: // - Expected: 1 // - Actual : 0 // - In <>, XPath '//p:cMediaNode/p:cTn' number of nodes is incorrect // i.e. the media node was lost on export, the video no longer looped. - assertXPath(pXmlDoc, "//p:cMediaNode/p:cTn"_ostr, "repeatCount"_ostr, "indefinite"); + assertXPath(pXmlDoc, "//p:cMediaNode/p:cTn"_ostr, "repeatCount"_ostr, u"indefinite"_ustr); } } diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx index 89f60e98f556..1f8ebd075e94 100644 --- a/sd/qa/unit/HtmlExportTest.cxx +++ b/sd/qa/unit/HtmlExportTest.cxx @@ -16,14 +16,14 @@ class SdHTMLFilterTest : public UnoApiXmlTest, public HtmlTestTools { public: SdHTMLFilterTest() - : UnoApiXmlTest("/sd/qa/unit/data/") + : UnoApiXmlTest(u"/sd/qa/unit/data/"_ustr) { } void testHTMLExport() { loadFromFile(u"HtmlExportTestDocument.odp"); - save("impress_html_Export"); + save(u"impress_html_Export"_ustr); htmlDocUniquePtr htmlDoc = parseHtml(maTempFile); assertXPath(htmlDoc, "/html"_ostr, 1); @@ -34,17 +34,18 @@ public: assertXPath(htmlDoc, "/html/body/ul"_ostr, 1); assertXPath(htmlDoc, "/html/body/ul/li"_ostr, 2); - assertXPath(htmlDoc, "/html/head/meta[1]"_ostr, "content"_ostr, "text/html; charset=utf-8"); - assertXPath(htmlDoc, "/html/head/meta[2]"_ostr, "name"_ostr, "generator"); - assertXPath(htmlDoc, "/html/head/meta[3]"_ostr, "name"_ostr, "created"); + assertXPath(htmlDoc, "/html/head/meta[1]"_ostr, "content"_ostr, + u"text/html; charset=utf-8"_ustr); + assertXPath(htmlDoc, "/html/head/meta[2]"_ostr, "name"_ostr, u"generator"_ustr); + assertXPath(htmlDoc, "/html/head/meta[3]"_ostr, "name"_ostr, u"created"_ustr); assertXPath(htmlDoc, "/html/head/meta[3]"_ostr, "content"_ostr, - "2014-04-09T17:05:41.987922038"); + u"2014-04-09T17:05:41.987922038"_ustr); } void testTdf154989() { loadFromFile(u"tdf154989.odg"); - save("XHTML Draw File"); + save(u"XHTML Draw File"_ustr); xmlDocUniquePtr pXmlDoc = parseXml(maTempFile); assertXPath(pXmlDoc, "/xhtml:html"_ostr, 1); @@ -57,13 +58,13 @@ public: // not sure if the order of these is stable? assertXPathContent( pXmlDoc, "/xhtml:html/xhtml:body/xhtml:div[1]/xhtml:div[2]/xhtml:div/xhtml:p"_ostr, - "before"); + u"before"_ustr); assertXPathContent( pXmlDoc, "/xhtml:html/xhtml:body/xhtml:div[1]/xhtml:div[3]/xhtml:div/xhtml:p"_ostr, - "above"); + u"above"_ustr); assertXPathContent( pXmlDoc, "/xhtml:html/xhtml:body/xhtml:div[1]/xhtml:div[4]/xhtml:div/xhtml:p"_ostr, - "below"); + u"below"_ustr); } CPPUNIT_TEST_SUITE(SdHTMLFilterTest); diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx index d99955a923ae..c2af95329ca2 100644 --- a/sd/qa/unit/PNGExportTests.cxx +++ b/sd/qa/unit/PNGExportTests.cxx @@ -25,7 +25,7 @@ class SdPNGExportTest : public UnoApiTest { public: SdPNGExportTest() - : UnoApiTest("/sd/qa/unit/data/") + : UnoApiTest(u"/sd/qa/unit/data/"_ustr) { } }; @@ -49,8 +49,8 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105998) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -110,8 +110,8 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf126319) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -176,13 +176,13 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf136632) uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter = drawing::GraphicExportFilter::create(xContext); - uno::Sequence<beans::PropertyValue> aFilterData{ comphelper::makePropertyValue("Translucent", - sal_Int32(0)) }; + uno::Sequence<beans::PropertyValue> aFilterData{ comphelper::makePropertyValue( + u"Translucent"_ustr, sal_Int32(0)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -211,14 +211,14 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157652) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)) + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -259,14 +259,14 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf156808) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)) + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -310,15 +310,15 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf158743) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)), - comphelper::makePropertyValue("Translucent", sal_Int32(1)) + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"Translucent"_ustr, sal_Int32(1)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -362,15 +362,15 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157795) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)), - comphelper::makePropertyValue("Translucent", sal_Int32(1)), + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"Translucent"_ustr, sal_Int32(1)), }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -411,15 +411,15 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105362) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)), - comphelper::makePropertyValue("Translucent", sal_Int32(1)), + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"Translucent"_ustr, sal_Int32(1)), }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -460,14 +460,14 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157636) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)) + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -511,14 +511,14 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157793) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)) + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -562,14 +562,14 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157635) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)) + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -613,14 +613,14 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113163) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)) + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -663,15 +663,15 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf147119) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)), - comphelper::makePropertyValue("Translucent", sal_Int32(1)), + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"Translucent"_ustr, sal_Int32(1)), }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -712,14 +712,14 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113197) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(100)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(100)), + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(100)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(100)), }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -763,14 +763,14 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf93124) = drawing::GraphicExportFilter::create(xContext); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(320)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(180)) + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(320)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(180)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -807,7 +807,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf93124) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf99729) { - const OUString filenames[] = { "odp/tdf99729-new.odp", "odp/tdf99729-legacy.odp" }; + const OUString filenames[] = { u"odp/tdf99729-new.odp"_ustr, u"odp/tdf99729-legacy.odp"_ustr }; int nonwhitecounts[] = { 0, 0 }; for (size_t i = 0; i < SAL_N_ELEMENTS(filenames); ++i) { @@ -821,14 +821,14 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf99729) CPPUNIT_ASSERT(xGraphicExporter.is()); uno::Sequence<beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(320)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(240)) + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(320)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(240)) }; uno::Sequence<beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -888,15 +888,15 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf155048) // and blue. #else css::uno::Sequence<css::beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(200)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(200)), - comphelper::makePropertyValue("AntiAliasing", false), + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(200)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(200)), + comphelper::makePropertyValue(u"AntiAliasing"_ustr, false), }; css::uno::Sequence<css::beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; xGraphicExporter->filter(aDescriptor); @@ -916,15 +916,15 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf155048) // 2. AA enabled { css::uno::Sequence<css::beans::PropertyValue> aFilterData{ - comphelper::makePropertyValue("PixelWidth", sal_Int32(200)), - comphelper::makePropertyValue("PixelHeight", sal_Int32(200)), - comphelper::makePropertyValue("AntiAliasing", true), + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(200)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(200)), + comphelper::makePropertyValue(u"AntiAliasing"_ustr, true), }; css::uno::Sequence<css::beans::PropertyValue> aDescriptor{ - comphelper::makePropertyValue("URL", maTempFile.GetURL()), - comphelper::makePropertyValue("FilterName", OUString("PNG")), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"URL"_ustr, maTempFile.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; xGraphicExporter->filter(aDescriptor); diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx index b53f8c1d64c4..be4b23133761 100644 --- a/sd/qa/unit/SVGExportTests.cxx +++ b/sd/qa/unit/SVGExportTests.cxx @@ -70,14 +70,14 @@ class SdSVGFilterTest : public UnoApiXmlTest { public: SdSVGFilterTest() - : UnoApiXmlTest("/sd/qa/unit/data/odp/") + : UnoApiXmlTest(u"/sd/qa/unit/data/odp/"_ustr) { } void testSVGExportTextDecorations() { loadFromFile(u"svg-export-text-decorations.odp"); - save("impress_svg_Export"); + save(u"impress_svg_Export"_ustr); xmlDocUniquePtr svgDoc = parseXml(maTempFile); CPPUNIT_ASSERT(svgDoc); @@ -85,22 +85,22 @@ public: svgDoc->name = reinterpret_cast<char *>(xmlStrdup(reinterpret_cast<xmlChar const *>(OUStringToOString(maTempFile.GetURL(), RTL_TEXTENCODING_UTF8).getStr()))); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG ), 1); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2] ), "class"_ostr, "SlideGroup"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G ), "class"_ostr, "Slide"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[1] ), "class"_ostr, "TitleText"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[1]/SVG_G/SVG_TEXT ), "class"_ostr, "SVGTextShape"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[1]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, "TextPosition"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[1]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN[1] ), "text-decoration"_ostr, "underline"); - - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT ), "class"_ostr, "SVGTextShape"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, "TextPosition"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "text-decoration"_ostr, "line-through"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2] ), "class"_ostr, u"SlideGroup"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G ), "class"_ostr, u"Slide"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[1] ), "class"_ostr, u"TitleText"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[1]/SVG_G/SVG_TEXT ), "class"_ostr, u"SVGTextShape"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[1]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, u"TextPosition"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[1]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN[1] ), "text-decoration"_ostr, u"underline"_ustr); + + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT ), "class"_ostr, u"SVGTextShape"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, u"TextPosition"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "text-decoration"_ostr, u"line-through"_ustr); } void testSVGExportJavascriptURL() { loadFromFile(u"textbox-link-javascript.odp"); - save("impress_svg_Export"); + save(u"impress_svg_Export"_ustr); xmlDocUniquePtr svgDoc = parseXml(maTempFile); CPPUNIT_ASSERT(svgDoc); @@ -115,64 +115,64 @@ public: void testSVGExportSlideCustomBackground() { loadFromFile(u"slide-custom-background.odp"); - save("impress_svg_Export"); + save(u"impress_svg_Export"_ustr); xmlDocUniquePtr svgDoc = parseXml(maTempFile); CPPUNIT_ASSERT(svgDoc); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_DEFS ), "class"_ostr, "SlideBackground"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_DEFS ), "class"_ostr, u"SlideBackground"_ustr); } void testSVGExportTextFieldsInMasterPage() { loadFromFile(u"text-fields.odp"); - save("impress_svg_Export"); + save(u"impress_svg_Export"_ustr); xmlDocUniquePtr svgDoc = parseXml(maTempFile); CPPUNIT_ASSERT(svgDoc); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2] ), "class"_ostr, "Master_Slide"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2] ), "class"_ostr, "BackgroundObjects"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2] ), "class"_ostr, u"Master_Slide"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2] ), "class"_ostr, u"BackgroundObjects"_ustr); // Current Date Field - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[4] ), "class"_ostr, "TextShape"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[4]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, "PlaceholderText Date"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[4] ), "class"_ostr, u"TextShape"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[4]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, u"PlaceholderText Date"_ustr); // Current Time Field - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[5] ), "class"_ostr, "TextShape"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[5]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, "PlaceholderText Time"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[5] ), "class"_ostr, u"TextShape"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[5]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, u"PlaceholderText Time"_ustr); // Slide Name Field - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[6] ), "class"_ostr, "TextShape"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[6]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, "PlaceholderText PageName"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[6] ), "class"_ostr, u"TextShape"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[6]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, u"PlaceholderText PageName"_ustr); // Slide Number Field - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[7] ), "class"_ostr, "TextShape"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[7]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, "PlaceholderText PageNumber"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[7] ), "class"_ostr, u"TextShape"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[7]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, u"PlaceholderText PageNumber"_ustr); } void testSVGExportEmbeddedVideo() { loadFromFile(u"slide-video-thumbnail.odp"); - save("impress_svg_Export"); + save(u"impress_svg_Export"_ustr); xmlDocUniquePtr svgDoc = parseXml(maTempFile); CPPUNIT_ASSERT(svgDoc); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG ), 1); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2] ), "class"_ostr, "SlideGroup"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1] ), "visibility"_ostr, "hidden"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1] ), "id"_ostr, "container-id1"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1] ), "class"_ostr, "Slide"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1] ), "class"_ostr, "Page"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1] ), "class"_ostr, "TitleText"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2] ), "class"_ostr, u"SlideGroup"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1] ), "visibility"_ostr, u"hidden"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1] ), "id"_ostr, u"container-id1"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1] ), "class"_ostr, u"Slide"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1] ), "class"_ostr, u"Page"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1] ), "class"_ostr, u"TitleText"_ustr); // First one has no valid video, so we just generate the stock thumbnail as an image. - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[2] ), "class"_ostr, "com.sun.star.presentation.MediaShape"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[2] ), "class"_ostr, u"com.sun.star.presentation.MediaShape"_ustr); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[2]/SVG_G[1]/SVG_IMAGE ), 1); // The second one is a valid video, with the thumbnail embedded. - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[5] ), "class"_ostr, "com.sun.star.drawing.MediaShape"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[5] ), "class"_ostr, u"com.sun.star.drawing.MediaShape"_ustr); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[5]/SVG_G[1] ), 1); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[5]/SVG_G[1]/SVG_FOREIGNOBJECT ), 1); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[5]/SVG_G[1]/SVG_FOREIGNOBJECT/SVG_BODY ), 1); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[5]/SVG_G[1]/SVG_FOREIGNOBJECT/SVG_BODY/SVG_VIDEO ), "preload"_ostr, "auto"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[5]/SVG_G[1]/SVG_FOREIGNOBJECT/SVG_BODY/SVG_VIDEO ), "preload"_ostr, u"auto"_ustr); const OUString poster = getXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[1]/SVG_G[5]/SVG_G[1]/SVG_FOREIGNOBJECT/SVG_BODY/SVG_VIDEO), "poster"_ostr); CPPUNIT_ASSERT_MESSAGE("The video poster is invalid", poster.startsWith("data:image/png;base64,")); @@ -181,12 +181,12 @@ public: void testSVGExportSlideBitmapBackground() { loadFromFile(u"slide-bitmap-background.odp"); - save("impress_svg_Export"); + save(u"impress_svg_Export"_ustr); xmlDocUniquePtr svgDoc = parseXml(maTempFile); CPPUNIT_ASSERT(svgDoc); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9] ), "class"_ostr, "BackgroundBitmaps"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9] ), "class"_ostr, u"BackgroundBitmaps"_ustr); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_IMAGE ), 1); OUString sImageId = getXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_IMAGE ), "id"_ostr); @@ -196,7 +196,7 @@ public: CPPUNIT_ASSERT_MESSAGE(OString("The exported bitmap has not a valid checksum: " + sImageId.toUtf8()).getStr(), nChecksum != 0); // single image case - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G/SVG_G/SVG_G/SVG_DEFS ), "class"_ostr, "SlideBackground"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G/SVG_G/SVG_G/SVG_DEFS ), "class"_ostr, u"SlideBackground"_ustr); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G/SVG_G/SVG_G/SVG_DEFS/SVG_G/SVG_G/SVG_USE ), 1); OUString sRef = getXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G/SVG_G/SVG_G/SVG_DEFS/SVG_G/SVG_G/SVG_USE ), "href"_ostr); CPPUNIT_ASSERT_MESSAGE("The <use> element has not a valid href attribute: starting '#' not present.", sRef.startsWith("#")); @@ -210,17 +210,17 @@ public: void testSVGExportSlideTileBitmapBackground() { loadFromFile(u"slide-tile-background.odp"); - save("impress_svg_Export"); + save(u"impress_svg_Export"_ustr); xmlDocUniquePtr svgDoc = parseXml(maTempFile); CPPUNIT_ASSERT(svgDoc); // check the bitmap - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9] ), "class"_ostr, "BackgroundBitmaps"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9] ), "class"_ostr, u"BackgroundBitmaps"_ustr); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_IMAGE ), 1); // check the pattern and background rectangle - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[10] ), "class"_ostr, "BackgroundPatterns"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[10] ), "class"_ostr, u"BackgroundPatterns"_ustr); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[10]/SVG_PATTERN ), 1); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[10]/SVG_PATTERN/SVG_USE ), 1); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[10]/SVG_G/SVG_RECT ), 1); @@ -252,7 +252,7 @@ public: CPPUNIT_ASSERT_MESSAGE(OString("The exported tiled background has not a valid id: " + sBackgroundId.toUtf8()).getStr(), isValidTiledBackgroundId(sBackgroundId)); // check <use> element that point to the tiled background - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G/SVG_G/SVG_G/SVG_DEFS ), "class"_ostr, "SlideBackground"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G/SVG_G/SVG_G/SVG_DEFS ), "class"_ostr, u"SlideBackground"_ustr); assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G/SVG_G/SVG_G/SVG_DEFS/SVG_G/SVG_USE ), 1); sRef = getXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_G[2]/SVG_G[1]/SVG_G/SVG_G/SVG_G/SVG_DEFS/SVG_G/SVG_USE ), "href"_ostr); @@ -275,20 +275,20 @@ public: Application::SetSettings(aSettings); loadFromFile(u"text-fields.odp"); - save("impress_svg_Export"); + save(u"impress_svg_Export"_ustr); xmlDocUniquePtr svgDoc = parseXml(maTempFile); CPPUNIT_ASSERT(svgDoc); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2] ), "class"_ostr, "Master_Slide"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2] ), "class"_ostr, "BackgroundObjects"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2] ), "class"_ostr, u"Master_Slide"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2] ), "class"_ostr, u"BackgroundObjects"_ustr); // Slide Name Field - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[6] ), "class"_ostr, "TextShape"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[6]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, "PlaceholderText PageName"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[6] ), "class"_ostr, u"TextShape"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[6]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, u"PlaceholderText PageName"_ustr); // Slide Number Field - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[7] ), "class"_ostr, "TextShape"); - assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[7]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, "PlaceholderText PageNumber"); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[7] ), "class"_ostr, u"TextShape"_ustr); + assertXPath(svgDoc, SAL_STRINGIFY( /SVG_SVG/SVG_DEFS[9]/SVG_G[2]/SVG_G[2]/SVG_G[7]/SVG_G/SVG_TEXT/SVG_TSPAN/SVG_TSPAN/SVG_TSPAN ), "class"_ostr, u"PlaceholderText PageNumber"_ustr); } CPPUNIT_TEST_SUITE(SdSVGFilterTest); diff --git a/sd/qa/unit/SdrPdfImportTest.cxx b/sd/qa/unit/SdrPdfImportTest.cxx index 52388678df74..b6ee1b41c3d8 100644 --- a/sd/qa/unit/SdrPdfImportTest.cxx +++ b/sd/qa/unit/SdrPdfImportTest.cxx @@ -70,7 +70,7 @@ class SdrPdfImportTest : public UnoApiTest { public: SdrPdfImportTest() - : UnoApiTest("/sd/qa/unit/data/") + : UnoApiTest(u"/sd/qa/unit/data/"_ustr) { } }; @@ -140,7 +140,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testImportSimpleText) OutlinerParaObject* pOutlinerParagraphObject = pTextObject->GetOutlinerParaObject(); const EditTextObject& aEdit = pOutlinerParagraphObject->GetTextObject(); OUString sText = aEdit.GetText(0); - CPPUNIT_ASSERT_EQUAL(OUString("This is PDF!"), sText); + CPPUNIT_ASSERT_EQUAL(u"This is PDF!"_ustr, sText); } CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport) @@ -213,10 +213,10 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport) { // save as PDF and check annotations uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export"); + aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr; uno::Sequence<beans::PropertyValue> aFilterData( comphelper::InitPropertySequence({ { "ExportBookmarks", uno::Any(true) } })); - aMediaDescriptor["FilterData"] <<= aFilterData; + aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData; xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); // Check PDF for annotations @@ -258,12 +258,12 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport) CPPUNIT_ASSERT_DOUBLES_EQUAL(90.33, xAnnotation->getPosition().X, 1E-3); CPPUNIT_ASSERT_DOUBLES_EQUAL(12.07, xAnnotation->getPosition().Y, 1E-3); - CPPUNIT_ASSERT_EQUAL(OUString("TheAuthor"), xAnnotation->getAuthor()); + CPPUNIT_ASSERT_EQUAL(u"TheAuthor"_ustr, xAnnotation->getAuthor()); CPPUNIT_ASSERT_EQUAL(OUString(), xAnnotation->getInitials()); auto xText = xAnnotation->getTextRange(); - CPPUNIT_ASSERT_EQUAL(OUString("This is the annotation text!"), xText->getString()); + CPPUNIT_ASSERT_EQUAL(u"This is the annotation text!"_ustr, xText->getString()); auto aDateTime = xAnnotation->getDateTime(); CPPUNIT_ASSERT_EQUAL(sal_Int16(2020), aDateTime.Year); diff --git a/sd/qa/unit/ShapeImportExportTest.cxx b/sd/qa/unit/ShapeImportExportTest.cxx index a59e503e4140..131b53353d7c 100644 --- a/sd/qa/unit/ShapeImportExportTest.cxx +++ b/sd/qa/unit/ShapeImportExportTest.cxx @@ -23,7 +23,7 @@ class ShapeImportExportTest : public SdModelTestBase { public: ShapeImportExportTest() - : SdModelTestBase("/sd/qa/unit/data/") + : SdModelTestBase(u"/sd/qa/unit/data/"_ustr) { } @@ -256,121 +256,121 @@ void ShapeImportExportTest::testTextDistancesOOXML_Export() { createSdImpressDoc("TextDistancesInsets3.pptx"); - save("Impress Office Open XML"); - xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); + save(u"Impress Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); //Check shape Top/Bottom - 0cm, 4cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_0_4"); + u"Text_TB_0_4"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr"_ostr, { { "tIns", "-360000" }, { "bIns", "1079640" } }); //Check shape Top/Bottom - 4cm, 0cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_4_0"); + u"Text_TB_4_0"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr"_ostr, { { "tIns", "1079640" }, { "bIns", "-360000" } }); //Check shape Top/Bottom - 0cm, 3cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_0_3"); + u"Text_TB_0_3"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:txBody/a:bodyPr"_ostr, { { "tIns", "-180000" }, { "bIns", "899640" } }); //Check shape Top/Bottom - 2cm, 1cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_2_1"); + u"Text_TB_2_1"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:txBody/a:bodyPr"_ostr, { { "tIns", "540000" }, { "bIns", "180000" } }); //Check shape Top/Bottom - 0cm, 2.5cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_0_2.5"); + u"Text_TB_0_2.5"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:txBody/a:bodyPr"_ostr, { { "tIns", "-90000" }, { "bIns", "809640" } }); //Check shape Top/Bottom - 0cm, 2cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[6]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_0_2"); + u"Text_TB_0_2"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[6]/p:txBody/a:bodyPr"_ostr, { { "tIns", "0" }, { "bIns", "720000" } }); //Check shape Top/Bottom - 0cm, 1.5cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[7]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_0_1.5"); + u"Text_TB_0_1.5"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[7]/p:txBody/a:bodyPr"_ostr, { { "tIns", "0" }, { "bIns", "540000" } }); //Check shape Top/Bottom - 3cm, 0cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[8]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_3_0"); + u"Text_TB_3_0"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[8]/p:txBody/a:bodyPr"_ostr, { { "tIns", "899640" }, { "bIns", "-180000" } }); //Check shape Top/Bottom - 2.5cm, 0cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[9]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_2.5_0"); + u"Text_TB_2.5_0"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[9]/p:txBody/a:bodyPr"_ostr, { { "tIns", "809640" }, { "bIns", "-90000" } }); //Check shape Top/Bottom - 2cm, 0cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[10]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_2_0"); + u"Text_TB_2_0"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[10]/p:txBody/a:bodyPr"_ostr, { { "tIns", "720000" }, { "bIns", "0" } }); //Check shape Top/Bottom - 1.5cm, 0cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[11]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_1.5_0"); + u"Text_TB_1.5_0"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[11]/p:txBody/a:bodyPr"_ostr, { { "tIns", "540000" }, { "bIns", "0" } }); //Check shape Top/Bottom - 1cm, 2cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[12]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_1_2"); + u"Text_TB_1_2"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[12]/p:txBody/a:bodyPr"_ostr, { { "tIns", "180000" }, { "bIns", "540000" } }); //Check shape Top/Bottom - 2cm, 1.5cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[13]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_2_1.5"); + u"Text_TB_2_1.5"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[13]/p:txBody/a:bodyPr"_ostr, { { "tIns", "450000" }, { "bIns", "270000" } }); //Check shape Top/Bottom - 1.5cm, 2cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[14]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_1.5_2"); + u"Text_TB_1.5_2"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[14]/p:txBody/a:bodyPr"_ostr, { { "tIns", "270000" }, { "bIns", "450000" } }); //Check shape Top/Bottom - 2cm, 1.75cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[15]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_2_1.75"); + u"Text_TB_2_1.75"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[15]/p:txBody/a:bodyPr"_ostr, { { "tIns", "405000" }, { "bIns", "315000" } }); //Check shape Top/Bottom - 1.75cm, 2cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[16]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_1.75_2"); + u"Text_TB_1.75_2"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[16]/p:txBody/a:bodyPr"_ostr, { { "tIns", "315000" }, { "bIns", "405000" } }); //Check shape Top/Bottom - 2cm, 2cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[17]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_2_2"); + u"Text_TB_2_2"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[17]/p:txBody/a:bodyPr"_ostr, { { "tIns", "360000" }, { "bIns", "360000" } }); //Check shape Top/Bottom - 1cm, 1cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[18]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_1_1"); + u"Text_TB_1_1"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[18]/p:txBody/a:bodyPr"_ostr, { { "tIns", "360000" }, { "bIns", "360000" } }); //Check shape Top/Bottom - 0.5cm, 0.5cm assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[19]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr, - "Text_TB_0.5_0.5"); + u"Text_TB_0.5_0.5"_ustr); assertXPathAttrs(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[19]/p:txBody/a:bodyPr"_ostr, { { "tIns", "180000" }, { "bIns", "180000" } }); } @@ -378,8 +378,8 @@ void ShapeImportExportTest::testTextDistancesOOXML_Export() void ShapeImportExportTest::testTextDistancesODP_OOXML_Export() { createSdImpressDoc("odp/tdf150966_hugeInset.odp"); - save("Impress Office Open XML"); - xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); + save(u"Impress Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); // The text ends 5cm below the top edge of the shape. diff --git a/sd/qa/unit/TextFittingTest.cxx b/sd/qa/unit/TextFittingTest.cxx index 9fe7946f2289..501c0c17d58a 100644 --- a/sd/qa/unit/TextFittingTest.cxx +++ b/sd/qa/unit/TextFittingTest.cxx @@ -28,7 +28,7 @@ class TextFittingTest : public SdModelTestBase { public: TextFittingTest() - : SdModelTestBase("/sd/qa/unit/data/") + : SdModelTestBase(u"/sd/qa/unit/data/"_ustr) { } }; diff --git a/sd/qa/unit/ThemeTest.cxx b/sd/qa/unit/ThemeTest.cxx index eec1abe5dfd7..7feb6e5588e7 100644 --- a/sd/qa/unit/ThemeTest.cxx +++ b/sd/qa/unit/ThemeTest.cxx @@ -32,7 +32,7 @@ class ThemeTest : public SdModelTestBase { public: ThemeTest() - : SdModelTestBase("/sd/qa/unit/data/") + : SdModelTestBase(u"/sd/qa/unit/data/"_ustr) { } }; @@ -48,7 +48,7 @@ Color GetShapeTextColor(const uno::Reference<text::XTextRange>& xShape) uno::Reference<beans::XPropertySet> xPortion(xPara->createEnumeration()->nextElement(), uno::UNO_QUERY); Color nColor{}; - xPortion->getPropertyValue("CharColor") >>= nColor; + xPortion->getPropertyValue(u"CharColor"_ustr) >>= nColor; return nColor; } @@ -56,7 +56,7 @@ Color GetShapeTextColor(const uno::Reference<text::XTextRange>& xShape) Color GetShapeFillColor(const uno::Reference<beans::XPropertySet>& xShape) { Color nColor{}; - xShape->getPropertyValue("FillColor") >>= nColor; + xShape->getPropertyValue(u"FillColor"_ustr) >>= nColor; return nColor; } @@ -97,7 +97,7 @@ CPPUNIT_TEST_FIXTURE(ThemeTest, testThemeChange) // The theme color of this filled shape is set by the PPTX import: { uno::Reference<util::XComplexColor> xComplexColor; - CPPUNIT_ASSERT(xShape4->getPropertyValue("FillComplexColor") >>= xComplexColor); + CPPUNIT_ASSERT(xShape4->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor); CPPUNIT_ASSERT(xComplexColor.is()); auto aComplexColor = model::color::getFromXComplexColor(xComplexColor); CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType()); @@ -109,7 +109,7 @@ CPPUNIT_TEST_FIXTURE(ThemeTest, testThemeChange) // The theme index, and effects (lum mod, lum off) are set by the PPTX import: { uno::Reference<util::XComplexColor> xComplexColor; - CPPUNIT_ASSERT(xShape5->getPropertyValue("FillComplexColor") >>= xComplexColor); + CPPUNIT_ASSERT(xShape5->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor); CPPUNIT_ASSERT(xComplexColor.is()); auto aComplexColor = model::color::getFromXComplexColor(xComplexColor); CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType()); @@ -125,10 +125,10 @@ CPPUNIT_TEST_FIXTURE(ThemeTest, testThemeChange) uno::Reference<drawing::XMasterPageTarget> xDrawPage2( xDrawPagesSupplier->getDrawPages()->getByIndex(1), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xMasterPage2(xDrawPage2->getMasterPage(), uno::UNO_QUERY); - uno::Any aTheme = xMasterPage2->getPropertyValue("Theme"); + uno::Any aTheme = xMasterPage2->getPropertyValue(u"Theme"_ustr); uno::Reference<beans::XPropertySet> xMasterPage(xDrawPage->getMasterPage(), uno::UNO_QUERY); - xMasterPage->setPropertyValue("Theme", aTheme); + xMasterPage->setPropertyValue(u"Theme"_ustr, aTheme); css::uno::Reference<css::drawing::XDrawPage> xDrawPageMaster(xMasterPage, uno::UNO_QUERY); CPPUNIT_ASSERT(xDrawPageMaster.is()); diff --git a/sd/qa/unit/a11y/layout.cxx b/sd/qa/unit/a11y/layout.cxx index 51ad0743730b..7b7f26174432 100644 --- a/sd/qa/unit/a11y/layout.cxx +++ b/sd/qa/unit/a11y/layout.cxx @@ -23,17 +23,17 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, TestImpressDefaultStructure) load(u"private:factory/simpress"_ustr); Scheduler::ProcessEventsToIdle(); - CPPUNIT_ASSERT_EQUAL(rtl::OUString("<SHAPE name=\"PageShape: Slide 1\" description=\" \"/>" - "<SHAPE name=\"PresentationTitle \" description=\" \">" - "<PARAGRAPH description=\"Paragraph: 0 Click to add Title\">" - "Click to add Title" - "</PARAGRAPH>" - "</SHAPE>" - "<SHAPE name=\"PresentationSubtitle \" description=\" \">" - "<PARAGRAPH description=\"Paragraph: 0 Click to add Text\">" - "Click to add Text" - "</PARAGRAPH>" - "</SHAPE>"), + CPPUNIT_ASSERT_EQUAL(u"<SHAPE name=\"PageShape: Slide 1\" description=\" \"/>" + "<SHAPE name=\"PresentationTitle \" description=\" \">" + "<PARAGRAPH description=\"Paragraph: 0 Click to add Title\">" + "Click to add Title" + "</PARAGRAPH>" + "</SHAPE>" + "<SHAPE name=\"PresentationSubtitle \" description=\" \">" + "<PARAGRAPH description=\"Paragraph: 0 Click to add Text\">" + "Click to add Text" + "</PARAGRAPH>" + "</SHAPE>"_ustr, collectText()); } @@ -56,10 +56,10 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, TestImpressDefaultLayout) */ CPPUNIT_ASSERT_EQUAL(sal_Int64(3), xDocumentContext->getAccessibleChildCount()); CPPUNIT_ASSERT_EQUAL( - OUString("PresentationTitle "), + u"PresentationTitle "_ustr, xDocumentContext->getAccessibleChild(1)->getAccessibleContext()->getAccessibleName()); CPPUNIT_ASSERT_EQUAL( - OUString("PresentationSubtitle "), + u"PresentationSubtitle "_ustr, xDocumentContext->getAccessibleChild(2)->getAccessibleContext()->getAccessibleName()); } @@ -88,66 +88,65 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, tdf150064) Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL( - rtl::OUString("<SHAPE name=\"PageShape: Slide 1\" description=\" \"/>" - "<SHAPE name=\"PresentationTitle \" description=\" \">" - "<PARAGRAPH description=\"Paragraph: 0 P1 title\">P1 title</PARAGRAPH>" - "</SHAPE>" - "<SHAPE name=\"PresentationSubtitle \" description=\" \">" - "<PARAGRAPH description=\"Paragraph: 0 Some text\">Some text</PARAGRAPH>" - "</SHAPE>" - "<TABLE name=\"TableShape \" description=\" \">" - "<TABLE_CELL name=\"A1\">" - "<PARAGRAPH description=\"Paragraph: 0 1\">1</PARAGRAPH>" - "</TABLE_CELL>" - "<TABLE_CELL name=\"B1\">" - "<PARAGRAPH description=\"Paragraph: 0 2\">2</PARAGRAPH>" - "</TABLE_CELL>" - "<TABLE_CELL name=\"C1\">" - "<PARAGRAPH description=\"Paragraph: 0 3\">3</PARAGRAPH>" - "</TABLE_CELL>" - "<TABLE_CELL name=\"D1\">" - "<PARAGRAPH description=\"Paragraph: 0 4\">4</PARAGRAPH>" - "</TABLE_CELL>" - "<TABLE_CELL name=\"E1\">" - "<PARAGRAPH description=\"Paragraph: 0 5\">5</PARAGRAPH>" - "</TABLE_CELL>" - "<TABLE_CELL name=\"A2\">" - "<PARAGRAPH description=\"Paragraph: 0 6\">6</PARAGRAPH>" - "</TABLE_CELL>" - "<TABLE_CELL name=\"B2\">" - "<PARAGRAPH description=\"Paragraph: 0 7\">7</PARAGRAPH>" - "</TABLE_CELL>" - "<TABLE_CELL name=\"C2\">" - "<PARAGRAPH description=\"Paragraph: 0 8\">8</PARAGRAPH>" - "</TABLE_CELL>" - "<TABLE_CELL name=\"D2\">" - "<PARAGRAPH description=\"Paragraph: 0 9\">9</PARAGRAPH>" - "</TABLE_CELL>" - "<TABLE_CELL name=\"E2\">" - "<PARAGRAPH description=\"Paragraph: 0 10\">10</PARAGRAPH>" - "</TABLE_CELL>" - "</TABLE>"), + u"<SHAPE name=\"PageShape: Slide 1\" description=\" \"/>" + "<SHAPE name=\"PresentationTitle \" description=\" \">" + "<PARAGRAPH description=\"Paragraph: 0 P1 title\">P1 title</PARAGRAPH>" + "</SHAPE>" + "<SHAPE name=\"PresentationSubtitle \" description=\" \">" + "<PARAGRAPH description=\"Paragraph: 0 Some text\">Some text</PARAGRAPH>" + "</SHAPE>" + "<TABLE name=\"TableShape \" description=\" \">" + "<TABLE_CELL name=\"A1\">" + "<PARAGRAPH description=\"Paragraph: 0 1\">1</PARAGRAPH>" + "</TABLE_CELL>" + "<TABLE_CELL name=\"B1\">" + "<PARAGRAPH description=\"Paragraph: 0 2\">2</PARAGRAPH>" + "</TABLE_CELL>" + "<TABLE_CELL name=\"C1\">" + "<PARAGRAPH description=\"Paragraph: 0 3\">3</PARAGRAPH>" + "</TABLE_CELL>" + "<TABLE_CELL name=\"D1\">" + "<PARAGRAPH description=\"Paragraph: 0 4\">4</PARAGRAPH>" + "</TABLE_CELL>" + "<TABLE_CELL name=\"E1\">" + "<PARAGRAPH description=\"Paragraph: 0 5\">5</PARAGRAPH>" + "</TABLE_CELL>" + "<TABLE_CELL name=\"A2\">" + "<PARAGRAPH description=\"Paragraph: 0 6\">6</PARAGRAPH>" + "</TABLE_CELL>" + "<TABLE_CELL name=\"B2\">" + "<PARAGRAPH description=\"Paragraph: 0 7\">7</PARAGRAPH>" + "</TABLE_CELL>" + "<TABLE_CELL name=\"C2\">" + "<PARAGRAPH description=\"Paragraph: 0 8\">8</PARAGRAPH>" + "</TABLE_CELL>" + "<TABLE_CELL name=\"D2\">" + "<PARAGRAPH description=\"Paragraph: 0 9\">9</PARAGRAPH>" + "</TABLE_CELL>" + "<TABLE_CELL name=\"E2\">" + "<PARAGRAPH description=\"Paragraph: 0 10\">10</PARAGRAPH>" + "</TABLE_CELL>" + "</TABLE>"_ustr, collectText()); CPPUNIT_ASSERT(xDrawPages->getByIndex(1) >>= xDrawPage); xDrawView->setCurrentPage(xDrawPage); Scheduler::ProcessEventsToIdle(); - CPPUNIT_ASSERT_EQUAL( - rtl::OUString("<SHAPE name=\"PageShape: Slide 2\" description=\" \"/>" - "<SHAPE name=\"PresentationTitle \" description=\" \">" - "<PARAGRAPH description=\"Paragraph: 0 P2 title\">P2 title</PARAGRAPH>" - "</SHAPE>" - "<SHAPE name=\"PresentationOutliner \" description=\" \">" - "<PARAGRAPH description=\"Paragraph: 0 1\">1</PARAGRAPH>" - "</SHAPE>" - "<SHAPE name=\"PresentationOutliner \" description=\" \">" - "<PARAGRAPH description=\"Paragraph: 0 2\">2</PARAGRAPH>" - "</SHAPE>" - "<SHAPE name=\"PresentationOutliner \" description=\" \">" - "<PARAGRAPH description=\"Paragraph: 0 3\">3</PARAGRAPH>" - "</SHAPE>"), - collectText()); + CPPUNIT_ASSERT_EQUAL(u"<SHAPE name=\"PageShape: Slide 2\" description=\" \"/>" + "<SHAPE name=\"PresentationTitle \" description=\" \">" + "<PARAGRAPH description=\"Paragraph: 0 P2 title\">P2 title</PARAGRAPH>" + "</SHAPE>" + "<SHAPE name=\"PresentationOutliner \" description=\" \">" + "<PARAGRAPH description=\"Paragraph: 0 1\">1</PARAGRAPH>" + "</SHAPE>" + "<SHAPE name=\"PresentationOutliner \" description=\" \">" + "<PARAGRAPH description=\"Paragraph: 0 2\">2</PARAGRAPH>" + "</SHAPE>" + "<SHAPE name=\"PresentationOutliner \" description=\" \">" + "<PARAGRAPH description=\"Paragraph: 0 3\">3</PARAGRAPH>" + "</SHAPE>"_ustr, + collectText()); } } diff --git a/sd/qa/unit/activex-controls-tests.cxx b/sd/qa/unit/activex-controls-tests.cxx index 0fff05795482..c2439b876e24 100644 --- a/sd/qa/unit/activex-controls-tests.cxx +++ b/sd/qa/unit/activex-controls-tests.cxx @@ -29,7 +29,7 @@ class SdActiveXControlsTest: public SdModelTestBase { public: SdActiveXControlsTest() - : SdModelTestBase("/sd/qa/unit/data/") + : SdModelTestBase(u"/sd/qa/unit/data/"_ustr) { } @@ -107,7 +107,7 @@ void SdActiveXControlsTest::testBackgroundColor() uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); Color nColor; - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; OString sMessage = "The wrong control's index is: " + OString::number(i); CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), vBackgroundColors[i], nColor); } @@ -122,73 +122,73 @@ void SdActiveXControlsTest::testLabelProperties() uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); OUString sLabel; - xPropertySet->getPropertyValue("Label") >>= sLabel; - CPPUNIT_ASSERT_EQUAL(OUString("Label1"), sLabel); + xPropertySet->getPropertyValue(u"Label"_ustr) >>= sLabel; + CPPUNIT_ASSERT_EQUAL(u"Label1"_ustr, sLabel); bool bEnabled; - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(true, bEnabled); bool bMultiLine; - xPropertySet->getPropertyValue("MultiLine") >>= bMultiLine; + xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine; CPPUNIT_ASSERT_EQUAL(true, bMultiLine); Color nColor; - xPropertySet->getPropertyValue("TextColor") >>= nColor; + xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_BLACK, nColor); - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_WHITE, nColor); sal_Int16 nBorderStyle; - xPropertySet->getPropertyValue("Border") >>= nBorderStyle; + xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle; CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nBorderStyle); sal_Int16 nAlign; - xPropertySet->getPropertyValue("Align") >>= nAlign; + xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign; CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::LEFT), nAlign); style::VerticalAlignment eAlign; - xPropertySet->getPropertyValue("VerticalAlign") >>= eAlign; + xPropertySet->getPropertyValue(u"VerticalAlign"_ustr) >>= eAlign; CPPUNIT_ASSERT_EQUAL(style::VerticalAlignment_TOP, eAlign); // Second control has custom properties xControlShape.set(getShapeFromPage(1, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - xPropertySet->getPropertyValue("Label") >>= sLabel; - CPPUNIT_ASSERT_EQUAL(OUString("Custom Label"), sLabel); + xPropertySet->getPropertyValue(u"Label"_ustr) >>= sLabel; + CPPUNIT_ASSERT_EQUAL(u"Custom Label"_ustr, sLabel); - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(false, bEnabled); - xPropertySet->getPropertyValue("MultiLine") >>= bMultiLine; + xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine; CPPUNIT_ASSERT_EQUAL(false, bMultiLine); - xPropertySet->getPropertyValue("TextColor") >>= nColor; + xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(Color(0xE0E0E0), nColor); - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, nColor); - xPropertySet->getPropertyValue("Border") >>= nBorderStyle; + xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle; CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nBorderStyle); Color nBorderColor; - xPropertySet->getPropertyValue("BorderColor") >>= nBorderColor; + xPropertySet->getPropertyValue(u"BorderColor"_ustr) >>= nBorderColor; CPPUNIT_ASSERT_EQUAL(COL_LIGHTGREEN, nBorderColor); - xPropertySet->getPropertyValue("Align") >>= nAlign; + xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign; CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::CENTER), nAlign); - xPropertySet->getPropertyValue("VerticalAlign") >>= eAlign; + xPropertySet->getPropertyValue(u"VerticalAlign"_ustr) >>= eAlign; CPPUNIT_ASSERT_EQUAL(style::VerticalAlignment_TOP, eAlign); // Third control has transparent background xControlShape.set(getShapeFromPage(2, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue("BackgroundColor") >>= nColor); + CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor); } void SdActiveXControlsTest::testTextBoxProperties() @@ -200,103 +200,103 @@ void SdActiveXControlsTest::testTextBoxProperties() uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); OUString sText; - xPropertySet->getPropertyValue("Text") >>= sText; + xPropertySet->getPropertyValue(u"Text"_ustr) >>= sText; CPPUNIT_ASSERT_EQUAL(OUString(), sText); bool bEnabled; - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(true, bEnabled); bool bMultiLine; - xPropertySet->getPropertyValue("MultiLine") >>= bMultiLine; + xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine; CPPUNIT_ASSERT_EQUAL(false, bMultiLine); Color nColor; - xPropertySet->getPropertyValue("TextColor") >>= nColor; + xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_BLACK, nColor); - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_WHITE, nColor); sal_Int16 nBorderStyle; - xPropertySet->getPropertyValue("Border") >>= nBorderStyle; + xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle; CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nBorderStyle); sal_Int16 nAlign; - xPropertySet->getPropertyValue("Align") >>= nAlign; + xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign; CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::LEFT), nAlign); style::VerticalAlignment eAlign; - CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue("VerticalAlign") >>= eAlign); + CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue(u"VerticalAlign"_ustr) >>= eAlign); bool bHideSelection; - xPropertySet->getPropertyValue("HideInactiveSelection") >>= bHideSelection; + xPropertySet->getPropertyValue(u"HideInactiveSelection"_ustr) >>= bHideSelection; CPPUNIT_ASSERT_EQUAL(true, bHideSelection); sal_Int16 nMaxLength; - xPropertySet->getPropertyValue("MaxTextLen") >>= nMaxLength; + xPropertySet->getPropertyValue(u"MaxTextLen"_ustr) >>= nMaxLength; CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nMaxLength); sal_Int16 nEchoChar; - xPropertySet->getPropertyValue("EchoChar") >>= nEchoChar; + xPropertySet->getPropertyValue(u"EchoChar"_ustr) >>= nEchoChar; CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nEchoChar); bool bHScroll; - xPropertySet->getPropertyValue("HScroll") >>= bHScroll; + xPropertySet->getPropertyValue(u"HScroll"_ustr) >>= bHScroll; CPPUNIT_ASSERT_EQUAL(false, bHScroll); bool bVScroll; - xPropertySet->getPropertyValue("VScroll") >>= bVScroll; + xPropertySet->getPropertyValue(u"VScroll"_ustr) >>= bVScroll; CPPUNIT_ASSERT_EQUAL(false, bVScroll); bool bReadOnly; - xPropertySet->getPropertyValue("ReadOnly") >>= bReadOnly; + xPropertySet->getPropertyValue(u"ReadOnly"_ustr) >>= bReadOnly; CPPUNIT_ASSERT_EQUAL(false, bReadOnly); // Second control has custom properties xControlShape.set(getShapeFromPage(1, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - xPropertySet->getPropertyValue("Text") >>= sText; - CPPUNIT_ASSERT_EQUAL(OUString("Some Text"), sText); + xPropertySet->getPropertyValue(u"Text"_ustr) >>= sText; + CPPUNIT_ASSERT_EQUAL(u"Some Text"_ustr, sText); - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(false, bEnabled); // These textfields are not multilines in the pptx testfile - xPropertySet->getPropertyValue("MultiLine") >>= bMultiLine; + xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine; CPPUNIT_ASSERT_EQUAL(false, bMultiLine); - xPropertySet->getPropertyValue("TextColor") >>= nColor; + xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(Color(0x404040), nColor); - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(Color(0x00C000), nColor); - xPropertySet->getPropertyValue("Border") >>= nBorderStyle; + xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle; CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nBorderStyle); - xPropertySet->getPropertyValue("Align") >>= nAlign; + xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign; CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::CENTER), nAlign); - CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue("VerticalAlign") >>= eAlign); + CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue(u"VerticalAlign"_ustr) >>= eAlign); - xPropertySet->getPropertyValue("HideInactiveSelection") >>= bHideSelection; + xPropertySet->getPropertyValue(u"HideInactiveSelection"_ustr) >>= bHideSelection; CPPUNIT_ASSERT_EQUAL(false, bHideSelection); - xPropertySet->getPropertyValue("MaxTextLen") >>= nMaxLength; + xPropertySet->getPropertyValue(u"MaxTextLen"_ustr) >>= nMaxLength; CPPUNIT_ASSERT_EQUAL(sal_Int16(50), nMaxLength); - xPropertySet->getPropertyValue("EchoChar") >>= nEchoChar; + xPropertySet->getPropertyValue(u"EchoChar"_ustr) >>= nEchoChar; CPPUNIT_ASSERT_EQUAL(sal_Int16('x'), nEchoChar); - xPropertySet->getPropertyValue("HScroll") >>= bHScroll; + xPropertySet->getPropertyValue(u"HScroll"_ustr) >>= bHScroll; CPPUNIT_ASSERT_EQUAL(true, bHScroll); - xPropertySet->getPropertyValue("VScroll") >>= bVScroll; + xPropertySet->getPropertyValue(u"VScroll"_ustr) >>= bVScroll; CPPUNIT_ASSERT_EQUAL(false, bVScroll); - xPropertySet->getPropertyValue("ReadOnly") >>= bReadOnly; + xPropertySet->getPropertyValue(u"ReadOnly"_ustr) >>= bReadOnly; CPPUNIT_ASSERT_EQUAL(true, bReadOnly); // Third shape has some other custom properties @@ -304,25 +304,25 @@ void SdActiveXControlsTest::testTextBoxProperties() xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); // Transparent background - CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue("BackgroundColor") >>= nColor); + CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor); - xPropertySet->getPropertyValue("Align") >>= nAlign; + xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign; CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::RIGHT), nAlign); - xPropertySet->getPropertyValue("HScroll") >>= bHScroll; + xPropertySet->getPropertyValue(u"HScroll"_ustr) >>= bHScroll; CPPUNIT_ASSERT_EQUAL(false, bHScroll); - xPropertySet->getPropertyValue("VScroll") >>= bVScroll; + xPropertySet->getPropertyValue(u"VScroll"_ustr) >>= bVScroll; CPPUNIT_ASSERT_EQUAL(true, bVScroll); // Fourth shape has both scroll bar xControlShape.set(getShapeFromPage(3, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - xPropertySet->getPropertyValue("HScroll") >>= bHScroll; + xPropertySet->getPropertyValue(u"HScroll"_ustr) >>= bHScroll; CPPUNIT_ASSERT_EQUAL(true, bHScroll); - xPropertySet->getPropertyValue("VScroll") >>= bVScroll; + xPropertySet->getPropertyValue(u"VScroll"_ustr) >>= bVScroll; CPPUNIT_ASSERT_EQUAL(true, bVScroll); } @@ -335,84 +335,84 @@ void SdActiveXControlsTest::testSpinButtonProperties() uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); bool bEnabled; - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(true, bEnabled); Color nColor; - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(Color(0xECE9D8), nColor); sal_Int32 nMax; - xPropertySet->getPropertyValue("SpinValueMax") >>= nMax; + xPropertySet->getPropertyValue(u"SpinValueMax"_ustr) >>= nMax; CPPUNIT_ASSERT_EQUAL(sal_Int32(100), nMax); sal_Int32 nMin; - xPropertySet->getPropertyValue("SpinValueMin") >>= nMin; + xPropertySet->getPropertyValue(u"SpinValueMin"_ustr) >>= nMin; CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nMin); sal_Int32 nIncrement; - xPropertySet->getPropertyValue("SpinIncrement") >>= nIncrement; + xPropertySet->getPropertyValue(u"SpinIncrement"_ustr) >>= nIncrement; CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nIncrement); bool bRepeat; - xPropertySet->getPropertyValue("Repeat") >>= bRepeat; + xPropertySet->getPropertyValue(u"Repeat"_ustr) >>= bRepeat; CPPUNIT_ASSERT_EQUAL(true, bRepeat); sal_Int32 nDelay; - xPropertySet->getPropertyValue("RepeatDelay") >>= nDelay; + xPropertySet->getPropertyValue(u"RepeatDelay"_ustr) >>= nDelay; CPPUNIT_ASSERT_EQUAL(sal_Int32(50), nDelay); Color nArrowColor; - xPropertySet->getPropertyValue("SymbolColor") >>= nArrowColor; + xPropertySet->getPropertyValue(u"SymbolColor"_ustr) >>= nArrowColor; CPPUNIT_ASSERT_EQUAL(COL_BLACK, nArrowColor); sal_Int32 nOrientation; - xPropertySet->getPropertyValue("Orientation") >>= nOrientation; + xPropertySet->getPropertyValue(u"Orientation"_ustr) >>= nOrientation; CPPUNIT_ASSERT_EQUAL(sal_Int32(awt::ScrollBarOrientation::HORIZONTAL), nOrientation); sal_Int32 nSpinValue; - xPropertySet->getPropertyValue("SpinValue") >>= nSpinValue; + xPropertySet->getPropertyValue(u"SpinValue"_ustr) >>= nSpinValue; CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nSpinValue); // Second control has custom properties xControlShape.set(getShapeFromPage(1, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(false, bEnabled); - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_YELLOW, nColor); - xPropertySet->getPropertyValue("SpinValueMax") >>= nMax; + xPropertySet->getPropertyValue(u"SpinValueMax"_ustr) >>= nMax; CPPUNIT_ASSERT_EQUAL(sal_Int32(320), nMax); - xPropertySet->getPropertyValue("SpinValueMin") >>= nMin; + xPropertySet->getPropertyValue(u"SpinValueMin"_ustr) >>= nMin; CPPUNIT_ASSERT_EQUAL(sal_Int32(123), nMin); - xPropertySet->getPropertyValue("SpinIncrement") >>= nIncrement; + xPropertySet->getPropertyValue(u"SpinIncrement"_ustr) >>= nIncrement; CPPUNIT_ASSERT_EQUAL(sal_Int32(5), nIncrement); - xPropertySet->getPropertyValue("Repeat") >>= bRepeat; + xPropertySet->getPropertyValue(u"Repeat"_ustr) >>= bRepeat; CPPUNIT_ASSERT_EQUAL(true, bRepeat); - xPropertySet->getPropertyValue("RepeatDelay") >>= nDelay; + xPropertySet->getPropertyValue(u"RepeatDelay"_ustr) >>= nDelay; CPPUNIT_ASSERT_EQUAL(sal_Int32(123), nDelay); - xPropertySet->getPropertyValue("SymbolColor") >>= nArrowColor; + xPropertySet->getPropertyValue(u"SymbolColor"_ustr) >>= nArrowColor; CPPUNIT_ASSERT_EQUAL(COL_LIGHTGREEN, nArrowColor); - xPropertySet->getPropertyValue("Orientation") >>= nOrientation; + xPropertySet->getPropertyValue(u"Orientation"_ustr) >>= nOrientation; CPPUNIT_ASSERT_EQUAL(sal_Int32(awt::ScrollBarOrientation::VERTICAL), nOrientation); - xPropertySet->getPropertyValue("SpinValue") >>= nSpinValue; + xPropertySet->getPropertyValue(u"SpinValue"_ustr) >>= nSpinValue; CPPUNIT_ASSERT_EQUAL(sal_Int32(123), nSpinValue); // Third control has horizontal orientation xControlShape.set(getShapeFromPage(2, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - xPropertySet->getPropertyValue("Orientation") >>= nOrientation; + xPropertySet->getPropertyValue(u"Orientation"_ustr) >>= nOrientation; CPPUNIT_ASSERT_EQUAL(sal_Int32(awt::ScrollBarOrientation::HORIZONTAL), nOrientation); } @@ -425,55 +425,55 @@ void SdActiveXControlsTest::testCommandButtonProperties() uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); OUString sLabel; - xPropertySet->getPropertyValue("Label") >>= sLabel; - CPPUNIT_ASSERT_EQUAL(OUString("CommandButton1"), sLabel); + xPropertySet->getPropertyValue(u"Label"_ustr) >>= sLabel; + CPPUNIT_ASSERT_EQUAL(u"CommandButton1"_ustr, sLabel); bool bEnabled; - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(true, bEnabled); bool bMultiLine; - xPropertySet->getPropertyValue("MultiLine") >>= bMultiLine; + xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine; CPPUNIT_ASSERT_EQUAL(false, bMultiLine); Color nColor; - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(Color(0xECE9D8), nColor); - xPropertySet->getPropertyValue("TextColor") >>= nColor; + xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_BLACK, nColor); bool bFocusOnClick; - xPropertySet->getPropertyValue("FocusOnClick") >>= bFocusOnClick; + xPropertySet->getPropertyValue(u"FocusOnClick"_ustr) >>= bFocusOnClick; CPPUNIT_ASSERT_EQUAL(true, bFocusOnClick); bool bRepeat; - xPropertySet->getPropertyValue("Repeat") >>= bRepeat; + xPropertySet->getPropertyValue(u"Repeat"_ustr) >>= bRepeat; CPPUNIT_ASSERT_EQUAL(false, bRepeat); // Second control has custom properties xControlShape.set(getShapeFromPage(1, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - xPropertySet->getPropertyValue("Label") >>= sLabel; - CPPUNIT_ASSERT_EQUAL(OUString("Custom Caption"), sLabel); + xPropertySet->getPropertyValue(u"Label"_ustr) >>= sLabel; + CPPUNIT_ASSERT_EQUAL(u"Custom Caption"_ustr, sLabel); - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(false, bEnabled); - xPropertySet->getPropertyValue("MultiLine") >>= bMultiLine; + xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine; CPPUNIT_ASSERT_EQUAL(true, bMultiLine); - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, nColor); - xPropertySet->getPropertyValue("TextColor") >>= nColor; + xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(Color(0xFFFF80), nColor); - xPropertySet->getPropertyValue("FocusOnClick") >>= bFocusOnClick; + xPropertySet->getPropertyValue(u"FocusOnClick"_ustr) >>= bFocusOnClick; CPPUNIT_ASSERT_EQUAL(false, bFocusOnClick); - xPropertySet->getPropertyValue("Repeat") >>= bRepeat; + xPropertySet->getPropertyValue(u"Repeat"_ustr) >>= bRepeat; CPPUNIT_ASSERT_EQUAL(false, bRepeat); // Third shape has some other custom properties @@ -481,7 +481,7 @@ void SdActiveXControlsTest::testCommandButtonProperties() xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); // Transparent background - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_WHITE, nColor); } @@ -494,100 +494,100 @@ void SdActiveXControlsTest::testScrollBarProperties() uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); bool bEnabled; - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(true, bEnabled); Color nColor; - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(Color(0xECE9D8), nColor); - xPropertySet->getPropertyValue("SymbolColor") >>= nColor; + xPropertySet->getPropertyValue(u"SymbolColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_BLACK, nColor); sal_Int32 nDelay; - xPropertySet->getPropertyValue("RepeatDelay") >>= nDelay; + xPropertySet->getPropertyValue(u"RepeatDelay"_ustr) >>= nDelay; CPPUNIT_ASSERT_EQUAL(sal_Int32(50), nDelay); sal_Int16 nBorderStyle; - xPropertySet->getPropertyValue("Border") >>= nBorderStyle; + xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle; CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nBorderStyle); sal_Int32 nVisibleSize; - xPropertySet->getPropertyValue("VisibleSize") >>= nVisibleSize; + xPropertySet->getPropertyValue(u"VisibleSize"_ustr) >>= nVisibleSize; CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nVisibleSize); sal_Int32 nScrollValueMin; - xPropertySet->getPropertyValue("ScrollValueMin") >>= nScrollValueMin; + xPropertySet->getPropertyValue(u"ScrollValueMin"_ustr) >>= nScrollValueMin; CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nScrollValueMin); sal_Int32 nScrollValueMax; - xPropertySet->getPropertyValue("ScrollValueMax") >>= nScrollValueMax; + xPropertySet->getPropertyValue(u"ScrollValueMax"_ustr) >>= nScrollValueMax; CPPUNIT_ASSERT_EQUAL(sal_Int32(32767), nScrollValueMax); sal_Int32 nScrollValue; - xPropertySet->getPropertyValue("DefaultScrollValue") >>= nScrollValue; + xPropertySet->getPropertyValue(u"DefaultScrollValue"_ustr) >>= nScrollValue; CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nScrollValue); sal_Int32 nLineIncrement; - xPropertySet->getPropertyValue("LineIncrement") >>= nLineIncrement; + xPropertySet->getPropertyValue(u"LineIncrement"_ustr) >>= nLineIncrement; CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nLineIncrement); sal_Int32 nBlockIncrement; - xPropertySet->getPropertyValue("BlockIncrement") >>= nBlockIncrement; + xPropertySet->getPropertyValue(u"BlockIncrement"_ustr) >>= nBlockIncrement; CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nBlockIncrement); sal_Int32 nOrientation; - xPropertySet->getPropertyValue("Orientation") >>= nOrientation; + xPropertySet->getPropertyValue(u"Orientation"_ustr) >>= nOrientation; CPPUNIT_ASSERT_EQUAL(sal_Int32(awt::ScrollBarOrientation::VERTICAL), nOrientation); // Second control has custom properties xControlShape.set(getShapeFromPage(1, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(false, bEnabled); - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_LIGHTCYAN, nColor); - xPropertySet->getPropertyValue("SymbolColor") >>= nColor; + xPropertySet->getPropertyValue(u"SymbolColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nColor); - xPropertySet->getPropertyValue("RepeatDelay") >>= nDelay; + xPropertySet->getPropertyValue(u"RepeatDelay"_ustr) >>= nDelay; CPPUNIT_ASSERT_EQUAL(sal_Int32(230), nDelay); - xPropertySet->getPropertyValue("Border") >>= nBorderStyle; + xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle; CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nBorderStyle); - xPropertySet->getPropertyValue("VisibleSize") >>= nVisibleSize; + xPropertySet->getPropertyValue(u"VisibleSize"_ustr) >>= nVisibleSize; CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nVisibleSize); - xPropertySet->getPropertyValue("ScrollValueMin") >>= nScrollValueMin; + xPropertySet->getPropertyValue(u"ScrollValueMin"_ustr) >>= nScrollValueMin; CPPUNIT_ASSERT_EQUAL(sal_Int32(123), nScrollValueMin); - xPropertySet->getPropertyValue("ScrollValueMax") >>= nScrollValueMax; + xPropertySet->getPropertyValue(u"ScrollValueMax"_ustr) >>= nScrollValueMax; CPPUNIT_ASSERT_EQUAL(sal_Int32(1234567), nScrollValueMax); - xPropertySet->getPropertyValue("DefaultScrollValue") >>= nScrollValue; + xPropertySet->getPropertyValue(u"DefaultScrollValue"_ustr) >>= nScrollValue; CPPUNIT_ASSERT_EQUAL(sal_Int32(125), nScrollValue); - xPropertySet->getPropertyValue("LineIncrement") >>= nLineIncrement; + xPropertySet->getPropertyValue(u"LineIncrement"_ustr) >>= nLineIncrement; CPPUNIT_ASSERT_EQUAL(sal_Int32(2), nLineIncrement); - xPropertySet->getPropertyValue("BlockIncrement") >>= nBlockIncrement; + xPropertySet->getPropertyValue(u"BlockIncrement"_ustr) >>= nBlockIncrement; CPPUNIT_ASSERT_EQUAL(sal_Int32(4), nBlockIncrement); - xPropertySet->getPropertyValue("Orientation") >>= nOrientation; + xPropertySet->getPropertyValue(u"Orientation"_ustr) >>= nOrientation; CPPUNIT_ASSERT_EQUAL(sal_Int32(awt::ScrollBarOrientation::VERTICAL), nOrientation); // Third shape has some other custom properties xControlShape.set(getShapeFromPage(2, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - xPropertySet->getPropertyValue("Orientation") >>= nOrientation; + xPropertySet->getPropertyValue(u"Orientation"_ustr) >>= nOrientation; CPPUNIT_ASSERT_EQUAL(sal_Int32(awt::ScrollBarOrientation::HORIZONTAL), nOrientation); - xPropertySet->getPropertyValue("VisibleSize") >>= nVisibleSize; + xPropertySet->getPropertyValue(u"VisibleSize"_ustr) >>= nVisibleSize; CPPUNIT_ASSERT_EQUAL(sal_Int32(3), nVisibleSize); } @@ -600,86 +600,86 @@ void SdActiveXControlsTest::testCheckBoxProperties() uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); OUString sLabel; - xPropertySet->getPropertyValue("Label") >>= sLabel; - CPPUNIT_ASSERT_EQUAL(OUString("CheckBox1"), sLabel); + xPropertySet->getPropertyValue(u"Label"_ustr) >>= sLabel; + CPPUNIT_ASSERT_EQUAL(u"CheckBox1"_ustr, sLabel); bool bEnabled; - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(true, bEnabled); Color nColor; - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; + xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_WHITE, nColor); - xPropertySet->getPropertyValue("TextColor") >>= nColor; + xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor; CPPUNIT_ASSERT_EQUAL(COL_BLACK, nColor); bool bMultiLine; - xPropertySet->getPropertyValue("MultiLine") >>= bMultiLine; + xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine; CPPUNIT_ASSERT_EQUAL(true, bMultiLine); sal_Int16 nVisualEffect; - xPropertySet->getPropertyValue("VisualEffect") >>= nVisualEffect; + xPropertySet->getPropertyValue(u"VisualEffect"_ustr) >>= nVisualEffect; CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::VisualEffect::LOOK3D), nVisualEffect); bool bTriState; - xPropertySet->getPropertyValue("TriState") >>= bTriState; + xPropertySet->getPropertyValue(u"TriState"_ustr) >>= bTriState; CPPUNIT_ASSERT_EQUAL(false, bTriState); sal_Int16 nState; - xPropertySet->getPropertyValue("State") >>= nState; + xPropertySet->getPropertyValue(u"State"_ustr) >>= nState; CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nState); sal_Int16 nAlign; - xPropertySet->getPropertyValue("Align") >>= nAlign; + xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign; CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::LEFT), nAlign); // Second control has custom properties xControlShape.set(getShapeFromPage(1, 0), uno::UNO_QUERY_THROW); xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); - xPropertySet->getPropertyValue("Label") >>= sLabel; - CPPUNIT_ASSERT_EQUAL(OUString("Custom Caption"), sLabel); + xPropertySet->getPropertyValue(u"Label"_ustr) >>= sLabel; + CPPUNIT_ASSERT_EQUAL(u"Custom Caption"_ustr, sLabel); - xPropertySet->getPropertyValue("Enabled") >>= bEnabled; + xPropertySet->getPropertyValue(u"Enabled"_ustr) >>= bEnabled; CPPUNIT_ASSERT_EQUAL(false, bEnabled); - xPropertySet->getPropertyValue("BackgroundColor") >>= nColor; -e ... etc. - the rest is truncated