/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #pragma once #include #include #include #include #include #include #include #include namespace com::sun::star { namespace beans { class XPropertiesChangeListener; class XPropertyChangeListener; } namespace container { class XContainerListener; } namespace lang { class XEventListener; } namespace util { class XChangesListener; } } namespace configmgr { class Broadcaster { public: Broadcaster() {} void addDisposeNotification( css::uno::Reference< css::lang::XEventListener > const & listener, css::lang::EventObject const & event); void addContainerElementInsertedNotification( css::uno::Reference< css::container::XContainerListener > const & listener, css::container::ContainerEvent const & event); void addContainerElementRemovedNotification( css::uno::Reference< css::container::XContainerListener > const & listener, css::container::ContainerEvent const & event); void addContainerElementReplacedNotification( css::uno::Reference< css::container::XContainerListener > const & listener, css::container::ContainerEvent const & event); void addPropertyChangeNotification( css::uno::Reference< css::beans::XPropertyChangeListener > const & listener, css::beans::PropertyChangeEvent const & event); void addPropertiesChangeNotification( css::uno::Reference< css::beans::XPropertiesChangeListener > const & listener, css::uno::Sequence< css::beans::PropertyChangeEvent > const & event); void addChangesNotification( css::uno::Reference< css::util::XChangesListener > const & listener, css::util::ChangesEvent const & event, bool bRootListener); void send(); private: Broadcaster(const Broadcaster&) = delete; Broadcaster& operator=(const Broadcaster&) = delete; struct DisposeNotification { css::uno::Reference< css::lang::XEventListener > listener; css::lang::EventObject event; DisposeNotification( css::uno::Reference< css::lang::XEventListener > const & theListener, css::lang::EventObject theEvent); }; struct ContainerNotification { css::uno::Reference< css::container::XContainerListener > listener; css::container::ContainerEvent event; ContainerNotification( css::uno::Reference< css::container::XContainerListener > const & theListener, css::container::ContainerEvent theEvent); }; struct PropertyChangeNotification { css::uno::Reference< css::beans::XPropertyChangeListener > listener; css::beans::PropertyChangeEvent event; PropertyChangeNotification( css::uno::Reference< css::beans::XPropertyChangeListener > const & theListener, css::beans::PropertyChangeEvent theEvent); }; struct PropertiesChangeNotification { css::uno::Reference< css::beans::XPropertiesChangeListener > listener; css::uno::Sequence< css::beans::PropertyChangeEvent > event; PropertiesChangeNotification( css::uno::Reference< css::beans::XPropertiesChangeListener > const & theListener, css::uno::Sequence< css::beans::PropertyChangeEvent > const & theEvent); }; struct ChangesNotification { css::uno::Reference< css::util::XChangesListener > listener; css::util::ChangesEvent event; ChangesNotification( css::uno::Reference< css::util::XChangesListener > const & theListener, css::util::ChangesEvent theEvent); }; std::vector< DisposeNotification > disposeNotifications_; std::vector< ContainerNotification > containerElementInsertedNotifications_; std::vector< ContainerNotification > containerElementRemovedNotifications_; std::vector< ContainerNotification > containerElementReplacedNotifications_; std::vector< PropertyChangeNotification > propertyChangeNotifications_; std::vector< PropertiesChangeNotification > propertiesChangeNotifications_; std::vector< ChangesNotification > rootChangesNotifications_; std::vector< ChangesNotification > changesNotifications_; }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ov-6.1'>distro/collabora/lov-6.1 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-30 12:38:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-30 21:03:47 +0200
commit782eda5992585a2a67f28d4453c7994f01b41ad9 (patch)
tree3b5dceb565cc85153d3f44771ed06a6a5ece443d /sd
parentc497cd602d543b48888212f79ba1ecf378e415fc (diff)
loplugin:ostr in sd
Change-Id: Icfd8d1eb21953f44fb7bfb62188247e911734bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168252 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/viewopt.hxx2
-rw-r--r--sd/qa/filter/eppt/eppt.cxx34
-rw-r--r--sd/qa/unit/HtmlExportTest.cxx21
-rw-r--r--sd/qa/unit/PNGExportTests.cxx184
-rw-r--r--sd/qa/unit/SVGExportTests.cxx100
-rw-r--r--sd/qa/unit/SdrPdfImportTest.cxx12
-rw-r--r--sd/qa/unit/ShapeImportExportTest.cxx48
-rw-r--r--sd/qa/unit/TextFittingTest.cxx2
-rw-r--r--sd/qa/unit/ThemeTest.cxx14
-rw-r--r--sd/qa/unit/a11y/layout.cxx133
-rw-r--r--sd/qa/unit/activex-controls-tests.cxx494
-rw-r--r--sd/qa/unit/dialogs-test.cxx4
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx654
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx675
-rw-r--r--sd/qa/unit/export-tests-ooxml3.cxx406
-rw-r--r--sd/qa/unit/export-tests-ooxml4.cxx372
-rw-r--r--sd/qa/unit/export-tests.cxx658
-rw-r--r--sd/qa/unit/filters-test.cxx22
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx370
-rw-r--r--sd/qa/unit/import-tests.cxx313
-rw-r--r--sd/qa/unit/import-tests2.cxx276
-rw-r--r--sd/qa/unit/import-tests_skia.cxx2
-rw-r--r--sd/qa/unit/layout-tests.cxx81
-rw-r--r--sd/qa/unit/misc-tests.cxx160
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx10
-rw-r--r--sd/qa/unit/tiledrendering/LOKitSearchTest.cxx176
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx202
-rw-r--r--sd/qa/unit/tiledrendering2/tiledrendering2.cxx4
-rw-r--r--sd/qa/unit/uiimpress.cxx210
29 files changed, 2874 insertions, 2765 deletions
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;
+ xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nColor);
- xPropertySet->getPropertyValue("TextColor") >>= nColor;
+ xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0xFF80FF), nColor);
- xPropertySet->getPropertyValue("MultiLine") >>= bMultiLine;
+ xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine;
CPPUNIT_ASSERT_EQUAL(false, bMultiLine);
- xPropertySet->getPropertyValue("VisualEffect") >>= nVisualEffect;
+ xPropertySet->getPropertyValue(u"VisualEffect"_ustr) >>= nVisualEffect;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::VisualEffect::FLAT), nVisualEffect);
- xPropertySet->getPropertyValue("TriState") >>= bTriState;
+ xPropertySet->getPropertyValue(u"TriState"_ustr) >>= bTriState;
CPPUNIT_ASSERT_EQUAL(true, bTriState);
- xPropertySet->getPropertyValue("State") >>= nState;
+ xPropertySet->getPropertyValue(u"State"_ustr) >>= nState;
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nState);
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::CENTER), nAlign);
// 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("TriState") >>= bTriState;
+ xPropertySet->getPropertyValue(u"TriState"_ustr) >>= bTriState;
CPPUNIT_ASSERT_EQUAL(true, bTriState);
- xPropertySet->getPropertyValue("State") >>= nState;
+ xPropertySet->getPropertyValue(u"State"_ustr) >>= nState;
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nState);
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::RIGHT), nAlign);
// Transparent background
- CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue("BackgroundColor") >>= nColor);
+ CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor);
}
void SdActiveXControlsTest::testOptionButtonProperties()
@@ -691,76 +691,76 @@ void SdActiveXControlsTest::testOptionButtonProperties()
uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
OUString sLabel;
- xPropertySet->getPropertyValue("Label") >>= sLabel;
- CPPUNIT_ASSERT_EQUAL(OUString("OptionButton1"), sLabel);
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= sLabel;
+ CPPUNIT_ASSERT_EQUAL(u"OptionButton1"_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);
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;
+ xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTCYAN, nColor);
- xPropertySet->getPropertyValue("TextColor") >>= nColor;
+ xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nColor);
- xPropertySet->getPropertyValue("MultiLine") >>= bMultiLine;
+ xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine;
CPPUNIT_ASSERT_EQUAL(false, bMultiLine);
- xPropertySet->getPropertyValue("VisualEffect") >>= nVisualEffect;
+ xPropertySet->getPropertyValue(u"VisualEffect"_ustr) >>= nVisualEffect;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::VisualEffect::FLAT), nVisualEffect);
- xPropertySet->getPropertyValue("State") >>= nState;
+ xPropertySet->getPropertyValue(u"State"_ustr) >>= nState;
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nState);
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::CENTER), nAlign);
// 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("State") >>= nState;
+ xPropertySet->getPropertyValue(u"State"_ustr) >>= nState;
CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nState); // TriState / undefined imported as unchecked
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::RIGHT), nAlign);
// Transparent background
- CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue("BackgroundColor") >>= nColor);
+ CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor);
}
void SdActiveXControlsTest::testComboBoxProperties()
@@ -772,107 +772,107 @@ void SdActiveXControlsTest::testComboBoxProperties()
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(COL_WHITE, nColor);
- xPropertySet->getPropertyValue("TextColor") >>= nColor;
+ xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_BLACK, nColor);
bool bAutocomplete;
- xPropertySet->getPropertyValue("Autocomplete") >>= bAutocomplete;
+ xPropertySet->getPropertyValue(u"Autocomplete"_ustr) >>= bAutocomplete;
CPPUNIT_ASSERT_EQUAL(true, bAutocomplete);
sal_Int16 nBorderStyle;
- xPropertySet->getPropertyValue("Border") >>= nBorderStyle;
+ xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle;
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nBorderStyle);
Color nBorderColor;
- xPropertySet->getPropertyValue("BorderColor") >>= nBorderColor;
+ xPropertySet->getPropertyValue(u"BorderColor"_ustr) >>= nBorderColor;
CPPUNIT_ASSERT_EQUAL(COL_BLACK, nBorderColor);
bool bDropdown;
- xPropertySet->getPropertyValue("Dropdown") >>= bDropdown;
+ xPropertySet->getPropertyValue(u"Dropdown"_ustr) >>= bDropdown;
CPPUNIT_ASSERT_EQUAL(true, bDropdown);
bool bHideInactiveSelection;
- xPropertySet->getPropertyValue("HideInactiveSelection") >>= bHideInactiveSelection;
+ xPropertySet->getPropertyValue(u"HideInactiveSelection"_ustr) >>= bHideInactiveSelection;
CPPUNIT_ASSERT_EQUAL(true, bHideInactiveSelection);
sal_Int16 nLineCount;
- xPropertySet->getPropertyValue("LineCount") >>= nLineCount;
+ xPropertySet->getPropertyValue(u"LineCount"_ustr) >>= nLineCount;
CPPUNIT_ASSERT_EQUAL(sal_Int16(8), nLineCount);
sal_Int16 nMaxTextLen;
- xPropertySet->getPropertyValue("MaxTextLen") >>= nMaxTextLen;
+ xPropertySet->getPropertyValue(u"MaxTextLen"_ustr) >>= nMaxTextLen;
CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nMaxTextLen);
bool bReadOnly;
- xPropertySet->getPropertyValue("ReadOnly") >>= bReadOnly;
+ xPropertySet->getPropertyValue(u"ReadOnly"_ustr) >>= bReadOnly;
CPPUNIT_ASSERT_EQUAL(false, bReadOnly);
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("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_RED, nColor);
- xPropertySet->getPropertyValue("TextColor") >>= nColor;
+ xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_WHITE, nColor);
- xPropertySet->getPropertyValue("Autocomplete") >>= bAutocomplete;
+ xPropertySet->getPropertyValue(u"Autocomplete"_ustr) >>= bAutocomplete;
CPPUNIT_ASSERT_EQUAL(true, bAutocomplete);
- xPropertySet->getPropertyValue("Border") >>= nBorderStyle;
+ xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle;
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nBorderStyle);
- xPropertySet->getPropertyValue("BorderColor") >>= nBorderColor;
+ xPropertySet->getPropertyValue(u"BorderColor"_ustr) >>= nBorderColor;
CPPUNIT_ASSERT_EQUAL(Color(0x404040), nBorderColor);
- xPropertySet->getPropertyValue("Dropdown") >>= bDropdown;
+ xPropertySet->getPropertyValue(u"Dropdown"_ustr) >>= bDropdown;
CPPUNIT_ASSERT_EQUAL(true, bDropdown);
- xPropertySet->getPropertyValue("HideInactiveSelection") >>= bHideInactiveSelection;
+ xPropertySet->getPropertyValue(u"HideInactiveSelection"_ustr) >>= bHideInactiveSelection;
CPPUNIT_ASSERT_EQUAL(false, bHideInactiveSelection);
- xPropertySet->getPropertyValue("LineCount") >>= nLineCount;
+ xPropertySet->getPropertyValue(u"LineCount"_ustr) >>= nLineCount;
CPPUNIT_ASSERT_EQUAL(sal_Int16(12), nLineCount);
- xPropertySet->getPropertyValue("MaxTextLen") >>= nMaxTextLen;
+ xPropertySet->getPropertyValue(u"MaxTextLen"_ustr) >>= nMaxTextLen;
CPPUNIT_ASSERT_EQUAL(sal_Int16(130), nMaxTextLen);
- xPropertySet->getPropertyValue("ReadOnly") >>= bReadOnly;
+ xPropertySet->getPropertyValue(u"ReadOnly"_ustr) >>= bReadOnly;
CPPUNIT_ASSERT_EQUAL(false, bReadOnly); // Bogus, should be true (tdf#111417)
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::CENTER), nAlign);
// 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("Autocomplete") >>= bAutocomplete;
+ xPropertySet->getPropertyValue(u"Autocomplete"_ustr) >>= bAutocomplete;
CPPUNIT_ASSERT_EQUAL(false, bAutocomplete);
- xPropertySet->getPropertyValue("Dropdown") >>= bDropdown;
+ xPropertySet->getPropertyValue(u"Dropdown"_ustr) >>= bDropdown;
CPPUNIT_ASSERT_EQUAL(false, bDropdown);
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::RIGHT), nAlign);
// Transparent background
- CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue("BackgroundColor") >>= nColor);
+ CPPUNIT_ASSERT_EQUAL(false, xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor);
}
void SdActiveXControlsTest::testListBoxProperties()
@@ -884,80 +884,80 @@ void SdActiveXControlsTest::testListBoxProperties()
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(COL_WHITE, nColor);
- xPropertySet->getPropertyValue("TextColor") >>= nColor;
+ xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_BLACK, nColor);
sal_Int16 nBorderStyle;
- xPropertySet->getPropertyValue("Border") >>= nBorderStyle;
+ xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle;
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nBorderStyle);
Color nBorderColor;
- xPropertySet->getPropertyValue("BorderColor") >>= nBorderColor;
+ xPropertySet->getPropertyValue(u"BorderColor"_ustr) >>= nBorderColor;
CPPUNIT_ASSERT_EQUAL(COL_BLACK, nBorderColor);
bool bDropdown;
- xPropertySet->getPropertyValue("Dropdown") >>= bDropdown;
+ xPropertySet->getPropertyValue(u"Dropdown"_ustr) >>= bDropdown;
CPPUNIT_ASSERT_EQUAL(false, bDropdown);
bool bMultiSelection;
- xPropertySet->getPropertyValue("MultiSelection") >>= bMultiSelection;
+ xPropertySet->getPropertyValue(u"MultiSelection"_ustr) >>= bMultiSelection;
CPPUNIT_ASSERT_EQUAL(false, bMultiSelection);
sal_Int16 nLineCount;
- xPropertySet->getPropertyValue("LineCount") >>= nLineCount;
+ xPropertySet->getPropertyValue(u"LineCount"_ustr) >>= nLineCount;
CPPUNIT_ASSERT_EQUAL(sal_Int16(5), nLineCount);
bool bReadOnly;
- xPropertySet->getPropertyValue("ReadOnly") >>= bReadOnly;
+ xPropertySet->getPropertyValue(u"ReadOnly"_ustr) >>= bReadOnly;
CPPUNIT_ASSERT_EQUAL(false, bReadOnly);
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("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("TextColor") >>= nColor;
+ xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nColor);
- xPropertySet->getPropertyValue("Border") >>= nBorderStyle;
+ xPropertySet->getPropertyValue(u"Border"_ustr) >>= nBorderStyle;
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nBorderStyle);
- xPropertySet->getPropertyValue("BorderColor") >>= nBorderColor;
+ xPropertySet->getPropertyValue(u"BorderColor"_ustr) >>= nBorderColor;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTMAGENTA, nBorderColor);
- xPropertySet->getPropertyValue("MultiSelection") >>= bMultiSelection;
+ xPropertySet->getPropertyValue(u"MultiSelection"_ustr) >>= bMultiSelection;
CPPUNIT_ASSERT_EQUAL(true, bMultiSelection);
- xPropertySet->getPropertyValue("ReadOnly") >>= bReadOnly;
+ xPropertySet->getPropertyValue(u"ReadOnly"_ustr) >>= bReadOnly;
CPPUNIT_ASSERT_EQUAL(false, bReadOnly); // Bogus, should be true (tdf#111417)
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::CENTER), nAlign);
// 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("MultiSelection") >>= bMultiSelection;
+ xPropertySet->getPropertyValue(u"MultiSelection"_ustr) >>= bMultiSelection;
CPPUNIT_ASSERT_EQUAL(true, bMultiSelection);
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::RIGHT), nAlign);
}
@@ -970,76 +970,76 @@ void SdActiveXControlsTest::testToggleButtonProperties()
uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
OUString sLabel;
- xPropertySet->getPropertyValue("Label") >>= sLabel;
- CPPUNIT_ASSERT_EQUAL(OUString("ToggleButton1"), sLabel);
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= sLabel;
+ CPPUNIT_ASSERT_EQUAL(u"ToggleButton1"_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("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 bToggle;
- xPropertySet->getPropertyValue("Toggle") >>= bToggle;
+ xPropertySet->getPropertyValue(u"Toggle"_ustr) >>= bToggle;
CPPUNIT_ASSERT_EQUAL(true, bToggle);
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::CENTER), 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("MultiLine") >>= bMultiLine;
+ xPropertySet->getPropertyValue(u"MultiLine"_ustr) >>= bMultiLine;
CPPUNIT_ASSERT_EQUAL(false, bMultiLine);
- xPropertySet->getPropertyValue("BackgroundColor") >>= nColor;
+ xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0xFF80FF), nColor);
- xPropertySet->getPropertyValue("TextColor") >>= nColor;
+ xPropertySet->getPropertyValue(u"TextColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_GRAY, nColor);
- xPropertySet->getPropertyValue("Toggle") >>= bToggle;
+ xPropertySet->getPropertyValue(u"Toggle"_ustr) >>= bToggle;
CPPUNIT_ASSERT_EQUAL(true, bToggle);
- xPropertySet->getPropertyValue("State") >>= nState;
+ xPropertySet->getPropertyValue(u"State"_ustr) >>= nState;
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nState);
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::LEFT), nAlign);
// 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("State") >>= nState;
+ xPropertySet->getPropertyValue(u"State"_ustr) >>= nState;
CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nState); // Undefined state
- xPropertySet->getPropertyValue("Align") >>= nAlign;
+ xPropertySet->getPropertyValue(u"Align"_ustr) >>= nAlign;
CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::TextAlign::RIGHT), nAlign);
// Transparent background
- xPropertySet->getPropertyValue("BackgroundColor") >>= nColor;
+ xPropertySet->getPropertyValue(u"BackgroundColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_WHITE, nColor);
}
@@ -1073,11 +1073,11 @@ void SdActiveXControlsTest::testPictureProperties()
uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
uno::Reference<graphic::XGraphic> xGraphic;
- xPropertySet->getPropertyValue("Graphic") >>= xGraphic;
+ xPropertySet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
CPPUNIT_ASSERT(xGraphic.is());
sal_Int16 nColor;
- xPropertySet->getPropertyValue("ImagePosition") >>= nColor;
+ xPropertySet->getPropertyValue(u"ImagePosition"_ustr) >>= nColor;
OString sMessage = "The wrong control's index is: " + OString::number(i);
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), vImagePositions[i], nColor);
}
@@ -1091,14 +1091,14 @@ void SdActiveXControlsTest::testPictureProperties()
OString sMessage = "The wrong control's index is: " + OString::number(i);
uno::Reference<graphic::XGraphic> xGraphic;
- xPropertySet->getPropertyValue("Graphic") >>= xGraphic;
+ xPropertySet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
if (i == 0) // First control has no image specified
CPPUNIT_ASSERT_MESSAGE(sMessage.getStr(), !xGraphic.is());
else
CPPUNIT_ASSERT_MESSAGE(sMessage.getStr(), xGraphic.is());
sal_Int16 nScaleMode;
- xPropertySet->getPropertyValue("ScaleMode") >>= nScaleMode;
+ xPropertySet->getPropertyValue(u"ScaleMode"_ustr) >>= nScaleMode;
if (i == 2) // Stretch mode
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), awt::ImageScaleMode::ANISOTROPIC, nScaleMode);
else if (i == 3) // Zoom mode
@@ -1125,42 +1125,42 @@ void SdActiveXControlsTest::testFontProperties()
OString sMessage = "The wrong control's index is: " + OString::number(i);
OUString sFontName;
- xPropertySet->getPropertyValue("FontName") >>= sFontName;
+ xPropertySet->getPropertyValue(u"FontName"_ustr) >>= sFontName;
if (i == 4 || i == 5)
- CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), OUString("Times New Roman"), sFontName);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), u"Times New Roman"_ustr, sFontName);
else
- CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), OUString("Arial"), sFontName);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), u"Arial"_ustr, sFontName);
float fFontWeight;
- xPropertySet->getPropertyValue("FontWeight") >>= fFontWeight;
+ xPropertySet->getPropertyValue(u"FontWeight"_ustr) >>= fFontWeight;
if (i == 2 || i == 4)
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), awt::FontWeight::BOLD, fFontWeight);
else
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), awt::FontWeight::NORMAL, fFontWeight);
sal_Int16 nFontSlant;
- xPropertySet->getPropertyValue("FontSlant") >>= nFontSlant;
+ xPropertySet->getPropertyValue(u"FontSlant"_ustr) >>= nFontSlant;
if (i == 3 || i == 4)
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), sal_Int16(awt::FontSlant_ITALIC), nFontSlant);
else
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), sal_Int16(awt::FontSlant_NONE), nFontSlant);
sal_Int16 nFontUnderline;
- xPropertySet->getPropertyValue("FontUnderline") >>= nFontUnderline;
+ xPropertySet->getPropertyValue(u"FontUnderline"_ustr) >>= nFontUnderline;
if (i == 7)
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), sal_Int16(awt::FontUnderline::SINGLE), nFontUnderline);
else
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), sal_Int16(awt::FontUnderline::NONE), nFontUnderline);
sal_Int16 nFontStrikeout;
- xPropertySet->getPropertyValue("FontStrikeout") >>= nFontStrikeout;
+ xPropertySet->getPropertyValue(u"FontStrikeout"_ustr) >>= nFontStrikeout;
if (i == 6 || i == 7)
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), sal_Int16(awt::FontStrikeout::SINGLE), nFontStrikeout);
else
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), sal_Int16(awt::FontStrikeout::NONE), nFontStrikeout);
float fFontHeight;
- xPropertySet->getPropertyValue("FontHeight") >>= fFontHeight;
+ xPropertySet->getPropertyValue(u"FontHeight"_ustr) >>= fFontHeight;
if (i == 1)
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), 24.0f, fFontHeight);
else
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index e7c0d38f7f2e..e709d8a235c0 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -103,7 +103,7 @@ void SdDialogsTest::setUp()
ScreenshotTest::setUp();
mpFact = SdAbstractDialogFactory::Create();
- mxComponent = loadFromDesktop("private:factory/simpress", "com.sun.star.presentation.PresentationDocument");
+ mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr, u"com.sun.star.presentation.PresentationDocument"_ustr);
mpImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
CPPUNIT_ASSERT(mpImpressDocument);
@@ -351,7 +351,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID)
getViewShell()->GetFrameWeld(),
pDrawDoc,
nullptr,
- "foo");
+ u"foo"_ustr);
break;
}
case 9:
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 48e760edfc51..231d3175d677 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -49,7 +49,7 @@ class SdOOXMLExportTest1 : public SdModelTestBase
{
public:
SdOOXMLExportTest1()
- : SdModelTestBase("/sd/qa/unit/data/")
+ : SdModelTestBase(u"/sd/qa/unit/data/"_ustr)
{
}
};
@@ -77,9 +77,9 @@ void checkFontAttributes(const SdrTextObj* pObj, ItemValue nVal, sal_uInt32 nId)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf152335)
{
createSdImpressDoc("pptx/tdf152335.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocTheme = parseExport("ppt/theme/theme1.xml");
+ xmlDocUniquePtr pXmlDocTheme = parseExport(u"ppt/theme/theme1.xml"_ustr);
assertXPathChildren(
pXmlDocTheme, "/a:theme/a:themeElements/a:fmtScheme/a:effectStyleLst/a:effectStyle[3]"_ostr,
1);
@@ -88,237 +88,245 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf152335)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149803)
{
createSdImpressDoc("pptx/tdf149803.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp"_ostr, "useBgFill"_ostr, "1");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp"_ostr, "useBgFill"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149311)
{
createSdImpressDoc("odp/tdf149311.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pRelsDoc = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']"_ostr, "Target"_ostr,
- "slide2.xml");
+ u"slide2.xml"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf149128)
{
createSdImpressDoc("odp/tdf149128.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr,
- "id"_ostr, "8");
+ "id"_ostr, u"8"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr,
- "idx"_ostr, "0");
+ "idx"_ostr, u"0"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr,
- "id"_ostr, "9");
+ "id"_ostr, u"9"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr,
- "idx"_ostr, "2");
+ "idx"_ostr, u"2"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf66228)
{
createSdImpressDoc("odp/tdf66228.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "bentConnector3");
+ u"bentConnector3"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf147919)
{
createSdImpressDoc("odp/tdf147919.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[1]/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "bentConnector2");
+ u"bentConnector2"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:spPr/a:prstGeom/a:avLst/a:gd"_ostr,
- "name"_ostr, "adj1");
+ "name"_ostr, u"adj1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "bentConnector3");
+ u"bentConnector3"_ustr);
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[3]/p:spPr/a:xfrm"_ostr, "flipH"_ostr, "1");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[3]/p:spPr/a:xfrm"_ostr, "flipH"_ostr,
+ u"1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[3]/p:spPr/a:xfrm"_ostr, "rot"_ostr,
- "16200000");
+ u"16200000"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[3]/p:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "name"_ostr, "adj1");
+ "name"_ostr, u"adj1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[3]/p:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "name"_ostr, "adj2");
+ "name"_ostr, u"adj2"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[3]/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "bentConnector4");
+ u"bentConnector4"_ustr);
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[4]/p:spPr/a:xfrm"_ostr, "flipH"_ostr, "1");
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[4]/p:spPr/a:xfrm"_ostr, "flipV"_ostr, "1");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[4]/p:spPr/a:xfrm"_ostr, "flipH"_ostr,
+ u"1"_ustr);
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[4]/p:spPr/a:xfrm"_ostr, "flipV"_ostr,
+ u"1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[4]/p:spPr/a:xfrm"_ostr, "rot"_ostr,
- "10800000");
+ u"10800000"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[4]/p:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "name"_ostr, "adj1");
+ "name"_ostr, u"adj1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[4]/p:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "name"_ostr, "adj2");
+ "name"_ostr, u"adj2"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[4]/p:spPr/a:prstGeom/a:avLst/a:gd[3]"_ostr,
- "name"_ostr, "adj3");
+ "name"_ostr, u"adj3"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[4]/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "bentConnector5");
+ u"bentConnector5"_ustr);
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[5]/p:spPr/a:xfrm"_ostr, "flipH"_ostr, "1");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[5]/p:spPr/a:xfrm"_ostr, "flipH"_ostr,
+ u"1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[5]/p:spPr/a:xfrm"_ostr, "rot"_ostr,
- "16200000");
+ u"16200000"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[5]/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "curvedConnector2");
+ u"curvedConnector2"_ustr);
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[6]/p:spPr/a:xfrm"_ostr, "flipH"_ostr, "1");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[6]/p:spPr/a:xfrm"_ostr, "flipH"_ostr,
+ u"1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[6]/p:spPr/a:xfrm"_ostr, "rot"_ostr,
- "16200000");
+ u"16200000"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[6]/p:spPr/a:prstGeom/a:avLst/a:gd"_ostr,
- "name"_ostr, "adj1");
+ "name"_ostr, u"adj1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[6]/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "curvedConnector3");
+ u"curvedConnector3"_ustr);
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[7]/p:spPr/a:xfrm"_ostr, "flipH"_ostr, "1");
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[7]/p:spPr/a:xfrm"_ostr, "flipV"_ostr, "1");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[7]/p:spPr/a:xfrm"_ostr, "flipH"_ostr,
+ u"1"_ustr);
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[7]/p:spPr/a:xfrm"_ostr, "flipV"_ostr,
+ u"1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[7]/p:spPr/a:xfrm"_ostr, "rot"_ostr,
- "10800000");
+ u"10800000"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[7]/p:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "name"_ostr, "adj1");
+ "name"_ostr, u"adj1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[7]/p:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "name"_ostr, "adj2");
+ "name"_ostr, u"adj2"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[7]/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "curvedConnector4");
+ u"curvedConnector4"_ustr);
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[8]/p:spPr/a:xfrm"_ostr, "flipV"_ostr, "1");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[8]/p:spPr/a:xfrm"_ostr, "flipV"_ostr,
+ u"1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[8]/p:spPr/a:xfrm"_ostr, "rot"_ostr,
- "16200000");
+ u"16200000"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[8]/p:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "name"_ostr, "adj1");
+ "name"_ostr, u"adj1"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[8]/p:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "name"_ostr, "adj2");
+ "name"_ostr, u"adj2"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[8]/p:spPr/a:prstGeom/a:avLst/a:gd[3]"_ostr,
- "name"_ostr, "adj3");
+ "name"_ostr, u"adj3"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[8]/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "curvedConnector5");
+ u"curvedConnector5"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf130165)
{
createSdImpressDoc("pptx/tdf146223.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDoc, "/p:sld"_ostr, "showMasterSp"_ostr, "0");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDoc, "/p:sld"_ostr, "showMasterSp"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf124781)
{
createSdImpressDoc("odp/tdf124781.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:r[2]/a:rPr"_ostr,
- "baseline"_ostr, "33000");
+ "baseline"_ostr, u"33000"_ustr);
- xmlDocUniquePtr pXmlDoc2 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc2, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:r[2]/a:rPr"_ostr,
- "baseline"_ostr, "-8000");
+ "baseline"_ostr, u"-8000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf144914)
{
createSdImpressDoc("pptx/tdf144616.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:nvSpPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=firstslide");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=firstslide"_ustr);
- xmlDocUniquePtr pXmlDoc2 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:nvSpPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=lastslide");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=lastslide"_ustr);
- xmlDocUniquePtr pXmlDoc3 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc3 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc3, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:nvSpPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=nextslide");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=nextslide"_ustr);
- xmlDocUniquePtr pXmlDoc4 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc4 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc4, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:nvSpPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=previousslide");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=previousslide"_ustr);
- xmlDocUniquePtr pXmlDoc5 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc5 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc5, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:nvSpPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinksldjump");
- xmlDocUniquePtr pRelsDoc5 = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ "action"_ostr, u"ppaction://hlinksldjump"_ustr);
+ xmlDocUniquePtr pRelsDoc5 = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
assertXPath(pRelsDoc5, "/rels:Relationships/rels:Relationship[@Id='rId1']"_ostr, "Target"_ostr,
- "slide2.xml");
+ u"slide2.xml"_ustr);
- xmlDocUniquePtr pXmlDoc6 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc6 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc6, "/p:sld/p:cSld/p:spTree/p:sp[6]/p:nvSpPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=endshow");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=endshow"_ustr);
- xmlDocUniquePtr pXmlDoc7 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc7 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc7, "/p:sld/p:cSld/p:spTree/p:sp[7]/p:nvSpPr/p:cNvPr/a:hlinkClick"_ostr,
- "id"_ostr, "rId2");
- xmlDocUniquePtr pRelsDoc7 = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ "id"_ostr, u"rId2"_ustr);
+ xmlDocUniquePtr pRelsDoc7 = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
assertXPath(pRelsDoc7, "/rels:Relationships/rels:Relationship[@Id='rId2']"_ostr, "Target"_ostr,
- "http://www.example.com/");
+ u"http://www.example.com/"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf124232)
{
createSdImpressDoc("pptx/tdf141704.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=lastslide");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=lastslide"_ustr);
- xmlDocUniquePtr pXmlDoc2 = parseExport("ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
assertXPath(pXmlDoc2, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=nextslide");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=nextslide"_ustr);
- xmlDocUniquePtr pXmlDoc3 = parseExport("ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXmlDoc3 = parseExport(u"ppt/slides/slide3.xml"_ustr);
assertXPath(pXmlDoc3, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=previousslide");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=previousslide"_ustr);
- xmlDocUniquePtr pXmlDoc4 = parseExport("ppt/slides/slide4.xml");
+ xmlDocUniquePtr pXmlDoc4 = parseExport(u"ppt/slides/slide4.xml"_ustr);
assertXPath(pXmlDoc4, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick"_ostr,
- "id"_ostr, "rId1");
- xmlDocUniquePtr pRelsDoc4 = parseExport("ppt/slides/_rels/slide4.xml.rels");
+ "id"_ostr, u"rId1"_ustr);
+ xmlDocUniquePtr pRelsDoc4 = parseExport(u"ppt/slides/_rels/slide4.xml.rels"_ustr);
assertXPath(pRelsDoc4, "/rels:Relationships/rels:Relationship[@Id='rId1']"_ostr, "Target"_ostr,
- "http://www.example.com/");
+ u"http://www.example.com/"_ustr);
- xmlDocUniquePtr pXmlDoc5 = parseExport("ppt/slides/slide5.xml");
+ xmlDocUniquePtr pXmlDoc5 = parseExport(u"ppt/slides/slide5.xml"_ustr);
assertXPath(pXmlDoc5, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinksldjump");
- xmlDocUniquePtr pRelsDoc5 = parseExport("ppt/slides/_rels/slide5.xml.rels");
+ "action"_ostr, u"ppaction://hlinksldjump"_ustr);
+ xmlDocUniquePtr pRelsDoc5 = parseExport(u"ppt/slides/_rels/slide5.xml.rels"_ustr);
assertXPath(pRelsDoc5, "/rels:Relationships/rels:Relationship[@Id='rId1']"_ostr, "Target"_ostr,
- "slide6.xml");
+ u"slide6.xml"_ustr);
- xmlDocUniquePtr pXmlDoc6 = parseExport("ppt/slides/slide6.xml");
+ xmlDocUniquePtr pXmlDoc6 = parseExport(u"ppt/slides/slide6.xml"_ustr);
assertXPath(pXmlDoc6, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=endshow");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=endshow"_ustr);
- xmlDocUniquePtr pXmlDoc7 = parseExport("ppt/slides/slide7.xml");
+ xmlDocUniquePtr pXmlDoc7 = parseExport(u"ppt/slides/slide7.xml"_ustr);
assertXPath(pXmlDoc7, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=firstslide");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=firstslide"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf143624)
{
createSdImpressDoc("pptx/tdf143624.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/presProps.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presProps.xml"_ustr);
- assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "useTimings"_ostr, "0");
+ assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "useTimings"_ostr, u"0"_ustr);
- assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "showNarration"_ostr, "1");
+ assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "showNarration"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf142648)
@@ -330,63 +338,63 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf142648)
uno::Reference<drawing::XDrawPage> xDrawPage;
xDrawPages->getByIndex(0) >>= xDrawPage;
uno::Reference<container::XNamed> xNamed(xDrawPage, uno::UNO_QUERY_THROW);
- xNamed->setName("#Slide 1");
+ xNamed->setName(u"#Slide 1"_ustr);
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pRelsDoc = parseExport("ppt/slides/_rels/slide2.xml.rels");
+ xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr);
assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']"_ostr, "Target"_ostr,
- "slide1.xml");
+ u"slide1.xml"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf47365)
{
createSdImpressDoc("pptx/loopNoPause.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/presProps.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presProps.xml"_ustr);
- assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "loop"_ostr, "1");
+ assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "loop"_ostr, u"1"_ustr);
- assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "showNarration"_ostr, "1");
+ assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "showNarration"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf125071)
{
createSdImpressDoc("pptx/tdf125071.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/presentation.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presentation.xml"_ustr);
assertXPath(pXmlDoc, "/p:presentation/p:custShowLst/p:custShow[1]"_ostr, "name"_ostr,
- "Custom1");
+ u"Custom1"_ustr);
assertXPath(pXmlDoc, "/p:presentation/p:custShowLst/p:custShow[2]"_ostr, "name"_ostr,
- "Custom2");
+ u"Custom2"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf54037)
{
createSdImpressDoc("pptx/tdf54037.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- xmlDocUniquePtr pRelsDoc = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:r/a:rPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinksldjump");
+ "action"_ostr, u"ppaction://hlinksldjump"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:r/a:rPr/a:hlinkClick"_ostr,
- "action"_ostr, "ppaction://hlinkshowjump?jump=nextslide");
+ "action"_ostr, u"ppaction://hlinkshowjump?jump=nextslide"_ustr);
assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']"_ostr, "Target"_ostr,
- "slide2.xml");
+ u"slide2.xml"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf127237)
{
createSdImpressDoc("pptx/tdf127237.pptx");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
const SdrPage* pPage = GetPage(1);
CPPUNIT_ASSERT(pPage != nullptr);
@@ -398,14 +406,14 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf127237)
Color nFillColor;
uno::Reference<beans::XPropertySet> xCell(xTable->getCellByPosition(0, 0),
uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("FillColor") >>= nFillColor;
+ xCell->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
CPPUNIT_ASSERT_EQUAL(Color(0x0070C0), nFillColor);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc887230)
{
createSdImpressDoc("pptx/bnc887230.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -419,7 +427,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc887230)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc870233_1)
{
createSdImpressDoc("pptx/bnc870233_1.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -443,7 +451,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc870233_1)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc870233_2)
{
createSdImpressDoc("pptx/bnc870233_2.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -479,7 +487,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testN828390_4)
bool bPassed = false;
createSdImpressDoc("n828390_4.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
{
@@ -500,7 +508,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testN828390_4)
const SvxFontItem* pFont = dynamic_cast<const SvxFontItem*>((*it).pAttr);
if (pFont)
{
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Font is wrong", OUString("Arial"),
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Font is wrong", u"Arial"_ustr,
pFont->GetFamilyName());
bPassed = true;
}
@@ -517,7 +525,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testN828390_5)
{
createSdImpressDoc("n828390_5.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
{
@@ -553,8 +561,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testLostPlaceholders)
// Expected: com.sun.star.presentation.OutlinerShape
// Actual: com.sun.star.drawing.CustomShape
- CPPUNIT_ASSERT_EQUAL_MESSAGE("It must be a placeholder!", true,
- xShpProps->getPropertyValue("IsPresentationObject").get<bool>());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ "It must be a placeholder!", true,
+ xShpProps->getPropertyValue(u"IsPresentationObject"_ustr).get<bool>());
// Without the fix in place this will the following:
// Expected: true
// Actual: false
@@ -590,30 +599,34 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testPlaceholderFillAndOutlineExport)
uno::Reference<beans::XPropertySet> xShpProps(xShp, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"It must be a placeholder!", true,
- xShpProps->getPropertyValue("IsPresentationObject").get<bool>());
+ xShpProps->getPropertyValue(u"IsPresentationObject"_ustr).get<bool>());
if (i == 1)
{
- aFillStyle = xShpProps->getPropertyValue("FillStyle");
- aFillColor = xShpProps->getPropertyValue("FillColor");
+ aFillStyle = xShpProps->getPropertyValue(u"FillStyle"_ustr);
+ aFillColor = xShpProps->getPropertyValue(u"FillColor"_ustr);
- aLineStyle = xShpProps->getPropertyValue("LineStyle");
- aLineColor = xShpProps->getPropertyValue("LineColor");
+ aLineStyle = xShpProps->getPropertyValue(u"LineStyle"_ustr);
+ aLineColor = xShpProps->getPropertyValue(u"LineColor"_ustr);
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
continue;
}
else
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("The Placeholder fillstyle has not been exported!",
- aFillStyle, xShpProps->getPropertyValue("FillStyle"));
+ aFillStyle,
+ xShpProps->getPropertyValue(u"FillStyle"_ustr));
CPPUNIT_ASSERT_EQUAL_MESSAGE("The Placeholder fillcolor has not been exported!",
- aFillColor, xShpProps->getPropertyValue("FillColor"));
+ aFillColor,
+ xShpProps->getPropertyValue(u"FillColor"_ustr));
CPPUNIT_ASSERT_EQUAL_MESSAGE("The Placeholder linestyle has not been exported!",
- aLineStyle, xShpProps->getPropertyValue("LineStyle"));
+ aLineStyle,
+ xShpProps->getPropertyValue(u"LineStyle"_ustr));
CPPUNIT_ASSERT_EQUAL_MESSAGE("The Placeholder linecolor has not been exported!",
- aLineColor, xShpProps->getPropertyValue("LineColor"));
+ aLineColor,
+ xShpProps->getPropertyValue(u"LineColor"_ustr));
break;
}
}
@@ -623,26 +636,26 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo71961)
{
createSdImpressDoc("fdo71961.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
// Export to .pptx changes all text frames to custom shape objects, which obey TextWordWrap property
// (which is false for text frames otherwise and is ignored). Check that frames that should wrap still do.
auto pTxtObj = pPage->GetObj(1);
CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr);
- CPPUNIT_ASSERT_EQUAL(OUString("Text to be always wrapped"),
+ CPPUNIT_ASSERT_EQUAL(u"Text to be always wrapped"_ustr,
pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0));
CPPUNIT_ASSERT_EQUAL(true, pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue());
pTxtObj = dynamic_cast<SdrObjCustomShape*>(pPage->GetObj(2));
CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr);
- CPPUNIT_ASSERT_EQUAL(OUString("Custom shape non-wrapped text"),
+ CPPUNIT_ASSERT_EQUAL(u"Custom shape non-wrapped text"_ustr,
pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0));
CPPUNIT_ASSERT_EQUAL(false, pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue());
pTxtObj = dynamic_cast<SdrObjCustomShape*>(pPage->GetObj(3));
CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr);
- CPPUNIT_ASSERT_EQUAL(OUString("Custom shape wrapped text"),
+ CPPUNIT_ASSERT_EQUAL(u"Custom shape wrapped text"_ustr,
pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0));
CPPUNIT_ASSERT_EQUAL(true, pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue());
}
@@ -652,7 +665,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testN828390)
bool bPassed = false;
createSdImpressDoc("pptx/n828390.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
{
@@ -675,7 +688,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testN828390)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc880763)
{
createSdImpressDoc("pptx/bnc880763.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -700,7 +713,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc880763)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc862510_5)
{
createSdImpressDoc("pptx/bnc862510_5.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -721,7 +734,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc862510_5)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc822347_EmptyBullet)
{
createSdImpressDoc("bnc822347_EmptyBullet.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pXImpressDocument);
@@ -736,7 +749,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc822347_EmptyBullet)
const EditTextObject& aEdit = pOutlinerParagraphObject->GetTextObject();
OUString sText = aEdit.GetText(0);
- CPPUNIT_ASSERT_EQUAL(OUString("M3 Feature Test"), sText);
+ CPPUNIT_ASSERT_EQUAL(u"M3 Feature Test"_ustr, sText);
pOutliner->SetText(*pOutlinerParagraphObject);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pOutliner->GetParagraphCount());
@@ -751,7 +764,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBnc822347_EmptyBullet)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo90607)
{
createSdImpressDoc("fdo90607.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage->GetObj(1));
@@ -764,7 +777,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo90607)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo83751)
{
createSdImpressDoc("pptx/fdo83751.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(
mxComponent, uno::UNO_QUERY);
@@ -773,14 +786,14 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo83751)
uno::Reference<beans::XPropertySet> xUDProps(xProps->getUserDefinedProperties(),
uno::UNO_QUERY);
OUString propValue;
- xUDProps->getPropertyValue("Testing") >>= propValue;
- CPPUNIT_ASSERT_EQUAL(OUString("Document"), propValue);
+ xUDProps->getPropertyValue(u"Testing"_ustr) >>= propValue;
+ CPPUNIT_ASSERT_EQUAL(u"Document"_ustr, propValue);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testFdo79731)
{
createSdImpressDoc("fdo79731.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pXImpressDocument);
SdDrawDocument* pDoc = pXImpressDocument->GetDoc();
@@ -793,7 +806,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellFillProperties)
createSdImpressDoc("odp/Table_with_Cell_Fill.odp");
// Export the document and import again for a check
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -805,25 +818,25 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellFillProperties)
// Test Solid fill color
Color nColor;
xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("FillColor") >>= nColor;
+ xCell->getPropertyValue(u"FillColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0x66ffff), nColor);
// Test Picture fill type for cell
drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("FillStyle") >>= aFillStyle;
+ xCell->getPropertyValue(u"FillStyle"_ustr) >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(int(drawing::FillStyle_BITMAP), static_cast<int>(aFillStyle));
// Test Gradient fill type for cell
xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("FillStyle") >>= aFillStyle;
+ xCell->getPropertyValue(u"FillStyle"_ustr) >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(int(drawing::FillStyle_GRADIENT), static_cast<int>(aFillStyle));
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletStartNumber)
{
createSdImpressDoc("pptx/n90255.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage->GetObj(0));
@@ -838,7 +851,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletStartNumber)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testLineStyle)
{
createSdImpressDoc("pptx/lineStyle.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
SdrObject const* pShape = pPage->GetObj(0);
@@ -858,13 +871,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf134862)
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
sal_Int16 nWritingMode = 0;
- xPropSet->getPropertyValue("WritingMode") >>= nWritingMode;
+ xPropSet->getPropertyValue(u"WritingMode"_ustr) >>= nWritingMode;
// Without the fix in place, this test would have failed here
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong paragraph WritingMode", text::WritingMode2::RL_TB,
nWritingMode);
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
xShape.set(getShapeFromPage(0, 0));
@@ -872,7 +885,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf134862)
xPropSet.set(xParagraph, uno::UNO_QUERY_THROW);
nWritingMode = 0;
- xPropSet->getPropertyValue("WritingMode") >>= nWritingMode;
+ xPropSet->getPropertyValue(u"WritingMode"_ustr) >>= nWritingMode;
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong paragraph WritingMode", text::WritingMode2::RL_TB,
nWritingMode);
}
@@ -881,7 +894,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testRightToLeftParaghraph)
{
createSdImpressDoc("pptx/rightToLeftParagraph.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
// Get first paragraph
@@ -889,7 +902,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testRightToLeftParaghraph)
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
sal_Int16 nWritingMode = 0;
- xPropSet->getPropertyValue("WritingMode") >>= nWritingMode;
+ xPropSet->getPropertyValue(u"WritingMode"_ustr) >>= nWritingMode;
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong paragraph WritingMode", text::WritingMode2::RL_TB,
nWritingMode);
}
@@ -898,7 +911,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTextboxWithHyperlink)
{
createSdImpressDoc("pptx/hyperlinktest.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
// Get first paragraph
@@ -909,20 +922,20 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTextboxWithHyperlink)
uno::Reference<beans::XPropertySet> xPropSet(xRun, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextField> xField;
- xPropSet->getPropertyValue("TextField") >>= xField;
+ xPropSet->getPropertyValue(u"TextField"_ustr) >>= xField;
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
xPropSet.set(xField, uno::UNO_QUERY);
OUString aURL;
- xPropSet->getPropertyValue("URL") >>= aURL;
- CPPUNIT_ASSERT_EQUAL_MESSAGE("URLs don't match", OUString("http://www.xkcd.com/"), aURL);
+ xPropSet->getPropertyValue(u"URL"_ustr) >>= aURL;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("URLs don't match", u"http://www.xkcd.com/"_ustr, aURL);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf136911)
{
createSdImpressDoc("ppt/tdf136911.ppt");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
// Get second paragraph
@@ -933,20 +946,20 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf136911)
uno::Reference<beans::XPropertySet> xPropSet(xRun, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextField> xField;
- xPropSet->getPropertyValue("TextField") >>= xField;
+ xPropSet->getPropertyValue(u"TextField"_ustr) >>= xField;
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
xPropSet.set(xField, uno::UNO_QUERY);
OUString aURL;
- xPropSet->getPropertyValue("URL") >>= aURL;
- CPPUNIT_ASSERT_EQUAL_MESSAGE("URLs don't match", OUString("http://google.com"), aURL);
+ xPropSet->getPropertyValue(u"URL"_ustr) >>= aURL;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("URLs don't match", u"http://google.com"_ustr, aURL);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletColor)
{
createSdImpressDoc("pptx/bulletColor.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -963,14 +976,14 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletColor)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletCharAndFont)
{
createSdImpressDoc("odp/bulletCharAndFont.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
- uno::Reference<container::XIndexAccess> xLevels(xPropSet->getPropertyValue("NumberingRules"),
- uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(
+ xPropSet->getPropertyValue(u"NumberingRules"_ustr), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProps;
xLevels->getByIndex(0) >>= aProps; // 1st level
OUString sBulletChar(u'\xf06c');
@@ -983,7 +996,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletCharAndFont)
{
awt::FontDescriptor aFontDescriptor;
rProp.Value >>= aFontDescriptor;
- CPPUNIT_ASSERT_EQUAL_MESSAGE("BulletFont incorrect.", OUString("Wingdings"),
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("BulletFont incorrect.", u"Wingdings"_ustr,
aFontDescriptor.Name);
}
}
@@ -992,7 +1005,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletCharAndFont)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletMarginAndIndentation)
{
createSdImpressDoc("pptx/bulletMarginAndIndent.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -1014,7 +1027,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testParaMarginAndindentation)
{
createSdImpressDoc("pptx/paraMarginAndIndentation.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
// Get first paragraph
@@ -1022,18 +1035,18 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testParaMarginAndindentation)
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
sal_Int32 nParaLeftMargin = 0;
- xPropSet->getPropertyValue("ParaLeftMargin") >>= nParaLeftMargin;
+ xPropSet->getPropertyValue(u"ParaLeftMargin"_ustr) >>= nParaLeftMargin;
CPPUNIT_ASSERT_EQUAL(sal_uInt32(1000), sal_uInt32(nParaLeftMargin));
sal_Int32 nParaFirstLineIndent = 0;
- xPropSet->getPropertyValue("ParaFirstLineIndent") >>= nParaFirstLineIndent;
+ xPropSet->getPropertyValue(u"ParaFirstLineIndent"_ustr) >>= nParaFirstLineIndent;
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1270), nParaFirstLineIndent);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCellLeftAndRightMargin)
{
createSdImpressDoc("pptx/n90223.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
sal_Int32 nLeftMargin, nRightMargin;
const SdrPage* pPage = GetPage(1);
@@ -1046,10 +1059,10 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCellLeftAndRightMargin)
uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xCellPropSet(xCell, uno::UNO_QUERY_THROW);
- uno::Any aLeftMargin = xCellPropSet->getPropertyValue("TextLeftDistance");
+ uno::Any aLeftMargin = xCellPropSet->getPropertyValue(u"TextLeftDistance"_ustr);
CPPUNIT_ASSERT(aLeftMargin >>= nLeftMargin);
- uno::Any aRightMargin = xCellPropSet->getPropertyValue("TextRightDistance");
+ uno::Any aRightMargin = xCellPropSet->getPropertyValue(u"TextRightDistance"_ustr);
CPPUNIT_ASSERT(aRightMargin >>= nRightMargin);
// Convert values to EMU
@@ -1063,7 +1076,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCellLeftAndRightMargin)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testMergedCells)
{
createSdImpressDoc("odp/cellspan.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
sdr::table::SdrTableObj* pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
@@ -1071,16 +1084,16 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testMergedCells)
CPPUNIT_ASSERT(pTableObj);
uno::Reference<table::XTable> xTable(pTableObj->getTable(), uno::UNO_SET_THROW);
uno::Reference<text::XTextRange> xText1(xTable->getCellByPosition(3, 0), uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(OUString("0,3"), xText1->getString());
+ CPPUNIT_ASSERT_EQUAL(u"0,3"_ustr, xText1->getString());
uno::Reference<text::XTextRange> xText2(xTable->getCellByPosition(3, 2), uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(OUString("2,3"), xText2->getString());
+ CPPUNIT_ASSERT_EQUAL(u"2,3"_ustr, xText2->getString());
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellBorder)
{
createSdImpressDoc("pptx/n90190.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -1094,7 +1107,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellBorder)
uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xCellPropSet(xCell, uno::UNO_QUERY_THROW);
- xCellPropSet->getPropertyValue("LeftBorder") >>= aBorderLine;
+ xCellPropSet->getPropertyValue(u"LeftBorder"_ustr) >>= aBorderLine;
// While importing the table cell border line width, it converts EMU->Hmm then divided result by 2.
// To get original value of LineWidth need to multiple by 2.
sal_Int32 nLeftBorder = aBorderLine.LineWidth * 2;
@@ -1102,19 +1115,19 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellBorder)
CPPUNIT_ASSERT(nLeftBorder);
CPPUNIT_ASSERT_EQUAL(Color(0x00b0f0), Color(ColorTransparency, aBorderLine.Color));
- xCellPropSet->getPropertyValue("RightBorder") >>= aBorderLine;
+ xCellPropSet->getPropertyValue(u"RightBorder"_ustr) >>= aBorderLine;
sal_Int32 nRightBorder = aBorderLine.LineWidth * 2;
nRightBorder = oox::drawingml::convertHmmToEmu(nRightBorder);
CPPUNIT_ASSERT(nRightBorder);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(ColorTransparency, aBorderLine.Color));
- xCellPropSet->getPropertyValue("TopBorder") >>= aBorderLine;
+ xCellPropSet->getPropertyValue(u"TopBorder"_ustr) >>= aBorderLine;
sal_Int32 nTopBorder = aBorderLine.LineWidth * 2;
nTopBorder = oox::drawingml::convertHmmToEmu(nTopBorder);
CPPUNIT_ASSERT(nTopBorder);
CPPUNIT_ASSERT_EQUAL(Color(0x00b0f0), Color(ColorTransparency, aBorderLine.Color));
- xCellPropSet->getPropertyValue("BottomBorder") >>= aBorderLine;
+ xCellPropSet->getPropertyValue(u"BottomBorder"_ustr) >>= aBorderLine;
sal_Int32 nBottomBorder = aBorderLine.LineWidth * 2;
nBottomBorder = oox::drawingml::convertHmmToEmu(nBottomBorder);
CPPUNIT_ASSERT(nBottomBorder);
@@ -1124,7 +1137,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTableCellBorder)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf111884)
{
createSdImpressDoc("pptx/tdf111884.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
SdrObject const* pShape = pPage->GetObj(2);
@@ -1138,16 +1151,16 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf112633)
{
// Load document and export it to a temporary file
createSdImpressDoc("pptx/tdf112633.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- xmlDocUniquePtr pRelsDoc = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
// Check image with artistic effect exists in the slide
assertXPath(pXmlDoc,
"/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/"
"a14:imgLayer/a14:imgEffect/a14:artisticPencilGrayscale"_ostr,
- "pencilSize"_ostr, "80");
+ "pencilSize"_ostr, u"80"_ustr);
// Check there is a relation with the .wdp file that contains the backed up image
OUString sEmbedId1 = getXPath(pXmlDoc,
@@ -1156,58 +1169,61 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf112633)
"embed"_ostr);
OUString sXmlPath = "/rels:Relationships/rels:Relationship[@Id='" + sEmbedId1 + "']";
assertXPath(pRelsDoc, OUStringToOString(sXmlPath, RTL_TEXTENCODING_UTF8), "Target"_ostr,
- "../media/hdphoto1.wdp");
+ u"../media/hdphoto1.wdp"_ustr);
// Check the .wdp file exists
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
maTempFile.GetURL());
- CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName("ppt/media/hdphoto1.wdp")));
+ CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName(u"ppt/media/hdphoto1.wdp"_ustr)));
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128952)
{
createSdImpressDoc("pptx/tdf128952.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:off"_ostr, "x"_ostr, "360");
- assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:off"_ostr, "y"_ostr, "-360");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:off"_ostr, "x"_ostr,
+ u"360"_ustr);
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:off"_ostr, "y"_ostr,
+ u"-360"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:ext"_ostr, "cx"_ostr,
- "1919880");
+ u"1919880"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:ext"_ostr, "cy"_ostr,
- "1462680");
+ u"1462680"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf127090)
{
createSdImpressDoc("pptx/tdf127090.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr"_ostr, "rot"_ostr,
- "-5400000");
+ u"-5400000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCustomXml)
{
// Load document and export it to a temporary file
createSdImpressDoc("pptx/customxml.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("customXml/item1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"customXml/item1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
- xmlDocUniquePtr pRelsDoc = parseExport("customXml/_rels/item1.xml.rels");
+ xmlDocUniquePtr pRelsDoc = parseExport(u"customXml/_rels/item1.xml.rels"_ustr);
CPPUNIT_ASSERT(pRelsDoc);
// Check there is a relation to itemProps1.xml.
assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship"_ostr, 1);
assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']"_ostr, "Target"_ostr,
- "itemProps1.xml");
+ u"itemProps1.xml"_ustr);
- std::unique_ptr<SvStream> pStream = parseExportStream(maTempFile.GetURL(), "ddp/ddpfile.xen");
+ std::unique_ptr<SvStream> pStream
+ = parseExportStream(maTempFile.GetURL(), u"ddp/ddpfile.xen"_ustr);
CPPUNIT_ASSERT(pStream);
}
@@ -1215,7 +1231,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf94238)
{
// Load document and export it to a temporary file.
createSdImpressDoc("pptx/tdf94238.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xDoc.is());
@@ -1226,7 +1242,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf94238)
CPPUNIT_ASSERT(xShape.is());
awt::Gradient2 aGradient;
- CPPUNIT_ASSERT(xShape->getPropertyValue("FillGradient") >>= aGradient);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"FillGradient"_ustr) >>= aGradient);
// Without the accompanying fix in place, this test would have failed with
// the following details:
@@ -1258,7 +1274,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testPictureTransparency)
{
// Load document and export it to a temporary file.
createSdImpressDoc("odp/image_transparency.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xDoc.is());
@@ -1269,18 +1285,18 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testPictureTransparency)
CPPUNIT_ASSERT(xGraphicShape.is());
sal_Int16 nTransparency = 0;
- CPPUNIT_ASSERT(xGraphicShape->getPropertyValue("Transparency") >>= nTransparency);
+ CPPUNIT_ASSERT(xGraphicShape->getPropertyValue(u"Transparency"_ustr) >>= nTransparency);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(51), nTransparency);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf125554)
{
createSdImpressDoc("pptx/tdf125554.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape = getShapeFromPage(0, 0);
uno::Any aFillTransparenceGradientName
- = xShape->getPropertyValue("FillTransparenceGradientName");
+ = xShape->getPropertyValue(u"FillTransparenceGradientName"_ustr);
CPPUNIT_ASSERT(aFillTransparenceGradientName.has<OUString>());
// Without the accompanying fix in place, this test would have failed, i.e. the transparency of
// the shape has no gradient, so it looked like a solid fill instead of a gradient fill.
@@ -1301,11 +1317,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testRoundtripOwnLineStyles)
{
uno::Reference<beans::XPropertySet> xShapeodp(getShape(i, xPageodp));
CPPUNIT_ASSERT(xShapeodp.is());
- xShapeodp->getPropertyValue("LineDash") >>= aLineDashodp[i];
+ xShapeodp->getPropertyValue(u"LineDash"_ustr) >>= aLineDashodp[i];
}
// Save to pptx, reload and compare the LineDash values
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDocpptx(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xDocpptx.is());
uno::Reference<drawing::XDrawPage> xPagepptx(xDocpptx->getDrawPages()->getByIndex(0),
@@ -1317,7 +1333,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testRoundtripOwnLineStyles)
drawing::LineDash aLineDashpptx;
uno::Reference<beans::XPropertySet> xShapepptx(getShape(i, xPagepptx));
CPPUNIT_ASSERT(xShapepptx.is());
- xShapepptx->getPropertyValue("LineDash") >>= aLineDashpptx;
+ xShapepptx->getPropertyValue(u"LineDash"_ustr) >>= aLineDashpptx;
bool bIsSameLineDash = (aLineDashodp[i].Style == aLineDashpptx.Style
&& aLineDashodp[i].Dots == aLineDashpptx.Dots
&& aLineDashodp[i].DotLen == aLineDashpptx.DotLen
@@ -1332,12 +1348,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testRoundtripPrstDash)
{
// load and save document, compare prstDash values in saved document with original.
createSdImpressDoc("pptx/presetDashDot.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
const OUString sOriginal[]
- = { "dash", "dashDot", "dot", "lgDash", "lgDashDot",
- "lgDashDotDot", "sysDash", "sysDashDot", "sysDashDotDot", "sysDot" };
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ = { u"dash"_ustr, u"dashDot"_ustr, u"dot"_ustr, u"lgDash"_ustr,
+ u"lgDashDot"_ustr, u"lgDashDotDot"_ustr, u"sysDash"_ustr, u"sysDashDot"_ustr,
+ u"sysDashDotDot"_ustr, u"sysDot"_ustr };
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OStringLiteral sStart = "/p:sld/p:cSld/p:spTree/p:sp[";
static constexpr OStringLiteral sEnd = "]/p:spPr/a:ln/a:prstDash";
for (sal_uInt16 i = 0; i < 10; i++)
@@ -1358,7 +1375,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testRoundtripPrstDash)
drawing::LineDash aLineDash;
uno::Reference<beans::XPropertySet> xShape(getShape(i, xPage));
CPPUNIT_ASSERT(xShape.is());
- xShape->getPropertyValue("LineDash") >>= aLineDash;
+ xShape->getPropertyValue(u"LineDash"_ustr) >>= aLineDash;
CPPUNIT_ASSERT_MESSAGE("First dash is short", aLineDash.DotLen >= aLineDash.DashLen);
bool bIsRectRelative = aLineDash.Style == drawing::DashStyle_RECTRELATIVE;
CPPUNIT_ASSERT_MESSAGE("not RECTRELATIVE", bIsRectRelative);
@@ -1369,9 +1386,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testDashOnHairline)
{
// load and save document, make sure the custDash has 11 child elements.
createSdImpressDoc("odp/tdf127267DashOnHairline.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:ln/a:custDash/a:ds"_ostr, 11);
}
@@ -1380,15 +1397,15 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testNarrationNonMediaShape)
createSdImpressDoc("pptx/narration-non-media-shape.pptx");
// Without the accompanying fix in place, this test would have failed,
// beans::UnknownPropertyException was thrown.
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCustomshapeBitmapfillSrcrect)
{
createSdImpressDoc("pptx/customshape-bitmapfill-srcrect.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// tdf#132680
// We are preventing the side effect of DOCX improvement to PPTX case.
@@ -1421,73 +1438,75 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testCustomshapeBitmapfillSrcrect)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf100348FontworkBitmapFill)
{
createSdImpressDoc("odp/tdf100348_FontworkBitmapFill.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Make sure the fontwork shape has a blip bitmap fill and a colored outline.
// Without the patch, fill and outline were black.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:blipFill/a:blip", 1);
- assertXPath(pXmlDoc, sPathStart + "/a:ln/a:solidFill/a:srgbClr", "val"_ostr, "ffbf00");
+ assertXPath(pXmlDoc, sPathStart + "/a:ln/a:solidFill/a:srgbClr", "val"_ostr, u"ffbf00"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf100348FontworkGradientGlow)
{
createSdImpressDoc("odp/tdf100348_FontworkGradientGlow.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Make sure the fontwork shape has a gradient fill and a colored glow.
// Without the patch, fill was black and no glow applied.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val"_ostr,
- "8d281e");
- assertXPath(pXmlDoc, sPathStart + "/a:effectLst/a:glow", "rad"_ostr, "63360");
- assertXPath(pXmlDoc, sPathStart + "/a:effectLst/a:glow/a:srgbClr", "val"_ostr, "ff4500");
+ u"8d281e"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:effectLst/a:glow", "rad"_ostr, u"63360"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:effectLst/a:glow/a:srgbClr", "val"_ostr, u"ff4500"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345FullTransparentGradient)
{
createSdImpressDoc("odp/tdf128345_FullTransparentGradient.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Make sure the shape has no fill. Without the patch, fill was solid red.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:noFill"_ostr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientLinear)
{
createSdImpressDoc("odp/tdf128345_GradientLinear.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Make sure the shape has a lin fill. Without the patch, fill was solid red.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill"_ostr);
- assertXPath(pXmlDoc, sPathStart + "/a:lin", "ang"_ostr, "3600000");
+ assertXPath(pXmlDoc, sPathStart + "/a:lin", "ang"_ostr, u"3600000"_ustr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]", "pos"_ostr, "25000");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr", "val"_ostr, "ff0000");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr, "20000");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]", "pos"_ostr, "100000");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr", "val"_ostr, "ff0000");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, "80000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]", "pos"_ostr, u"25000"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr", "val"_ostr, u"ff0000"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr,
+ u"20000"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]", "pos"_ostr, u"100000"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr", "val"_ostr, u"ff0000"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr,
+ u"80000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientRadial)
{
createSdImpressDoc("odp/tdf128345_GradientRadial.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Make sure the shape has transparency. In OOXML alpha means 'opacity' with default
// 100000 for full opak, so only the full transparency with val 0 should be written.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr", "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr", "val"_ostr, u"ff0000"_ustr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", 0);
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr", "val"_ostr, "ffffff");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, "0");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr", "val"_ostr, u"ffffff"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientAxial)
@@ -1495,11 +1514,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientAxial)
// Without the patch, symmetric linear gradient with full transparence outside and
// full opak in the middle were imported as full transparent.
createSdImpressDoc("odp/tdf128345_GradientAxial.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShapePropSet(getShapeFromPage(0, 0));
awt::Gradient2 aTransparenceGradient;
- xShapePropSet->getPropertyValue("FillTransparenceGradient") >>= aTransparenceGradient;
+ xShapePropSet->getPropertyValue(u"FillTransparenceGradient"_ustr) >>= aTransparenceGradient;
// MCGR: Use the completely imported gradient to check for correctness
const basegfx::BColorStops aColorStops
@@ -1518,51 +1537,54 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientAxial)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf134969TransparencyOnColorGradient)
{
createSdImpressDoc("odp/tdf134969_TransparencyOnColorGradient.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Make sure the shape has a transparency in gradient stops.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr, "60000");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr,
+ u"60000"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr,
+ u"60000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testArcTo)
{
createSdImpressDoc("pptx/arc-validiert.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPath("//a:custGeom/a:pathLst/a:path/a:arcTo"_ostr);
- assertXPath(pXmlDoc, sPath, "wR"_ostr, "3");
- assertXPath(pXmlDoc, sPath, "hR"_ostr, "3");
- assertXPath(pXmlDoc, sPath, "stAng"_ostr, "1800000");
- assertXPath(pXmlDoc, sPath, "swAng"_ostr, "2700000");
+ assertXPath(pXmlDoc, sPath, "wR"_ostr, u"3"_ustr);
+ assertXPath(pXmlDoc, sPath, "hR"_ostr, u"3"_ustr);
+ assertXPath(pXmlDoc, sPath, "stAng"_ostr, u"1800000"_ustr);
+ assertXPath(pXmlDoc, sPath, "swAng"_ostr, u"2700000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testNarrationMimeType)
{
createSdImpressDoc("pptx/narration.pptx");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: audio/mp4
// - Actual : application/vnd.sun.star.media
// i.e. the mime type of the narration was incorrect.
assertXPath(pXmlDoc,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/media/media1.m4a']"_ostr,
- "ContentType"_ostr, "audio/mp4");
+ "ContentType"_ostr, u"audio/mp4"_ustr);
// Check if the bitmap of the media shape is exported correctly.
- xmlDocUniquePtr pSlideDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pSlideDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
OUString aImageId
= getXPath(pSlideDoc, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip"_ostr, "embed"_ostr);
- xmlDocUniquePtr pRelsDoc = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
OUString aImagePath = "/rels:Relationships/rels:Relationship[@Id='" + aImageId + "']";
// Something like ../media/image2.png.
OUString aImageStreamName = getXPath(pRelsDoc, aImagePath.toUtf8(), "Target"_ostr);
- OUString aImageAbsName = rtl::Uri::convertRelToAbs("file:///ppt/slides/", aImageStreamName);
+ OUString aImageAbsName
+ = rtl::Uri::convertRelToAbs(u"file:///ppt/slides/"_ustr, aImageStreamName);
// Something like ppt/media/image2.png.
OUString aImageRelName;
CPPUNIT_ASSERT(aImageAbsName.startsWith("file:///", &aImageRelName));
@@ -1584,7 +1606,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testNarrationMimeType)
// Without the accompanying fix in place, this test would have failed with:
// - ... no attribute 'cmd' exist
// i.e. '<p:cmd type="call">' was written instead of '<p:cmd type="call" cmd="playFrom(0.0)">'.
- assertXPath(pSlideDoc, "//p:cmd"_ostr, "cmd"_ostr, "playFrom(0.0)");
+ assertXPath(pSlideDoc, "//p:cmd"_ostr, "cmd"_ostr, u"playFrom(0.0)"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -1595,113 +1617,115 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testNarrationMimeType)
// Without the accompanying fix in place, this test would have failed with:
// - ... no attribute 'showWhenStopped' exist
// i.e. <p:cMediaNode> had the default visibility -> bitmap was visible during slideshow.
- assertXPath(pSlideDoc, "//p:childTnLst/p:audio/p:cMediaNode"_ostr, "showWhenStopped"_ostr, "0");
+ assertXPath(pSlideDoc, "//p:childTnLst/p:audio/p:cMediaNode"_ostr, "showWhenStopped"_ostr,
+ u"0"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - ... no attribute 'isNarration' exist
// i.e. <p:audio> was not a narration -> could not mass-remove narrations on the UI.
- assertXPath(pSlideDoc, "//p:childTnLst/p:audio"_ostr, "isNarration"_ostr, "1");
+ assertXPath(pSlideDoc, "//p:childTnLst/p:audio"_ostr, "isNarration"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf150316)
{
createSdImpressDoc("odp/tdf150316.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:p/a:pPr"_ostr, "indent"_ostr,
- "-343080");
+ u"-343080"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf140865Wordart3D)
{
createSdImpressDoc("pptx/tdf140865Wordart3D.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);
// without the fix in place a:sp3d was lost on round trip, and so extrusion was lost.
constexpr OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr"_ostr);
- assertXPath(pXmlDoc, sPathStart + "/a:sp3d", "extrusionH"_ostr, "342900");
- assertXPath(pXmlDoc, sPathStart + "/a:sp3d", "contourW"_ostr, "12700");
- assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "w"_ostr, "114300");
- assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "h"_ostr, "38100");
- assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "prst"_ostr, "softRound");
- assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelB", "h"_ostr, "152400");
- assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:extrusionClr/a:srgbClr", "val"_ostr, "990000");
- assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:contourClr/a:srgbClr", "val"_ostr, "009876");
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d", "extrusionH"_ostr, u"342900"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d", "contourW"_ostr, u"12700"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "w"_ostr, u"114300"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "h"_ostr, u"38100"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelT", "prst"_ostr, u"softRound"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:bevelB", "h"_ostr, u"152400"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:extrusionClr/a:srgbClr", "val"_ostr,
+ u"990000"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:sp3d/a:contourClr/a:srgbClr", "val"_ostr, u"009876"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf124457)
{
createSdImpressDoc("pptx/tdf124457.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(
pXmlDoc,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
"p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par[1]/p:cTn"_ostr,
- "repeatCount"_ostr, "3000");
+ "repeatCount"_ostr, u"3000"_ustr);
assertXPath(
pXmlDoc,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
"p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par[2]/p:cTn"_ostr,
- "repeatCount"_ostr, "indefinite");
+ "repeatCount"_ostr, u"indefinite"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf143126)
{
createSdImpressDoc("pptx/tdf143126.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/presProps.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presProps.xml"_ustr);
- assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "showNarration"_ostr, "1");
- assertXPath(pXmlDoc, "/p:presentationPr/p:showPr/p:sldRg"_ostr, "st"_ostr, "2");
- assertXPath(pXmlDoc, "/p:presentationPr/p:showPr/p:sldRg"_ostr, "end"_ostr, "3");
+ assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "showNarration"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/p:presentationPr/p:showPr/p:sldRg"_ostr, "st"_ostr, u"2"_ustr);
+ assertXPath(pXmlDoc, "/p:presentationPr/p:showPr/p:sldRg"_ostr, "end"_ostr, u"3"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf143129)
{
createSdImpressDoc("pptx/tdf143129.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/presProps.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presProps.xml"_ustr);
- assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "showNarration"_ostr, "1");
- assertXPath(pXmlDoc, "/p:presentationPr/p:showPr/p:custShow"_ostr, "id"_ostr, "0");
+ assertXPath(pXmlDoc, "/p:presentationPr/p:showPr"_ostr, "showNarration"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/p:presentationPr/p:showPr/p:custShow"_ostr, "id"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf118045)
{
createSdImpressDoc("odp/tdf118045.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr/a:lnSpc/a:spcPct"_ostr,
- "val"_ostr, "110000");
+ "val"_ostr, u"110000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf137675)
{
createSdImpressDoc("pptx/tdf137675.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path"_ostr,
- "fill"_ostr, "none");
+ "fill"_ostr, u"none"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf151134)
{
createSdImpressDoc("pptx/tdf151134.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr"_ostr, "lIns"_ostr,
- "91440");
+ u"91440"_ustr);
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 4abd5859aa7d..de161cbd877b 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -73,7 +73,7 @@ class SdOOXMLExportTest2 : public SdModelTestBase
{
public:
SdOOXMLExportTest2()
- : SdModelTestBase("/sd/qa/unit/data/")
+ : SdModelTestBase(u"/sd/qa/unit/data/"_ustr)
{
}
};
@@ -85,220 +85,220 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testRepeatBitmapMode)
if (!IsDefaultDPI())
return;
createSdImpressDoc("odp/repeatBitmapMode.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "tx"_ostr,
- "1269669");
+ u"1269669"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "ty"_ostr,
- "186051");
+ u"186051"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "sx"_ostr,
- "100000");
+ u"100000"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "sy"_ostr,
- "100000");
+ u"100000"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "algn"_ostr,
- "tr");
+ u"tr"_ustr);
// if the "Scale" setting is checked in the images settings dialog.
- xmlDocUniquePtr pXmlDocContent2 = parseExport("ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "tx"_ostr,
- "0");
+ u"0"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "ty"_ostr,
- "0");
+ u"0"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "sx"_ostr,
- "682760");
+ u"682760"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "sy"_ostr,
- "639983");
+ u"639983"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:tile"_ostr, "algn"_ostr,
- "ctr");
+ u"ctr"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf153107)
{
createSdImpressDoc("odp/tdf153107.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// placeholder
- xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:blipFill/a:tile"_ostr,
- "tx"_ostr, "1879200");
+ "tx"_ostr, u"1879200"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:blipFill/a:tile"_ostr,
- "ty"_ostr, "83628");
+ "ty"_ostr, u"83628"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:blipFill/a:tile"_ostr,
- "sx"_ostr, "264773");
+ "sx"_ostr, u"264773"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:blipFill/a:tile"_ostr,
- "sy"_ostr, "91428");
+ "sy"_ostr, u"91428"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:blipFill/a:tile"_ostr,
- "algn"_ostr, "ctr");
+ "algn"_ostr, u"ctr"_ustr);
// custom shape
- xmlDocUniquePtr pXmlDocContent2 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:blipFill/a:tile"_ostr,
- "tx"_ostr, "198000");
+ "tx"_ostr, u"198000"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:blipFill/a:tile"_ostr,
- "ty"_ostr, "324000");
+ "ty"_ostr, u"324000"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:blipFill/a:tile"_ostr,
- "sx"_ostr, "69743");
+ "sx"_ostr, u"69743"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:blipFill/a:tile"_ostr,
- "sy"_ostr, "78709");
+ "sy"_ostr, u"78709"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:blipFill/a:tile"_ostr,
- "algn"_ostr, "tl");
+ "algn"_ostr, u"tl"_ustr);
// polygon
- xmlDocUniquePtr pXmlDocContent3 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent3 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent3, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:blipFill/a:tile"_ostr,
- "tx"_ostr, "2073600");
+ "tx"_ostr, u"2073600"_ustr);
assertXPath(pXmlDocContent3, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:blipFill/a:tile"_ostr,
- "ty"_ostr, "221760");
+ "ty"_ostr, u"221760"_ustr);
assertXPath(pXmlDocContent3, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:blipFill/a:tile"_ostr,
- "sx"_ostr, "182602");
+ "sx"_ostr, u"182602"_ustr);
assertXPath(pXmlDocContent3, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:blipFill/a:tile"_ostr,
- "sy"_ostr, "86580");
+ "sy"_ostr, u"86580"_ustr);
assertXPath(pXmlDocContent3, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:blipFill/a:tile"_ostr,
- "algn"_ostr, "ctr");
+ "algn"_ostr, u"ctr"_ustr);
// textbox
- xmlDocUniquePtr pXmlDocContent4 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent4 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent4, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:spPr/a:blipFill/a:tile"_ostr,
- "tx"_ostr, "662400");
+ "tx"_ostr, u"662400"_ustr);
assertXPath(pXmlDocContent4, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:spPr/a:blipFill/a:tile"_ostr,
- "ty"_ostr, "760320");
+ "ty"_ostr, u"760320"_ustr);
assertXPath(pXmlDocContent4, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:spPr/a:blipFill/a:tile"_ostr,
- "sx"_ostr, "202891");
+ "sx"_ostr, u"202891"_ustr);
assertXPath(pXmlDocContent4, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:spPr/a:blipFill/a:tile"_ostr,
- "sy"_ostr, "129870");
+ "sy"_ostr, u"129870"_ustr);
assertXPath(pXmlDocContent4, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:spPr/a:blipFill/a:tile"_ostr,
- "algn"_ostr, "tl");
+ "algn"_ostr, u"tl"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf142291)
{
createSdImpressDoc("pptx/tdt142291.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr/a:tc[1]/"
"a:tcPr/a:lnL/a:prstDash"_ostr,
- "val"_ostr, "sysDashDotDot");
+ "val"_ostr, u"sysDashDotDot"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr/a:tc[1]/"
"a:tcPr/a:lnR/a:prstDash"_ostr,
- "val"_ostr, "dot");
+ "val"_ostr, u"dot"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr/a:tc[1]/"
"a:tcPr/a:lnT/a:prstDash"_ostr,
- "val"_ostr, "solid");
+ "val"_ostr, u"solid"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr/a:tc[1]/"
"a:tcPr/a:lnB/a:prstDash"_ostr,
- "val"_ostr, "dash");
+ "val"_ostr, u"dash"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr/a:tc[2]/"
"a:tcPr/a:lnR/a:prstDash"_ostr,
- "val"_ostr, "dashDot");
+ "val"_ostr, u"dashDot"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf151492)
{
createSdImpressDoc("odp/tdf151492.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr, "idx"_ostr,
- "0");
+ u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf149697)
{
createSdImpressDoc("pptx/tdf149697.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:cxnSp[1]/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr,
- "idx"_ostr, "5");
+ "idx"_ostr, u"5"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:cxnSp[1]/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr,
- "idx"_ostr, "4");
+ "idx"_ostr, u"4"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn"_ostr,
- "idx"_ostr, "3");
+ "idx"_ostr, u"3"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:nvCxnSpPr/p:cNvCxnSpPr/a:endCxn"_ostr,
- "idx"_ostr, "1");
+ "idx"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf149126)
{
createSdImpressDoc("odp/tdf149126.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom"_ostr, "prst"_ostr,
- "triangle");
+ u"triangle"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf131905)
{
createSdImpressDoc("pptx/tdf131905.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(
pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr[1]/a:tc/a:tcPr"_ostr,
- "anchor"_ostr, "t");
+ "anchor"_ostr, u"t"_ustr);
assertXPath(
pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr[2]/a:tc/a:tcPr"_ostr,
- "anchor"_ostr, "ctr");
+ "anchor"_ostr, u"ctr"_ustr);
assertXPath(
pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr[3]/a:tc/a:tcPr"_ostr,
- "anchor"_ostr, "b");
+ "anchor"_ostr, u"b"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf93883)
{
createSdImpressDoc("odp/tdf93883.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT(!xPropSet->getPropertyValue("NumberingLevel").hasValue());
+ CPPUNIT_ASSERT(!xPropSet->getPropertyValue(u"NumberingLevel"_ustr).hasValue());
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testBnc822341)
{
// Check import / export of embedded text document
createSdImpressDoc("odp/bnc822341.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Export an LO specific ole object (imported from an ODP document)
{
- xmlDocUniquePtr pXmlDocCT = parseExport("[Content_Types].xml");
+ xmlDocUniquePtr pXmlDocCT = parseExport(u"[Content_Types].xml"_ustr);
assertXPath(pXmlDocCT,
"/ContentType:Types/ContentType:Override[@ContentType='application/"
"vnd.openxmlformats-officedocument.wordprocessingml.document']"_ostr,
- "PartName"_ostr, "/ppt/embeddings/oleObject1.docx");
+ "PartName"_ostr, u"/ppt/embeddings/oleObject1.docx"_ustr);
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
assertXPath(
pXmlDocRels,
"/rels:Relationships/rels:Relationship[@Target='../embeddings/oleObject1.docx']"_ostr,
"Type"_ostr,
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/p:oleObj"_ostr,
- "progId"_ostr, "Word.Document.12");
+ "progId"_ostr, u"Word.Document.12"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -307,27 +307,27 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testBnc822341)
CPPUNIT_ASSERT_EQUAL(SdrObjKind::OLE2, pObj->GetObjIdentifier());
}
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Export an MS specific ole object (imported from a PPTX document)
{
- xmlDocUniquePtr pXmlDocCT = parseExport("[Content_Types].xml");
+ xmlDocUniquePtr pXmlDocCT = parseExport(u"[Content_Types].xml"_ustr);
assertXPath(pXmlDocCT,
"/ContentType:Types/ContentType:Override[@ContentType='application/"
"vnd.openxmlformats-officedocument.wordprocessingml.document']"_ostr,
- "PartName"_ostr, "/ppt/embeddings/oleObject1.docx");
+ "PartName"_ostr, u"/ppt/embeddings/oleObject1.docx"_ustr);
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
assertXPath(
pXmlDocRels,
"/rels:Relationships/rels:Relationship[@Target='../embeddings/oleObject1.docx']"_ostr,
"Type"_ostr,
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/p:oleObj"_ostr,
- "progId"_ostr, "Word.Document.12");
+ "progId"_ostr, u"Word.Document.12"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -341,17 +341,17 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testMathObject)
{
// Check import / export of math object
createSdImpressDoc("odp/math.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Export an LO specific ole object (imported from an ODP document)
{
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice"_ostr,
- "Requires"_ostr, "a14");
+ "Requires"_ostr, u"a14"_ustr);
assertXPathContent(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice/p:sp/p:txBody/a:p/"
"a14:m/m:oMath/m:r[1]/m:t"_ostr,
- "a");
+ u"a"_ustr);
const SdrPage* pPage = GetPage(1);
const SdrObject* pObj = pPage->GetObj(0);
@@ -359,17 +359,17 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testMathObject)
CPPUNIT_ASSERT_EQUAL(SdrObjKind::OLE2, pObj->GetObjIdentifier());
}
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Export an MS specific ole object (imported from a PPTX document)
{
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice"_ostr,
- "Requires"_ostr, "a14");
+ "Requires"_ostr, u"a14"_ustr);
assertXPathContent(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice/p:sp/p:txBody/a:p/"
"a14:m/m:oMath/m:r[1]/m:t"_ostr,
- "a");
+ u"a"_ustr);
const SdrPage* pPage = GetPage(1);
const SdrObject* pObj = pPage->GetObj(0);
@@ -382,13 +382,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testMathObjectPPT2010)
{
// Check import / export of math object
createSdImpressDoc("pptx/Math.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Export an MS specific ole object (imported from a PPTX document)
{
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice"_ostr,
- "Requires"_ostr, "a14");
+ "Requires"_ostr, u"a14"_ustr);
assertXPathContent(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice/p:sp/p:txBody/a:p/"
"a14:m/m:oMath/m:sSup/m:e/m:r[1]/m:t"_ostr,
@@ -404,7 +404,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testMathObjectPPT2010)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf119015)
{
createSdImpressDoc("pptx/tdf119015.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -418,13 +418,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf119015)
// Test that we actually have three cells: this threw css.lang.IndexOutOfBoundsException
uno::Reference<text::XTextRange> xTextRange(xTable->getCellByPosition(1, 0),
uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(OUString("A3"), xTextRange->getString());
+ CPPUNIT_ASSERT_EQUAL(u"A3"_ustr, xTextRange->getString());
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf123090)
{
createSdImpressDoc("pptx/tdf123090.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -436,19 +436,19 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf123090)
// Test that we actually have two cells: this threw css.lang.IndexOutOfBoundsException
uno::Reference<text::XTextRange> xTextRange(xTable->getCellByPosition(1, 0),
uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(OUString("aaa"), xTextRange->getString());
+ CPPUNIT_ASSERT_EQUAL(u"aaa"_ustr, xTextRange->getString());
sal_Int32 nWidth;
uno::Reference<css::table::XTableColumns> xColumns(xTable->getColumns(), uno::UNO_SET_THROW);
uno::Reference<beans::XPropertySet> xRefColumn(xColumns->getByIndex(1), uno::UNO_QUERY_THROW);
- xRefColumn->getPropertyValue("Width") >>= nWidth;
+ xRefColumn->getPropertyValue(u"Width"_ustr) >>= nWidth;
CPPUNIT_ASSERT_EQUAL(sal_Int32(9136), nWidth);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf126324)
{
createSdImpressDoc("pptx/tdf126324.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xPage.is());
@@ -456,7 +456,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf126324)
CPPUNIT_ASSERT(xShape.is());
uno::Reference<text::XText> xText
= uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY_THROW)->getText();
- CPPUNIT_ASSERT_EQUAL(OUString("17"), xText->getString());
+ CPPUNIT_ASSERT_EQUAL(u"17"_ustr, xText->getString());
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf119187)
@@ -479,7 +479,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf119187)
= rProperties.GetItem(SDRATTR_TEXT_VERTADJUST);
const SdrTextVertAdjust eTVA = rSdrTextVertAdjustItem.GetValue();
CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_TOP, eTVA);
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
}
}
@@ -496,13 +496,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf132472)
Color nColor;
xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("FillColor") >>= nColor;
+ xCell->getPropertyValue(u"FillColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0x729fcf), nColor);
uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xCell));
uno::Reference<text::XTextRange> xRun(getRunFromParagraph(0, xParagraph));
uno::Reference<beans::XPropertySet> xPropSet(xRun, uno::UNO_QUERY);
- xPropSet->getPropertyValue("CharColor") >>= nColor;
+ xPropSet->getPropertyValue(u"CharColor"_ustr) >>= nColor;
// Without the fix in place, this test would have failed with
// - Expected: Color: R:0 G:0 B:0 A:0
@@ -513,14 +513,14 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf132472)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf80224)
{
createSdImpressDoc("odp/tdf80224.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<beans::XPropertySet> xPropSet(xParagraph->getStart(), uno::UNO_QUERY_THROW);
Color nCharColor;
- xPropSet->getPropertyValue("CharColor") >>= nCharColor;
+ xPropSet->getPropertyValue(u"CharColor"_ustr) >>= nCharColor;
CPPUNIT_ASSERT_EQUAL(Color(0x6562ac), nCharColor);
}
@@ -537,9 +537,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf91378)
uno::Reference<beans::XPropertySet> xUDProps(xProps->getUserDefinedProperties(),
uno::UNO_QUERY);
OUString propValue;
- xUDProps->getPropertyValue("Testing") >>= propValue;
+ xUDProps->getPropertyValue(u"Testing"_ustr) >>= propValue;
CPPUNIT_ASSERT(propValue.isEmpty());
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
}
}
@@ -558,7 +558,7 @@ static bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> co
uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
sal_Int16 nTransitionType = 0;
- xPropSet->getPropertyValue("TransitionType") >>= nTransitionType;
+ xPropSet->getPropertyValue(u"TransitionType"_ustr) >>= nTransitionType;
if (nExpectedTransitionType != nTransitionType)
{
@@ -568,7 +568,7 @@ static bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> co
}
sal_Int16 nTransitionSubtype = 0;
- xPropSet->getPropertyValue("TransitionSubtype") >>= nTransitionSubtype;
+ xPropSet->getPropertyValue(u"TransitionSubtype"_ustr) >>= nTransitionSubtype;
if (nExpectedTransitionSubType != nTransitionSubtype)
{
std::cerr << "Transition Subtype: " << nTransitionSubtype << " "
@@ -577,7 +577,7 @@ static bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> co
}
bool bDirection = false;
- xPropSet->getPropertyValue("TransitionDirection") >>= bDirection;
+ xPropSet->getPropertyValue(u"TransitionDirection"_ustr) >>= bDirection;
if (bExpectedDirection != bDirection)
{
@@ -592,7 +592,7 @@ static bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> co
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testExportTransitionsPPTX)
{
createSdImpressDoc("AllTransitions.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
// WIPE TRANSITIONS
@@ -745,9 +745,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPresetShapesExport)
"val 3770",
};
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocCT = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocCT = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OStringLiteral sT("_T_");
static constexpr OStringLiteral sN("_N_");
static constexpr OStringLiteral sPropertyName("name");
@@ -781,17 +781,17 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf92527)
uno::Reference<drawing::XDrawPage> xPage1(getPage(0));
uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape1(
- xFactory->createInstance("com.sun.star.drawing.CustomShape"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.drawing.CustomShape"_ustr), uno::UNO_QUERY);
xPage1->add(xShape1);
xShape1->setSize(awt::Size(10000, 10000));
xShape1->setPosition(awt::Point(1000, 1000));
uno::Sequence<beans::PropertyValue> aShapeGeometry(comphelper::InitPropertySequence({
- { "Type", uno::Any(OUString("diamond")) },
+ { "Type", uno::Any(u"diamond"_ustr) },
}));
uno::Reference<beans::XPropertySet> xPropertySet1(xShape1, uno::UNO_QUERY);
- xPropertySet1->setPropertyValue("CustomShapeGeometry", uno::Any(aShapeGeometry));
+ xPropertySet1->setPropertyValue(u"CustomShapeGeometry"_ustr, uno::Any(aShapeGeometry));
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc2(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPage> xPage2(xDoc2->getDrawPages()->getByIndex(0),
@@ -799,7 +799,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf92527)
uno::Reference<drawing::XShape> xShape2(xPage2->getByIndex(0), uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xPropertySet2(xShape2, uno::UNO_QUERY_THROW);
uno::Sequence<beans::PropertyValue> aProps;
- xPropertySet2->getPropertyValue("CustomShapeGeometry") >>= aProps;
+ xPropertySet2->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aProps;
uno::Sequence<beans::PropertyValue> aPathProps;
for (beans::PropertyValue const& rProp : aProps)
{
@@ -824,7 +824,7 @@ void matchNumberFormat(int nPage, uno::Reference<text::XTextField> const& xField
{
uno::Reference<beans::XPropertySet> xPropSet(xField, uno::UNO_QUERY_THROW);
sal_Int32 nNumFmt;
- xPropSet->getPropertyValue("NumberFormat") >>= nNumFmt;
+ xPropSet->getPropertyValue(u"NumberFormat"_ustr) >>= nNumFmt;
switch (nPage)
{
case 0: // 13/02/96 (StdSmall)
@@ -871,7 +871,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testDatetimeFieldNumberFormat)
{
createSdImpressDoc("odp/numfmt.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
for (sal_uInt16 i = 0; i <= 8; ++i)
{
@@ -883,7 +883,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testDatetimeFieldNumberFormatPPTX)
{
createSdImpressDoc("pptx/numfmt.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
for (sal_uInt16 i = 0; i <= 8; ++i)
{
@@ -895,7 +895,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSlideNumberField)
{
createSdImpressDoc("odp/slidenum_field.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
@@ -905,7 +905,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSlideNumberFieldPPTX)
{
createSdImpressDoc("pptx/slidenum_field.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
@@ -915,7 +915,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSlideCountField)
{
createSdImpressDoc("odp/slidecount_field.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
@@ -925,7 +925,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSlideNameField)
{
createSdImpressDoc("odp/slidename_field.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
@@ -935,7 +935,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testExtFileField)
{
createSdImpressDoc("odp/extfile_field.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
for (sal_uInt16 i = 0; i <= 3; ++i)
{
@@ -944,7 +944,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testExtFileField)
uno::Reference<beans::XPropertySet> xPropSet(xField, uno::UNO_QUERY_THROW);
sal_Int32 nNumFmt;
- xPropSet->getPropertyValue("FileFormat") >>= nNumFmt;
+ xPropSet->getPropertyValue(u"FileFormat"_ustr) >>= nNumFmt;
switch (i)
{
case 0: // Path/File name
@@ -966,7 +966,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAuthorField)
{
createSdImpressDoc("odp/author_field.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
@@ -975,7 +975,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAuthorField)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf99224)
{
createSdImpressDoc("odp/tdf99224.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
// This was 0: the image with text was lost on export.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xPage->getCount());
@@ -984,7 +984,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf99224)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf92076)
{
createSdImpressDoc("odp/tdf92076.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xPage->getCount());
}
@@ -992,8 +992,8 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf92076)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf59046)
{
createSdImpressDoc("odp/tdf59046.odp");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path"_ostr,
1);
}
@@ -1001,24 +1001,24 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf59046)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf133502)
{
createSdImpressDoc("odp/tdf133502.odp");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/comments/comment1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/comments/comment1.xml"_ustr);
- assertXPathContent(pXmlDocRels, "/p:cmLst/p:cm/p:text"_ostr, "Test for creator-initials");
+ assertXPathContent(pXmlDocRels, "/p:cmLst/p:cm/p:text"_ostr, u"Test for creator-initials"_ustr);
// Without the fix in place, the comment position would have been 0,0
- assertXPath(pXmlDocRels, "/p:cmLst/p:cm/p:pos"_ostr, "x"_ostr, "2032");
- assertXPath(pXmlDocRels, "/p:cmLst/p:cm/p:pos"_ostr, "y"_ostr, "1029");
+ assertXPath(pXmlDocRels, "/p:cmLst/p:cm/p:pos"_ostr, "x"_ostr, u"2032"_ustr);
+ assertXPath(pXmlDocRels, "/p:cmLst/p:cm/p:pos"_ostr, "y"_ostr, u"1029"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf105739)
{
// Gradient was lost during saving to ODP
createSdImpressDoc("pptx/tdf105739.pptx");
- save("impress8");
+ save(u"impress8"_ustr);
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
- uno::Any aAny = xPropSet->getPropertyValue("Background");
+ uno::Any aAny = xPropSet->getPropertyValue(u"Background"_ustr);
CPPUNIT_ASSERT(aAny.hasValue());
if (aAny.hasValue())
{
@@ -1027,12 +1027,12 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf105739)
// Test fill type
drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
- aXBackgroundPropSet->getPropertyValue("FillStyle") >>= aFillStyle;
+ aXBackgroundPropSet->getPropertyValue(u"FillStyle"_ustr) >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(int(drawing::FillStyle_GRADIENT), static_cast<int>(aFillStyle));
// Test gradient properties
com::sun::star::awt::Gradient2 aFillGradient;
- aXBackgroundPropSet->getPropertyValue("FillGradient") >>= aFillGradient;
+ aXBackgroundPropSet->getPropertyValue(u"FillGradient"_ustr) >>= aFillGradient;
// MCGR: Use the completely imported gradient to check for correctness
const basegfx::BColorStops aColorStops
@@ -1051,7 +1051,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPageBitmapWithTransparency)
{
createSdImpressDoc("pptx/page_transparent_bitmap.pptx");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly one page", static_cast<sal_Int32>(1),
xDoc->getDrawPages()->getCount());
@@ -1059,13 +1059,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPageBitmapWithTransparency)
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
- uno::Any aAny = xPropSet->getPropertyValue("Background");
+ uno::Any aAny = xPropSet->getPropertyValue(u"Background"_ustr);
CPPUNIT_ASSERT_MESSAGE("Slide background is missing", aAny.hasValue());
uno::Reference<beans::XPropertySet> aXBackgroundPropSet;
aAny >>= aXBackgroundPropSet;
sal_Int32 nTransparence;
- aAny = aXBackgroundPropSet->getPropertyValue("FillTransparence");
+ aAny = aXBackgroundPropSet->getPropertyValue(u"FillTransparence"_ustr);
aAny >>= nTransparence;
CPPUNIT_ASSERT_EQUAL_MESSAGE("Slide background transparency is wrong", sal_Int32(49),
nTransparence);
@@ -1074,26 +1074,29 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPageBitmapWithTransparency)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPptmContentType)
{
createSdImpressDoc("pptm/macro.pptm");
- save("Impress MS PowerPoint 2007 XML VBA");
+ save(u"Impress MS PowerPoint 2007 XML VBA"_ustr);
// Assert that the content type is the one of PPTM
- xmlDocUniquePtr pXmlContentType = parseExport("[Content_Types].xml");
+ xmlDocUniquePtr pXmlContentType = parseExport(u"[Content_Types].xml"_ustr);
assertXPath(pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/presentation.xml']"_ostr,
"ContentType"_ostr,
- "application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml");
+ u"application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111798)
{
createSdImpressDoc("odp/tdf111798.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);
- const OUString data[][11] = { { "2700000", "2458080", "2414880", "1439640", "1440000", "gd[1]",
- "adj1", "val 50000", "gd[2]", "adj2", "val 25000" },
- { "2700000", "6778080", "2414880", "1439640", "1440000", "gd[1]",
- "adj1", "val 50000", "gd[2]", "adj2", "val 25006" } };
+ const OUString data[][11]
+ = { { u"2700000"_ustr, u"2458080"_ustr, u"2414880"_ustr, u"1439640"_ustr, u"1440000"_ustr,
+ u"gd[1]"_ustr, u"adj1"_ustr, u"val 50000"_ustr, u"gd[2]"_ustr, u"adj2"_ustr,
+ u"val 25000"_ustr },
+ { u"2700000"_ustr, u"6778080"_ustr, u"2414880"_ustr, u"1439640"_ustr, u"1440000"_ustr,
+ u"gd[1]"_ustr, u"adj1"_ustr, u"val 50000"_ustr, u"gd[2]"_ustr, u"adj2"_ustr,
+ u"val 25006"_ustr } };
for (size_t nShapeIndex = 0; nShapeIndex < SAL_N_ELEMENTS(data); nShapeIndex++)
{
@@ -1123,35 +1126,35 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111798)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPptmVBAStream)
{
createSdImpressDoc("pptm/macro.pptm");
- save("Impress MS PowerPoint 2007 XML VBA");
+ save(u"Impress MS PowerPoint 2007 XML VBA"_ustr);
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
maTempFile.GetURL());
// This failed: VBA stream was not roundtripped
- CPPUNIT_ASSERT(xNameAccess->hasByName("ppt/vbaProject.bin"));
+ CPPUNIT_ASSERT(xNameAccess->hasByName(u"ppt/vbaProject.bin"_ustr));
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111863)
{
createSdImpressDoc("pptx/tdf111863.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// check that transition attribute didn't change from 'out' to 'in'
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(
pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/"
"p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:animEffect"_ostr,
- "transition"_ostr, "out");
+ "transition"_ostr, u"out"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111518)
{
createSdImpressDoc("pptx/tdf111518.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
OUString sActual = getXPath(pXmlDocRels,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
"p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/"
@@ -1163,60 +1166,60 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111518)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf100387)
{
createSdImpressDoc("odp/tdf100387.odp");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn"_ostr,
- "dur"_ostr, "indefinite");
+ "dur"_ostr, u"indefinite"_ustr);
assertXPath(
pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par[1]/p:cTn"_ostr,
- "fill"_ostr, "hold");
+ "fill"_ostr, u"hold"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par[1]/p:cTn/p:childTnLst/p:par/p:cTn"_ostr,
- "fill"_ostr, "hold");
+ "fill"_ostr, u"hold"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par[1]"
"/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/"
"p:cBhvr/p:tgtEl/p:spTgt/p:txEl/p:pRg"_ostr,
- "st"_ostr, "0");
+ "st"_ostr, u"0"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par[1]"
"/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/"
"p:cBhvr/p:tgtEl/p:spTgt/p:txEl/p:pRg"_ostr,
- "end"_ostr, "0");
+ "end"_ostr, u"0"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par[2]"
"/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/"
"p:cBhvr/p:tgtEl/p:spTgt/p:txEl/p:pRg"_ostr,
- "st"_ostr, "1");
+ "st"_ostr, u"1"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par[2]"
"/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/"
"p:cBhvr/p:tgtEl/p:spTgt/p:txEl/p:pRg"_ostr,
- "end"_ostr, "1");
+ "end"_ostr, u"1"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par[3]"
"/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/"
"p:cBhvr/p:tgtEl/p:spTgt/p:txEl/p:pRg"_ostr,
- "st"_ostr, "2");
+ "st"_ostr, u"2"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par[3]"
"/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/"
"p:cBhvr/p:tgtEl/p:spTgt/p:txEl/p:pRg"_ostr,
- "end"_ostr, "2");
+ "end"_ostr, u"2"_ustr);
}
// tdf#126746 Add support for Line Caps import and export
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testClosingShapesAndLineCaps)
{
createSdImpressDoc("odp/closed-shapes.odp");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(
pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo/a:pt"_ostr, 1);
@@ -1230,28 +1233,28 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testClosingShapesAndLineCaps)
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:close"_ostr,
1);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:ln"_ostr, "cap"_ostr,
- "rnd");
+ u"rnd"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:ln/a:miter"_ostr, 1);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/a:close"_ostr,
0);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:ln"_ostr, "cap"_ostr,
- "rnd");
+ u"rnd"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:ln/a:miter"_ostr, 1);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:custGeom/a:pathLst/a:path/a:close"_ostr,
0);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:ln"_ostr, "cap"_ostr,
- "rnd");
+ u"rnd"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:ln/a:miter"_ostr, 1);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[4]/p:spPr/a:custGeom/a:pathLst/a:path/a:close"_ostr,
0);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:spPr/a:ln"_ostr, "cap"_ostr,
- "sq");
+ u"sq"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:spPr/a:ln/a:round"_ostr, 1);
assertXPath(pXmlDocContent,
@@ -1272,19 +1275,21 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testClosingShapesAndLineCaps)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testRotateFlip)
{
createSdImpressDoc("odp/rotate_flip.odp");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
const OUString data[][4] = { // flipH flipV x y
- { "0", "1", "1170000", "1035720" },
- { "1", "1", "7108560", "1036440" },
- { "1", "0", "4140000", "1036440" }
+ { u"0"_ustr, u"1"_ustr, u"1170000"_ustr, u"1035720"_ustr },
+ { u"1"_ustr, u"1"_ustr, u"7108560"_ustr, u"1036440"_ustr },
+ { u"1"_ustr, u"0"_ustr, u"4140000"_ustr, u"1036440"_ustr }
};
- const OUString points[][2]
- = { { "221", "293" }, { "506", "12" }, { "367", "0" }, { "29", "406" },
- { "431", "347" }, { "145", "645" }, { "99", "520" }, { "0", "861" },
- { "326", "765" }, { "209", "711" }, { "640", "233" }, { "640", "233" } };
+ const OUString points[][2] = { { u"221"_ustr, u"293"_ustr }, { u"506"_ustr, u"12"_ustr },
+ { u"367"_ustr, u"0"_ustr }, { u"29"_ustr, u"406"_ustr },
+ { u"431"_ustr, u"347"_ustr }, { u"145"_ustr, u"645"_ustr },
+ { u"99"_ustr, u"520"_ustr }, { u"0"_ustr, u"861"_ustr },
+ { u"326"_ustr, u"765"_ustr }, { u"209"_ustr, u"711"_ustr },
+ { u"640"_ustr, u"233"_ustr }, { u"640"_ustr, u"233"_ustr } };
for (size_t nShapeIndex = 0; nShapeIndex < SAL_N_ELEMENTS(data); nShapeIndex++)
{
@@ -1294,16 +1299,16 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testRotateFlip)
= "/p:sld/p:cSld/p:spTree/p:sp[" + OString::number(nShapeIndex + 1) + "]/p:spPr";
const OString sXfrm = sSpPr + "/a:xfrm";
if (data[nShapeIndex][nDataIndex++] == "1")
- assertXPath(pXmlDocContent, sXfrm, "flipH"_ostr, "1");
+ assertXPath(pXmlDocContent, sXfrm, "flipH"_ostr, u"1"_ustr);
if (data[nShapeIndex][nDataIndex++] == "1")
- assertXPath(pXmlDocContent, sXfrm, "flipV"_ostr, "1");
- assertXPath(pXmlDocContent, sXfrm, "rot"_ostr, "20400000");
+ assertXPath(pXmlDocContent, sXfrm, "flipV"_ostr, u"1"_ustr);
+ assertXPath(pXmlDocContent, sXfrm, "rot"_ostr, u"20400000"_ustr);
const OString sOff = sXfrm + "/a:off";
assertXPath(pXmlDocContent, sOff, "x"_ostr, data[nShapeIndex][nDataIndex++]);
assertXPath(pXmlDocContent, sOff, "y"_ostr, data[nShapeIndex][nDataIndex++]);
const OString sExt = sXfrm + "/a:ext";
- assertXPath(pXmlDocContent, sExt, "cx"_ostr, "1800000");
- assertXPath(pXmlDocContent, sExt, "cy"_ostr, "3600000");
+ assertXPath(pXmlDocContent, sExt, "cx"_ostr, u"1800000"_ustr);
+ assertXPath(pXmlDocContent, sExt, "cy"_ostr, u"3600000"_ustr);
for (size_t nPointIndex = 0; nPointIndex < SAL_N_ELEMENTS(points); nPointIndex++)
{
@@ -1319,25 +1324,24 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testRotateFlip)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106867)
{
createSdImpressDoc("pptx/tdf106867.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
// first check that we have the media object
const SdrMediaObj* pMediaObj = dynamic_cast<SdrMediaObj*>(pPage->GetObj(2));
CPPUNIT_ASSERT_MESSAGE("no media object", pMediaObj != nullptr);
- CPPUNIT_ASSERT_EQUAL(OUString("vnd.sun.star.Package:ppt/media/media1.avi"),
- pMediaObj->getURL());
+ CPPUNIT_ASSERT_EQUAL(u"vnd.sun.star.Package:ppt/media/media1.avi"_ustr, pMediaObj->getURL());
// additional checks of the output file
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
maTempFile.GetURL());
// check that the document contains the video stream
- CPPUNIT_ASSERT(xNameAccess->hasByName("ppt/media/media1.avi"));
+ CPPUNIT_ASSERT(xNameAccess->hasByName(u"ppt/media/media1.avi"_ustr));
// both the ooxml and the extended markup
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:nvPr/a:videoFile"_ostr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:nvPr/p:extLst/p:ext/p14:media"_ostr);
@@ -1347,30 +1351,30 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106867)
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/"
"p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:cmd/"
"p:cBhvr/p:tgtEl/p:spTgt"_ostr,
- "spid"_ostr, "67");
+ "spid"_ostr, u"67"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112280)
{
createSdImpressDoc("pptx/tdf112280.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// check the animRot value
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(
pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/"
"p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:animRot"_ostr,
- "by"_ostr, "21600000");
+ "by"_ostr, u"21600000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112088)
{
createSdImpressDoc("pptx/tdf112088.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// check gradient stops
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPathChildren(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:gradFill/a:gsLst"_ostr, 2);
}
@@ -1378,160 +1382,160 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112088)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112333)
{
createSdImpressDoc("pptx/tdf112333.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
OUString sTo = getXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
"p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/"
"p:cTn/p:childTnLst/p:set[1]/p:to/p:strVal"_ostr,
"val"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("solid"), sTo);
+ CPPUNIT_ASSERT_EQUAL(u"solid"_ustr, sTo);
OUString sAttributeName = getXPathContent(
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/"
"p:childTnLst/p:set[1]/p:cBhvr/p:attrNameLst/p:attrName"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("fill.type"), sAttributeName);
+ CPPUNIT_ASSERT_EQUAL(u"fill.type"_ustr, sAttributeName);
sTo = getXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/"
"p:set[2]/p:to/p:strVal"_ostr,
"val"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("true"), sTo);
+ CPPUNIT_ASSERT_EQUAL(u"true"_ustr, sTo);
sAttributeName = getXPathContent(
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/"
"p:childTnLst/p:set[2]/p:cBhvr/p:attrNameLst/p:attrName"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("fill.on"), sAttributeName);
+ CPPUNIT_ASSERT_EQUAL(u"fill.on"_ustr, sAttributeName);
sTo = getXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/"
"p:animClr/p:to/a:srgbClr"_ostr,
"val"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("0563c1"), sTo);
+ CPPUNIT_ASSERT_EQUAL(u"0563c1"_ustr, sTo);
sAttributeName = getXPathContent(
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/"
"p:childTnLst/p:animClr/p:cBhvr/p:attrNameLst/p:attrName"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("fillcolor"), sAttributeName);
+ CPPUNIT_ASSERT_EQUAL(u"fillcolor"_ustr, sAttributeName);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112552)
{
// Background fill was not displayed, but it was because of the wrong geometry
createSdImpressDoc("odp/tdf112552.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path"_ostr, "w"_ostr,
- "21600");
+ u"21600"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path"_ostr, "h"_ostr,
- "21600");
+ u"21600"_ustr);
assertXPath(
pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path/a:lnTo[1]/a:pt"_ostr,
- "x"_ostr, "21600");
+ "x"_ostr, u"21600"_ustr);
assertXPath(
pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path/a:lnTo[1]/a:pt"_ostr,
- "y"_ostr, "0");
+ "y"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112557)
{
// Subtitle shape should be skipped by export.
createSdImpressDoc("odp/tdf112557.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slideMasters/slideMaster1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sldMaster/p:cSld/p:spTree/p:sp"_ostr, 2); // title and object
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf128049)
{
createSdImpressDoc("odp/tdf128049.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:custGeom"_ostr, 0);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "noSmoking");
+ "prst"_ostr, u"noSmoking"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:prstGeom/a:avLst/a:gd"_ostr, "name"_ostr,
- "adj");
+ u"adj"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:prstGeom/a:avLst/a:gd"_ostr, "fmla"_ostr,
- "val 12500");
+ u"val 12500"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf106026)
{
createSdImpressDoc("odp/tdf106026.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlMasterContent = parseExport("ppt/slideMasters/slideMaster1.xml");
+ xmlDocUniquePtr pXmlMasterContent = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr);
assertXPath(pXmlMasterContent,
"/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:pPr/a:spcBef/a:spcPts"_ostr,
- "val"_ostr, "1417");
+ "val"_ostr, u"1417"_ustr);
assertXPath(pXmlMasterContent,
"/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:pPr/a:spcBef/a:spcPts"_ostr,
- "val"_ostr, "1134");
+ "val"_ostr, u"1134"_ustr);
assertXPath(pXmlMasterContent,
"/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[3]/a:pPr/a:spcBef/a:spcPts"_ostr,
- "val"_ostr, "850");
+ "val"_ostr, u"850"_ustr);
assertXPath(pXmlMasterContent,
"/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[4]/a:pPr/a:spcBef/a:spcPts"_ostr,
- "val"_ostr, "567");
+ "val"_ostr, u"567"_ustr);
assertXPath(pXmlMasterContent,
"/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[5]/a:pPr/a:spcBef/a:spcPts"_ostr,
- "val"_ostr, "283");
+ "val"_ostr, u"283"_ustr);
assertXPath(pXmlMasterContent,
"/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[6]/a:pPr/a:spcBef/a:spcPts"_ostr,
- "val"_ostr, "283");
+ "val"_ostr, u"283"_ustr);
assertXPath(pXmlMasterContent,
"/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[7]/a:pPr/a:spcBef/a:spcPts"_ostr,
- "val"_ostr, "283");
+ "val"_ostr, u"283"_ustr);
- xmlDocUniquePtr pXmlSlideContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlSlideContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlSlideContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr/a:spcAft/a:spcPts"_ostr,
- "val"_ostr, "11339");
+ "val"_ostr, u"11339"_ustr);
assertXPath(pXmlSlideContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:spcAft/a:spcPts"_ostr,
- "val"_ostr, "11339");
+ "val"_ostr, u"11339"_ustr);
assertXPath(pXmlSlideContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr/a:spcAft/a:spcPts"_ostr,
- "val"_ostr, "11339");
+ "val"_ostr, u"11339"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112334)
{
createSdImpressDoc("pptx/tdf112334.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
OUString sAttributeName = getXPathContent(
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/"
"p:childTnLst/p:animClr[1]/p:cBhvr/p:attrNameLst/p:attrName"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("style.color"), sAttributeName);
+ CPPUNIT_ASSERT_EQUAL(u"style.color"_ustr, sAttributeName);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112089)
{
createSdImpressDoc("pptx/tdf112089.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
OUString sID = getXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr"_ostr,
@@ -1547,47 +1551,47 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112089)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112086)
{
createSdImpressDoc("pptx/tdf112086.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
OUString sVal = getXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
"p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/"
"p:cTn/p:childTnLst/p:anim[2]/p:tavLst/p:tav/p:val/p:fltVal"_ostr,
"val"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("0"), sVal);
+ CPPUNIT_ASSERT_EQUAL(u"0"_ustr, sVal);
OUString sAttributeName = getXPathContent(
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/"
"p:childTnLst/p:anim[1]/p:cBhvr/p:attrNameLst/p:attrName"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("ppt_w"), sAttributeName);
+ CPPUNIT_ASSERT_EQUAL(u"ppt_w"_ustr, sAttributeName);
sVal = getXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/"
"p:anim[2]/p:tavLst/p:tav/p:val/p:fltVal"_ostr,
"val"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("0"), sVal);
+ CPPUNIT_ASSERT_EQUAL(u"0"_ustr, sVal);
sAttributeName = getXPathContent(
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/"
"p:childTnLst/p:anim[2]/p:cBhvr/p:attrNameLst/p:attrName"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("ppt_h"), sAttributeName);
+ CPPUNIT_ASSERT_EQUAL(u"ppt_h"_ustr, sAttributeName);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112647)
{
createSdImpressDoc("odp/tdf112647.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
css::style::LineSpacing aLineSpacing;
- xPropSet->getPropertyValue("ParaLineSpacing") >>= aLineSpacing;
+ xPropSet->getPropertyValue(u"ParaLineSpacing"_ustr) >>= aLineSpacing;
CPPUNIT_ASSERT_EQUAL(sal_Int16(css::style::LineSpacingMode::FIX), aLineSpacing.Mode);
CPPUNIT_ASSERT_EQUAL(sal_Int16(2117), aLineSpacing.Height);
}
@@ -1595,23 +1599,23 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf112647)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testGroupRotation)
{
createSdImpressDoc("odp/group_rotation.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPathNoAttribute(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:grpSpPr/a:xfrm"_ostr,
"rot"_ostr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[1]/p:spPr/a:xfrm"_ostr,
- "rot"_ostr, "20400000");
+ "rot"_ostr, u"20400000"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[2]/p:spPr/a:xfrm"_ostr,
- "rot"_ostr, "20400000");
+ "rot"_ostr, u"20400000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf104788)
{
createSdImpressDoc("pptx/tdf104788.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide6.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide6.xml"_ustr);
OUString sVal = getXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
@@ -1624,7 +1628,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf104788)
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par[2]/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/"
"p:childTnLst/p:anim[2]/p:cBhvr/p:attrNameLst/p:attrName"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("xshear"), sAttributeName);
+ CPPUNIT_ASSERT_EQUAL(u"xshear"_ustr, sAttributeName);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSmartartRotation2)
@@ -1637,15 +1641,16 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSmartartRotation2)
// code to support this for now
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Sequence<beans::PropertyValue> aInteropGrabBag;
- xShape->setPropertyValue("InteropGrabBag", uno::Any(aInteropGrabBag));
+ xShape->setPropertyValue(u"InteropGrabBag"_ustr, uno::Any(aInteropGrabBag));
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPathContent(pXmlDocContent,
- "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[4]/p:txBody/a:p/a:r/a:t"_ostr, "Text");
+ "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[4]/p:txBody/a:p/a:r/a:t"_ostr,
+ u"Text"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[4]/p:txBody/a:bodyPr"_ostr,
- "rot"_ostr, "10800000");
+ "rot"_ostr, u"10800000"_ustr);
double dX
= getXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[4]/p:spPr/a:xfrm/a:off"_ostr, "x"_ostr)
@@ -1661,13 +1666,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testSmartartRotation2)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf91999_rotateShape)
{
createSdImpressDoc("pptx/tdf91999_rotateShape.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:nvSpPr/p:cNvPr"_ostr, "name"_ostr,
- "CustomShape 2");
+ u"CustomShape 2"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm"_ostr, "rot"_ostr,
- "10800000");
+ u"10800000"_ustr);
double dX = getXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm/a:off"_ostr,
"x"_ostr)
.toDouble();
@@ -1681,13 +1686,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf91999_rotateShape)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf114845_rotateShape)
{
createSdImpressDoc("pptx/tdf114845_rotateShape.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:nvCxnSpPr/p:cNvPr"_ostr,
- "name"_ostr, "Straight Arrow Connector 9");
+ "name"_ostr, u"Straight Arrow Connector 9"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:spPr/a:xfrm"_ostr,
- "flipV"_ostr, "1");
+ "flipV"_ostr, u"1"_ustr);
double dX = getXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:spPr/a:xfrm/a:off"_ostr, "x"_ostr)
.toDouble();
@@ -1701,94 +1706,94 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf114845_rotateShape)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testGroupsPosition)
{
createSdImpressDoc("pptx/group.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:grpSp[1]/p:sp[1]/p:spPr/a:xfrm/a:off"_ostr, "x"_ostr,
- "5004000");
+ u"5004000"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:grpSp[1]/p:sp[1]/p:spPr/a:xfrm/a:off"_ostr, "y"_ostr,
- "3310560");
+ u"3310560"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:grpSp[1]/p:sp[3]/p:spPr/a:xfrm/a:off"_ostr, "x"_ostr,
- "7760160");
+ u"7760160"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:grpSp[1]/p:sp[3]/p:spPr/a:xfrm/a:off"_ostr, "y"_ostr,
- "3310560");
+ u"3310560"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testGroupsRotatedPosition)
{
createSdImpressDoc("pptx/group-rot.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off"_ostr,
- "x"_ostr, "2857320");
+ "x"_ostr, u"2857320"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off"_ostr,
- "y"_ostr, "4026960");
+ "y"_ostr, u"4026960"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testAccentColor)
{
createSdImpressDoc("pptx/accent-color.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp/p:style/a:fillRef/a:schemeClr"_ostr,
- "val"_ostr, "accent6");
- xmlDocUniquePtr pXmlDocContent2 = parseExport("ppt/slides/slide2.xml");
+ "val"_ostr, u"accent6"_ustr);
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:sp/p:style/a:fillRef/a:schemeClr"_ostr,
- "val"_ostr, "accent6");
- xmlDocUniquePtr pXmlDocTheme1 = parseExport("ppt/theme/theme1.xml");
+ "val"_ostr, u"accent6"_ustr);
+ xmlDocUniquePtr pXmlDocTheme1 = parseExport(u"ppt/theme/theme1.xml"_ustr);
assertXPath(pXmlDocTheme1, "/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr"_ostr,
- "val"_ostr, "70ad47");
- xmlDocUniquePtr pXmlDocTheme2 = parseExport("ppt/theme/theme12.xml");
+ "val"_ostr, u"70ad47"_ustr);
+ xmlDocUniquePtr pXmlDocTheme2 = parseExport(u"ppt/theme/theme12.xml"_ustr);
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr"_ostr,
- "val"_ostr, "deb340");
+ "val"_ostr, u"deb340"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: Motyw pakietu Office
// - Actual : Office Theme
// i.e. the theme and color scheme name was lost on export.
- assertXPath(pXmlDocTheme1, "/a:theme"_ostr, "name"_ostr, "Motyw pakietu Office");
+ assertXPath(pXmlDocTheme1, "/a:theme"_ostr, "name"_ostr, u"Motyw pakietu Office"_ustr);
assertXPath(pXmlDocTheme1, "/a:theme/a:themeElements/a:clrScheme"_ostr, "name"_ostr,
- "Pakiet Office");
+ u"Pakiet Office"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testThemeColors)
{
createSdImpressDoc("pptx/tdf84205.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocTheme2 = parseExport("ppt/theme/theme1.xml");
+ xmlDocUniquePtr pXmlDocTheme2 = parseExport(u"ppt/theme/theme1.xml"_ustr);
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr"_ostr,
- "val"_ostr, "44546a");
+ "val"_ostr, u"44546a"_ustr);
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:accent3/a:srgbClr"_ostr,
- "val"_ostr, "a5a5a5");
+ "val"_ostr, u"a5a5a5"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf111785)
{
createSdImpressDoc("odp/tdf111785.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
// Without the fix in place, this test would have failed with
// - Expected: ed1c24
// - Actual : ffffff
assertXPath(pXmlDocRels,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:pattFill/a:bgClr/a:srgbClr"_ostr,
- "val"_ostr, "ed1c24");
+ "val"_ostr, u"ed1c24"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf118825)
{
createSdImpressDoc("odp/tdf118825-motionpath.odp");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
CPPUNIT_ASSERT_MOTIONPATH(
u"M 0.0449285714285714 0.00368253968253968 C 0.0575714285714285 -0.00095238095238096 "
@@ -1837,17 +1842,17 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTextColumns_tdf140852)
uno::Reference<drawing::XShape> xShape(xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xProps(xShape, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xProps));
- CPPUNIT_ASSERT_EQUAL(OUString("Training will be treated as part of sharing the sweet when "
- "it comes to serving ice cream"),
+ CPPUNIT_ASSERT_EQUAL(u"Training will be treated as part of sharing the sweet when "
+ "it comes to serving ice cream"_ustr,
xParagraph->getString());
- uno::Reference<text::XTextColumns> xCols(xProps->getPropertyValue("TextColumns"),
+ uno::Reference<text::XTextColumns> xCols(xProps->getPropertyValue(u"TextColumns"_ustr),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCols->getColumnCount());
uno::Reference<beans::XPropertySet> xColProps(xCols, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(1000)),
- xColProps->getPropertyValue("AutomaticDistance"));
+ xColProps->getPropertyValue(u"AutomaticDistance"_ustr));
}
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
{
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
@@ -1855,22 +1860,22 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTextColumns_tdf140852)
uno::Reference<drawing::XShape> xShape(xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xProps(xShape, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xProps));
- CPPUNIT_ASSERT_EQUAL(OUString("Training will be treated as part of sharing the sweet when "
- "it comes to serving ice cream"),
+ CPPUNIT_ASSERT_EQUAL(u"Training will be treated as part of sharing the sweet when "
+ "it comes to serving ice cream"_ustr,
xParagraph->getString());
- uno::Reference<text::XTextColumns> xCols(xProps->getPropertyValue("TextColumns"),
+ uno::Reference<text::XTextColumns> xCols(xProps->getPropertyValue(u"TextColumns"_ustr),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCols->getColumnCount());
uno::Reference<beans::XPropertySet> xColProps(xCols, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(1000)),
- xColProps->getPropertyValue("AutomaticDistance"));
+ xColProps->getPropertyValue(u"AutomaticDistance"_ustr));
}
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr"_ostr, "numCol"_ostr,
- "1");
+ u"1"_ustr);
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr"_ostr, "spcCol"_ostr,
- "360000");
+ u"360000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTextColumns_3columns)
@@ -1881,51 +1886,51 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTextColumns_3columns)
uno::Reference<container::XIndexAccess> xIndexAccess(xPage, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape(xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xProps(xShape, uno::UNO_QUERY_THROW);
- uno::Reference<text::XTextColumns> xCols(xProps->getPropertyValue("TextColumns"),
+ uno::Reference<text::XTextColumns> xCols(xProps->getPropertyValue(u"TextColumns"_ustr),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int16(3), xCols->getColumnCount());
uno::Reference<beans::XPropertySet> xColProps(xCols, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(300)),
- xColProps->getPropertyValue("AutomaticDistance"));
+ xColProps->getPropertyValue(u"AutomaticDistance"_ustr));
// Scale value may be unstable; just test that the text is actually scaled
double fFontScale;
- CPPUNIT_ASSERT(xProps->getPropertyValue("TextFitToSizeFontScale") >>= fFontScale);
+ CPPUNIT_ASSERT(xProps->getPropertyValue(u"TextFitToSizeFontScale"_ustr) >>= fFontScale);
CPPUNIT_ASSERT_GREATER(0.0, fFontScale);
CPPUNIT_ASSERT_LESS(100.0, fFontScale);
}
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
{
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<container::XIndexAccess> xIndexAccess(xPage, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape(xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xProps(xShape, uno::UNO_QUERY_THROW);
- uno::Reference<text::XTextColumns> xCols(xProps->getPropertyValue("TextColumns"),
+ uno::Reference<text::XTextColumns> xCols(xProps->getPropertyValue(u"TextColumns"_ustr),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int16(3), xCols->getColumnCount());
uno::Reference<beans::XPropertySet> xColProps(xCols, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(300)),
- xColProps->getPropertyValue("AutomaticDistance"));
+ xColProps->getPropertyValue(u"AutomaticDistance"_ustr));
// Scale value may be unstable; just test that the text is actually scaled
double fFontScale;
- CPPUNIT_ASSERT(xProps->getPropertyValue("TextFitToSizeFontScale") >>= fFontScale);
+ CPPUNIT_ASSERT(xProps->getPropertyValue(u"TextFitToSizeFontScale"_ustr) >>= fFontScale);
CPPUNIT_ASSERT_GREATER(0.0, fFontScale);
CPPUNIT_ASSERT_LESS(100.0, fFontScale);
}
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr"_ostr, "numCol"_ostr,
- "3");
+ u"3"_ustr);
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr"_ostr, "spcCol"_ostr,
- "108000");
+ u"108000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf59323_slideFooters)
{
createSdImpressDoc("pptx/tdf59323.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xDoc->getDrawPages()->getCount());
@@ -1934,21 +1939,23 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf59323_slideFooters)
{
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(true, xPropSet->getPropertyValue("IsFooterVisible").get<bool>());
- CPPUNIT_ASSERT_EQUAL(true, xPropSet->getPropertyValue("IsDateTimeVisible").get<bool>());
- CPPUNIT_ASSERT_EQUAL(true, xPropSet->getPropertyValue("IsPageNumberVisible").get<bool>());
+ CPPUNIT_ASSERT_EQUAL(true, xPropSet->getPropertyValue(u"IsFooterVisible"_ustr).get<bool>());
+ CPPUNIT_ASSERT_EQUAL(true,
+ xPropSet->getPropertyValue(u"IsDateTimeVisible"_ustr).get<bool>());
+ CPPUNIT_ASSERT_EQUAL(true,
+ xPropSet->getPropertyValue(u"IsPageNumberVisible"_ustr).get<bool>());
}
// Test placeholder indexes
- xmlDocUniquePtr pXmlDocMaster = parseExport("ppt/slideMasters/slideMaster1.xml");
- assertXPath(pXmlDocMaster, "//p:ph [@type='dt']"_ostr, "idx"_ostr, "1");
- assertXPath(pXmlDocMaster, "//p:ph [@type='ftr']"_ostr, "idx"_ostr, "2");
- assertXPath(pXmlDocMaster, "//p:ph [@type='sldNum']"_ostr, "idx"_ostr, "3");
+ xmlDocUniquePtr pXmlDocMaster = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr);
+ assertXPath(pXmlDocMaster, "//p:ph [@type='dt']"_ostr, "idx"_ostr, u"1"_ustr);
+ assertXPath(pXmlDocMaster, "//p:ph [@type='ftr']"_ostr, "idx"_ostr, u"2"_ustr);
+ assertXPath(pXmlDocMaster, "//p:ph [@type='sldNum']"_ostr, "idx"_ostr, u"3"_ustr);
- xmlDocUniquePtr pXmlDocSlide1 = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDocSlide1, "//p:ph [@type='dt']"_ostr, "idx"_ostr, "1");
- assertXPath(pXmlDocSlide1, "//p:ph [@type='ftr']"_ostr, "idx"_ostr, "2");
- assertXPath(pXmlDocSlide1, "//p:ph [@type='sldNum']"_ostr, "idx"_ostr, "3");
+ xmlDocUniquePtr pXmlDocSlide1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDocSlide1, "//p:ph [@type='dt']"_ostr, "idx"_ostr, u"1"_ustr);
+ assertXPath(pXmlDocSlide1, "//p:ph [@type='ftr']"_ostr, "idx"_ostr, u"2"_ustr);
+ assertXPath(pXmlDocSlide1, "//p:ph [@type='sldNum']"_ostr, "idx"_ostr, u"3"_ustr);
// Test if datetime fields have text in them
// This is needed for backwards compatibility
@@ -1965,7 +1972,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf53970)
// Embedded media file
{
createSdImpressDoc("odp/tdf53970.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
// Without fix in place, the media shape was lost on export.
CPPUNIT_ASSERT(getPage(0)->hasElements());
@@ -1974,9 +1981,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf53970)
// Linked media file
{
createSdImpressDoc("odp/tdf53970_linked.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlRels = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
CPPUNIT_ASSERT(pXmlRels);
assertXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@TargetMode='External']"_ostr,
2);
@@ -1988,7 +1995,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf53970)
// Without fix in place, the media shape was imported as an image after export
// and this test would have failed with exception of type com.sun.star.beans.UnknownPropertyException
CPPUNIT_ASSERT_MESSAGE("MediaURL property is not set",
- xShape->getPropertyValue("MediaURL") >>= sVideoURL);
+ xShape->getPropertyValue(u"MediaURL"_ustr) >>= sVideoURL);
CPPUNIT_ASSERT_MESSAGE("MediaURL is empty", !sVideoURL.isEmpty());
}
}
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx
index f9b8bba3eebc..7493b24d3162 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -20,7 +20,7 @@ class SdOOXMLExportTest3 : public SdModelTestBase
{
public:
SdOOXMLExportTest3()
- : SdModelTestBase("/sd/qa/unit/data/")
+ : SdModelTestBase(u"/sd/qa/unit/data/"_ustr)
{
}
@@ -30,170 +30,170 @@ public:
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf153105)
{
createSdImpressDoc("odp/tdf153105.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:stretch/a:fillRect"_ostr,
- "l"_ostr, "20000");
+ "l"_ostr, u"20000"_ustr);
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:stretch/a:fillRect"_ostr,
- "t"_ostr, "30000");
+ "t"_ostr, u"30000"_ustr);
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:stretch/a:fillRect"_ostr,
- "r"_ostr, "20000");
+ "r"_ostr, u"20000"_ustr);
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:bg/p:bgPr/a:blipFill/a:stretch/a:fillRect"_ostr,
- "b"_ostr, "30000");
+ "b"_ostr, u"30000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf92222)
{
createSdImpressDoc("pptx/tdf92222.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocTheme = parseExport("ppt/theme/theme1.xml");
+ xmlDocUniquePtr pXmlDocTheme = parseExport(u"ppt/theme/theme1.xml"_ustr);
assertXPath(pXmlDocTheme, "/a:theme/a:themeElements/a:fmtScheme/a:lnStyleLst/a:ln[1]"_ostr,
- "w"_ostr, "6350");
+ "w"_ostr, u"6350"_ustr);
assertXPath(pXmlDocTheme, "/a:theme/a:themeElements/a:fmtScheme/a:lnStyleLst/a:ln[2]"_ostr,
- "w"_ostr, "12700");
+ "w"_ostr, u"12700"_ustr);
assertXPath(pXmlDocTheme, "/a:theme/a:themeElements/a:fmtScheme/a:lnStyleLst/a:ln[3]"_ostr,
- "w"_ostr, "19050");
+ "w"_ostr, u"19050"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf129430)
{
createSdImpressDoc("odp/tdf129430.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:pPr/a:lnSpc/a:spcPct"_ostr,
- "val"_ostr, "100000");
+ "val"_ostr, u"100000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf114848)
{
createSdImpressDoc("pptx/tdf114848.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocTheme1 = parseExport("ppt/theme/theme1.xml");
+ xmlDocUniquePtr pXmlDocTheme1 = parseExport(u"ppt/theme/theme1.xml"_ustr);
assertXPath(pXmlDocTheme1, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr"_ostr,
- "val"_ostr, "1f497d");
+ "val"_ostr, u"1f497d"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf147586)
{
createSdImpressDoc("pptx/tdf147586.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
// Without the fix in place, this test would have failed with
// - Expected: 227fc7
// - Actual : 4f4f4f
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:p[1]/a:pPr/a:buClr/a:srgbClr"_ostr,
- "val"_ostr, "227fc7");
+ "val"_ostr, u"227fc7"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:p[2]/a:pPr/a:buClr/a:srgbClr"_ostr,
- "val"_ostr, "227fc7");
+ "val"_ostr, u"227fc7"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf68759)
{
createSdImpressDoc("odp/tdf68759.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:spPr/a:xfrm/a:off"_ostr,
- "x"_ostr, "1687320");
+ "x"_ostr, u"1687320"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:spPr/a:xfrm/a:off"_ostr,
- "y"_ostr, "1615320");
+ "y"_ostr, u"1615320"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:spPr/a:xfrm"_ostr, "flipH"_ostr,
- "1");
+ u"1"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:spPr/a:xfrm"_ostr, "rot"_ostr,
- "9600000");
+ u"9600000"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:spPr/a:xfrm/a:off"_ostr,
- "x"_ostr, "3847320");
+ "x"_ostr, u"3847320"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:spPr/a:xfrm/a:off"_ostr,
- "y"_ostr, "1614600");
+ "y"_ostr, u"1614600"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[3]/p:spPr/a:xfrm"_ostr, "flipH"_ostr,
- "1");
+ u"1"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[3]/p:spPr/a:xfrm/a:off"_ostr,
- "x"_ostr, "5934960");
+ "x"_ostr, u"5934960"_ustr);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[3]/p:spPr/a:xfrm/a:off"_ostr,
- "y"_ostr, "1615320");
+ "y"_ostr, u"1615320"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf127901)
{
createSdImpressDoc("odp/tdf127901.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:lum"_ostr,
- "bright"_ostr, "70000");
+ "bright"_ostr, u"70000"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:lum"_ostr,
- "contrast"_ostr, "-70000");
+ "contrast"_ostr, u"-70000"_ustr);
- xmlDocUniquePtr pXmlDocContent2 = parseExport("ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:grayscl"_ostr,
1);
- xmlDocUniquePtr pXmlDocContent3 = parseExport("ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXmlDocContent3 = parseExport(u"ppt/slides/slide3.xml"_ustr);
assertXPath(pXmlDocContent3, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:biLevel"_ostr,
- "thresh"_ostr, "50000");
+ "thresh"_ostr, u"50000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf48735)
{
createSdImpressDoc("odp/tdf48735.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:srcRect"_ostr, "b"_ostr,
- "23627");
+ u"23627"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:srcRect"_ostr, "l"_ostr,
- "23627");
+ u"23627"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:srcRect"_ostr, "r"_ostr,
- "23627");
+ u"23627"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:srcRect"_ostr, "t"_ostr,
- "18842");
+ u"18842"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf90626)
{
createSdImpressDoc("odp/tdf90626.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr/a:buSzPct"_ostr, "val"_ostr,
- "100000");
+ u"100000"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buSzPct"_ostr, "val"_ostr,
- "150142");
+ u"150142"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr/a:buSzPct"_ostr, "val"_ostr,
- "100000");
+ u"100000"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[4]/a:pPr/a:buSzPct"_ostr, "val"_ostr,
- "150142");
+ u"150142"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf107608)
{
createSdImpressDoc("pptx/tdf107608.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_SET_THROW);
drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
- xPropSet->getPropertyValue("FillStyle") >>= aFillStyle;
+ xPropSet->getPropertyValue(u"FillStyle"_ustr) >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, aFillStyle);
bool bBackgroundFill = false;
- xPropSet->getPropertyValue("FillBackground") >>= bBackgroundFill;
+ xPropSet->getPropertyValue(u"FillBackground"_ustr) >>= bBackgroundFill;
CPPUNIT_ASSERT(bBackgroundFill);
Color nBackgroundColor;
- xPropSet->getPropertyValue("FillColor") >>= nBackgroundColor;
+ xPropSet->getPropertyValue(u"FillColor"_ustr) >>= nBackgroundColor;
CPPUNIT_ASSERT_EQUAL(Color(0x92D050), nBackgroundColor);
}
@@ -202,25 +202,25 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf111786)
// Export line transparency with the color
createSdImpressDoc("pptx/tdf111786.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_SET_THROW);
Color nLineColor;
- xPropSet->getPropertyValue("LineColor") >>= nLineColor;
+ xPropSet->getPropertyValue(u"LineColor"_ustr) >>= nLineColor;
CPPUNIT_ASSERT_EQUAL(Color(0x3465A4), nLineColor);
sal_Int16 nTransparency;
- xPropSet->getPropertyValue("LineTransparence") >>= nTransparency;
+ xPropSet->getPropertyValue(u"LineTransparence"_ustr) >>= nTransparency;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(33), nTransparency);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testFontScale)
{
createSdImpressDoc("pptx/font-scale.pptx");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
// Rounding errors possible, approximate value (+/- 1%)
OUString sScale = getXPath(pXmlDocContent,
@@ -232,8 +232,8 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testFontScale)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testShapeAutofitPPTX)
{
createSdImpressDoc("pptx/testShapeAutofit.pptx");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDocContent);
// TextAutoGrowHeight --> "Resize shape to fit text" --> true
@@ -247,8 +247,8 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testShapeAutofitPPTX)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testLegacyShapeAutofitPPTX)
{
createSdImpressDoc("odp/testLegacyShapeAutofit.odp");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDocContent);
// Text in a legacy rectangle
@@ -265,7 +265,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testLegacyShapeAutofitPPTX)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115394)
{
createSdImpressDoc("pptx/tdf115394.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pXImpressDocument);
@@ -301,7 +301,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115394)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115394Zero)
{
createSdImpressDoc("pptx/tdf115394-zero.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
double fTransitionDuration;
SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
@@ -315,7 +315,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115394Zero)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115005)
{
createSdImpressDoc("odp/tdf115005.odp");
- save("impress8");
+ save(u"impress8"_ustr);
// additional checks of the output file
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
@@ -348,7 +348,7 @@ int SdOOXMLExportTest3::testTdf115005_FallBack_Images(bool bAddReplacementImages
}
// save the file with already set options
- save("impress8");
+ save(u"impress8"_ustr);
// additional checks of the output file
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
@@ -386,37 +386,37 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115005_FallBack_Images_Off)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118806)
{
createSdImpressDoc("odp/tdf118806.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDocContent, "//p:animMotion"_ostr, "origin"_ostr, "layout");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDocContent, "//p:animMotion"_ostr, "origin"_ostr, u"layout"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf130058)
{
createSdImpressDoc("pptx/tdf130058.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
bool bHasShadow = false;
- xShape->getPropertyValue("Shadow") >>= bHasShadow;
+ xShape->getPropertyValue(u"Shadow"_ustr) >>= bHasShadow;
CPPUNIT_ASSERT(bHasShadow);
double fShadowDist = 0.0;
- xShape->getPropertyValue("ShadowXDistance") >>= fShadowDist;
+ xShape->getPropertyValue(u"ShadowXDistance"_ustr) >>= fShadowDist;
CPPUNIT_ASSERT_EQUAL(static_cast<double>(0), fShadowDist);
- xShape->getPropertyValue("ShadowYDistance") >>= fShadowDist;
+ xShape->getPropertyValue(u"ShadowYDistance"_ustr) >>= fShadowDist;
CPPUNIT_ASSERT_EQUAL(static_cast<double>(141), fShadowDist);
Color nColor;
- xShape->getPropertyValue("ShadowColor") >>= nColor;
+ xShape->getPropertyValue(u"ShadowColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_BLACK, nColor);
sal_Int32 nTransparency = 0;
- xShape->getPropertyValue("ShadowTransparence") >>= nTransparency;
+ xShape->getPropertyValue(u"ShadowTransparence"_ustr) >>= nTransparency;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(57), nTransparency);
double fShadowSizeX = 0.0;
- xShape->getPropertyValue("ShadowSizeX") >>= fShadowSizeX;
+ xShape->getPropertyValue(u"ShadowSizeX"_ustr) >>= fShadowSizeX;
CPPUNIT_ASSERT_EQUAL(static_cast<double>(1000), fShadowSizeX);
double fShadowSizeY = 0.0;
- xShape->getPropertyValue("ShadowSizeY") >>= fShadowSizeY;
+ xShape->getPropertyValue(u"ShadowSizeY"_ustr) >>= fShadowSizeY;
CPPUNIT_ASSERT_EQUAL(static_cast<double>(1000), fShadowSizeY);
}
@@ -425,30 +425,30 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf111789)
// Shadow properties were not exported for text shapes.
createSdImpressDoc("pptx/tdf111789.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// First text shape has some shadow
{
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
bool bHasShadow = false;
- xShape->getPropertyValue("Shadow") >>= bHasShadow;
+ xShape->getPropertyValue(u"Shadow"_ustr) >>= bHasShadow;
CPPUNIT_ASSERT(bHasShadow);
double fShadowDist = 0.0;
- xShape->getPropertyValue("ShadowXDistance") >>= fShadowDist;
+ xShape->getPropertyValue(u"ShadowXDistance"_ustr) >>= fShadowDist;
CPPUNIT_ASSERT_EQUAL(static_cast<double>(274), fShadowDist);
- xShape->getPropertyValue("ShadowYDistance") >>= fShadowDist;
+ xShape->getPropertyValue(u"ShadowYDistance"_ustr) >>= fShadowDist;
CPPUNIT_ASSERT_EQUAL(static_cast<double>(274), fShadowDist);
Color nColor;
- xShape->getPropertyValue("ShadowColor") >>= nColor;
+ xShape->getPropertyValue(u"ShadowColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nColor);
sal_Int32 nTransparency = 0;
- xShape->getPropertyValue("ShadowTransparence") >>= nTransparency;
+ xShape->getPropertyValue(u"ShadowTransparence"_ustr) >>= nTransparency;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(7), nTransparency);
double fShadowSizeX = 0.0;
- xShape->getPropertyValue("ShadowSizeX") >>= fShadowSizeX;
+ xShape->getPropertyValue(u"ShadowSizeX"_ustr) >>= fShadowSizeX;
CPPUNIT_ASSERT_EQUAL(static_cast<double>(100000), fShadowSizeX);
double fShadowSizeY = 0.0;
- xShape->getPropertyValue("ShadowSizeY") >>= fShadowSizeY;
+ xShape->getPropertyValue(u"ShadowSizeY"_ustr) >>= fShadowSizeY;
CPPUNIT_ASSERT_EQUAL(static_cast<double>(100000), fShadowSizeY);
}
@@ -456,7 +456,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf111789)
{
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(1, 0));
bool bHasShadow = false;
- xShape->getPropertyValue("Shadow") >>= bHasShadow;
+ xShape->getPropertyValue(u"Shadow"_ustr) >>= bHasShadow;
CPPUNIT_ASSERT(!bHasShadow);
}
}
@@ -464,8 +464,8 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf111789)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf145162)
{
createSdImpressDoc("pptx/tdf145162.pptx");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buNone"_ostr);
@@ -477,11 +477,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testZeroIndentExport)
// Load the bugdoc and save to pptx then.
createSdImpressDoc("odp/testZeroIndent.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// There are 3 slides, get them
- xmlDocUniquePtr pSlide1 = parseExport("ppt/slides/slide1.xml");
- xmlDocUniquePtr pSlide2 = parseExport("ppt/slides/slide2.xml");
- xmlDocUniquePtr pSlide3 = parseExport("ppt/slides/slide3.xml");
+ xmlDocUniquePtr pSlide1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ xmlDocUniquePtr pSlide2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
+ xmlDocUniquePtr pSlide3 = parseExport(u"ppt/slides/slide3.xml"_ustr);
CPPUNIT_ASSERT(pSlide1);
CPPUNIT_ASSERT(pSlide2);
@@ -494,30 +494,30 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testZeroIndentExport)
assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr/a:buNone"_ostr);
assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr"_ostr, "indent"_ostr,
- "0");
+ u"0"_ustr);
assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buNone"_ostr);
assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr"_ostr, "indent"_ostr,
- "0");
+ u"0"_ustr);
assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr/a:buNone"_ostr);
assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr"_ostr, "indent"_ostr,
- "0");
+ u"0"_ustr);
assertXPath(pSlide3, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr"_ostr, "indent"_ostr,
- "0");
+ u"0"_ustr);
assertXPath(pSlide3, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buNone"_ostr);
assertXPath(pSlide3, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr"_ostr, "indent"_ostr,
- "0");
+ u"0"_ustr);
assertXPath(pSlide3, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr"_ostr, "indent"_ostr,
- "0");
+ u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf100348_convert_Fontwork2TextWarp)
{
createSdImpressDoc("odp/tdf100348_Fontwork2TextWarp.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Resulting pptx has to contain the TextWarp shape
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPathStart(
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr/a:prstTxWarp"_ostr);
assertXPath(pXmlDocContent, sPathStart + "[@prst='textWave1']");
@@ -528,11 +528,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf100348_convert_Fontwork2TextWarp
// Reloading has to get the Fontwork shape back
// TextPath makes a custom shape to a Fontwork shape, so must exist
uno::Reference<beans::XPropertySet> xShapeWavePropSet(getShapeFromPage(0, 0));
- auto aGeomPropSeq = xShapeWavePropSet->getPropertyValue("CustomShapeGeometry")
+ auto aGeomPropSeq = xShapeWavePropSet->getPropertyValue(u"CustomShapeGeometry"_ustr)
.get<uno::Sequence<beans::PropertyValue>>();
auto aGeomPropVec
= comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(aGeomPropSeq);
- OUString sName = "TextPath";
+ OUString sName = u"TextPath"_ustr;
auto aIterator = std::find_if(
aGeomPropVec.begin(), aGeomPropVec.end(),
[sName](const beans::PropertyValue& rValue) { return rValue.Name == sName; });
@@ -546,7 +546,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf100348_convert_Fontwork2TextWarp
CPPUNIT_ASSERT_MESSAGE("No Type", aIterator2 != aGeomPropVec.end());
OUString sOwnName;
aIterator2->Value >>= sOwnName;
- CPPUNIT_ASSERT_EQUAL(OUString("fontwork-wave"), sOwnName);
+ CPPUNIT_ASSERT_EQUAL(u"fontwork-wave"_ustr, sOwnName);
// Adjustmentvalues need to be the same.
sName = "AdjustmentValues";
@@ -567,11 +567,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf100348_convert_Fontwork2TextWarp
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf125573_FontWorkScaleX)
{
createSdImpressDoc("pptx/tdf125573_FontWorkScaleX.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Error was, that attribute 'fromWordArt' was ignored
// ensure, resulting pptx has fromWordArt="1" on textArchDown shape
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr[@fromWordArt='1']"_ostr);
@@ -601,10 +601,10 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99497_keepAppearanceOfCircleKind
// Adjustment values need to exist and their values need to correspond to the
// original angles. Shape 'arc' needs to be unfilled.
createSdImpressDoc("odp/tdf99497_CircleKind.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// slide 1 45° -> adj1 = 20493903, 270° -> adj2 = 5400000, <a:noFill/> exists
- xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPathStart1("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom"_ostr);
assertXPath(pXmlDocContent1, sPathStart1 + "[@prst='arc']");
const OString sPathAdj1(sPathStart1 + "/a:avLst/a:gd");
@@ -613,7 +613,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99497_keepAppearanceOfCircleKind
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:noFill"_ostr);
// slide 2 270° -> adj1 = 5400000, 180° -> adj2 = 10800000
- xmlDocUniquePtr pXmlDocContent2 = parseExport("ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
static constexpr OString sPathStart2("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom"_ostr);
assertXPath(pXmlDocContent2, sPathStart2 + "[@prst='chord']");
const OString sPathAdj2(sPathStart2 + "/a:avLst/a:gd");
@@ -621,7 +621,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99497_keepAppearanceOfCircleKind
assertXPath(pXmlDocContent2, sPathAdj2 + "[@name='adj2' and @fmla='val 10800000']");
// slide 3 120° -> adj1 = 12600000, 30° -> adj2 = 20946396
- xmlDocUniquePtr pXmlDocContent3 = parseExport("ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXmlDocContent3 = parseExport(u"ppt/slides/slide3.xml"_ustr);
static constexpr OString sPathStart3("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom"_ostr);
assertXPath(pXmlDocContent3, sPathStart3 + "[@prst='pie']");
const OString sPathAdj3(sPathStart3 + "/a:avLst/a:gd");
@@ -632,9 +632,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99497_keepAppearanceOfCircleKind
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104792)
{
createSdImpressDoc("pptx/tdf104792-smart-art-animation.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst[1]/p:seq/p:cTn/p:childTnLst[1]/"
"p:par[1]/p:cTn/p:childTnLst[1]/p:par/p:cTn/p:childTnLst[1]/p:par/p:cTn/"
@@ -645,9 +645,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104792)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf90627)
{
createSdImpressDoc("odp/tdf90627.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
// Don't export empty endCondLst without cond.
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst[1]/p:seq/p:cTn/p:childTnLst[1]/"
@@ -659,9 +659,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf90627)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104786)
{
createSdImpressDoc("pptx/tdf104786.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide2.xml"_ustr);
// Don't export empty 'to'
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst[1]/p:seq/p:cTn/p:childTnLst[1]/"
@@ -673,25 +673,25 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104786)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118783)
{
createSdImpressDoc("odp/tdf118783.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
OUString sAttributeName
= getXPathContent(pXmlDocContent, "//p:animRot/p:cBhvr/p:attrNameLst/p:attrName"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("r"), sAttributeName);
+ CPPUNIT_ASSERT_EQUAL(u"r"_ustr, sAttributeName);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf104789)
{
createSdImpressDoc("pptx/tdf104789.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
OUString sAttributeName = getXPathContent(
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/"
"p:childTnLst/p:set/p:cBhvr/p:attrNameLst/p:attrName"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("style.opacity"), sAttributeName);
+ CPPUNIT_ASSERT_EQUAL(u"style.opacity"_ustr, sAttributeName);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testOpenDocumentAsReadOnly)
@@ -701,7 +701,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testOpenDocumentAsReadOnly)
CPPUNIT_ASSERT(pXImpressDocument);
sd::DrawDocShell* pDocShell = pXImpressDocument->GetDocShell();
CPPUNIT_ASSERT(pDocShell->IsSecurityOptOpenReadOnly());
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pXImpressDocument);
pDocShell = pXImpressDocument->GetDocShell();
@@ -711,59 +711,62 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testOpenDocumentAsReadOnly)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118835)
{
createSdImpressDoc("odp/tdf118835.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDocContent, "(//p:animClr)[1]"_ostr, "clrSpc"_ostr, "rgb");
- assertXPathContent(pXmlDocContent, "(//p:animClr)[1]//p:attrName"_ostr, "style.color");
- assertXPath(pXmlDocContent, "(//p:animClr)[1]//p:to/a:srgbClr"_ostr, "val"_ostr, "ed1c24");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDocContent, "(//p:animClr)[1]"_ostr, "clrSpc"_ostr, u"rgb"_ustr);
+ assertXPathContent(pXmlDocContent, "(//p:animClr)[1]//p:attrName"_ostr, u"style.color"_ustr);
+ assertXPath(pXmlDocContent, "(//p:animClr)[1]//p:to/a:srgbClr"_ostr, "val"_ostr,
+ u"ed1c24"_ustr);
- assertXPath(pXmlDocContent, "(//p:animClr)[2]"_ostr, "clrSpc"_ostr, "rgb");
- assertXPathContent(pXmlDocContent, "(//p:animClr)[2]//p:attrName"_ostr, "stroke.color");
- assertXPath(pXmlDocContent, "(//p:animClr)[2]//p:to/a:srgbClr"_ostr, "val"_ostr, "333399");
+ assertXPath(pXmlDocContent, "(//p:animClr)[2]"_ostr, "clrSpc"_ostr, u"rgb"_ustr);
+ assertXPathContent(pXmlDocContent, "(//p:animClr)[2]//p:attrName"_ostr, u"stroke.color"_ustr);
+ assertXPath(pXmlDocContent, "(//p:animClr)[2]//p:to/a:srgbClr"_ostr, "val"_ostr,
+ u"333399"_ustr);
- assertXPath(pXmlDocContent, "(//p:animClr)[3]"_ostr, "clrSpc"_ostr, "rgb");
- assertXPathContent(pXmlDocContent, "(//p:animClr)[3]//p:attrName"_ostr, "fillcolor");
- assertXPath(pXmlDocContent, "(//p:animClr)[3]//p:to/a:srgbClr"_ostr, "val"_ostr, "fcd3c1");
+ assertXPath(pXmlDocContent, "(//p:animClr)[3]"_ostr, "clrSpc"_ostr, u"rgb"_ustr);
+ assertXPathContent(pXmlDocContent, "(//p:animClr)[3]//p:attrName"_ostr, u"fillcolor"_ustr);
+ assertXPath(pXmlDocContent, "(//p:animClr)[3]//p:to/a:srgbClr"_ostr, "val"_ostr,
+ u"fcd3c1"_ustr);
- assertXPath(pXmlDocContent, "(//p:animClr)[5]"_ostr, "clrSpc"_ostr, "hsl");
- assertXPathContent(pXmlDocContent, "(//p:animClr)[5]//p:attrName"_ostr, "fillcolor");
- assertXPath(pXmlDocContent, "(//p:animClr)[5]//p:by/p:hsl"_ostr, "h"_ostr, "10800000");
- assertXPath(pXmlDocContent, "(//p:animClr)[5]//p:by/p:hsl"_ostr, "s"_ostr, "0");
- assertXPath(pXmlDocContent, "(//p:animClr)[5]//p:by/p:hsl"_ostr, "l"_ostr, "0");
+ assertXPath(pXmlDocContent, "(//p:animClr)[5]"_ostr, "clrSpc"_ostr, u"hsl"_ustr);
+ assertXPathContent(pXmlDocContent, "(//p:animClr)[5]//p:attrName"_ostr, u"fillcolor"_ustr);
+ assertXPath(pXmlDocContent, "(//p:animClr)[5]//p:by/p:hsl"_ostr, "h"_ostr, u"10800000"_ustr);
+ assertXPath(pXmlDocContent, "(//p:animClr)[5]//p:by/p:hsl"_ostr, "s"_ostr, u"0"_ustr);
+ assertXPath(pXmlDocContent, "(//p:animClr)[5]//p:by/p:hsl"_ostr, "l"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118768)
{
createSdImpressDoc("odp/tdf118768-brake.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDocContent, "//p:anim[1]"_ostr, "from"_ostr, "(-#ppt_w/2)");
- assertXPath(pXmlDocContent, "//p:anim[1]"_ostr, "to"_ostr, "(#ppt_x)");
- assertXPath(pXmlDocContent, "//p:anim[2]"_ostr, "from"_ostr, "0");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDocContent, "//p:anim[1]"_ostr, "from"_ostr, u"(-#ppt_w/2)"_ustr);
+ assertXPath(pXmlDocContent, "//p:anim[1]"_ostr, "to"_ostr, u"(#ppt_x)"_ustr);
+ assertXPath(pXmlDocContent, "//p:anim[2]"_ostr, "from"_ostr, u"0"_ustr);
- assertXPath(pXmlDocContent, "//p:anim[2]"_ostr, "to"_ostr, "-1");
- assertXPath(pXmlDocContent, "//p:anim[2]/p:cBhvr/p:cTn"_ostr, "autoRev"_ostr, "1");
+ assertXPath(pXmlDocContent, "//p:anim[2]"_ostr, "to"_ostr, u"-1"_ustr);
+ assertXPath(pXmlDocContent, "//p:anim[2]/p:cBhvr/p:cTn"_ostr, "autoRev"_ostr, u"1"_ustr);
- assertXPath(pXmlDocContent, "//p:anim[3]"_ostr, "by"_ostr, "(#ppt_h/3+#ppt_w*0.1)");
- assertXPath(pXmlDocContent, "//p:anim[3]/p:cBhvr/p:cTn"_ostr, "autoRev"_ostr, "1");
+ assertXPath(pXmlDocContent, "//p:anim[3]"_ostr, "by"_ostr, u"(#ppt_h/3+#ppt_w*0.1)"_ustr);
+ assertXPath(pXmlDocContent, "//p:anim[3]/p:cBhvr/p:cTn"_ostr, "autoRev"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf118836)
{
createSdImpressDoc("odp/tdf118836.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDocContent, "//p:animScale/p:by"_ostr, "x"_ostr, "250000");
- assertXPath(pXmlDocContent, "//p:animScale/p:by"_ostr, "y"_ostr, "250000");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDocContent, "//p:animScale/p:by"_ostr, "x"_ostr, u"250000"_ustr);
+ assertXPath(pXmlDocContent, "//p:animScale/p:by"_ostr, "y"_ostr, u"250000"_ustr);
}
static double getAdjustmentValue(const uno::Reference<beans::XPropertySet>& xSet)
{
- auto aGeomPropSeq
- = xSet->getPropertyValue("CustomShapeGeometry").get<uno::Sequence<beans::PropertyValue>>();
+ auto aGeomPropSeq = xSet->getPropertyValue(u"CustomShapeGeometry"_ustr)
+ .get<uno::Sequence<beans::PropertyValue>>();
auto aGeomPropVec
= comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(aGeomPropSeq);
@@ -787,8 +790,8 @@ static bool getScaleXValue(const uno::Reference<beans::XPropertySet>& xSet)
{
bool bScaleX = false;
- auto aGeomPropSeq
- = xSet->getPropertyValue("CustomShapeGeometry").get<uno::Sequence<beans::PropertyValue>>();
+ auto aGeomPropSeq = xSet->getPropertyValue(u"CustomShapeGeometry"_ustr)
+ .get<uno::Sequence<beans::PropertyValue>>();
auto aGeomPropVec
= comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(aGeomPropSeq);
@@ -842,67 +845,67 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf116350TextEffects)
CPPUNIT_ASSERT_EQUAL(true, bScaleX);
// Export
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent, "//p:sp[1]/p:txBody/a:bodyPr/a:prstTxWarp"_ostr, "prst"_ostr,
- "textArchUp");
+ u"textArchUp"_ustr);
assertXPath(pXmlDocContent, "//p:sp[14]/p:txBody/a:bodyPr/a:prstTxWarp"_ostr, "prst"_ostr,
- "textCircle");
+ u"textCircle"_ustr);
assertXPath(pXmlDocContent, "//p:sp[14]/p:spPr/a:solidFill/a:srgbClr"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf128096)
{
createSdImpressDoc("odp/tdf128096.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent1,
"//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:highlight/a:srgbClr"_ostr,
- "val"_ostr, "ffff00");
+ "val"_ostr, u"ffff00"_ustr);
// Check that underlined content is also highlighted
- xmlDocUniquePtr pXmlDocContent2 = parseExport("ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
assertXPath(pXmlDocContent2,
"//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:highlight/a:srgbClr"_ostr,
- "val"_ostr, "ffff00");
+ "val"_ostr, u"ffff00"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf120573)
{
createSdImpressDoc("pptx/tdf120573.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:nvPr/a:audioFile"_ostr, 1);
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:nvPr/a:videoFile"_ostr, 0);
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
assertXPath(pXmlDocRels,
"(/rels:Relationships/rels:Relationship[@Target='../media/media1.wav'])[1]"_ostr,
"Type"_ostr,
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio");
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio"_ustr);
- xmlDocUniquePtr pXmlContentType = parseExport("[Content_Types].xml");
+ xmlDocUniquePtr pXmlContentType = parseExport(u"[Content_Types].xml"_ustr);
assertXPath(pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/media/media1.wav']"_ostr,
- "ContentType"_ostr, "audio/x-wav");
+ "ContentType"_ostr, u"audio/x-wav"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf119118)
{
createSdImpressDoc("pptx/tdf119118.pptx");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDocContent, "//p:iterate"_ostr, "type"_ostr, "lt");
- assertXPath(pXmlDocContent, "//p:tmAbs"_ostr, "val"_ostr, "200");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDocContent, "//p:iterate"_ostr, "type"_ostr, u"lt"_ustr);
+ assertXPath(pXmlDocContent, "//p:tmAbs"_ostr, "val"_ostr, u"200"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf99213)
{
createSdImpressDoc("odp/tdf99213-target-missing.odp");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
// Number of nodes with p:attrNameLst was 3, including one that missed tgtEl
assertXPath(pXmlDocContent, "//p:attrNameLst"_ostr, 2);
// Timenode that miss its target element should be filtered.
@@ -915,67 +918,68 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testPotxExport)
createSdImpressDoc();
// Export as a POTM template
- save("Impress Office Open XML Template");
+ save(u"Impress Office Open XML Template"_ustr);
// Load and check content type
- xmlDocUniquePtr pContentTypes = parseExport("[Content_Types].xml");
+ xmlDocUniquePtr pContentTypes = parseExport(u"[Content_Types].xml"_ustr);
CPPUNIT_ASSERT(pContentTypes);
- assertXPath(pContentTypes,
- "/ContentType:Types/ContentType:Override[@PartName='/ppt/presentation.xml']"_ostr,
- "ContentType"_ostr,
- "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml");
+ assertXPath(
+ pContentTypes,
+ "/ContentType:Types/ContentType:Override[@PartName='/ppt/presentation.xml']"_ostr,
+ "ContentType"_ostr,
+ u"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf44223)
{
createSdImpressDoc("pptx/tdf44223.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
std::unique_ptr<SvStream> const pStream1(
- parseExportStream(maTempFile.GetURL(), "ppt/media/audio1.wav"));
+ parseExportStream(maTempFile.GetURL(), u"ppt/media/audio1.wav"_ustr));
CPPUNIT_ASSERT_EQUAL(sal_uInt64(11140), pStream1->remainingSize());
std::unique_ptr<SvStream> const pStream2(
- parseExportStream(maTempFile.GetURL(), "ppt/media/audio2.wav"));
+ parseExportStream(maTempFile.GetURL(), u"ppt/media/audio2.wav"_ustr));
CPPUNIT_ASSERT_EQUAL(sal_uInt64(28074), pStream2->remainingSize());
- xmlDocUniquePtr pXmlContentType = parseExport("[Content_Types].xml");
+ xmlDocUniquePtr pXmlContentType = parseExport(u"[Content_Types].xml"_ustr);
assertXPath(pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/media/audio1.wav']"_ostr,
- "ContentType"_ostr, "audio/x-wav");
+ "ContentType"_ostr, u"audio/x-wav"_ustr);
assertXPath(pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/media/audio2.wav']"_ostr,
- "ContentType"_ostr, "audio/x-wav");
+ "ContentType"_ostr, u"audio/x-wav"_ustr);
- xmlDocUniquePtr pDoc1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
// tdf#124230 all nodes were under p:childTnLst, but event triggered nodes need
// to be under p:subTnLst, especially for audio to work correctly.
// Start condition: 0s after timenode id 5 begins.
assertXPath(pDoc1, "//p:subTnLst/p:audio/p:cMediaNode/p:cTn/p:stCondLst/p:cond"_ostr,
- "evt"_ostr, "begin");
+ "evt"_ostr, u"begin"_ustr);
assertXPath(pDoc1, "//p:subTnLst/p:audio/p:cMediaNode/p:cTn/p:stCondLst/p:cond"_ostr,
- "delay"_ostr, "0");
+ "delay"_ostr, u"0"_ustr);
assertXPath(pDoc1, "//p:subTnLst/p:audio/p:cMediaNode/p:cTn/p:stCondLst/p:cond/p:tn"_ostr,
- "val"_ostr, "5");
+ "val"_ostr, u"5"_ustr);
- xmlDocUniquePtr pDoc2 = parseExport("ppt/slides/slide2.xml");
+ xmlDocUniquePtr pDoc2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
assertXPath(pDoc2, "//p:transition/p:sndAc/p:stSnd/p:snd[@r:embed]"_ostr, 2);
- xmlDocUniquePtr pRels1 = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pRels1 = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
assertXPath(pRels1, "//rels:Relationship[@Id='rId1']"_ostr, "Type"_ostr,
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio");
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio"_ustr);
assertXPath(pRels1, "//rels:Relationship[@Id='rId1']"_ostr, "Target"_ostr,
- "../media/audio1.wav");
+ u"../media/audio1.wav"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf135843)
{
createSdImpressDoc("pptx/tdf135843_export.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPathStart(
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnL/a:solidFill");
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx b/sd/qa/unit/export-tests-ooxml4.cxx
index be6b86f88b88..fbf60274d785 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -33,7 +33,7 @@ class SdOOXMLExportTest4 : public SdModelTestBase
{
public:
SdOOXMLExportTest4()
- : SdModelTestBase("/sd/qa/unit/data/")
+ : SdModelTestBase(u"/sd/qa/unit/data/"_ustr)
{
}
};
@@ -41,60 +41,61 @@ public:
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testSmartArtPreserve)
{
createSdImpressDoc("pptx/smartart-preserve.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr"_ostr);
assertXPath(pXmlDoc,
"//p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/dgm:relIds"_ostr);
assertXPath(
pXmlDoc,
"//p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:nvPr/p:extLst/p:ext"_ostr,
- "uri"_ostr, "{D42A27DB-BD31-4B8C-83A1-F6EECF244321}");
+ "uri"_ostr, u"{D42A27DB-BD31-4B8C-83A1-F6EECF244321}"_ustr);
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:nvPr/"
"p:extLst/p:ext/p14:modId"_ostr);
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
assertXPath(
pXmlDocRels,
"(/rels:Relationships/rels:Relationship[@Target='../diagrams/layout1.xml'])[1]"_ostr,
"Type"_ostr,
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout");
- assertXPath(pXmlDocRels,
- "(/rels:Relationships/rels:Relationship[@Target='../diagrams/data1.xml'])[1]"_ostr,
- "Type"_ostr,
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData");
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout"_ustr);
+ assertXPath(
+ pXmlDocRels,
+ "(/rels:Relationships/rels:Relationship[@Target='../diagrams/data1.xml'])[1]"_ostr,
+ "Type"_ostr,
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData"_ustr);
assertXPath(
pXmlDocRels,
"(/rels:Relationships/rels:Relationship[@Target='../diagrams/colors1.xml'])[1]"_ostr,
"Type"_ostr,
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors");
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors"_ustr);
assertXPath(
pXmlDocRels,
"(/rels:Relationships/rels:Relationship[@Target='../diagrams/quickStyle1.xml'])[1]"_ostr,
"Type"_ostr,
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle");
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle"_ustr);
- xmlDocUniquePtr pXmlContentType = parseExport("[Content_Types].xml");
+ xmlDocUniquePtr pXmlContentType = parseExport(u"[Content_Types].xml"_ustr);
assertXPath(
pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/diagrams/layout1.xml']"_ostr,
"ContentType"_ostr,
- "application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml");
+ u"application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml"_ustr);
assertXPath(pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/diagrams/data1.xml']"_ostr,
"ContentType"_ostr,
- "application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml");
+ u"application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml"_ustr);
assertXPath(
pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/diagrams/colors1.xml']"_ostr,
"ContentType"_ostr,
- "application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml");
+ u"application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml"_ustr);
assertXPath(
pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/diagrams/quickStyle1.xml']"_ostr,
"ContentType"_ostr,
- "application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml");
+ u"application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125346)
@@ -102,17 +103,17 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125346)
// There are two themes in the test document, make sure we use the right theme
createSdImpressDoc("pptx/tdf125346.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_SET_THROW);
drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
- xPropSet->getPropertyValue("FillStyle") >>= aFillStyle;
+ xPropSet->getPropertyValue(u"FillStyle"_ustr) >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, aFillStyle);
Color nFillColor;
- xPropSet->getPropertyValue("FillColor") >>= nFillColor;
+ xPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
CPPUNIT_ASSERT_EQUAL(Color(0x90C226), nFillColor);
}
@@ -122,18 +123,18 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125346_2)
// Test more slides with different themes
createSdImpressDoc("pptx/tdf125346_2.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
{
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_SET_THROW);
drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
- xPropSet->getPropertyValue("FillStyle") >>= aFillStyle;
+ xPropSet->getPropertyValue(u"FillStyle"_ustr) >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, aFillStyle);
Color nFillColor;
- xPropSet->getPropertyValue("FillColor") >>= nFillColor;
+ xPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
CPPUNIT_ASSERT_EQUAL(Color(0x90C226), nFillColor);
}
@@ -142,11 +143,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125346_2)
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_SET_THROW);
drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
- xPropSet->getPropertyValue("FillStyle") >>= aFillStyle;
+ xPropSet->getPropertyValue(u"FillStyle"_ustr) >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, aFillStyle);
Color nFillColor;
- xPropSet->getPropertyValue("FillColor") >>= nFillColor;
+ xPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
CPPUNIT_ASSERT_EQUAL(Color(0x052F61), nFillColor);
}
@@ -155,11 +156,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125346_2)
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_SET_THROW);
drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
- xPropSet->getPropertyValue("FillStyle") >>= aFillStyle;
+ xPropSet->getPropertyValue(u"FillStyle"_ustr) >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, aFillStyle);
Color nFillColor;
- xPropSet->getPropertyValue("FillColor") >>= nFillColor;
+ xPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
CPPUNIT_ASSERT_EQUAL(Color(0x90C226), nFillColor);
}
}
@@ -173,14 +174,14 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125360)
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
- xShape->setPropertyValue("FillTransparence", uno::Any(static_cast<sal_Int32>(23)));
+ xShape->setPropertyValue(u"FillTransparence"_ustr, uno::Any(static_cast<sal_Int32>(23)));
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
xShape.set(getShapeFromPage(0, 0));
sal_Int32 nTransparence = 0;
- xShape->getPropertyValue("FillTransparence") >>= nTransparence;
+ xShape->getPropertyValue(u"FillTransparence"_ustr) >>= nTransparence;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(23), nTransparence);
}
@@ -193,14 +194,14 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125360_1)
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
- xShape->setPropertyValue("FillTransparence", uno::Any(static_cast<sal_Int32>(23)));
+ xShape->setPropertyValue(u"FillTransparence"_ustr, uno::Any(static_cast<sal_Int32>(23)));
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
xShape.set(getShapeFromPage(0, 0));
sal_Int32 nTransparence = 0;
- xShape->getPropertyValue("FillTransparence") >>= nTransparence;
+ xShape->getPropertyValue(u"FillTransparence"_ustr) >>= nTransparence;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(23), nTransparence);
}
@@ -214,24 +215,24 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125360_2)
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
sal_Int32 nTransparence = 0;
- xShape->getPropertyValue("FillTransparence") >>= nTransparence;
+ xShape->getPropertyValue(u"FillTransparence"_ustr) >>= nTransparence;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(82), nTransparence);
- xShape->setPropertyValue("FillTransparence", uno::Any(static_cast<sal_Int32>(23)));
+ xShape->setPropertyValue(u"FillTransparence"_ustr, uno::Any(static_cast<sal_Int32>(23)));
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
xShape.set(getShapeFromPage(0, 0));
nTransparence = 0;
- xShape->getPropertyValue("FillTransparence") >>= nTransparence;
+ xShape->getPropertyValue(u"FillTransparence"_ustr) >>= nTransparence;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(23), nTransparence);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125551)
{
createSdImpressDoc("pptx/tdf125551.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShapeBg(xGroupShape->getByIndex(0), uno::UNO_QUERY);
@@ -245,7 +246,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125551)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf136830)
{
createSdImpressDoc("pptx/tdf136830.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Without the fix in place, the X position of the shapes would have been 0
uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
@@ -266,7 +267,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf136830)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf126234)
{
createSdImpressDoc("pptx/tdf126234.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// check relative size of the bullet, 400% is a legitimate value for MS Office document
// Without a fix, it will fail to set the size correctly
@@ -282,7 +283,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf126234)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf126741)
{
createSdImpressDoc("pptx/tdf126741.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// dash dot dot line style import fix
// The original fixed values are replaced with the percent values, because
@@ -305,10 +306,10 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf126741)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf127372)
{
createSdImpressDoc("odp/tdf127372.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
awt::Gradient2 aTransparenceGradient;
- xShape->getPropertyValue("FillTransparenceGradient") >>= aTransparenceGradient;
+ xShape->getPropertyValue(u"FillTransparenceGradient"_ustr) >>= aTransparenceGradient;
// MCGR: Use the completely imported gradient to check for correctness
const basegfx::BColorStops aColorStops
@@ -324,24 +325,24 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf127372)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf127379)
{
createSdImpressDoc("odp/tdf127379.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDoc->getDrawPages()->getCount());
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
- uno::Any aAny = xPropSet->getPropertyValue("Background");
+ uno::Any aAny = xPropSet->getPropertyValue(u"Background"_ustr);
CPPUNIT_ASSERT_MESSAGE("Slide background is missing", aAny.hasValue());
uno::Reference<beans::XPropertySet> aXBackgroundPropSet;
aAny >>= aXBackgroundPropSet;
drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
- aXBackgroundPropSet->getPropertyValue("FillStyle") >>= aFillStyle;
+ aXBackgroundPropSet->getPropertyValue(u"FillStyle"_ustr) >>= aFillStyle;
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, aFillStyle);
awt::Gradient2 aGradient;
- CPPUNIT_ASSERT(aXBackgroundPropSet->getPropertyValue("FillGradient") >>= aGradient);
+ CPPUNIT_ASSERT(aXBackgroundPropSet->getPropertyValue(u"FillGradient"_ustr) >>= aGradient);
// MCGR: Use the completely imported gradient to check for correctness
const basegfx::BColorStops aColorStops
@@ -357,23 +358,23 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf127379)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf98603)
{
createSdImpressDoc("pptx/tdf98603.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<text::XTextRange> xRun(getRunFromParagraph(0, xParagraph));
uno::Reference<beans::XPropertySet> xPropSet(xRun, uno::UNO_QUERY_THROW);
css::lang::Locale aLocale;
- xPropSet->getPropertyValue("CharLocaleComplex") >>= aLocale;
- CPPUNIT_ASSERT_EQUAL(OUString("he"), aLocale.Language);
- CPPUNIT_ASSERT_EQUAL(OUString("IL"), aLocale.Country);
+ xPropSet->getPropertyValue(u"CharLocaleComplex"_ustr) >>= aLocale;
+ CPPUNIT_ASSERT_EQUAL(u"he"_ustr, aLocale.Language);
+ CPPUNIT_ASSERT_EQUAL(u"IL"_ustr, aLocale.Country);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf128213)
{
createSdImpressDoc("pptx/tdf128213.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPathNoAttribute(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm"_ostr,
"rot"_ostr);
}
@@ -381,43 +382,43 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf128213)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf79082)
{
createSdImpressDoc("pptx/tdf79082.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[1]"_ostr,
- "pos"_ostr, "360000");
+ "pos"_ostr, u"360000"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[1]"_ostr,
- "algn"_ostr, "l");
+ "algn"_ostr, u"l"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[2]"_ostr,
- "pos"_ostr, "756000");
+ "pos"_ostr, u"756000"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[2]"_ostr,
- "algn"_ostr, "l");
+ "algn"_ostr, u"l"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[3]"_ostr,
- "pos"_ostr, "1440000");
+ "pos"_ostr, u"1440000"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[3]"_ostr,
- "algn"_ostr, "ctr");
+ "algn"_ostr, u"ctr"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[4]"_ostr,
- "pos"_ostr, "1800000");
+ "pos"_ostr, u"1800000"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[4]"_ostr,
- "algn"_ostr, "r");
+ "algn"_ostr, u"r"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[5]"_ostr,
- "pos"_ostr, "3240000");
+ "pos"_ostr, u"3240000"_ustr);
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[5]"_ostr,
- "algn"_ostr, "dec");
+ "algn"_ostr, u"dec"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf129372)
@@ -425,7 +426,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf129372)
//Without the fix in place, it would crash at import time
createSdImpressDoc("pptx/tdf129372.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
const SdrObject* pObj = pPage->GetObj(0);
@@ -436,16 +437,16 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf129372)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeGlowEffect)
{
createSdImpressDoc("pptx/shape-glow-effect.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
sal_Int32 nRadius = -1;
- xShape->getPropertyValue("GlowEffectRadius") >>= nRadius;
+ xShape->getPropertyValue(u"GlowEffectRadius"_ustr) >>= nRadius;
CPPUNIT_ASSERT_EQUAL(sal_Int32(388), nRadius); // 139700 EMU = 388.0556 mm/100
Color nColor;
- xShape->getPropertyValue("GlowEffectColor") >>= nColor;
+ xShape->getPropertyValue(u"GlowEffectColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0xFFC000), nColor);
sal_Int16 nTransparency;
- xShape->getPropertyValue("GlowEffectTransparency") >>= nTransparency;
+ xShape->getPropertyValue(u"GlowEffectTransparency"_ustr) >>= nTransparency;
CPPUNIT_ASSERT_EQUAL(sal_Int16(60), nTransparency);
}
@@ -459,37 +460,37 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testUnderline)
uno::Reference<beans::XPropertySet> xPropSet(xRun, uno::UNO_QUERY_THROW);
Color nColor;
- xPropSet->getPropertyValue("CharColor") >>= nColor;
+ xPropSet->getPropertyValue(u"CharColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nColor);
- xPropSet->getPropertyValue("CharUnderlineColor") >>= nColor;
+ xPropSet->getPropertyValue(u"CharUnderlineColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_AUTO, nColor);
sal_Int16 nUnderline;
- xPropSet->getPropertyValue("CharUnderline") >>= nUnderline;
+ xPropSet->getPropertyValue(u"CharUnderline"_ustr) >>= nUnderline;
CPPUNIT_ASSERT_EQUAL(awt::FontUnderline::DOUBLE, nUnderline);
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
xShape.set(getShapeFromPage(0, 0));
xParagraph.set(getParagraphFromShape(0, xShape));
xRun.set(getRunFromParagraph(0, xParagraph));
xPropSet.set(xRun, uno::UNO_QUERY_THROW);
- xPropSet->getPropertyValue("CharColor") >>= nColor;
+ xPropSet->getPropertyValue(u"CharColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nColor);
- xPropSet->getPropertyValue("CharUnderlineColor") >>= nColor;
+ xPropSet->getPropertyValue(u"CharUnderlineColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(COL_AUTO, nColor);
- xPropSet->getPropertyValue("CharUnderline") >>= nUnderline;
+ xPropSet->getPropertyValue(u"CharUnderline"_ustr) >>= nUnderline;
CPPUNIT_ASSERT_EQUAL(awt::FontUnderline::DOUBLE, nUnderline);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf119087)
{
createSdImpressDoc("pptx/tdf119087.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
// This would fail both on export validation, and reloading the saved pptx file.
// Get first paragraph of the text
@@ -500,14 +501,14 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf119087)
uno::Reference<beans::XPropertySet> xPropSet(xRun, uno::UNO_QUERY_THROW);
Color nColor = COL_AUTO;
- xPropSet->getPropertyValue("CharColor") >>= nColor;
+ xPropSet->getPropertyValue(u"CharColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0x00B050), nColor);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf131554)
{
createSdImpressDoc("pptx/tdf131554.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XShape> xShape(getShapeFromPage(1, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5622), xShape->getPosition().X);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(13251), xShape->getPosition().Y);
@@ -516,7 +517,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf131554)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf132282)
{
createSdImpressDoc("pptx/tdf132282.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XShape> xShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
// Without the fix in place, the position would be 0,0, height = 1 and width = 1
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1736), xShape->getPosition().X);
@@ -528,8 +529,8 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf132282)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf132201EffectOrder)
{
createSdImpressDoc("pptx/effectOrder.pptx");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/slides/slide1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPathChildren(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:effectLst"_ostr,
2);
// The relative order of effects is important: glow must be before shadow
@@ -544,32 +545,32 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf132201EffectOrder)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeSoftEdgeEffect)
{
createSdImpressDoc("pptx/shape-soft-edges.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
auto xShapeProps(getShapeFromPage(0, 0));
sal_Int32 nRadius = -1;
- xShapeProps->getPropertyValue("SoftEdgeRadius") >>= nRadius;
+ xShapeProps->getPropertyValue(u"SoftEdgeRadius"_ustr) >>= nRadius;
CPPUNIT_ASSERT_EQUAL(sal_Int32(635), nRadius); // 18 pt
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeShadowBlurEffect)
{
createSdImpressDoc("pptx/shape-blur-effect.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
bool bHasShadow = false;
- xShape->getPropertyValue("Shadow") >>= bHasShadow;
+ xShape->getPropertyValue(u"Shadow"_ustr) >>= bHasShadow;
CPPUNIT_ASSERT(bHasShadow);
sal_Int32 nRadius = -1;
- xShape->getPropertyValue("ShadowBlur") >>= nRadius;
+ xShape->getPropertyValue(u"ShadowBlur"_ustr) >>= nRadius;
CPPUNIT_ASSERT_EQUAL(sal_Int32(388), nRadius); // 11 pt
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf119223)
{
createSdImpressDoc("odp/tdf119223.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocRels, "//p:cNvPr[@name='SomeCustomShape']"_ostr);
assertXPath(pXmlDocRels, "//p:cNvPr[@name='SomePicture']"_ostr);
@@ -588,14 +589,14 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf119223)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf128213ShapeRot)
{
createSdImpressDoc("pptx/tdf128213-shaperot.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocRels = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr/a:scene3d"_ostr);
assertXPath(pXmlDocRels,
"/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr/a:scene3d/a:camera/a:rot"_ostr,
- "rev"_ostr, "5400000");
+ "rev"_ostr, u"5400000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125560_textDeflate)
@@ -603,13 +604,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125560_textDeflate)
createSdImpressDoc("pptx/ShapePlusImage.pptx");
// This problem did not affect the pptx export, only the ODP so assert that
- save("impress8");
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDocRels = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"content.xml"_ustr);
assertXPath(pXmlDocRels,
"/office:document-content/office:body/office:presentation/draw:page/"
"draw:custom-shape/draw:enhanced-geometry"_ostr,
- "type"_ostr, "mso-spt161");
+ "type"_ostr, u"mso-spt161"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125560_textInflateTop)
@@ -617,28 +618,30 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf125560_textInflateTop)
createSdImpressDoc("pptx/ShapeTextInflateTop.pptx");
// This problem did not affect the pptx export, only the ODP so assert that
- save("impress8");
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDocRels = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(u"content.xml"_ustr);
assertXPath(pXmlDocRels,
"/office:document-content/office:body/office:presentation/draw:page/"
"draw:custom-shape/draw:enhanced-geometry"_ostr,
- "type"_ostr, "mso-spt164");
+ "type"_ostr, u"mso-spt164"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf142235_TestPlaceholderTextAlignment)
{
createSdImpressDoc("odp/placeholder-box-textalignment.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXml1 = parseExport("ppt/slides/slide2.xml");
- xmlDocUniquePtr pXml2 = parseExport("ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXml1 = parseExport(u"ppt/slides/slide2.xml"_ustr);
+ xmlDocUniquePtr pXml2 = parseExport(u"ppt/slides/slide3.xml"_ustr);
// Without the fix in place many of these asserts failed, because alignment was bad.
- assertXPath(pXml1, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, "t");
- assertXPath(pXml2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, "t");
+ assertXPath(pXml1, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr,
+ u"t"_ustr);
+ assertXPath(pXml2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr,
+ u"t"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf96061_textHighlight)
@@ -651,28 +654,28 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf96061_textHighlight)
uno::Reference<beans::XPropertySet> xPropSet1(xRun1, uno::UNO_QUERY_THROW);
Color aColor;
- xPropSet1->getPropertyValue("CharBackColor") >>= aColor;
+ xPropSet1->getPropertyValue(u"CharBackColor"_ustr) >>= aColor;
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, aColor);
uno::Reference<text::XTextRange> const xParagraph2(getParagraphFromShape(1, xShape));
uno::Reference<text::XTextRange> xRun2(getRunFromParagraph(0, xParagraph2));
uno::Reference<beans::XPropertySet> xPropSet2(xRun2, uno::UNO_QUERY_THROW);
- xPropSet2->getPropertyValue("CharBackColor") >>= aColor;
+ xPropSet2->getPropertyValue(u"CharBackColor"_ustr) >>= aColor;
CPPUNIT_ASSERT_EQUAL(COL_AUTO, aColor);
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape2(getShapeFromPage(0, 0));
uno::Reference<text::XTextRange> const xParagraph3(getParagraphFromShape(0, xShape2));
uno::Reference<text::XTextRange> xRun3(getRunFromParagraph(0, xParagraph3));
uno::Reference<beans::XPropertySet> xPropSet3(xRun3, uno::UNO_QUERY_THROW);
- xPropSet3->getPropertyValue("CharBackColor") >>= aColor;
+ xPropSet3->getPropertyValue(u"CharBackColor"_ustr) >>= aColor;
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, aColor);
uno::Reference<text::XTextRange> const xParagraph4(getParagraphFromShape(1, xShape2));
uno::Reference<text::XTextRange> xRun4(getRunFromParagraph(0, xParagraph4));
uno::Reference<beans::XPropertySet> xPropSet4(xRun4, uno::UNO_QUERY_THROW);
- xPropSet4->getPropertyValue("CharBackColor") >>= aColor;
+ xPropSet4->getPropertyValue(u"CharBackColor"_ustr) >>= aColor;
CPPUNIT_ASSERT_EQUAL(COL_AUTO, aColor);
}
@@ -691,7 +694,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf143222_embeddedWorksheet)
CPPUNIT_ASSERT_MESSAGE("no graphic", pGraphic != nullptr);
// Check export of embedded worksheet in slide.
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
pPage = GetPage(1);
pOleObj = static_cast<SdrOle2Obj*>(pPage->GetObj(0));
@@ -705,9 +708,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf143315)
{
createSdImpressDoc("ppt/tdf143315-WordartWithoutBullet.ppt");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXml = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
// Without the fix in place, this would have failed with
// - Expected:
@@ -736,12 +739,12 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf147121)
getRunFromParagraph(2, getParagraphFromShape(0, xShape)), uno::UNO_QUERY_THROW);
// Save the font size
- const auto nFontSizeBefore = xRun->getPropertyValue("CharHeight").get<float>() * 100;
+ const auto nFontSizeBefore = xRun->getPropertyValue(u"CharHeight"_ustr).get<float>() * 100;
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Parse the export
- xmlDocUniquePtr pXml = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
const auto nFontSizeAfter
= getXPath(pXml, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:br[1]/a:rPr"_ostr, "sz"_ostr)
.toFloat();
@@ -759,7 +762,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf140912_PicturePlaceholder)
bool isEmptyPresentationObject = false;
// Without the fix, it would not be imported as empty presentation object;
// the text would be treated as its content.
- xShapeProps->getPropertyValue("IsEmptyPresentationObject") >>= isEmptyPresentationObject;
+ xShapeProps->getPropertyValue(u"IsEmptyPresentationObject"_ustr) >>= isEmptyPresentationObject;
CPPUNIT_ASSERT(isEmptyPresentationObject);
// If we supported custom prompt text, here we would also test "String" property,
@@ -769,10 +772,10 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf140912_PicturePlaceholder)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testEnhancedPathViewBox)
{
createSdImpressDoc("odp/tdf147978_enhancedPath_viewBox.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
auto xShapeProps(getShapeFromPage(0, 0));
awt::Rectangle aBoundRectangle;
- xShapeProps->getPropertyValue("BoundRect") >>= aBoundRectangle;
+ xShapeProps->getPropertyValue(u"BoundRect"_ustr) >>= aBoundRectangle;
// The shape has a Bézier curve which does not touch the right edge. Prior to the fix the curve
// was stretched to touch the edge, resulting in 5098 curve width instead of 2045.
CPPUNIT_ASSERT_EQUAL(sal_Int32(2045), aBoundRectangle.Width);
@@ -781,7 +784,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testEnhancedPathViewBox)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf74670)
{
createSdImpressDoc("odp/tdf74670.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
@@ -806,16 +809,16 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf109169_OctagonBevel)
// rectangle and thus had 4 points.
createSdImpressDoc("odp/tdf109169_Octagon.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
auto xPropSet(getShapeFromPage(0, 0));
- auto aGeomPropSeq = xPropSet->getPropertyValue("CustomShapeGeometry")
+ auto aGeomPropSeq = xPropSet->getPropertyValue(u"CustomShapeGeometry"_ustr)
.get<uno::Sequence<beans::PropertyValue>>();
comphelper::SequenceAsHashMap aCustomShapeGeometry(aGeomPropSeq);
- auto aPathSeq((aCustomShapeGeometry["Path"]).get<uno::Sequence<beans::PropertyValue>>());
+ auto aPathSeq((aCustomShapeGeometry[u"Path"_ustr]).get<uno::Sequence<beans::PropertyValue>>());
comphelper::SequenceAsHashMap aPath(aPathSeq);
- auto aCoordinates(
- (aPath["Coordinates"]).get<uno::Sequence<drawing::EnhancedCustomShapeParameterPair>>());
+ auto aCoordinates((aPath[u"Coordinates"_ustr])
+ .get<uno::Sequence<drawing::EnhancedCustomShapeParameterPair>>());
CPPUNIT_ASSERT_EQUAL(sal_Int32(40), aCoordinates.getLength());
}
@@ -826,16 +829,16 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf109169_DiamondBevel)
// rectangle and thus had 4 points.
createSdImpressDoc("odp/tdf109169_Diamond.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
auto xPropSet(getShapeFromPage(0, 0));
- auto aGeomPropSeq = xPropSet->getPropertyValue("CustomShapeGeometry")
+ auto aGeomPropSeq = xPropSet->getPropertyValue(u"CustomShapeGeometry"_ustr)
.get<uno::Sequence<beans::PropertyValue>>();
comphelper::SequenceAsHashMap aCustomShapeGeometry(aGeomPropSeq);
- auto aPathSeq((aCustomShapeGeometry["Path"]).get<uno::Sequence<beans::PropertyValue>>());
+ auto aPathSeq((aCustomShapeGeometry[u"Path"_ustr]).get<uno::Sequence<beans::PropertyValue>>());
comphelper::SequenceAsHashMap aPath(aPathSeq);
- auto aCoordinates(
- (aPath["Coordinates"]).get<uno::Sequence<drawing::EnhancedCustomShapeParameterPair>>());
+ auto aCoordinates((aPath[u"Coordinates"_ustr])
+ .get<uno::Sequence<drawing::EnhancedCustomShapeParameterPair>>());
CPPUNIT_ASSERT_EQUAL(sal_Int32(20), aCoordinates.getLength());
}
@@ -845,15 +848,16 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf144092_emptyShapeTextProps)
// text properties contained inside endParaRPr - The import and export
// of endParaRPr for empty cells and shapes are tested here
createSdImpressDoc("pptx/tdf144092-emptyShapeTextProps.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
Color aColor;
// check text properties of empty shape
uno::Reference<beans::XPropertySet> xRectShapeProps(getShapeFromPage(1, 0));
- CPPUNIT_ASSERT_EQUAL(OUString("Calibri"),
- xRectShapeProps->getPropertyValue("CharFontName").get<OUString>());
- CPPUNIT_ASSERT_EQUAL(float(196), xRectShapeProps->getPropertyValue("CharHeight").get<float>());
- xRectShapeProps->getPropertyValue("CharColor") >>= aColor;
+ CPPUNIT_ASSERT_EQUAL(u"Calibri"_ustr,
+ xRectShapeProps->getPropertyValue(u"CharFontName"_ustr).get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(float(196),
+ xRectShapeProps->getPropertyValue(u"CharHeight"_ustr).get<float>());
+ xRectShapeProps->getPropertyValue(u"CharColor"_ustr) >>= aColor;
CPPUNIT_ASSERT_EQUAL(Color(0x70AD47), aColor);
const SdrPage* pPage = GetPage(1);
@@ -864,13 +868,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf144092_emptyShapeTextProps)
// check text properties of empty cells
xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("CharColor") >>= aColor;
+ xCell->getPropertyValue(u"CharColor"_ustr) >>= aColor;
CPPUNIT_ASSERT_EQUAL(COL_WHITE, aColor);
xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("CharColor") >>= aColor;
+ xCell->getPropertyValue(u"CharColor"_ustr) >>= aColor;
CPPUNIT_ASSERT_EQUAL(Color(0x70AD47), aColor);
- CPPUNIT_ASSERT_EQUAL(float(96), xCell->getPropertyValue("CharHeight").get<float>());
+ CPPUNIT_ASSERT_EQUAL(float(96), xCell->getPropertyValue(u"CharHeight"_ustr).get<float>());
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf149551_tbrl90)
@@ -883,23 +887,23 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf149551_tbrl90)
// Test, that the shape has writing mode TB_RL90.
uno::Reference<beans::XPropertySet> xShapeProps(getShapeFromPage(0, 0));
sal_Int16 eWritingMode;
- xShapeProps->getPropertyValue("WritingMode") >>= eWritingMode;
+ xShapeProps->getPropertyValue(u"WritingMode"_ustr) >>= eWritingMode;
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL90, eWritingMode);
// Test, that it is exported to vert="vert"
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDoc, "//a:bodyPr"_ostr, "vert"_ostr, "vert");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDoc, "//a:bodyPr"_ostr, "vert"_ostr, u"vert"_ustr);
// Test, that the shape has writing mode TB_RL90 after read from pptx
uno::Reference<beans::XPropertySet> xShapeProps2(getShapeFromPage(0, 0));
sal_Int16 eWritingMode2;
- xShapeProps2->getPropertyValue("WritingMode") >>= eWritingMode2;
+ xShapeProps2->getPropertyValue(u"WritingMode"_ustr) >>= eWritingMode2;
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL90, eWritingMode2);
// Test, that it is written to odp with loext:writing-mode="tb-rl90"
- save("impress8");
- pXmlDoc = parseExport("content.xml");
+ save(u"impress8"_ustr);
+ pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(
pXmlDoc,
"//style:style[@style:name='gr1']/style:graphic-properties[@loext:writing-mode='tb-rl90']"_ostr);
@@ -915,23 +919,23 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf149551_btlr)
// Test, that the shape has writing mode BT_LR.
uno::Reference<beans::XPropertySet> xShapeProps(getShapeFromPage(0, 0));
sal_Int16 eWritingMode;
- xShapeProps->getPropertyValue("WritingMode") >>= eWritingMode;
+ xShapeProps->getPropertyValue(u"WritingMode"_ustr) >>= eWritingMode;
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, eWritingMode);
// Test, that it is exported to vert="vert270"
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDoc, "//a:bodyPr"_ostr, "vert"_ostr, "vert270");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDoc, "//a:bodyPr"_ostr, "vert"_ostr, u"vert270"_ustr);
// Test, that the shape has writing mode BT_LR after read from pptx
uno::Reference<beans::XPropertySet> xShapeProps2(getShapeFromPage(0, 0));
sal_Int16 eWritingMode2;
- xShapeProps2->getPropertyValue("WritingMode") >>= eWritingMode2;
+ xShapeProps2->getPropertyValue(u"WritingMode"_ustr) >>= eWritingMode2;
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, eWritingMode2);
// Test, that it is written to odp with loext:writing-mode="bt-lr"
- save("impress8");
- pXmlDoc = parseExport("content.xml");
+ save(u"impress8"_ustr);
+ pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(
pXmlDoc,
"//style:style[@style:name='gr1']/style:graphic-properties[@loext:writing-mode='bt-lr']"_ostr);
@@ -948,7 +952,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf94122_autoColor)
createSdImpressDoc("odp/tdf94122_autocolor.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Without the accompanying fix in place, these tests would have failed with:
// - Expected: 1
@@ -956,23 +960,23 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf94122_autoColor)
// - In ..., XPath '/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:srgbClr' number of nodes is incorrect
// i.e. automatic color wasn't resolved & exported
- xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent1,
"/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr,
- "val"_ostr, "000000");
+ "val"_ostr, u"000000"_ustr);
- xmlDocUniquePtr pXmlDocContent2 = parseExport("ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(u"ppt/slides/slide2.xml"_ustr);
assertXPath(pXmlDocContent2,
"/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr,
- "val"_ostr, "ffffff");
+ "val"_ostr, u"ffffff"_ustr);
- xmlDocUniquePtr pXmlDocContent3 = parseExport("ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXmlDocContent3 = parseExport(u"ppt/slides/slide3.xml"_ustr);
assertXPath(pXmlDocContent3,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr,
- "val"_ostr, "ffffff");
+ "val"_ostr, u"ffffff"_ustr);
assertXPath(pXmlDocContent3,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr,
- "val"_ostr, "000000");
+ "val"_ostr, u"000000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf124333)
@@ -985,7 +989,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf124333)
CPPUNIT_ASSERT_EQUAL_MESSAGE("number of shapes is incorrect", sal_Int32(2),
getPage(0)->getCount());
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
// Check number of shapes after export.
CPPUNIT_ASSERT_EQUAL_MESSAGE("number of shapes is incorrect after export", sal_Int32(2),
@@ -996,35 +1000,35 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testAutofittedTextboxIndent)
{
createSdImpressDoc("odp/autofitted-textbox-indent.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Check that the indent hasn't changed and wasn't scaled when exporting
// (the behaviour changed).
- xmlDocUniquePtr pXmlDocContent1 = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:pPr"_ostr,
- "marL"_ostr, "1080000");
+ "marL"_ostr, u"1080000"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf151622_oleIcon)
{
createSdImpressDoc("odp/ole_icon.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXml = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - Expression: prop
// - In ..., XPath '//p:oleObj' no attribute 'showAsIcon' exist
// i.e. show as icon option wasn't exported.
- assertXPath(pXml, "//p:oleObj"_ostr, "showAsIcon"_ostr, "1");
+ assertXPath(pXml, "//p:oleObj"_ostr, "showAsIcon"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf152436)
{
createSdImpressDoc("pptx/ole-emf_min.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
// Check number of shapes after export.
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getPage(0)->getCount());
@@ -1034,9 +1038,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testLinkedOLE)
{
createSdImpressDoc("odp/linked_ole.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXml = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -1049,7 +1053,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testLinkedOLE)
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf102261_testParaTabStopDefaultDistance)
{
createSdImpressDoc("pptx/tdf102261_testParaTabStopDefaultDistance.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
{
@@ -1057,52 +1061,52 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf102261_testParaTabStopDefaultDis
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(
sal_Int32{ 1270 },
- xPropSet->getPropertyValue("ParaTabStopDefaultDistance").get<sal_Int32>());
+ xPropSet->getPropertyValue(u"ParaTabStopDefaultDistance"_ustr).get<sal_Int32>());
}
{
uno::Reference<beans::XPropertySet> xPropSet(getParagraphFromShape(1, xShape),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(
sal_Int32{ 2540 },
- xPropSet->getPropertyValue("ParaTabStopDefaultDistance").get<sal_Int32>());
+ xPropSet->getPropertyValue(u"ParaTabStopDefaultDistance"_ustr).get<sal_Int32>());
}
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTableCellVerticalPropertyRoundtrip)
{
createSdImpressDoc("pptx/tcPr-vert-roundtrip.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXml = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr);
- assertXPath(pXml, "(//a:tcPr)[1]"_ostr, "vert"_ostr, "vert");
- assertXPath(pXml, "(//a:tcPr)[2]"_ostr, "vert"_ostr, "vert270");
- assertXPath(pXml, "(//a:tcPr)[3]"_ostr, "vert"_ostr, "wordArtVert");
+ assertXPath(pXml, "(//a:tcPr)[1]"_ostr, "vert"_ostr, u"vert"_ustr);
+ assertXPath(pXml, "(//a:tcPr)[2]"_ostr, "vert"_ostr, u"vert270"_ustr);
+ assertXPath(pXml, "(//a:tcPr)[3]"_ostr, "vert"_ostr, u"wordArtVert"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf157740_slideMasters)
{
createSdImpressDoc("pptx/tdf157740.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
// Test how many slidemaster we have
- xmlDocUniquePtr pXmlDocContent = parseExport("ppt/presentation.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr);
assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId"_ostr, 7);
- pXmlDocContent = parseExport("ppt/slideMasters/slideMaster1.xml");
+ pXmlDocContent = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sldMaster/p:sldLayoutIdLst/p:sldLayoutId"_ostr, 1);
- pXmlDocContent = parseExport("ppt/slideMasters/slideMaster7.xml");
+ pXmlDocContent = parseExport(u"ppt/slideMasters/slideMaster7.xml"_ustr);
assertXPath(pXmlDocContent, "/p:sldMaster/p:sldLayoutIdLst/p:sldLayoutId"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf159931_slideLayouts)
{
createSdImpressDoc("odp/repeatBitmapMode.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
- xmlDocUniquePtr pXmlDocRels1 = parseExport("ppt/slides/_rels/slide1.xml.rels");
- xmlDocUniquePtr pXmlDocRels2 = parseExport("ppt/slides/_rels/slide2.xml.rels");
+ xmlDocUniquePtr pXmlDocRels1 = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr);
+ xmlDocUniquePtr pXmlDocRels2 = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr);
assertXPath(
pXmlDocRels1,
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 9198021f8101..69b9db9d58f8 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -49,7 +49,7 @@ class SdExportTest : public SdModelTestBase
{
public:
SdExportTest()
- : SdModelTestBase("/sd/qa/unit/data/")
+ : SdModelTestBase(u"/sd/qa/unit/data/"_ustr)
{
}
@@ -66,7 +66,7 @@ uno::Reference<awt::XBitmap> SdExportTest::getBitmapFromTable(OUString const& rN
try
{
uno::Reference<container::XNameAccess> xBitmapTable(
- xFactory->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.drawing.BitmapTable"_ustr), uno::UNO_QUERY);
uno::Any rValue = xBitmapTable->getByName(rName);
if (rValue.has<uno::Reference<awt::XBitmap>>())
{
@@ -97,16 +97,16 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBackgroundImage)
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<beans::XPropertySet> xPropertySet(xPage, uno::UNO_QUERY);
- uno::Any aAny = xPropertySet->getPropertyValue("Background");
+ uno::Any aAny = xPropertySet->getPropertyValue(u"Background"_ustr);
if (aAny.has<uno::Reference<beans::XPropertySet>>())
{
uno::Reference<beans::XPropertySet> xBackgroundPropSet;
aAny >>= xBackgroundPropSet;
- aAny = xBackgroundPropSet->getPropertyValue("FillBitmapName");
+ aAny = xBackgroundPropSet->getPropertyValue(u"FillBitmapName"_ustr);
aAny >>= bgImageName;
}
CPPUNIT_ASSERT_EQUAL_MESSAGE("Slide Background is not imported from PPTX correctly",
- OUString("msFillBitmap 1"), bgImageName);
+ u"msFillBitmap 1"_ustr, bgImageName);
uno::Reference<awt::XBitmap> xBitmap = getBitmapFromTable(bgImageName);
CPPUNIT_ASSERT_MESSAGE("Slide Background Bitmap is missing when imported from PPTX",
@@ -115,23 +115,23 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBackgroundImage)
// Save as PPTX, reload and check again so we make sure exporting to PPTX is working correctly
{
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL_MESSAGE("not exactly one page", static_cast<sal_Int32>(1),
xDoc->getDrawPages()->getCount());
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<beans::XPropertySet> xPropertySet(xPage, uno::UNO_QUERY);
- uno::Any aAny = xPropertySet->getPropertyValue("Background");
+ uno::Any aAny = xPropertySet->getPropertyValue(u"Background"_ustr);
if (aAny.hasValue())
{
uno::Reference<beans::XPropertySet> xBackgroundPropSet;
aAny >>= xBackgroundPropSet;
- aAny = xBackgroundPropSet->getPropertyValue("FillBitmapName");
+ aAny = xBackgroundPropSet->getPropertyValue(u"FillBitmapName"_ustr);
aAny >>= bgImageName;
}
CPPUNIT_ASSERT_EQUAL_MESSAGE("Slide Background is not exported from PPTX correctly",
- OUString("msFillBitmap 1"), bgImageName);
+ u"msFillBitmap 1"_ustr, bgImageName);
uno::Reference<awt::XBitmap> xBitmap = getBitmapFromTable(bgImageName);
CPPUNIT_ASSERT_MESSAGE("Slide Background Bitmap is missing when exported from PPTX",
@@ -140,24 +140,24 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBackgroundImage)
// Save as ODP, reload and check again so we make sure exporting and importing to ODP is working correctly
{
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL_MESSAGE("not exactly one page", static_cast<sal_Int32>(1),
xDoc->getDrawPages()->getCount());
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<beans::XPropertySet> xPropertySet(xPage, uno::UNO_QUERY);
- uno::Any aAny = xPropertySet->getPropertyValue("Background");
+ uno::Any aAny = xPropertySet->getPropertyValue(u"Background"_ustr);
if (aAny.hasValue())
{
uno::Reference<beans::XPropertySet> xBackgroundPropSet;
aAny >>= xBackgroundPropSet;
- aAny = xBackgroundPropSet->getPropertyValue("FillBitmapName");
+ aAny = xBackgroundPropSet->getPropertyValue(u"FillBitmapName"_ustr);
aAny >>= bgImageName;
}
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Slide Background is not exported or imported from ODP correctly",
- OUString("msFillBitmap 1"), bgImageName);
+ u"msFillBitmap 1"_ustr, bgImageName);
uno::Reference<awt::XBitmap> xBitmap = getBitmapFromTable(bgImageName);
CPPUNIT_ASSERT_MESSAGE(
@@ -188,7 +188,7 @@ void checkFontAttributes(const SdrTextObj* pObj, ItemValue nVal, sal_uInt32 nId)
CPPUNIT_TEST_FIXTURE(SdExportTest, testTransparentBackground)
{
createSdImpressDoc("odp/transparent_background.odp");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
const SdrPage* pPage = GetPage(1);
@@ -231,13 +231,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testDecorative)
if (decorative.find(name) != decorative.end())
{
CPPUNIT_ASSERT_MESSAGE(OString(test + name).getStr(),
- xShape->getPropertyValue("Decorative").get<bool>());
+ xShape->getPropertyValue(u"Decorative"_ustr).get<bool>());
++nDecorative;
}
else
{
CPPUNIT_ASSERT_MESSAGE(OString(test + name).getStr(),
- !xShape->getPropertyValue("Decorative").get<bool>());
+ !xShape->getPropertyValue(u"Decorative"_ustr).get<bool>());
++nShapes;
}
uno::Reference<drawing::XShapes> const xShapes(xShape, uno::UNO_QUERY);
@@ -254,14 +254,14 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testDecorative)
{
CPPUNIT_ASSERT_MESSAGE(
OString(test + innerName).getStr(),
- xInnerShape->getPropertyValue("Decorative").get<bool>());
+ xInnerShape->getPropertyValue(u"Decorative"_ustr).get<bool>());
++nInnerDecorative;
}
else
{
CPPUNIT_ASSERT_MESSAGE(
OString(test + innerName).getStr(),
- !xInnerShape->getPropertyValue("Decorative").get<bool>());
+ !xInnerShape->getPropertyValue(u"Decorative"_ustr).get<bool>());
++nInnerShapes;
}
}
@@ -278,17 +278,17 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testDecorative)
doTest("initial pptx load: "_ostr);
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
doTest("reload OOXML: "_ostr);
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
doTest("reload ODF: "_ostr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf142716)
{
createSdImpressDoc("pptx/tdf142716.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
const SdrPage* pPage = GetPage(1);
const SdrTextObj* pObj = DynCastSdrTextObj(pPage->GetObj(0));
@@ -296,7 +296,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf142716)
OUString sText = pObj->GetOutlinerParaObject()->GetTextObject().GetText(0);
// Without fix "yyy" part will be lost.
- CPPUNIT_ASSERT_EQUAL(OUString("xxx and yyy"), sText);
+ CPPUNIT_ASSERT_EQUAL(u"xxx and yyy"_ustr, sText);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testMediaEmbedding)
@@ -308,18 +308,18 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testMediaEmbedding)
// Second object is a sound
SdrMediaObj* pMediaObj = dynamic_cast<SdrMediaObj*>(pPage->GetObj(3));
CPPUNIT_ASSERT_MESSAGE("missing media object", pMediaObj != nullptr);
- CPPUNIT_ASSERT_EQUAL(OUString("vnd.sun.star.Package:Media/button-1.wav"),
+ CPPUNIT_ASSERT_EQUAL(u"vnd.sun.star.Package:Media/button-1.wav"_ustr,
pMediaObj->getMediaProperties().getURL());
- CPPUNIT_ASSERT_EQUAL(OUString("application/vnd.sun.star.media"),
+ CPPUNIT_ASSERT_EQUAL(u"application/vnd.sun.star.media"_ustr,
pMediaObj->getMediaProperties().getMimeType());
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testFillBitmapUnused)
{
createSdImpressDoc("odp/fillbitmap2.odp");
- save("impress8");
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// shapes
assertXPath(
pXmlDoc,
@@ -328,7 +328,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testFillBitmapUnused)
assertXPath(
pXmlDoc,
"//style:style[@style:family='graphic']/style:graphic-properties[@draw:fill='bitmap']"_ostr,
- "fill-image-name"_ostr, "nav_5f_up");
+ "fill-image-name"_ostr, u"nav_5f_up"_ustr);
assertXPath(
pXmlDoc,
"//style:style[@style:family='graphic']/style:graphic-properties[@draw:fill='solid']"_ostr,
@@ -340,26 +340,26 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testFillBitmapUnused)
assertXPath(
pXmlDoc,
"//style:style[@style:family='graphic']/style:graphic-properties[@draw:fill='solid']"_ostr,
- "fill-color"_ostr, "#808080");
+ "fill-color"_ostr, u"#808080"_ustr);
- xmlDocUniquePtr pStyles = parseExport("styles.xml");
+ xmlDocUniquePtr pStyles = parseExport(u"styles.xml"_ustr);
// master slide presentation style
assertXPath(pStyles,
"/office:document-styles/office:styles/style:style[@style:family='presentation' "
"and @style:name='Default-background']/style:graphic-properties"_ostr,
- "fill"_ostr, "bitmap");
+ "fill"_ostr, u"bitmap"_ustr);
assertXPath(pStyles,
"/office:document-styles/office:styles/style:style[@style:family='presentation' "
"and @style:name='Default-background']/style:graphic-properties"_ostr,
- "fill-image-name"_ostr, "nav_5f_up");
+ "fill-image-name"_ostr, u"nav_5f_up"_ustr);
assertXPath(pStyles,
"/office:document-styles/office:styles/style:style[@style:family='presentation' "
"and @style:name='Default_20_1-background']/style:graphic-properties"_ostr,
- "fill"_ostr, "solid");
+ "fill"_ostr, u"solid"_ustr);
assertXPath(pStyles,
"/office:document-styles/office:styles/style:style[@style:family='presentation' "
"and @style:name='Default_20_1-background']/style:graphic-properties"_ostr,
- "fill-color"_ostr, "#808080");
+ "fill-color"_ostr, u"#808080"_ustr);
assertXPath(
pStyles,
"/office:document-styles/office:styles/style:style[@style:family='presentation' and "
@@ -369,19 +369,19 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testFillBitmapUnused)
assertXPath(pStyles,
"/office:document-styles/office:automatic-styles/style:style[@style:name='Mdp1']/"
"style:drawing-page-properties"_ostr,
- "fill"_ostr, "bitmap");
+ "fill"_ostr, u"bitmap"_ustr);
assertXPath(pStyles,
"/office:document-styles/office:automatic-styles/style:style[@style:name='Mdp1']/"
"style:drawing-page-properties"_ostr,
- "fill-image-name"_ostr, "nav_5f_up");
+ "fill-image-name"_ostr, u"nav_5f_up"_ustr);
assertXPath(pStyles,
"/office:document-styles/office:automatic-styles/style:style[@style:name='Mdp2']/"
"style:drawing-page-properties"_ostr,
- "fill"_ostr, "solid");
+ "fill"_ostr, u"solid"_ustr);
assertXPath(pStyles,
"/office:document-styles/office:automatic-styles/style:style[@style:name='Mdp2']/"
"style:drawing-page-properties"_ostr,
- "fill-color"_ostr, "#808080");
+ "fill-color"_ostr, u"#808080"_ustr);
assertXPath(pStyles,
"/office:document-styles/office:automatic-styles/style:style[@style:name='Mdp2']/"
"style:drawing-page-properties[@draw:fill-image-name]"_ostr,
@@ -390,13 +390,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testFillBitmapUnused)
// the named items
assertXPath(pStyles, "/office:document-styles/office:styles/draw:fill-image"_ostr, 1);
assertXPath(pStyles, "/office:document-styles/office:styles/draw:fill-image"_ostr, "name"_ostr,
- "nav_5f_up");
+ u"nav_5f_up"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testFdo84043)
{
createSdImpressDoc("fdo84043.odp");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
// the bug was duplicate attributes, causing crash in a build with asserts
const SdrPage* pPage = GetPage(1);
@@ -413,28 +413,28 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf97630)
drawing::TextFitToSizeType tmp;
// text shapes
uno::Reference<beans::XPropertySet> xShape0(xDP->getByIndex(0), uno::UNO_QUERY);
- xShape0->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape0->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_NONE, tmp);
uno::Reference<beans::XPropertySet> xShape1(xDP->getByIndex(1), uno::UNO_QUERY);
- xShape1->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape1->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_PROPORTIONAL, tmp);
uno::Reference<beans::XPropertySet> xShape2(xDP->getByIndex(2), uno::UNO_QUERY);
- xShape2->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape2->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_ALLLINES, tmp);
uno::Reference<beans::XPropertySet> xShape3(xDP->getByIndex(3), uno::UNO_QUERY);
- xShape3->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape3->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_AUTOFIT, tmp);
// fontworks
uno::Reference<beans::XPropertySet> xShape4(xDP->getByIndex(4), uno::UNO_QUERY);
- xShape4->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape4->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_NONE, tmp);
uno::Reference<beans::XPropertySet> xShape5(xDP->getByIndex(5), uno::UNO_QUERY);
- xShape5->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape5->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_ALLLINES, tmp);
}
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
{
uno::Reference<drawing::XDrawPage> xDP(getPage(0));
@@ -442,28 +442,28 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf97630)
drawing::TextFitToSizeType tmp;
// text shapes
uno::Reference<beans::XPropertySet> xShape0(xDP->getByIndex(0), uno::UNO_QUERY);
- xShape0->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape0->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_NONE, tmp);
uno::Reference<beans::XPropertySet> xShape1(xDP->getByIndex(1), uno::UNO_QUERY);
- xShape1->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape1->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_PROPORTIONAL, tmp);
uno::Reference<beans::XPropertySet> xShape2(xDP->getByIndex(2), uno::UNO_QUERY);
- xShape2->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape2->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_PROPORTIONAL, tmp);
uno::Reference<beans::XPropertySet> xShape3(xDP->getByIndex(3), uno::UNO_QUERY);
- xShape3->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape3->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_AUTOFIT, tmp);
// fontworks
uno::Reference<beans::XPropertySet> xShape4(xDP->getByIndex(4), uno::UNO_QUERY);
- xShape4->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape4->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_NONE, tmp);
uno::Reference<beans::XPropertySet> xShape5(xDP->getByIndex(5), uno::UNO_QUERY);
- xShape5->getPropertyValue("TextFitToSize") >>= tmp;
+ xShape5->getPropertyValue(u"TextFitToSize"_ustr) >>= tmp;
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_PROPORTIONAL, tmp);
}
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// text shapes
assertXPath(pXmlDoc,
"//style:style[@style:family='presentation']/"
@@ -495,7 +495,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf97630)
CPPUNIT_TEST_FIXTURE(SdExportTest, testImpressPasswordExport)
{
- std::vector<OUString> vFormat{ "impress8", "Impress Office Open XML" };
+ std::vector<OUString> vFormat{ u"impress8"_ustr, u"Impress Office Open XML"_ustr };
for (size_t i = 0; i < vFormat.size(); i++)
{
@@ -509,14 +509,15 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testDrawPasswordExport)
{
createSdDrawDoc();
- saveAndReload("draw8", /*pPassword*/ "test");
+ saveAndReload(u"draw8"_ustr, /*pPassword*/ "test");
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testSwappedOutImageExport)
{
// Problem was with the swapped out images, which were not swapped in during export.
- std::vector<OUString> vFormat{ "impress8", "Impress Office Open XML", "MS PowerPoint 97" };
+ std::vector<OUString> vFormat{ u"impress8"_ustr, u"Impress Office Open XML"_ustr,
+ u"MS PowerPoint 97"_ustr };
for (size_t i = 0; i < vFormat.size(); i++)
{
@@ -541,7 +542,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testSwappedOutImageExport)
// Check Graphic, Size
{
uno::Reference<graphic::XGraphic> xGraphic;
- XPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ XPropSet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic.is());
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(),
xGraphic->getType() != graphic::GraphicType::EMPTY);
@@ -561,7 +562,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testSwappedOutImageExport)
// Check Graphic, Size
{
uno::Reference<graphic::XGraphic> xGraphic;
- XPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ XPropSet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic.is());
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(),
xGraphic->getType() != graphic::GraphicType::EMPTY);
@@ -582,11 +583,11 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testOOoXMLAnimations)
// FIXME: Error: unexpected attribute "presentation:preset-property"
skipValidation();
- save("impress8");
+ save(u"impress8"_ustr);
// the problem was that legacy OOoXML animations were lost if store
// immediately follows load because they were "converted" async by a timer
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(pXmlDoc, "//anim:par[@presentation:node-type='timing-root']"_ostr, 26);
// currently getting 52 of these without the fix (depends on timing)
assertXPath(pXmlDoc, "//anim:par"_ostr, 223);
@@ -614,15 +615,15 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBnc480256)
xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW);
xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("FillColor") >>= nColor;
+ xCell->getPropertyValue(u"FillColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0x9bc3ee), nColor);
- xCell->getPropertyValue("LeftBorder") >>= aBorderLine;
+ xCell->getPropertyValue(u"LeftBorder"_ustr) >>= aBorderLine;
CPPUNIT_ASSERT_EQUAL(Color(0x5597d3), Color(ColorTransparency, aBorderLine.Color));
xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("FillColor") >>= nColor;
+ xCell->getPropertyValue(u"FillColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0xc6ddff), nColor);
- xCell->getPropertyValue("TopBorder") >>= aBorderLine;
+ xCell->getPropertyValue(u"TopBorder"_ustr) >>= aBorderLine;
CPPUNIT_ASSERT_EQUAL(Color(0x5597d3), Color(ColorTransparency, aBorderLine.Color));
pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(1));
@@ -630,18 +631,18 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBnc480256)
xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW);
xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("FillColor") >>= nColor;
+ xCell->getPropertyValue(u"FillColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0x6bace6), nColor);
- xCell->getPropertyValue("LeftBorder") >>= aBorderLine;
+ xCell->getPropertyValue(u"LeftBorder"_ustr) >>= aBorderLine;
CPPUNIT_ASSERT_EQUAL(Color(0xbecfe6), Color(ColorTransparency, aBorderLine.Color));
xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("FillColor") >>= nColor;
+ xCell->getPropertyValue(u"FillColor"_ustr) >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0x4697e0), nColor);
// This border should be invisible.
xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("BottomBorder") >>= aBorderLine;
+ xCell->getPropertyValue(u"BottomBorder"_ustr) >>= aBorderLine;
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), sal_Int32(aBorderLine.LineWidth));
}
@@ -652,9 +653,9 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testUnknownAttributes)
// FIXME: Error: unexpected attribute "foo:non-existent-att"
skipValidation();
- save("impress8");
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/"
"style:style[@style:name='gr1']/"
"style:graphic-properties[@foo:non-existent-att='bar']"_ostr);
@@ -672,20 +673,22 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf80020)
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies
= xStyleFamiliesSupplier->getStyleFamilies();
- uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("graphics"),
- uno::UNO_QUERY);
- uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("Test Style"), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("text"), xStyle->getParentStyle());
- saveAndReload("impress8");
+ uno::Reference<container::XNameAccess> xStyleFamily(
+ xStyleFamilies->getByName(u"graphics"_ustr), uno::UNO_QUERY);
+ uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName(u"Test Style"_ustr),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(u"text"_ustr, xStyle->getParentStyle());
+ saveAndReload(u"impress8"_ustr);
}
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies
= xStyleFamiliesSupplier->getStyleFamilies();
- uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("graphics"),
+ uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName(u"graphics"_ustr),
uno::UNO_QUERY);
- uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("Test Style"), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("text"), xStyle->getParentStyle());
+ uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName(u"Test Style"_ustr),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(u"text"_ustr, xStyle->getParentStyle());
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf128985)
@@ -696,30 +699,31 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf128985)
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies
= xStyleFamiliesSupplier->getStyleFamilies();
- uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("LushGreen"),
- uno::UNO_QUERY);
- uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("outline1"), uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xStyleFamily(
+ xStyleFamilies->getByName(u"LushGreen"_ustr), uno::UNO_QUERY);
+ uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName(u"outline1"_ustr),
+ uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xPropSet(xStyle, uno::UNO_QUERY);
sal_Int16 nWritingMode = 0;
- xPropSet->getPropertyValue("WritingMode") >>= nWritingMode;
+ xPropSet->getPropertyValue(u"WritingMode"_ustr) >>= nWritingMode;
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, nWritingMode);
- xPropSet->setPropertyValue("WritingMode", uno::Any(text::WritingMode2::LR_TB));
+ xPropSet->setPropertyValue(u"WritingMode"_ustr, uno::Any(text::WritingMode2::LR_TB));
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
}
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies
= xStyleFamiliesSupplier->getStyleFamilies();
- uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("LushGreen"),
- uno::UNO_QUERY);
- uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("outline1"), uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xStyleFamily(
+ xStyleFamilies->getByName(u"LushGreen"_ustr), uno::UNO_QUERY);
+ uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName(u"outline1"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xPropSet(xStyle, uno::UNO_QUERY);
sal_Int16 nWritingMode = 0;
- xPropSet->getPropertyValue("WritingMode") >>= nWritingMode;
+ xPropSet->getPropertyValue(u"WritingMode"_ustr) >>= nWritingMode;
// Without the fix in place, this test would have failed with
// - Expected: 0
@@ -730,7 +734,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf128985)
CPPUNIT_TEST_FIXTURE(SdExportTest, testLinkedGraphicRT)
{
// FIXME: PPTX fails
- std::vector<OUString> vFormat{ "impress8", "MS PowerPoint 97" };
+ std::vector<OUString> vFormat{ u"impress8"_ustr, u"MS PowerPoint 97"_ustr };
for (size_t i = 0; i < vFormat.size(); i++)
{
// Load the original file with one image
@@ -787,8 +791,8 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testLinkedGraphicRT)
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf79082)
{
createSdImpressDoc("ppt/tdf79082.ppt");
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// P1 should have 6 tab stops defined
assertXPathChildren(
@@ -797,27 +801,27 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf79082)
assertXPath(pXmlDoc,
"//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/"
"style:tab-stop[1]"_ostr,
- "position"_ostr, "0cm");
+ "position"_ostr, u"0cm"_ustr);
assertXPath(pXmlDoc,
"//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/"
"style:tab-stop[2]"_ostr,
- "position"_ostr, "5.08cm");
+ "position"_ostr, u"5.08cm"_ustr);
assertXPath(pXmlDoc,
"//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/"
"style:tab-stop[3]"_ostr,
- "position"_ostr, "10.16cm");
+ "position"_ostr, u"10.16cm"_ustr);
assertXPath(pXmlDoc,
"//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/"
"style:tab-stop[4]"_ostr,
- "position"_ostr, "15.24cm");
+ "position"_ostr, u"15.24cm"_ustr);
assertXPath(pXmlDoc,
"//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/"
"style:tab-stop[5]"_ostr,
- "position"_ostr, "20.32cm");
+ "position"_ostr, u"20.32cm"_ustr);
assertXPath(pXmlDoc,
"//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/"
"style:tab-stop[6]"_ostr,
- "position"_ostr, "25.4cm");
+ "position"_ostr, u"25.4cm"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testImageWithSpecialID)
@@ -825,7 +829,8 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testImageWithSpecialID)
// Check how LO handles when the imported graphic's ID is different from that one
// which is generated by LO.
- std::vector<OUString> vFormat{ "impress8", "Impress Office Open XML", "MS PowerPoint 97" };
+ std::vector<OUString> vFormat{ u"impress8"_ustr, u"Impress Office Open XML"_ustr,
+ u"MS PowerPoint 97"_ustr };
for (size_t i = 0; i < vFormat.size(); i++)
{
// Load the original file
@@ -847,7 +852,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testImageWithSpecialID)
// Check Graphic, Size
{
uno::Reference<graphic::XGraphic> xGraphic;
- XPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ XPropSet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic.is());
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(),
xGraphic->getType() != graphic::GraphicType::EMPTY);
@@ -867,7 +872,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testImageWithSpecialID)
// Check Graphic, Size
{
uno::Reference<graphic::XGraphic> xGraphic;
- XPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ XPropSet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic.is());
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(),
xGraphic->getType() != graphic::GraphicType::EMPTY);
@@ -892,19 +897,19 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf62176)
uno::Reference<beans::XPropertySet> xShape(getShape(0, xPage));
//checking Paragraph's Left Margin with expected value
sal_Int32 nParaLeftMargin = 0;
- xShape->getPropertyValue("ParaLeftMargin") >>= nParaLeftMargin;
+ xShape->getPropertyValue(u"ParaLeftMargin"_ustr) >>= nParaLeftMargin;
CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), nParaLeftMargin);
//checking Paragraph's First Line Indent with expected value
sal_Int32 nParaFirstLineIndent = 0;
- xShape->getPropertyValue("ParaFirstLineIndent") >>= nParaFirstLineIndent;
+ xShape->getPropertyValue(u"ParaFirstLineIndent"_ustr) >>= nParaFirstLineIndent;
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1300), nParaFirstLineIndent);
//Checking the *Text* in TextBox
uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xShape));
- CPPUNIT_ASSERT_EQUAL(OUString("Hello World"), xParagraph->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Hello World"_ustr, xParagraph->getString());
//Saving and Reloading the file
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<drawing::XDrawPage> xPage2(getPage(0));
//there should be only *one* shape
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xPage2->getCount());
@@ -912,16 +917,16 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf62176)
uno::Reference<beans::XPropertySet> xShape2(getShape(0, xPage2));
//checking Paragraph's Left Margin with expected value
sal_Int32 nParaLeftMargin2 = 0;
- xShape2->getPropertyValue("ParaLeftMargin") >>= nParaLeftMargin2;
+ xShape2->getPropertyValue(u"ParaLeftMargin"_ustr) >>= nParaLeftMargin2;
CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), nParaLeftMargin2);
//checking Paragraph's First Line Indent with expected value
sal_Int32 nParaFirstLineIndent2 = 0;
- xShape2->getPropertyValue("ParaFirstLineIndent") >>= nParaFirstLineIndent2;
+ xShape2->getPropertyValue(u"ParaFirstLineIndent"_ustr) >>= nParaFirstLineIndent2;
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1300), nParaFirstLineIndent2);
//Checking the *Text* in TextBox
uno::Reference<text::XTextRange> xParagraph2(getParagraphFromShape(0, xShape2));
- CPPUNIT_ASSERT_EQUAL(OUString("Hello World"), xParagraph2->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Hello World"_ustr, xParagraph2->getString());
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testEmbeddedPdf)
@@ -933,18 +938,18 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testEmbeddedPdf)
}
createSdImpressDoc("odp/embedded-pdf.odp");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<graphic::XGraphic> xGraphic;
- xShape->getPropertyValue("ReplacementGraphic") >>= xGraphic;
+ xShape->getPropertyValue(u"ReplacementGraphic"_ustr) >>= xGraphic;
CPPUNIT_ASSERT(xGraphic.is());
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testEmbeddedText)
{
createSdDrawDoc("objectwithtext.fodg");
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY);
@@ -964,20 +969,20 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testEmbeddedText)
CPPUNIT_ASSERT(xPortion.is());
uno::Reference<text::XTextRange> xRange(xPortion, uno::UNO_QUERY);
OUString type;
- xPortion->getPropertyValue("TextPortionType") >>= type;
- CPPUNIT_ASSERT_EQUAL(OUString("Text"), type);
- CPPUNIT_ASSERT_EQUAL(OUString("foobar"), xRange->getString()); //tdf#112547
+ xPortion->getPropertyValue(u"TextPortionType"_ustr) >>= type;
+ CPPUNIT_ASSERT_EQUAL(u"Text"_ustr, type);
+ CPPUNIT_ASSERT_EQUAL(u"foobar"_ustr, xRange->getString()); //tdf#112547
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTransparenText)
{
createSdDrawDoc("transparent-text.fodg");
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY);
sal_Int16 nCharTransparence = 0;
- xShape->getPropertyValue("CharTransparence") >>= nCharTransparence;
+ xShape->getPropertyValue(u"CharTransparence"_ustr) >>= nCharTransparence;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 75
@@ -989,7 +994,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTransparenText)
CPPUNIT_TEST_FIXTURE(SdExportTest, testDefaultSubscripts)
{
createSdDrawDoc("tdf80194_defaultSubscripts.fodg");
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
uno::Reference<drawing::XDrawPage> xPage = getPage(0);
uno::Reference<drawing::XShape> xShape(xPage->getByIndex(1), uno::UNO_QUERY);
@@ -1001,24 +1006,24 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testDefaultSubscripts)
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf98477)
{
createSdImpressDoc("pptx/tdf98477grow.pptx");
- save("impress8");
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
- assertXPath(pXmlDoc, "//anim:animateTransform"_ostr, "by"_ostr, "0.5,0.5");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc, "//anim:animateTransform"_ostr, "by"_ostr, u"0.5,0.5"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testAuthorField)
{
createSdImpressDoc("odp/author_fixed.odp");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<text::XTextField> xField = getTextFieldFromPage(0, 0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Where is the text field?", xField.is());
uno::Reference<beans::XPropertySet> xPropSet(xField, uno::UNO_QUERY_THROW);
bool bFixed = false;
- xPropSet->getPropertyValue("IsFixed") >>= bFixed;
+ xPropSet->getPropertyValue(u"IsFixed"_ustr) >>= bFixed;
CPPUNIT_ASSERT_MESSAGE("Author field is not fixed", bFixed);
}
@@ -1026,19 +1031,19 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf50499)
{
createSdImpressDoc("pptx/tdf50499.pptx");
- save("impress8");
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
- assertXPath(pXmlDoc, "//anim:animate[1]"_ostr, "from"_ostr, "(-width/2)");
- assertXPath(pXmlDoc, "//anim:animate[1]"_ostr, "to"_ostr, "(x)");
- assertXPath(pXmlDoc, "//anim:animate[3]"_ostr, "by"_ostr, "(height/3+width*0.1)");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc, "//anim:animate[1]"_ostr, "from"_ostr, u"(-width/2)"_ustr);
+ assertXPath(pXmlDoc, "//anim:animate[1]"_ostr, "to"_ostr, u"(x)"_ustr);
+ assertXPath(pXmlDoc, "//anim:animate[3]"_ostr, "by"_ostr, u"(height/3+width*0.1)"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf100926)
{
createSdImpressDoc("pptx/tdf100926_ODP.pptx");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
const SdrPage* pPage = GetPage(1);
CPPUNIT_ASSERT(pPage != nullptr);
@@ -1050,15 +1055,15 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf100926)
sal_Int32 nRotation = 0;
uno::Reference<beans::XPropertySet> xCell(xTable->getCellByPosition(0, 0),
uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("RotateAngle") >>= nRotation;
+ xCell->getPropertyValue(u"RotateAngle"_ustr) >>= nRotation;
CPPUNIT_ASSERT_EQUAL(sal_Int32(27000), nRotation);
xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("RotateAngle") >>= nRotation;
+ xCell->getPropertyValue(u"RotateAngle"_ustr) >>= nRotation;
CPPUNIT_ASSERT_EQUAL(sal_Int32(9000), nRotation);
xCell.set(xTable->getCellByPosition(2, 0), uno::UNO_QUERY_THROW);
- xCell->getPropertyValue("RotateAngle") >>= nRotation;
+ xCell->getPropertyValue(u"RotateAngle"_ustr) >>= nRotation;
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nRotation);
}
@@ -1066,7 +1071,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testPageWithTransparentBackground)
{
createSdImpressDoc("odp/page_transparent_background.odp");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly one page", static_cast<sal_Int32>(1),
xDoc->getDrawPages()->getCount());
@@ -1074,13 +1079,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testPageWithTransparentBackground)
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
- uno::Any aAny = xPropSet->getPropertyValue("Background");
+ uno::Any aAny = xPropSet->getPropertyValue(u"Background"_ustr);
CPPUNIT_ASSERT_MESSAGE("Slide background is missing", aAny.hasValue());
uno::Reference<beans::XPropertySet> aXBackgroundPropSet;
aAny >>= aXBackgroundPropSet;
sal_Int32 nTransparence;
- aAny = aXBackgroundPropSet->getPropertyValue("FillTransparence");
+ aAny = aXBackgroundPropSet->getPropertyValue(u"FillTransparence"_ustr);
aAny >>= nTransparence;
CPPUNIT_ASSERT_EQUAL_MESSAGE("Slide background transparency is wrong", sal_Int32(42),
nTransparence);
@@ -1108,13 +1113,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTextRotation)
pBatch->commit();
createSdImpressDoc("pptx/shape-text-rotate.pptx");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<beans::XPropertySet> xPropSet(getShape(0, xPage));
CPPUNIT_ASSERT(xPropSet.is());
- auto aWritingMode = xPropSet->getPropertyValue("WritingMode").get<sal_Int16>();
+ auto aWritingMode = xPropSet->getPropertyValue(u"WritingMode"_ustr).get<sal_Int16>();
CPPUNIT_ASSERT_EQUAL(sal_Int16(text::WritingMode2::TB_RL90), aWritingMode);
}
// In ODF 1.3 strict the workaround to use the TextRotateAngle is used instead.
@@ -1125,20 +1130,21 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTextRotation)
pBatch->commit();
createSdImpressDoc("pptx/shape-text-rotate.pptx");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<drawing::XDrawPage> xPage(getPage(0));
uno::Reference<beans::XPropertySet> xPropSet(getShape(0, xPage));
CPPUNIT_ASSERT(xPropSet.is());
- auto aGeomPropSeq = xPropSet->getPropertyValue("CustomShapeGeometry")
+ auto aGeomPropSeq = xPropSet->getPropertyValue(u"CustomShapeGeometry"_ustr)
.get<uno::Sequence<beans::PropertyValue>>();
comphelper::SequenceAsHashMap aCustomShapeGeometry(aGeomPropSeq);
- auto it = aCustomShapeGeometry.find("TextRotateAngle");
+ auto it = aCustomShapeGeometry.find(u"TextRotateAngle"_ustr);
CPPUNIT_ASSERT(it != aCustomShapeGeometry.end());
- CPPUNIT_ASSERT_EQUAL(double(-90), aCustomShapeGeometry["TextRotateAngle"].get<double>());
+ CPPUNIT_ASSERT_EQUAL(double(-90),
+ aCustomShapeGeometry[u"TextRotateAngle"_ustr].get<double>());
}
}
@@ -1147,7 +1153,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf115394PPT)
createSdImpressDoc("ppt/tdf115394.ppt");
// Export the document and import again for a check
- saveAndReload("MS PowerPoint 97");
+ saveAndReload(u"MS PowerPoint 97"_ustr);
double fTransitionDuration;
@@ -1173,14 +1179,14 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf115394PPT)
CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpress8)
{
createSdImpressDoc("odp/BulletsAsImage.odp");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
- uno::Reference<container::XIndexAccess> xLevels(xPropSet->getPropertyValue("NumberingRules"),
- uno::UNO_QUERY_THROW);
+ uno::Reference<container::XIndexAccess> xLevels(
+ xPropSet->getPropertyValue(u"NumberingRules"_ustr), uno::UNO_QUERY_THROW);
uno::Sequence<beans::PropertyValue> aProperties;
xLevels->getByIndex(0) >>= aProperties; // 1st level
@@ -1223,14 +1229,14 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpress8)
CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpressOfficeOpenXml)
{
createSdImpressDoc("odp/BulletsAsImage.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
- uno::Reference<container::XIndexAccess> xLevels(xPropSet->getPropertyValue("NumberingRules"),
- uno::UNO_QUERY_THROW);
+ uno::Reference<container::XIndexAccess> xLevels(
+ xPropSet->getPropertyValue(u"NumberingRules"_ustr), uno::UNO_QUERY_THROW);
uno::Sequence<beans::PropertyValue> aProperties;
xLevels->getByIndex(0) >>= aProperties; // 1st level
@@ -1275,14 +1281,14 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpressOfficeOpenXml)
CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageMsPowerpoint97)
{
createSdImpressDoc("odp/BulletsAsImage.odp");
- saveAndReload("MS PowerPoint 97");
+ saveAndReload(u"MS PowerPoint 97"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
- uno::Reference<container::XIndexAccess> xLevels(xPropSet->getPropertyValue("NumberingRules"),
- uno::UNO_QUERY_THROW);
+ uno::Reference<container::XIndexAccess> xLevels(
+ xPropSet->getPropertyValue(u"NumberingRules"_ustr), uno::UNO_QUERY_THROW);
uno::Sequence<beans::PropertyValue> aProperties;
xLevels->getByIndex(0) >>= aProperties; // 1st level
@@ -1328,40 +1334,41 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf113822)
createSdImpressDoc("pptx/tdf113822underline.pptx");
// Was unable to export iterate container (tdf#99213).
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
// Was unable to import iterate container (tdf#113822).
- save("impress8");
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// IterateContainer was created as ParallelTimeContainer before, so
// the iterate type is not set too.
- assertXPath(pXmlDoc, "//anim:iterate"_ostr, "iterate-type"_ostr, "by-letter");
+ assertXPath(pXmlDoc, "//anim:iterate"_ostr, "iterate-type"_ostr, u"by-letter"_ustr);
// The target of the child animation nodes need to be in the iterate container.
- assertXPath(pXmlDoc, "//anim:iterate"_ostr, "targetElement"_ostr, "id1");
- assertXPath(pXmlDoc, "//anim:iterate/anim:set"_ostr, "attributeName"_ostr, "text-underline");
- assertXPath(pXmlDoc, "//anim:iterate/anim:set"_ostr, "to"_ostr, "solid");
+ assertXPath(pXmlDoc, "//anim:iterate"_ostr, "targetElement"_ostr, u"id1"_ustr);
+ assertXPath(pXmlDoc, "//anim:iterate/anim:set"_ostr, "attributeName"_ostr,
+ u"text-underline"_ustr);
+ assertXPath(pXmlDoc, "//anim:iterate/anim:set"_ostr, "to"_ostr, u"solid"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf113818)
{
createSdImpressDoc("pptx/tdf113818-swivel.pptx");
- saveAndReload("MS PowerPoint 97");
- saveAndReload("Impress Office Open XML");
- save("impress8");
+ saveAndReload(u"MS PowerPoint 97"_ustr);
+ saveAndReload(u"Impress Office Open XML"_ustr);
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
- assertXPath(pXmlDoc, "//anim:animate[1]"_ostr, "formula"_ostr, "width*sin(2.5*pi*$)");
- assertXPath(pXmlDoc, "//anim:animate[1]"_ostr, "values"_ostr, "0;1");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc, "//anim:animate[1]"_ostr, "formula"_ostr, u"width*sin(2.5*pi*$)"_ustr);
+ assertXPath(pXmlDoc, "//anim:animate[1]"_ostr, "values"_ostr, u"0;1"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf119629)
{
createSdImpressDoc("ppt/tdf119629.ppt");
- saveAndReload("MS PowerPoint 97");
- save("impress8");
+ saveAndReload(u"MS PowerPoint 97"_ustr);
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// MSO's effect node type Click parallel node, with group node, after group node
// were missing.
@@ -1379,13 +1386,13 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf119629)
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf141269)
{
createSdImpressDoc("odp/tdf141269.odp");
- saveAndReload("MS PowerPoint 97");
+ saveAndReload(u"MS PowerPoint 97"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0), uno::UNO_SET_THROW);
CPPUNIT_ASSERT(xShape.is());
uno::Reference<graphic::XGraphic> xGraphic;
- xShape->getPropertyValue("Graphic") >>= xGraphic;
+ xShape->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
CPPUNIT_ASSERT(xGraphic.is());
Graphic aGraphic(xGraphic);
@@ -1405,9 +1412,9 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf141269)
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf123557)
{
createSdImpressDoc("pptx/trigger.pptx");
- saveAndReload("Impress Office Open XML");
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ saveAndReload(u"Impress Office Open XML"_ustr);
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Contains 2 interactive sequences and 3 triggered effects.
assertXPath(pXmlDoc, "//draw:page"_ostr, 1);
@@ -1428,7 +1435,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf123557)
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf126761)
{
createSdImpressDoc("ppt/tdf126761.ppt");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
// Get first paragraph of the text
@@ -1440,104 +1447,105 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf126761)
// Check character underline, to make sure it has been set correctly
sal_uInt32 nCharUnderline;
- xPropSet->getPropertyValue("CharUnderline") >>= nCharUnderline;
+ xPropSet->getPropertyValue(u"CharUnderline"_ustr) >>= nCharUnderline;
CPPUNIT_ASSERT_EQUAL(sal_uInt32(1), nCharUnderline);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testGlow)
{
createSdDrawDoc("odg/glow.odg");
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
// Check glow properties
sal_Int32 nGlowEffectRad = 0;
- CPPUNIT_ASSERT(xShape->getPropertyValue("GlowEffectRadius") >>= nGlowEffectRad);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"GlowEffectRadius"_ustr) >>= nGlowEffectRad);
CPPUNIT_ASSERT_EQUAL(sal_Int32(529), nGlowEffectRad); // 15 pt = 529.166... mm/100
Color nGlowEffectColor;
- CPPUNIT_ASSERT(xShape->getPropertyValue("GlowEffectColor") >>= nGlowEffectColor);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"GlowEffectColor"_ustr) >>= nGlowEffectColor);
CPPUNIT_ASSERT_EQUAL(Color(0x00FF4000), nGlowEffectColor); // "Brick"
sal_Int16 nGlowEffectTransparency = 0;
- CPPUNIT_ASSERT(xShape->getPropertyValue("GlowEffectTransparency") >>= nGlowEffectTransparency);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"GlowEffectTransparency"_ustr)
+ >>= nGlowEffectTransparency);
CPPUNIT_ASSERT_EQUAL(sal_Int16(60), nGlowEffectTransparency); // 60%
// Test ODF element
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// check that we actually test graphic style
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[2]"_ostr,
- "family"_ostr, "graphic");
+ "family"_ostr, u"graphic"_ustr);
// check loext graphic attributes
assertXPath(
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[2]/style:graphic-properties"_ostr,
- "glow-radius"_ostr, "0.529cm");
+ "glow-radius"_ostr, u"0.529cm"_ustr);
assertXPath(
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[2]/style:graphic-properties"_ostr,
- "glow-color"_ostr, "#ff4000");
+ "glow-color"_ostr, u"#ff4000"_ustr);
assertXPath(
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[2]/style:graphic-properties"_ostr,
- "glow-transparency"_ostr, "60%");
+ "glow-transparency"_ostr, u"60%"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testSoftEdges)
{
createSdDrawDoc("odg/softedges.odg");
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
auto xShapeProps(getShapeFromPage(0, 0));
// Check property
sal_Int32 nRad = 0;
- CPPUNIT_ASSERT(xShapeProps->getPropertyValue("SoftEdgeRadius") >>= nRad);
+ CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"SoftEdgeRadius"_ustr) >>= nRad);
CPPUNIT_ASSERT_EQUAL(sal_Int32(635), nRad); // 18 pt
// Test ODF element
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// check that we actually test graphic style
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[2]"_ostr,
- "family"_ostr, "graphic");
+ "family"_ostr, u"graphic"_ustr);
// check loext graphic attribute
assertXPath(
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[2]/style:graphic-properties"_ostr,
- "softedge-radius"_ostr, "0.635cm");
+ "softedge-radius"_ostr, u"0.635cm"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testShadowBlur)
{
createSdImpressDoc("odp/shadow-blur.odp");
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
sal_Int32 nRad = 0;
- CPPUNIT_ASSERT(xShape->getPropertyValue("ShadowBlur") >>= nRad);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"ShadowBlur"_ustr) >>= nRad);
CPPUNIT_ASSERT_EQUAL(sal_Int32(388), nRad); // 11 pt = 388 Hmm
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[3]"_ostr,
- "family"_ostr, "graphic");
+ "family"_ostr, u"graphic"_ustr);
assertXPath(
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr,
- "shadow-blur"_ostr, "0.388cm");
+ "shadow-blur"_ostr, u"0.388cm"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testRhbz1870501)
{
//Without the fix in place, it would crash at export time
createSdDrawDoc("odg/rhbz1870501.odg");
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf152606)
{
//Without the fix in place, it would crash at import time
createSdImpressDoc("pptx/tdf152606.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -1550,21 +1558,21 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf154754)
//Without the fix in place, it would crash at export time
skipValidation();
createSdImpressDoc("odp/tdf154754.odp");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf91060)
{
//Without the fix in place, it would crash at import time
createSdImpressDoc("pptx/tdf91060.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf128550)
{
createSdImpressDoc("pptx/tdf128550.pptx");
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(pXmlDoc, "//anim:iterate[@anim:sub-item='background']"_ostr, 1);
assertXPath(pXmlDoc, "//anim:iterate[@anim:sub-item='text']"_ostr, 4);
}
@@ -1574,16 +1582,16 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf140714)
//Without the fix in place, shape will be imported as GraphicObjectShape instead of CustomShape.
createSdImpressDoc("pptx/tdf140714.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XShape> xShape(getShapeFromPage(0, 0), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString{ "com.sun.star.drawing.CustomShape" }, xShape->getShapeType());
+ CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.CustomShape"_ustr, xShape->getShapeType());
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf156649)
{
createSdImpressDoc("pptx/tdf156649.pptx");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
auto xShapeProps(getShapeFromPage(0, 0));
// Without the fix in place, this test would have failed with
@@ -1591,7 +1599,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf156649)
//- Actual : 0
// i.e. alphaModFix wasn't imported as fill transparency for the custom shape
CPPUNIT_ASSERT_EQUAL(sal_Int16(55),
- xShapeProps->getPropertyValue("FillTransparence").get<sal_Int16>());
+ xShapeProps->getPropertyValue(u"FillTransparence"_ustr).get<sal_Int16>());
}
CPPUNIT_TEST_FIXTURE(SdExportTest, testMasterPageBackgroundFullSize)
@@ -1606,179 +1614,219 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testMasterPageBackgroundFullSize)
Color nFillColor;
{
uno::Reference<beans::XPropertySet> xMP(xMPs->getByIndex(0), uno::UNO_QUERY);
- CPPUNIT_ASSERT(!xMP->getPropertyValue("BackgroundFullSize").get<bool>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), xMP->getPropertyValue("BorderTop").get<sal_Int32>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), xMP->getPropertyValue("BorderLeft").get<sal_Int32>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xMP->getPropertyValue("BorderBottom").get<sal_Int32>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xMP->getPropertyValue("BorderRight").get<sal_Int32>());
+ CPPUNIT_ASSERT(!xMP->getPropertyValue(u"BackgroundFullSize"_ustr).get<bool>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000),
+ xMP->getPropertyValue(u"BorderTop"_ustr).get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000),
+ xMP->getPropertyValue(u"BorderLeft"_ustr).get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ xMP->getPropertyValue(u"BorderBottom"_ustr).get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ xMP->getPropertyValue(u"BorderRight"_ustr).get<sal_Int32>());
uno::Reference<beans::XPropertySet> xBackgroundProps(
- xMP->getPropertyValue("Background").get<uno::Reference<beans::XPropertySet>>());
+ xMP->getPropertyValue(u"Background"_ustr).get<uno::Reference<beans::XPropertySet>>());
CPPUNIT_ASSERT_EQUAL(
drawing::FillStyle_SOLID,
- xBackgroundProps->getPropertyValue("FillStyle").get<drawing::FillStyle>());
- xBackgroundProps->getPropertyValue("FillColor") >>= nFillColor;
+ xBackgroundProps->getPropertyValue(u"FillStyle"_ustr).get<drawing::FillStyle>());
+ xBackgroundProps->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
CPPUNIT_ASSERT_EQUAL(Color(0x729fcf), nFillColor);
CPPUNIT_ASSERT_EQUAL(
- sal_Int16(0), xBackgroundProps->getPropertyValue("FillTransparence").get<sal_Int16>());
+ sal_Int16(0),
+ xBackgroundProps->getPropertyValue(u"FillTransparence"_ustr).get<sal_Int16>());
}
{
uno::Reference<beans::XPropertySet> xMP(xMPs->getByIndex(1), uno::UNO_QUERY);
- CPPUNIT_ASSERT(xMP->getPropertyValue("BackgroundFullSize").get<bool>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), xMP->getPropertyValue("BorderTop").get<sal_Int32>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), xMP->getPropertyValue("BorderLeft").get<sal_Int32>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xMP->getPropertyValue("BorderBottom").get<sal_Int32>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xMP->getPropertyValue("BorderRight").get<sal_Int32>());
+ CPPUNIT_ASSERT(xMP->getPropertyValue(u"BackgroundFullSize"_ustr).get<bool>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000),
+ xMP->getPropertyValue(u"BorderTop"_ustr).get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000),
+ xMP->getPropertyValue(u"BorderLeft"_ustr).get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ xMP->getPropertyValue(u"BorderBottom"_ustr).get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ xMP->getPropertyValue(u"BorderRight"_ustr).get<sal_Int32>());
uno::Reference<beans::XPropertySet> xBackgroundProps(
- xMP->getPropertyValue("Background").get<uno::Reference<beans::XPropertySet>>());
+ xMP->getPropertyValue(u"Background"_ustr).get<uno::Reference<beans::XPropertySet>>());
CPPUNIT_ASSERT_EQUAL(
drawing::FillStyle_SOLID,
- xBackgroundProps->getPropertyValue("FillStyle").get<drawing::FillStyle>());
- xBackgroundProps->getPropertyValue("FillColor") >>= nFillColor;
+ xBackgroundProps->getPropertyValue(u"FillStyle"_ustr).get<drawing::FillStyle>());
+ xBackgroundProps->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
CPPUNIT_ASSERT_EQUAL(Color(0x729fcf), nFillColor);
CPPUNIT_ASSERT_EQUAL(
- sal_Int16(0), xBackgroundProps->getPropertyValue("FillTransparence").get<sal_Int16>());
+ sal_Int16(0),
+ xBackgroundProps->getPropertyValue(u"FillTransparence"_ustr).get<sal_Int16>());
}
{
uno::Reference<beans::XPropertySet> xMP(xMPs->getByIndex(2), uno::UNO_QUERY);
- CPPUNIT_ASSERT(!xMP->getPropertyValue("BackgroundFullSize").get<bool>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), xMP->getPropertyValue("BorderTop").get<sal_Int32>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), xMP->getPropertyValue("BorderLeft").get<sal_Int32>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xMP->getPropertyValue("BorderBottom").get<sal_Int32>());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xMP->getPropertyValue("BorderRight").get<sal_Int32>());
+ CPPUNIT_ASSERT(!xMP->getPropertyValue(u"BackgroundFullSize"_ustr).get<bool>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000),
+ xMP->getPropertyValue(u"BorderTop"_ustr).get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000),
+ xMP->getPropertyValue(u"BorderLeft"_ustr).get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ xMP->getPropertyValue(u"BorderBottom"_ustr).get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ xMP->getPropertyValue(u"BorderRight"_ustr).get<sal_Int32>());
uno::Reference<beans::XPropertySet> xBackgroundProps(
- xMP->getPropertyValue("Background").get<uno::Reference<beans::XPropertySet>>());
+ xMP->getPropertyValue(u"Background"_ustr).get<uno::Reference<beans::XPropertySet>>());
CPPUNIT_ASSERT_EQUAL(
drawing::FillStyle_BITMAP,
- xBackgroundProps->getPropertyValue("FillStyle").get<drawing::FillStyle>());
+ xBackgroundProps->getPropertyValue(u"FillStyle"_ustr).get<drawing::FillStyle>());
CPPUNIT_ASSERT_EQUAL(
drawing::BitmapMode_STRETCH,
- xBackgroundProps->getPropertyValue("FillBitmapMode").get<drawing::BitmapMode>());
+ xBackgroundProps->getPropertyValue(u"FillBitmapMode"_ustr).get<drawing::BitmapMode>());
CPPUNIT_ASSERT_EQUAL(
- sal_Int16(0), xBackgroundProps->getPropertyValue("FillTransparence").get