summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-10 08:26:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-10 09:51:34 +0200
commit239ceb315521d9e88fb8290ba391c70a53095af4 (patch)
tree89d2c12874823ae5eea38385e5f89d5cc902b707 /oox
parent58a9c936bb065384d50e122ee2ac9037dd60cc32 (diff)
loplugin:ostr in oox
Change-Id: I08124ce2da1facbe2e84aa4a7a8e25fec24fa962 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167428 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/qa/unit/CryptoTest.cxx52
-rw-r--r--oox/qa/unit/drawingml.cxx101
-rw-r--r--oox/qa/unit/export.cxx661
-rw-r--r--oox/qa/unit/mathml.cxx2
-rw-r--r--oox/qa/unit/mcgr.cxx68
-rw-r--r--oox/qa/unit/shape.cxx34
-rw-r--r--oox/qa/unit/testscene3d.cxx22
-rw-r--r--oox/qa/unit/vba_compression.cxx2
-rw-r--r--oox/qa/unit/vba_encryption.cxx3
-rw-r--r--oox/qa/unit/vml.cxx26
-rw-r--r--oox/qa/unit/wpc_drawing_canvas.cxx14
-rw-r--r--oox/source/core/contexthandler2.cxx14
-rw-r--r--oox/source/core/fasttokenhandler.cxx4
-rw-r--r--oox/source/core/filterbase.cxx12
-rw-r--r--oox/source/core/filterdetect.cxx46
-rw-r--r--oox/source/core/xmlfilterbase.cxx148
-rw-r--r--oox/source/crypto/AgileEngine.cxx6
-rw-r--r--oox/source/crypto/CryptTools.cxx16
-rw-r--r--oox/source/crypto/DocumentDecryption.cxx4
-rw-r--r--oox/source/crypto/Standard2007Engine.cxx2
-rw-r--r--oox/source/crypto/StrongEncryptionDataSpace.cxx16
-rw-r--r--oox/source/docprop/docprophandler.cxx2
-rw-r--r--oox/source/docprop/ooxmldocpropimport.cxx8
-rw-r--r--oox/source/drawingml/chart/axiscontext.cxx2
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx2
-rw-r--r--oox/source/drawingml/chart/chartspaceconverter.cxx2
-rw-r--r--oox/source/drawingml/chart/datasourceconverter.cxx2
-rw-r--r--oox/source/drawingml/chart/datatableconverter.cxx2
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx2
-rw-r--r--oox/source/drawingml/chart/plotareaconverter.cxx2
-rw-r--r--oox/source/drawingml/chart/seriesconverter.cxx14
-rw-r--r--oox/source/drawingml/chart/titleconverter.cxx4
-rw-r--r--oox/source/drawingml/chart/typegroupconverter.cxx6
-rw-r--r--oox/source/drawingml/color.cxx56
-rw-r--r--oox/source/drawingml/connectorhelper.cxx18
-rw-r--r--oox/source/drawingml/customshapepresetdata.cxx22
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx2
-rw-r--r--oox/source/drawingml/diagram/datamodel.cxx6
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx22
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx6
-rw-r--r--oox/source/drawingml/effectproperties.cxx10
-rw-r--r--oox/source/drawingml/effectpropertiescontext.cxx32
-rw-r--r--oox/source/drawingml/fillproperties.cxx98
-rw-r--r--oox/source/drawingml/fontworkhelpers.cxx168
-rw-r--r--oox/source/drawingml/graphicshapecontext.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx160
-rw-r--r--oox/source/drawingml/shape3dproperties.cxx258
-rw-r--r--oox/source/drawingml/table/tablecell.cxx22
-rw-r--r--oox/source/drawingml/table/tableproperties.cxx6
-rw-r--r--oox/source/drawingml/textbody.cxx4
-rw-r--r--oox/source/drawingml/textbodypropertiescontext.cxx2
-rw-r--r--oox/source/drawingml/texteffectscontext.cxx108
-rw-r--r--oox/source/drawingml/textfield.cxx38
-rw-r--r--oox/source/drawingml/textparagraph.cxx4
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx14
-rw-r--r--oox/source/drawingml/textparagraphpropertiescontext.cxx4
-rw-r--r--oox/source/drawingml/textrun.cxx10
-rw-r--r--oox/source/export/DMLPresetShapeExport.cxx2
-rw-r--r--oox/source/export/ThemeExport.cxx2
-rw-r--r--oox/source/export/chartexport.cxx340
-rw-r--r--oox/source/export/drawingml.cxx378
-rw-r--r--oox/source/export/shapes.cxx148
-rw-r--r--oox/source/export/vmlexport.cxx18
-rw-r--r--oox/source/helper/attributelist.cxx2
-rw-r--r--oox/source/helper/graphichelper.cxx10
-rw-r--r--oox/source/helper/modelobjecthelper.cxx12
-rw-r--r--oox/source/helper/textinputstream.cxx4
-rw-r--r--oox/source/ole/axcontrol.cxx78
-rw-r--r--oox/source/ole/axcontrolfragment.cxx4
-rw-r--r--oox/source/ole/olehelper.cxx18
-rw-r--r--oox/source/ole/oleobjecthelper.cxx8
-rw-r--r--oox/source/ole/olestorage.cxx4
-rw-r--r--oox/source/ole/vbacontrol.cxx10
-rw-r--r--oox/source/ole/vbaexport.cxx16
-rw-r--r--oox/source/ole/vbaproject.cxx28
-rw-r--r--oox/source/ppt/comments.cxx2
-rw-r--r--oox/source/ppt/commontimenodecontext.cxx10
-rw-r--r--oox/source/ppt/pptimport.cxx4
-rw-r--r--oox/source/ppt/pptshape.cxx18
-rw-r--r--oox/source/ppt/presPropsfragmenthandler.cxx8
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx42
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx2
-rw-r--r--oox/source/ppt/slidepersist.cxx34
-rw-r--r--oox/source/ppt/timenode.cxx2
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx8
-rw-r--r--oox/source/shape/WpsContext.cxx104
-rw-r--r--oox/source/vml/vmldrawing.cxx24
-rw-r--r--oox/source/vml/vmlformatting.cxx8
-rw-r--r--oox/source/vml/vmlshape.cxx92
-rw-r--r--oox/source/vml/vmlshapecontext.cxx16
-rw-r--r--oox/source/vml/vmltextbox.cxx12
-rw-r--r--oox/source/vml/vmltextboxcontext.cxx4
92 files changed, 1938 insertions, 1907 deletions
diff --git a/oox/qa/unit/CryptoTest.cxx b/oox/qa/unit/CryptoTest.cxx
index be04c928045e..60938962fa72 100644
--- a/oox/qa/unit/CryptoTest.cxx
+++ b/oox/qa/unit/CryptoTest.cxx
@@ -130,7 +130,7 @@ void CryptoTest::testStandard2007()
{
oox::crypto::Standard2007Engine aEngine;
{
- aEngine.setupEncryption("Password");
+ aEngine.setupEncryption(u"Password"_ustr);
SvMemoryStream aEncryptionInfo;
oox::BinaryXOutputStream aBinaryEncryptionInfoOutputStream(
@@ -197,33 +197,33 @@ void CryptoTest::testAgileEncryptionVerifier()
{
oox::crypto::AgileEngine aEngine;
- OUString aPassword("Password");
+ OUString aPassword(u"Password"_ustr);
- aEngine.setupEncryptionParameters({ 100000, 16, 128, 20, 16, OUString("AES"),
- OUString("ChainingModeCBC"), OUString("SHA1") });
+ aEngine.setupEncryptionParameters(
+ { 100000, 16, 128, 20, 16, u"AES"_ustr, u"ChainingModeCBC"_ustr, u"SHA1"_ustr });
CPPUNIT_ASSERT_EQUAL(true, aEngine.generateAndEncryptVerifierHash(aPassword));
- CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash(u"Wrong"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
- aEngine.setupEncryptionParameters({ 100000, 16, 128, 48, 16, OUString("AES"),
- OUString("ChainingModeCBC"), OUString("SHA384") });
+ aEngine.setupEncryptionParameters(
+ { 100000, 16, 128, 48, 16, u"AES"_ustr, u"ChainingModeCBC"_ustr, u"SHA384"_ustr });
CPPUNIT_ASSERT_EQUAL(true, aEngine.generateAndEncryptVerifierHash(aPassword));
- CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash(u"Wrong"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
- aEngine.setupEncryptionParameters({ 100000, 16, 256, 64, 16, OUString("AES"),
- OUString("ChainingModeCBC"), OUString("SHA512") });
+ aEngine.setupEncryptionParameters(
+ { 100000, 16, 256, 64, 16, u"AES"_ustr, u"ChainingModeCBC"_ustr, u"SHA512"_ustr });
CPPUNIT_ASSERT_EQUAL(true, aEngine.generateAndEncryptVerifierHash(aPassword));
- CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash(u"Wrong"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
}
void CryptoTest::testAgileEncryptionInfoWritingAndParsing()
{
- OUString aPassword("Password");
+ OUString aPassword(u"Password"_ustr);
std::vector<sal_uInt8> aKeyDataSalt;
{ // Preset AES128 - SHA1
@@ -262,12 +262,12 @@ void CryptoTest::testAgileEncryptionInfoWritingAndParsing()
CPPUNIT_ASSERT_EQUAL(sal_Int32(128), rInfo.keyBits);
CPPUNIT_ASSERT_EQUAL(sal_Int32(20), rInfo.hashSize);
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rInfo.blockSize);
- CPPUNIT_ASSERT_EQUAL(OUString("AES"), rInfo.cipherAlgorithm);
- CPPUNIT_ASSERT_EQUAL(OUString("ChainingModeCBC"), rInfo.cipherChaining);
- CPPUNIT_ASSERT_EQUAL(OUString("SHA1"), rInfo.hashAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(u"AES"_ustr, rInfo.cipherAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(u"ChainingModeCBC"_ustr, rInfo.cipherChaining);
+ CPPUNIT_ASSERT_EQUAL(u"SHA1"_ustr, rInfo.hashAlgorithm);
CPPUNIT_ASSERT_EQUAL(toString(aKeyDataSalt), toString(rInfo.keyDataSalt));
- CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash(u"Wrong"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
}
}
@@ -308,12 +308,12 @@ void CryptoTest::testAgileEncryptionInfoWritingAndParsing()
CPPUNIT_ASSERT_EQUAL(sal_Int32(128), rInfo.keyBits);
CPPUNIT_ASSERT_EQUAL(sal_Int32(48), rInfo.hashSize);
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rInfo.blockSize);
- CPPUNIT_ASSERT_EQUAL(OUString("AES"), rInfo.cipherAlgorithm);
- CPPUNIT_ASSERT_EQUAL(OUString("ChainingModeCBC"), rInfo.cipherChaining);
- CPPUNIT_ASSERT_EQUAL(OUString("SHA384"), rInfo.hashAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(u"AES"_ustr, rInfo.cipherAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(u"ChainingModeCBC"_ustr, rInfo.cipherChaining);
+ CPPUNIT_ASSERT_EQUAL(u"SHA384"_ustr, rInfo.hashAlgorithm);
CPPUNIT_ASSERT_EQUAL(toString(aKeyDataSalt), toString(rInfo.keyDataSalt));
- CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash(u"Wrong"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
}
}
@@ -354,12 +354,12 @@ void CryptoTest::testAgileEncryptionInfoWritingAndParsing()
CPPUNIT_ASSERT_EQUAL(sal_Int32(256), rInfo.keyBits);
CPPUNIT_ASSERT_EQUAL(sal_Int32(64), rInfo.hashSize);
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rInfo.blockSize);
- CPPUNIT_ASSERT_EQUAL(OUString("AES"), rInfo.cipherAlgorithm);
- CPPUNIT_ASSERT_EQUAL(OUString("ChainingModeCBC"), rInfo.cipherChaining);
- CPPUNIT_ASSERT_EQUAL(OUString("SHA512"), rInfo.hashAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(u"AES"_ustr, rInfo.cipherAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(u"ChainingModeCBC"_ustr, rInfo.cipherChaining);
+ CPPUNIT_ASSERT_EQUAL(u"SHA512"_ustr, rInfo.hashAlgorithm);
CPPUNIT_ASSERT_EQUAL(toString(aKeyDataSalt), toString(rInfo.keyDataSalt));
- CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash(u"Wrong"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
}
}
@@ -367,7 +367,7 @@ void CryptoTest::testAgileEncryptionInfoWritingAndParsing()
void CryptoTest::testAgileDataIntegrityHmacKey()
{
- OUString aPassword("Password");
+ OUString aPassword(u"Password"_ustr);
std::vector<sal_uInt8> aKeyDataSalt;
@@ -413,7 +413,7 @@ void CryptoTest::testAgileDataIntegrityHmacKey()
void CryptoTest::testAgileEncryptingAndDecrypting()
{
- OUString aPassword("Password");
+ OUString aPassword(u"Password"_ustr);
SvMemoryStream aEncryptionInfo;
SvMemoryStream aEncryptedStream;
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index 2a41416e5484..923758ee28a7 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -63,7 +63,7 @@ class OoxDrawingmlTest : public UnoApiTest
{
public:
OoxDrawingmlTest()
- : UnoApiTest("/oox/qa/unit/data/")
+ : UnoApiTest(u"/oox/qa/unit/data/"_ustr)
{
}
};
@@ -71,7 +71,7 @@ public:
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText)
{
loadFromFile(u"transparent-text.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),
@@ -83,7 +83,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText)
uno::UNO_QUERY);
sal_Int16 nTransparency = 0;
- xPortion->getPropertyValue("CharTransparence") >>= nTransparency;
+ xPortion->getPropertyValue(u"CharTransparence"_ustr) >>= nTransparency;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 75
@@ -95,7 +95,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf131082)
{
loadFromFile(u"tdf131082.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),
@@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf131082)
uno::UNO_QUERY);
drawing::FillStyle eFillStyle = drawing::FillStyle_NONE;
- XPropSet->getPropertyValue("FillStyle") >>= eFillStyle;
+ XPropSet->getPropertyValue(u"FillStyle"_ustr) >>= eFillStyle;
// Without the accompanying fix in place, this test would have failed with:
// with drawing::FillStyle_NONE - 0
@@ -123,10 +123,10 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPresetAdjustValue)
uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGeoPropSeq;
- xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeoPropSeq;
+ xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aGeoPropSeq;
comphelper::SequenceAsHashMap aGeoPropMap(aGeoPropSeq);
uno::Sequence<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentSeq;
- aGeoPropMap.getValue("AdjustmentValues") >>= aAdjustmentSeq;
+ aGeoPropMap.getValue(u"AdjustmentValues"_ustr) >>= aAdjustmentSeq;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aAdjustmentSeq.getLength());
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 11587
@@ -143,7 +143,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartDataLabelCharColor)
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
- uno::Reference<chart2::XChartDocument> xModel(xShape->getPropertyValue("Model"),
+ uno::Reference<chart2::XChartDocument> xModel(xShape->getPropertyValue(u"Model"_ustr),
uno::UNO_QUERY);
uno::Reference<chart2::XCoordinateSystemContainer> xDiagram(xModel->getFirstDiagram(),
uno::UNO_QUERY);
@@ -159,11 +159,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartDataLabelCharColor)
uno::Reference<beans::XPropertySet> xDataPoint = xDataSeries->getDataPointByIndex(0);
uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aLabels;
- xDataPoint->getPropertyValue("CustomLabelFields") >>= aLabels;
+ xDataPoint->getPropertyValue(u"CustomLabelFields"_ustr) >>= aLabels;
uno::Reference<beans::XPropertySet> xLabel = aLabels[0];
Color nCharColor;
- xLabel->getPropertyValue("CharColor") >>= nCharColor;
+ xLabel->getPropertyValue(u"CharColor"_ustr) >>= nCharColor;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 16777215
// - Actual : -1
@@ -181,10 +181,10 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency)
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
uno::Reference<container::XNamed> xShape(xDrawPage->getByIndex(1), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("Rectangle 4"), xShape->getName());
+ CPPUNIT_ASSERT_EQUAL(u"Rectangle 4"_ustr, xShape->getName());
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
awt::Gradient2 aTransparence;
- xShapeProps->getPropertyValue("FillTransparenceGradient") >>= aTransparence;
+ xShapeProps->getPropertyValue(u"FillTransparenceGradient"_ustr) >>= aTransparence;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 16777215 (COL_WHITE)
@@ -217,7 +217,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment)
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
sal_Int16 nParaAdjust = -1;
- CPPUNIT_ASSERT(xShape->getPropertyValue("ParaAdjust") >>= nParaAdjust);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"ParaAdjust"_ustr) >>= nParaAdjust);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 0
// - Actual : 3
@@ -239,7 +239,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAdjustLeft)
// - Expected: 3 (center)
// - Actual : 1 (block)
// i.e. text was center-adjusted, not default-adjusted (~left).
- CPPUNIT_ASSERT(xShape->getPropertyValue("TextHorizontalAdjust") >>= eAdjust);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"TextHorizontalAdjust"_ustr) >>= eAdjust);
CPPUNIT_ASSERT_EQUAL(drawing::TextHorizontalAdjust_BLOCK, eAdjust);
}
@@ -256,8 +256,8 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testCameraRotationRevolution)
uno::Reference<beans::XPropertySet> xShapeProps1(xShape1, uno::UNO_QUERY);
sal_Int32 nRotateAngle0;
sal_Int32 nRotateAngle1;
- xShapeProps0->getPropertyValue("RotateAngle") >>= nRotateAngle0;
- xShapeProps1->getPropertyValue("RotateAngle") >>= nRotateAngle1;
+ xShapeProps0->getPropertyValue(u"RotateAngle"_ustr) >>= nRotateAngle0;
+ xShapeProps1->getPropertyValue(u"RotateAngle"_ustr) >>= nRotateAngle1;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 8000
@@ -280,8 +280,8 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf146534_CameraRotationRevolutionNon
uno::Reference<beans::XPropertySet> xShapeProps1(xShape1, uno::UNO_QUERY);
sal_Int32 nRotateAngle0;
sal_Int32 nRotateAngle1;
- xShapeProps0->getPropertyValue("RotateAngle") >>= nRotateAngle0;
- xShapeProps1->getPropertyValue("RotateAngle") >>= nRotateAngle1;
+ xShapeProps0->getPropertyValue(u"RotateAngle"_ustr) >>= nRotateAngle0;
+ xShapeProps1->getPropertyValue(u"RotateAngle"_ustr) >>= nRotateAngle1;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 9000
@@ -299,11 +299,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
bool bShadow = false;
- CPPUNIT_ASSERT(xShape->getPropertyValue("Shadow") >>= bShadow);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"Shadow"_ustr) >>= bShadow);
CPPUNIT_ASSERT(bShadow);
Color nColor;
- CPPUNIT_ASSERT(xShape->getPropertyValue("ShadowColor") >>= nColor);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"ShadowColor"_ustr) >>= nColor);
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, nColor);
};
loadFromFile(u"table-shadow.pptx");
@@ -311,7 +311,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
// was lost on import.
verify(mxComponent);
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
// Without the accompanying fix in place, this test would have failed, because shadow on a table
// was lost on export.
@@ -340,7 +340,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf142605_CurveSize)
// rectangle of the shape. Error was, that the export uses a path size which included the
// control points.
loadFromFile(u"tdf142605_CurveSize.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
auto xPage = xDrawPagesSupplier->getDrawPages()->getByIndex(0);
@@ -354,7 +354,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf142605_CurveSize)
CPPUNIT_ASSERT_EQUAL(u"Bézier curve 1"_ustr, xShapeNamed->getName());
css::awt::Rectangle aBoundRect;
- xShapeProps->getPropertyValue("BoundRect") >>= aBoundRect;
+ xShapeProps->getPropertyValue(u"BoundRect"_ustr) >>= aBoundRect;
// Without fix, size was 6262 x 3509, and position was 10037|6790.
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(8601), aBoundRect.Width, 1);
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(4601), aBoundRect.Height, 1);
@@ -379,7 +379,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartThemeOverride)
uno::Reference<beans::XPropertySet> xPortion(xPara->createEnumeration()->nextElement(),
uno::UNO_QUERY);
Color nActual{ 0 };
- xPortion->getPropertyValue("CharColor") >>= nActual;
+ xPortion->getPropertyValue(u"CharColor"_ustr) >>= nActual;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 4485828 (0x4472c4)
// - Actual : 16711680 (0xff0000)
@@ -400,7 +400,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPptxTheme)
uno::Reference<beans::XPropertySet> xMasterpage(xDrawPage->getMasterPage(), uno::UNO_QUERY);
uno::Reference<util::XTheme> xTheme;
- xMasterpage->getPropertyValue("Theme") >>= xTheme;
+ xMasterpage->getPropertyValue(u"Theme"_ustr) >>= xTheme;
// We expect the theme to be set on the master page
CPPUNIT_ASSERT(xTheme.is());
@@ -408,8 +408,8 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPptxTheme)
CPPUNIT_ASSERT(pUnoTheme);
auto pTheme = pUnoTheme->getTheme();
- CPPUNIT_ASSERT_EQUAL(OUString("Office Theme"), pTheme->GetName());
- CPPUNIT_ASSERT_EQUAL(OUString("Office"), pTheme->getColorSet()->getName());
+ CPPUNIT_ASSERT_EQUAL(u"Office Theme"_ustr, pTheme->GetName());
+ CPPUNIT_ASSERT_EQUAL(u"Office"_ustr, pTheme->getColorSet()->getName());
CPPUNIT_ASSERT_EQUAL(Color(0x954F72),
pTheme->getColorSet()->getColor(model::ThemeColorType::FollowedHyperlink));
@@ -426,7 +426,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPptxTheme)
// Check the theme colors are as expected
{
uno::Reference<util::XComplexColor> xComplexColor;
- CPPUNIT_ASSERT(xPortion->getPropertyValue("CharComplexColor") >>= xComplexColor);
+ CPPUNIT_ASSERT(xPortion->getPropertyValue(u"CharComplexColor"_ustr) >>= xComplexColor);
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType());
@@ -450,19 +450,16 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf132557_footerCustomShapes)
// Test if we were able to import the footer shapes with CustomShape service.
uno::Reference<drawing::XShape> xShapeDateTime(xDrawPage->getByIndex(0), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"),
- xShapeDateTime->getShapeType());
+ CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.CustomShape"_ustr, xShapeDateTime->getShapeType());
// Without the accompanying fix in place, this test would have failed with:
// An uncaught exception of type com.sun.star.lang.IndexOutOfBoundsException
// i.e. the shape wasn't on the slide there since it was imported as a property, not a shape.
uno::Reference<drawing::XShape> xShapeFooter(xDrawPage->getByIndex(1), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"),
- xShapeFooter->getShapeType());
+ CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.CustomShape"_ustr, xShapeFooter->getShapeType());
uno::Reference<drawing::XShape> xShapeSlideNum(xDrawPage->getByIndex(2), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"),
- xShapeSlideNum->getShapeType());
+ CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.CustomShape"_ustr, xShapeSlideNum->getShapeType());
}
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColorTint_Table)
@@ -475,13 +472,13 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColorTint_Table)
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<table::XCellRange> xTable;
- CPPUNIT_ASSERT(xShape->getPropertyValue("Model") >>= xTable);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"Model"_ustr) >>= xTable);
uno::Reference<beans::XPropertySet> xA1(xTable->getCellByPosition(0, 0), uno::UNO_QUERY);
// check theme color
{
uno::Reference<util::XComplexColor> xComplexColor;
- CPPUNIT_ASSERT(xA1->getPropertyValue("FillComplexColor") >>= xComplexColor);
+ CPPUNIT_ASSERT(xA1->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor);
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType());
@@ -494,7 +491,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColorTint_Table)
{
uno::Reference<beans::XPropertySet> xA2(xTable->getCellByPosition(0, 1), uno::UNO_QUERY);
uno::Reference<util::XComplexColor> xComplexColor;
- CPPUNIT_ASSERT(xA2->getPropertyValue("FillComplexColor") >>= xComplexColor);
+ CPPUNIT_ASSERT(xA2->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor);
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType());
@@ -522,7 +519,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColor_Shape)
{
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<util::XComplexColor> xComplexColor;
- CPPUNIT_ASSERT(xShape->getPropertyValue("FillComplexColor") >>= xComplexColor);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor);
CPPUNIT_ASSERT(xComplexColor.is());
{
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
@@ -536,7 +533,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColor_Shape)
CPPUNIT_ASSERT_EQUAL(sal_Int16(6000), rTrans[1].mnValue);
}
- CPPUNIT_ASSERT(xShape->getPropertyValue("LineComplexColor") >>= xComplexColor);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"LineComplexColor"_ustr) >>= xComplexColor);
CPPUNIT_ASSERT(xComplexColor.is());
{
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
@@ -552,7 +549,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColor_Shape)
{
uno::Reference<util::XComplexColor> xComplexColor;
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(1), uno::UNO_QUERY);
- CPPUNIT_ASSERT(xShape->getPropertyValue("FillComplexColor") >>= xComplexColor);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor);
CPPUNIT_ASSERT(xComplexColor.is());
{
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
@@ -562,7 +559,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColor_Shape)
CPPUNIT_ASSERT_EQUAL(size_t(0), rTrans.size());
}
- CPPUNIT_ASSERT(xShape->getPropertyValue("LineComplexColor") >>= xComplexColor);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"LineComplexColor"_ustr) >>= xComplexColor);
CPPUNIT_ASSERT(xComplexColor.is());
{
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
@@ -589,11 +586,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testVert270AndTextRot)
uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGeoPropSeq;
- xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeoPropSeq;
+ xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aGeoPropSeq;
comphelper::SequenceAsHashMap aGeoPropMap(aGeoPropSeq);
// Without the fix the property "TextRotateAngle" does not exist.
- comphelper::SequenceAsHashMap::iterator it = aGeoPropMap.find("TextRotateAngle");
+ comphelper::SequenceAsHashMap::iterator it = aGeoPropMap.find(u"TextRotateAngle"_ustr);
CPPUNIT_ASSERT(it != aGeoPropMap.end());
sal_Int32 nAngle;
// MS 720000 clockwise -> ODF -12deg counter-clockwise
@@ -614,11 +611,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTextRot)
uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGeoPropSeq;
- xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeoPropSeq;
+ xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aGeoPropSeq;
comphelper::SequenceAsHashMap aGeoPropMap(aGeoPropSeq);
// Without the fix the property "TextRotateAngle" does not exist.
- comphelper::SequenceAsHashMap::iterator it = aGeoPropMap.find("TextRotateAngle");
+ comphelper::SequenceAsHashMap::iterator it = aGeoPropMap.find(u"TextRotateAngle"_ustr);
CPPUNIT_ASSERT(it != aGeoPropMap.end());
sal_Int32 nAngle;
// MS 720000 clockwise -> ODF -12deg counter-clockwise
@@ -627,7 +624,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTextRot)
// Because writing mode is LR_TB, the property "TextPreRotateAngle" may missing, or in case it
// exists, its value must be 0. Without fix it had value -12.
- it = aGeoPropMap.find("TextPreRotateAngle");
+ it = aGeoPropMap.find(u"TextPreRotateAngle"_ustr);
if (it != aGeoPropMap.end())
{
it->second >>= nAngle;
@@ -646,11 +643,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf113187ConstantArcTo)
uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGeoPropSeq;
- xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeoPropSeq;
+ xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aGeoPropSeq;
comphelper::SequenceAsHashMap aGeoPropMap(aGeoPropSeq);
// Without the fix width and height of the ViewBox were 0 and thus the shape was not shown.
- auto aViewBox = aGeoPropMap["ViewBox"].get<css::awt::Rectangle>();
+ auto aViewBox = aGeoPropMap[u"ViewBox"_ustr].get<css::awt::Rectangle>();
CPPUNIT_ASSERT_EQUAL(sal_Int32(3600000), aViewBox.Width);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3600000), aViewBox.Height);
}
@@ -670,10 +667,10 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontTheme)
// Make sure shape has correct font and local.
// Without the fix some application defaults were used.
OUString sFontName;
- xShapeProps->getPropertyValue("CharFontNameComplex") >>= sFontName;
+ xShapeProps->getPropertyValue(u"CharFontNameComplex"_ustr) >>= sFontName;
CPPUNIT_ASSERT_EQUAL(u"Noto Serif Hebrew"_ustr, sFontName);
css::lang::Locale aLocal;
- xShapeProps->getPropertyValue("CharLocaleComplex") >>= aLocal;
+ xShapeProps->getPropertyValue(u"CharLocaleComplex"_ustr) >>= aLocal;
CPPUNIT_ASSERT_EQUAL(u"IL"_ustr, aLocal.Country);
CPPUNIT_ASSERT_EQUAL(u"he"_ustr, aLocal.Language);
}
@@ -693,10 +690,10 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontText)
// Make sure shape has correct font and local.
// Without the fix some application defaults were used.
OUString sFontName;
- xShapeProps->getPropertyValue("CharFontNameComplex") >>= sFontName;
+ xShapeProps->getPropertyValue(u"CharFontNameComplex"_ustr) >>= sFontName;
CPPUNIT_ASSERT_EQUAL(u"Noto Serif Hebrew"_ustr, sFontName);
css::lang::Locale aLocal;
- xShapeProps->getPropertyValue("CharLocaleComplex") >>= aLocal;
+ xShapeProps->getPropertyValue(u"CharLocaleComplex"_ustr) >>= aLocal;
CPPUNIT_ASSERT_EQUAL(u"IL"_ustr, aLocal.Country);
CPPUNIT_ASSERT_EQUAL(u"he"_ustr, aLocal.Language);
}
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index bfee2e7ef8b3..36ab2a4acfa5 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -21,7 +21,7 @@ class Test : public UnoApiXmlTest
{
public:
Test()
- : UnoApiXmlTest("/oox/qa/unit/data/")
+ : UnoApiXmlTest(u"/oox/qa/unit/data/"_ustr)
{
}
};
@@ -31,23 +31,25 @@ CPPUNIT_TEST_FIXTURE(Test, testPolylineConnectorPosition)
// Given a document with a group shape and therein a polyline and a connector.
loadFromFile(u"tdf141786_PolylineConnectorInGroup.odt");
// When saving that to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Then make sure polyline and connector have the correct position.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// For child elements of groups in Writer the position has to be adapted to be relative
// to group instead of being relative to anchor. That was missing for polyline and
// connector.
// Polyline: Without fix it would have failed with expected: 0, actual: 1800360
- assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[1]/wps:spPr/a:xfrm/a:off"_ostr, "x"_ostr, "0");
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[1]/wps:spPr/a:xfrm/a:off"_ostr, "x"_ostr, u"0"_ustr);
// ... failed with expected: 509400, actual: 1229400
- assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[1]/wps:spPr/a:xfrm/a:off"_ostr, "y"_ostr, "509400");
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[1]/wps:spPr/a:xfrm/a:off"_ostr, "y"_ostr,
+ u"509400"_ustr);
// Connector: Without fix it would have failed with expected: 763200, actual: 2563560
- assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[3]/wps:spPr/a:xfrm/a:off"_ostr, "x"_ostr, "763200");
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[3]/wps:spPr/a:xfrm/a:off"_ostr, "x"_ostr,
+ u"763200"_ustr);
// ... failed with expected: 0, actual: 720000
- assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[3]/wps:spPr/a:xfrm/a:off"_ostr, "y"_ostr, "0");
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[3]/wps:spPr/a:xfrm/a:off"_ostr, "y"_ostr, u"0"_ustr);
// Polyline and connector were shifted 1800360EMU right, 720000EMU down.
}
@@ -60,27 +62,28 @@ CPPUNIT_TEST_FIXTURE(Test, testRotatedShapePosition)
skipValidation();
// When saving that to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Then make sure the rotated child shape has the correct position.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// For a group itself and for shapes outside of groups, the position calculation is done in
// DocxSdrExport. For child elements of groups it has to be done in
// DrawingML::WriteShapeTransformation(), but was missing.
// Without fix it would have failed with expected: 469440, actual: 92160
// The shape was about 1cm shifted up and partly outside its group.
- assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[1]/wps:spPr/a:xfrm/a:off"_ostr, "y"_ostr, "469440");
+ assertXPath(pXmlDoc, "//wpg:wgp/wps:wsp[1]/wps:spPr/a:xfrm/a:off"_ostr, "y"_ostr,
+ u"469440"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testInsertCheckboxContentControlOdt)
{
loadFromFile(u"tdf141786_RotatedShapeInGroup.odt");
- dispatchCommand(mxComponent, ".uno:TrackChanges", {});
- dispatchCommand(mxComponent, ".uno:InsertCheckboxContentControl", {});
+ dispatchCommand(mxComponent, u".uno:TrackChanges"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:InsertCheckboxContentControl"_ustr, {});
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// validate(maTempFile.GetFileName(), test::OOXML); // Enable when unrelated errors are fixed.
}
@@ -91,9 +94,9 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertCheckboxContentControlDocx)
// Without TrackChanges, inserting the Checkbox works just fine
// when exporting to docx.
- dispatchCommand(mxComponent, ".uno:InsertCheckboxContentControl", {});
+ dispatchCommand(mxComponent, u".uno:InsertCheckboxContentControl"_ustr, {});
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// validate(maTempFile.GetFileName(), test::OOXML); // Enable when unrelated errors are fixed.
}
@@ -108,22 +111,22 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertCheckboxContentControlDocx)
// in void sax_fastparser::FastSaxSerializer::endFastElement(sal_Int32).
// Element == maMarkStack.top()->m_DebugStartedElements.back()
// sax/source/tools/fastserializer.cxx#402
- dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ dispatchCommand(mxComponent, u".uno:TrackChanges"_ustr, {});
xText->insertControlCharacter(xCursor, text::ControlCharacter::PARAGRAPH_BREAK, false);
- dispatchCommand(mxComponent, ".uno:InsertCheckboxContentControl", {});
+ dispatchCommand(mxComponent, u".uno:InsertCheckboxContentControl"_ustr, {});
// Loading should not show the "corrupted" dialog, which would assert.
- saveAndReload("Office Open XML Text");
+ saveAndReload(u"Office Open XML Text"_ustr);
// Now that we loaded it successfully, delete the controls,
// still with change-tracking enabled, and save.
- dispatchCommand(mxComponent, ".uno:SelectAll", {});
- dispatchCommand(mxComponent, ".uno:Delete", {});
+ dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:Delete"_ustr, {});
// Loading should not show the "corrupted" dialog, which would assert.
- saveAndReload("Office Open XML Text");
+ saveAndReload(u"Office Open XML Text"_ustr);
// validate(maTempFile.GetFileName(), test::OOXML); // Enable when unrelated errors are fixed.
}
}
@@ -137,16 +140,16 @@ CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapePolygon)
skipValidation();
// When saving that to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Then make sure that the group shape, the group shape's child size and the child shape's size
// match:
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
- assertXPath(pXmlDoc, "//wpg:grpSpPr/a:xfrm/a:ext"_ostr, "cx"_ostr, "5328360");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
+ assertXPath(pXmlDoc, "//wpg:grpSpPr/a:xfrm/a:ext"_ostr, "cx"_ostr, u"5328360"_ustr);
// Without the accompanying fix in place, this test would have failed, the <a:chExt> element was
// not written.
- assertXPath(pXmlDoc, "//wpg:grpSpPr/a:xfrm/a:chExt"_ostr, "cx"_ostr, "5328360");
- assertXPath(pXmlDoc, "//wps:spPr/a:xfrm/a:ext"_ostr, "cx"_ostr, "5328360");
+ assertXPath(pXmlDoc, "//wpg:grpSpPr/a:xfrm/a:chExt"_ostr, "cx"_ostr, u"5328360"_ustr);
+ assertXPath(pXmlDoc, "//wps:spPr/a:xfrm/a:ext"_ostr, "cx"_ostr, u"5328360"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport)
@@ -158,10 +161,10 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport)
skipValidation();
// When saving that to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Then the shapes should retain their correct control values.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// Without the fix the output OOXML would have no <a:prstGeom> tags in it.
@@ -169,173 +172,173 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport)
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "rightArrow");
+ "prst"_ostr, u"rightArrow"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 50000");
+ "fmla"_ostr, u"val 50000"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 46321");
+ "fmla"_ostr, u"val 46321"_ustr);
// Left arrow
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "leftArrow");
+ "prst"_ostr, u"leftArrow"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 50000");
+ "fmla"_ostr, u"val 50000"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 52939");
+ "fmla"_ostr, u"val 52939"_ustr);
// Down arrow
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "downArrow");
+ "prst"_ostr, u"downArrow"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 50000");
+ "fmla"_ostr, u"val 50000"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 59399");
+ "fmla"_ostr, u"val 59399"_ustr);
// Up arrow
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "upArrow");
+ "prst"_ostr, u"upArrow"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 50000");
+ "fmla"_ostr, u"val 50000"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 63885");
+ "fmla"_ostr, u"val 63885"_ustr);
// Left-right arrow
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "leftRightArrow");
+ "prst"_ostr, u"leftRightArrow"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 50000");
+ "fmla"_ostr, u"val 50000"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 53522");
+ "fmla"_ostr, u"val 53522"_ustr);
// Up-down arrow
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "upDownArrow");
+ "prst"_ostr, u"upDownArrow"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 50000");
+ "fmla"_ostr, u"val 50000"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 62743");
+ "fmla"_ostr, u"val 62743"_ustr);
// Right arrow callout
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "rightArrowCallout");
+ "prst"_ostr, u"rightArrowCallout"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 25002");
+ "fmla"_ostr, u"val 25002"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 25000");
+ "fmla"_ostr, u"val 25000"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[3]"_ostr,
- "fmla"_ostr, "val 25052");
+ "fmla"_ostr, u"val 25052"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[4]"_ostr,
- "fmla"_ostr, "val 66667");
+ "fmla"_ostr, u"val 66667"_ustr);
// Left arrow callout
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "leftArrowCallout");
+ "prst"_ostr, u"leftArrowCallout"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 25002");
+ "fmla"_ostr, u"val 25002"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 25000");
+ "fmla"_ostr, u"val 25000"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[3]"_ostr,
- "fmla"_ostr, "val 25057");
+ "fmla"_ostr, u"val 25057"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[4]"_ostr,
- "fmla"_ostr, "val 66673");
+ "fmla"_ostr, u"val 66673"_ustr);
// Down arrow callout
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "downArrowCallout");
+ "prst"_ostr, u"downArrowCallout"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 29415");
+ "fmla"_ostr, u"val 29415"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 29413");
+ "fmla"_ostr, u"val 29413"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[3]"_ostr,
- "fmla"_ostr, "val 16667");
+ "fmla"_ostr, u"val 16667"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[4]"_ostr,
- "fmla"_ostr, "val 66667");
+ "fmla"_ostr, u"val 66667"_ustr);
// Up arrow callout
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
- "prst"_ostr, "upArrowCallout");
+ "prst"_ostr, u"upArrowCallout"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]"_ostr,
- "fmla"_ostr, "val 31033");
+ "fmla"_ostr, u"val 31033"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]"_ostr,
- "fmla"_ostr, "val 31030");
+ "fmla"_ostr, u"val 31030"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[3]"_ostr,
- "fmla"_ostr, "val 16667");
+ "fmla"_ostr, u"val 16667"_ustr);
assertXPath(pXmlDoc,
"//w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
"a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[4]"_ostr,
- "fmla"_ostr, "val 66660");
+ "fmla"_ostr, u"val 66660"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testCameraRevolutionGrabBag)
@@ -344,15 +347,17 @@ CPPUNIT_TEST_FIXTURE(Test, testCameraRevolutionGrabBag)
loadFromFile(u"camera-rotation-revolution-nonwps.pptx");
// When saving that document:
- 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);
// Then make sure the revolution is exported without a problem:
// First shape textbox:
- assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:scene3d/a:camera/a:rot"_ostr, "rev"_ostr, "5400000");
+ assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:scene3d/a:camera/a:rot"_ostr, "rev"_ostr,
+ u"5400000"_ustr);
// Second shape rectangle:
- assertXPath(pXmlDoc, "//p:sp[2]/p:spPr/a:scene3d/a:camera/a:rot"_ostr, "rev"_ostr, "18300000");
+ assertXPath(pXmlDoc, "//p:sp[2]/p:spPr/a:scene3d/a:camera/a:rot"_ostr, "rev"_ostr,
+ u"18300000"_ustr);
// Make sure Shape3DProperties don't leak under txBody
// Without the accompanying fix in place, this test would have failed with:
@@ -369,9 +374,9 @@ CPPUNIT_TEST_FIXTURE(Test, testReferToTheme)
loadFromFile(u"refer-to-theme.pptx");
// When saving that document:
- 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);
// Then make sure the shape text color is a scheme color:
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -379,7 +384,7 @@ CPPUNIT_TEST_FIXTURE(Test, testReferToTheme)
// - XPath '//p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr' number of nodes is incorrect
// i.e. the <a:schemeClr> element was not written.
assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr"_ostr,
- "val"_ostr, "accent1");
+ "val"_ostr, u"accent1"_ustr);
assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumMod"_ostr,
0);
assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumOff"_ostr,
@@ -392,17 +397,17 @@ CPPUNIT_TEST_FIXTURE(Test, testReferToTheme)
// - XPath '//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr' number of nodes is incorrect
// i.e. the effects case did not write scheme colors.
assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr"_ostr,
- "val"_ostr, "accent1");
+ "val"_ostr, u"accent1"_ustr);
assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumMod"_ostr,
- "val"_ostr, "40000");
+ "val"_ostr, u"40000"_ustr);
assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumOff"_ostr,
- "val"_ostr, "60000");
+ "val"_ostr, u"60000"_ustr);
// Third shape, darker color:
assertXPath(pXmlDoc, "//p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr"_ostr,
- "val"_ostr, "accent1");
+ "val"_ostr, u"accent1"_ustr);
assertXPath(pXmlDoc, "//p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumMod"_ostr,
- "val"_ostr, "75000");
+ "val"_ostr, u"75000"_ustr);
assertXPath(pXmlDoc, "//p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumOff"_ostr,
0);
}
@@ -413,15 +418,16 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColor_ShapeFill)
loadFromFile(u"ReferenceShapeFill.fodp");
// When saving that document:
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Then make sure the shape fill color is a scheme color.
// Note that this was already working from PPTX files via grab-bags,
//so this test intentionally uses an ODP file as input.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:solidFill/a:schemeClr"_ostr, "val"_ostr, "accent6");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:solidFill/a:schemeClr"_ostr, "val"_ostr,
+ u"accent6"_ustr);
assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:solidFill/a:schemeClr/a:lumMod"_ostr, "val"_ostr,
- "75000");
+ u"75000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf146690_endParagraphRunPropertiesNewLinesTextSize)
@@ -430,17 +436,17 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146690_endParagraphRunPropertiesNewLinesTextSi
loadFromFile(u"endParaRPr-newline-textsize.pptx");
// When saving that document:
- 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);
// Make sure the text size is exported correctly:
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 500
// - Actual : 1800
// i.e. the endParaRPr 'size' wasn't exported correctly
- assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p[1]/a:endParaRPr"_ostr, "sz"_ostr, "500");
- assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p[2]/a:endParaRPr"_ostr, "sz"_ostr, "500");
- assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p[3]/a:endParaRPr"_ostr, "sz"_ostr, "500");
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p[1]/a:endParaRPr"_ostr, "sz"_ostr, u"500"_ustr);
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p[2]/a:endParaRPr"_ostr, "sz"_ostr, u"500"_ustr);
+ assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p[3]/a:endParaRPr"_ostr, "sz"_ostr, u"500"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_endsubpath)
@@ -449,15 +455,15 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_endsubpath)
loadFromFile(u"tdf147978_endsubpath.odp");
// When saving that document:
- 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);
// Then make sure the pathLst has two child elements,
// Without the accompanying fix in place, only one element a:path was exported.
assertXPathChildren(pXmlDoc, "//a:pathLst"_ostr, 2);
// and make sure first path with no stroke, second with no fill
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "stroke"_ostr, "0");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "fill"_ostr, "none");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "stroke"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "fill"_ostr, u"none"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandA)
@@ -466,19 +472,19 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandA)
loadFromFile(u"tdf147978_enhancedPath_commandA.odp");
// When saving that document:
- 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);
// Then make sure the path has a child element arcTo. Prior to the fix that part of the curve was
// not exported at all. In odp it is a command A. Such does not exist in OOXML and is therefore
// exported as a:lnTo followed by a:arcTo
assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo"_ostr, 2);
assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, 1);
// And assert its attribute values
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "wR"_ostr, "7200");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "hR"_ostr, "5400");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "stAng"_ostr, "7719588");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "swAng"_ostr, "-5799266");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "wR"_ostr, u"7200"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "hR"_ostr, u"5400"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "stAng"_ostr, u"7719588"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "swAng"_ostr, u"-5799266"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandT)
@@ -487,27 +493,27 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandT)
loadFromFile(u"tdf147978_enhancedPath_commandT.odp");
// Export to pptx had only exported the command M and has used a wrong path size
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup:
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// File has draw:viewBox="0 0 216 216"
- assertXPath(pXmlDoc, "//a:pathLst/a:path"_ostr, "w"_ostr, "216");
- assertXPath(pXmlDoc, "//a:pathLst/a:path"_ostr, "h"_ostr, "216");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path"_ostr, "w"_ostr, u"216"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path"_ostr, "h"_ostr, u"216"_ustr);
// Command T is exported as lnTo followed by arcTo.
assertXPath(pXmlDoc, "//a:pathLst/a:path/a:moveTo"_ostr, 1);
assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo"_ostr, 1);
assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, 1);
assertXPath(pXmlDoc, "//a:pathLst/a:path/a:close"_ostr, 1);
// And assert its values
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:moveTo/a:pt"_ostr, "x"_ostr, "108");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:moveTo/a:pt"_ostr, "y"_ostr, "162");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo/a:pt"_ostr, "x"_ostr, "138");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo/a:pt"_ostr, "y"_ostr, "110");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "wR"_ostr, "108");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "hR"_ostr, "54");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "stAng"_ostr, "18000000");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "swAng"_ostr, "18000000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:moveTo/a:pt"_ostr, "x"_ostr, u"108"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:moveTo/a:pt"_ostr, "y"_ostr, u"162"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo/a:pt"_ostr, "x"_ostr, u"138"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:lnTo/a:pt"_ostr, "y"_ostr, u"110"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "wR"_ostr, u"108"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "hR"_ostr, u"54"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "stAng"_ostr, u"18000000"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo"_ostr, "swAng"_ostr, u"18000000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandXY)
@@ -516,32 +522,32 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandXY)
loadFromFile(u"tdf147978_enhancedPath_commandXY.odp");
// Export to pptx had dropped commands X and Y.
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup:
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// File has draw:viewBox="0 0 10 10"
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "w"_ostr, "10");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "h"_ostr, "10");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "w"_ostr, u"10"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "h"_ostr, u"10"_ustr);
// Shape has M 0 5 Y 5 0 10 5 5 10 F Y 0 5 N M 10 10 X 0 0
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:moveTo/a:pt"_ostr, "x"_ostr, "0");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:moveTo/a:pt"_ostr, "y"_ostr, "5");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]"_ostr, "wR"_ostr, "5");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]"_ostr, "hR"_ostr, "5");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]"_ostr, "stAng"_ostr, "10800000");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]"_ostr, "swAng"_ostr, "5400000");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[2]"_ostr, "stAng"_ostr, "16200000");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[2]"_ostr, "swAng"_ostr, "5400000");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[3]"_ostr, "stAng"_ostr, "0");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[3]"_ostr, "swAng"_ostr, "5400000");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[4]"_ostr, "stAng"_ostr, "0");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[4]"_ostr, "swAng"_ostr, "-5400000");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:moveTo/a:pt"_ostr, "x"_ostr, "10");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:moveTo/a:pt"_ostr, "y"_ostr, "10");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo"_ostr, "wR"_ostr, "10");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo"_ostr, "hR"_ostr, "10");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo"_ostr, "stAng"_ostr, "5400000");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo"_ostr, "swAng"_ostr, "5400000");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:moveTo/a:pt"_ostr, "x"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:moveTo/a:pt"_ostr, "y"_ostr, u"5"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]"_ostr, "wR"_ostr, u"5"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]"_ostr, "hR"_ostr, u"5"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]"_ostr, "stAng"_ostr, u"10800000"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[1]"_ostr, "swAng"_ostr, u"5400000"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[2]"_ostr, "stAng"_ostr, u"16200000"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[2]"_ostr, "swAng"_ostr, u"5400000"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[3]"_ostr, "stAng"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[3]"_ostr, "swAng"_ostr, u"5400000"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[4]"_ostr, "stAng"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]/a:arcTo[4]"_ostr, "swAng"_ostr, u"-5400000"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:moveTo/a:pt"_ostr, "x"_ostr, u"10"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:moveTo/a:pt"_ostr, "y"_ostr, u"10"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo"_ostr, "wR"_ostr, u"10"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo"_ostr, "hR"_ostr, u"10"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo"_ostr, "stAng"_ostr, u"5400000"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]/a:arcTo"_ostr, "swAng"_ostr, u"5400000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandHIJK)
@@ -550,20 +556,20 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandHIJK)
loadFromFile(u"tdf147978_enhancedPath_commandHIJK.odp");
// Export to pptx had dropped commands X and Y.
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup:
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// File has draw:viewBox="0 0 80 80"
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "w"_ostr, "80");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "h"_ostr, "80");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "w"_ostr, u"80"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "h"_ostr, u"80"_ustr);
// File uses from back to front J (lighten), I (lightenLess), normal fill, K (darkenLess),
// H (darken). New feature, old versions did not export these at all.
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "fill"_ostr, "lighten");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "fill"_ostr, "lightenLess");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "fill"_ostr, u"lighten"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "fill"_ostr, u"lightenLess"_ustr);
assertXPathNoAttribute(pXmlDoc, "//a:pathLst/a:path[3]"_ostr, "fill"_ostr);
- assertXPath(pXmlDoc, "//a:pathLst/a:path[4]"_ostr, "fill"_ostr, "darkenLess");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[5]"_ostr, "fill"_ostr, "darken");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[4]"_ostr, "fill"_ostr, u"darkenLess"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[5]"_ostr, "fill"_ostr, u"darken"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath)
@@ -572,19 +578,19 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath)
loadFromFile(u"tdf147978_enhancedPath_subpath.pptx");
// Export to pptx had dropped the subpaths.
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup:
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// File should have four subpaths with increasing path size
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "w"_ostr, "10");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "h"_ostr, "10");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "w"_ostr, "20");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "h"_ostr, "20");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[3]"_ostr, "w"_ostr, "40");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[3]"_ostr, "h"_ostr, "40");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[4]"_ostr, "w"_ostr, "80");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[4]"_ostr, "h"_ostr, "80");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "w"_ostr, u"10"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "h"_ostr, u"10"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "w"_ostr, u"20"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "h"_ostr, u"20"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[3]"_ostr, "w"_ostr, u"40"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[3]"_ostr, "h"_ostr, u"40"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[4]"_ostr, "w"_ostr, u"80"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[4]"_ostr, "h"_ostr, u"80"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf100391TextAreaRect)
@@ -592,17 +598,18 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf100391TextAreaRect)
// The document has a custom shape of type "non-primitive" to trigger the custGeom export
loadFromFile(u"tdf100391_TextAreaRect.odp");
// When saving to PPTX the textarea rect was set to default instead of using the actual area
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup. Without fix the values were l="l", t="t", r="r", b="b"
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDoc, "//a:custGeom/a:rect"_ostr, "l"_ostr, "textAreaLeft");
- assertXPath(pXmlDoc, "//a:custGeom/a:rect"_ostr, "t"_ostr, "textAreaTop");
- assertXPath(pXmlDoc, "//a:custGeom/a:rect"_ostr, "r"_ostr, "textAreaRight");
- assertXPath(pXmlDoc, "//a:custGeom/a:rect"_ostr, "b"_ostr, "textAreaBottom");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDoc, "//a:custGeom/a:rect"_ostr, "l"_ostr, u"textAreaLeft"_ustr);
+ assertXPath(pXmlDoc, "//a:custGeom/a:rect"_ostr, "t"_ostr, u"textAreaTop"_ustr);
+ assertXPath(pXmlDoc, "//a:custGeom/a:rect"_ostr, "r"_ostr, u"textAreaRight"_ustr);
+ assertXPath(pXmlDoc, "//a:custGeom/a:rect"_ostr, "b"_ostr, u"textAreaBottom"_ustr);
// The values are calculated in guides, for example
- assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]"_ostr, "name"_ostr, "textAreaLeft");
- assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]"_ostr, "fmla"_ostr, "*/ 1440000 w 2880000");
+ assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]"_ostr, "name"_ostr, u"textAreaLeft"_ustr);
+ assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]"_ostr, "fmla"_ostr,
+ u"*/ 1440000 w 2880000"_ustr);
// The test reflects the state of Apr 2022. It needs to be adapted when export of handles and
// guides is implemented.
}
@@ -617,17 +624,17 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf109169_OctagonBevel)
skipValidation();
// Export to docx had not written a:fill or a:stroke attributes at all.
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Verify the markup:
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// File should have six subpaths, one with stroke and five with fill
- assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "stroke"_ostr, "0");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "fill"_ostr, "darkenLess");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[3]"_ostr, "fill"_ostr, "darken");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[4]"_ostr, "fill"_ostr, "darken");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[5]"_ostr, "fill"_ostr, "lightenLess");
- assertXPath(pXmlDoc, "//a:pathLst/a:path[6]"_ostr, "fill"_ostr, "lighten");
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[1]"_ostr, "stroke"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[2]"_ostr, "fill"_ostr, u"darkenLess"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[3]"_ostr, "fill"_ostr, u"darken"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[4]"_ostr, "fill"_ostr, u"darken"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[5]"_ostr, "fill"_ostr, u"lightenLess"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path[6]"_ostr, "fill"_ostr, u"lighten"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFaultyPathCommandsAWT)
@@ -638,10 +645,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFaultyPathCommandsAWT)
// instead of the normally used lnTo. If a lnTo is written, MS Office shows nothing of the shape.
loadFromFile(u"FaultyPathStart.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup:
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// First child of a:path should be a moveTo in all four shapes.
assertXPath(pXmlDoc, "//p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo"_ostr);
assertXPath(pXmlDoc, "//p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo"_ostr);
@@ -656,10 +663,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchXY)
// When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered. The
// line at right and bottom edge were positioned inside as if the shape had a square size.
loadFromFile(u"tdf148784_StretchXY.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// x-position of last segment should be same as path width. It was 21600 without fix.
sal_Int32 nWidth
@@ -694,10 +701,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandQ)
// When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered.
// That results in wrong arcs on the right or bottom side of the shape.
loadFromFile(u"tdf148784_StretchCommandQ.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// x-position of second quadBezTo control should be same as path width. It was 21600 without fix.
sal_Int32 nWidth
@@ -733,10 +740,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandVW)
// When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered.
// That results in circles instead of ellipses.
loadFromFile(u"tdf148784_StretchCommandVW.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// wR of first ArcTo in first shape should be same as path width/2. It was 10800 without fix.
sal_Int32 nHalfWidth
@@ -767,17 +774,17 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149551VertPadding)
// has paddings lIns="720000"=2cm, tIns="360000"=1cm, rIns="0" and bIns="0".
// After load and save the paddings were rotated and a 90deg text rotation was added.
loadFromFile(u"tdf149551_vert_and_padding.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup. The values must be the same as in the original file.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
for (sal_Int32 i = 1; i <= 2; i++)
{
OString sElement = "//p:spTree/p:sp[" + OString::number(i) + "]/p:txBody/a:bodyPr";
- assertXPath(pXmlDoc, sElement, "lIns"_ostr, "720000");
- assertXPath(pXmlDoc, sElement, "tIns"_ostr, "360000");
- assertXPath(pXmlDoc, sElement, "rIns"_ostr, "0");
- assertXPath(pXmlDoc, sElement, "bIns"_ostr, "0");
+ assertXPath(pXmlDoc, sElement, "lIns"_ostr, u"720000"_ustr);
+ assertXPath(pXmlDoc, sElement, "tIns"_ostr, u"360000"_ustr);
+ assertXPath(pXmlDoc, sElement, "rIns"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement, "bIns"_ostr, u"0"_ustr);
assertXPathNoAttribute(pXmlDoc, sElement, "rot"_ostr);
}
}
@@ -789,41 +796,41 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149538upright)
// attribute but no 'rot' attribute. Without the fix the 'rot' attribute with values from
// the emulation was written out.
loadFromFile(u"tdf149538_upright.pptx");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup. The values must be the same as in the original file.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDoc, "//p:spTree/p:sp/p:txBody/a:bodyPr"_ostr, "upright"_ostr, "1");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDoc, "//p:spTree/p:sp/p:txBody/a:bodyPr"_ostr, "upright"_ostr, u"1"_ustr);
assertXPathNoAttribute(pXmlDoc, "//p:spTree/p:sp/p:txBody/a:bodyPr"_ostr, "rot"_ostr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf151008VertAnchor)
{
loadFromFile(u"tdf151008_eaVertAnchor.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);
// The order of the shapes in the file is by name "Right", "Center", "Left", "RightMiddle",
// "CenterMiddle" and "LeftMiddle". I access the shapes here by index, because the XPath is
// easier then.
// As of Sep 2022 LibreOffice does not write the default anchorCtr="0"
// Right
- assertXPath(pXmlDoc, "//p:spTree/p:sp[1]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, "t");
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[1]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, u"t"_ustr);
assertXPathNoAttribute(pXmlDoc, "//p:spTree/p:sp[1]/p:txBody/a:bodyPr"_ostr, "anchorCtr"_ostr);
// Center
- assertXPath(pXmlDoc, "//p:spTree/p:sp[2]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, "ctr");
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[2]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, u"ctr"_ustr);
assertXPathNoAttribute(pXmlDoc, "//p:spTree/p:sp[2]/p:txBody/a:bodyPr"_ostr, "anchorCtr"_ostr);
// Left
- assertXPath(pXmlDoc, "//p:spTree/p:sp[3]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, "b");
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[3]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, u"b"_ustr);
assertXPathNoAttribute(pXmlDoc, "//p:spTree/p:sp[3]/p:txBody/a:bodyPr"_ostr, "anchorCtr"_ostr);
// RightMiddle
- assertXPath(pXmlDoc, "//p:spTree/p:sp[4]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, "t");
- assertXPath(pXmlDoc, "//p:spTree/p:sp[4]/p:txBody/a:bodyPr"_ostr, "anchorCtr"_ostr, "1");
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[4]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, u"t"_ustr);
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[4]/p:txBody/a:bodyPr"_ostr, "anchorCtr"_ostr, u"1"_ustr);
// CenterMiddle
- assertXPath(pXmlDoc, "//p:spTree/p:sp[5]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, "ctr");
- assertXPath(pXmlDoc, "//p:spTree/p:sp[5]/p:txBody/a:bodyPr"_ostr, "anchorCtr"_ostr, "1");
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[5]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, u"ctr"_ustr);
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[5]/p:txBody/a:bodyPr"_ostr, "anchorCtr"_ostr, u"1"_ustr);
// LeftMiddle
- assertXPath(pXmlDoc, "//p:spTree/p:sp[6]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, "b");
- assertXPath(pXmlDoc, "//p:spTree/p:sp[6]/p:txBody/a:bodyPr"_ostr, "anchorCtr"_ostr, "1");
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[6]/p:txBody/a:bodyPr"_ostr, "anchor"_ostr, u"b"_ustr);
+ assertXPath(pXmlDoc, "//p:spTree/p:sp[6]/p:txBody/a:bodyPr"_ostr, "anchorCtr"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFontworkBitmapFill)
@@ -836,11 +843,11 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkBitmapFill)
skipValidation();
// Saving that to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Make sure it is exported to VML and has no txbxContent but a textpath element. Without fix it
// was exported as DML 'abc transform', but that is not able to use bitmap fill in Word.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
assertXPath(pXmlDoc, "//mc:alternateContent"_ostr, 0);
assertXPath(pXmlDoc, "//v:shape/v:textbox/v:txbxContent"_ostr, 0);
assertXPath(pXmlDoc, "//v:shape/v:textpath"_ostr, 1);
@@ -853,7 +860,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkBitmapFill)
// The fill is set to 'stretched' in LO, that is type="frame" in VML. That was not implemented
// in VML export.
- assertXPath(pXmlDoc, "//v:shape/v:fill"_ostr, "type"_ostr, "frame");
+ assertXPath(pXmlDoc, "//v:shape/v:fill"_ostr, "type"_ostr, u"frame"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFontworkFontProperties)
@@ -867,11 +874,11 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkFontProperties)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Make sure the style attribute of the textpath element has the needed items. Without fix only
// font-family and font-size were written.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
OUString sStyle;
// bold
sStyle = getXPath(pXmlDoc, "(//v:shape)[1]/v:textpath"_ostr, "style"_ostr);
@@ -903,11 +910,11 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkSlantUp)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup. I could identify the following two problems to hinder Word from
// accepting the markup. There might exist more problems.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// Make sure a <v:path> element exists and has an o:connecttype attribute
assertXPath(pXmlDoc, "//v:shapetype/v:path"_ostr, 1);
@@ -916,7 +923,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkSlantUp)
// Make sure the handle position is written without reference to a formula
OUString sPosition = getXPath(pXmlDoc, "//v:h"_ostr, "position"_ostr);
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), sPosition.indexOf("@"));
- CPPUNIT_ASSERT_EQUAL(OUString("topLeft,#0"), sPosition);
+ CPPUNIT_ASSERT_EQUAL(u"topLeft,#0"_ustr, sPosition);
}
CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkArchUp)
@@ -930,10 +937,10 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkArchUp)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// Make sure there is no <v:rect> element
assertXPath(pXmlDoc, "//v:rect"_ostr, 0);
@@ -952,10 +959,10 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLAdjustmentExport)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// Make sure an "adj" attribute exists
assertXPath(pXmlDoc, "//v:shape[@adj]"_ostr, 1);
@@ -980,28 +987,29 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkDirectColor)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
static constexpr OString sElement = "//w:txbxContent/w:p/w:r/w:rPr/"_ostr;
// Make sure the fallback in <w:color> has correct value.
- assertXPath(pXmlDoc, sElement + "w:color", "val"_ostr, "2E8B57");
+ assertXPath(pXmlDoc, sElement + "w:color", "val"_ostr, u"2E8B57"_ustr);
// ... and <w14:textOutline> exists and has correct values.
assertXPath(pXmlDoc, sElement + "w14:textOutline", 1);
assertXPath(pXmlDoc, sElement + "w14:textOutline/w14:solidFill/w14:srgbClr", "val"_ostr,
- "ff7f50");
+ u"ff7f50"_ustr);
assertXPath(pXmlDoc, sElement + "w14:textOutline/w14:solidFill/w14:srgbClr/w14:alpha",
- "val"_ostr, "20000");
+ "val"_ostr, u"20000"_ustr);
assertXPath(pXmlDoc, sElement + "w14:textOutline/w14:round", 1);
// ... and w14:textFill exists and has correct values.
assertXPath(pXmlDoc, sElement + "w14:textFill", 1);
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:srgbClr", "val"_ostr, "2e8b57");
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:srgbClr", "val"_ostr,
+ u"2e8b57"_ustr);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:srgbClr/w14:alpha", "val"_ostr,
- "60000");
+ u"60000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFontworkThemeColor)
@@ -1016,10 +1024,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkThemeColor)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// shape with 'darker'
OString sElement = "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/"
@@ -1027,30 +1035,32 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkThemeColor)
"w:rPr/"_ostr;
// Make sure the fallback in <w:color> has correct values
- assertXPath(pXmlDoc, sElement + "w:color", "val"_ostr, "948A54");
- assertXPath(pXmlDoc, sElement + "w:color", "themeColor"_ostr, "light2");
- assertXPath(pXmlDoc, sElement + "w:color", "themeShade"_ostr, "80");
+ assertXPath(pXmlDoc, sElement + "w:color", "val"_ostr, u"948A54"_ustr);
+ assertXPath(pXmlDoc, sElement + "w:color", "themeColor"_ostr, u"light2"_ustr);
+ assertXPath(pXmlDoc, sElement + "w:color", "themeShade"_ostr, u"80"_ustr);
// ... and w14:textFill exists and has correct values.
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:schemeClr", "val"_ostr, "bg2");
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:schemeClr", "val"_ostr,
+ u"bg2"_ustr);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:schemeClr/w14:lumMod",
- "val"_ostr, "50000");
+ "val"_ostr, u"50000"_ustr);
// shape with 'lighter'
sElement = "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/"
"a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/"_ostr;
// Make sure the fallback in <w:color> has correct values
- assertXPath(pXmlDoc, sElement + "w:color", "val"_ostr, "558ED5");
- assertXPath(pXmlDoc, sElement + "w:color", "themeColor"_ostr, "dark2");
- assertXPath(pXmlDoc, sElement + "w:color", "themeTint"_ostr, "99");
+ assertXPath(pXmlDoc, sElement + "w:color", "val"_ostr, u"558ED5"_ustr);
+ assertXPath(pXmlDoc, sElement + "w:color", "themeColor"_ostr, u"dark2"_ustr);
+ assertXPath(pXmlDoc, sElement + "w:color", "themeTint"_ostr, u"99"_ustr);
// ... and w14:textFill exists and has correct values.
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:schemeClr", "val"_ostr, "tx2");
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:schemeClr", "val"_ostr,
+ u"tx2"_ustr);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:schemeClr/w14:lumMod",
- "val"_ostr, "60000");
+ "val"_ostr, u"60000"_ustr);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:solidFill/w14:schemeClr/w14:lumOff",
- "val"_ostr, "40000");
+ "val"_ostr, u"40000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFontworkDistance)
@@ -1064,10 +1074,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkDistance)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
assertXPathAttrs(pXmlDoc,
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
"wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:bodyPr"_ostr,
@@ -1087,10 +1097,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkLinGradientRGBColor)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// path to shape text run properties
OString sElement = "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
@@ -1101,24 +1111,25 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkLinGradientRGBColor)
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst", 1);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst/w14:gs", 3);
// 330deg gradient rotation = 120deg color transition direction
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:lin", "ang"_ostr, "7200000");
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:lin", "scaled"_ostr, "0");
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:lin", "ang"_ostr,
+ u"7200000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:lin", "scaled"_ostr, u"0"_ustr);
// Make sure the color stops have correct position and color
// The 'intensity' property in the UI has a different algorithm than the 'lumMod' attribute in
// OOXML. Therefore it cannot be exported as 'lumMod' but need to be incorporated into the color.
sElement += "w14:textFill/w14:gradFill/w14:gsLst/";
- assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr", "val"_ostr, "cccc00");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr/w14:alpha", "val"_ostr, "30000");
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr", "val"_ostr, u"cccc00"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr/w14:alpha", "val"_ostr, u"30000"_ustr);
- assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, "25000");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr", "val"_ostr, "cccc00");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr/w14:alpha", "val"_ostr, "30000");
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, u"25000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr", "val"_ostr, u"cccc00"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr/w14:alpha", "val"_ostr, u"30000"_ustr);
- assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, "100000");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr", "val"_ostr, "4682b4");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr/w14:alpha", "val"_ostr, "30000");
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, u"100000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr", "val"_ostr, u"4682b4"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr/w14:alpha", "val"_ostr, u"30000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFontworkAxialGradientTransparency)
@@ -1134,10 +1145,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkAxialGradientTransparency)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// path to shape text run properties
OString sElement = "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
@@ -1148,8 +1159,9 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkAxialGradientTransparency)
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst", 1);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst/w14:gs", 3);
// 160deg gradient rotation = 290deg (360deg-160deg+90deg) color transition direction
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:lin", "ang"_ostr, "17400000");
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:lin", "scaled"_ostr, "0");
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:lin", "ang"_ostr,
+ u"17400000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:lin", "scaled"_ostr, u"0"_ustr);
// Make sure the color stops have correct position and color
sElement += "w14:textFill/w14:gradFill/w14:gsLst/";
@@ -1157,18 +1169,18 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkAxialGradientTransparency)
for (char ch = '1'; ch <= '3'; ++ch)
{
assertXPath(pXmlDoc, sElement + "w14:gs[" + OStringChar(ch) + "]/w14:schemeClr", "val"_ostr,
- "accent3");
+ u"accent3"_ustr);
assertXPath(pXmlDoc, sElement + "w14:gs[" + OStringChar(ch) + "]/w14:schemeClr/w14:lumMod",
- "val"_ostr, "75000");
+ "val"_ostr, u"75000"_ustr);
}
// transparency values are not exactly like in UI because converting through rgb-color.
// border 40% in UI means 20% on each side.
- assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, "20000");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr/w14:alpha", "val"_ostr, "89800");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, "50000");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr/w14:alpha", "val"_ostr, "4710");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, "80000");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr/w14:alpha", "val"_ostr, "89800");
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, u"20000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr/w14:alpha", "val"_ostr, u"89800"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, u"50000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr/w14:alpha", "val"_ostr, u"4710"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, u"80000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr/w14:alpha", "val"_ostr, u"89800"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFontworkRadialGradient)
@@ -1184,10 +1196,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRadialGradient)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// path to shape text run properties
OString sElement = "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
@@ -1197,19 +1209,20 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRadialGradient)
// Make sure w14:textFill and w14:gradFill elements exist with child elements
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst", 1);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst/w14:gs", 3);
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path", "path"_ostr, "circle");
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path", "path"_ostr,
+ u"circle"_ustr);
assertXPathAttrs(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path/w14:fillToRect",
{ { "l", "75000" }, { "t", "20000" }, { "r", "25000" }, { "b", "80000" } });
// Make sure the color stops have correct position and color
// The first stop is duplicated to force Word to render the gradient same as LO.
sElement += "w14:textFill/w14:gradFill/w14:gsLst/";
- assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr", "val"_ostr, "ff0000");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr", "val"_ostr, "ff0000");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, "90000");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr", "val"_ostr, "40e0d0");
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr", "val"_ostr, u"ff0000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr", "val"_ostr, u"ff0000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, u"90000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr", "val"_ostr, u"40e0d0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFontworkEllipticalGradient)
@@ -1225,10 +1238,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkEllipticalGradient)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// path to shape text run properties
OString sElement = "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
@@ -1238,21 +1251,22 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkEllipticalGradient)
// Make sure w14:textFill and w14:gradFill elements exist with child elements
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst", 1);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst/w14:gs", 3);
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path", "path"_ostr, "circle");
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path", "path"_ostr,
+ u"circle"_ustr);
assertXPathAttrs(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path/w14:fillToRect",
{ { "l", "50000" }, { "t", "50000" }, { "r", "50000" }, { "b", "50000" } });
// Make sure the color stops have correct position and color
// transparency values are not exactly like in UI because converting through rgb-color.
sElement += "w14:textFill/w14:gradFill/w14:gsLst/";
- assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr", "val"_ostr, "00008b");
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr", "val"_ostr, u"00008b"_ustr);
// stop is duplicated to force Word to same rendering as LO does.
- assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr", "val"_ostr, "00008b");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, "50000");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr", "val"_ostr, "00008b");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr/w14:alpha", "val"_ostr, "69800");
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr", "val"_ostr, u"00008b"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, u"50000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr", "val"_ostr, u"00008b"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr/w14:alpha", "val"_ostr, u"69800"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFontworkSquareGradient)
@@ -1268,10 +1282,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkSquareGradient)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// path to shape text run properties
OString sElement = "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
@@ -1281,7 +1295,8 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkSquareGradient)
// Make sure w14:textFill and w14:gradFill elements exist with child elements
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst", 1);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst/w14:gs", 3);
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path", "path"_ostr, "rect");
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path", "path"_ostr,
+ u"rect"_ustr);
assertXPathAttrs(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path/w14:fillToRect",
{ { "l", "100000" }, { "t", "50000" }, { "r", "0" }, { "b", "50000" } });
@@ -1289,12 +1304,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkSquareGradient)
// The 'intensity' property in the UI has a different algorithm than the 'lumMod' attribute in
// OOXML. Therefore it cannot be exported as 'lumMod' but need to be incorporated into the color.
sElement += "w14:textFill/w14:gradFill/w14:gsLst/";
- assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr", "val"_ostr, "e6e663");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr", "val"_ostr, "e6e663");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, "100000");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr", "val"_ostr, "1d4860");
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:srgbClr", "val"_ostr, u"e6e663"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:srgbClr", "val"_ostr, u"e6e663"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, u"100000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:srgbClr", "val"_ostr, u"1d4860"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFontworkRectGradient)
@@ -1310,10 +1325,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRectGradient)
skipValidation();
// Save to DOCX:
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// Examine the saved markup.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// path to shape text run properties
OString sElement = "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
@@ -1323,29 +1338,36 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRectGradient)
// Make sure w14:textFill and w14:gradFill elements exist with child elements
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst", 1);
assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:gsLst/w14:gs", 3);
- assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path", "path"_ostr, "rect");
+ assertXPath(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path", "path"_ostr,
+ u"rect"_ustr);
assertXPathAttrs(pXmlDoc, sElement + "w14:textFill/w14:gradFill/w14:path/w14:fillToRect",
{ { "l", "50000" }, { "t", "50000" }, { "r", "50000" }, { "b", "50000" } });
// Make sure the color stops have correct position and color
// transparency values are not exactly like in UI because converting through rgb-color.
sElement += "w14:textFill/w14:gradFill/w14:gsLst/";
- assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr", "val"_ostr, "accent4");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr/w14:lumMod", "val"_ostr, "40000");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr/w14:lumOff", "val"_ostr, "60000");
- assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr/w14:alpha", "val"_ostr, "4710");
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr", "val"_ostr, u"accent4"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr/w14:lumMod", "val"_ostr,
+ u"40000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr/w14:lumOff", "val"_ostr,
+ u"60000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[1]/w14:schemeClr/w14:alpha", "val"_ostr, u"4710"_ustr);
// The first stop is duplicated to force Word to render the gradient same as LO.
- assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr", "val"_ostr, "accent4");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr/w14:lumMod", "val"_ostr, "40000");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr/w14:lumOff", "val"_ostr, "60000");
- assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr/w14:alpha", "val"_ostr, "4710");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, "90000");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr", "val"_ostr, "accent4");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr/w14:lumMod", "val"_ostr, "40000");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr/w14:lumOff", "val"_ostr, "60000");
- assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr/w14:alpha", "val"_ostr, "69800");
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr", "val"_ostr, u"accent4"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr/w14:lumMod", "val"_ostr,
+ u"40000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr/w14:lumOff", "val"_ostr,
+ u"60000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[2]/w14:schemeClr/w14:alpha", "val"_ostr, u"4710"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]", "pos"_ostr, u"90000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr", "val"_ostr, u"accent4"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr/w14:lumMod", "val"_ostr,
+ u"40000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr/w14:lumOff", "val"_ostr,
+ u"60000"_ustr);
+ assertXPath(pXmlDoc, sElement + "w14:gs[3]/w14:schemeClr/w14:alpha", "val"_ostr, u"69800"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testThemeColorTransparency)
@@ -1355,23 +1377,24 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColorTransparency)
// Without fix the transparency was not written to file.
loadFromFile(u"tdf139618_ThemeColorTransparency.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);
// Make sure a:alpha is written for line color and for fill color.
// Make sure fill color is a schemeClr.
OString sElement = "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:p/a:r/a:rPr/"_ostr;
- assertXPath(pXmlDoc, sElement + "a:ln/a:solidFill/a:srgbClr/a:alpha", "val"_ostr, "25000");
- assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr", "val"_ostr, "accent1");
- assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:lumMod", "val"_ostr, "60000");
- assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:lumOff", "val"_ostr, "40000");
- assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:alpha", "val"_ostr, "35000");
+ assertXPath(pXmlDoc, sElement + "a:ln/a:solidFill/a:srgbClr/a:alpha", "val"_ostr,
+ u"25000"_ustr);
+ assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr", "val"_ostr, u"accent1"_ustr);
+ assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:lumMod", "val"_ostr, u"60000"_ustr);
+ assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:lumOff", "val"_ostr, u"40000"_ustr);
+ assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:alpha", "val"_ostr, u"35000"_ustr);
// Make sure a:alpha is written for characters and fill color is a schemeClr.
sElement = "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:r/a:rPr/"_ostr;
- assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr", "val"_ostr, "accent4");
- assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:lumMod", "val"_ostr, "75000");
- assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:alpha", "val"_ostr, "20000");
+ assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr", "val"_ostr, u"accent4"_ustr);
+ assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:lumMod", "val"_ostr, u"75000"_ustr);
+ assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:alpha", "val"_ostr, u"20000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testThemeFontTypeface)
@@ -1381,13 +1404,13 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeFontTypeface)
loadFromFile(u"tdf155412_typeface.pptx");
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/theme/theme1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/theme/theme1.xml"_ustr);
// Make sure typeface is written.
OString sElement = "/a:theme/a:themeElements/a:fontScheme/"_ostr;
- assertXPath(pXmlDoc, sElement + "a:majorFont/a:ea", "typeface"_ostr, "");
- assertXPath(pXmlDoc, sElement + "a:minorFont/a:ea", "typeface"_ostr, "");
+ assertXPath(pXmlDoc, sElement + "a:majorFont/a:ea", "typeface"_ostr, u""_ustr);
+ assertXPath(pXmlDoc, sElement + "a:minorFont/a:ea", "typeface"_ostr, u""_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf157289CircularArrowExport)
@@ -1396,12 +1419,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157289CircularArrowExport)
// the ellipse bounding box is defined by bottom-right vertex first and then top-left vertex.
// When saving to PPTX this had resulted in negative radii for the ellipse.
loadFromFile(u"tdf157289_circularArrow_export.fodp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// Verify the markup. Both wR and hR must be positive.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo[1]"_ostr, "wR"_ostr, "6750");
- assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo[1]"_ostr, "hR"_ostr, "6750");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo[1]"_ostr, "wR"_ostr, u"6750"_ustr);
+ assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo[1]"_ostr, "hR"_ostr, u"6750"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf134401_ExportAutoGrowToTextWordWrap)
@@ -1410,15 +1433,15 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134401_ExportAutoGrowToTextWordWrap)
// which is similar. If autoGrowWidth and autoGrowHeight are set in the document,
// then they are exported to pptx as TextWordWrap = "none".
loadFromFile(u"tdf134401_ExportAutoGrowToTextWordWrap.odp");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// There are 2 shapes in the test file.
// The 1. shape is without autoGrowWidth/Height.
// The 2. shape is with autoGrowWidth/Height.
// Check if wrap="none" is exported for shape 2, but no wrap is exported for shape 1.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
assertXPathNoAttribute(pXmlDoc, "//p:sp[1]/p:txBody/a:bodyPr"_ostr, "wrap"_ostr);
- assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:bodyPr"_ostr, "wrap"_ostr, "none");
+ assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:bodyPr"_ostr, "wrap"_ostr, u"none"_ustr);
}
}
diff --git a/oox/qa/unit/mathml.cxx b/oox/qa/unit/mathml.cxx
index 3e1b8c55b8ce..aeb68a7d4841 100644
--- a/oox/qa/unit/mathml.cxx
+++ b/oox/qa/unit/mathml.cxx
@@ -18,7 +18,7 @@ class OoxMathmlTest : public UnoApiTest
{
public:
OoxMathmlTest()
- : UnoApiTest("/oox/qa/unit/data/")
+ : UnoApiTest(u"/oox/qa/unit/data/"_ustr)
{
}
};
diff --git a/oox/qa/unit/mcgr.cxx b/oox/qa/unit/mcgr.cxx
index edb9b9bf76eb..6f950be723df 100644
--- a/oox/qa/unit/mcgr.cxx
+++ b/oox/qa/unit/mcgr.cxx
@@ -18,7 +18,7 @@ class TestMCGR : public UnoApiXmlTest
{
public:
TestMCGR()
- : UnoApiXmlTest("/oox/qa/unit/data/")
+ : UnoApiXmlTest(u"/oox/qa/unit/data/"_ustr)
{
}
};
@@ -28,20 +28,20 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradient)
// Given a document with three-color gradient on a Fontwork.
loadFromFile(u"MCGR_FontworkColorGradient.fodp");
// Save it to PPTX
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// And make sure a multi-color gradient fill is exported.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
// linear gradient with 30deg angle
- assertXPath(pXmlDoc, "//a:r/a:rPr/a:gradFill/a:lin"_ostr, "ang"_ostr, "3600000");
+ assertXPath(pXmlDoc, "//a:r/a:rPr/a:gradFill/a:lin"_ostr, "ang"_ostr, u"3600000"_ustr);
// three color stops, no transparency
static constexpr OString sPath = "//a:r/a:rPr/a:gradFill/a:gsLst/"_ostr;
assertXPath(pXmlDoc, sPath + "a:gs", 3);
- assertXPath(pXmlDoc, sPath + "a:gs[1]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sPath + "a:gs[1]/a:srgbClr", "val"_ostr, "ff1493");
- assertXPath(pXmlDoc, sPath + "a:gs[2]", "pos"_ostr, "30000");
- assertXPath(pXmlDoc, sPath + "a:gs[2]/a:srgbClr", "val"_ostr, "ffff00");
- assertXPath(pXmlDoc, sPath + "a:gs[3]", "pos"_ostr, "100000");
- assertXPath(pXmlDoc, sPath + "a:gs[3]/a:srgbClr", "val"_ostr, "00ffff");
+ assertXPath(pXmlDoc, sPath + "a:gs[1]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[1]/a:srgbClr", "val"_ostr, u"ff1493"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[2]", "pos"_ostr, u"30000"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[2]/a:srgbClr", "val"_ostr, u"ffff00"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[3]", "pos"_ostr, u"100000"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[3]/a:srgbClr", "val"_ostr, u"00ffff"_ustr);
}
CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord)
@@ -51,20 +51,20 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord)
// Given a document with three-color gradient on a Fontwork.
loadFromFile(u"MCGR_FontworkColorGradient.fodt");
// Save it to DOCX
- save("Office Open XML Text");
+ save(u"Office Open XML Text"_ustr);
// And make sure a multi-color gradient fill is exported.
- xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
// linear gradient with 30deg angle
- assertXPath(pXmlDoc, "//w14:lin"_ostr, "ang"_ostr, "3600000");
+ assertXPath(pXmlDoc, "//w14:lin"_ostr, "ang"_ostr, u"3600000"_ustr);
// three color stops, no transparency
static constexpr OString sPath = "//w14:gradFill/w14:gsLst/"_ostr;
assertXPath(pXmlDoc, sPath + "w14:gs", 3);
- assertXPath(pXmlDoc, sPath + "w14:gs[1]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sPath + "w14:gs[1]/w14:srgbClr", "val"_ostr, "ff1493");
- assertXPath(pXmlDoc, sPath + "w14:gs[2]", "pos"_ostr, "30000");
- assertXPath(pXmlDoc, sPath + "w14:gs[2]/w14:srgbClr", "val"_ostr, "ffff00");
- assertXPath(pXmlDoc, sPath + "w14:gs[3]", "pos"_ostr, "100000");
- assertXPath(pXmlDoc, sPath + "w14:gs[3]/w14:srgbClr", "val"_ostr, "00ffff");
+ assertXPath(pXmlDoc, sPath + "w14:gs[1]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sPath + "w14:gs[1]/w14:srgbClr", "val"_ostr, u"ff1493"_ustr);
+ assertXPath(pXmlDoc, sPath + "w14:gs[2]", "pos"_ostr, u"30000"_ustr);
+ assertXPath(pXmlDoc, sPath + "w14:gs[2]/w14:srgbClr", "val"_ostr, u"ffff00"_ustr);
+ assertXPath(pXmlDoc, sPath + "w14:gs[3]", "pos"_ostr, u"100000"_ustr);
+ assertXPath(pXmlDoc, sPath + "w14:gs[3]/w14:srgbClr", "val"_ostr, u"00ffff"_ustr);
}
CPPUNIT_TEST_FIXTURE(TestMCGR, testTdf155825_SourcOffsetRangeDifferent)
@@ -74,7 +74,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testTdf155825_SourcOffsetRangeDifferent)
// Save it to PPTX
// Without fix, a debug-build would have crashed in oox/source/export/drawingml.cxx from
// assert(false && "oox::WriteGradientFill: non-synchronized gradients (!)");
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
}
CPPUNIT_TEST_FIXTURE(TestMCGR, testStepCount)
@@ -82,8 +82,8 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testStepCount)
// Given a document with two-color gradient with StepCount 4.
loadFromFile(u"tdf155852_MCGR_StepCount4.fodp");
// Save it to 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 the colors in the sections were wrong. And when opening a file with StepCount
// and saving it immediately to pptx, a continuous gradient might be produced.
@@ -97,9 +97,9 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testStepCount)
assertXPath(pXmlDoc, sPath + "a:gs[@pos='50000']", 2);
assertXPath(pXmlDoc, sPath + "a:gs[@pos='75000']", 2);
// Without fix the color was 808080.
- assertXPath(pXmlDoc, sPath + "a:gs[@pos='75000'][1]/a:srgbClr", "val"_ostr, "55aaaa");
+ assertXPath(pXmlDoc, sPath + "a:gs[@pos='75000'][1]/a:srgbClr", "val"_ostr, u"55aaaa"_ustr);
// Without fix the color was 40bfbf, producing a gradient in the last segment.
- assertXPath(pXmlDoc, sPath + "a:gs[@pos='75000'][2]/a:srgbClr", "val"_ostr, "00ffff");
+ assertXPath(pXmlDoc, sPath + "a:gs[@pos='75000'][2]/a:srgbClr", "val"_ostr, u"00ffff"_ustr);
}
CPPUNIT_TEST_FIXTURE(TestMCGR, testAxialColorLinearTrans)
@@ -108,23 +108,23 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testAxialColorLinearTrans)
// two-stop linear transparency gradient from start 80% to end 0%.
loadFromFile(u"tdf155827_MCGR_AxialColorLinearTrans.fodp");
// Save it to PPTX
- save("Impress Office Open XML");
+ save(u"Impress Office Open XML"_ustr);
// OOXML has transparency together with color. Transparency is stored as opacity.
// Expected: pos 0 #00ffff 20000, pos 50000 #ff0000 60000, pos 100000 #00ffff 100000.
// Because of conversion through gray color the opacity values are not exact. If rounding
// method will be changed, the test needs to be adjusted.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
static constexpr OString sPath = "//a:gradFill/a:gsLst/"_ostr;
assertXPath(pXmlDoc, sPath + "a:gs", 3);
- assertXPath(pXmlDoc, sPath + "a:gs[1]", "pos"_ostr, "0");
- assertXPath(pXmlDoc, sPath + "a:gs[1]/a:srgbClr", "val"_ostr, "00ffff");
- assertXPath(pXmlDoc, sPath + "a:gs[1]/a:srgbClr/a:alpha", "val"_ostr, "20000");
- assertXPath(pXmlDoc, sPath + "a:gs[2]", "pos"_ostr, "50000");
- assertXPath(pXmlDoc, sPath + "a:gs[2]/a:srgbClr", "val"_ostr, "ff0000");
- assertXPath(pXmlDoc, sPath + "a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, "60396");
- assertXPath(pXmlDoc, sPath + "a:gs[3]", "pos"_ostr, "100000");
- assertXPath(pXmlDoc, sPath + "a:gs[3]/a:srgbClr", "val"_ostr, "00ffff");
+ assertXPath(pXmlDoc, sPath + "a:gs[1]", "pos"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[1]/a:srgbClr", "val"_ostr, u"00ffff"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[1]/a:srgbClr/a:alpha", "val"_ostr, u"20000"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[2]", "pos"_ostr, u"50000"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[2]/a:srgbClr", "val"_ostr, u"ff0000"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, u"60396"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[3]", "pos"_ostr, u"100000"_ustr);
+ assertXPath(pXmlDoc, sPath + "a:gs[3]/a:srgbClr", "val"_ostr, u"00ffff"_ustr);
// no <a:alpha> element for default val="100000"
assertXPath(pXmlDoc, sPath + "a:gs[3]/a:srgbClr/a:alpha", 0);
}
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index d0089a556904..ed2cd7965a78 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -65,7 +65,7 @@ class OoxShapeTest : public UnoApiTest
{
public:
OoxShapeTest()
- : UnoApiTest("/oox/qa/unit/data/")
+ : UnoApiTest(u"/oox/qa/unit/data/"_ustr)
{
}
uno::Reference<drawing::XShape> getShapeByName(std::u16string_view aName);
@@ -104,13 +104,13 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGroupTransform)
// Without the accompanying fix in place, this test would have failed in several properties.
sal_Int32 nAngle;
- xPropSet->getPropertyValue("ShearAngle") >>= nAngle;
+ xPropSet->getPropertyValue(u"ShearAngle"_ustr) >>= nAngle;
// Failed with - Expected: 0
// - Actual : -810
// i.e. the shape was sheared although shearing does not exist in oox
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nAngle);
- xPropSet->getPropertyValue("RotateAngle") >>= nAngle;
+ xPropSet->getPropertyValue(u"RotateAngle"_ustr) >>= nAngle;
// Failed with - Expected: 26000 (is in 1/100deg)
// - Actual : 26481 (is in 1/100deg)
// 100deg in PowerPoint UI = 360deg - 100deg in LO.
@@ -150,7 +150,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testCustomshapePosition)
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
sal_Int32 nY{};
- xShape->getPropertyValue("VertOrientPosition") >>= nY;
+ xShape->getPropertyValue(u"VertOrientPosition"_ustr) >>= nY;
// <wp:posOffset>581025</wp:posOffset> in the document.
sal_Int32 nExpected = rtl::math::round(581025.0 / 360);
// Without the accompanying fix in place, this test would have failed with:
@@ -184,7 +184,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf125582_TextOnCircle)
}
drawing::TextVerticalAdjust eAdjust;
- xPropSet->getPropertyValue("TextVerticalAdjust") >>= eAdjust;
+ xPropSet->getPropertyValue(u"TextVerticalAdjust"_ustr) >>= eAdjust;
CPPUNIT_ASSERT_EQUAL_MESSAGE("TextVerticalAdjust", drawing::TextVerticalAdjust_BOTTOM, eAdjust);
}
@@ -218,9 +218,9 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf151008VertAnchor)
uno::Reference<beans::XPropertySet> xShape(getShapeByName(aExpected[i].sShapeName),
uno::UNO_QUERY);
drawing::TextHorizontalAdjust eHori;
- CPPUNIT_ASSERT(xShape->getPropertyValue("TextHorizontalAdjust") >>= eHori);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"TextHorizontalAdjust"_ustr) >>= eHori);
drawing::TextVerticalAdjust eVert;
- CPPUNIT_ASSERT(xShape->getPropertyValue("TextVerticalAdjust") >>= eVert);
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"TextVerticalAdjust"_ustr) >>= eVert);
CPPUNIT_ASSERT_EQUAL(aExpected[i].eAnchorHori, eHori);
CPPUNIT_ASSERT_EQUAL(aExpected[i].eAnchorVert, eVert);
}
@@ -263,8 +263,8 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf151518VertAnchor)
xDiagramShape->getByIndex(aExpected[i].nSubShapeIndex), uno::UNO_QUERY);
sal_Int32 nLower;
sal_Int32 nUpper;
- CPPUNIT_ASSERT(xShapeProps->getPropertyValue("TextLowerDistance") >>= nLower);
- CPPUNIT_ASSERT(xShapeProps->getPropertyValue("TextUpperDistance") >>= nUpper);
+ CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"TextLowerDistance"_ustr) >>= nLower);
+ CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"TextUpperDistance"_ustr) >>= nUpper);
CPPUNIT_ASSERT_EQUAL(aExpected[i].nLowerDistance, nLower);
CPPUNIT_ASSERT_EQUAL(aExpected[i].nUpperDistance, nUpper);
}
@@ -310,7 +310,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf54095_SmartArtThemeTextColor)
uno::Reference<beans::XPropertySet> xPortion(xPara->createEnumeration()->nextElement(),
uno::UNO_QUERY);
Color nActualColor{ 0 };
- xPortion->getPropertyValue("CharColor") >>= nActualColor;
+ xPortion->getPropertyValue(u"CharColor"_ustr) >>= nActualColor;
// Without fix the test would have failed with:
// - Expected: rgba[1f497dff]
// - Actual : rgba[ffffffff], that is text was white
@@ -320,7 +320,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf54095_SmartArtThemeTextColor)
// oox::drawingml::Color::getSchemeColorIndex()
// Without fix the color scheme was "lt1" (1) but should be "dk2" (2).
uno::Reference<util::XComplexColor> xComplexColor;
- xPortion->getPropertyValue("CharComplexColor") >>= xComplexColor;
+ xPortion->getPropertyValue(u"CharComplexColor"_ustr) >>= xComplexColor;
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Dark2, aComplexColor.getThemeColorType());
@@ -398,12 +398,12 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork)
xShapeProps->getPropertyValue(u"CharFontName"_ustr));
CPPUNIT_ASSERT_EQUAL(uno::Any(float(awt::FontWeight::BOLD)),
- xShapeProps->getPropertyValue("CharWeight"));
+ xShapeProps->getPropertyValue(u"CharWeight"_ustr));
lang::Locale aCharLocale;
xShapeProps->getPropertyValue(u"CharLocale"_ustr) >>= aCharLocale;
- CPPUNIT_ASSERT_EQUAL(OUString("en"), aCharLocale.Language);
- CPPUNIT_ASSERT_EQUAL(OUString("US"), aCharLocale.Country);
+ CPPUNIT_ASSERT_EQUAL(u"en"_ustr, aCharLocale.Language);
+ CPPUNIT_ASSERT_EQUAL(u"US"_ustr, aCharLocale.Country);
CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::TextHorizontalAdjust_RIGHT),
xShapeProps->getPropertyValue(u"TextHorizontalAdjust"_ustr));
@@ -790,10 +790,10 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWordArtBitmapFill)
xGraphic.set(xBitmap, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xGraphicDescriptor(xGraphic, uno::UNO_QUERY_THROW);
OUString sMimeType;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("MimeType") >>= sMimeType);
- CPPUNIT_ASSERT_EQUAL(OUString("image/jpeg"), sMimeType);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"MimeType"_ustr) >>= sMimeType);
+ CPPUNIT_ASSERT_EQUAL(u"image/jpeg"_ustr, sMimeType);
awt::Size aSize100thMM;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("Size100thMM") >>= aSize100thMM);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"Size100thMM"_ustr) >>= aSize100thMM);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1592), aSize100thMM.Width);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1592), aSize100thMM.Height);
}
diff --git a/oox/qa/unit/testscene3d.cxx b/oox/qa/unit/testscene3d.cxx
index fdad25be2cea..d43209a0a2c4 100644
--- a/oox/qa/unit/testscene3d.cxx
+++ b/oox/qa/unit/testscene3d.cxx
@@ -34,7 +34,7 @@ class TestScene3d : public UnoApiXmlTest
{
public:
TestScene3d()
- : UnoApiXmlTest("/oox/qa/unit/data/")
+ : UnoApiXmlTest(u"/oox/qa/unit/data/"_ustr)
{
}
@@ -69,7 +69,7 @@ void TestScene3d::getShapeAsBitmap(BitmapEx& rBMP, sal_uInt8 nShapeIndex)
uno::Reference<drawing::XShape> xShape3D(getShape(nShapeIndex, 0));
SdrObject* pSdrShape(SdrObject::getSdrObjectFromXShape(xShape3D));
pSdrView->MarkObj(pSdrShape, pSdrView->GetSdrPageView());
- dispatchCommand(mxComponent, ".uno:ConvertIntoBitmap", {});
+ dispatchCommand(mxComponent, u".uno:ConvertIntoBitmap"_ustr, {});
pSdrView->UnmarkAll();
// Get graphic
@@ -534,25 +534,25 @@ CPPUNIT_TEST_FIXTURE(TestScene3d, test_material_wireframe)
uno::Reference<drawing::XShape> xShape(getShape(0, 0));
// Make sure the export to ODF has the corresponding attributes.
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(pXmlDoc,
"/office:document-content/office:body/office:presentation/draw:page/"
"draw:custom-shape/draw:enhanced-geometry"_ostr,
- "extrusion-origin"_ostr, "-0.5 -0.5");
+ "extrusion-origin"_ostr, u"-0.5 -0.5"_ustr);
assertXPath(pXmlDoc,
"/office:document-content/office:body/office:presentation/draw:page/"
"draw:custom-shape/draw:enhanced-geometry"_ostr,
- "extrusion-skew"_ostr, "30 -45");
+ "extrusion-skew"_ostr, u"30 -45"_ustr);
assertXPath(pXmlDoc,
"/office:document-content/office:body/office:presentation/draw:page/"
"draw:custom-shape/draw:enhanced-geometry"_ostr,
- "projection"_ostr, "parallel");
+ "projection"_ostr, u"parallel"_ustr);
assertXPath(pXmlDoc,
"/office:document-content/office:body/office:presentation/draw:page/"
"draw:custom-shape/draw:enhanced-geometry"_ostr,
- "shade-mode"_ostr, "draft");
+ "shade-mode"_ostr, u"draft"_ustr);
}
CPPUNIT_TEST_FIXTURE(TestScene3d, test_cropped_image)
@@ -630,9 +630,9 @@ CPPUNIT_TEST_FIXTURE(TestScene3d, test_shape_rotation)
uno::Reference<drawing::XShape> xShape(getShape(0, 0));
// Make sure that the immediate export to pptx has the same shape rotation
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- assertXPath(pXmlDoc, "//p:spPr/a:xfrm"_ostr, "rot"_ostr, "300000");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ assertXPath(pXmlDoc, "//p:spPr/a:xfrm"_ostr, "rot"_ostr, u"300000"_ustr);
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/oox/qa/unit/vba_compression.cxx b/oox/qa/unit/vba_compression.cxx
index 906e30bfc688..c5876106b3bf 100644
--- a/oox/qa/unit/vba_compression.cxx
+++ b/oox/qa/unit/vba_compression.cxx
@@ -54,7 +54,7 @@ public:
private:
static OUString const & getDebugDirUrl() {
struct DebugDirUrl {
- DebugDirUrl() : url("$UserInstallation/debug/") {
+ DebugDirUrl() : url(u"$UserInstallation/debug/"_ustr) {
rtl::Bootstrap::expandMacros(url);
//TODO: provide an OUString -> OUString expansion function, and which throws on
// failure
diff --git a/oox/qa/unit/vba_encryption.cxx b/oox/qa/unit/vba_encryption.cxx
index 023cc197bafb..edffd8dd6a3d 100644
--- a/oox/qa/unit/vba_encryption.cxx
+++ b/oox/qa/unit/vba_encryption.cxx
@@ -71,7 +71,8 @@ void TestVbaEncryption::testSimple2()
void TestVbaEncryption::testProjKey1()
{
- sal_uInt8 nProjKey = VBAEncryption::calculateProjKey("{917DED54-440B-4FD1-A5C1-74ACF261E600}");
+ sal_uInt8 nProjKey
+ = VBAEncryption::calculateProjKey(u"{917DED54-440B-4FD1-A5C1-74ACF261E600}"_ustr);
CPPUNIT_ASSERT_EQUAL(int(0xdf), static_cast<int>(nProjKey));
}
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index c0918b2682c9..01847301a1d8 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -29,7 +29,7 @@ class OoxVmlTest : public UnoApiTest
{
public:
OoxVmlTest()
- : UnoApiTest("/oox/qa/unit/data/")
+ : UnoApiTest(u"/oox/qa/unit/data/"_ustr)
{
}
};
@@ -48,7 +48,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf112450_vml_polyline)
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
// Without fix in place, Geometry had 2 points, both 0|0.
drawing::PointSequenceSequence aGeometry;
- xShapeProps->getPropertyValue("Geometry") >>= aGeometry;
+ xShapeProps->getPropertyValue(u"Geometry"_ustr) >>= aGeometry;
drawing::PointSequence aPolygon = aGeometry[0];
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(6879), aPolygon[3].X, 1);
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(487), aPolygon[3].Y, 1);
@@ -57,7 +57,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf112450_vml_polyline)
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1926), xShape->getSize().Height, 1);
// After the fix the shape has still to be PolygonKind_PLIN
drawing::PolygonKind ePolygonKind;
- xShapeProps->getPropertyValue("PolygonKind") >>= ePolygonKind;
+ xShapeProps->getPropertyValue(u"PolygonKind"_ustr) >>= ePolygonKind;
CPPUNIT_ASSERT_EQUAL(drawing::PolygonKind_PLIN, ePolygonKind);
}
{
@@ -65,7 +65,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf112450_vml_polyline)
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
// Without fix in place, Geometry had 2 points, both 0|0.
drawing::PointSequenceSequence aGeometry;
- xShapeProps->getPropertyValue("Geometry") >>= aGeometry;
+ xShapeProps->getPropertyValue(u"Geometry"_ustr) >>= aGeometry;
drawing::PointSequence aPolygon = aGeometry[0];
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(5062), aPolygon[2].X, 1);
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(2247), aPolygon[2].Y, 1);
@@ -74,7 +74,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf112450_vml_polyline)
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(2247), xShape->getSize().Height, 1);
// Without fix in place the shape was not closed, it had PolygonKind_PLIN
drawing::PolygonKind ePolygonKind;
- xShapeProps->getPropertyValue("PolygonKind") >>= ePolygonKind;
+ xShapeProps->getPropertyValue(u"PolygonKind"_ustr) >>= ePolygonKind;
CPPUNIT_ASSERT_EQUAL(drawing::PolygonKind_POLY, ePolygonKind);
}
{
@@ -83,7 +83,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf112450_vml_polyline)
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
// Without fix in place, Geometry had 2 points, both 0|0.
drawing::PointSequenceSequence aGeometry;
- xShapeProps->getPropertyValue("Geometry") >>= aGeometry;
+ xShapeProps->getPropertyValue(u"Geometry"_ustr) >>= aGeometry;
drawing::PointSequence aPolygon = aGeometry[0];
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(2095), aPolygon[3].X, 1);
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(608), aPolygon[3].Y, 1);
@@ -92,7 +92,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf112450_vml_polyline)
CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(2485), xShape->getSize().Height, 1);
// Without fix in place the shape was not closed, it had PolygonKind_PLIN
drawing::PolygonKind ePolygonKind;
- xShapeProps->getPropertyValue("PolygonKind") >>= ePolygonKind;
+ xShapeProps->getPropertyValue(u"PolygonKind"_ustr) >>= ePolygonKind;
CPPUNIT_ASSERT_EQUAL(drawing::PolygonKind_POLY, ePolygonKind);
}
}
@@ -109,7 +109,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf137314_vml_rotation_unit_fd)
uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(1), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords;
- xShapeProps->getPropertyValue("PolyPolygonBezier") >>= aPolyPolygonBezierCoords;
+ xShapeProps->getPropertyValue(u"PolyPolygonBezier"_ustr) >>= aPolyPolygonBezierCoords;
drawing::PointSequence aPolygon = aPolyPolygonBezierCoords.Coordinates[1];
// Without fix in place, the vector was -1441|1490.
// [1] and [2] are Bezier-curve control points.
@@ -135,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testSpt202ShapeType)
// - Actual : com.sun.star.drawing.CustomShape
// and then the size of the group shape was incorrect, e.g. its right edge was outside the page
// boundaries.
- CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.TextShape"), xShape->getShapeType());
+ CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.TextShape"_ustr, xShape->getShapeType());
}
CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText)
@@ -167,13 +167,13 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testGraphicStroke)
uno::Reference<beans::XPropertySet> xShape;
uno::Reference<lang::XServiceInfo> xInfo(xDrawPage->getByIndex(0), uno::UNO_QUERY);
- if (xInfo->supportsService("com.sun.star.drawing.OLE2Shape"))
+ if (xInfo->supportsService(u"com.sun.star.drawing.OLE2Shape"_ustr))
xShape.set(xInfo, uno::UNO_QUERY);
CPPUNIT_ASSERT(xShape.is());
drawing::LineStyle eLineStyle{};
- xShape->getPropertyValue("LineStyle") >>= eLineStyle;
+ xShape->getPropertyValue(u"LineStyle"_ustr) >>= eLineStyle;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
// - Actual : 0
@@ -194,7 +194,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testWatermark)
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
drawing::ColorMode eMode{};
- xShape->getPropertyValue("GraphicColorMode") >>= eMode;
+ xShape->getPropertyValue(u"GraphicColorMode"_ustr) >>= eMode;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 3
// - Actual : 0
@@ -212,7 +212,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testWriterFontworkTrimTrue)
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
skipValidation();
- saveAndReload("Office Open XML Text");
+ saveAndReload(u"Office Open XML Text"_ustr);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(xDrawPageSupplier->getDrawPage()->getByIndex(0),
diff --git a/oox/qa/unit/wpc_drawing_canvas.cxx b/oox/qa/unit/wpc_drawing_canvas.cxx
index 6c087c473b34..677ad43066f1 100644
--- a/oox/qa/unit/wpc_drawing_canvas.cxx
+++ b/oox/qa/unit/wpc_drawing_canvas.cxx
@@ -39,7 +39,7 @@ class TestWPC : public UnoApiXmlTest
{
public:
TestWPC()
- : UnoApiXmlTest("/oox/qa/unit/data/")
+ : UnoApiXmlTest(u"/oox/qa/unit/data/"_ustr)
{
}
};
@@ -146,7 +146,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_BentConnector)
uno::UNO_QUERY);
uno::Reference<drawing::XShapes> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<lang::XServiceInfo> xInfo(xGroup->getByIndex(2), uno::UNO_QUERY);
- CPPUNIT_ASSERT(xInfo->supportsService("com.sun.star.drawing.ConnectorShape"));
+ CPPUNIT_ASSERT(xInfo->supportsService(u"com.sun.star.drawing.ConnectorShape"_ustr));
uno::Reference<beans::XPropertySet> xShapeProps(xGroup->getByIndex(2), uno::UNO_QUERY);
com::sun::star::drawing::ConnectorType eEdgeKind;
@@ -227,7 +227,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf104671_Cloud)
uno::UNO_QUERY);
uno::Reference<drawing::XShapes> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<lang::XServiceInfo> xInfo(xGroup->getByIndex(1), uno::UNO_QUERY);
- CPPUNIT_ASSERT(xInfo->supportsService("com.sun.star.drawing.CustomShape"));
+ CPPUNIT_ASSERT(xInfo->supportsService(u"com.sun.star.drawing.CustomShape"_ustr));
}
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Shadow)
@@ -277,7 +277,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf158339_shape_text_in_group)
uno::Reference<css::text::XTextFrame> xTextFrame;
xShapeProps->getPropertyValue(u"TextBoxContent"_ustr) >>= xTextFrame;
CPPUNIT_ASSERT(xTextFrame.is());
- CPPUNIT_ASSERT_EQUAL(OUString("Group"), xTextFrame->getText()->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Group"_ustr, xTextFrame->getText()->getString());
}
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf158348_shape_text_in_table_cell)
@@ -303,7 +303,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf158348_shape_text_in_table_cell)
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTextTable(
xTablesSupplier->getTextTables()->getByName(u"Table1"_ustr), uno::UNO_QUERY);
- uno::Reference<text::XTextRange> xCellA1(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCellA1(xTextTable->getCellByName(u"A1"_ustr), uno::UNO_QUERY);
// The string had started with "Inside shape" without fix.
CPPUNIT_ASSERT(xCellA1->getString().startsWith("Inside table"));
}
@@ -321,7 +321,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_CurvedConnector2)
uno::UNO_QUERY);
uno::Reference<drawing::XShapes> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY);
uno::Reference<lang::XServiceInfo> xInfo(xGroup->getByIndex(3), uno::UNO_QUERY);
- CPPUNIT_ASSERT(xInfo->supportsService("com.sun.star.drawing.ConnectorShape"));
+ CPPUNIT_ASSERT(xInfo->supportsService(u"com.sun.star.drawing.ConnectorShape"_ustr));
uno::Reference<beans::XPropertySet> xShapeProps(xGroup->getByIndex(3), uno::UNO_QUERY);
com::sun::star::drawing::ConnectorType eEdgeKind;
@@ -330,7 +330,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_CurvedConnector2)
// Make sure the path is OOXML compatible
drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords;
- xShapeProps->getPropertyValue("PolyPolygonBezier") >>= aPolyPolygonBezierCoords;
+ xShapeProps->getPropertyValue(u"PolyPolygonBezier"_ustr) >>= aPolyPolygonBezierCoords;
drawing::PointSequence aPolygon = aPolyPolygonBezierCoords.Coordinates[0];
// First control point. LO routing would generate point (4372|5584).
CPPUNIT_ASSERT_EQUAL(sal_Int32(5149), aPolygon[1].Y);
diff --git a/oox/source/core/contexthandler2.cxx b/oox/source/core/contexthandler2.cxx
index 93da89b8c043..bfadacb4bcda 100644
--- a/oox/source/core/contexthandler2.cxx
+++ b/oox/source/core/contexthandler2.cxx
@@ -233,7 +233,7 @@ bool ContextHandler2Helper::prepareMceContext( sal_Int32 nElement, const Attribu
if (isMCEStateEmpty() || getMCEState() != MCE_STATE::Started)
return false;
- OUString aRequires = rAttribs.getString( XML_Requires, "none" );
+ OUString aRequires = rAttribs.getString( XML_Requires, u"none"_ustr );
// At this point we can't access namespaces as the correct xml filter
// is long gone. For now let's decide depending on a list of supported
@@ -241,15 +241,15 @@ bool ContextHandler2Helper::prepareMceContext( sal_Int32 nElement, const Attribu
std::vector<OUString> aSupportedNS =
{
- "a14", // Impress needs this to import math formulas.
- "p14",
- "p15",
- "x12ac",
- "v"
+ u"a14"_ustr, // Impress needs this to import math formulas.
+ u"p14"_ustr,
+ u"p15"_ustr,
+ u"x12ac"_ustr,
+ u"v"_ustr
};
Reference<XServiceInfo> xModel(getDocFilter().getModel(), UNO_QUERY);
- if (xModel.is() && xModel->supportsService("com.sun.star.sheet.SpreadsheetDocument"))
+ if (xModel.is() && xModel->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr))
{
// No a14 for Calc documents, it would cause duplicated shapes as-is.
auto it = std::find(aSupportedNS.begin(), aSupportedNS.end(), "a14");
diff --git a/oox/source/core/fasttokenhandler.cxx b/oox/source/core/fasttokenhandler.cxx
index 398772df058f..08531b16dc96 100644
--- a/oox/source/core/fasttokenhandler.cxx
+++ b/oox/source/core/fasttokenhandler.cxx
@@ -41,7 +41,7 @@ FastTokenHandler::~FastTokenHandler()
// XServiceInfo
OUString SAL_CALL FastTokenHandler::getImplementationName()
{
- return "com.sun.star.comp.oox.core.FastTokenHandler";
+ return u"com.sun.star.comp.oox.core.FastTokenHandler"_ustr;
}
sal_Bool SAL_CALL FastTokenHandler::supportsService( const OUString& rServiceName )
@@ -51,7 +51,7 @@ sal_Bool SAL_CALL FastTokenHandler::supportsService( const OUString& rServiceNam
Sequence< OUString > SAL_CALL FastTokenHandler::getSupportedServiceNames()
{
- Sequence<OUString> aServiceNames { "com.sun.star.xml.sax.FastTokenHandler" };
+ Sequence<OUString> aServiceNames { u"com.sun.star.xml.sax.FastTokenHandler"_ustr };
return aServiceNames;
}
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 4c0f2915b80a..9c8cc11596e4 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -403,7 +403,7 @@ sal_Bool SAL_CALL FilterBase::supportsService( const OUString& rServiceName )
Sequence< OUString > SAL_CALL FilterBase::getSupportedServiceNames()
{
- return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExportFilter" };
+ return { u"com.sun.star.document.ImportFilter"_ustr, u"com.sun.star.document.ExportFilter"_ustr };
}
// com.sun.star.lang.XInitialization interface
@@ -550,21 +550,21 @@ void FilterBase::setMediaDescriptor( const Sequence< PropertyValue >& rMediaDesc
mxImpl->mxTargetFrame = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_FRAME, Reference< XFrame >() );
mxImpl->mxStatusIndicator = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_STATUSINDICATOR, Reference< XStatusIndicator >() );
mxImpl->mxInteractionHandler = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_INTERACTIONHANDLER, Reference< XInteractionHandler >() );
- mxImpl->mxParentShape = mxImpl->maMediaDesc.getUnpackedValueOrDefault( "ParentShape", mxImpl->mxParentShape );
- mxImpl->maFilterData = mxImpl->maMediaDesc.getUnpackedValueOrDefault( "FilterData", Sequence< PropertyValue >() );
+ mxImpl->mxParentShape = mxImpl->maMediaDesc.getUnpackedValueOrDefault( u"ParentShape"_ustr, mxImpl->mxParentShape );
+ mxImpl->maFilterData = mxImpl->maMediaDesc.getUnpackedValueOrDefault( u"FilterData"_ustr, Sequence< PropertyValue >() );
// Check for ISO OOXML
- OUString sFilterName = mxImpl->maMediaDesc.getUnpackedValueOrDefault( "FilterName", OUString() );
+ OUString sFilterName = mxImpl->maMediaDesc.getUnpackedValueOrDefault( u"FilterName"_ustr, OUString() );
try
{
Reference<XMultiServiceFactory> xFactory(getComponentContext()->getServiceManager(), UNO_QUERY_THROW);
- Reference<XNameAccess> xFilters(xFactory->createInstance("com.sun.star.document.FilterFactory" ), UNO_QUERY_THROW );
+ Reference<XNameAccess> xFilters(xFactory->createInstance(u"com.sun.star.document.FilterFactory"_ustr ), UNO_QUERY_THROW );
Any aValues = xFilters->getByName( sFilterName );
Sequence<PropertyValue > aPropSeq;
aValues >>= aPropSeq;
SequenceAsHashMap aProps( aPropSeq );
- sal_Int32 nVersion = aProps.getUnpackedValueOrDefault( "FileFormatVersion", sal_Int32( 0 ) );
+ sal_Int32 nVersion = aProps.getUnpackedValueOrDefault( u"FileFormatVersion"_ustr, sal_Int32( 0 ) );
mxImpl->meVersion = OoxmlVersion( nVersion );
}
catch ( const Exception& )
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
index 6eab25684435..c62ddfedd749 100644
--- a/oox/source/core/filterdetect.cxx
+++ b/oox/source/core/filterdetect.cxx
@@ -163,7 +163,7 @@ void FilterDetectDocHandler::parseRelationship( const AttributeList& rAttribs )
{
// use '/' to representent the root of the zip package ( and provide a 'file' scheme to
// keep the XUriReference implementation happy )
- Reference< XUriReference > xBase = xFactory->parse( "file:///" );
+ Reference< XUriReference > xBase = xFactory->parse( u"file:///"_ustr );
Reference< XUriReference > xPart = xFactory->parse( rAttribs.getStringDefaulted( XML_Target) );
Reference< XUriReference > xAbs = xFactory->makeAbsolute( xBase, xPart, true, RelativeUriExcessParentSegments_RETAIN );
@@ -186,14 +186,14 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( std::u16string_vi
{
case OOXMLVariant::ISO_Transitional:
case OOXMLVariant::ISO_Strict: // Not supported, map to ISO transitional
- return "writer_OOXML";
+ return u"writer_OOXML"_ustr;
case OOXMLVariant::ECMA_Transitional:
- return "writer_MS_Word_2007";
+ return u"writer_MS_Word_2007"_ustr;
}
}
if( rContentType == u"application/vnd.ms-word.document.macroEnabled.main+xml" || bDocm )
- return "writer_MS_Word_2007_VBA";
+ return u"writer_MS_Word_2007_VBA"_ustr;
if( rContentType == u"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml" ||
rContentType == u"application/vnd.ms-word.template.macroEnabledTemplate.main+xml" )
@@ -202,38 +202,38 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( std::u16string_vi
{
case OOXMLVariant::ISO_Transitional:
case OOXMLVariant::ISO_Strict: // Not supported, map to ISO transitional
- return "writer_OOXML_Text_Template";
+ return u"writer_OOXML_Text_Template"_ustr;
case OOXMLVariant::ECMA_Transitional:
- return "writer_MS_Word_2007_Template";
+ return u"writer_MS_Word_2007_Template"_ustr;
}
}
if( rContentType == u"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml")
- return "MS Excel 2007 XML";
+ return u"MS Excel 2007 XML"_ustr;
if (rContentType == u"application/vnd.ms-excel.sheet.macroEnabled.main+xml")
- return "MS Excel 2007 VBA XML";
+ return u"MS Excel 2007 VBA XML"_ustr;
if( rContentType == u"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml" ||
rContentType == u"application/vnd.ms-excel.template.macroEnabled.main+xml" )
- return "MS Excel 2007 XML Template";
+ return u"MS Excel 2007 XML Template"_ustr;
if ( rContentType == u"application/vnd.ms-excel.sheet.binary.macroEnabled.main" )
- return "MS Excel 2007 Binary";
+ return u"MS Excel 2007 Binary"_ustr;
if (rContentType == u"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml")
- return "MS PowerPoint 2007 XML";
+ return u"MS PowerPoint 2007 XML"_ustr;
if (rContentType == u"application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml")
- return "MS PowerPoint 2007 XML VBA";
+ return u"MS PowerPoint 2007 XML VBA"_ustr;
if( rContentType == u"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml" ||
rContentType == u"application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml" )
- return "MS PowerPoint 2007 XML AutoPlay";
+ return u"MS PowerPoint 2007 XML AutoPlay"_ustr;
if( rContentType == u"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml" ||
rContentType == u"application/vnd.ms-powerpoint.template.macroEnabled.main+xml" )
- return "MS PowerPoint 2007 XML Template";
+ return u"MS PowerPoint 2007 XML Template"_ustr;
return OUString();
}
@@ -316,14 +316,14 @@ comphelper::DocPasswordVerifierResult PasswordVerifier::verifyEncryptionData( co
Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescriptor& rMediaDescriptor ) const
{
- const bool bRepairPackage(rMediaDescriptor.getUnpackedValueOrDefault("RepairPackage", false));
+ const bool bRepairPackage(rMediaDescriptor.getUnpackedValueOrDefault(u"RepairPackage"_ustr, false));
// try the plain input stream
Reference<XInputStream> xInputStream( rMediaDescriptor[ MediaDescriptor::PROP_INPUTSTREAM ], UNO_QUERY );
if (!xInputStream.is() || lclIsZipPackage(mxContext, xInputStream, bRepairPackage))
return xInputStream;
// check if a temporary file is passed in the 'ComponentData' property
- Reference<XStream> xDecrypted( rMediaDescriptor.getComponentDataEntry( "DecryptedPackage" ), UNO_QUERY );
+ Reference<XStream> xDecrypted( rMediaDescriptor.getComponentDataEntry( u"DecryptedPackage"_ustr ), UNO_QUERY );
if( xDecrypted.is() )
{
Reference<XInputStream> xDecryptedInputStream = xDecrypted->getInputStream();
@@ -367,7 +367,7 @@ Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescript
// create MemoryStream for unencrypted package - rather not put this in a tempfile
Reference<XStream> const xTempStream(
mxContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.comp.MemoryStream", mxContext),
+ u"com.sun.star.comp.MemoryStream"_ustr, mxContext),
UNO_QUERY_THROW);
// if decryption was unsuccessful (corrupted file or any other reason)
@@ -378,7 +378,7 @@ Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescript
else
{
// store temp file in media descriptor to keep it alive
- rMediaDescriptor.setComponentDataEntry( "DecryptedPackage", Any( xTempStream ) );
+ rMediaDescriptor.setComponentDataEntry( u"DecryptedPackage"_ustr, Any( xTempStream ) );
Reference<XInputStream> xDecryptedInputStream = xTempStream->getInputStream();
if (lclIsZipPackage(mxContext, xDecryptedInputStream, bRepairPackage))
@@ -398,7 +398,7 @@ Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescript
OUString SAL_CALL FilterDetect::getImplementationName()
{
- return "com.sun.star.comp.oox.FormatDetector";
+ return u"com.sun.star.comp.oox.FormatDetector"_ustr;
}
sal_Bool SAL_CALL FilterDetect::supportsService( const OUString& rServiceName )
@@ -408,7 +408,7 @@ sal_Bool SAL_CALL FilterDetect::supportsService( const OUString& rServiceName )
Sequence< OUString > SAL_CALL FilterDetect::getSupportedServiceNames()
{
- return { "com.sun.star.frame.ExtendedTypeDetection" };
+ return { u"com.sun.star.frame.ExtendedTypeDetection"_ustr };
}
// com.sun.star.document.XExtendedFilterDetection interface -------------------
@@ -430,7 +430,7 @@ OUString SAL_CALL FilterDetect::detect( Sequence< PropertyValue >& rMediaDescSeq
// stream must be a ZIP package
ZipStorage aZipStorage(mxContext, xInputStream,
- aMediaDescriptor.getUnpackedValueOrDefault("RepairPackage", false));
+ aMediaDescriptor.getUnpackedValueOrDefault(u"RepairPackage"_ustr, false));
if( aZipStorage.isStorage() )
{
// create the fast parser, register the XML namespaces, set document handler
@@ -446,8 +446,8 @@ OUString SAL_CALL FilterDetect::detect( Sequence< PropertyValue >& rMediaDescSeq
/* Parse '_rels/.rels' to get the target path and '[Content_Types].xml'
to determine the content type of the part at the target path. */
- aParser.parseStream( aZipStorage, "_rels/.rels" );
- aParser.parseStream( aZipStorage, "[Content_Types].xml" );
+ aParser.parseStream( aZipStorage, u"_rels/.rels"_ustr );
+ aParser.parseStream( aZipStorage, u"[Content_Types].xml"_ustr );
}
}
catch( const Exception& )
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 96c474b0d51a..ccee129ae076 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -95,61 +95,61 @@ const Sequence< beans::Pair< OUString, sal_Int32 > >& NamespaceIds()
{
static const Sequence< beans::Pair< OUString, sal_Int32 > > SINGLETON
{
- {"http://www.w3.org/XML/1998/namespace", NMSP_xml},
- {"http://schemas.openxmlformats.org/package/2006/relationships",
+ {u"http://www.w3.org/XML/1998/namespace"_ustr, NMSP_xml},
+ {u"http://schemas.openxmlformats.org/package/2006/relationships"_ustr,
NMSP_packageRel},
- {"http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ {u"http://schemas.openxmlformats.org/officeDocument/2006/relationships"_ustr,
NMSP_officeRel},
- {"http://purl.oclc.org/ooxml/officeDocument/relationships",
+ {u"http://purl.oclc.org/ooxml/officeDocument/relationships"_ustr,
NMSP_officeRel},
- {"http://schemas.openxmlformats.org/drawingml/2006/main", NMSP_dml},
- {"http://purl.oclc.org/ooxml/drawingml/main", NMSP_dml},
- {"http://schemas.openxmlformats.org/drawingml/2006/diagram",
+ {u"http://schemas.openxmlformats.org/drawingml/2006/main"_ustr, NMSP_dml},
+ {u"http://purl.oclc.org/ooxml/drawingml/main"_ustr, NMSP_dml},
+ {u"http://schemas.openxmlformats.org/drawingml/2006/diagram"_ustr,
NMSP_dmlDiagram},
- {"http://purl.oclc.org/ooxml/drawingml/diagram", NMSP_dmlDiagram},
- {"http://schemas.openxmlformats.org/drawingml/2006/chart",
+ {u"http://purl.oclc.org/ooxml/drawingml/diagram"_ustr, NMSP_dmlDiagram},
+ {u"http://schemas.openxmlformats.org/drawingml/2006/chart"_ustr,
NMSP_dmlChart},
- {"http://schemas.openxmlformats.org/drawingml/2006/chartDrawing",
+ {u"http://schemas.openxmlformats.org/drawingml/2006/chartDrawing"_ustr,
NMSP_dmlChartDr},
- {"urn:schemas-microsoft-com:vml", NMSP_vml},
- {"urn:schemas-microsoft-com:office:office", NMSP_vmlOffice},
- {"urn:schemas-microsoft-com:office:word", NMSP_vmlWord},
- {"urn:schemas-microsoft-com:office:excel", NMSP_vmlExcel},
- {"urn:schemas-microsoft-com:office:powerpoint", NMSP_vmlPowerpoint},
- {"http://schemas.microsoft.com/office/2006/activeX", NMSP_ax},
- {"http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ {u"urn:schemas-microsoft-com:vml"_ustr, NMSP_vml},
+ {u"urn:schemas-microsoft-com:office:office"_ustr, NMSP_vmlOffice},
+ {u"urn:schemas-microsoft-com:office:word"_ustr, NMSP_vmlWord},
+ {u"urn:schemas-microsoft-com:office:excel"_ustr, NMSP_vmlExcel},
+ {u"urn:schemas-microsoft-com:office:powerpoint"_ustr, NMSP_vmlPowerpoint},
+ {u"http://schemas.microsoft.com/office/2006/activeX"_ustr, NMSP_ax},
+ {u"http://schemas.openxmlformats.org/spreadsheetml/2006/main"_ustr,
NMSP_xls},
- {"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
+ {u"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"_ustr,
NMSP_xm},
- {"http://schemas.microsoft.com/office/excel/2006/main",
+ {u"http://schemas.microsoft.com/office/excel/2006/main"_ustr,
NMSP_dmlSpreadDr},
- {"http://schemas.openxmlformats.org/presentationml/2006/main",
+ {u"http://schemas.openxmlformats.org/presentationml/2006/main"_ustr,
NMSP_ppt},
- {"http://schemas.openxmlformats.org/markup-compatibility/2006",
+ {u"http://schemas.openxmlformats.org/markup-compatibility/2006"_ustr,
NMSP_mce},
- {"http://schemas.openxmlformats.org/spreadsheetml/2006/main/v2",
+ {u"http://schemas.openxmlformats.org/spreadsheetml/2006/main/v2"_ustr,
NMSP_mceTest},
- {"http://schemas.openxmlformats.org/officeDocument/2006/math",
+ {u"http://schemas.openxmlformats.org/officeDocument/2006/math"_ustr,
NMSP_officeMath},
- {"http://schemas.microsoft.com/office/drawing/2008/diagram",
+ {u"http://schemas.microsoft.com/office/drawing/2008/diagram"_ustr,
NMSP_dsp},
- {"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main",
+ {u"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"_ustr,
NMSP_xls14Lst},
- {"http://schemas.libreoffice.org/", NMSP_loext},
- {"http://schemas.microsoft.com/office/drawing/2010/main",
+ {u"http://schemas.libreoffice.org/"_ustr, NMSP_loext},
+ {u"http://schemas.microsoft.com/office/drawing/2010/main"_ustr,
NMSP_a14},
- {"http://schemas.microsoft.com/office/powerpoint/2010/main",
+ {u"http://schemas.microsoft.com/office/powerpoint/2010/main"_ustr,
NMSP_p14},
- {"http://schemas.microsoft.com/office/powerpoint/2012/main",
+ {u"http://schemas.microsoft.com/office/powerpoint/2012/main"_ustr,
NMSP_p15},
- {"http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac",
+ {u"http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac"_ustr,
NMSP_x12ac},
- {"http://schemas.microsoft.com/office/drawing/2012/chart",
+ {u"http://schemas.microsoft.com/office/drawing/2012/chart"_ustr,
NMSP_c15},
- {"http://schemas.microsoft.com/office/spreadsheetml/2015/revision2",
+ {u"http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"_ustr,
NMSP_xr2},
- {"http://schemas.microsoft.com/office/drawing/2017/decorative", NMSP_adec},
- {"http://schemas.microsoft.com/office/drawing/2016/SVG/main", NMSP_asvg},
+ {u"http://schemas.microsoft.com/office/drawing/2017/decorative"_ustr, NMSP_adec},
+ {u"http://schemas.microsoft.com/office/drawing/2016/SVG/main"_ustr, NMSP_asvg},
};
return SINGLETON;
};
@@ -234,7 +234,7 @@ void XmlFilterBase::checkDocumentProperties(const Reference<XDocumentProperties>
return;
comphelper::SequenceAsHashMap aUserDefinedProperties(xUserDefProps->getPropertyValues());
- comphelper::SequenceAsHashMap::iterator it = aUserDefinedProperties.find("AppVersion");
+ comphelper::SequenceAsHashMap::iterator it = aUserDefinedProperties.find(u"AppVersion"_ustr);
if (it == aUserDefinedProperties.end())
return;
@@ -287,12 +287,12 @@ void XmlFilterBase::importDocumentProperties()
rtl::Reference< ::oox::core::FilterDetect > xDetector( new ::oox::core::FilterDetect( xContext ) );
xInputStream = xDetector->extractUnencryptedPackage( aMediaDesc );
Reference< XComponent > xModel = getModel();
- const bool repairPackage = aMediaDesc.getUnpackedValueOrDefault("RepairPackage", false);
+ const bool repairPackage = aMediaDesc.getUnpackedValueOrDefault(u"RepairPackage"_ustr, false);
Reference< XStorage > xDocumentStorage (
::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(
OFOPXML_STORAGE_FORMAT_STRING, xInputStream, {}, repairPackage));
Reference< XInterface > xTemp = xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.document.OOXMLDocumentPropertiesImporter",
+ u"com.sun.star.document.OOXMLDocumentPropertiesImporter"_ustr,
xContext);
Reference< XOOXMLDocumentPropertiesImporter > xImporter( xTemp, UNO_QUERY );
Reference< XDocumentPropertiesSupplier > xPropSupplier( xModel, UNO_QUERY);
@@ -606,7 +606,7 @@ writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const Sequence< OU
OUStringBuffer sRep;
// tdf#143175 - join elements including a delimiter using a standard iterator
::comphelper::intersperse(aItems.begin(), aItems.end(),
- ::comphelper::OUStringBufferAppender(sRep), OUString(" "));
+ ::comphelper::OUStringBufferAppender(sRep), u" "_ustr);
writeElement( pDoc, nXmlElement, sRep );
}
@@ -642,8 +642,8 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties
rSelf.addRelation( sValue, u"docProps/core.xml" );
FSHelperPtr pCoreProps = rSelf.openFragmentStreamWithSerializer(
- "docProps/core.xml",
- "application/vnd.openxmlformats-package.core-properties+xml" );
+ u"docProps/core.xml"_ustr,
+ u"application/vnd.openxmlformats-package.core-properties+xml"_ustr );
pCoreProps->startElementNS( XML_cp, XML_coreProperties,
FSNS(XML_xmlns, XML_cp), rSelf.getNamespaceURL(OOX_NS(packageMetaCorePr)),
FSNS(XML_xmlns, XML_dc), rSelf.getNamespaceURL(OOX_NS(dc)),
@@ -655,7 +655,7 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties
comphelper::SequenceAsHashMap aUserDefinedProperties(xUserDefinedProperties->getPropertyValues());
comphelper::SequenceAsHashMap::iterator it;
- it = aUserDefinedProperties.find("OOXMLCorePropertyCategory");
+ it = aUserDefinedProperties.find(u"OOXMLCorePropertyCategory"_ustr);
if (it != aUserDefinedProperties.end())
{
OUString aValue;
@@ -663,7 +663,7 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties
writeElement( pCoreProps, FSNS( XML_cp, XML_category ), aValue );
}
- it = aUserDefinedProperties.find("OOXMLCorePropertyContentStatus");
+ it = aUserDefinedProperties.find(u"OOXMLCorePropertyContentStatus"_ustr);
if (it != aUserDefinedProperties.end())
{
OUString aValue;
@@ -671,7 +671,7 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties
writeElement( pCoreProps, FSNS( XML_cp, XML_contentStatus ), aValue );
}
- it = aUserDefinedProperties.find("OOXMLCorePropertyContentType");
+ it = aUserDefinedProperties.find(u"OOXMLCorePropertyContentType"_ustr);
if (it != aUserDefinedProperties.end())
{
OUString aValue;
@@ -685,7 +685,7 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties
}
writeElement( pCoreProps, FSNS( XML_dc, XML_description ), xProperties->getDescription() );
- it = aUserDefinedProperties.find("OOXMLCorePropertyIdentifier");
+ it = aUserDefinedProperties.find(u"OOXMLCorePropertyIdentifier"_ustr);
if (it != aUserDefinedProperties.end())
{
OUString aValue;
@@ -709,7 +709,7 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties
writeElement( pCoreProps, FSNS( XML_dc, XML_subject ), xProperties->getSubject() );
writeElement( pCoreProps, FSNS( XML_dc, XML_title ), xProperties->getTitle() );
- it = aUserDefinedProperties.find("OOXMLCorePropertyVersion");
+ it = aUserDefinedProperties.find(u"OOXMLCorePropertyVersion"_ustr);
if (it != aUserDefinedProperties.end())
{
OUString aValue;
@@ -731,11 +731,11 @@ writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >
= bRemovePersonalInfo
&& !SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo);
rSelf.addRelation(
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"_ustr,
u"docProps/app.xml" );
FSHelperPtr pAppProps = rSelf.openFragmentStreamWithSerializer(
- "docProps/app.xml",
- "application/vnd.openxmlformats-officedocument.extended-properties+xml" );
+ u"docProps/app.xml"_ustr,
+ u"application/vnd.openxmlformats-officedocument.extended-properties+xml"_ustr );
pAppProps->startElement( XML_Properties,
XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeExtPr)),
FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)));
@@ -747,7 +747,7 @@ writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >
if (!bRemovePersonalInfo)
writeElement(pAppProps, XML_Template, xProperties->getTemplateName());
- it = aUserDefinedProperties.find("Manager");
+ it = aUserDefinedProperties.find(u"Manager"_ustr);
if (it != aUserDefinedProperties.end())
{
OUString aValue;
@@ -778,7 +778,7 @@ writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >
#endif /* def OOXTODO */
writeElement( pAppProps, XML_Application, utl::DocInfoHelper::GetGeneratorString() );
- it = aUserDefinedProperties.find("HyperlinkBase");
+ it = aUserDefinedProperties.find(u"HyperlinkBase"_ustr);
if (it != aUserDefinedProperties.end())
{
OUString aValue;
@@ -794,7 +794,7 @@ writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >
writeElement( pAppProps, XML_AppVersion, u"15.0000" );
// OOXTODO Calculate DocSecurity value based on security (password, read-only etc.)
- it = aUserDefinedProperties.find("DocSecurity");
+ it = aUserDefinedProperties.find(u"DocSecurity"_ustr);
if (it != aUserDefinedProperties.end())
{
sal_Int32 nValue;
@@ -805,42 +805,42 @@ writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >
comphelper::SequenceAsHashMap aStats = xProperties->getDocumentStatistics();
sal_Int32 nValue = 0;
- it = aStats.find("PageCount");
+ it = aStats.find(u"PageCount"_ustr);
if (it != aStats.end())
{
if (it->second >>= nValue)
writeElement(pAppProps, XML_Pages, nValue);
}
- it = aStats.find("WordCount");
+ it = aStats.find(u"WordCount"_ustr);
if (it != aStats.end())
{
if (it->second >>= nValue)
writeElement(pAppProps, XML_Words, nValue);
}
- it = aStats.find("NonWhitespaceCharacterCount");
+ it = aStats.find(u"NonWhitespaceCharacterCount"_ustr);
if (it != aStats.end())
{
if (it->second >>= nValue)
writeElement(pAppProps, XML_Characters, nValue);
}
- it = aStats.find("CharacterCount");
+ it = aStats.find(u"CharacterCount"_ustr);
if (it != aStats.end())
{
if (it->second >>= nValue)
writeElement(pAppProps, XML_CharactersWithSpaces, nValue);
}
- it = aStats.find("ParagraphCount");
+ it = aStats.find(u"ParagraphCount"_ustr);
if (it != aStats.end())
{
if (it->second >>= nValue)
writeElement(pAppProps, XML_Paragraphs, nValue);
}
- it = aUserDefinedProperties.find("Company");
+ it = aUserDefinedProperties.find(u"Company"_ustr);
if (it != aUserDefinedProperties.end() && !bRemoveUserInfo)
{
OUString aValue;
@@ -875,11 +875,11 @@ writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentPropertie
}
rSelf.addRelation(
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",
+ u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties"_ustr,
u"docProps/custom.xml" );
FSHelperPtr pAppProps = rSelf.openFragmentStreamWithSerializer(
- "docProps/custom.xml",
- "application/vnd.openxmlformats-officedocument.custom-properties+xml" );
+ u"docProps/custom.xml"_ustr,
+ u"application/vnd.openxmlformats-officedocument.custom-properties+xml"_ustr );
pAppProps->startElement( XML_Properties,
XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeCustomPr)),
FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)));
@@ -1008,7 +1008,7 @@ Reference<XStream> XmlFilterBase::implGetOutputStream( MediaDescriptor& rMediaDe
{
Reference< XComponentContext > xContext = getComponentContext();
return Reference< XStream > (
- xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.MemoryStream", xContext),
+ xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.comp.MemoryStream"_ustr, xContext),
uno::UNO_QUERY_THROW );
}
}
@@ -1042,7 +1042,7 @@ StorageRef XmlFilterBase::implCreateStorage( const Reference< XInputStream >& rx
{
return std::make_shared<ZipStorage>(
getComponentContext(), rxInStream,
- getMediaDescriptor().getUnpackedValueOrDefault("RepairPackage", false));
+ getMediaDescriptor().getUnpackedValueOrDefault(u"RepairPackage"_ustr, false));
}
StorageRef XmlFilterBase::implCreateStorage( const Reference< XStream >& rxOutStream ) const
@@ -1123,9 +1123,9 @@ void XmlFilterBase::importCustomFragments(css::uno::Reference<css::embed::XStora
// Adding the saved custom xml DOM
comphelper::SequenceAsHashMap aGrabBagProperties;
- aGrabBagProperties["OOXCustomFragments"] <<= comphelper::containerToSequence(aCustomFragments);
- aGrabBagProperties["OOXCustomFragmentTypes"] <<= comphelper::containerToSequence(aCustomFragmentTypes);
- aGrabBagProperties["OOXCustomFragmentTargets"] <<= comphelper::containerToSequence(aCustomFragmentTargets);
+ aGrabBagProperties[u"OOXCustomFragments"_ustr] <<= comphelper::containerToSequence(aCustomFragments);
+ aGrabBagProperties[u"OOXCustomFragmentTypes"_ustr] <<= comphelper::containerToSequence(aCustomFragmentTypes);
+ aGrabBagProperties[u"OOXCustomFragmentTargets"_ustr] <<= comphelper::containerToSequence(aCustomFragmentTargets);
std::vector<uno::Reference<xml::dom::XDocument>> aCustomXmlDomList;
std::vector<uno::Reference<xml::dom::XDocument>> aCustomXmlDomPropsList;
@@ -1145,16 +1145,16 @@ void XmlFilterBase::importCustomFragments(css::uno::Reference<css::embed::XStora
}
// Adding the saved custom xml DOM
- aGrabBagProperties["OOXCustomXml"] <<= comphelper::containerToSequence(aCustomXmlDomList);
- aGrabBagProperties["OOXCustomXmlProps"] <<= comphelper::containerToSequence(aCustomXmlDomPropsList);
+ aGrabBagProperties[u"OOXCustomXml"_ustr] <<= comphelper::containerToSequence(aCustomXmlDomList);
+ aGrabBagProperties[u"OOXCustomXmlProps"_ustr] <<= comphelper::containerToSequence(aCustomXmlDomPropsList);
// Save the [Content_Types].xml after parsing.
uno::Sequence<uno::Sequence<beans::StringPair>> aContentTypeInfo;
- uno::Reference<io::XInputStream> xInputStream = openInputStream("[Content_Types].xml");
+ uno::Reference<io::XInputStream> xInputStream = openInputStream(u"[Content_Types].xml"_ustr);
if (xInputStream.is())
aContentTypeInfo = comphelper::OFOPXMLHelper::ReadContentTypeSequence(xInputStream, getComponentContext());
- aGrabBagProperties["OOXContentTypes"] <<= aContentTypeInfo;
+ aGrabBagProperties[u"OOXContentTypes"_ustr] <<= aContentTypeInfo;
Reference<XComponent> xModel = getModel();
oox::core::XmlFilterBase::putPropertiesToDocumentGrabBag(xModel, aGrabBagProperties);
@@ -1219,7 +1219,7 @@ void XmlFilterBase::exportCustomFragments()
uno::Reference<xml::sax::XSAXSerializable> serializer(customXmlDom, uno::UNO_QUERY);
uno::Reference<xml::sax::XWriter> writer = xml::sax::Writer::create(comphelper::getProcessComponentContext());
- writer->setOutputStream(openFragmentStream(fragmentPath, "application/xml"));
+ writer->setOutputStream(openFragmentStream(fragmentPath, u"application/xml"_ustr));
serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
uno::Sequence<beans::StringPair>());
}
@@ -1229,12 +1229,12 @@ void XmlFilterBase::exportCustomFragments()
uno::Reference<xml::sax::XSAXSerializable> serializer(customXmlDomProps, uno::UNO_QUERY);
uno::Reference<xml::sax::XWriter> writer = xml::sax::Writer::create(comphelper::getProcessComponentContext());
writer->setOutputStream(openFragmentStream("customXml/itemProps"+OUString::number(j+1)+".xml",
- "application/vnd.openxmlformats-officedocument.customXmlProperties+xml"));
+ u"application/vnd.openxmlformats-officedocument.customXmlProperties+xml"_ustr));
serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
uno::Sequence<beans::StringPair>());
// Adding itemprops's relationship entry to item.xml.rels file
- addRelation(openFragmentStream(fragmentPath, "application/xml"),
+ addRelation(openFragmentStream(fragmentPath, u"application/xml"_ustr),
oox::getRelationship(Relationship::CUSTOMXMLPROPS),
Concat2View("itemProps"+OUString::number(j+1)+".xml"));
}
@@ -1253,8 +1253,8 @@ void XmlFilterBase::exportCustomFragments()
if (xProps.is())
{
const OUString aType = comphelper::OFOPXMLHelper::GetContentTypeByName(aContentTypes, aFilename);
- const OUString aContentType = (aType.getLength() ? aType : OUString("application/octet-stream"));
- xProps->setPropertyValue("MediaType", uno::Any(aContentType));
+ const OUString aContentType = (aType.getLength() ? aType : u"application/octet-stream"_ustr);
+ xProps->setPropertyValue(u"MediaType"_ustr, uno::Any(aContentType));
}
}
}
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index 857034777357..5fa217d42044 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -702,11 +702,11 @@ bool AgileEngine::encryptEncryptionKey(OUString const & rPassword)
bool AgileEngine::setupEncryption(OUString const & rPassword)
{
if (meEncryptionPreset == AgileEncryptionPreset::AES_128_SHA1)
- setupEncryptionParameters({ 100000, 16, 128, 20, 16, OUString("AES"), OUString("ChainingModeCBC"), OUString("SHA1") });
+ setupEncryptionParameters({ 100000, 16, 128, 20, 16, u"AES"_ustr, u"ChainingModeCBC"_ustr, u"SHA1"_ustr });
else if (meEncryptionPreset == AgileEncryptionPreset::AES_128_SHA384)
- setupEncryptionParameters({ 100000, 16, 128, 48, 16, OUString("AES"), OUString("ChainingModeCBC"), OUString("SHA384") });
+ setupEncryptionParameters({ 100000, 16, 128, 48, 16, u"AES"_ustr, u"ChainingModeCBC"_ustr, u"SHA384"_ustr });
else
- setupEncryptionParameters({ 100000, 16, 256, 64, 16, OUString("AES"), OUString("ChainingModeCBC"), OUString("SHA512") });
+ setupEncryptionParameters({ 100000, 16, 256, 64, 16, u"AES"_ustr, u"ChainingModeCBC"_ustr, u"SHA512"_ustr });
return setupEncryptionKey(rPassword);
}
diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx
index 17729828ac42..e8e842abeb43 100644
--- a/oox/source/crypto/CryptTools.cxx
+++ b/oox/source/crypto/CryptTools.cxx
@@ -227,7 +227,7 @@ struct CryptoImpl
int wrap_key_len = PK11_GetBestKeyLength(mSlot, wrap_mechanism);
mWrapKey = PK11_KeyGen(mSlot, wrap_mechanism, nullptr, wrap_key_len, nullptr);
if (!mWrapKey)
- throw css::uno::RuntimeException("PK11_KeyGen SymKey failure", css::uno::Reference<css::uno::XInterface>());
+ throw css::uno::RuntimeException(u"PK11_KeyGen SymKey failure"_ustr, css::uno::Reference<css::uno::XInterface>());
/*
* Encrypt authkey with wrapping key
@@ -239,7 +239,7 @@ struct CryptoImpl
SECItem tmp_sec_item = {};
mWrapKeyContext = PK11_CreateContextBySymKey(wrap_mechanism, CKA_ENCRYPT, mWrapKey, &tmp_sec_item);
if (!mWrapKeyContext)
- throw css::uno::RuntimeException("PK11_CreateContextBySymKey failure", css::uno::Reference<css::uno::XInterface>());
+ throw css::uno::RuntimeException(u"PK11_CreateContextBySymKey failure"_ustr, css::uno::Reference<css::uno::XInterface>());
unsigned char wrapped_key_data[MAX_WRAPPED_KEY_LEN];
int wrapped_key_len = sizeof(wrapped_key_data);
@@ -247,11 +247,11 @@ struct CryptoImpl
if (PK11_CipherOp(mWrapKeyContext, wrapped_key_data, &wrapped_key_len,
sizeof(wrapped_key_data), key->data, key->len) != SECSuccess)
{
- throw css::uno::RuntimeException("PK11_CipherOp failure", css::uno::Reference<css::uno::XInterface>());
+ throw css::uno::RuntimeException(u"PK11_CipherOp failure"_ustr, css::uno::Reference<css::uno::XInterface>());
}
if (PK11_Finalize(mWrapKeyContext) != SECSuccess)
- throw css::uno::RuntimeException("PK11_Finalize failure", css::uno::Reference<css::uno::XInterface>());
+ throw css::uno::RuntimeException(u"PK11_Finalize failure"_ustr, css::uno::Reference<css::uno::XInterface>());
/*
* Finally unwrap sym key
@@ -300,7 +300,7 @@ struct CryptoImpl
mSlot = PK11_GetBestSlot(mechanism, nullptr);
if (!mSlot)
- throw css::uno::RuntimeException("NSS Slot failure", css::uno::Reference<css::uno::XInterface>());
+ throw css::uno::RuntimeException(u"NSS Slot failure"_ustr, css::uno::Reference<css::uno::XInterface>());
SECItem keyItem;
keyItem.type = siBuffer;
@@ -309,7 +309,7 @@ struct CryptoImpl
mSymKey = ImportSymKey(mechanism, CKA_ENCRYPT, &keyItem);
if (!mSymKey)
- throw css::uno::RuntimeException("NSS SymKey failure", css::uno::Reference<css::uno::XInterface>());
+ throw css::uno::RuntimeException(u"NSS SymKey failure"_ustr, css::uno::Reference<css::uno::XInterface>());
mSecParam = PK11_ParamFromIV(mechanism, pIvItem);
mContext = PK11_CreateContextBySymKey(mechanism, operation, mSymKey, mSecParam);
@@ -338,7 +338,7 @@ struct CryptoImpl
mSlot = PK11_GetBestSlot(aMechanism, nullptr);
if (!mSlot)
- throw css::uno::RuntimeException("NSS Slot failure", css::uno::Reference<css::uno::XInterface>());
+ throw css::uno::RuntimeException(u"NSS Slot failure"_ustr, css::uno::Reference<css::uno::XInterface>());
SECItem aKeyItem;
aKeyItem.data = rKey.data();
@@ -346,7 +346,7 @@ struct CryptoImpl
mSymKey = ImportSymKey(aMechanism, CKA_SIGN, &aKeyItem);
if (!mSymKey)
- throw css::uno::RuntimeException("NSS SymKey failure", css::uno::Reference<css::uno::XInterface>());
+ throw css::uno::RuntimeException(u"NSS SymKey failure"_ustr, css::uno::Reference<css::uno::XInterface>());
SECItem param;
param.data = nullptr;
diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx
index 858558433cba..b6963f22c75e 100644
--- a/oox/source/crypto/DocumentDecryption.cxx
+++ b/oox/source/crypto/DocumentDecryption.cxx
@@ -99,7 +99,7 @@ bool DocumentDecryption::readEncryptionInfo()
// Read 0x6DataSpaces/DataSpaceMap
uno::Reference<io::XInputStream> xDataSpaceMap
- = mrOleStorage.openInputStream("\006DataSpaces/DataSpaceMap");
+ = mrOleStorage.openInputStream(u"\006DataSpaces/DataSpaceMap"_ustr);
OUString sDataSpaceName;
if (xDataSpaceMap.is())
@@ -202,7 +202,7 @@ bool DocumentDecryption::decrypt(const uno::Reference<io::XStream>& xDocumentStr
// open the required input streams in the encrypted package
uno::Reference<io::XInputStream> xEncryptedPackage
- = mrOleStorage.openInputStream("EncryptedPackage");
+ = mrOleStorage.openInputStream(u"EncryptedPackage"_ustr);
// create temporary file for unencrypted package
uno::Reference<io::XOutputStream> xDecryptedPackage = xDocumentStream->getOutputStream();
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx
index bcc3dc558ff3..792c6c27cc7a 100644
--- a/oox/source/crypto/Standard2007Engine.cxx
+++ b/oox/source/crypto/Standard2007Engine.cxx
@@ -29,7 +29,7 @@ void lclRandomGenerateValues(sal_uInt8* aArray, sal_uInt32 aSize)
{
if (rtl_random_getBytes(nullptr, aArray, aSize) != rtl_Random_E_None)
{
- throw css::uno::RuntimeException("rtl_random_getBytes failed");
+ throw css::uno::RuntimeException(u"rtl_random_getBytes failed"_ustr);
}
}
diff --git a/oox/source/crypto/StrongEncryptionDataSpace.cxx b/oox/source/crypto/StrongEncryptionDataSpace.cxx
index fd1b823b8870..976b407fb7e9 100644
--- a/oox/source/crypto/StrongEncryptionDataSpace.cxx
+++ b/oox/source/crypto/StrongEncryptionDataSpace.cxx
@@ -130,8 +130,8 @@ sal_Bool StrongEncryptionDataSpace::setupEncryption(const Sequence<NamedValue>&
Sequence<NamedValue> StrongEncryptionDataSpace::createEncryptionData(const OUString& rPassword)
{
comphelper::SequenceAsHashMap aEncryptionData;
- aEncryptionData["OOXPassword"] <<= rPassword;
- aEncryptionData["CryptoType"] <<= OUString("StrongEncryptionDataSpace");
+ aEncryptionData[u"OOXPassword"_ustr] <<= rPassword;
+ aEncryptionData[u"CryptoType"_ustr] <<= u"StrongEncryptionDataSpace"_ustr;
return aEncryptionData.getAsConstNamedValueList();
}
@@ -150,7 +150,7 @@ StrongEncryptionDataSpace::encrypt(const Reference<XInputStream>& rxInputStream)
Reference<XOutputStream> xOutputStream(
mxContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.io.SequenceOutputStream", mxContext),
+ u"com.sun.star.io.SequenceOutputStream"_ustr, mxContext),
UNO_QUERY);
mCryptoEngine->encrypt(rxInputStream, xOutputStream, aLength);
@@ -158,11 +158,11 @@ StrongEncryptionDataSpace::encrypt(const Reference<XInputStream>& rxInputStream)
comphelper::SequenceAsHashMap aStreams;
Reference<XSequenceOutputStream> xEncodedFileSequenceStream(xOutputStream, UNO_QUERY);
- aStreams["EncryptedPackage"] <<= xEncodedFileSequenceStream->getWrittenBytes();
+ aStreams[u"EncryptedPackage"_ustr] <<= xEncodedFileSequenceStream->getWrittenBytes();
Reference<XOutputStream> aEncryptionInfoStream(
mxContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.io.SequenceOutputStream", mxContext),
+ u"com.sun.star.io.SequenceOutputStream"_ustr, mxContext),
UNO_QUERY);
BinaryXOutputStream rStream(aEncryptionInfoStream, false);
mCryptoEngine->writeEncryptionInfo(rStream);
@@ -170,14 +170,14 @@ StrongEncryptionDataSpace::encrypt(const Reference<XInputStream>& rxInputStream)
Reference<XSequenceOutputStream> aEncryptionInfoSequenceStream(aEncryptionInfoStream,
UNO_QUERY);
- aStreams["EncryptionInfo"] <<= aEncryptionInfoSequenceStream->getWrittenBytes();
+ aStreams[u"EncryptionInfo"_ustr] <<= aEncryptionInfoSequenceStream->getWrittenBytes();
return aStreams.getAsConstNamedValueList();
}
OUString SAL_CALL StrongEncryptionDataSpace::getImplementationName()
{
- return "com.sun.star.comp.oox.crypto.StrongEncryptionDataSpace";
+ return u"com.sun.star.comp.oox.crypto.StrongEncryptionDataSpace"_ustr;
}
sal_Bool SAL_CALL StrongEncryptionDataSpace::supportsService(const OUString& rServiceName)
@@ -187,7 +187,7 @@ sal_Bool SAL_CALL StrongEncryptionDataSpace::supportsService(const OUString& rSe
css::uno::Sequence<OUString> SAL_CALL StrongEncryptionDataSpace::getSupportedServiceNames()
{
- Sequence<OUString> aServices{ "com.sun.star.packages.PackageEncryption" };
+ Sequence<OUString> aServices{ u"com.sun.star.packages.PackageEncryption"_ustr };
return aServices;
}
diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx
index 3f2d962c8f90..f53484e3a06b 100644
--- a/oox/source/docprop/docprophandler.cxx
+++ b/oox/source/docprop/docprophandler.cxx
@@ -705,7 +705,7 @@ void SAL_CALL OOXMLDocPropHandler::characters( const OUString& aChars )
{
css::uno::Any anyEx = cppu::getCaughtException();
throw xml::sax::SAXException(
- "Error while setting document property!",
+ u"Error while setting document property!"_ustr,
uno::Reference< uno::XInterface >(),
anyEx );
}
diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx
index 23e754d6bbcf..432edd825d6d 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -93,7 +93,7 @@ Sequence< InputSource > lclGetCoreStreams(const Reference< XStorage >& rxSource)
aCoreStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT("metadata/core-properties"));
// MS Office seems to have a bug, so we have to do similar handling
if (!aCoreStreams.hasElements())
- aCoreStreams = lclGetRelatedStreams(rxSource, "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties");
+ aCoreStreams = lclGetRelatedStreams(rxSource, u"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"_ustr);
return aCoreStreams;
}
@@ -129,7 +129,7 @@ DocumentPropertiesImport::DocumentPropertiesImport( const Reference< XComponentC
// XServiceInfo
OUString SAL_CALL DocumentPropertiesImport::getImplementationName()
{
- return "com.sun.star.comp.oox.docprop.DocumentPropertiesImporter";
+ return u"com.sun.star.comp.oox.docprop.DocumentPropertiesImporter"_ustr;
}
sal_Bool SAL_CALL DocumentPropertiesImport::supportsService( const OUString& rServiceName )
@@ -139,7 +139,7 @@ sal_Bool SAL_CALL DocumentPropertiesImport::supportsService( const OUString& rSe
Sequence< OUString > SAL_CALL DocumentPropertiesImport::getSupportedServiceNames()
{
- Sequence<OUString> aServices { "com.sun.star.document.OOXMLDocumentPropertiesImporter" };
+ Sequence<OUString> aServices { u"com.sun.star.document.OOXMLDocumentPropertiesImporter"_ustr };
return aServices;
}
@@ -163,7 +163,7 @@ void SAL_CALL DocumentPropertiesImport::importProperties(
return;
if( aCoreStreams.getLength() > 1 )
- throw IOException( "Unexpected core properties stream!" );
+ throw IOException( u"Unexpected core properties stream!"_ustr );
::oox::core::FastParser aParser;
aParser.registerNamespace( NMSP_packageMetaCorePr );
diff --git a/oox/source/drawingml/chart/axiscontext.cxx b/oox/source/drawingml/chart/axiscontext.cxx
index b90857785e32..8f1defe40bea 100644
--- a/oox/source/drawingml/chart/axiscontext.cxx
+++ b/oox/source/drawingml/chart/axiscontext.cxx
@@ -50,7 +50,7 @@ ContextHandlerRef AxisDispUnitsContext::onCreateContext( sal_Int32 nElement, con
switch( nElement )
{
case C_TOKEN( builtInUnit ):
- mrModel.mnBuiltInUnit = rAttribs.getString( XML_val, "thousands" );
+ mrModel.mnBuiltInUnit = rAttribs.getString( XML_val, u"thousands"_ustr );
return nullptr;
case C_TOKEN( custUnit ):
mrModel.mfCustomUnit = rAttribs.getDouble( XML_val, 0.0 );
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 9e749d6b54c0..6a2ab5a12875 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -156,7 +156,7 @@ void AxisConverter::convertFromModel(const Reference<XCoordinateSystem>& rxCoord
ObjectFormatter& rFormatter = getFormatter();
// create the axis object (always)
- xAxis.set( createInstance( "com.sun.star.chart2.Axis" ), UNO_QUERY_THROW );
+ xAxis.set( createInstance( u"com.sun.star.chart2.Axis"_ustr ), UNO_QUERY_THROW );
PropertySet aAxisProp( xAxis );
// #i58688# axis enabled
aAxisProp.setProperty( PROP_Show, !mrModel.mbDeleted );
diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx
index e73a457d9160..dc233fec8129 100644
--- a/oox/source/drawingml/chart/chartspaceconverter.cxx
+++ b/oox/source/drawingml/chart/chartspaceconverter.cxx
@@ -122,7 +122,7 @@ static bool lcl_useWorkaroundForNoGapInOOXML( Reference< chart2::XChartDocument
continue;
OUString aRoleName;
- xPropSet->getPropertyValue("Role") >>= aRoleName;
+ xPropSet->getPropertyValue(u"Role"_ustr) >>= aRoleName;
if (aRoleName == "values-y")
{
const uno::Sequence<uno::Any> aData = xValues->getData();
diff --git a/oox/source/drawingml/chart/datasourceconverter.cxx b/oox/source/drawingml/chart/datasourceconverter.cxx
index c07ea397d537..4598572b4723 100644
--- a/oox/source/drawingml/chart/datasourceconverter.cxx
+++ b/oox/source/drawingml/chart/datasourceconverter.cxx
@@ -73,7 +73,7 @@ Reference< XDataSequence > DataSequenceConverter::createDataSequence( const OUSt
bool bDateCategories = (mrModel.meFormatType == SvNumFormatType::DATE) && (rRole == "categories");
xDataSeq = getChartConverter().createDataSequence(getChartDocument()->getDataProvider(), mrModel,
- rRole, bDateCategories ? OUString("date") : OUString(""));
+ rRole, bDateCategories ? u"date"_ustr : u""_ustr);
// set sequence role
PropertySet aSeqProp( xDataSeq );
diff --git a/oox/source/drawingml/chart/datatableconverter.cxx b/oox/source/drawingml/chart/datatableconverter.cxx
index 4e42b7468ebc..5118ae22bb16 100644
--- a/oox/source/drawingml/chart/datatableconverter.cxx
+++ b/oox/source/drawingml/chart/datatableconverter.cxx
@@ -43,7 +43,7 @@ void DataTableConverter::convertFromModel(uno::Reference<chart2::XDiagram> const
try
{
uno::Reference<chart2::XDataTable> xDataTable(
- createInstance("com.sun.star.chart2.DataTable"), uno::UNO_QUERY_THROW);
+ createInstance(u"com.sun.star.chart2.DataTable"_ustr), uno::UNO_QUERY_THROW);
rxDiagram->setDataTable(xDataTable);
PropertySet aPropSet(xDataTable);
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 1184c2a80bf1..0d746ab783f8 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -986,7 +986,7 @@ void ObjectTypeFormatter::convertAutomaticFill( PropertySet& rPropSet, sal_Int32
ObjectFormatterData::ObjectFormatterData( const XmlFilterBase& rFilter, const Reference< XChartDocument >& rxChartDoc, const ChartSpaceModel& rChartSpace ) :
mrFilter( rFilter ),
maModelObjHelper( Reference< XMultiServiceFactory >( rxChartDoc, UNO_QUERY ) ),
- maEnUsLocale( "en", "US", OUString() ),
+ maEnUsLocale( u"en"_ustr, u"US"_ustr, OUString() ),
mnMaxSeriesIdx( -1 )
{
for(auto const &rEntry : spObjTypeFormatEntries)
diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx
index cd2ec9e5bdc9..fdb12d9a7f64 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -320,7 +320,7 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel )
Reference< XDiagram > xDiagram;
try
{
- xDiagram.set( createInstance( "com.sun.star.chart2.Diagram" ), UNO_QUERY_THROW );
+ xDiagram.set( createInstance( u"com.sun.star.chart2.Diagram"_ustr ), UNO_QUERY_THROW );
getChartDocument()->setFirstDiagram( xDiagram );
}
catch( Exception& )
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index 2d07f26493ef..4efe54f3c2e8 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -84,7 +84,7 @@ Reference< XLabeledDataSequence > lclCreateLabeledDataSequence(
if( pTitle )
{
TextConverter aTextConv( rParent, *pTitle );
- xTitleSeq = aTextConv.createDataSequence( "label" );
+ xTitleSeq = aTextConv.createDataSequence( u"label"_ustr );
}
// create the labeled data sequence, if values or title are present
@@ -384,7 +384,7 @@ void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDat
{
css::uno::Reference< XDataPointCustomLabelField > xCustomLabel = DataPointCustomLabelField::create( xContext );
xCustomLabel->setFieldType( DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_NEWLINE );
- xCustomLabel->setString("\n");
+ xCustomLabel->setString(u"\n"_ustr);
aSequenceRange[ nPos++ ] = xCustomLabel;
}
}
@@ -497,7 +497,7 @@ void ErrorBarConverter::convertFromModel( const Reference< XDataSeries >& rxData
try
{
- Reference< XPropertySet > xErrorBar( createInstance( "com.sun.star.chart2.ErrorBar" ), UNO_QUERY_THROW );
+ Reference< XPropertySet > xErrorBar( createInstance( u"com.sun.star.chart2.ErrorBar"_ustr ), UNO_QUERY_THROW );
PropertySet aBarProp( xErrorBar );
// plus/minus bars
@@ -778,7 +778,7 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve
const TypeGroupInfo& rTypeInfo = rTypeGroup.getTypeInfo();
// create the data series object
- Reference< XDataSeries > xDataSeries( createInstance( "com.sun.star.chart2.DataSeries" ), UNO_QUERY );
+ Reference< XDataSeries > xDataSeries( createInstance( u"com.sun.star.chart2.DataSeries"_ustr ), UNO_QUERY );
PropertySet aSeriesProp( xDataSeries );
// attach data and title sequences to series
@@ -789,7 +789,7 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve
// create vector of all value sequences
::std::vector< Reference< XLabeledDataSequence > > aLabeledSeqVec;
// add Y values
- Reference< XLabeledDataSequence > xYValueSeq = createValueSequence( "values-y" );
+ Reference< XLabeledDataSequence > xYValueSeq = createValueSequence( u"values-y"_ustr );
if( xYValueSeq.is() )
{
aLabeledSeqVec.push_back( xYValueSeq );
@@ -804,13 +804,13 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve
// add X values of scatter and bubble charts
if( !rTypeInfo.mbCategoryAxis )
{
- Reference< XLabeledDataSequence > xXValueSeq = createCategorySequence( "values-x" );
+ Reference< XLabeledDataSequence > xXValueSeq = createCategorySequence( u"values-x"_ustr );
if( xXValueSeq.is() )
aLabeledSeqVec.push_back( xXValueSeq );
// add size values of bubble charts
if( rTypeInfo.meTypeId == TYPEID_BUBBLE )
{
- Reference< XLabeledDataSequence > xSizeValueSeq = createLabeledDataSequence( SeriesModel::POINTS, "values-size", true );
+ Reference< XLabeledDataSequence > xSizeValueSeq = createLabeledDataSequence( SeriesModel::POINTS, u"values-size"_ustr, true );
if( xSizeValueSeq.is() )
aLabeledSeqVec.push_back( xSizeValueSeq );
}
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
index 3fc352afed7e..b5d9ecd67d97 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -166,7 +166,7 @@ void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, con
try
{
// create the title object and set the string data
- Reference< XTitle > xTitle( createInstance( "com.sun.star.chart2.Title" ), UNO_QUERY_THROW );
+ Reference< XTitle > xTitle( createInstance( u"com.sun.star.chart2.Title"_ustr ), UNO_QUERY_THROW );
xTitle->setText( aStringSeq );
rxTitled->setTitleObject( xTitle );
@@ -207,7 +207,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
namespace cssc2 = ::com::sun::star::chart2;
// create the legend
- Reference< XLegend > xLegend( createInstance( "com.sun.star.chart2.Legend" ), UNO_QUERY_THROW );
+ Reference< XLegend > xLegend( createInstance( u"com.sun.star.chart2.Legend"_ustr ), UNO_QUERY_THROW );
rxDiagram->setLegend( xLegend );
PropertySet aPropSet( xLegend );
aPropSet.setProperty( PROP_Show, true );
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
index 9e8691be5919..8c2886671761 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -286,7 +286,7 @@ Reference< XLabeledDataSequence > TypeGroupConverter::createCategorySequence()
if( elem->maSources.has( SeriesModel::CATEGORIES ) )
{
SeriesConverter aSeriesConv(*this, *elem);
- xLabeledSeq = aSeriesConv.createCategorySequence( "categories" );
+ xLabeledSeq = aSeriesConv.createCategorySequence( u"categories"_ustr );
if (xLabeledSeq.is())
break;
}
@@ -311,7 +311,7 @@ Reference< XLabeledDataSequence > TypeGroupConverter::createCategorySequence()
aSeq.maData[ i ] <<= OUString::number( i + 1 );
}
SeriesConverter aSeriesConv( *this, aModel );
- xLabeledSeq = aSeriesConv.createCategorySequence( "categories" );
+ xLabeledSeq = aSeriesConv.createCategorySequence( u"categories"_ustr );
}
return xLabeledSeq;
}
@@ -383,7 +383,7 @@ void TypeGroupConverter::convertFromModel( const Reference< XDiagram >& rxDiagra
if( maTypeInfo.meTypeId == TYPEID_STOCK )
{
// create the data series object
- Reference< XDataSeries > xDataSeries( createInstance( "com.sun.star.chart2.DataSeries" ), UNO_QUERY );
+ Reference< XDataSeries > xDataSeries( createInstance( u"com.sun.star.chart2.DataSeries"_ustr ), UNO_QUERY );
Reference< XDataSink > xDataSink( xDataSeries, UNO_QUERY );
if( xDataSink.is() )
{
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index 9462fc03095c..422faf1f93dc 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -459,34 +459,34 @@ OUString Color::getColorTransformationName( sal_Int32 nElement )
{
switch( nElement )
{
- case XML_red: return "red";
- case XML_redMod: return "redMod";
- case XML_redOff: return "redOff";
- case XML_green: return "green";
- case XML_greenMod: return "greenMod";
- case XML_greenOff: return "greenOff";
- case XML_blue: return "blue";
- case XML_blueMod: return "blueMod";
- case XML_blueOff: return "blueOff";
- case XML_alpha: return "alpha";
- case XML_alphaMod: return "alphaMod";
- case XML_alphaOff: return "alphaOff";
- case XML_hue: return "hue";
- case XML_hueMod: return "hueMod";
- case XML_hueOff: return "hueOff";
- case XML_sat: return "sat";
- case XML_satMod: return "satMod";
- case XML_satOff: return "satOff";
- case XML_lum: return "lum";
- case XML_lumMod: return "lumMod";
- case XML_lumOff: return "lumOff";
- case XML_shade: return "shade";
- case XML_tint: return "tint";
- case XML_gray: return "gray";
- case XML_comp: return "comp";
- case XML_inv: return "inv";
- case XML_gamma: return "gamma";
- case XML_invGamma: return "invGamma";
+ case XML_red: return u"red"_ustr;
+ case XML_redMod: return u"redMod"_ustr;
+ case XML_redOff: return u"redOff"_ustr;
+ case XML_green: return u"green"_ustr;
+ case XML_greenMod: return u"greenMod"_ustr;
+ case XML_greenOff: return u"greenOff"_ustr;
+ case XML_blue: return u"blue"_ustr;
+ case XML_blueMod: return u"blueMod"_ustr;
+ case XML_blueOff: return u"blueOff"_ustr;
+ case XML_alpha: return u"alpha"_ustr;
+ case XML_alphaMod: return u"alphaMod"_ustr;
+ case XML_alphaOff: return u"alphaOff"_ustr;
+ case XML_hue: return u"hue"_ustr;
+ case XML_hueMod: return u"hueMod"_ustr;
+ case XML_hueOff: return u"hueOff"_ustr;
+ case XML_sat: return u"sat"_ustr;
+ case XML_satMod: return u"satMod"_ustr;
+ case XML_satOff: return u"satOff"_ustr;
+ case XML_lum: return u"lum"_ustr;
+ case XML_lumMod: return u"lumMod"_ustr;
+ case XML_lumOff: return u"lumOff"_ustr;
+ case XML_shade: return u"shade"_ustr;
+ case XML_tint: return u"tint"_ustr;
+ case XML_gray: return u"gray"_ustr;
+ case XML_comp: return u"comp"_ustr;
+ case XML_inv: return u"inv"_ustr;
+ case XML_gamma: return u"gamma"_ustr;
+ case XML_invGamma: return u"invGamma"_ustr;
}
SAL_WARN( "oox.drawingml", "Color::getColorTransformationName - unexpected transformation type" );
return OUString();
diff --git a/oox/source/drawingml/connectorhelper.cxx b/oox/source/drawingml/connectorhelper.cxx
index e54b586c2365..c8954d000e04 100644
--- a/oox/source/drawingml/connectorhelper.cxx
+++ b/oox/source/drawingml/connectorhelper.cxx
@@ -301,15 +301,15 @@ void ConnectorHelper::applyConnections(oox::drawingml::ShapePtr& pConnector,
return;
// MS Office allows route between shapes with small distance. LO default is 5mm.
- xPropSet->setPropertyValue("EdgeNode1HorzDist", uno::Any(sal_Int32(0)));
- xPropSet->setPropertyValue("EdgeNode1VertDist", uno::Any(sal_Int32(0)));
- xPropSet->setPropertyValue("EdgeNode2HorzDist", uno::Any(sal_Int32(0)));
- xPropSet->setPropertyValue("EdgeNode2VertDist", uno::Any(sal_Int32(0)));
+ xPropSet->setPropertyValue(u"EdgeNode1HorzDist"_ustr, uno::Any(sal_Int32(0)));
+ xPropSet->setPropertyValue(u"EdgeNode1VertDist"_ustr, uno::Any(sal_Int32(0)));
+ xPropSet->setPropertyValue(u"EdgeNode2HorzDist"_ustr, uno::Any(sal_Int32(0)));
+ xPropSet->setPropertyValue(u"EdgeNode2VertDist"_ustr, uno::Any(sal_Int32(0)));
// A OOXML curvedConnector uses a routing method which is basically incompatible with the
// traditional way of LibreOffice. A compatible way was added and needs to be enabled before
// connections are set, so that the method is used in the default routing.
- xPropSet->setPropertyValue("EdgeOOXMLCurve", uno::Any(true));
+ xPropSet->setPropertyValue(u"EdgeOOXMLCurve"_ustr, uno::Any(true));
oox::drawingml::ConnectorShapePropertiesList aConnectorShapeProperties
= pConnector->getConnectorShapeProperties();
@@ -325,9 +325,9 @@ void ConnectorHelper::applyConnections(oox::drawingml::ShapePtr& pConnector,
{
// Connect to the found shape.
if (aIt.mbStartShape)
- xPropSet->setPropertyValue("StartShape", uno::Any(xShape));
+ xPropSet->setPropertyValue(u"StartShape"_ustr, uno::Any(xShape));
else
- xPropSet->setPropertyValue("EndShape", uno::Any(xShape));
+ xPropSet->setPropertyValue(u"EndShape"_ustr, uno::Any(xShape));
// The first four glue points are the default glue points, which are set by LibreOffice.
// They do not belong to the preset geometry of the shape.
@@ -366,9 +366,9 @@ void ConnectorHelper::applyConnections(oox::drawingml::ShapePtr& pConnector,
}
if (aIt.mbStartShape)
- xPropSet->setPropertyValue("StartGluePointIndex", uno::Any(nGlueId));
+ xPropSet->setPropertyValue(u"StartGluePointIndex"_ustr, uno::Any(nGlueId));
else
- xPropSet->setPropertyValue("EndGluePointIndex", uno::Any(nGlueId));
+ xPropSet->setPropertyValue(u"EndGluePointIndex"_ustr, uno::Any(nGlueId));
}
}
}
diff --git a/oox/source/drawingml/customshapepresetdata.cxx b/oox/source/drawingml/customshapepresetdata.cxx
index 6f9d2acffd1b..597f19b5943e 100644
--- a/oox/source/drawingml/customshapepresetdata.cxx
+++ b/oox/source/drawingml/customshapepresetdata.cxx
@@ -375,25 +375,25 @@ uno::Sequence<beans::PropertyValue> lcl_parseHandle(std::string_view rValue)
if (o3tl::starts_with(aToken, "Name = \"Position\""))
lcl_parseHandlePosition(aRet, aToken);
else if (o3tl::starts_with(aToken, "Name = \"RangeXMaximum\""))
- lcl_parseHandleRange(aRet, aToken, "RangeXMaximum");
+ lcl_parseHandleRange(aRet, aToken, u"RangeXMaximum"_ustr);
else if (o3tl::starts_with(aToken, "Name = \"RangeXMinimum\""))
- lcl_parseHandleRange(aRet, aToken, "RangeXMinimum");
+ lcl_parseHandleRange(aRet, aToken, u"RangeXMinimum"_ustr);
else if (o3tl::starts_with(aToken, "Name = \"RangeYMaximum\""))
- lcl_parseHandleRange(aRet, aToken, "RangeYMaximum");
+ lcl_parseHandleRange(aRet, aToken, u"RangeYMaximum"_ustr);
else if (o3tl::starts_with(aToken, "Name = \"RangeYMinimum\""))
- lcl_parseHandleRange(aRet, aToken, "RangeYMinimum");
+ lcl_parseHandleRange(aRet, aToken, u"RangeYMinimum"_ustr);
else if (o3tl::starts_with(aToken, "Name = \"RadiusRangeMaximum\""))
- lcl_parseHandleRange(aRet, aToken, "RadiusRangeMaximum");
+ lcl_parseHandleRange(aRet, aToken, u"RadiusRangeMaximum"_ustr);
else if (o3tl::starts_with(aToken, "Name = \"RadiusRangeMinimum\""))
- lcl_parseHandleRange(aRet, aToken, "RadiusRangeMinimum");
+ lcl_parseHandleRange(aRet, aToken, u"RadiusRangeMinimum"_ustr);
else if (o3tl::starts_with(aToken, "Name = \"RefX\""))
- lcl_parseHandleRef(aRet, aToken, "RefX");
+ lcl_parseHandleRef(aRet, aToken, u"RefX"_ustr);
else if (o3tl::starts_with(aToken, "Name = \"RefY\""))
- lcl_parseHandleRef(aRet, aToken, "RefY");
+ lcl_parseHandleRef(aRet, aToken, u"RefY"_ustr);
else if (o3tl::starts_with(aToken, "Name = \"RefR\""))
- lcl_parseHandleRef(aRet, aToken, "RefR");
+ lcl_parseHandleRef(aRet, aToken, u"RefR"_ustr);
else if (o3tl::starts_with(aToken, "Name = \"RefAngle\""))
- lcl_parseHandleRef(aRet, aToken, "RefAngle");
+ lcl_parseHandleRef(aRet, aToken, u"RefAngle"_ustr);
else
SAL_WARN("oox", "lcl_parseHandle: unexpected token: " << aToken);
}
@@ -822,7 +822,7 @@ namespace oox::drawingml
{
void CustomShapeProperties::initializePresetDataMap()
{
- OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-cs-presets");
+ OUString aPath(u"$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-cs-presets"_ustr);
rtl::Bootstrap::expandMacros(aPath);
SvFileStream aStream(aPath, StreamMode::READ);
if (aStream.GetError() != ERRCODE_NONE)
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index f5dfae2e56df..2efb2dd68078 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -222,7 +222,7 @@ void CustomShapeProperties::pushToPropSet(
else
{
PropertyMap aPropertyMap;
- aPropertyMap.setProperty( PROP_Type, OUString( "ooxml-non-primitive" ));
+ aPropertyMap.setProperty( PROP_Type, u"ooxml-non-primitive"_ustr);
aPropertyMap.setProperty( PROP_MirroredX, mbMirroredX );
aPropertyMap.setProperty( PROP_MirroredY, mbMirroredY );
if( mnTextPreRotateAngle )
diff --git a/oox/source/drawingml/diagram/datamodel.cxx b/oox/source/drawingml/diagram/datamodel.cxx
index 97691af43fd8..3dbddc790851 100644
--- a/oox/source/drawingml/diagram/datamodel.cxx
+++ b/oox/source/drawingml/diagram/datamodel.cxx
@@ -207,7 +207,7 @@ void DiagramData::secureStyleDataFromShapeToModel(::oox::drawingml::Shape& rShap
// text properties
if(!bIsBackgroundShape
- && xServiceInfo->supportsService("com.sun.star.drawing.TextProperties"))
+ && xServiceInfo->supportsService(u"com.sun.star.drawing.TextProperties"_ustr))
{
addProperty(UNO_NAME_CHAR_COLOR, xInfo, pTarget->maProperties, xPropSet);
addProperty(UNO_NAME_CHAR_HEIGHT, xInfo, pTarget->maProperties, xPropSet);
@@ -216,7 +216,7 @@ void DiagramData::secureStyleDataFromShapeToModel(::oox::drawingml::Shape& rShap
}
// fill properties
- if(xServiceInfo->supportsService("com.sun.star.drawing.FillProperties"))
+ if(xServiceInfo->supportsService(u"com.sun.star.drawing.FillProperties"_ustr))
{
css::drawing::FillStyle eFillStyle(css::drawing::FillStyle_NONE);
if (xInfo->hasPropertyByName(UNO_NAME_FILLSTYLE))
@@ -245,7 +245,7 @@ void DiagramData::secureStyleDataFromShapeToModel(::oox::drawingml::Shape& rShap
// line properties
if(!bIsBackgroundShape
- && xServiceInfo->supportsService("com.sun.star.drawing.LineProperties"))
+ && xServiceInfo->supportsService(u"com.sun.star.drawing.LineProperties"_ustr))
{
css::drawing::LineStyle eLineStyle(css::drawing::LineStyle_NONE);
if (xInfo->hasPropertyByName(UNO_NAME_LINESTYLE))
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index f63185549c23..a415cd33ffd8 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -194,8 +194,8 @@ void Diagram::syncDiagramFontHeights()
{
double fFontScale = 0.0;
double fSpacingScale = 0.0;
- xPropertySet->getPropertyValue("TextFitToSizeFontScale") >>= fFontScale;
- xPropertySet->getPropertyValue("TextFitToSizeSpacingScale") >>= fSpacingScale;
+ xPropertySet->getPropertyValue(u"TextFitToSizeFontScale"_ustr) >>= fFontScale;
+ xPropertySet->getPropertyValue(u"TextFitToSizeSpacingScale"_ustr) >>= fSpacingScale;
if (fFontScale > 0 && fSpacingScale > 0
&& (fFontScale < fMinFontScale || (fFontScale == fMinFontScale && fSpacingScale < fMinSpacingScale)))
@@ -214,8 +214,8 @@ void Diagram::syncDiagramFontHeights()
uno::Reference<beans::XPropertySet> xPropertySet(rShapePair.second, uno::UNO_QUERY);
if (xPropertySet.is())
{
- xPropertySet->setPropertyValue("TextFitToSizeFontScale", uno::Any(fMinFontScale));
- xPropertySet->setPropertyValue("TextFitToSizeSpacingScale", uno::Any(fMinSpacingScale));
+ xPropertySet->setPropertyValue(u"TextFitToSizeFontScale"_ustr, uno::Any(fMinFontScale));
+ xPropertySet->setPropertyValue(u"TextFitToSizeSpacingScale"_ustr, uno::Any(fMinSpacingScale));
}
}
}
@@ -330,7 +330,7 @@ void loadDiagram( ShapePtr const & pShape,
importFragment(rFilter,
loadFragment(rFilter,xRefDataModel),
- "OOXData",
+ u"OOXData"_ustr,
pDiagram,
xRefDataModel);
@@ -368,7 +368,7 @@ void loadDiagram( ShapePtr const & pShape,
importFragment(rFilter,
loadFragment(rFilter,xRefLayout),
- "OOXLayout",
+ u"OOXLayout"_ustr,
pDiagram,
xRefLayout);
}
@@ -381,7 +381,7 @@ void loadDiagram( ShapePtr const & pShape,
importFragment(rFilter,
loadFragment(rFilter,xRefQStyle),
- "OOXStyle",
+ u"OOXStyle"_ustr,
pDiagram,
xRefQStyle);
}
@@ -390,8 +390,8 @@ void loadDiagram( ShapePtr const & pShape,
{
// We still want to add the XDocuments to the DiagramDomMap
DiagramDomMap& rMainDomMap = pDiagram->getDomMap();
- rMainDomMap[OUString("OOXLayout")] = loadFragment(rFilter,rLayoutPath);
- rMainDomMap[OUString("OOXStyle")] = loadFragment(rFilter,rQStylePath);
+ rMainDomMap[u"OOXLayout"_ustr] = loadFragment(rFilter,rLayoutPath);
+ rMainDomMap[u"OOXStyle"_ustr] = loadFragment(rFilter,rQStylePath);
}
// colors
@@ -402,14 +402,14 @@ void loadDiagram( ShapePtr const & pShape,
importFragment(rFilter,
loadFragment(rFilter,xRefColorStyle),
- "OOXColor",
+ u"OOXColor"_ustr,
pDiagram,
xRefColorStyle);
}
if( !pData->getExtDrawings().empty() )
{
- const DiagramColorMap::const_iterator aColor = pDiagram->getColors().find("node0");
+ const DiagramColorMap::const_iterator aColor = pDiagram->getColors().find(u"node0"_ustr);
if( aColor != pDiagram->getColors().end() && !aColor->second.maTextFillColors.empty())
{
// TODO(F1): well, actually, there might be *several* color
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 6ee4b88322d0..c59f87a6f94f 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -130,7 +130,7 @@ void SnakeAlg::layoutShapeChildren(const AlgAtom& rAlg, const ShapePtr& rShape,
double fSpaceFromConstraint = 1.0;
LayoutPropertyMap aPropertiesByName;
std::map<sal_Int32, LayoutProperty> aPropertiesByType;
- LayoutProperty& rParent = aPropertiesByName[""];
+ LayoutProperty& rParent = aPropertiesByName[u""_ustr];
rParent[XML_w] = fShapeWidth;
rParent[XML_h] = fShapeHeight;
for (const auto& rConstr : rConstraints)
@@ -551,7 +551,7 @@ void CompositeAlg::layoutShapeChildren(AlgAtom& rAlg, const ShapePtr& rShape,
const std::vector<Constraint>& rConstraints)
{
LayoutPropertyMap aProperties;
- LayoutProperty& rParent = aProperties[""];
+ LayoutProperty& rParent = aProperties[u""_ustr];
sal_Int32 nParentXOffset = 0;
@@ -1164,7 +1164,7 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector<Constraint>&
}
LayoutPropertyMap aProperties;
- LayoutProperty& rParent = aProperties[""];
+ LayoutProperty& rParent = aProperties[u""_ustr];
rParent[XML_w] = rShape->getSize().Width;
rParent[XML_h] = rShape->getSize().Height;
rParent[XML_l] = 0;
diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx
index 8424e3436c1a..83df8d59c57f 100644
--- a/oox/source/drawingml/effectproperties.cxx
+++ b/oox/source/drawingml/effectproperties.cxx
@@ -71,23 +71,23 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap,
// Default values of sx, sy should be 100000 in this case.
sal_Int32 nAttrBlur = 0;
- std::map< OUString, css::uno::Any >::const_iterator attribIt = it->maAttribs.find( "dir" );
+ std::map< OUString, css::uno::Any >::const_iterator attribIt = it->maAttribs.find( u"dir"_ustr );
if( attribIt != it->maAttribs.end() )
attribIt->second >>= nAttrDir;
- attribIt = it->maAttribs.find( "dist" );
+ attribIt = it->maAttribs.find( u"dist"_ustr );
if( attribIt != it->maAttribs.end() )
attribIt->second >>= nAttrDist;
- attribIt = it->maAttribs.find( "sx" );
+ attribIt = it->maAttribs.find( u"sx"_ustr );
if( attribIt != it->maAttribs.end() )
attribIt->second >>= nAttrSizeX;
- attribIt = it->maAttribs.find( "sy" );
+ attribIt = it->maAttribs.find( u"sy"_ustr );
if( attribIt != it->maAttribs.end() )
attribIt->second >>= nAttrSizeY;
- attribIt = it->maAttribs.find( "blurRad" );
+ attribIt = it->maAttribs.find( u"blurRad"_ustr );
if( attribIt != it->maAttribs.end() )
attribIt->second >>= nAttrBlur;
diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx
index bb81f5a720db..9e5fbd983689 100644
--- a/oox/source/drawingml/effectpropertiescontext.cxx
+++ b/oox/source/drawingml/effectpropertiescontext.cxx
@@ -37,37 +37,37 @@ EffectPropertiesContext::~EffectPropertiesContext()
void EffectPropertiesContext::saveUnsupportedAttribs( Effect& rEffect, const AttributeList& rAttribs )
{
if( rAttribs.hasAttribute( XML_algn ) )
- rEffect.maAttribs["algn"] <<= rAttribs.getStringDefaulted( XML_algn);
+ rEffect.maAttribs[u"algn"_ustr] <<= rAttribs.getStringDefaulted( XML_algn);
if( rAttribs.hasAttribute( XML_blurRad ) )
- rEffect.maAttribs["blurRad"] <<= rAttribs.getInteger( XML_blurRad, 0 );
+ rEffect.maAttribs[u"blurRad"_ustr] <<= rAttribs.getInteger( XML_blurRad, 0 );
if( rAttribs.hasAttribute( XML_dir ) )
- rEffect.maAttribs["dir"] <<= rAttribs.getInteger( XML_dir, 0 );
+ rEffect.maAttribs[u"dir"_ustr] <<= rAttribs.getInteger( XML_dir, 0 );
if( rAttribs.hasAttribute( XML_dist ) )
- rEffect.maAttribs["dist"] <<= rAttribs.getInteger( XML_dist, 0 );
+ rEffect.maAttribs[u"dist"_ustr] <<= rAttribs.getInteger( XML_dist, 0 );
if( rAttribs.hasAttribute( XML_kx ) )
- rEffect.maAttribs["kx"] <<= rAttribs.getInteger( XML_kx, 0 );
+ rEffect.maAttribs[u"kx"_ustr] <<= rAttribs.getInteger( XML_kx, 0 );
if( rAttribs.hasAttribute( XML_ky ) )
- rEffect.maAttribs["ky"] <<= rAttribs.getInteger( XML_ky, 0 );
+ rEffect.maAttribs[u"ky"_ustr] <<= rAttribs.getInteger( XML_ky, 0 );
if( rAttribs.hasAttribute( XML_rotWithShape ) )
- rEffect.maAttribs["rotWithShape"] <<= rAttribs.getInteger( XML_rotWithShape, 0 );
+ rEffect.maAttribs[u"rotWithShape"_ustr] <<= rAttribs.getInteger( XML_rotWithShape, 0 );
if( rAttribs.hasAttribute( XML_sx ) )
- rEffect.maAttribs["sx"] <<= rAttribs.getInteger( XML_sx, 0 );
+ rEffect.maAttribs[u"sx"_ustr] <<= rAttribs.getInteger( XML_sx, 0 );
if( rAttribs.hasAttribute( XML_sy ) )
- rEffect.maAttribs["sy"] <<= rAttribs.getInteger( XML_sy, 0 );
+ rEffect.maAttribs[u"sy"_ustr] <<= rAttribs.getInteger( XML_sy, 0 );
if( rAttribs.hasAttribute( XML_rad ) )
- rEffect.maAttribs["rad"] <<= rAttribs.getInteger( XML_rad, 0 );
+ rEffect.maAttribs[u"rad"_ustr] <<= rAttribs.getInteger( XML_rad, 0 );
if( rAttribs.hasAttribute( XML_endA ) )
- rEffect.maAttribs["endA"] <<= rAttribs.getInteger( XML_endA, 0 );
+ rEffect.maAttribs[u"endA"_ustr] <<= rAttribs.getInteger( XML_endA, 0 );
if( rAttribs.hasAttribute( XML_endPos ) )
- rEffect.maAttribs["endPos"] <<= rAttribs.getInteger( XML_endPos, 0 );
+ rEffect.maAttribs[u"endPos"_ustr] <<= rAttribs.getInteger( XML_endPos, 0 );
if( rAttribs.hasAttribute( XML_fadeDir ) )
- rEffect.maAttribs["fadeDir"] <<= rAttribs.getInteger( XML_fadeDir, 0 );
+ rEffect.maAttribs[u"fadeDir"_ustr] <<= rAttribs.getInteger( XML_fadeDir, 0 );
if( rAttribs.hasAttribute( XML_stA ) )
- rEffect.maAttribs["stA"] <<= rAttribs.getInteger( XML_stA, 0 );
+ rEffect.maAttribs[u"stA"_ustr] <<= rAttribs.getInteger( XML_stA, 0 );
if( rAttribs.hasAttribute( XML_stPos ) )
- rEffect.maAttribs["stPos"] <<= rAttribs.getInteger( XML_stPos, 0 );
+ rEffect.maAttribs[u"stPos"_ustr] <<= rAttribs.getInteger( XML_stPos, 0 );
if( rAttribs.hasAttribute( XML_grow ) )
- rEffect.maAttribs["grow"] <<= rAttribs.getInteger( XML_grow, 0 );
+ rEffect.maAttribs[u"grow"_ustr] <<= rAttribs.getInteger( XML_grow, 0 );
}
ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 73563c5c333a..f671eea2e043 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -308,12 +308,12 @@ awt::Size lclGetOriginalSize( const GraphicHelper& rGraphicHelper, const Referen
try
{
Reference< beans::XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW );
- if( xGraphicPropertySet->getPropertyValue( "Size100thMM" ) >>= aSizeHmm )
+ if( xGraphicPropertySet->getPropertyValue( u"Size100thMM"_ustr ) >>= aSizeHmm )
{
if( !aSizeHmm.Width && !aSizeHmm.Height )
{ // MAPMODE_PIXEL USED :-(
awt::Size aSourceSizePixel( 0, 0 );
- if( xGraphicPropertySet->getPropertyValue( "SizePixel" ) >>= aSourceSizePixel )
+ if( xGraphicPropertySet->getPropertyValue( u"SizePixel"_ustr ) >>= aSourceSizePixel )
aSizeHmm = rGraphicHelper.convertScreenPixelToHmm( aSourceSizePixel );
}
}
@@ -924,8 +924,8 @@ css::beans::PropertyValue ArtisticEffectProperties::getEffect()
if( mrOleObjectInfo.maEmbeddedData.hasElements() )
{
css::uno::Sequence< css::beans::PropertyValue > aGraphicSeq{
- comphelper::makePropertyValue("Id", mrOleObjectInfo.maProgId),
- comphelper::makePropertyValue("Data", mrOleObjectInfo.maEmbeddedData)
+ comphelper::makePropertyValue(u"Id"_ustr, mrOleObjectInfo.maProgId),
+ comphelper::makePropertyValue(u"Data"_ustr, mrOleObjectInfo.maEmbeddedData)
};
pSeq[i].Name = "OriginalGraphic";
@@ -952,53 +952,53 @@ OUString ArtisticEffectProperties::getEffectString( sal_Int32 nToken )
switch( nToken )
{
// effects
- case OOX_TOKEN( a14, artisticBlur ): return "artisticBlur";
- case OOX_TOKEN( a14, artisticCement ): return "artisticCement";
- case OOX_TOKEN( a14, artisticChalkSketch ): return "artisticChalkSketch";
- case OOX_TOKEN( a14, artisticCrisscrossEtching ): return "artisticCrisscrossEtching";
- case OOX_TOKEN( a14, artisticCutout ): return "artisticCutout";
- case OOX_TOKEN( a14, artisticFilmGrain ): return "artisticFilmGrain";
- case OOX_TOKEN( a14, artisticGlass ): return "artisticGlass";
- case OOX_TOKEN( a14, artisticGlowDiffused ): return "artisticGlowDiffused";
- case OOX_TOKEN( a14, artisticGlowEdges ): return "artisticGlowEdges";
- case OOX_TOKEN( a14, artisticLightScreen ): return "artisticLightScreen";
- case OOX_TOKEN( a14, artisticLineDrawing ): return "artisticLineDrawing";
- case OOX_TOKEN( a14, artisticMarker ): return "artisticMarker";
- case OOX_TOKEN( a14, artisticMosiaicBubbles ): return "artisticMosiaicBubbles";
- case OOX_TOKEN( a14, artisticPaintStrokes ): return "artisticPaintStrokes";
- case OOX_TOKEN( a14, artisticPaintBrush ): return "artisticPaintBrush";
- case OOX_TOKEN( a14, artisticPastelsSmooth ): return "artisticPastelsSmooth";
- case OOX_TOKEN( a14, artisticPencilGrayscale ): return "artisticPencilGrayscale";
- case OOX_TOKEN( a14, artisticPencilSketch ): return "artisticPencilSketch";
- case OOX_TOKEN( a14, artisticPhotocopy ): return "artisticPhotocopy";
- case OOX_TOKEN( a14, artisticPlasticWrap ): return "artisticPlasticWrap";
- case OOX_TOKEN( a14, artisticTexturizer ): return "artisticTexturizer";
- case OOX_TOKEN( a14, artisticWatercolorSponge ): return "artisticWatercolorSponge";
- case OOX_TOKEN( a14, brightnessContrast ): return "brightnessContrast";
- case OOX_TOKEN( a14, colorTemperature ): return "colorTemperature";
- case OOX_TOKEN( a14, saturation ): return "saturation";
- case OOX_TOKEN( a14, sharpenSoften ): return "sharpenSoften";
+ case OOX_TOKEN( a14, artisticBlur ): return u"artisticBlur"_ustr;
+ case OOX_TOKEN( a14, artisticCement ): return u"artisticCement"_ustr;
+ case OOX_TOKEN( a14, artisticChalkSketch ): return u"artisticChalkSketch"_ustr;
+ case OOX_TOKEN( a14, artisticCrisscrossEtching ): return u"artisticCrisscrossEtching"_ustr;
+ case OOX_TOKEN( a14, artisticCutout ): return u"artisticCutout"_ustr;
+ case OOX_TOKEN( a14, artisticFilmGrain ): return u"artisticFilmGrain"_ustr;
+ case OOX_TOKEN( a14, artisticGlass ): return u"artisticGlass"_ustr;
+ case OOX_TOKEN( a14, artisticGlowDiffused ): return u"artisticGlowDiffused"_ustr;
+ case OOX_TOKEN( a14, artisticGlowEdges ): return u"artisticGlowEdges"_ustr;
+ case OOX_TOKEN( a14, artisticLightScreen ): return u"artisticLightScreen"_ustr;
+ case OOX_TOKEN( a14, artisticLineDrawing ): return u"artisticLineDrawing"_ustr;
+ case OOX_TOKEN( a14, artisticMarker ): return u"artisticMarker"_ustr;
+ case OOX_TOKEN( a14, artisticMosiaicBubbles ): return u"artisticMosiaicBubbles"_ustr;
+ case OOX_TOKEN( a14, artisticPaintStrokes ): return u"artisticPaintStrokes"_ustr;
+ case OOX_TOKEN( a14, artisticPaintBrush ): return u"artisticPaintBrush"_ustr;
+ case OOX_TOKEN( a14, artisticPastelsSmooth ): return u"artisticPastelsSmooth"_ustr;
+ case OOX_TOKEN( a14, artisticPencilGrayscale ): return u"artisticPencilGrayscale"_ustr;
+ case OOX_TOKEN( a14, artisticPencilSketch ): return u"artisticPencilSketch"_ustr;
+ case OOX_TOKEN( a14, artisticPhotocopy ): return u"artisticPhotocopy"_ustr;
+ case OOX_TOKEN( a14, artisticPlasticWrap ): return u"artisticPlasticWrap"_ustr;
+ case OOX_TOKEN( a14, artisticTexturizer ): return u"artisticTexturizer"_ustr;
+ case OOX_TOKEN( a14, artisticWatercolorSponge ): return u"artisticWatercolorSponge"_ustr;
+ case OOX_TOKEN( a14, brightnessContrast ): return u"brightnessContrast"_ustr;
+ case OOX_TOKEN( a14, colorTemperature ): return u"colorTemperature"_ustr;
+ case OOX_TOKEN( a14, saturation ): return u"saturation"_ustr;
+ case OOX_TOKEN( a14, sharpenSoften ): return u"sharpenSoften"_ustr;
// attributes
- case XML_visible: return "visible";
- case XML_trans: return "trans";
- case XML_crackSpacing: return "crackSpacing";
- case XML_pressure: return "pressure";
- case XML_numberOfShades: return "numberOfShades";
- case XML_grainSize: return "grainSize";
- case XML_intensity: return "intensity";
- case XML_smoothness: return "smoothness";
- case XML_gridSize: return "gridSize";
- case XML_pencilSize: return "pencilSize";
- case XML_size: return "size";
- case XML_brushSize: return "brushSize";
- case XML_scaling: return "scaling";
- case XML_detail: return "detail";
- case XML_bright: return "bright";
- case XML_contrast: return "contrast";
- case XML_colorTemp: return "colorTemp";
- case XML_sat: return "sat";
- case XML_amount: return "amount";
+ case XML_visible: return u"visible"_ustr;
+ case XML_trans: return u"trans"_ustr;
+ case XML_crackSpacing: return u"crackSpacing"_ustr;
+ case XML_pressure: return u"pressure"_ustr;
+ case XML_numberOfShades: return u"numberOfShades"_ustr;
+ case XML_grainSize: return u"grainSize"_ustr;
+ case XML_intensity: return u"intensity"_ustr;
+ case XML_smoothness: return u"smoothness"_ustr;
+ case XML_gridSize: return u"gridSize"_ustr;
+ case XML_pencilSize: return u"pencilSize"_ustr;
+ case XML_size: return u"size"_ustr;
+ case XML_brushSize: return u"brushSize"_ustr;
+ case XML_scaling: return u"scaling"_ustr;
+ case XML_detail: return u"detail"_ustr;
+ case XML_bright: return u"bright"_ustr;
+ case XML_contrast: return u"contrast"_ustr;
+ case XML_colorTemp: return u"colorTemp"_ustr;
+ case XML_sat: return u"sat"_ustr;
+ case XML_amount: return u"amount"_ustr;
}
SAL_WARN( "oox.drawingml", "ArtisticEffectProperties::getEffectString: unexpected token " << nToken );
return OUString();
diff --git a/oox/source/drawingml/fontworkhelpers.cxx b/oox/source/drawingml/fontworkhelpers.cxx
index a72534fd53b2..d9fa4fb8d4d6 100644
--- a/oox/source/drawingml/fontworkhelpers.cxx
+++ b/oox/source/drawingml/fontworkhelpers.cxx
@@ -150,8 +150,8 @@ void FontworkHelpers::putCustomShapeIntoTextPathMode(
// Set attributes in CustomShapeGeometry
xDefaulter->createCustomShapeDefaults(sFontworkType);
- 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);
@@ -1102,25 +1102,25 @@ void lcl_addColorTransformationToGrabBagStack(const model::ComplexColor& rComple
switch (rColorTransform.meType)
{
case model::TransformationType::LumMod:
- pGrabBagStack->push("lumMod");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addInt32("val", rColorTransform.mnValue * 10);
+ pGrabBagStack->push(u"lumMod"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addInt32(u"val"_ustr, rColorTransform.mnValue * 10);
pGrabBagStack->pop();
pGrabBagStack->pop();
break;
case model::TransformationType::LumOff:
- pGrabBagStack->push("lumOff");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addInt32("val", rColorTransform.mnValue * 10);
+ pGrabBagStack->push(u"lumOff"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addInt32(u"val"_ustr, rColorTransform.mnValue * 10);
pGrabBagStack->pop();
pGrabBagStack->pop();
break;
case model::TransformationType::Alpha:
- pGrabBagStack->push("alpha");
- pGrabBagStack->push("attributes");
+ pGrabBagStack->push(u"alpha"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
// model::TransformationType::Alpha is designed to be used with a:alpha, which has
// opacity. But w14:alpha uses transparency. So convert it here.
- pGrabBagStack->addInt32("val",
+ pGrabBagStack->addInt32(u"val"_ustr,
oox::drawingml::MAX_PERCENT - rColorTransform.mnValue * 10);
pGrabBagStack->pop();
pGrabBagStack->pop();
@@ -1185,7 +1185,7 @@ ColorMapType lcl_createColorMapFromShapeProps(
else
{
sal_Int32 nFillColor(0);
- if (rXPropSetInfo->hasPropertyByName("FillColor"))
+ if (rXPropSetInfo->hasPropertyByName(u"FillColor"_ustr))
rXPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
aSingleColor = ::Color(ColorTransparency, nFillColor).getBColor().clamp();
}
@@ -1222,8 +1222,8 @@ ColorMapType lcl_createColorMapFromShapeProps(
// it instead of the color from the color stop.
GradientStopColor aFixColor;
bool bUseThemeColor(!rbHasColorGradient
- && FontworkHelpers::getThemeColorFromShape("FillComplexColor", rXPropSet,
- aFixColor.TTColor));
+ && FontworkHelpers::getThemeColorFromShape(u"FillComplexColor"_ustr,
+ rXPropSet, aFixColor.TTColor));
for (auto itC = aColorStops.begin(), itT = aTransStops.begin();
itC != aColorStops.end() && itT != aTransStops.end(); ++itC, ++itT)
@@ -1269,7 +1269,7 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
std::unique_ptr<oox::GrabBagStack> pGrabBagStack;
// CharTextFillTextEffect
- pGrabBagStack.reset(new oox::GrabBagStack("textFill"));
+ pGrabBagStack.reset(new oox::GrabBagStack(u"textFill"_ustr));
drawing::FillStyle eFillStyle = drawing::FillStyle_SOLID;
if (xPropSetInfo->hasPropertyByName(u"FillStyle"_ustr))
rXPropSet->getPropertyValue(u"FillStyle"_ustr) >>= eFillStyle;
@@ -1289,7 +1289,7 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
{
case drawing::FillStyle_NONE:
{
- pGrabBagStack->appendElement("noFill", uno::Any());
+ pGrabBagStack->appendElement(u"noFill"_ustr, uno::Any());
break;
}
case drawing::FillStyle_GRADIENT:
@@ -1304,27 +1304,27 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
ColorMapType aColorMap = lcl_createColorMapFromShapeProps(
rXPropSet, xPropSetInfo, aColorGradient, bHasColorGradient, aTransparenceGradient,
bHasTransparenceGradient);
- pGrabBagStack->push("gradFill");
- pGrabBagStack->push("gsLst");
+ pGrabBagStack->push(u"gradFill"_ustr);
+ pGrabBagStack->push(u"gsLst"_ustr);
for (auto it = aColorMap.begin(); it != aColorMap.end(); ++it)
{
- pGrabBagStack->push("gs");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addInt32("pos", (*it).first);
+ pGrabBagStack->push(u"gs"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addInt32(u"pos"_ustr, (*it).first);
pGrabBagStack->pop();
if ((*it).second.TTColor.getThemeColorType() == model::ThemeColorType::Unknown)
{
- pGrabBagStack->push("srgbClr");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addString("val", (*it).second.RGBColor.AsRGBHexString());
+ pGrabBagStack->push(u"srgbClr"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addString(u"val"_ustr, (*it).second.RGBColor.AsRGBHexString());
pGrabBagStack->pop(); // maCurrentElement:'srgbClr', maPropertyList:'attributes'
}
else
{
- pGrabBagStack->push("schemeClr");
- pGrabBagStack->push("attributes");
+ pGrabBagStack->push(u"schemeClr"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
pGrabBagStack->addString(
- "val", lcl_getW14MarkupStringForThemeColor((*it).second.TTColor));
+ u"val"_ustr, lcl_getW14MarkupStringForThemeColor((*it).second.TTColor));
pGrabBagStack->pop();
// maCurrentElement:'schemeClr', maPropertyList:'attributes'
}
@@ -1354,11 +1354,11 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
nAngleOOX = ((3600 - aColorGradient.Angle + 900) % 3600) * 6000;
else if (bHasTransparenceGradient)
nAngleOOX = ((3600 - aTransparenceGradient.Angle + 900) % 3600) * 6000;
- pGrabBagStack->push("lin");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addInt32("ang", nAngleOOX);
+ pGrabBagStack->push(u"lin"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addInt32(u"ang"_ustr, nAngleOOX);
// LibreOffice cannot scale a gradient to the shape size.
- pGrabBagStack->addString("scaled", "0");
+ pGrabBagStack->addString(u"scaled"_ustr, u"0"_ustr);
}
else
{
@@ -1367,39 +1367,40 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
// (2) To get the same size of gradient area, the element 'tileRect' is needed, but
// that is not available for <w14:textFill> element.
// So we can only set a reasonably suitable focus point.
- pGrabBagStack->push("path");
- pGrabBagStack->push("attributes");
+ pGrabBagStack->push(u"path"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
if (eGradientStyle == awt::GradientStyle_RADIAL
|| eGradientStyle == awt::GradientStyle_ELLIPTICAL)
- pGrabBagStack->addString("path", "circle");
+ pGrabBagStack->addString(u"path"_ustr, u"circle"_ustr);
else
- pGrabBagStack->addString("path", "rect");
+ pGrabBagStack->addString(u"path"_ustr, u"rect"_ustr);
pGrabBagStack->pop();
- pGrabBagStack->push("fillToRect");
- pGrabBagStack->push("attributes");
+ pGrabBagStack->push(u"fillToRect"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
sal_Int32 nLeftPercent
= bHasColorGradient ? aColorGradient.XOffset : aTransparenceGradient.XOffset;
sal_Int32 nTopPercent
= bHasColorGradient ? aColorGradient.YOffset : aTransparenceGradient.YOffset;
- pGrabBagStack->addInt32("l", nLeftPercent * 1000);
- pGrabBagStack->addInt32("t", nTopPercent * 1000);
- pGrabBagStack->addInt32("r", (100 - nLeftPercent) * 1000);
- pGrabBagStack->addInt32("b", (100 - nTopPercent) * 1000);
+ pGrabBagStack->addInt32(u"l"_ustr, nLeftPercent * 1000);
+ pGrabBagStack->addInt32(u"t"_ustr, nTopPercent * 1000);
+ pGrabBagStack->addInt32(u"r"_ustr, (100 - nLeftPercent) * 1000);
+ pGrabBagStack->addInt32(u"b"_ustr, (100 - nTopPercent) * 1000);
}
// all remaining pop() calls are in the final getRootProperty() method
break;
}
case drawing::FillStyle_SOLID:
{
- pGrabBagStack->push("solidFill");
+ pGrabBagStack->push(u"solidFill"_ustr);
model::ComplexColor aComplexColor;
// It is either "schemeClr" or "srgbClr".
- if (FontworkHelpers::getThemeColorFromShape("FillComplexColor", rXPropSet,
+ if (FontworkHelpers::getThemeColorFromShape(u"FillComplexColor"_ustr, rXPropSet,
aComplexColor))
{
- pGrabBagStack->push("schemeClr");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addString("val", lcl_getW14MarkupStringForThemeColor(aComplexColor));
+ pGrabBagStack->push(u"schemeClr"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addString(u"val"_ustr,
+ lcl_getW14MarkupStringForThemeColor(aComplexColor));
pGrabBagStack->pop(); // maCurrentElement:'schemeClr', maPropertyList:'attributes'
lcl_addColorTransformationToGrabBagStack(aComplexColor, pGrabBagStack);
// maCurrentElement:'schemeClr', maPropertyList:'attributes', maybe 'lumMod' and
@@ -1407,13 +1408,13 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
}
else
{
- pGrabBagStack->push("srgbClr");
+ pGrabBagStack->push(u"srgbClr"_ustr);
sal_Int32 nFillColor(0);
if (xPropSetInfo->hasPropertyByName(u"FillColor"_ustr))
rXPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor;
- pGrabBagStack->push("attributes");
+ pGrabBagStack->push(u"attributes"_ustr);
::Color aColor(ColorTransparency, nFillColor);
- pGrabBagStack->addString("val", aColor.AsRGBHexString());
+ pGrabBagStack->addString(u"val"_ustr, aColor.AsRGBHexString());
pGrabBagStack->pop();
// maCurrentElement:'srgbClr', maPropertyList:'attributes'
}
@@ -1423,9 +1424,9 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
rXPropSet->getPropertyValue(u"FillTransparence"_ustr) >>= nFillTransparence;
if (nFillTransparence != 0)
{
- pGrabBagStack->push("alpha");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addInt32("val", nFillTransparence * 1000);
+ pGrabBagStack->push(u"alpha"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addInt32(u"val"_ustr, nFillTransparence * 1000);
}
// all remaining pop() calls are in the final getRootProperty() method
break;
@@ -1441,15 +1442,15 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
rUpdatePropVec.push_back(aCharTextFillTextEffect);
// CharTextOutlineTextEffect
- pGrabBagStack.reset(new oox::GrabBagStack("textOutline"));
+ pGrabBagStack.reset(new oox::GrabBagStack(u"textOutline"_ustr));
// attributes
- pGrabBagStack->push("attributes");
+ pGrabBagStack->push(u"attributes"_ustr);
// line width
sal_Int32 nLineWidth(0);
if (xPropSetInfo->hasPropertyByName(u"LineWidth"_ustr))
rXPropSet->getPropertyValue(u"LineWidth"_ustr) >>= nLineWidth;
- pGrabBagStack->addInt32("w", nLineWidth * 360);
+ pGrabBagStack->addInt32(u"w"_ustr, nLineWidth * 360);
// cap for dashes
drawing::LineCap eLineCap = drawing::LineCap_BUTT;
if (xPropSetInfo->hasPropertyByName(u"LineCap"_ustr))
@@ -1459,10 +1460,10 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
sCap = u"rnd"_ustr;
else if (eLineCap == drawing::LineCap_SQUARE)
sCap = u"sq"_ustr;
- pGrabBagStack->addString("cap", sCap);
+ pGrabBagStack->addString(u"cap"_ustr, sCap);
// LO has no compound lines and always centers the lines
- pGrabBagStack->addString("cmpd", u"sng"_ustr);
- pGrabBagStack->addString("alng", u"ctr"_ustr);
+ pGrabBagStack->addString(u"cmpd"_ustr, u"sng"_ustr);
+ pGrabBagStack->addString(u"alng"_ustr, u"ctr"_ustr);
pGrabBagStack->pop();
// maCurrentElement:'textOutline', maPropertyList:'attributes'
@@ -1474,31 +1475,33 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
// implemented in LO. So only 'noFill' and 'solidFill'.
if (eLineStyle == drawing::LineStyle_NONE)
{
- pGrabBagStack->appendElement("noFill", uno::Any());
+ pGrabBagStack->appendElement(u"noFill"_ustr, uno::Any());
}
else
{
- pGrabBagStack->push("solidFill");
+ pGrabBagStack->push(u"solidFill"_ustr);
// It is either "schemeClr" or "srgbClr".
model::ComplexColor aComplexColor;
- if (FontworkHelpers::getThemeColorFromShape("LineComplexColor", rXPropSet, aComplexColor))
+ if (FontworkHelpers::getThemeColorFromShape(u"LineComplexColor"_ustr, rXPropSet,
+ aComplexColor))
{
- pGrabBagStack->push("schemeClr");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addString("val", lcl_getW14MarkupStringForThemeColor(aComplexColor));
+ pGrabBagStack->push(u"schemeClr"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addString(u"val"_ustr,
+ lcl_getW14MarkupStringForThemeColor(aComplexColor));
pGrabBagStack->pop();
lcl_addColorTransformationToGrabBagStack(aComplexColor, pGrabBagStack);
// maCurrentElement:'schemeClr', maPropertylist:'attributes'
}
else // not a theme color
{
- pGrabBagStack->push("srgbClr");
- pGrabBagStack->push("attributes");
+ pGrabBagStack->push(u"srgbClr"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
sal_Int32 nLineColor(0);
if (xPropSetInfo->hasPropertyByName(u"LineColor"_ustr))
rXPropSet->getPropertyValue(u"LineColor"_ustr) >>= nLineColor;
::Color aColor(ColorTransparency, nLineColor);
- pGrabBagStack->addString("val", aColor.AsRGBHexString());
+ pGrabBagStack->addString(u"val"_ustr, aColor.AsRGBHexString());
pGrabBagStack->pop();
// maCurrentElement:'srgbClr', maPropertylist:'attributes'
}
@@ -1508,9 +1511,9 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
rXPropSet->getPropertyValue(u"LineTransparence"_ustr) >>= nLineTransparence;
if (nLineTransparence != 0)
{
- pGrabBagStack->push("alpha");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addInt32("val", nLineTransparence * 1000);
+ pGrabBagStack->push(u"alpha"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addInt32(u"val"_ustr, nLineTransparence * 1000);
pGrabBagStack->pop(); // maCurrentElement: 'alpha'
pGrabBagStack->pop(); // maCurrentElement: 'srgbClr' or 'schemeClr'
}
@@ -1523,7 +1526,7 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
// prstDash
if (eLineStyle == drawing::LineStyle_DASH)
{
- pGrabBagStack->push("prstDash");
+ pGrabBagStack->push(u"prstDash"_ustr);
OUString sPrstDash = u"sysDot"_ustr;
drawing::LineDash aLineDash;
if (xPropSetInfo->hasPropertyByName(u"LineDash"_ustr)
@@ -1538,8 +1541,8 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
// ToDo: There may be a named dash style, but that is unlikely for Fontwork shapes. So
// I skip it for now and use the "sysDot" fallback.
}
- pGrabBagStack->push("attributes");
- pGrabBagStack->addString("val", sPrstDash);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addString(u"val"_ustr, sPrstDash);
pGrabBagStack->pop(); // maCurrentElement:'prstDash'
pGrabBagStack->pop(); // maCurrentElement:'textOutline'
}
@@ -1551,14 +1554,14 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
if (xPropSetInfo->hasPropertyByName(u"LineJoint"_ustr))
rXPropSet->getPropertyValue(u"LineJoint"_ustr) >>= eLineJoint;
if (eLineJoint == drawing::LineJoint_NONE || eLineJoint == drawing::LineJoint_BEVEL)
- pGrabBagStack->appendElement("bevel", uno::Any());
+ pGrabBagStack->appendElement(u"bevel"_ustr, uno::Any());
else if (eLineJoint == drawing::LineJoint_ROUND)
- pGrabBagStack->appendElement("round", uno::Any());
+ pGrabBagStack->appendElement(u"round"_ustr, uno::Any());
else // MITER or deprecated MIDDLE
{
- pGrabBagStack->push("miter");
- pGrabBagStack->push("attributes");
- pGrabBagStack->addInt32("lim", 0); // As of Feb. 2023 LO cannot render other values.
+ pGrabBagStack->push(u"miter"_ustr);
+ pGrabBagStack->push(u"attributes"_ustr);
+ pGrabBagStack->addInt32(u"lim"_ustr, 0); // As of Feb. 2023 LO cannot render other values.
pGrabBagStack->pop(); // maCurrentElement:'attributes'
pGrabBagStack->pop(); // maCurrentElement:'miter'
}
@@ -1575,7 +1578,7 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
// used for <w:color> element. That is evaluated by applications, which do not understand w14
// namespace, or if w14:textFill is omitted.
model::ComplexColor aComplexColor;
- if (FontworkHelpers::getThemeColorFromShape("FillComplexColor", rXPropSet, aComplexColor))
+ if (FontworkHelpers::getThemeColorFromShape(u"FillComplexColor"_ustr, rXPropSet, aComplexColor))
{
// CharThemeColor
beans::PropertyValue aCharThemeColor;
@@ -1653,14 +1656,15 @@ void FontworkHelpers::applyUpdatesToCharInteropGrabBag(
// Now apply the updates to the CharInteropGrabBag of this run
uno::Sequence<beans::PropertyValue> aCharInteropGrabBagSeq;
- if (xRunPropSetInfo->hasPropertyByName("CharInteropGrabBag"))
- xRunPropSet->getPropertyValue("CharInteropGrabBag") >>= aCharInteropGrabBagSeq;
+ if (xRunPropSetInfo->hasPropertyByName(u"CharInteropGrabBag"_ustr))
+ xRunPropSet->getPropertyValue(u"CharInteropGrabBag"_ustr)
+ >>= aCharInteropGrabBagSeq;
comphelper::SequenceAsHashMap aGrabBagMap(aCharInteropGrabBagSeq);
for (const auto& rProp : rUpdatePropVec)
{
aGrabBagMap[rProp.Name] = rProp.Value; // [] inserts if not exists
}
- xRunPropSet->setPropertyValue("CharInteropGrabBag",
+ xRunPropSet->setPropertyValue(u"CharInteropGrabBag"_ustr,
uno::Any(aGrabBagMap.getAsConstPropertyValueList()));
}
}
diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx
index 511f9295f7fd..9207c6244e9c 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -118,7 +118,7 @@ ContextHandlerRef GraphicShapeContext::onCreateContext( sal_Int32 aElementToken,
if ((getNamespace( aElementToken ) == NMSP_vml) && mpShapePtr)
{
- mpShapePtr->setServiceName("com.sun.star.drawing.CustomShape");
+ mpShapePtr->setServiceName(u"com.sun.star.drawing.CustomShape"_ustr);
CustomShapePropertiesPtr pCstmShpProps
(mpShapePtr->getCustomShapeProperties());
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 5b2109ca2d88..a32553c767a5 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -414,9 +414,9 @@ void Shape::addShape(
const Reference<css::drawing::XShape>& xBgShape = pBgShape->getXShape();
Reference<XPropertySet> xBgProps(xBgShape, uno::UNO_QUERY);
drawing::FillStyle eFillStyle = drawing::FillStyle_NONE;
- xBgProps->getPropertyValue("FillStyle") >>= eFillStyle;
+ xBgProps->getPropertyValue(u"FillStyle"_ustr) >>= eFillStyle;
drawing::LineStyle eLineStyle = drawing::LineStyle_NONE;
- xBgProps->getPropertyValue("LineStyle") >>= eLineStyle;
+ xBgProps->getPropertyValue(u"LineStyle"_ustr) >>= eLineStyle;
if (eFillStyle == drawing::FillStyle_NONE
&& eLineStyle == drawing::LineStyle_NONE)
{
@@ -815,7 +815,7 @@ static void lcl_copyCharPropsToShape(const uno::Reference<drawing::XShape>& xSha
ParagraphAdjust eAdjust = ParagraphAdjust_LEFT;
if (pParagraph->getProperties().getParaAdjust())
eAdjust = *pParagraph->getProperties().getParaAdjust();
- xSet->setPropertyValue("ParaAdjust", uno::Any(eAdjust));
+ xSet->setPropertyValue(u"ParaAdjust"_ustr, uno::Any(eAdjust));
SdrObject* pShape = SdrObject::getSdrObjectFromXShape(xShape);
assert(pShape);
SdrTextHorzAdjust eHorzAdjust = lcl_convertAdjust(eAdjust);
@@ -960,7 +960,7 @@ Reference< XShape > const & Shape::createAndInsert(
else if (rServiceName == "com.sun.star.drawing.GraphicObjectShape" &&
mpGraphicPropertiesPtr && !mpGraphicPropertiesPtr->m_sMediaPackageURL.isEmpty())
{
- aServiceName = finalizeServiceName( rFilterBase, "com.sun.star.presentation.MediaShape", aShapeRectHmm );
+ aServiceName = finalizeServiceName( rFilterBase, u"com.sun.star.presentation.MediaShape"_ustr, aShapeRectHmm );
bIsEmbMedia = true;
}
else
@@ -1245,17 +1245,17 @@ Reference< XShape > const & Shape::createAndInsert(
}
if( !msDescription.isEmpty() )
{
- xSet->setPropertyValue( "Description", Any( msDescription ) );
+ xSet->setPropertyValue( u"Description"_ustr, Any( msDescription ) );
}
if (m_isDecorative)
{
- xSet->setPropertyValue("Decorative", Any(m_isDecorative));
+ xSet->setPropertyValue(u"Decorative"_ustr, Any(m_isDecorative));
}
// set the placeholder height to "0" if it has the 'TextAutoGrowHeight' property
// the placeholder height is set later to the correct size.
bool bAutoGrowHeight = false;
- xSet->getPropertyValue("TextAutoGrowHeight") >>= bAutoGrowHeight;
+ xSet->getPropertyValue(u"TextAutoGrowHeight"_ustr) >>= bAutoGrowHeight;
if (bAutoGrowHeight && mxShape->getShapeType().startsWith("com.sun.star.presentation."))
{
awt::Size aSize(mxShape->getSize().Width, 0);
@@ -1268,15 +1268,15 @@ Reference< XShape > const & Shape::createAndInsert(
if ( mbHidden || mbHiddenMasterShape )
{
SAL_INFO("oox.drawingml", "Shape::createAndInsert: invisible shape with id='" << msId << "'");
- xSet->setPropertyValue( "Visible", Any( false ) );
+ xSet->setPropertyValue( u"Visible"_ustr, Any( false ) );
// In Excel hidden means not printed, let's use visibility for now until that's handled separately
- xSet->setPropertyValue( "Printable", Any( false ) );
+ xSet->setPropertyValue( u"Printable"_ustr, Any( false ) );
}
if (mbLocked)
{
- xSet->setPropertyValue("MoveProtect", Any(true));
- xSet->setPropertyValue("SizeProtect", Any(true));
+ xSet->setPropertyValue(u"MoveProtect"_ustr, Any(true));
+ xSet->setPropertyValue(u"SizeProtect"_ustr, Any(true));
}
ActionLockGuard const alg(mxShape);
@@ -1287,7 +1287,7 @@ Reference< XShape > const & Shape::createAndInsert(
uno::Reference< text::XText > xText( mxShape, uno::UNO_QUERY );
if ( xText.is() )
{
- xText->setString( "" );
+ xText->setString( u""_ustr );
}
}
@@ -1297,9 +1297,9 @@ Reference< XShape > const & Shape::createAndInsert(
// the shape first, and it can be read only after the shape is
// inserted into the document, so delay the actual import until here
SvGlobalName name(SO3_SM_CLASSID);
- xSet->setPropertyValue("CLSID", uno::Any(name.GetHexName()));
+ xSet->setPropertyValue(u"CLSID"_ustr, uno::Any(name.GetHexName()));
uno::Reference<embed::XEmbeddedObject> const xObj(
- xSet->getPropertyValue("EmbeddedObject"), uno::UNO_QUERY);
+ xSet->getPropertyValue(u"EmbeddedObject"_ustr), uno::UNO_QUERY);
if (xObj.is())
{
uno::Reference<uno::XInterface> const xMathModel(xObj->getComponent());
@@ -1321,7 +1321,7 @@ Reference< XShape > const & Shape::createAndInsert(
// dmapper needs the original rotation angle for calculating square wrap. This angle is not
// available as property there, so store it in InteropGrabBag.
- putPropertyToGrabBag("mso-rotation-angle", Any(mnRotation));
+ putPropertyToGrabBag(u"mso-rotation-angle"_ustr, Any(mnRotation));
if( pTheme )
{
@@ -1346,7 +1346,7 @@ Reference< XShape > const & Shape::createAndInsert(
{"LineWidth", uno::Any(aLineProperties.getLineWidth())},
{"Transformations", uno::Any(pLineRef->maPhClr.getTransformations())}
});
- putPropertyToGrabBag( "StyleLnRef", Any( aProperties ) );
+ putPropertyToGrabBag( u"StyleLnRef"_ustr, Any( aProperties ) );
}
if( const ShapeStyleRef* pFillRef = getShapeStyleRef( XML_fillRef ) )
{
@@ -1367,7 +1367,7 @@ Reference< XShape > const & Shape::createAndInsert(
{"Transformations", uno::Any(pFillRef->maPhClr.getTransformations())}
});
- putPropertyToGrabBag( "StyleFillRef", Any( aProperties ) );
+ putPropertyToGrabBag( u"StyleFillRef"_ustr, Any( aProperties ) );
}
}
if( const ShapeStyleRef* pEffectRef = getShapeStyleRef( XML_effectRef ) )
@@ -1382,7 +1382,7 @@ Reference< XShape > const & Shape::createAndInsert(
{"Idx", uno::Any(pEffectRef->mnThemedIdx)},
{"Transformations", uno::Any(pEffectRef->maPhClr.getTransformations())}
});
- putPropertyToGrabBag( "StyleEffectRef", Any( aProperties ) );
+ putPropertyToGrabBag( u"StyleEffectRef"_ustr, Any( aProperties ) );
}
}
ShapePropertyMap aShapeProps( rFilterBase.getModelObjectHelper() );
@@ -1515,13 +1515,13 @@ Reference< XShape > const & Shape::createAndInsert(
{
uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag;
- propertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag;
+ propertySet->getPropertyValue(u"FrameInteropGrabBag"_ustr) >>= aGrabBag;
sal_Int32 length = aGrabBag.getLength();
aGrabBag.realloc( length+1);
auto pGrabBag = aGrabBag.getArray();
pGrabBag[length].Name = "mso-orig-shape-type";
pGrabBag[length].Value <<= mpCustomShapePropertiesPtr->getShapePresetTypeName();
- propertySet->setPropertyValue("FrameInteropGrabBag",uno::Any(aGrabBag));
+ propertySet->setPropertyValue(u"FrameInteropGrabBag"_ustr,uno::Any(aGrabBag));
}
//If the text box has links then save the link information so that
//it can be accessed in DomainMapper_Impl.cxx while chaining the text frames.
@@ -1529,7 +1529,7 @@ Reference< XShape > const & Shape::createAndInsert(
{
uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag;
- propertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag;
+ propertySet->getPropertyValue(u"FrameInteropGrabBag"_ustr) >>= aGrabBag;
sal_Int32 length = aGrabBag.getLength();
aGrabBag.realloc( length + 3 );
auto pGrabBag = aGrabBag.getArray();
@@ -1539,7 +1539,7 @@ Reference< XShape > const & Shape::createAndInsert(
pGrabBag[length + 1 ].Value <<= getLinkedTxbxAttributes().id;
pGrabBag[length + 2 ].Name = "Txbx-Seq";
pGrabBag[length + 2 ].Value <<= getLinkedTxbxAttributes().seq;
- propertySet->setPropertyValue("FrameInteropGrabBag",uno::Any(aGrabBag));
+ propertySet->setPropertyValue(u"FrameInteropGrabBag"_ustr,uno::Any(aGrabBag));
}
// TextFrames have BackColor, not FillColor
@@ -1593,7 +1593,7 @@ Reference< XShape > const & Shape::createAndInsert(
static constexpr OUString aGrabBagPropName = u"FrameInteropGrabBag"_ustr;
uno::Sequence<beans::PropertyValue> aGrabBag;
xPropertySet->getPropertyValue(aGrabBagPropName) >>= aGrabBag;
- beans::PropertyValue aPair(comphelper::makePropertyValue("mso-rotation-angle",
+ beans::PropertyValue aPair(comphelper::makePropertyValue(u"mso-rotation-angle"_ustr,
mnRotation));
if (aGrabBag.hasElements())
{
@@ -1669,7 +1669,7 @@ Reference< XShape > const & Shape::createAndInsert(
{
uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag;
- propertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ propertySet->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag;
sal_Int32 length = aGrabBag.getLength();
aGrabBag.realloc( length + 3 );
auto pGrabBag = aGrabBag.getArray();
@@ -1679,7 +1679,7 @@ Reference< XShape > const & Shape::createAndInsert(
pGrabBag[length + 1 ].Value <<= getLinkedTxbxAttributes().id;
pGrabBag[length + 2 ].Name = "Txbx-Seq";
pGrabBag[length + 2 ].Value <<= getLinkedTxbxAttributes().seq;
- propertySet->setPropertyValue("InteropGrabBag",uno::Any(aGrabBag));
+ propertySet->setPropertyValue(u"InteropGrabBag"_ustr,uno::Any(aGrabBag));
}
PropertySet( xSet ).setProperties( aShapeProps );
@@ -1702,7 +1702,7 @@ Reference< XShape > const & Shape::createAndInsert(
if (mbLockedCanvas)
{
- putPropertyToGrabBag( "LockedCanvas", Any( true ) );
+ putPropertyToGrabBag( u"LockedCanvas"_ustr, Any( true ) );
if (aServiceName == "com.sun.star.drawing.LineShape")
{
// It seems the position and size for lines inside a locked canvas is absolute.
@@ -1713,30 +1713,30 @@ Reference< XShape > const & Shape::createAndInsert(
if (mbWordprocessingCanvas)
{
- putPropertyToGrabBag("WordprocessingCanvas", Any(true));
+ putPropertyToGrabBag(u"WordprocessingCanvas"_ustr, Any(true));
}
// Store original fill and line colors of the shape and the theme color name to InteropGrabBag
std::vector<beans::PropertyValue> aProperties
{
- comphelper::makePropertyValue("EmuLineWidth", aLineProperties.moLineWidth.value_or(0)),
- comphelper::makePropertyValue("OriginalSolidFillClr", aShapeProps.getProperty(PROP_FillColor)),
- comphelper::makePropertyValue("OriginalLnSolidFillClr", aShapeProps.getProperty(PROP_LineColor))
+ comphelper::makePropertyValue(u"EmuLineWidth"_ustr, aLineProperties.moLineWidth.value_or(0)),
+ comphelper::makePropertyValue(u"OriginalSolidFillClr"_ustr, aShapeProps.getProperty(PROP_FillColor)),
+ comphelper::makePropertyValue(u"OriginalLnSolidFillClr"_ustr, aShapeProps.getProperty(PROP_LineColor))
};
OUString sColorFillScheme = aFillProperties.maFillColor.getSchemeColorName();
if( !aFillProperties.maFillColor.isPlaceHolder() && !sColorFillScheme.isEmpty() )
{
- aProperties.push_back(comphelper::makePropertyValue("SpPrSolidFillSchemeClr", sColorFillScheme));
- aProperties.push_back(comphelper::makePropertyValue("SpPrSolidFillSchemeClrTransformations", aFillProperties.maFillColor.getTransformations()));
+ aProperties.push_back(comphelper::makePropertyValue(u"SpPrSolidFillSchemeClr"_ustr, sColorFillScheme));
+ aProperties.push_back(comphelper::makePropertyValue(u"SpPrSolidFillSchemeClrTransformations"_ustr, aFillProperties.maFillColor.getTransformations()));
}
OUString sLnColorFillScheme = aLineProperties.maLineFill.maFillColor.getSchemeColorName();
if( !aLineProperties.maLineFill.maFillColor.isPlaceHolder() && !sLnColorFillScheme.isEmpty() )
{
- aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillSchemeClr", sLnColorFillScheme));
+ aProperties.push_back(comphelper::makePropertyValue(u"SpPrLnSolidFillSchemeClr"_ustr, sLnColorFillScheme));
auto aResolvedSchemeClr = aLineProperties.maLineFill.maFillColor;
aResolvedSchemeClr.clearTransformations();
- aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillResolvedSchemeClr", aResolvedSchemeClr.getColor(rGraphicHelper, nFillPhClr)));
- aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillSchemeClrTransformations", aLineProperties.maLineFill.maFillColor.getTransformations()));
+ aProperties.push_back(comphelper::makePropertyValue(u"SpPrLnSolidFillResolvedSchemeClr"_ustr, aResolvedSchemeClr.getColor(rGraphicHelper, nFillPhClr)));
+ aProperties.push_back(comphelper::makePropertyValue(u"SpPrLnSolidFillSchemeClrTransformations"_ustr, aLineProperties.maLineFill.maFillColor.getTransformations()));
}
putPropertiesToGrabBag(comphelper::containerToSequence(aProperties));
@@ -1752,26 +1752,26 @@ Reference< XShape > const & Shape::createAndInsert(
// save position
std::vector<beans::PropertyValue> aGradientStop
{
- comphelper::makePropertyValue("Pos", rPos)
+ comphelper::makePropertyValue(u"Pos"_ustr, rPos)
};
OUString sStopColorScheme = rColor.getSchemeColorName();
if( sStopColorScheme.isEmpty() )
{
// save RGB color
- aGradientStop.push_back(comphelper::makePropertyValue("RgbClr", rColor.getColor(rGraphicHelper, nFillPhClr)));
+ aGradientStop.push_back(comphelper::makePropertyValue(u"RgbClr"_ustr, rColor.getColor(rGraphicHelper, nFillPhClr)));
// in the case of a RGB color, transformations are already applied to
// the color with the exception of alpha transformations. We only need
// to keep the transparency value to calculate the alpha value later.
if( rColor.hasTransparency() )
- aGradientStop.push_back(comphelper::makePropertyValue("Transparency", rColor.getTransparency()));
+ aGradientStop.push_back(comphelper::makePropertyValue(u"Transparency"_ustr, rColor.getTransparency()));
}
else
{
// save color with scheme name
- aGradientStop.push_back(comphelper::makePropertyValue("SchemeClr", sStopColorScheme));
+ aGradientStop.push_back(comphelper::makePropertyValue(u"SchemeClr"_ustr, sStopColorScheme));
// save all color transformations
- aGradientStop.push_back(comphelper::makePropertyValue("Transformations", rColor.getTransformations()));
+ aGradientStop.push_back(comphelper::makePropertyValue(u"Transformations"_ustr, rColor.getTransformations()));
}
aGradientStops.push_back(comphelper::makePropertyValue(OUString::number(i), comphelper::containerToSequence(aGradientStop)));
@@ -1780,8 +1780,8 @@ Reference< XShape > const & Shape::createAndInsert(
// If getFillProperties.moFillType is unused that means gradient is defined by a theme
// which is already saved into StyleFillRef property, so no need to save the explicit values too
if( getFillProperties().moFillType.has_value() )
- putPropertyToGrabBag( "GradFillDefinition", uno::Any(comphelper::containerToSequence(aGradientStops)));
- putPropertyToGrabBag( "OriginalGradFill", aShapeProps.getProperty(PROP_FillGradient) );
+ putPropertyToGrabBag( u"GradFillDefinition"_ustr, uno::Any(comphelper::containerToSequence(aGradientStops)));
+ putPropertyToGrabBag( u"OriginalGradFill"_ustr, aShapeProps.getProperty(PROP_FillGradient) );
}
// store unsupported effect attributes in the grab bag
@@ -1795,7 +1795,7 @@ Reference< XShape > const & Shape::createAndInsert(
{
std::vector<beans::PropertyValue> aEffectsGrabBag
{
- comphelper::makePropertyValue("Attribs", aEffect.Value)
+ comphelper::makePropertyValue(u"Attribs"_ustr, aEffect.Value)
};
Color& aColor( it->moColor );
@@ -1803,19 +1803,19 @@ Reference< XShape > const & Shape::createAndInsert(
if( sColorScheme.isEmpty() )
{
// RGB color and transparency value
- aEffectsGrabBag.push_back(comphelper::makePropertyValue("RgbClr", aColor.getColor(rGraphicHelper, nFillPhClr)));
- aEffectsGrabBag.push_back(comphelper::makePropertyValue("RgbClrTransparency", aColor.getTransparency()));
+ aEffectsGrabBag.push_back(comphelper::makePropertyValue(u"RgbClr"_ustr, aColor.getColor(rGraphicHelper, nFillPhClr)));
+ aEffectsGrabBag.push_back(comphelper::makePropertyValue(u"RgbClrTransparency"_ustr, aColor.getTransparency()));
}
else
{
// scheme color with name and transformations
- aEffectsGrabBag.push_back(comphelper::makePropertyValue("SchemeClr", sColorScheme));
- aEffectsGrabBag.push_back(comphelper::makePropertyValue("SchemeClrTransformations", aColor.getTransformations()));
+ aEffectsGrabBag.push_back(comphelper::makePropertyValue(u"SchemeClr"_ustr, sColorScheme));
+ aEffectsGrabBag.push_back(comphelper::makePropertyValue(u"SchemeClrTransformations"_ustr, aColor.getTransformations()));
}
aEffects.push_back(comphelper::makePropertyValue(aEffect.Name, comphelper::containerToSequence(aEffectsGrabBag)));
}
}
- putPropertyToGrabBag("EffectProperties", uno::Any(comphelper::containerToSequence(aEffects)));
+ putPropertyToGrabBag(u"EffectProperties"_ustr, uno::Any(comphelper::containerToSequence(aEffects)));
}
// add 3D effects if any to GrabBag. They are still used in export.
@@ -1830,7 +1830,7 @@ Reference< XShape > const & Shape::createAndInsert(
{"LightRig", uno::Any(aLightRig3DEffects)},
{"Shape3D", uno::Any(aShape3DEffects)}
});
- putPropertyToGrabBag( "3DEffectProperties", Any( a3DEffectsGrabBag ) );
+ putPropertyToGrabBag( u"3DEffectProperties"_ustr, Any( a3DEffectsGrabBag ) );
}
if( bIsCustomShape && getTextBody())
@@ -1847,25 +1847,25 @@ Reference< XShape > const & Shape::createAndInsert(
{"LightRig", uno::Any(aTextLightRig3DEffects)},
{"Shape3D", uno::Any(aTextShape3DEffects)}
});
- putPropertyToGrabBag( "Text3DEffectProperties", Any( aText3DEffectsGrabBag ) );
+ putPropertyToGrabBag( u"Text3DEffectProperties"_ustr, Any( aText3DEffectsGrabBag ) );
}
}
// store bitmap artistic effects in the grab bag
if( !mpGraphicPropertiesPtr->maBlipProps.maEffect.isEmpty() )
- putPropertyToGrabBag( "ArtisticEffectProperties",
+ putPropertyToGrabBag( u"ArtisticEffectProperties"_ustr,
Any( mpGraphicPropertiesPtr->maBlipProps.maEffect.getEffect() ) );
}
else if( mbLockedCanvas )
{
//If we have aServiceName as "com.sun.star.drawing.GroupShape" and lockedCanvas
- putPropertyToGrabBag( "LockedCanvas", Any( true ) );
+ putPropertyToGrabBag( u"LockedCanvas"_ustr, Any( true ) );
}
else if (mbWordprocessingCanvas)
{
- putPropertyToGrabBag("WordprocessingCanvas", Any(true));
- putPropertyToGrabBag("mso-edit-as", Any(OUString("canvas"))); // for export VML Fallback
+ putPropertyToGrabBag(u"WordprocessingCanvas"_ustr, Any(true));
+ putPropertyToGrabBag(u"mso-edit-as"_ustr, Any(u"canvas"_ustr)); // for export VML Fallback
}
// These can have a custom geometry, so position should be set here,
@@ -1887,19 +1887,19 @@ Reference< XShape > const & Shape::createAndInsert(
{
case XML_line:
case XML_straightConnector1:
- xSet->setPropertyValue("EdgeKind", Any(ConnectorType_LINE));
+ xSet->setPropertyValue(u"EdgeKind"_ustr, Any(ConnectorType_LINE));
break;
case XML_bentConnector2:
case XML_bentConnector3:
case XML_bentConnector4:
case XML_bentConnector5:
- xSet->setPropertyValue("EdgeKind", Any(ConnectorType_STANDARD));
+ xSet->setPropertyValue(u"EdgeKind"_ustr, Any(ConnectorType_STANDARD));
break;
case XML_curvedConnector2:
case XML_curvedConnector3:
case XML_curvedConnector4:
case XML_curvedConnector5:
- xSet->setPropertyValue("EdgeKind", Any(ConnectorType_CURVE));
+ xSet->setPropertyValue(u"EdgeKind"_ustr, Any(ConnectorType_CURVE));
break;
default:
break;
@@ -1939,7 +1939,7 @@ Reference< XShape > const & Shape::createAndInsert(
nTextAreaRotateAngle += 5400000;
nTextPreRotateAngle -= 5400000; // compensate the additional text area rotation
}
- putPropertyToGrabBag("Upright", Any(true));
+ putPropertyToGrabBag(u"Upright"_ustr, Any(true));
}
/* OOX measures text rotation clockwise in 1/60000th degrees,
relative to the containing shape. set*Angle wants degrees counter-clockwise. */
@@ -1949,9 +1949,9 @@ Reference< XShape > const & Shape::createAndInsert(
auto sHorzOverflow = getTextBody()->getTextProperties().msHorzOverflow;
if (!sHorzOverflow.isEmpty())
- putPropertyToGrabBag("horzOverflow", uno::Any(getTextBody()->getTextProperties().msHorzOverflow));
+ putPropertyToGrabBag(u"horzOverflow"_ustr, uno::Any(getTextBody()->getTextProperties().msHorzOverflow));
if (XML_ellipsis == getTextBody()->getTextProperties().moVertOverflow)
- putPropertyToGrabBag("vertOverflow", uno::Any(OUString{"ellipsis"}));
+ putPropertyToGrabBag(u"vertOverflow"_ustr, uno::Any(u"ellipsis"_ustr));
}
// Note that the script oox/source/drawingml/customshapes/generatePresetsData.pl looks
@@ -2015,7 +2015,7 @@ Reference< XShape > const & Shape::createAndInsert(
}
}
}
- xText->setString("");
+ xText->setString(u""_ustr);
Reference < XTextCursor > xAt = xText->createTextCursor();
getTextBody()->insertAt( rFilterBase, xText, xAt, aCharStyleProperties, mpMasterTextListStyle );
@@ -2071,9 +2071,9 @@ Reference< XShape > const & Shape::createAndInsert(
&& aServiceName != "com.sun.star.drawing.GroupShape")
{
uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
- propertySet->setPropertyValue("GlowEffectRadius", Any(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.value())));
- propertySet->setPropertyValue("GlowEffectColor", Any(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper)));
- propertySet->setPropertyValue("GlowEffectTransparency", Any(aEffectProperties.maGlow.moGlowColor.getTransparency()));
+ propertySet->setPropertyValue(u"GlowEffectRadius"_ustr, Any(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.value())));
+ propertySet->setPropertyValue(u"GlowEffectColor"_ustr, Any(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper)));
+ propertySet->setPropertyValue(u"GlowEffectTransparency"_ustr, Any(aEffectProperties.maGlow.moGlowColor.getTransparency()));
}
// Set soft edge effect properties
@@ -2081,7 +2081,7 @@ Reference< XShape > const & Shape::createAndInsert(
{
uno::Reference<beans::XPropertySet> propertySet(mxShape, uno::UNO_QUERY);
propertySet->setPropertyValue(
- "SoftEdgeRadius", Any(convertEmuToHmm(aEffectProperties.maSoftEdge.moRad.value())));
+ u"SoftEdgeRadius"_ustr, Any(convertEmuToHmm(aEffectProperties.maSoftEdge.moRad.value())));
}
// Set the stroke and fill-color properties of the OLE shape
@@ -2173,8 +2173,8 @@ void Shape::convertSmartArtToMetafile(XmlFilterBase const & rFilterBase)
{
Reference<XPropertySet> xSet(mxShape, UNO_QUERY_THROW);
- xSet->setPropertyValue("MoveProtect", Any(true));
- xSet->setPropertyValue("SizeProtect", Any(true));
+ xSet->setPropertyValue(u"MoveProtect"_ustr, Any(true));
+ xSet->setPropertyValue(u"SizeProtect"_ustr, Any(true));
// Replace existing shapes with a new Graphic Object rendered
// from them
@@ -2219,16 +2219,16 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase const & rFilte
static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Height ) + 0.5 ) );
Sequence< PropertyValue > aFilterData{
- comphelper::makePropertyValue("PixelWidth", aSize.Width),
- comphelper::makePropertyValue("PixelHeight", aSize.Height),
- comphelper::makePropertyValue("LogicalWidth", aActualSize.Width),
- comphelper::makePropertyValue("LogicalHeight", aActualSize.Height)
+ comphelper::makePropertyValue(u"PixelWidth"_ustr, aSize.Width),
+ comphelper::makePropertyValue(u"PixelHeight"_ustr, aSize.Height),
+ comphelper::makePropertyValue(u"LogicalWidth"_ustr, aActualSize.Width),
+ comphelper::makePropertyValue(u"LogicalHeight"_ustr, aActualSize.Height)
};
Sequence < PropertyValue > aDescriptor{
- comphelper::makePropertyValue("OutputStream", xOutputStream),
- comphelper::makePropertyValue("FilterName", OUString("SVM")), // Rendering format
- comphelper::makePropertyValue("FilterData", aFilterData)
+ comphelper::makePropertyValue(u"OutputStream"_ustr, xOutputStream),
+ comphelper::makePropertyValue(u"FilterName"_ustr, u"SVM"_ustr), // Rendering format
+ comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData)
};
Reference < lang::XComponent > xSourceDoc( mxShape, UNO_QUERY_THROW );
@@ -2248,12 +2248,12 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase const & rFilte
Reference < graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() );
Reference < lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
- xShape.set( xServiceFact->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), UNO_QUERY_THROW );
+ xShape.set( xServiceFact->createInstance( u"com.sun.star.drawing.GraphicObjectShape"_ustr ), UNO_QUERY_THROW );
Reference < XPropertySet > xPropSet( xShape, UNO_QUERY_THROW );
- xPropSet->setPropertyValue( "Graphic", Any( xGraphic ) );
- xPropSet->setPropertyValue( "MoveProtect", Any( true ) );
- xPropSet->setPropertyValue( "SizeProtect", Any( true ) );
- xPropSet->setPropertyValue( "Name", Any( OUString( "RenderedShapes" ) ) );
+ xPropSet->setPropertyValue( u"Graphic"_ustr, Any( xGraphic ) );
+ xPropSet->setPropertyValue( u"MoveProtect"_ustr, Any( true ) );
+ xPropSet->setPropertyValue( u"SizeProtect"_ustr, Any( true ) );
+ xPropSet->setPropertyValue( u"Name"_ustr, Any( u"RenderedShapes"_ustr ) );
}
catch( const Exception& )
{
@@ -2325,7 +2325,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >&
{
// set the chart2 OLE class ID at the OLE shape
PropertySet aShapeProp( mxShape );
- aShapeProp.setProperty( PROP_CLSID, OUString( "12dcae26-281f-416f-a234-c3086127382e" ) );
+ aShapeProp.setProperty( PROP_CLSID, u"12dcae26-281f-416f-a234-c3086127382e"_ustr );
// get the XModel interface of the embedded object from the OLE shape
Reference< frame::XModel > xDocModel;
diff --git a/oox/source/drawingml/shape3dproperties.cxx b/oox/source/drawingml/shape3dproperties.cxx
index ca1e7574219a..e000f1b9c5b6 100644
--- a/oox/source/drawingml/shape3dproperties.cxx
+++ b/oox/source/drawingml/shape3dproperties.cxx
@@ -34,68 +34,68 @@ OUString Generic3DProperties::getCameraPrstName( sal_Int32 nElement )
{
switch( nElement )
{
- case XML_legacyObliqueTopLeft: return "legacyObliqueTopLeft";
- case XML_legacyObliqueTop: return "legacyObliqueTop";
- case XML_legacyObliqueTopRight: return "legacyObliqueTopRight";
- case XML_legacyObliqueLeft: return "legacyObliqueLeft";
- case XML_legacyObliqueFront: return "legacyObliqueFront";
- case XML_legacyObliqueRight: return "legacyObliqueRight";
- case XML_legacyObliqueBottomLeft: return "legacyObliqueBottomLeft";
- case XML_legacyObliqueBottom: return "legacyObliqueBottom";
- case XML_legacyObliqueBottomRight: return "legacyObliqueBottomRight";
- case XML_legacyPerspectiveTopLeft: return "legacyPerspectiveTopLeft";
- case XML_legacyPerspectiveTop: return "legacyPerspectiveTop";
- case XML_legacyPerspectiveTopRight: return "legacyPerspectiveTopRight";
- case XML_legacyPerspectiveLeft: return "legacyPerspectiveLeft";
- case XML_legacyPerspectiveFront: return "legacyPerspectiveFront";
- case XML_legacyPerspectiveRight: return "legacyPerspectiveRight";
- case XML_legacyPerspectiveBottomLeft: return "legacyPerspectiveBottomLeft";
- case XML_legacyPerspectiveBottom: return "legacyPerspectiveBottom";
- case XML_legacyPerspectiveBottomRight: return "legacyPerspectiveBottomRight";
- case XML_orthographicFront: return "orthographicFront";
- case XML_isometricTopUp: return "isometricTopUp";
- case XML_isometricTopDown: return "isometricTopDown";
- case XML_isometricBottomUp: return "isometricBottomUp";
- case XML_isometricBottomDown: return "isometricBottomDown";
- case XML_isometricLeftUp: return "isometricLeftUp";
- case XML_isometricLeftDown: return "isometricLeftDown";
- case XML_isometricRightUp: return "isometricRightUp";
- case XML_isometricRightDown: return "isometricRightDown";
- case XML_isometricOffAxis1Left: return "isometricOffAxis1Left";
- case XML_isometricOffAxis1Right: return "isometricOffAxis1Right";
- case XML_isometricOffAxis1Top: return "isometricOffAxis1Top";
- case XML_isometricOffAxis2Left: return "isometricOffAxis2Left";
- case XML_isometricOffAxis2Right: return "isometricOffAxis2Right";
- case XML_isometricOffAxis2Top: return "isometricOffAxis2Top";
- case XML_isometricOffAxis3Left: return "isometricOffAxis3Left";
- case XML_isometricOffAxis3Right: return "isometricOffAxis3Right";
- case XML_isometricOffAxis3Bottom: return "isometricOffAxis3Bottom";
- case XML_isometricOffAxis4Left: return "isometricOffAxis4Left";
- case XML_isometricOffAxis4Right: return "isometricOffAxis4Right";
- case XML_isometricOffAxis4Bottom: return "isometricOffAxis4Bottom";
- case XML_obliqueTopLeft: return "obliqueTopLeft";
- case XML_obliqueTop: return "obliqueTop";
- case XML_obliqueTopRight: return "obliqueTopRight";
- case XML_obliqueLeft: return "obliqueLeft";
- case XML_obliqueRight: return "obliqueRight";
- case XML_obliqueBottomLeft: return "obliqueBottomLeft";
- case XML_obliqueBottom: return "obliqueBottom";
- case XML_obliqueBottomRight: return "obliqueBottomRight";
- case XML_perspectiveFront: return "perspectiveFront";
- case XML_perspectiveLeft: return "perspectiveLeft";
- case XML_perspectiveRight: return "perspectiveRight";
- case XML_perspectiveAbove: return "perspectiveAbove";
- case XML_perspectiveBelow: return "perspectiveBelow";
- case XML_perspectiveAboveLeftFacing: return "perspectiveAboveLeftFacing";
- case XML_perspectiveAboveRightFacing: return "perspectiveAboveRightFacing";
- case XML_perspectiveContrastingLeftFacing: return "perspectiveContrastingLeftFacing";
- case XML_perspectiveContrastingRightFacing: return "perspectiveContrastingRightFacing";
- case XML_perspectiveHeroicLeftFacing: return "perspectiveHeroicLeftFacing";
- case XML_perspectiveHeroicRightFacing: return "perspectiveHeroicRightFacing";
- case XML_perspectiveHeroicExtremeLeftFacing: return "perspectiveHeroicExtremeLeftFacing";
- case XML_perspectiveHeroicExtremeRightFacing: return "perspectiveHeroicExtremeRightFacing";
- case XML_perspectiveRelaxed: return "perspectiveRelaxed";
- case XML_perspectiveRelaxedModerately: return "perspectiveRelaxedModerately";
+ case XML_legacyObliqueTopLeft: return u"legacyObliqueTopLeft"_ustr;
+ case XML_legacyObliqueTop: return u"legacyObliqueTop"_ustr;
+ case XML_legacyObliqueTopRight: return u"legacyObliqueTopRight"_ustr;
+ case XML_legacyObliqueLeft: return u"legacyObliqueLeft"_ustr;
+ case XML_legacyObliqueFront: return u"legacyObliqueFront"_ustr;
+ case XML_legacyObliqueRight: return u"legacyObliqueRight"_ustr;
+ case XML_legacyObliqueBottomLeft: return u"legacyObliqueBottomLeft"_ustr;
+ case XML_legacyObliqueBottom: return u"legacyObliqueBottom"_ustr;
+ case XML_legacyObliqueBottomRight: return u"legacyObliqueBottomRight"_ustr;
+ case XML_legacyPerspectiveTopLeft: return u"legacyPerspectiveTopLeft"_ustr;
+ case XML_legacyPerspectiveTop: return u"legacyPerspectiveTop"_ustr;
+ case XML_legacyPerspectiveTopRight: return u"legacyPerspectiveTopRight"_ustr;
+ case XML_legacyPerspectiveLeft: return u"legacyPerspectiveLeft"_ustr;
+ case XML_legacyPerspectiveFront: return u"legacyPerspectiveFront"_ustr;
+ case XML_legacyPerspectiveRight: return u"legacyPerspectiveRight"_ustr;
+ case XML_legacyPerspectiveBottomLeft: return u"legacyPerspectiveBottomLeft"_ustr;
+ case XML_legacyPerspectiveBottom: return u"legacyPerspectiveBottom"_ustr;
+ case XML_legacyPerspectiveBottomRight: return u"legacyPerspectiveBottomRight"_ustr;
+ case XML_orthographicFront: return u"orthographicFront"_ustr;
+ case XML_isometricTopUp: return u"isometricTopUp"_ustr;
+ case XML_isometricTopDown: return u"isometricTopDown"_ustr;
+ case XML_isometricBottomUp: return u"isometricBottomUp"_ustr;
+ case XML_isometricBottomDown: return u"isometricBottomDown"_ustr;
+ case XML_isometricLeftUp: return u"isometricLeftUp"_ustr;
+ case XML_isometricLeftDown: return u"isometricLeftDown"_ustr;
+ case XML_isometricRightUp: return u"isometricRightUp"_ustr;
+ case XML_isometricRightDown: return u"isometricRightDown"_ustr;
+ case XML_isometricOffAxis1Left: return u"isometricOffAxis1Left"_ustr;
+ case XML_isometricOffAxis1Right: return u"isometricOffAxis1Right"_ustr;
+ case XML_isometricOffAxis1Top: return u"isometricOffAxis1Top"_ustr;
+ case XML_isometricOffAxis2Left: return u"isometricOffAxis2Left"_ustr;
+ case XML_isometricOffAxis2Right: return u"isometricOffAxis2Right"_ustr;
+ case XML_isometricOffAxis2Top: return u"isometricOffAxis2Top"_ustr;
+ case XML_isometricOffAxis3Left: return u"isometricOffAxis3Left"_ustr;
+ case XML_isometricOffAxis3Right: return u"isometricOffAxis3Right"_ustr;
+ case XML_isometricOffAxis3Bottom: return u"isometricOffAxis3Bottom"_ustr;
+ case XML_isometricOffAxis4Left: return u"isometricOffAxis4Left"_ustr;
+ case XML_isometricOffAxis4Right: return u"isometricOffAxis4Right"_ustr;
+ case XML_isometricOffAxis4Bottom: return u"isometricOffAxis4Bottom"_ustr;
+ case XML_obliqueTopLeft: return u"obliqueTopLeft"_ustr;
+ case XML_obliqueTop: return u"obliqueTop"_ustr;
+ case XML_obliqueTopRight: return u"obliqueTopRight"_ustr;
+ case XML_obliqueLeft: return u"obliqueLeft"_ustr;
+ case XML_obliqueRight: return u"obliqueRight"_ustr;
+ case XML_obliqueBottomLeft: return u"obliqueBottomLeft"_ustr;
+ case XML_obliqueBottom: return u"obliqueBottom"_ustr;
+ case XML_obliqueBottomRight: return u"obliqueBottomRight"_ustr;
+ case XML_perspectiveFront: return u"perspectiveFront"_ustr;
+ case XML_perspectiveLeft: return u"perspectiveLeft"_ustr;
+ case XML_perspectiveRight: return u"perspectiveRight"_ustr;
+ case XML_perspectiveAbove: return u"perspectiveAbove"_ustr;
+ case XML_perspectiveBelow: return u"perspectiveBelow"_ustr;
+ case XML_perspectiveAboveLeftFacing: return u"perspectiveAboveLeftFacing"_ustr;
+ case XML_perspectiveAboveRightFacing: return u"perspectiveAboveRightFacing"_ustr;
+ case XML_perspectiveContrastingLeftFacing: return u"perspectiveContrastingLeftFacing"_ustr;
+ case XML_perspectiveContrastingRightFacing: return u"perspectiveContrastingRightFacing"_ustr;
+ case XML_perspectiveHeroicLeftFacing: return u"perspectiveHeroicLeftFacing"_ustr;
+ case XML_perspectiveHeroicRightFacing: return u"perspectiveHeroicRightFacing"_ustr;
+ case XML_perspectiveHeroicExtremeLeftFacing: return u"perspectiveHeroicExtremeLeftFacing"_ustr;
+ case XML_perspectiveHeroicExtremeRightFacing: return u"perspectiveHeroicExtremeRightFacing"_ustr;
+ case XML_perspectiveRelaxed: return u"perspectiveRelaxed"_ustr;
+ case XML_perspectiveRelaxedModerately: return u"perspectiveRelaxedModerately"_ustr;
}
SAL_WARN( "oox.drawingml", "Generic3DProperties::getCameraPrstName - unexpected prst type" );
return OUString();
@@ -105,33 +105,33 @@ OUString Generic3DProperties::getLightRigName( sal_Int32 nElement )
{
switch( nElement )
{
- case XML_legacyFlat1: return "legacyFlat1";
- case XML_legacyFlat2: return "legacyFlat2";
- case XML_legacyFlat3: return "legacyFlat3";
- case XML_legacyFlat4: return "legacyFlat4";
- case XML_legacyNormal1: return "legacyNormal1";
- case XML_legacyNormal2: return "legacyNormal2";
- case XML_legacyNormal3: return "legacyNormal3";
- case XML_legacyNormal4: return "legacyNormal4";
- case XML_legacyHarsh1: return "legacyHarsh1";
- case XML_legacyHarsh2: return "legacyHarsh2";
- case XML_legacyHarsh3: return "legacyHarsh3";
- case XML_legacyHarsh4: return "legacyHarsh4";
- case XML_threePt: return "threePt";
- case XML_balanced: return "balanced";
- case XML_soft: return "soft";
- case XML_harsh: return "harsh";
- case XML_flood: return "flood";
- case XML_contrasting: return "contrasting";
- case XML_morning: return "morning";
- case XML_sunrise: return "sunrise";
- case XML_sunset: return "sunset";
- case XML_chilly: return "chilly";
- case XML_freezing: return "freezing";
- case XML_flat: return "flat";
- case XML_twoPt: return "twoPt";
- case XML_glow: return "glow";
- case XML_brightRoom: return "brightRoom";
+ case XML_legacyFlat1: return u"legacyFlat1"_ustr;
+ case XML_legacyFlat2: return u"legacyFlat2"_ustr;
+ case XML_legacyFlat3: return u"legacyFlat3"_ustr;
+ case XML_legacyFlat4: return u"legacyFlat4"_ustr;
+ case XML_legacyNormal1: return u"legacyNormal1"_ustr;
+ case XML_legacyNormal2: return u"legacyNormal2"_ustr;
+ case XML_legacyNormal3: return u"legacyNormal3"_ustr;
+ case XML_legacyNormal4: return u"legacyNormal4"_ustr;
+ case XML_legacyHarsh1: return u"legacyHarsh1"_ustr;
+ case XML_legacyHarsh2: return u"legacyHarsh2"_ustr;
+ case XML_legacyHarsh3: return u"legacyHarsh3"_ustr;
+ case XML_legacyHarsh4: return u"legacyHarsh4"_ustr;
+ case XML_threePt: return u"threePt"_ustr;
+ case XML_balanced: return u"balanced"_ustr;
+ case XML_soft: return u"soft"_ustr;
+ case XML_harsh: return u"harsh"_ustr;
+ case XML_flood: return u"flood"_ustr;
+ case XML_contrasting: return u"contrasting"_ustr;
+ case XML_morning: return u"morning"_ustr;
+ case XML_sunrise: return u"sunrise"_ustr;
+ case XML_sunset: return u"sunset"_ustr;
+ case XML_chilly: return u"chilly"_ustr;
+ case XML_freezing: return u"freezing"_ustr;
+ case XML_flat: return u"flat"_ustr;
+ case XML_twoPt: return u"twoPt"_ustr;
+ case XML_glow: return u"glow"_ustr;
+ case XML_brightRoom: return u"brightRoom"_ustr;
}
SAL_WARN( "oox.drawingml", "Generic3DProperties::getLightRigName - unexpected token" );
return OUString();
@@ -141,14 +141,14 @@ OUString Generic3DProperties::getLightRigDirName( sal_Int32 nElement )
{
switch( nElement )
{
- case XML_tl: return "tl";
- case XML_t: return "t";
- case XML_tr: return "tr";
- case XML_l: return "l";
- case XML_r: return "r";
- case XML_bl: return "bl";
- case XML_b: return "b";
- case XML_br: return "br";
+ case XML_tl: return u"tl"_ustr;
+ case XML_t: return u"t"_ustr;
+ case XML_tr: return u"tr"_ustr;
+ case XML_l: return u"l"_ustr;
+ case XML_r: return u"r"_ustr;
+ case XML_bl: return u"bl"_ustr;
+ case XML_b: return u"b"_ustr;
+ case XML_br: return u"br"_ustr;
}
SAL_WARN( "oox.drawingml", "Generic3DProperties::getLightRigDirName - unexpected token" );
return OUString();
@@ -158,18 +158,18 @@ OUString Generic3DProperties::getBevelPresetTypeString( sal_Int32 nType )
{
switch (nType)
{
- case XML_relaxedInset: return "relaxedInset";
- case XML_circle: return "circle";
- case XML_slope: return "slope";
- case XML_cross: return "cross";
- case XML_angle: return "angle";
- case XML_softRound: return "softRound";
- case XML_convex: return "convex";
- case XML_coolSlant: return "coolSlant";
- case XML_divot: return "divot";
- case XML_riblet: return "riblet";
- case XML_hardEdge: return "hardEdge";
- case XML_artDeco: return "artDeco";
+ case XML_relaxedInset: return u"relaxedInset"_ustr;
+ case XML_circle: return u"circle"_ustr;
+ case XML_slope: return u"slope"_ustr;
+ case XML_cross: return u"cross"_ustr;
+ case XML_angle: return u"angle"_ustr;
+ case XML_softRound: return u"softRound"_ustr;
+ case XML_convex: return u"convex"_ustr;
+ case XML_coolSlant: return u"coolSlant"_ustr;
+ case XML_divot: return u"divot"_ustr;
+ case XML_riblet: return u"riblet"_ustr;
+ case XML_hardEdge: return u"hardEdge"_ustr;
+ case XML_artDeco: return u"artDeco"_ustr;
}
SAL_WARN( "oox.drawingml", "Generic3DProperties::getBevelPresetTypeString - unexpected token" );
return OUString();
@@ -179,22 +179,22 @@ OUString Generic3DProperties::getPresetMaterialTypeString( sal_Int32 nType )
{
switch (nType)
{
- case XML_legacyMatte: return "legacyMatte";
- case XML_legacyPlastic: return "legacyPlastic";
- case XML_legacyMetal: return "legacyMetal";
- case XML_legacyWireframe: return "legacyWireframe";
- case XML_matte: return "matte";
- case XML_plastic: return "plastic";
- case XML_metal: return "metal";
- case XML_warmMatte: return "warmMatte";
- case XML_translucentPowder: return "translucentPowder";
- case XML_powder: return "powder";
- case XML_dkEdge: return "dkEdge";
- case XML_softEdge: return "softEdge";
- case XML_clear: return "clear";
- case XML_flat: return "flat";
- case XML_softmetal: return "softmetal";
- case XML_none: return "none";
+ case XML_legacyMatte: return u"legacyMatte"_ustr;
+ case XML_legacyPlastic: return u"legacyPlastic"_ustr;
+ case XML_legacyMetal: return u"legacyMetal"_ustr;
+ case XML_legacyWireframe: return u"legacyWireframe"_ustr;
+ case XML_matte: return u"matte"_ustr;
+ case XML_plastic: return u"plastic"_ustr;
+ case XML_metal: return u"metal"_ustr;
+ case XML_warmMatte: return u"warmMatte"_ustr;
+ case XML_translucentPowder: return u"translucentPowder"_ustr;
+ case XML_powder: return u"powder"_ustr;
+ case XML_dkEdge: return u"dkEdge"_ustr;
+ case XML_softEdge: return u"softEdge"_ustr;
+ case XML_clear: return u"clear"_ustr;
+ case XML_flat: return u"flat"_ustr;
+ case XML_softmetal: return u"softmetal"_ustr;
+ case XML_none: return u"none"_ustr;
}
SAL_WARN( "oox.drawingml", "Generic3DProperties::getPresetMaterialTypeString - unexpected token" );
return OUString();
@@ -318,12 +318,12 @@ css::uno::Sequence< css::beans::PropertyValue > Generic3DProperties::getColorAtt
if( sColorScheme.isEmpty() )
{
// RGB color and transparency value
- return { comphelper::makePropertyValue("rgbClr", rColor.getColor( rGraphicHelper, rPhClr )),
- comphelper::makePropertyValue("rgbClrTransparency", rColor.getTransparency()) };
+ return { comphelper::makePropertyValue(u"rgbClr"_ustr, rColor.getColor( rGraphicHelper, rPhClr )),
+ comphelper::makePropertyValue(u"rgbClrTransparency"_ustr, rColor.getTransparency()) };
}
// scheme color with name and transformations
- return { comphelper::makePropertyValue("schemeClr", sColorScheme),
- comphelper::makePropertyValue("schemeClrTransformations",
+ return { comphelper::makePropertyValue(u"schemeClr"_ustr, sColorScheme),
+ comphelper::makePropertyValue(u"schemeClrTransformations"_ustr,
rColor.getTransformations()) };
}
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 78ec4f61feeb..c04960240ec7 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -244,10 +244,10 @@ static void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase,
static void applyTableCellProperties( const Reference < css::table::XCell >& rxCell, const TableCell& rTableCell )
{
Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW );
- xPropSet->setPropertyValue( "TextUpperDistance", Any( static_cast< sal_Int32 >( rTableCell.getTopMargin() / 360 ) ) );
- xPropSet->setPropertyValue( "TextRightDistance", Any( static_cast< sal_Int32 >( rTableCell.getRightMargin() / 360 ) ) );
- xPropSet->setPropertyValue( "TextLeftDistance", Any( static_cast< sal_Int32 >( rTableCell.getLeftMargin() / 360 ) ) );
- xPropSet->setPropertyValue( "TextLowerDistance", Any( static_cast< sal_Int32 >( rTableCell.getBottomMargin() / 360 ) ) );
+ xPropSet->setPropertyValue( u"TextUpperDistance"_ustr, Any( static_cast< sal_Int32 >( rTableCell.getTopMargin() / 360 ) ) );
+ xPropSet->setPropertyValue( u"TextRightDistance"_ustr, Any( static_cast< sal_Int32 >( rTableCell.getRightMargin() / 360 ) ) );
+ xPropSet->setPropertyValue( u"TextLeftDistance"_ustr, Any( static_cast< sal_Int32 >( rTableCell.getLeftMargin() / 360 ) ) );
+ xPropSet->setPropertyValue( u"TextLowerDistance"_ustr, Any( static_cast< sal_Int32 >( rTableCell.getBottomMargin() / 360 ) ) );
drawing::TextVerticalAdjust eVA;
switch( rTableCell.getAnchorToken() )
@@ -259,7 +259,7 @@ static void applyTableCellProperties( const Reference < css::table::XCell >& rxC
default:
case XML_t: eVA = drawing::TextVerticalAdjust_TOP; break;
}
- xPropSet->setPropertyValue( "TextVerticalAdjust", Any( eVA ) );
+ xPropSet->setPropertyValue( u"TextVerticalAdjust"_ustr, Any( eVA ) );
}
void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle,
@@ -575,7 +575,7 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons
if ( getVertToken() == XML_eaVert )
{
- xPropSet->setPropertyValue("TextWritingMode", Any(css::text::WritingMode_TB_RL));
+ xPropSet->setPropertyValue(u"TextWritingMode"_ustr, Any(css::text::WritingMode_TB_RL));
}
getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, pMasterTextListStyle );
@@ -596,19 +596,19 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons
if ( getVertToken() == XML_vert )
{
- xPropSet->setPropertyValue("RotateAngle", Any(short(27000)));
+ xPropSet->setPropertyValue(u"RotateAngle"_ustr, Any(short(27000)));
}
else if ( getVertToken() == XML_vert270 )
{
- xPropSet->setPropertyValue("RotateAngle", Any(short(9000)));
+ xPropSet->setPropertyValue(u"RotateAngle"_ustr, Any(short(9000)));
}
else if ( getVertToken() != XML_horz && getVertToken() != XML_eaVert )
{
// put the vert value in the grab bag for roundtrip
const OUString aTokenName(StaticTokenMap().getUnicodeTokenName(getVertToken()));
Sequence<PropertyValue> aGrabBag;
- xPropSet->getPropertyValue("CellInteropGrabBag") >>= aGrabBag;
- PropertyValue aPropertyValue = comphelper::makePropertyValue("mso-tcPr-vert-value", aTokenName);
+ xPropSet->getPropertyValue(u"CellInteropGrabBag"_ustr) >>= aGrabBag;
+ PropertyValue aPropertyValue = comphelper::makePropertyValue(u"mso-tcPr-vert-value"_ustr, aTokenName);
if (aGrabBag.hasElements())
{
sal_Int32 nLength = aGrabBag.getLength();
@@ -619,7 +619,7 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons
{
aGrabBag = { aPropertyValue };
}
- xPropSet->setPropertyValue("CellInteropGrabBag", Any(aGrabBag));
+ xPropSet->setPropertyValue(u"CellInteropGrabBag"_ustr, Any(aGrabBag));
}
}
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx
index 38f655af1e5c..ab4f4d69e1df 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -54,7 +54,7 @@ static void CreateTableRows( const uno::Reference< XTableRows >& xTableRows, con
for (sal_Int32 n = 0; n < nCols; ++n)
{
Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW );
- xPropSet->setPropertyValue( "Height", Any( static_cast< sal_Int32 >( aTableRowIter->getHeight() / 360 ) ) );
+ xPropSet->setPropertyValue( u"Height"_ustr, Any( static_cast< sal_Int32 >( aTableRowIter->getHeight() / 360 ) ) );
++aTableRowIter;
}
}
@@ -69,7 +69,7 @@ static void CreateTableColumns( const Reference< XTableColumns >& xTableColumns,
for (sal_Int32 n = 0; n < nCols; ++n)
{
Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW );
- xPropSet->setPropertyValue( "Width", Any( static_cast< sal_Int32 >( *aTableGridIter++ / 360 ) ) );
+ xPropSet->setPropertyValue( u"Width"_ustr, Any( static_cast< sal_Int32 >( *aTableGridIter++ / 360 ) ) );
}
}
@@ -127,7 +127,7 @@ void TableProperties::pushToPropSet(const ::oox::core::XmlFilterBase& rFilterBas
const Reference<XPropertySet>& xPropSet,
const TextListStylePtr& pMasterTextListStyle)
{
- uno::Reference<XColumnRowRange> xColumnRowRange(xPropSet->getPropertyValue("Model"),
+ uno::Reference<XColumnRowRange> xColumnRowRange(xPropSet->getPropertyValue(u"Model"_ustr),
uno::UNO_QUERY_THROW);
CreateTableColumns(xColumnRowRange->getColumns(), mvTableGrid);
diff --git a/oox/source/drawingml/textbody.cxx b/oox/source/drawingml/textbody.cxx
index 266ff44b22f9..9d0d2c8d2aac 100644
--- a/oox/source/drawingml/textbody.cxx
+++ b/oox/source/drawingml/textbody.cxx
@@ -60,7 +60,7 @@ void TextBody::insertAt(
TextListStyle aMasterTextStyle(*pMasterTextListStylePtr);
Reference<css::beans::XPropertySet> xPropertySet(xAt, UNO_QUERY);
- float nCharHeight = xPropertySet->getPropertyValue("CharHeight").get<float>();
+ float nCharHeight = xPropertySet->getPropertyValue(u"CharHeight"_ustr).get<float>();
size_t nIndex = 0;
for (auto const& paragraph : maParagraphs)
{
@@ -145,7 +145,7 @@ void TextBody::ApplyStyleEmpty(
Reference< XPropertySet > xProps(xText, UNO_QUERY);
PropertyMap aioBulletList;
aioBulletList.setProperty< sal_Int32 >(PROP_LeftMargin, 0); // Init bullets left margin to 0 (no bullets).
- float nCharHeight = xProps->getPropertyValue("CharHeight").get<float>();
+ float nCharHeight = xProps->getPropertyValue(u"CharHeight"_ustr).get<float>();
TextParagraphProperties aParaProp;
aParaProp.apply(*pTextParagraphStyle);
aParaProp.pushToPropSet(&rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(),
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx
index ceebe876e052..2508513f89d1 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -106,7 +106,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper cons
// ST_PositiveCoordinate32
const sal_Int32 nSpacing = o3tl::convert(rAttribs.getInteger(XML_spcCol, 0),
o3tl::Length::emu, o3tl::Length::mm100);
- xProps->setPropertyValue("AutomaticDistance", css::uno::Any(nSpacing));
+ xProps->setPropertyValue(u"AutomaticDistance"_ustr, css::uno::Any(nSpacing));
mrTextBodyProp.maPropertyMap.setAnyProperty(PROP_TextColumns, css::uno::Any(xCols));
}
diff --git a/oox/source/drawingml/texteffectscontext.cxx b/oox/source/drawingml/texteffectscontext.cxx
index 25df357f5a06..78ffe113bed3 100644
--- a/oox/source/drawingml/texteffectscontext.cxx
+++ b/oox/source/drawingml/texteffectscontext.cxx
@@ -127,12 +127,12 @@ void TextEffectsContext::pushAttributeToGrabBag (sal_Int32 aAttributeId, const O
void TextEffectsContext::processAttributes(const AttributeList& rAttribs)
{
- mpGrabBagStack->push("attributes");
+ mpGrabBagStack->push(u"attributes"_ustr);
switch(mnCurrentElement)
{
case OOX_TOKEN(w14, glow):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, rad), "rad", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, rad), u"rad"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, srgbClr):
@@ -148,129 +148,129 @@ void TextEffectsContext::processAttributes(const AttributeList& rAttribs)
case OOX_TOKEN(w14, lumOff):
case OOX_TOKEN(w14, lumMod):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, shadow):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), "blurRad", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, dist), "dist", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, dir), "dir", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, sx), "sx", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, sy), "sy", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, kx), "kx", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, ky), "ky", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, algn), "algn", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), u"blurRad"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dist), u"dist"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dir), u"dir"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, sx), u"sx"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, sy), u"sy"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, kx), u"kx"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, ky), u"ky"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, algn), u"algn"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, reflection):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), "blurRad", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, stA), "stA", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, stPos), "stPos", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, endA), "endA", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, endPos), "endPos", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, dist), "dist", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, dir), "dir", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, fadeDir), "fadeDir", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, sx), "sx", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, sy), "sy", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, kx), "kx", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, ky), "ky", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, algn), "algn", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), u"blurRad"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, stA), u"stA"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, stPos), u"stPos"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, endA), u"endA"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, endPos), u"endPos"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dist), u"dist"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dir), u"dir"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, fadeDir), u"fadeDir"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, sx), u"sx"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, sy), u"sy"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, kx), u"kx"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, ky), u"ky"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, algn), u"algn"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, textOutline):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, w), "w", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, cap), "cap", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, cmpd), "cmpd", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, algn), "algn", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, w), u"w"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, cap), u"cap"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, cmpd), u"cmpd"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, algn), u"algn"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, prstDash):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, gs):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, pos), "pos", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, pos), u"pos"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, lin):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, ang), "ang", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, scaled), "scaled", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, ang), u"ang"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, scaled), u"scaled"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, path):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, path), "path", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, path), u"path"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, fillToRect):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, l), "l", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, t), "t", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, r), "r", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, b), "b", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, l), u"l"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, t), u"t"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, r), u"r"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, b), u"b"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, miter):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, lim), "lim", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, lim), u"lim"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, camera):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, prst), "prst", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, prst), u"prst"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, lightRig):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, rig), "rig", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, dir), "dir", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, rig), u"rig"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, dir), u"dir"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, rot):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, lat), "lat", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, lon), "lon", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, rev), "rev", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, lat), u"lat"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, lon), u"lon"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, rev), u"rev"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, props3d):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, extrusionH), "extrusionH", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, contourW), "contourW", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, prstMaterial), "prstMaterial", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, extrusionH), u"extrusionH"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, contourW), u"contourW"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, prstMaterial), u"prstMaterial"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, bevelT):
case OOX_TOKEN(w14, bevelB):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, w), "w", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, h), "h", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, prst), "prst", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, w), u"w"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, h), u"h"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, prst), u"prst"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, ligatures):
case OOX_TOKEN(w14, numForm):
case OOX_TOKEN(w14, numSpacing):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, styleSet):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, id), "id", rAttribs);
- pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, id), u"id"_ustr, rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs);
}
break;
case OOX_TOKEN(w14, cntxtAlts):
{
- pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs);
+ pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs);
}
break;
default:
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index ce38159c5e99..1c9641996cdd 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -72,7 +72,7 @@ void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields,
{
if (o3tl::starts_with(p, u"'"))
{
- xIface = xFactory->createInstance( "com.sun.star.text.TextField.Custom" );
+ xIface = xFactory->createInstance( u"com.sun.star.text.TextField.Custom"_ustr );
aFields.emplace_back( xIface, UNO_QUERY );
return;
}
@@ -80,23 +80,23 @@ void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields,
SvxDateFormat eDateFormat = TextField::getLODateFormat(sType);
if (eDateFormat != SvxDateFormat::AppDefault)
{
- xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" );
+ xIface = xFactory->createInstance( u"com.sun.star.text.TextField.DateTime"_ustr );
aFields.emplace_back( xIface, UNO_QUERY );
Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
- xProps->setPropertyValue("NumberFormat", Any(static_cast<sal_Int32>(eDateFormat)));
- xProps->setPropertyValue("IsDate", Any(true));
- xProps->setPropertyValue("IsFixed", Any(false));
+ xProps->setPropertyValue(u"NumberFormat"_ustr, Any(static_cast<sal_Int32>(eDateFormat)));
+ xProps->setPropertyValue(u"IsDate"_ustr, Any(true));
+ xProps->setPropertyValue(u"IsFixed"_ustr, Any(false));
}
SvxTimeFormat eTimeFormat = TextField::getLOTimeFormat(sType);
if (eTimeFormat != SvxTimeFormat::AppDefault)
{
- xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" );
+ xIface = xFactory->createInstance( u"com.sun.star.text.TextField.DateTime"_ustr );
aFields.emplace_back( xIface, UNO_QUERY );
Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
- xProps->setPropertyValue("NumberFormat", Any(static_cast<sal_Int32>(eTimeFormat)));
- xProps->setPropertyValue("IsDate", Any(false));
- xProps->setPropertyValue("IsFixed", Any(false));
+ xProps->setPropertyValue(u"NumberFormat"_ustr, Any(static_cast<sal_Int32>(eTimeFormat)));
+ xProps->setPropertyValue(u"IsDate"_ustr, Any(false));
+ xProps->setPropertyValue(u"IsFixed"_ustr, Any(false));
}
}
catch(const Exception &)
@@ -106,44 +106,44 @@ void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields,
}
else if ( sType == u"slidenum" )
{
- xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageNumber" );
+ xIface = xFactory->createInstance( u"com.sun.star.text.TextField.PageNumber"_ustr );
aFields.emplace_back( xIface, UNO_QUERY );
}
else if ( sType == u"slidecount" )
{
- xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageCount" );
+ xIface = xFactory->createInstance( u"com.sun.star.text.TextField.PageCount"_ustr );
aFields.emplace_back( xIface, UNO_QUERY );
}
else if ( sType == u"slidename" )
{
- xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageName" );
+ xIface = xFactory->createInstance( u"com.sun.star.text.TextField.PageName"_ustr );
aFields.emplace_back( xIface, uno::UNO_QUERY );
}
else if ( o3tl::starts_with(sType, u"file") )
{
int idx = o3tl::toInt32(sType.substr(4));
- xIface = xFactory->createInstance( "com.sun.star.text.TextField.FileName" );
+ xIface = xFactory->createInstance( u"com.sun.star.text.TextField.FileName"_ustr );
aFields.emplace_back( xIface, UNO_QUERY );
Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
switch( idx )
{
case 1: // Path
- xProps->setPropertyValue("FileFormat", Any(sal_Int16(1)));
+ xProps->setPropertyValue(u"FileFormat"_ustr, Any(sal_Int16(1)));
break;
case 2: // File name without extension
- xProps->setPropertyValue("FileFormat", Any(sal_Int16(2)));
+ xProps->setPropertyValue(u"FileFormat"_ustr, Any(sal_Int16(2)));
break;
case 3: // File name with extension
- xProps->setPropertyValue("FileFormat", Any(sal_Int16(3)));
+ xProps->setPropertyValue(u"FileFormat"_ustr, Any(sal_Int16(3)));
break;
default: // Path/File name
- xProps->setPropertyValue("FileFormat", Any(sal_Int16(0)));
+ xProps->setPropertyValue(u"FileFormat"_ustr, Any(sal_Int16(0)));
}
}
else if( sType == u"author" )
{
- xIface = xFactory->createInstance( "com.sun.star.text.TextField.Author" );
+ xIface = xFactory->createInstance( u"com.sun.star.text.TextField.Author"_ustr );
aFields.emplace_back( xIface, UNO_QUERY );
}
}
@@ -189,7 +189,7 @@ sal_Int32 TextField::insertAt(
}
else
{
- xText->insertString( xAt, " ", false );
+ xText->insertString( xAt, u" "_ustr, false );
}
xText->insertTextContent( xAt, xContent, false );
}
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx
index 860a9a4adf57..d5d4a59e5494 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -179,7 +179,7 @@ void TextParagraph::insertAt(
// If the shape is Stacked then set Stacked into the TextParagraphProperties
Reference<XPropertySet> xProps2(xText, UNO_QUERY);
- sal_Int16 nWritingMode = xProps2->getPropertyValue("WritingMode").get<sal_Int16>();
+ sal_Int16 nWritingMode = xProps2->getPropertyValue(u"WritingMode"_ustr).get<sal_Int16>();
if (nWritingMode == text::WritingMode2::STACKED)
{
aParaProp.getTextParagraphPropertyMap().setProperty(PROP_WritingMode, nWritingMode);
@@ -192,7 +192,7 @@ void TextParagraph::insertAt(
// empty paragraphs do not have bullets in ppt
if ( !nParagraphSize )
{
- xProps->setPropertyValue( "NumberingLevel", Any( static_cast< sal_Int16 >( -1 ) ) );
+ xProps->setPropertyValue( u"NumberingLevel"_ustr, Any( static_cast< sal_Int16 >( -1 ) ) );
}
// FIXME this is causing a lot of disruption (ie does not work). I wonder what to do -- Hub
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index f011878f3dbf..54c1d23c7b1a 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -89,19 +89,19 @@ void BulletList::setNone( )
void BulletList::setSuffixParenBoth()
{
- msNumberingSuffix <<= OUString( ")" );
- msNumberingPrefix <<= OUString( "(" );
+ msNumberingSuffix <<= u")"_ustr;
+ msNumberingPrefix <<= u"("_ustr;
}
void BulletList::setSuffixParenRight()
{
- msNumberingSuffix <<= OUString( ")" );
+ msNumberingSuffix <<= u")"_ustr;
msNumberingPrefix <<= OUString();
}
void BulletList::setSuffixPeriod()
{
- msNumberingSuffix <<= OUString( "." );
+ msNumberingSuffix <<= u"."_ustr;
msNumberingPrefix <<= OUString();
}
@@ -113,7 +113,7 @@ void BulletList::setSuffixNone()
void BulletList::setSuffixMinusRight()
{
- msNumberingSuffix <<= OUString( "-" );
+ msNumberingSuffix <<= u"-"_ustr;
msNumberingPrefix <<= OUString();
}
@@ -535,7 +535,7 @@ float TextParagraphProperties::getCharHeightPoints( float fDefault ) const
// debugging pptx import problems.
void TextParagraphProperties::dump() const
{
- Reference< css::drawing::XShape > xShape( oox::ppt::PowerPointImport::mpDebugFilterBase->getModelFactory()->createInstance( "com.sun.star.presentation.TitleTextShape" ), UNO_QUERY );
+ Reference< css::drawing::XShape > xShape( oox::ppt::PowerPointImport::mpDebugFilterBase->getModelFactory()->createInstance( u"com.sun.star.presentation.TitleTextShape"_ustr ), UNO_QUERY );
Reference< css::text::XText > xText( xShape, UNO_QUERY );
Reference< css::drawing::XDrawPage > xDebugPage(ppt::SlidePersist::mxDebugPage.get(), UNO_QUERY);
@@ -544,7 +544,7 @@ void TextParagraphProperties::dump() const
PropertyMap emptyMap;
- xText->setString( "debug" );
+ xText->setString( u"debug"_ustr );
Reference< css::text::XTextCursor > xStart = xText->createTextCursor();
xStart->gotoEnd( true );
Reference< XPropertySet > xPropSet( xStart, UNO_QUERY );
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 2146d9ed04b0..138bfe395621 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -56,14 +56,14 @@ double lclGetGraphicAspectRatio( const Reference< XGraphic >& rxGraphic )
double fRatio = 1.0;
Reference< com::sun::star::beans::XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW );
css::awt::Size aSizeHmm( 0, 0 );
- xGraphicPropertySet->getPropertyValue( "Size100thMM" ) >>= aSizeHmm;
+ xGraphicPropertySet->getPropertyValue( u"Size100thMM"_ustr ) >>= aSizeHmm;
if( aSizeHmm.Width > 0 && aSizeHmm.Height > 0)
return double(aSizeHmm.Width)/double(aSizeHmm.Height);
else
{
css::awt::Size aSourceSizePixel( 0, 0 );
- xGraphicPropertySet->getPropertyValue( "SizePixel" ) >>= aSourceSizePixel;
+ xGraphicPropertySet->getPropertyValue( u"SizePixel"_ustr ) >>= aSourceSizePixel;
if( aSourceSizePixel.Width > 0 && aSourceSizePixel.Height > 0 )
return double(aSourceSizePixel.Width)/double(aSourceSizePixel.Height);
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index 3eca13d4ad8f..faee78f78244 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -65,10 +65,10 @@ sal_Int32 TextRun::insertAt(
PropertySet aPropSet( xStart );
Reference<XPropertyState> xState(xStart, UNO_QUERY);
- Any aOldFontName = xState->getPropertyDefault("CharFontName");
- Any aOldFontPitch = xState->getPropertyDefault("CharFontPitch");
- Any aOldFontFamily = xState->getPropertyDefault("CharFontFamily");
- Any aOldFontCharSet = xState->getPropertyDefault("CharFontCharSet");
+ Any aOldFontName = xState->getPropertyDefault(u"CharFontName"_ustr);
+ Any aOldFontPitch = xState->getPropertyDefault(u"CharFontPitch"_ustr);
+ Any aOldFontFamily = xState->getPropertyDefault(u"CharFontFamily"_ustr);
+ Any aOldFontCharSet = xState->getPropertyDefault(u"CharFontCharSet"_ustr);
TextCharacterProperties aTextCharacterProps( rTextCharacterStyle );
@@ -146,7 +146,7 @@ sal_Int32 TextRun::insertAt(
{
SAL_WARN("oox", "OOX: URL field" );
Reference< XMultiServiceFactory > xFactory( rFilterBase.getModel(), UNO_QUERY );
- Reference< XTextField > xField( xFactory->createInstance( "com.sun.star.text.TextField.URL" ), UNO_QUERY );
+ Reference< XTextField > xField( xFactory->createInstance( u"com.sun.star.text.TextField.URL"_ustr ), UNO_QUERY );
if( xField.is() )
{
Reference< XTextCursor > xTextFieldCursor = xText->createTextCursor();
diff --git a/oox/source/export/DMLPresetShapeExport.cxx b/oox/source/export/DMLPresetShapeExport.cxx
index 0ed099ee57b4..f74399eb95e7 100644
--- a/oox/source/export/DMLPresetShapeExport.cxx
+++ b/oox/source/export/DMLPresetShapeExport.cxx
@@ -40,7 +40,7 @@ DMLPresetShapeExporter::DMLPresetShapeExporter(DrawingML* pDMLExporter,
m_bHasHandleValues = false;
uno::Reference<beans::XPropertySet> xShapeProps(m_xShape, uno::UNO_QUERY);
css::uno::Sequence<css::beans::PropertyValue> aCustomShapeGeometry
- = xShapeProps->getPropertyValue("CustomShapeGeometry")
+ = xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr)
.get<uno::Sequence<beans::PropertyValue>>();
for (auto const& rCustomShapeGeometryItem : aCustomShapeGeometry)
diff --git a/oox/source/export/ThemeExport.cxx b/oox/source/export/ThemeExport.cxx
index 38c4b96ecee3..533471d9bf9d 100644
--- a/oox/source/export/ThemeExport.cxx
+++ b/oox/source/export/ThemeExport.cxx
@@ -47,7 +47,7 @@ ThemeExport::ThemeExport(oox::core::XmlFilterBase* pFilterBase,
void ThemeExport::write(OUString const& rPath, model::Theme const& rTheme)
{
mpFS = mpFilterBase->openFragmentStreamWithSerializer(
- rPath, "application/vnd.openxmlformats-officedocument.theme+xml");
+ rPath, u"application/vnd.openxmlformats-officedocument.theme+xml"_ustr);
OUString aThemeName = rTheme.GetName();
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index e4d6ead64774..b1db415aeef2 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -154,7 +154,7 @@ public:
OUString aRole;
return ( xProp.is() &&
- (xProp->getPropertyValue( "Role" ) >>= aRole ) &&
+ (xProp->getPropertyValue( u"Role"_ustr ) >>= aRole ) &&
m_aRole == aRole );
}
@@ -303,12 +303,12 @@ static OUString lclGetTimeUnitToken( sal_Int32 nTimeUnit )
{
switch( nTimeUnit )
{
- case cssc::TimeUnit::DAY: return "days";
- case cssc::TimeUnit::MONTH: return "months";
- case cssc::TimeUnit::YEAR: return "years";
+ case cssc::TimeUnit::DAY: return u"days"_ustr;
+ case cssc::TimeUnit::MONTH: return u"months"_ustr;
+ case cssc::TimeUnit::YEAR: return u"years"_ustr;
default: OSL_ENSURE(false, "lclGetTimeUnitToken - unexpected time unit");
}
- return "days";
+ return u"days"_ustr;
}
static cssc::TimeIncrement lcl_getDateTimeIncrement( const Reference< chart2::XDiagram >& xDiagram, sal_Int32 nAxisIndex )
@@ -353,7 +353,7 @@ static bool lcl_isSeriesAttachedToFirstAxis(
{
sal_Int32 nAxisIndex = 0;
Reference< beans::XPropertySet > xProp( xDataSeries, uno::UNO_QUERY_THROW );
- xProp->getPropertyValue("AttachedAxisIndex") >>= nAxisIndex;
+ xProp->getPropertyValue(u"AttachedAxisIndex"_ustr) >>= nAxisIndex;
bResult = (0==nAxisIndex);
}
catch( const uno::Exception & )
@@ -563,10 +563,10 @@ uno::Sequence< beans::PropertyValue > createArguments(
eRowSource = css::chart::ChartDataRowSource_COLUMNS;
uno::Sequence<beans::PropertyValue> aArguments{
- { "DataRowSource", -1, uno::Any(eRowSource), beans::PropertyState_DIRECT_VALUE },
- { "FirstCellAsLabel", -1, uno::Any(false), beans::PropertyState_DIRECT_VALUE },
- { "HasCategories", -1, uno::Any(false), beans::PropertyState_DIRECT_VALUE },
- { "CellRangeRepresentation", -1, uno::Any(rRangeRepresentation),
+ { u"DataRowSource"_ustr, -1, uno::Any(eRowSource), beans::PropertyState_DIRECT_VALUE },
+ { u"FirstCellAsLabel"_ustr, -1, uno::Any(false), beans::PropertyState_DIRECT_VALUE },
+ { u"HasCategories"_ustr, -1, uno::Any(false), beans::PropertyState_DIRECT_VALUE },
+ { u"CellRangeRepresentation"_ustr, -1, uno::Any(rRangeRepresentation),
beans::PropertyState_DIRECT_VALUE }
};
@@ -724,7 +724,7 @@ OUString ChartExport::parseFormula( const OUString& rRange )
{
try
{
- xParser.set( xSF->createInstance("com.sun.star.sheet.FormulaParser"), UNO_QUERY );
+ xParser.set( xSF->createInstance(u"com.sun.star.sheet.FormulaParser"_ustr), UNO_QUERY );
}
catch( Exception& )
{
@@ -749,9 +749,9 @@ OUString ChartExport::parseFormula( const OUString& rRange )
uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) );
if( xParserProps.is() )
{
- xParserProps->setPropertyValue("FormulaConvention", uno::Any(css::sheet::AddressConvention::XL_OOX) );
+ xParserProps->setPropertyValue(u"FormulaConvention"_ustr, uno::Any(css::sheet::AddressConvention::XL_OOX) );
// For referencing named ranges correctly with special excel chart syntax.
- xParserProps->setPropertyValue("RefConventionChartOOXML", uno::Any(true) );
+ xParserProps->setPropertyValue(u"RefConventionChartOOXML"_ustr, uno::Any(true) );
}
aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) );
}
@@ -779,7 +779,7 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
pFS->startElementNS(mnXmlNamespace, XML_nvGraphicFramePr);
// TODO: get the correct chart name chart id
- OUString sName = "Object 1";
+ OUString sName = u"Object 1"_ustr;
Reference< XNamed > xNamed( xShape, UNO_QUERY );
if (xNamed.is())
sName = xNamed->getName();
@@ -789,7 +789,7 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
XML_name, sName);
OUString sURL;
- if ( GetProperty( xShapeProps, "URL" ) )
+ if ( GetProperty( xShapeProps, u"URL"_ustr ) )
mAny >>= sURL;
if( !sURL.isEmpty() )
{
@@ -857,7 +857,7 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
sFullStream,
sRelativeStream,
pFS->getOutputStream(),
- "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
+ u"application/vnd.openxmlformats-officedocument.drawingml.chart+xml"_ustr,
oox::getRelationship(Relationship::CHART),
&sId );
@@ -987,7 +987,7 @@ void ChartExport::exportExternalData( const Reference< css::chart::XChartDocumen
{
try
{
- Any aAny( xDocPropSet->getPropertyValue( "ExternalData" ));
+ Any aAny( xDocPropSet->getPropertyValue( u"ExternalData"_ustr ));
aAny >>= externalDataPath;
}
catch( beans::UnknownPropertyException & )
@@ -1031,7 +1031,7 @@ void ChartExport::exportAdditionalShapes( const Reference< css::chart::XChartDoc
// get a sequence of non-chart shapes
try
{
- Any aShapesAny = xDocPropSet->getPropertyValue("AdditionalShapes");
+ Any aShapesAny = xDocPropSet->getPropertyValue(u"AdditionalShapes"_ustr);
if( (aShapesAny >>= mxAdditionalShapes) && mxAdditionalShapes.is() )
{
OUString sId;
@@ -1079,7 +1079,7 @@ void ChartExport::exportAdditionalShapes( const Reference< css::chart::XChartDoc
sFullStream,
sRelativeStream,
GetFS()->getOutputStream(),
- "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml",
+ u"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml"_ustr,
oox::getRelationship(Relationship::CHARTUSERSHAPES),
&sId);
@@ -1140,9 +1140,9 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC
{
try
{
- Any aAny( xDocPropSet->getPropertyValue("HasMainTitle"));
+ Any aAny( xDocPropSet->getPropertyValue(u"HasMainTitle"_ustr));
aAny >>= bHasMainTitle;
- aAny = xDocPropSet->getPropertyValue("HasLegend");
+ aAny = xDocPropSet->getPropertyValue(u"HasLegend"_ustr);
aAny >>= bHasLegend;
}
catch( beans::UnknownPropertyException & )
@@ -1156,8 +1156,8 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC
if( xPropSubTitle.is())
{
OUString aSubTitle;
- if ((xPropSubTitle->getPropertyValue("String") >>= aSubTitle) && !aSubTitle.isEmpty())
- xPropSubTitle->getPropertyValue("FormattedStrings") >>= xFormattedSubTitle;
+ if ((xPropSubTitle->getPropertyValue(u"String"_ustr) >>= aSubTitle) && !aSubTitle.isEmpty())
+ xPropSubTitle->getPropertyValue(u"FormattedStrings"_ustr) >>= xFormattedSubTitle;
}
// chart element
@@ -1218,7 +1218,7 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC
exportLegend( xChartDoc );
uno::Reference<beans::XPropertySet> xDiagramPropSet(xChartDoc->getDiagram(), uno::UNO_QUERY);
- uno::Any aPlotVisOnly = xDiagramPropSet->getPropertyValue("IncludeHiddenCells");
+ uno::Any aPlotVisOnly = xDiagramPropSet->getPropertyValue(u"IncludeHiddenCells"_ustr);
bool bIncludeHiddenCells = false;
aPlotVisOnly >>= bIncludeHiddenCells;
pFS->singleElement(FSNS(XML_c, XML_plotVisOnly), XML_val, ToPsz10(!bIncludeHiddenCells));
@@ -1234,7 +1234,7 @@ void ChartExport::exportMissingValueTreatment(const uno::Reference<beans::XPrope
return;
sal_Int32 nVal = 0;
- uno::Any aAny = xPropSet->getPropertyValue("MissingValueTreatment");
+ uno::Any aAny = xPropSet->getPropertyValue(u"MissingValueTreatment"_ustr);
if (!(aAny >>= nVal))
return;
@@ -1271,7 +1271,7 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x
css::chart::ChartLegendPosition aLegendPos = css::chart::ChartLegendPosition_NONE;
try
{
- Any aAny( xProp->getPropertyValue( "Alignment" ));
+ Any aAny( xProp->getPropertyValue( u"Alignment"_ustr ));
aAny >>= aLegendPos;
}
catch( beans::UnknownPropertyException & )
@@ -1387,7 +1387,7 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x
}
}
- uno::Any aRelativePos = xProp->getPropertyValue("RelativePosition");
+ uno::Any aRelativePos = xProp->getPropertyValue(u"RelativePosition"_ustr);
if (aRelativePos.hasValue())
{
pFS->startElement(FSNS(XML_c, XML_layout));
@@ -1403,7 +1403,7 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x
pFS->singleElement(FSNS(XML_c, XML_x), XML_val, OString::number(x));
pFS->singleElement(FSNS(XML_c, XML_y), XML_val, OString::number(y));
- uno::Any aRelativeSize = xProp->getPropertyValue("RelativeSize");
+ uno::Any aRelativeSize = xProp->getPropertyValue(u"RelativeSize"_ustr);
if (aRelativeSize.hasValue())
{
chart2::RelativeSize aSize = aRelativeSize.get<chart2::RelativeSize>();
@@ -1424,7 +1424,7 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x
if (strPos != nullptr)
{
- uno::Any aOverlay = xProp->getPropertyValue("Overlay");
+ uno::Any aOverlay = xProp->getPropertyValue(u"Overlay"_ustr);
if(aOverlay.get<bool>())
pFS->singleElement(FSNS(XML_c, XML_overlay), XML_val, "1");
else
@@ -1449,8 +1449,8 @@ void ChartExport::exportTitle( const Reference< XShape >& xShape,
if( xPropSet.is())
{
OUString aTitle;
- if ((xPropSet->getPropertyValue("String") >>= aTitle) && !aTitle.isEmpty())
- xPropSet->getPropertyValue("FormattedStrings") >>= xFormattedTitle;
+ if ((xPropSet->getPropertyValue(u"String"_ustr) >>= aTitle) && !aTitle.isEmpty())
+ xPropSet->getPropertyValue(u"FormattedStrings"_ustr) >>= xFormattedTitle;
}
// tdf#101322: add subtitle to title
@@ -1488,12 +1488,12 @@ void ChartExport::exportTitle( const Reference< XShape >& xShape,
// TODO: bodyPr
const char* sWritingMode = nullptr;
bool bVertical = false;
- xPropSet->getPropertyValue("StackedText") >>= bVertical;
+ xPropSet->getPropertyValue(u"StackedText"_ustr) >>= bVertical;
if( bVertical )
sWritingMode = "wordArtVert";
sal_Int32 nRotation = 0;
- xPropSet->getPropertyValue("TextRotation") >>= nRotation;
+ xPropSet->getPropertyValue(u"TextRotation"_ustr) >>= nRotation;
pFS->singleElement( FSNS( XML_a, XML_bodyPr ),
XML_vert, sWritingMode,
@@ -1547,7 +1547,7 @@ void ChartExport::exportTitle( const Reference< XShape >& xShape,
pFS->endElement( FSNS( XML_c, XML_rich ) );
pFS->endElement( FSNS( XML_c, XML_tx ) );
- uno::Any aManualLayout = xPropSet->getPropertyValue("RelativePosition");
+ uno::Any aManualLayout = xPropSet->getPropertyValue(u"RelativePosition"_ustr);
if (aManualLayout.hasValue())
{
pFS->startElement(FSNS(XML_c, XML_layout));
@@ -1615,7 +1615,7 @@ namespace {
continue;
sal_Int32 nAxisIndex = -1;
- uno::Any aAny = xPropSet->getPropertyValue("AttachedAxisIndex");
+ uno::Any aAny = xPropSet->getPropertyValue(u"AttachedAxisIndex"_ustr);
aAny >>= nAxisIndex;
size_t nVectorPos = 0;
if (nAxisIndexOfFirstSeries == -1)
@@ -1667,11 +1667,11 @@ void ChartExport::exportPlotArea(const Reference< css::chart::XChartDocument >&
Reference<beans::XPropertySet> xWall(mxNewDiagram, uno::UNO_QUERY);
if( xWall.is() )
{
- uno::Any aAny = xWall->getPropertyValue("RelativePosition");
+ uno::Any aAny = xWall->getPropertyValue(u"RelativePosition"_ustr);
if (aAny.hasValue())
{
chart2::RelativePosition aPos = aAny.get<chart2::RelativePosition>();
- aAny = xWall->getPropertyValue("RelativeSize");
+ aAny = xWall->getPropertyValue(u"RelativeSize"_ustr);
chart2::RelativeSize aSize = aAny.get<chart2::RelativeSize>();
uno::Reference< css::chart::XDiagramPositioning > xDiagramPositioning( xChartDoc->getDiagram(), uno::UNO_QUERY );
exportManualLayout(aPos, aSize, xDiagramPositioning->isExcludingDiagramPositioning() );
@@ -1823,7 +1823,7 @@ void ChartExport::exportPlotArea(const Reference< css::chart::XChartDocument >&
Reference< beans::XPropertySet > xWallPropSet = xWallFloorSupplier->getWall();
if( xWallPropSet.is() )
{
- uno::Any aAny = xWallPropSet->getPropertyValue("LineStyle");
+ uno::Any aAny = xWallPropSet->getPropertyValue(u"LineStyle"_ustr);
sal_Int32 eChartType = getChartType( );
// Export LineStyle_NONE instead of default linestyle of PlotArea border, because LibreOffice
// make invisible the Wall shape properties, in case of these charts. Or in the future set
@@ -1831,7 +1831,7 @@ void ChartExport::exportPlotArea(const Reference< css::chart::XChartDocument >&
bool noSupportWallProp = ( (eChartType == chart::TYPEID_PIE) || (eChartType == chart::TYPEID_RADARLINE) || (eChartType == chart::TYPEID_RADARAREA) );
if ( noSupportWallProp && (aAny != drawing::LineStyle_NONE) )
{
- xWallPropSet->setPropertyValue( "LineStyle", uno::Any(drawing::LineStyle_NONE) );
+ xWallPropSet->setPropertyValue( u"LineStyle"_ustr, uno::Any(drawing::LineStyle_NONE) );
}
exportShapeProps( xWallPropSet );
}
@@ -1912,13 +1912,13 @@ void ChartExport::exportManualLayout(const css::chart2::RelativePosition& rPos,
void ChartExport::exportFill( const Reference< XPropertySet >& xPropSet )
{
// Similar to DrawingML::WriteFill, but gradient access via name
- if (!GetProperty( xPropSet, "FillStyle" ))
+ if (!GetProperty( xPropSet, u"FillStyle"_ustr ))
return;
FillStyle aFillStyle(FillStyle_NONE);
mAny >>= aFillStyle;
// map full transparent background to no fill
- if (aFillStyle == FillStyle_SOLID && GetProperty( xPropSet, "FillTransparence" ))
+ if (aFillStyle == FillStyle_SOLID && GetProperty( xPropSet, u"FillTransparence"_ustr ))
{
sal_Int16 nVal = 0;
mAny >>= nVal;
@@ -1927,12 +1927,12 @@ void ChartExport::exportFill( const Reference< XPropertySet >& xPropSet )
}
OUString sFillTransparenceGradientName;
if (aFillStyle == FillStyle_SOLID
- && GetProperty(xPropSet, "FillTransparenceGradientName") && (mAny >>= sFillTransparenceGradientName)
+ && GetProperty(xPropSet, u"FillTransparenceGradientName"_ustr) && (mAny >>= sFillTransparenceGradientName)
&& !sFillTransparenceGradientName.isEmpty())
{
awt::Gradient aTransparenceGradient;
uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
- uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY);
+ uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance(u"com.sun.star.drawing.TransparencyGradientTable"_ustr), uno::UNO_QUERY);
uno::Any rTransparenceValue = xTransparenceGradient->getByName(sFillTransparenceGradientName);
rTransparenceValue >>= aTransparenceGradient;
if (aTransparenceGradient.StartColor == 0xffffff && aTransparenceGradient.EndColor == 0xffffff)
@@ -1966,11 +1966,11 @@ void ChartExport::exportSolidFill(const Reference< XPropertySet >& xPropSet)
// and currently no InteropGrabBag
// get fill color
sal_uInt32 nFillColor = 0;
- if (!GetProperty(xPropSet, "FillColor") || !(mAny >>= nFillColor))
+ if (!GetProperty(xPropSet, u"FillColor"_ustr) || !(mAny >>= nFillColor))
return;
sal_Int32 nAlpha = MAX_PERCENT;
- if (GetProperty( xPropSet, "FillTransparence" ))
+ if (GetProperty( xPropSet, u"FillTransparence"_ustr ))
{
sal_Int32 nTransparency = 0;
mAny >>= nTransparency;
@@ -1983,12 +1983,12 @@ void ChartExport::exportSolidFill(const Reference< XPropertySet >& xPropSet)
bool bNeedGradientFill(false);
OUString sFillTransparenceGradientName;
- if (GetProperty(xPropSet, "FillTransparenceGradientName")
+ if (GetProperty(xPropSet, u"FillTransparenceGradientName"_ustr)
&& (mAny >>= sFillTransparenceGradientName)
&& !sFillTransparenceGradientName.isEmpty())
{
uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
- uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY);
+ uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance(u"com.sun.star.drawing.TransparencyGradientTable"_ustr), uno::UNO_QUERY);
const uno::Any rTransparenceAny = xTransparenceGradient->getByName(sFillTransparenceGradientName);
aTransparenceGradient = model::gradient::getFromAny(rTransparenceAny);
@@ -2022,12 +2022,12 @@ void ChartExport::exportHatch( const Reference< XPropertySet >& xPropSet )
if (!xPropSet.is())
return;
- if (GetProperty(xPropSet, "FillHatchName"))
+ if (GetProperty(xPropSet, u"FillHatchName"_ustr))
{
OUString aHatchName;
mAny >>= aHatchName;
uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
- uno::Reference< container::XNameAccess > xHatchTable( xFact->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xHatchTable( xFact->createInstance(u"com.sun.star.drawing.HatchTable"_ustr), uno::UNO_QUERY );
uno::Any rValue = xHatchTable->getByName(aHatchName);
css::drawing::Hatch aHatch;
rValue >>= aHatch;
@@ -2042,12 +2042,12 @@ void ChartExport::exportBitmapFill( const Reference< XPropertySet >& xPropSet )
return;
OUString sFillBitmapName;
- xPropSet->getPropertyValue("FillBitmapName") >>= sFillBitmapName;
+ xPropSet->getPropertyValue(u"FillBitmapName"_ustr) >>= sFillBitmapName;
uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
try
{
- uno::Reference< container::XNameAccess > xBitmapTable( xFact->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xBitmapTable( xFact->createInstance(u"com.sun.star.drawing.BitmapTable"_ustr), uno::UNO_QUERY );
uno::Any rValue = xBitmapTable->getByName( sFillBitmapName );
if (rValue.has<uno::Reference<awt::XBitmap>>())
{
@@ -2071,12 +2071,12 @@ void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet
return;
OUString sFillGradientName;
- xPropSet->getPropertyValue("FillGradientName") >>= sFillGradientName;
+ xPropSet->getPropertyValue(u"FillGradientName"_ustr) >>= sFillGradientName;
uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
try
{
- uno::Reference< container::XNameAccess > xGradient( xFact->createInstance("com.sun.star.drawing.GradientTable"), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xGradient( xFact->createInstance(u"com.sun.star.drawing.GradientTable"_ustr), uno::UNO_QUERY );
const uno::Any rGradientAny(xGradient->getByName( sFillGradientName ));
const basegfx::BGradient aGradient = model::gradient::getFromAny(rGradientAny);
basegfx::BColor aSingleColor;
@@ -2087,16 +2087,16 @@ void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet
mpFS->startElementNS(XML_a, XML_gradFill);
OUString sFillTransparenceGradientName;
- if( (xPropSet->getPropertyValue("FillTransparenceGradientName") >>= sFillTransparenceGradientName) && !sFillTransparenceGradientName.isEmpty())
+ if( (xPropSet->getPropertyValue(u"FillTransparenceGradientName"_ustr) >>= sFillTransparenceGradientName) && !sFillTransparenceGradientName.isEmpty())
{
- uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY);
+ uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance(u"com.sun.star.drawing.TransparencyGradientTable"_ustr), uno::UNO_QUERY);
const uno::Any rTransparenceAny(xTransparenceGradient->getByName(sFillTransparenceGradientName));
aTransparenceGradient = model::gradient::getFromAny(rTransparenceAny);
WriteGradientFill(&aGradient, 0, &aTransparenceGradient);
}
- else if (GetProperty(xPropSet, "FillTransparence") )
+ else if (GetProperty(xPropSet, u"FillTransparence"_ustr) )
{
// no longer create PseudoTransparencyGradient, use new API of
// WriteGradientFill to express fix transparency
@@ -2133,13 +2133,13 @@ void ChartExport::exportDataTable( )
bool bShowOutline = false;
bool bShowKeys = false;
- if (GetProperty(aPropSet, "HBorder"))
+ if (GetProperty(aPropSet, u"HBorder"_ustr))
mAny >>= bShowHBorder;
- if (GetProperty(aPropSet, "VBorder"))
+ if (GetProperty(aPropSet, u"VBorder"_ustr))
mAny >>= bShowVBorder;
- if (GetProperty(aPropSet, "Outline"))
+ if (GetProperty(aPropSet, u"Outline"_ustr))
mAny >>= bShowOutline;
- if (GetProperty(aPropSet, "Keys"))
+ if (GetProperty(aPropSet, u"Keys"_ustr))
mAny >>= bShowKeys;
pFS->startElement(FSNS(XML_c, XML_dTable));
@@ -2199,7 +2199,7 @@ void ChartExport::exportBarChart(const Reference< chart2::XChartType >& xChartTy
// bar direction
bool bVertical = false;
Reference< XPropertySet > xPropSet(mxDiagram, uno::UNO_QUERY);
- if (GetProperty(xPropSet, "Vertical"))
+ if (GetProperty(xPropSet, u"Vertical"_ustr))
mAny >>= bVertical;
const char* bardir = bVertical ? "bar" : "col";
@@ -2214,7 +2214,7 @@ void ChartExport::exportBarChart(const Reference< chart2::XChartType >& xChartTy
Reference< XPropertySet > xTypeProp(xChartType, uno::UNO_QUERY);
- if (xTypeProp.is() && GetProperty(xTypeProp, "GapwidthSequence"))
+ if (xTypeProp.is() && GetProperty(xTypeProp, u"GapwidthSequence"_ustr))
{
uno::Sequence< sal_Int32 > aBarPositionSequence;
mAny >>= aBarPositionSequence;
@@ -2230,7 +2230,7 @@ void ChartExport::exportBarChart(const Reference< chart2::XChartType >& xChartTy
// Shape
namespace cssc = css::chart;
sal_Int32 nGeom3d = cssc::ChartSolidType::RECTANGULAR_SOLID;
- if (xPropSet.is() && GetProperty(xPropSet, "SolidType"))
+ if (xPropSet.is() && GetProperty(xPropSet, u"SolidType"_ustr))
mAny >>= nGeom3d;
const char* sShapeType = nullptr;
switch (nGeom3d)
@@ -2252,7 +2252,7 @@ void ChartExport::exportBarChart(const Reference< chart2::XChartType >& xChartTy
}
//overlap
- if (!mbIs3DChart && xTypeProp.is() && GetProperty(xTypeProp, "OverlapSequence"))
+ if (!mbIs3DChart && xTypeProp.is() && GetProperty(xTypeProp, u"OverlapSequence"_ustr))
{
uno::Sequence< sal_Int32 > aBarPositionSequence;
mAny >>= aBarPositionSequence;
@@ -2399,7 +2399,7 @@ void ChartExport::exportLineChart( const Reference< chart2::XChartType >& xChart
// show marker?
sal_Int32 nSymbolType = css::chart::ChartSymbolType::NONE;
Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
- if( GetProperty( xPropSet, "SymbolType" ) )
+ if( GetProperty( xPropSet, u"SymbolType"_ustr ) )
mAny >>= nSymbolType;
if( !mbIs3DChart )
@@ -2469,7 +2469,7 @@ void ChartExport::exportScatterChartSeries( const Reference< chart2::XChartType
sal_Int32 nSymbolType = css::chart::ChartSymbolType::NONE;
Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
- if( GetProperty( xPropSet, "SymbolType" ) )
+ if( GetProperty( xPropSet, u"SymbolType"_ustr ) )
mAny >>= nSymbolType;
const char* scatterStyle = "lineMarker";
@@ -2626,7 +2626,7 @@ void ChartExport::exportVaryColors(const Reference<chart2::XChartType>& xChartTy
{
Reference<chart2::XDataSeries> xDataSeries = getPrimaryDataSeries(xChartType);
Reference<beans::XPropertySet> xDataSeriesProps(xDataSeries, uno::UNO_QUERY_THROW);
- Any aAnyVaryColors = xDataSeriesProps->getPropertyValue("VaryColorsByPoint");
+ Any aAnyVaryColors = xDataSeriesProps->getPropertyValue(u"VaryColorsByPoint"_ustr);
bool bVaryColors = false;
aAnyVaryColors >>= bVaryColors;
pFS->singleElement(FSNS(XML_c, XML_varyColors), XML_val, ToPsz10(bVaryColors));
@@ -2668,7 +2668,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY );
OUString aRole;
if( xSeqProp.is())
- xSeqProp->getPropertyValue("Role") >>= aRole;
+ xSeqProp->getPropertyValue(u"Role"_ustr) >>= aRole;
// "main" sequence
if( aRole == aLabelRole )
{
@@ -2700,7 +2700,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
exportSeriesText( xLabelSeq );
Reference<XPropertySet> xPropSet(xDataSeries, UNO_QUERY_THROW);
- if( GetProperty( xPropSet, "AttachedAxisIndex") )
+ if( GetProperty( xPropSet, u"AttachedAxisIndex"_ustr) )
{
sal_Int32 nLocalAttachedAxis = 0;
mAny >>= nLocalAttachedAxis;
@@ -2732,7 +2732,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
case chart::TYPEID_PIE:
case chart::TYPEID_DOUGHNUT:
{
- if( xOldPropSet.is() && GetProperty( xOldPropSet, "SegmentOffset") )
+ if( xOldPropSet.is() && GetProperty( xOldPropSet, u"SegmentOffset"_ustr) )
{
sal_Int32 nOffset = 0;
mAny >>= nOffset;
@@ -2768,14 +2768,14 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
//export error bars here
Reference< XPropertySet > xSeriesPropSet( xSource, uno::UNO_QUERY );
Reference< XPropertySet > xErrorBarYProps;
- xSeriesPropSet->getPropertyValue("ErrorBarY") >>= xErrorBarYProps;
+ xSeriesPropSet->getPropertyValue(u"ErrorBarY"_ustr) >>= xErrorBarYProps;
if(xErrorBarYProps.is())
exportErrorBar(xErrorBarYProps, true);
if (eChartType != chart::TYPEID_BAR &&
eChartType != chart::TYPEID_HORBAR)
{
Reference< XPropertySet > xErrorBarXProps;
- xSeriesPropSet->getPropertyValue("ErrorBarX") >>= xErrorBarXProps;
+ xSeriesPropSet->getPropertyValue(u"ErrorBarX"_ustr) >>= xErrorBarXProps;
if(xErrorBarXProps.is())
exportErrorBar(xErrorBarXProps, false);
}
@@ -2789,7 +2789,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
|| (eChartType == chart::TYPEID_BUBBLE) )
{
// export xVal
- Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, "values-x" ) );
+ Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, u"values-x"_ustr ) );
if( xSequence.is() )
{
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@@ -2803,7 +2803,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
if( eChartType == chart::TYPEID_BUBBLE )
{
// export yVal
- Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, "values-y" ) );
+ Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, u"values-y"_ustr ) );
if( xSequence.is() )
{
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@@ -2977,7 +2977,7 @@ void ChartExport::exportSeriesCategory( const Reference< chart2::data::XDataSequ
if( xAxisXSupp.is())
{
Reference< XPropertySet > xAxisProp = xAxisXSupp->getXAxis();
- if (GetProperty(xAxisProp, "NumberFormat"))
+ if (GetProperty(xAxisProp, u"NumberFormat"_ustr))
{
sal_Int32 nKey = 0;
mAny >>= nKey;
@@ -3040,7 +3040,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen
sal_Int32 ptCount = aValues.size();
pFS->startElement(FSNS(XML_c, XML_numCache));
pFS->startElement(FSNS(XML_c, XML_formatCode));
- OUString sNumberFormatString("General");
+ OUString sNumberFormatString(u"General"_ustr);
const sal_Int32 nKey = xValueSeq.is() ? xValueSeq->getNumberFormatKeyByIndex(-1) : 0;
if (nKey > 0)
sNumberFormatString = getNumberFormatCode(nKey);
@@ -3092,13 +3092,13 @@ void ChartExport::exportTextProps(const Reference<XPropertySet>& xPropSet)
// a sal_Int32 value (see WrappedTextRotationProperty::convertInnerToOuterValue), while
// the former is double. So we could test the contained type to decide which multiplier to
// use. But testing the service info should be more robust.
- if (xServiceInfo->supportsService("com.sun.star.chart.ChartAxis"))
+ if (xServiceInfo->supportsService(u"com.sun.star.chart.ChartAxis"_ustr))
fMultiplier = -600.0;
- else if (xServiceInfo->supportsService("com.sun.star.chart2.DataSeries") || xServiceInfo->supportsService("com.sun.star.chart2.DataPointProperties"))
+ else if (xServiceInfo->supportsService(u"com.sun.star.chart2.DataSeries"_ustr) || xServiceInfo->supportsService(u"com.sun.star.chart2.DataPointProperties"_ustr))
{
fMultiplier = -60000.0;
bool bTextWordWrap = false;
- if ((xPropSet->getPropertyValue("TextWordWrap") >>= bTextWordWrap) && bTextWordWrap)
+ if ((xPropSet->getPropertyValue(u"TextWordWrap"_ustr) >>= bTextWordWrap) && bTextWordWrap)
textWordWrap = "square";
else
textWordWrap = "none";
@@ -3107,7 +3107,7 @@ void ChartExport::exportTextProps(const Reference<XPropertySet>& xPropSet)
if (fMultiplier)
{
double fTextRotation = 0.0;
- uno::Any aAny = xPropSet->getPropertyValue("TextRotation");
+ uno::Any aAny = xPropSet->getPropertyValue(u"TextRotation"_ustr);
if (aAny.hasValue() && (aAny >>= fTextRotation))
{
fTextRotation *= fMultiplier;
@@ -3152,13 +3152,13 @@ void ChartExport::InitPlotArea( )
Reference<lang::XServiceInfo> xServiceInfo (mxDiagram, uno::UNO_QUERY);
if (xServiceInfo.is())
{
- if (xServiceInfo->supportsService("com.sun.star.chart.ChartAxisZSupplier"))
+ if (xServiceInfo->supportsService(u"com.sun.star.chart.ChartAxisZSupplier"_ustr))
{
- xDiagramProperties->getPropertyValue("HasZAxis") >>= mbHasZAxis;
+ xDiagramProperties->getPropertyValue(u"HasZAxis"_ustr) >>= mbHasZAxis;
}
}
- xDiagramProperties->getPropertyValue("Dim3D") >>= mbIs3DChart;
+ xDiagramProperties->getPropertyValue(u"Dim3D"_ustr) >>= mbIs3DChart;
if( mbHasCategoryLabels && mxNewDiagram.is())
{
@@ -3228,19 +3228,19 @@ void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair)
Reference< XPropertySet > xDiagramProperties (mxDiagram, uno::UNO_QUERY);
- xDiagramProperties->getPropertyValue("HasXAxisTitle") >>= bHasXAxisTitle;
- xDiagramProperties->getPropertyValue("HasYAxisTitle") >>= bHasYAxisTitle;
- xDiagramProperties->getPropertyValue("HasZAxisTitle") >>= bHasZAxisTitle;
- xDiagramProperties->getPropertyValue("HasSecondaryXAxisTitle") >>= bHasSecondaryXAxisTitle;
- xDiagramProperties->getPropertyValue("HasSecondaryYAxisTitle") >>= bHasSecondaryYAxisTitle;
+ xDiagramProperties->getPropertyValue(u"HasXAxisTitle"_ustr) >>= bHasXAxisTitle;
+ xDiagramProperties->getPropertyValue(u"HasYAxisTitle"_ustr) >>= bHasYAxisTitle;
+ xDiagramProperties->getPropertyValue(u"HasZAxisTitle"_ustr) >>= bHasZAxisTitle;
+ xDiagramProperties->getPropertyValue(u"HasSecondaryXAxisTitle"_ustr) >>= bHasSecondaryXAxisTitle;
+ xDiagramProperties->getPropertyValue(u"HasSecondaryYAxisTitle"_ustr) >>= bHasSecondaryYAxisTitle;
- xDiagramProperties->getPropertyValue("HasXAxisGrid") >>= bHasXAxisMajorGrid;
- xDiagramProperties->getPropertyValue("HasYAxisGrid") >>= bHasYAxisMajorGrid;
- xDiagramProperties->getPropertyValue("HasZAxisGrid") >>= bHasZAxisMajorGrid;
+ xDiagramProperties->getPropertyValue(u"HasXAxisGrid"_ustr) >>= bHasXAxisMajorGrid;
+ xDiagramProperties->getPropertyValue(u"HasYAxisGrid"_ustr) >>= bHasYAxisMajorGrid;
+ xDiagramProperties->getPropertyValue(u"HasZAxisGrid"_ustr) >>= bHasZAxisMajorGrid;
- xDiagramProperties->getPropertyValue("HasXAxisHelpGrid") >>= bHasXAxisMinorGrid;
- xDiagramProperties->getPropertyValue("HasYAxisHelpGrid") >>= bHasYAxisMinorGrid;
- xDiagramProperties->getPropertyValue("HasZAxisHelpGrid") >>= bHasZAxisMinorGrid;
+ xDiagramProperties->getPropertyValue(u"HasXAxisHelpGrid"_ustr) >>= bHasXAxisMinorGrid;
+ xDiagramProperties->getPropertyValue(u"HasYAxisHelpGrid"_ustr) >>= bHasYAxisMinorGrid;
+ xDiagramProperties->getPropertyValue(u"HasZAxisHelpGrid"_ustr) >>= bHasZAxisMinorGrid;
Reference< XPropertySet > xAxisProp;
Reference< drawing::XShape > xAxisTitle;
@@ -3370,7 +3370,7 @@ void ChartExport::_exportAxis(
pFS->startElement(FSNS(XML_c, XML_scaling));
// logBase, min, max
- if(GetProperty( xAxisProp, "Logarithmic" ) )
+ if(GetProperty( xAxisProp, u"Logarithmic"_ustr ) )
{
bool bLogarithmic = false;
mAny >>= bLogarithmic;
@@ -3383,17 +3383,17 @@ void ChartExport::_exportAxis(
// orientation: minMax, maxMin
bool bReverseDirection = false;
- if(GetProperty( xAxisProp, "ReverseDirection" ) )
+ if(GetProperty( xAxisProp, u"ReverseDirection"_ustr ) )
mAny >>= bReverseDirection;
const char* orientation = bReverseDirection ? "maxMin":"minMax";
pFS->singleElement(FSNS(XML_c, XML_orientation), XML_val, orientation);
bool bAutoMax = false;
- if(GetProperty( xAxisProp, "AutoMax" ) )
+ if(GetProperty( xAxisProp, u"AutoMax"_ustr ) )
mAny >>= bAutoMax;
- if( !bAutoMax && (GetProperty( xAxisProp, "Max" ) ) )
+ if( !bAutoMax && (GetProperty( xAxisProp, u"Max"_ustr ) ) )
{
double dMax = 0;
mAny >>= dMax;
@@ -3401,10 +3401,10 @@ void ChartExport::_exportAxis(
}
bool bAutoMin = false;
- if(GetProperty( xAxisProp, "AutoMin" ) )
+ if(GetProperty( xAxisProp, u"AutoMin"_ustr ) )
mAny >>= bAutoMin;
- if( !bAutoMin && (GetProperty( xAxisProp, "Min" ) ) )
+ if( !bAutoMin && (GetProperty( xAxisProp, u"Min"_ustr ) ) )
{
double dMin = 0;
mAny >>= dMin;
@@ -3416,7 +3416,7 @@ void ChartExport::_exportAxis(
bool bVisible = true;
if( xAxisProp.is() )
{
- xAxisProp->getPropertyValue("Visible") >>= bVisible;
+ xAxisProp->getPropertyValue(u"Visible"_ustr) >>= bVisible;
}
// only export each axis only once non-deleted
@@ -3448,11 +3448,11 @@ void ChartExport::_exportAxis(
exportTitle( xAxisTitle );
bool bLinkedNumFmt = true;
- if (GetProperty(xAxisProp, "LinkNumberFormatToSource"))
+ if (GetProperty(xAxisProp, u"LinkNumberFormatToSource"_ustr))
mAny >>= bLinkedNumFmt;
- OUString aNumberFormatString("General");
- if (GetProperty(xAxisProp, "NumberFormat"))
+ OUString aNumberFormatString(u"General"_ustr);
+ if (GetProperty(xAxisProp, u"NumberFormat"_ustr))
{
sal_Int32 nKey = 0;
mAny >>= nKey;
@@ -3465,7 +3465,7 @@ void ChartExport::_exportAxis(
// majorTickMark
sal_Int32 nValue = 0;
- if(GetProperty( xAxisProp, "Marks" ) )
+ if(GetProperty( xAxisProp, u"Marks"_ustr ) )
{
mAny >>= nValue;
bool bInner = nValue & css::chart::ChartAxisMarks::INNER;
@@ -3482,7 +3482,7 @@ void ChartExport::_exportAxis(
pFS->singleElement(FSNS(XML_c, XML_majorTickMark), XML_val, majorTickMark);
}
// minorTickMark
- if(GetProperty( xAxisProp, "HelpMarks" ) )
+ if(GetProperty( xAxisProp, u"HelpMarks"_ustr ) )
{
mAny >>= nValue;
bool bInner = nValue & css::chart::ChartAxisMarks::INNER;
@@ -3501,9 +3501,9 @@ void ChartExport::_exportAxis(
// tickLblPos
const char* sTickLblPos = nullptr;
bool bDisplayLabel = true;
- if(GetProperty( xAxisProp, "DisplayLabels" ) )
+ if(GetProperty( xAxisProp, u"DisplayLabels"_ustr ) )
mAny >>= bDisplayLabel;
- if( bDisplayLabel && (GetProperty( xAxisProp, "LabelPosition" ) ) )
+ if( bDisplayLabel && (GetProperty( xAxisProp, u"LabelPosition"_ustr ) ) )
{
css::chart::ChartAxisLabelPosition eLabelPosition = css::chart::ChartAxisLabelPosition_NEAR_AXIS;
mAny >>= eLabelPosition;
@@ -3541,7 +3541,7 @@ void ChartExport::_exportAxis(
bool bCrossesValue = false;
const char* sCrosses = nullptr;
// do not export the CrossoverPosition/CrossoverValue, if the axis is deleted and not visible
- if( GetProperty( xAxisProp, "CrossoverPosition" ) && !bDeleted && bVisible )
+ if( GetProperty( xAxisProp, u"CrossoverPosition"_ustr ) && !bDeleted && bVisible )
{
css::chart::ChartAxisPosition ePosition( css::chart::ChartAxisPosition_ZERO );
mAny >>= ePosition;
@@ -3562,7 +3562,7 @@ void ChartExport::_exportAxis(
}
}
- if( bCrossesValue && GetProperty( xAxisProp, "CrossoverValue" ) )
+ if( bCrossesValue && GetProperty( xAxisProp, u"CrossoverValue"_ustr ) )
{
double dValue = 0;
mAny >>= dValue;
@@ -3635,10 +3635,10 @@ void ChartExport::_exportAxis(
// majorUnit
bool bAutoStepMain = false;
- if(GetProperty( xAxisProp, "AutoStepMain" ) )
+ if(GetProperty( xAxisProp, u"AutoStepMain"_ustr ) )
mAny >>= bAutoStepMain;
- if( !bAutoStepMain && (GetProperty( xAxisProp, "StepMain" ) ) )
+ if( !bAutoStepMain && (GetProperty( xAxisProp, u"StepMain"_ustr ) ) )
{
double dMajorUnit = 0;
mAny >>= dMajorUnit;
@@ -3646,14 +3646,14 @@ void ChartExport::_exportAxis(
}
// minorUnit
bool bAutoStepHelp = false;
- if(GetProperty( xAxisProp, "AutoStepHelp" ) )
+ if(GetProperty( xAxisProp, u"AutoStepHelp"_ustr ) )
mAny >>= bAutoStepHelp;
- if( !bAutoStepHelp && (GetProperty( xAxisProp, "StepHelp" ) ) )
+ if( !bAutoStepHelp && (GetProperty( xAxisProp, u"StepHelp"_ustr ) ) )
{
double dMinorUnit = 0;
mAny >>= dMinorUnit;
- if( GetProperty( xAxisProp, "StepHelpCount" ) )
+ if( GetProperty( xAxisProp, u"StepHelpCount"_ustr ) )
{
sal_Int32 dMinorUnitCount = 0;
mAny >>= dMinorUnitCount;
@@ -3668,13 +3668,13 @@ void ChartExport::_exportAxis(
}
}
- if( nAxisType == XML_valAx && GetProperty( xAxisProp, "DisplayUnits" ) )
+ if( nAxisType == XML_valAx && GetProperty( xAxisProp, u"DisplayUnits"_ustr ) )
{
bool bDisplayUnits = false;
mAny >>= bDisplayUnits;
if(bDisplayUnits)
{
- if(GetProperty( xAxisProp, "BuiltInUnit" ))
+ if(GetProperty( xAxisProp, u"BuiltInUnit"_ustr ))
{
OUString aVal;
mAny >>= aVal;
@@ -3748,19 +3748,19 @@ OUString getFieldTypeString( const chart2::DataPointCustomLabelFieldType aType )
switch (aType)
{
case chart2::DataPointCustomLabelFieldType_CATEGORYNAME:
- return "CATEGORYNAME";
+ return u"CATEGORYNAME"_ustr;
case chart2::DataPointCustomLabelFieldType_SERIESNAME:
- return "SERIESNAME";
+ return u"SERIESNAME"_ustr;
case chart2::DataPointCustomLabelFieldType_VALUE:
- return "VALUE";
+ return u"VALUE"_ustr;
case chart2::DataPointCustomLabelFieldType_CELLREF:
- return "CELLREF";
+ return u"CELLREF"_ustr;
case chart2::DataPointCustomLabelFieldType_CELLRANGE:
- return "CELLRANGE";
+ return u"CELLRANGE"_ustr;
default:
break;
@@ -3870,11 +3870,11 @@ void writeLabelProperties( const FSHelperPtr& pFS, ChartExport* pChartExport,
sal_Int32 nLabelBorderColor = 0x00FFFFFF;
sal_Int32 nLabelFillColor = -1;
- xPropSet->getPropertyValue("Label") >>= aLabel;
- xPropSet->getPropertyValue("CustomLabelFields") >>= aCustomLabelFields;
- xPropSet->getPropertyValue("LabelBorderWidth") >>= nLabelBorderWidth;
- xPropSet->getPropertyValue("LabelBorderColor") >>= nLabelBorderColor;
- xPropSet->getPropertyValue("LabelFillColor") >>= nLabelFillColor;
+ xPropSet->getPropertyValue(u"Label"_ustr) >>= aLabel;
+ xPropSet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aCustomLabelFields;
+ xPropSet->getPropertyValue(u"LabelBorderWidth"_ustr) >>= nLabelBorderWidth;
+ xPropSet->getPropertyValue(u"LabelBorderColor"_ustr) >>= nLabelBorderColor;
+ xPropSet->getPropertyValue(u"LabelFillColor"_ustr) >>= nLabelFillColor;
if (nLabelBorderWidth > 0 || nLabelFillColor != -1)
{
@@ -3919,7 +3919,7 @@ void writeLabelProperties( const FSHelperPtr& pFS, ChartExport* pChartExport,
if (rLabelParam.mbExport)
{
sal_Int32 nLabelPlacement = rLabelParam.meDefault;
- if (xPropSet->getPropertyValue("LabelPlacement") >>= nLabelPlacement)
+ if (xPropSet->getPropertyValue(u"LabelPlacement"_ustr) >>= nLabelPlacement)
{
if (!rLabelParam.maAllowedValues.count(nLabelPlacement))
nLabelPlacement = rLabelParam.meDefault;
@@ -3934,7 +3934,7 @@ void writeLabelProperties( const FSHelperPtr& pFS, ChartExport* pChartExport,
pFS->singleElement(FSNS(XML_c, XML_showPercent), XML_val, ToPsz10(aLabel.ShowNumberInPercent));
// Export the text "separator" if exists
- uno::Any aAny = xPropSet->getPropertyValue("LabelSeparator");
+ uno::Any aAny = xPropSet->getPropertyValue(u"LabelSeparator"_ustr);
if( aAny.hasValue() )
{
OUString nLabelSeparator;
@@ -3975,15 +3975,15 @@ void ChartExport::exportDataLabels(
pFS->startElement(FSNS(XML_c, XML_dLbls));
bool bLinkedNumFmt = true;
- if (GetProperty(xPropSet, "LinkNumberFormatToSource"))
+ if (GetProperty(xPropSet, u"LinkNumberFormatToSource"_ustr))
mAny >>= bLinkedNumFmt;
chart2::DataPointLabel aLabel;
bool bLabelIsNumberFormat = true;
- if( xPropSet->getPropertyValue("Label") >>= aLabel )
+ if( xPropSet->getPropertyValue(u"Label"_ustr) >>= aLabel )
bLabelIsNumberFormat = aLabel.ShowNumber;
- if (GetProperty(xPropSet, bLabelIsNumberFormat ? OUString("NumberFormat") : OUString("PercentageNumberFormat")))
+ if (GetProperty(xPropSet, bLabelIsNumberFormat ? u"NumberFormat"_ustr : u"PercentageNumberFormat"_ustr))
{
sal_Int32 nKey = 0;
mAny >>= nKey;
@@ -3996,7 +3996,7 @@ void ChartExport::exportDataLabels(
}
uno::Sequence<sal_Int32> aAttrLabelIndices;
- xPropSet->getPropertyValue("AttributedDataPoints") >>= aAttrLabelIndices;
+ xPropSet->getPropertyValue(u"AttributedDataPoints"_ustr) >>= aAttrLabelIndices;
// We must not export label placement property when the chart type doesn't
// support this option in MS Office, else MS Office would think the file
@@ -4056,7 +4056,7 @@ void ChartExport::exportDataLabels(
if( eChartType != chart::TYPEID_PIE )
{
chart2::RelativePosition aCustomLabelPosition;
- if( xLabelPropSet->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition )
+ if( xLabelPropSet->getPropertyValue(u"CustomLabelPosition"_ustr) >>= aCustomLabelPosition )
{
pFS->startElement(FSNS(XML_c, XML_layout));
pFS->startElement(FSNS(XML_c, XML_manualLayout));
@@ -4071,15 +4071,15 @@ void ChartExport::exportDataLabels(
}
}
- if( GetProperty(xLabelPropSet, "LinkNumberFormatToSource") )
+ if( GetProperty(xLabelPropSet, u"LinkNumberFormatToSource"_ustr) )
mAny >>= bLinkedNumFmt;
- if( xLabelPropSet->getPropertyValue("Label") >>= aLabel )
+ if( xLabelPropSet->getPropertyValue(u"Label"_ustr) >>= aLabel )
bLabelIsNumberFormat = aLabel.ShowNumber;
else
bLabelIsNumberFormat = true;
- if (GetProperty(xLabelPropSet, bLabelIsNumberFormat ? OUString("NumberFormat") : OUString("PercentageNumberFormat")))
+ if (GetProperty(xLabelPropSet, bLabelIsNumberFormat ? u"NumberFormat"_ustr : u"PercentageNumberFormat"_ustr))
{
sal_Int32 nKey = 0;
mAny >>= nKey;
@@ -4099,7 +4099,7 @@ void ChartExport::exportDataLabels(
writeLabelProperties(pFS, this, xPropSet, aParam, -1, rDLblsRange);
bool bShowLeaderLines = false;
- xPropSet->getPropertyValue("ShowCustomLeaderLines") >>= bShowLeaderLines;
+ xPropSet->getPropertyValue(u"ShowCustomLeaderLines"_ustr) >>= bShowLeaderLines;
pFS->singleElement(FSNS(XML_c, XML_showLeaderLines), XML_val, ToPsz10(bShowLeaderLines));
// Export leader line
@@ -4123,9 +4123,9 @@ void ChartExport::exportDataPoints(
Sequence< sal_Int32 > aDataPointSeq;
if( xSeriesProperties.is())
{
- Any aAny = xSeriesProperties->getPropertyValue( "AttributedDataPoints" );
+ Any aAny = xSeriesProperties->getPropertyValue( u"AttributedDataPoints"_ustr );
aAny >>= aDataPointSeq;
- xSeriesProperties->getPropertyValue( "VaryColorsByPoint" ) >>= bVaryColorsByPoint;
+ xSeriesProperties->getPropertyValue( u"VaryColorsByPoint"_ustr ) >>= bVaryColorsByPoint;
}
const sal_Int32 * pPoints = aDataPointSeq.getConstArray();
@@ -4173,7 +4173,7 @@ void ChartExport::exportDataPoints(
case chart::TYPEID_PIE:
case chart::TYPEID_DOUGHNUT:
{
- if( xPropSet.is() && GetProperty( xPropSet, "SegmentOffset") )
+ if( xPropSet.is() && GetProperty( xPropSet, u"SegmentOffset"_ustr) )
{
sal_Int32 nOffset = 0;
mAny >>= nOffset;
@@ -4295,9 +4295,9 @@ void ChartExport::exportGrouping( bool isBar )
FSHelperPtr pFS = GetFS();
Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
// grouping
- if( GetProperty( xPropSet, "Stacked" ) )
+ if( GetProperty( xPropSet, u"Stacked"_ustr ) )
mAny >>= mbStacked;
- if( GetProperty( xPropSet, "Percent" ) )
+ if( GetProperty( xPropSet, u"Percent"_ustr ) )
mAny >>= mbPercent;
const char* grouping = nullptr;
@@ -4350,7 +4350,7 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
pFS->startElement(FSNS(XML_c, XML_trendline));
OUString aName;
- xProperties->getPropertyValue("CurveName") >>= aName;
+ xProperties->getPropertyValue(u"CurveName"_ustr) >>= aName;
if(!aName.isEmpty())
{
pFS->startElement(FSNS(XML_c, XML_name));
@@ -4381,7 +4381,7 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "poly");
sal_Int32 aDegree = 2;
- xProperties->getPropertyValue( "PolynomialDegree") >>= aDegree;
+ xProperties->getPropertyValue( u"PolynomialDegree"_ustr) >>= aDegree;
pFS->singleElement(FSNS(XML_c, XML_order), XML_val, OString::number(aDegree));
}
else if( aService == "com.sun.star.chart2.MovingAverageRegressionCurve" )
@@ -4389,7 +4389,7 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "movingAvg");
sal_Int32 aPeriod = 2;
- xProperties->getPropertyValue( "MovingAveragePeriod") >>= aPeriod;
+ xProperties->getPropertyValue( u"MovingAveragePeriod"_ustr) >>= aPeriod;
pFS->singleElement(FSNS(XML_c, XML_period), XML_val, OString::number(aPeriod));
}
@@ -4403,8 +4403,8 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
double fExtrapolateForward = 0.0;
double fExtrapolateBackward = 0.0;
- xProperties->getPropertyValue("ExtrapolateForward") >>= fExtrapolateForward;
- xProperties->getPropertyValue("ExtrapolateBackward") >>= fExtrapolateBackward;
+ xProperties->getPropertyValue(u"ExtrapolateForward"_ustr) >>= fExtrapolateForward;
+ xProperties->getPropertyValue(u"ExtrapolateBackward"_ustr) >>= fExtrapolateBackward;
pFS->singleElement( FSNS( XML_c, XML_forward ),
XML_val, OString::number(fExtrapolateForward) );
@@ -4413,12 +4413,12 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
XML_val, OString::number(fExtrapolateBackward) );
bool bForceIntercept = false;
- xProperties->getPropertyValue("ForceIntercept") >>= bForceIntercept;
+ xProperties->getPropertyValue(u"ForceIntercept"_ustr) >>= bForceIntercept;
if (bForceIntercept)
{
double fInterceptValue = 0.0;
- xProperties->getPropertyValue("InterceptValue") >>= fInterceptValue;
+ xProperties->getPropertyValue(u"InterceptValue"_ustr) >>= fInterceptValue;
pFS->singleElement( FSNS( XML_c, XML_intercept ),
XML_val, OString::number(fInterceptValue) );
@@ -4429,11 +4429,11 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
// Show Equation
bool bShowEquation = false;
- xEquationProperties->getPropertyValue("ShowEquation") >>= bShowEquation;
+ xEquationProperties->getPropertyValue(u"ShowEquation"_ustr) >>= bShowEquation;
// Show R^2
bool bShowCorrelationCoefficient = false;
- xEquationProperties->getPropertyValue("ShowCorrelationCoefficient") >>= bShowCorrelationCoefficient;
+ xEquationProperties->getPropertyValue(u"ShowCorrelationCoefficient"_ustr) >>= bShowCorrelationCoefficient;
pFS->singleElement( FSNS( XML_c, XML_dispRSqr ),
XML_val, ToPsz10(bShowCorrelationCoefficient) );
@@ -4447,7 +4447,7 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
void ChartExport::exportMarker(const Reference< XPropertySet >& xPropSet)
{
chart2::Symbol aSymbol;
- if( GetProperty( xPropSet, "Symbol" ) )
+ if( GetProperty( xPropSet, u"Symbol"_ustr ) )
mAny >>= aSymbol;
if(aSymbol.Style != chart2::SymbolStyle_STANDARD && aSymbol.Style != chart2::SymbolStyle_NONE)
@@ -4516,7 +4516,7 @@ void ChartExport::exportMarker(const Reference< XPropertySet >& xPropSet)
pFS->startElement(FSNS(XML_c, XML_spPr));
util::Color aColor = aSymbol.FillColor;
- if (GetProperty(xPropSet, "Color"))
+ if (GetProperty(xPropSet, u"Color"_ustr))
mAny >>= aColor;
if (aColor == -1)
@@ -4537,7 +4537,7 @@ void ChartExport::exportSmooth()
FSHelperPtr pFS = GetFS();
Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY );
sal_Int32 nSplineType = 0;
- if( GetProperty( xPropSet, "SplineType" ) )
+ if( GetProperty( xPropSet, u"SplineType"_ustr ) )
mAny >>= nSplineType;
const char* pVal = nSplineType != 0 ? "1" : "0";
pFS->singleElement(FSNS(XML_c, XML_smooth), XML_val, pVal);
@@ -4548,7 +4548,7 @@ void ChartExport::exportFirstSliceAng( )
FSHelperPtr pFS = GetFS();
sal_Int32 nStartingAngle = 0;
Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
- if( GetProperty( xPropSet, "StartingAngle" ) )
+ if( GetProperty( xPropSet, u"StartingAngle"_ustr ) )
mAny >>= nStartingAngle;
// convert to ooxml angle
@@ -4601,7 +4601,7 @@ Reference< chart2::data::XDataSequence> getLabeledSequence(
uno::Reference< chart2::data::XDataSequence > xSequence( rSequence->getValues());
uno::Reference< beans::XPropertySet > xSeqProp( xSequence, uno::UNO_QUERY_THROW );
OUString aRole;
- if( ( xSeqProp->getPropertyValue( "Role" ) >>= aRole ) &&
+ if( ( xSeqProp->getPropertyValue( u"Role"_ustr ) >>= aRole ) &&
aRole.match( "error-bars" ) && aRole.indexOf(aDirection) >= 0 )
{
return xSequence;
@@ -4617,7 +4617,7 @@ Reference< chart2::data::XDataSequence> getLabeledSequence(
void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps, bool bYError)
{
sal_Int32 nErrorBarStyle = cssc::ErrorBarStyle::NONE;
- xErrorBarProps->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle;
+ xErrorBarProps->getPropertyValue(u"ErrorBarStyle"_ustr) >>= nErrorBarStyle;
const char* pErrorBarStyle = getErrorBarStyle(nErrorBarStyle);
if(!pErrorBarStyle)
return;
@@ -4626,8 +4626,8 @@ void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps,
pFS->startElement(FSNS(XML_c, XML_errBars));
pFS->singleElement(FSNS(XML_c, XML_errDir), XML_val, bYError ? "y" : "x");
bool bPositive = false, bNegative = false;
- xErrorBarProps->getPropertyValue("ShowPositiveError") >>= bPositive;
- xErrorBarProps->getPropertyValue("ShowNegativeError") >>= bNegative;
+ xErrorBarProps->getPropertyValue(u"ShowPositiveError"_ustr) >>= bPositive;
+ xErrorBarProps->getPropertyValue(u"ShowNegativeError"_ustr) >>= bNegative;
const char* pErrBarType;
if(bPositive && bNegative)
pErrBarType = "both";
@@ -4665,14 +4665,14 @@ void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps,
double nVal = 0.0;
if(nErrorBarStyle == cssc::ErrorBarStyle::STANDARD_DEVIATION)
{
- xErrorBarProps->getPropertyValue("Weight") >>= nVal;
+ xErrorBarProps->getPropertyValue(u"Weight"_ustr) >>= nVal;
}
else
{
if(bPositive)
- xErrorBarProps->getPropertyValue("PositiveError") >>= nVal;
+ xErrorBarProps->getPropertyValue(u"PositiveError"_ustr) >>= nVal;
else
- xErrorBarProps->getPropertyValue("NegativeError") >>= nVal;
+ xErrorBarProps->getPropertyValue(u"NegativeError"_ustr) >>= nVal;
}
pFS->singleElement(FSNS(XML_c, XML_val), XML_val, OString::number(nVal));
@@ -4692,7 +4692,7 @@ void ChartExport::exportView3D()
pFS->startElement(FSNS(XML_c, XML_view3D));
sal_Int32 eChartType = getChartType( );
// rotX
- if( GetProperty( xPropSet, "RotationHorizontal" ) )
+ if( GetProperty( xPropSet, u"RotationHorizontal"_ustr ) )
{
sal_Int32 nRotationX = 0;
mAny >>= nRotationX;
@@ -4711,10 +4711,10 @@ void ChartExport::exportView3D()
pFS->singleElement(FSNS(XML_c, XML_rotX), XML_val, OString::number(nRotationX));
}
// rotY
- if( GetProperty( xPropSet, "RotationVertical" ) )
+ if( GetProperty( xPropSet, u"RotationVertical"_ustr ) )
{
// Y rotation (map Chart2 [-179,180] to OOXML [0..359])
- if( eChartType == chart::TYPEID_PIE && GetProperty( xPropSet, "StartingAngle" ) )
+ if( eChartType == chart::TYPEID_PIE && GetProperty( xPropSet, u"StartingAngle"_ustr ) )
{
// Y rotation used as 'first pie slice angle' in 3D pie charts
sal_Int32 nStartingAngle=0;
@@ -4734,7 +4734,7 @@ void ChartExport::exportView3D()
}
}
// rAngAx
- if( GetProperty( xPropSet, "RightAngledAxes" ) )
+ if( GetProperty( xPropSet, u"RightAngledAxes"_ustr ) )
{
bool bRightAngled = false;
mAny >>= bRightAngled;
@@ -4742,7 +4742,7 @@ void ChartExport::exportView3D()
pFS->singleElement(FSNS(XML_c, XML_rAngAx), XML_val, sRightAngled);
}
// perspective
- if( GetProperty( xPropSet, "Perspective" ) )
+ if( GetProperty( xPropSet, u"Perspective"_ustr ) )
{
sal_Int32 nPerspective = 0;
mAny >>= nPerspective;
@@ -4759,7 +4759,7 @@ bool ChartExport::isDeep3dChart()
if( mbIs3DChart )
{
Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
- if( GetProperty( xPropSet, "Deep" ) )
+ if( GetProperty( xPropSet, u"Deep"_ustr ) )
mAny >>= isDeep;
}
return isDeep;
@@ -4771,7 +4771,7 @@ OUString ChartExport::getNumberFormatCode(sal_Int32 nKey) const
* SvNumberFormatter instances and NfKeywordTable should be member
* variables and initialized only once. */
- OUString aCode("General"); // init with fallback
+ OUString aCode(u"General"_ustr); // init with fallback
uno::Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(mxChartModel, uno::UNO_QUERY_THROW);
SvNumberFormatsSupplierObj* pSupplierObj = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( xNumberFormatsSupplier);
if (!pSupplierObj)
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 01b8c6c2827e..42bda5729098 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -206,7 +206,7 @@ static css::uno::Any getLineDash( const css::uno::Reference<css::frame::XModel>&
{
css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xModel, css::uno::UNO_QUERY);
css::uno::Reference<css::container::XNameAccess> xNameAccess(
- xFact->createInstance("com.sun.star.drawing.DashTable"),
+ xFact->createInstance(u"com.sun.star.drawing.DashTable"_ustr),
css::uno::UNO_QUERY );
if(xNameAccess.is())
{
@@ -445,7 +445,7 @@ void DrawingML::WriteSolidFill( const ::Color nColor, const Sequence< PropertyVa
void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
{
// get fill color
- if ( !GetProperty( rXPropSet, "FillColor" ) )
+ if ( !GetProperty( rXPropSet, u"FillColor"_ustr ) )
return;
sal_uInt32 nFillColor = mAny.get<sal_uInt32>();
@@ -453,7 +453,7 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
OUString sColorFillScheme;
sal_uInt32 nOriginalColor = 0;
Sequence< PropertyValue > aStyleProperties, aTransformations;
- if ( GetProperty( rXPropSet, "InteropGrabBag" ) )
+ if ( GetProperty( rXPropSet, u"InteropGrabBag"_ustr ) )
{
Sequence< PropertyValue > aGrabBag;
mAny >>= aGrabBag;
@@ -471,7 +471,7 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
}
sal_Int32 nAlpha = MAX_PERCENT;
- if( GetProperty( rXPropSet, "FillTransparence" ) )
+ if( GetProperty( rXPropSet, u"FillTransparence"_ustr ) )
{
sal_Int32 nTransparency = 0;
mAny >>= nTransparency;
@@ -485,10 +485,10 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
OUString sFillTransparenceGradientName;
bool bNeedGradientFill(false);
- if (GetProperty(rXPropSet, "FillTransparenceGradientName")
+ if (GetProperty(rXPropSet, u"FillTransparenceGradientName"_ustr)
&& (mAny >>= sFillTransparenceGradientName)
&& !sFillTransparenceGradientName.isEmpty()
- && GetProperty(rXPropSet, "FillTransparenceGradient"))
+ && GetProperty(rXPropSet, u"FillTransparenceGradient"_ustr))
{
aTransparenceGradient = model::gradient::getFromAny(mAny);
basegfx::BColor aSingleColor;
@@ -576,9 +576,9 @@ bool DrawingML::WriteSchemeColor(OUString const& rPropertyName, const uno::Refer
}
// Alpha is actually not contained in maTransformations although possible (as of Mar 2023).
sal_Int16 nAPITransparency(0);
- if ((rPropertyName == u"FillComplexColor" && GetProperty(xPropertySet, "FillTransparence"))
- || (rPropertyName == u"LineComplexColor" && GetProperty(xPropertySet, "LineTransparence"))
- || (rPropertyName == u"CharComplexColor" && GetProperty(xPropertySet, "CharTransparence")))
+ if ((rPropertyName == u"FillComplexColor" && GetProperty(xPropertySet, u"FillTransparence"_ustr))
+ || (rPropertyName == u"LineComplexColor" && GetProperty(xPropertySet, u"LineTransparence"_ustr))
+ || (rPropertyName == u"CharComplexColor" && GetProperty(xPropertySet, u"CharTransparence"_ustr)))
{
mAny >>= nAPITransparency;
}
@@ -610,7 +610,7 @@ void DrawingML::WriteGradientStop(double fOffset, const basegfx::BColor& rColor,
void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet )
{
- if (!GetProperty(rXPropSet, "FillGradient"))
+ if (!GetProperty(rXPropSet, u"FillGradient"_ustr))
return;
// use BGradient constructor directly, it will take care of Gradient/Gradient2
@@ -619,7 +619,7 @@ void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet )
// get InteropGrabBag and search the relevant attributes
basegfx::BGradient aOriginalGradient;
Sequence< PropertyValue > aGradientStops;
- if ( GetProperty( rXPropSet, "InteropGrabBag" ) )
+ if ( GetProperty( rXPropSet, u"InteropGrabBag"_ustr ) )
{
Sequence< PropertyValue > aGrabBag;
mAny >>= aGrabBag;
@@ -652,16 +652,16 @@ void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet )
double fTransparency(0.0);
OUString sFillTransparenceGradientName;
- if (GetProperty(rXPropSet, "FillTransparenceGradientName")
+ if (GetProperty(rXPropSet, u"FillTransparenceGradientName"_ustr)
&& (mAny >>= sFillTransparenceGradientName)
&& !sFillTransparenceGradientName.isEmpty()
- && GetProperty(rXPropSet, "FillTransparenceGradient"))
+ && GetProperty(rXPropSet, u"FillTransparenceGradient"_ustr))
{
// TransparenceGradient is only used when name is not empty
aTransparenceGradient = model::gradient::getFromAny(mAny);
pTransparenceGradient = &aTransparenceGradient;
}
- else if (GetProperty(rXPropSet, "FillTransparence"))
+ else if (GetProperty(rXPropSet, u"FillTransparence"_ustr))
{
// no longer create PseudoTransparencyGradient, use new API of
// WriteGradientFill to express fix transparency
@@ -674,7 +674,7 @@ void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet )
// tdf#155852 The gradient might wrongly have StepCount==0, as the draw:gradient-step-count
// attribute in ODF does not belong to the gradient definition but is an attribute in
// the graphic style of the shape.
- if (GetProperty(rXPropSet, "FillGradientStepCount"))
+ if (GetProperty(rXPropSet, u"FillGradientStepCount"_ustr))
{
sal_Int16 nStepCount = 0;
mAny >>= nStepCount;
@@ -945,10 +945,10 @@ void DrawingML::WriteLineArrow( const Reference< XPropertySet >& rXPropSet, bool
void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Reference< frame::XModel > const & xModel )
{
drawing::LineStyle aLineStyle( drawing::LineStyle_NONE );
- if (GetProperty(rXPropSet, "LineStyle"))
+ if (GetProperty(rXPropSet, u"LineStyle"_ustr))
mAny >>= aLineStyle;
- const LineCap aLineCap = GetProperty(rXPropSet, "LineCap") ? mAny.get<drawing::LineCap>() : LineCap_BUTT;
+ const LineCap aLineCap = GetProperty(rXPropSet, u"LineCap"_ustr) ? mAny.get<drawing::LineCap>() : LineCap_BUTT;
sal_uInt32 nLineWidth = 0;
sal_uInt32 nEmuLineWidth = 0;
@@ -975,7 +975,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
drawing::LineStyle aStyleLineStyle(drawing::LineStyle_NONE);
drawing::LineJoint aStyleLineJoint(drawing::LineJoint_NONE);
- if (GetProperty(rXPropSet, "InteropGrabBag"))
+ if (GetProperty(rXPropSet, u"InteropGrabBag"_ustr))
{
Sequence<PropertyValue> aGrabBag;
mAny >>= aGrabBag;
@@ -1008,7 +1008,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
}
}
- if (GetProperty(rXPropSet, "LineWidth"))
+ if (GetProperty(rXPropSet, u"LineWidth"_ustr))
mAny >>= nLineWidth;
switch (aLineStyle)
@@ -1017,13 +1017,13 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
bNoFill = true;
break;
case drawing::LineStyle_DASH:
- if (GetProperty(rXPropSet, "LineDash"))
+ if (GetProperty(rXPropSet, u"LineDash"_ustr))
{
aLineDash = mAny.get<drawing::LineDash>();
//this query is good for shapes, but in the case of charts it returns 0 values
if (aLineDash.Dots == 0 && aLineDash.DotLen == 0 && aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 0) {
OUString aLineDashName;
- if (GetProperty(rXPropSet, "LineDashName"))
+ if (GetProperty(rXPropSet, u"LineDashName"_ustr))
mAny >>= aLineDashName;
if (!aLineDashName.isEmpty() && xModel) {
css::uno::Any aAny = getLineDash(xModel, aLineDashName);
@@ -1035,7 +1035,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
{
//export the linestyle of chart wall (plot area) and chart page
OUString aLineDashName;
- if (GetProperty(rXPropSet, "LineDashName"))
+ if (GetProperty(rXPropSet, u"LineDashName"_ustr))
mAny >>= aLineDashName;
if (!aLineDashName.isEmpty() && xModel) {
css::uno::Any aAny = getLineDash(xModel, aLineDashName);
@@ -1054,12 +1054,12 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
[[fallthrough]];
case drawing::LineStyle_SOLID:
default:
- if (GetProperty(rXPropSet, "LineColor"))
+ if (GetProperty(rXPropSet, u"LineColor"_ustr))
{
nColor = ::Color(ColorTransparency, mAny.get<sal_uInt32>() & 0xffffff);
bColorSet = true;
}
- if (GetProperty(rXPropSet, "LineTransparence"))
+ if (GetProperty(rXPropSet, u"LineTransparence"_ustr))
{
nColorAlpha = MAX_PERCENT - (mAny.get<sal_Int16>() * PER_PERCENT);
}
@@ -1241,7 +1241,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
}
}
- if (!bNoFill && nLineWidth > 1 && GetProperty(rXPropSet, "LineJoint"))
+ if (!bNoFill && nLineWidth > 1 && GetProperty(rXPropSet, u"LineJoint"_ustr))
{
LineJoint eLineJoint = mAny.get<LineJoint>();
@@ -1741,18 +1741,18 @@ void DrawingML::WriteImageBrightnessContrastTransparence(uno::Reference<beans::X
sal_Int32 nContrast = 0;
sal_Int32 nTransparence = 0;
- if (GetProperty(rXPropSet, "AdjustLuminance"))
+ if (GetProperty(rXPropSet, u"AdjustLuminance"_ustr))
nBright = mAny.get<sal_Int16>();
- if (GetProperty(rXPropSet, "AdjustContrast"))
+ if (GetProperty(rXPropSet, u"AdjustContrast"_ustr))
nContrast = mAny.get<sal_Int32>();
// Used for shapes with picture fill
- if (GetProperty(rXPropSet, "FillTransparence"))
+ if (GetProperty(rXPropSet, u"FillTransparence"_ustr))
nTransparence = mAny.get<sal_Int32>();
// Used for pictures
- if (nTransparence == 0 && GetProperty(rXPropSet, "Transparency"))
+ if (nTransparence == 0 && GetProperty(rXPropSet, u"Transparency"_ustr))
nTransparence = static_cast<sal_Int32>(mAny.get<sal_Int16>());
- if (GetProperty(rXPropSet, "GraphicColorMode"))
+ if (GetProperty(rXPropSet, u"GraphicColorMode"_ustr))
{
drawing::ColorMode aColorMode;
mAny >>= aColorMode;
@@ -1821,7 +1821,7 @@ void DrawingML::WriteXGraphicBlipMode(uno::Reference<beans::XPropertySet> const
css::awt::Size const& rSize)
{
BitmapMode eBitmapMode(BitmapMode_NO_REPEAT);
- if (GetProperty(rXPropSet, "FillBitmapMode"))
+ if (GetProperty(rXPropSet, u"FillBitmapMode"_ustr))
mAny >>= eBitmapMode;
SAL_INFO("oox.shape", "fill bitmap mode: " << int(eBitmapMode));
@@ -1909,7 +1909,7 @@ void DrawingML::WriteXGraphicBlipFill(uno::Reference<beans::XPropertySet> const
{
WriteXGraphicBlipMode(rXPropSet, rxGraphic, rSize);
}
- else if(GetProperty(rXPropSet, "FillBitmapStretch"))
+ else if(GetProperty(rXPropSet, u"FillBitmapStretch"_ustr))
{
bool bStretch = mAny.get<bool>();
@@ -1923,7 +1923,7 @@ void DrawingML::WriteXGraphicBlipFill(uno::Reference<beans::XPropertySet> const
void DrawingML::WritePattFill( const Reference< XPropertySet >& rXPropSet )
{
- if ( GetProperty( rXPropSet, "FillHatch" ) )
+ if ( GetProperty( rXPropSet, u"FillHatch"_ustr ) )
{
drawing::Hatch aHatch;
mAny >>= aHatch;
@@ -1936,7 +1936,7 @@ void DrawingML::WritePattFill(const Reference<XPropertySet>& rXPropSet, const cs
mpFS->startElementNS(XML_a, XML_pattFill, XML_prst, GetHatchPattern(rHatch));
sal_Int32 nAlpha = MAX_PERCENT;
- if (GetProperty(rXPropSet, "FillTransparence"))
+ if (GetProperty(rXPropSet, u"FillTransparence"_ustr))
{
sal_Int32 nTransparency = 0;
mAny >>= nTransparency;
@@ -1949,13 +1949,13 @@ void DrawingML::WritePattFill(const Reference<XPropertySet>& rXPropSet, const cs
::Color nColor = COL_WHITE;
- if ( GetProperty( rXPropSet, "FillBackground" ) )
+ if ( GetProperty( rXPropSet, u"FillBackground"_ustr ) )
{
bool isBackgroundFilled = false;
mAny >>= isBackgroundFilled;
if( isBackgroundFilled )
{
- if( GetProperty( rXPropSet, "FillColor" ) )
+ if( GetProperty( rXPropSet, u"FillColor"_ustr ) )
{
mAny >>= nColor;
}
@@ -1975,13 +1975,13 @@ void DrawingML::WriteGraphicCropProperties(uno::Reference<beans::XPropertySet> c
Size const & rOriginalSize,
MapMode const & rMapMode)
{
- if (!GetProperty(rXPropSet, "GraphicCrop"))
+ if (!GetProperty(rXPropSet, u"GraphicCrop"_ustr))
return;
css::text::GraphicCrop aGraphicCropStruct;
mAny >>= aGraphicCropStruct;
- if(GetProperty(rXPropSet, "CustomShapeGeometry"))
+ if(GetProperty(rXPropSet, u"CustomShapeGeometry"_ustr))
{
// tdf#134210 GraphicCrop property is handled in import filter because of LibreOffice has not core
// feature. We cropped the bitmap physically and MSO shouldn't crop bitmap one more time. When we
@@ -2030,7 +2030,7 @@ void DrawingML::WriteXGraphicStretch(uno::Reference<beans::XPropertySet> const &
mpFS->startElementNS(XML_a, XML_stretch);
bool bCrop = false;
- if (GetProperty(rXPropSet, "GraphicCrop"))
+ if (GetProperty(rXPropSet, u"GraphicCrop"_ustr))
{
css::text::GraphicCrop aGraphicCropStruct;
mAny >>= aGraphicCropStruct;
@@ -2110,10 +2110,10 @@ void DrawingML::WriteXGraphicTile(uno::Reference<beans::XPropertySet> const& rXP
MapMode(MapUnit::Map100thMM));
sal_Int32 nSizeX = 0;
sal_Int32 nOffsetX = 0;
- if (GetProperty(rXPropSet, "FillBitmapSizeX"))
+ if (GetProperty(rXPropSet, u"FillBitmapSizeX"_ustr))
{
mAny >>= nSizeX;
- if (GetProperty(rXPropSet, "FillBitmapPositionOffsetX"))
+ if (GetProperty(rXPropSet, u"FillBitmapPositionOffsetX"_ustr))
{
sal_Int32 nX = (nSizeX != 0) ? nSizeX : aOriginalSize.Width();
if (nX < 0 && rSize.Width > 0)
@@ -2132,10 +2132,10 @@ void DrawingML::WriteXGraphicTile(uno::Reference<beans::XPropertySet> const& rXP
sal_Int32 nSizeY = 0;
sal_Int32 nOffsetY = 0;
- if (GetProperty(rXPropSet, "FillBitmapSizeY"))
+ if (GetProperty(rXPropSet, u"FillBitmapSizeY"_ustr))
{
mAny >>= nSizeY;
- if (GetProperty(rXPropSet, "FillBitmapPositionOffsetY"))
+ if (GetProperty(rXPropSet, u"FillBitmapPositionOffsetY"_ustr))
{
sal_Int32 nY = (nSizeY != 0) ? nSizeY : aOriginalSize.Height();
if (nY < 0 && rSize.Height > 0)
@@ -2168,7 +2168,7 @@ void DrawingML::WriteXGraphicTile(uno::Reference<beans::XPropertySet> const& rXP
}
OUString sRectanglePoint;
- if (GetProperty(rXPropSet, "FillBitmapRectanglePoint"))
+ if (GetProperty(rXPropSet, u"FillBitmapRectanglePoint"_ustr))
sRectanglePoint = lclConvertRectanglePointToToken(*o3tl::doAccess<RectanglePoint>(mAny));
mpFS->singleElementNS(XML_a, XML_tile, XML_tx, OUString::number(nOffsetX), XML_ty,
@@ -2188,7 +2188,7 @@ void DrawingML::WriteXGraphicCustomPosition(uno::Reference<beans::XPropertySet>
aOriginalSize = Application::GetDefaultDevice()->PixelToLogic(aOriginalSize,
MapMode(MapUnit::Map100thMM));
double nSizeX = 0;
- if (GetProperty(rXPropSet, "FillBitmapSizeX"))
+ if (GetProperty(rXPropSet, u"FillBitmapSizeX"_ustr))
{
mAny >>= nSizeX;
if (nSizeX <= 0)
@@ -2201,7 +2201,7 @@ void DrawingML::WriteXGraphicCustomPosition(uno::Reference<beans::XPropertySet>
}
double nSizeY = 0;
- if (GetProperty(rXPropSet, "FillBitmapSizeY"))
+ if (GetProperty(rXPropSet, u"FillBitmapSizeY"_ustr))
{
mAny >>= nSizeY;
if (nSizeY <= 0)
@@ -2220,7 +2220,7 @@ void DrawingML::WriteXGraphicCustomPosition(uno::Reference<beans::XPropertySet>
}
sal_Int32 nL = 0, nT = 0, nR = 0, nB = 0;
- if (GetProperty(rXPropSet, "FillBitmapRectanglePoint") && rSize.Width != 0 && rSize.Height != 0)
+ if (GetProperty(rXPropSet, u"FillBitmapRectanglePoint"_ustr) && rSize.Width != 0 && rSize.Height != 0)
{
sal_Int32 nWidth = (1 - (nSizeX / rSize.Width)) * 100000;
sal_Int32 nHeight = (1 - (nSizeY / rSize.Height)) * 100000;
@@ -2356,10 +2356,10 @@ void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sa
// The RotateAngle property's value is independent from any flipping, and that's exactly what we need here.
uno::Reference<beans::XPropertySet> xPropertySet(rXShape, uno::UNO_QUERY);
uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
- if (xPropertySetInfo->hasPropertyByName("RotateAngle"))
+ if (xPropertySetInfo->hasPropertyByName(u"RotateAngle"_ustr))
{
sal_Int32 nTmp;
- if (xPropertySet->getPropertyValue("RotateAngle") >>= nTmp)
+ if (xPropertySet->getPropertyValue(u"RotateAngle"_ustr) >>= nTmp)
nRotation = Degree100(nTmp);
}
@@ -2481,7 +2481,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
{
nSize = rnCharHeight;
}
- else if (GetProperty(rXPropSet, "CharHeight"))
+ else if (GetProperty(rXPropSet, u"CharHeight"_ustr))
{
nSize = static_cast<sal_Int32>(100*(*o3tl::doAccess<float>(mAny)));
if ( nElement == XML_rPr || nElement == XML_defRPr )
@@ -2491,7 +2491,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
}
}
- if (GetProperty(rXPropSet, "CharKerning"))
+ if (GetProperty(rXPropSet, u"CharKerning"_ustr))
nCharKerning = static_cast<sal_Int32>(*o3tl::doAccess<sal_Int16>(mAny));
/** While setting values in propertymap,
* CharKerning converted using GetTextSpacingPoint
@@ -2501,15 +2501,15 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
**/
nCharKerning = toTextSpacingPoint(nCharKerning);
- if ((bComplex && GetProperty(rXPropSet, "CharWeightComplex"))
- || GetProperty(rXPropSet, "CharWeight"))
+ if ((bComplex && GetProperty(rXPropSet, u"CharWeightComplex"_ustr))
+ || GetProperty(rXPropSet, u"CharWeight"_ustr))
{
if ( *o3tl::doAccess<float>(mAny) >= awt::FontWeight::SEMIBOLD )
bold = "1";
}
- if ((bComplex && GetProperty(rXPropSet, "CharPostureComplex"))
- || GetProperty(rXPropSet, "CharPosture"))
+ if ((bComplex && GetProperty(rXPropSet, u"CharPostureComplex"_ustr))
+ || GetProperty(rXPropSet, u"CharPosture"_ustr))
switch ( *o3tl::doAccess<awt::FontSlant>(mAny) )
{
case awt::FontSlant_OBLIQUE :
@@ -2520,9 +2520,9 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
break;
}
- if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, "CharUnderline", eState)
+ if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, u"CharUnderline"_ustr, eState)
&& eState == beans::PropertyState_DIRECT_VALUE)
- || GetProperty(rXPropSet, "CharUnderline"))
+ || GetProperty(rXPropSet, u"CharUnderline"_ustr))
{
switch ( *o3tl::doAccess<sal_Int16>(mAny) )
{
@@ -2580,9 +2580,9 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
}
}
- if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, "CharStrikeout", eState)
+ if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, u"CharStrikeout"_ustr, eState)
&& eState == beans::PropertyState_DIRECT_VALUE)
- || GetProperty(rXPropSet, "CharStrikeout"))
+ || GetProperty(rXPropSet, u"CharStrikeout"_ustr))
{
switch ( *o3tl::doAccess<sal_Int16>(mAny) )
{
@@ -2612,11 +2612,11 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
switch(nScriptType)
{
case css::i18n::ScriptType::ASIAN:
- bLang = GetProperty(rXPropSet, "CharLocaleAsian"); break;
+ bLang = GetProperty(rXPropSet, u"CharLocaleAsian"_ustr); break;
case css::i18n::ScriptType::COMPLEX:
- bLang = GetProperty(rXPropSet, "CharLocaleComplex"); break;
+ bLang = GetProperty(rXPropSet, u"CharLocaleComplex"_ustr); break;
default:
- bLang = GetProperty(rXPropSet, "CharLocale"); break;
+ bLang = GetProperty(rXPropSet, u"CharLocale"_ustr); break;
}
if (bLang)
@@ -2628,11 +2628,11 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
usLanguage = aLanguageTag.getBcp47MS();
}
- if (GetPropertyAndState(rXPropSet, rXPropState, "CharEscapement", eState)
+ if (GetPropertyAndState(rXPropSet, rXPropState, u"CharEscapement"_ustr, eState)
&& eState == beans::PropertyState_DIRECT_VALUE)
mAny >>= nCharEscapement;
- if (GetPropertyAndState(rXPropSet, rXPropState, "CharEscapementHeight", eState)
+ if (GetPropertyAndState(rXPropSet, rXPropState, u"CharEscapementHeight"_ustr, eState)
&& eState == beans::PropertyState_DIRECT_VALUE)
mAny >>= nCharEscapementHeight;
@@ -2658,7 +2658,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
nSize = (nSize / 0.58);
}
- if (GetProperty(rXPropSet, "CharCaseMap"))
+ if (GetProperty(rXPropSet, u"CharCaseMap"_ustr))
{
switch ( *o3tl::doAccess<sal_Int16>(mAny) )
{
@@ -2688,31 +2688,31 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
if (IsFontworkShape(rXShapePropSet))
{
WriteOutline(rXShapePropSet);
- WriteBlipOrNormalFill(rXShapePropSet, "Graphic");
+ WriteBlipOrNormalFill(rXShapePropSet, u"Graphic"_ustr);
WriteShapeEffects(rXShapePropSet);
}
else
{
// mso doesn't like text color to be placed after typeface
- if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, "CharColor", eState)
+ if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, u"CharColor"_ustr, eState)
&& eState == beans::PropertyState_DIRECT_VALUE)
- || GetProperty(rXPropSet, "CharColor"))
+ || GetProperty(rXPropSet, u"CharColor"_ustr))
{
::Color color( ColorTransparency, *o3tl::doAccess<sal_uInt32>(mAny) );
SAL_INFO("oox.shape", "run color: " << sal_uInt32(color) << " auto: " << sal_uInt32(COL_AUTO));
// WriteSolidFill() handles MAX_PERCENT as "no transparency".
sal_Int32 nTransparency = MAX_PERCENT;
- if (rXPropSet->getPropertySetInfo()->hasPropertyByName("CharTransparence"))
+ if (rXPropSet->getPropertySetInfo()->hasPropertyByName(u"CharTransparence"_ustr))
{
- rXPropSet->getPropertyValue("CharTransparence") >>= nTransparency;
+ rXPropSet->getPropertyValue(u"CharTransparence"_ustr) >>= nTransparency;
// UNO scale is 0..100, OOXML scale is 0..100000; also UNO tracks transparency, OOXML
// tracks opacity.
nTransparency = MAX_PERCENT - (nTransparency * PER_PERCENT);
}
bool bContoured = false;
- if (GetProperty(rXPropSet, "CharContoured"))
+ if (GetProperty(rXPropSet, u"CharContoured"_ustr))
bContoured = *o3tl::doAccess<bool>(mAny);
// tdf#127696 If the CharContoured is true, then the text color is white and the outline color is the CharColor.
@@ -2748,9 +2748,9 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
{
// Resolve COL_AUTO for PPTX since MS Powerpoint doesn't have automatic colors.
bool bIsTextBackgroundDark = mbIsBackgroundDark;
- if (rXShapePropSet.is() && GetProperty(rXShapePropSet, "FillStyle")
+ if (rXShapePropSet.is() && GetProperty(rXShapePropSet, u"FillStyle"_ustr)
&& mAny.get<FillStyle>() != FillStyle_NONE
- && GetProperty(rXShapePropSet, "FillColor"))
+ && GetProperty(rXShapePropSet, u"FillColor"_ustr))
{
::Color aShapeFillColor(ColorTransparency, mAny.get<sal_uInt32>());
bIsTextBackgroundDark = aShapeFillColor.IsDark();
@@ -2768,7 +2768,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
// so make sure this code is only run when exporting to pptx, just in case
if (GetDocumentType() == DOCUMENT_PPTX)
{
- if (GetProperty(rXPropSet, "CharBackColor"))
+ if (GetProperty(rXPropSet, u"CharBackColor"_ustr))
{
::Color color(ColorTransparency, *o3tl::doAccess<sal_uInt32>(mAny));
if( color != COL_AUTO )
@@ -2782,9 +2782,9 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
if (underline
&& ((bCheckDirect
- && GetPropertyAndState(rXPropSet, rXPropState, "CharUnderlineColor", eState)
+ && GetPropertyAndState(rXPropSet, rXPropState, u"CharUnderlineColor"_ustr, eState)
&& eState == beans::PropertyState_DIRECT_VALUE)
- || GetProperty(rXPropSet, "CharUnderlineColor")))
+ || GetProperty(rXPropSet, u"CharUnderlineColor"_ustr)))
{
::Color color(ColorTransparency, *o3tl::doAccess<sal_uInt32>(mAny));
// if color is automatic, then we shouldn't write information about color but to take color from character
@@ -2800,7 +2800,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
}
}
- if (GetProperty(rXPropSet, "CharFontName"))
+ if (GetProperty(rXPropSet, u"CharFontName"_ustr))
{
const char* const pitch = nullptr;
const char* const charset = nullptr;
@@ -2818,10 +2818,10 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
}
if ((bComplex
- && (GetPropertyAndState(rXPropSet, rXPropState, "CharFontNameComplex", eState)
+ && (GetPropertyAndState(rXPropSet, rXPropState, u"CharFontNameComplex"_ustr, eState)
&& eState == beans::PropertyState_DIRECT_VALUE))
|| (!bComplex
- && (GetPropertyAndState(rXPropSet, rXPropState, "CharFontNameAsian", eState)
+ && (GetPropertyAndState(rXPropSet, rXPropState, u"CharFontNameAsian"_ustr, eState)
&& eState == beans::PropertyState_DIRECT_VALUE)))
{
const char* const pitch = nullptr;
@@ -2842,14 +2842,14 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
if( bIsField )
{
Reference< XTextField > rXTextField;
- if (GetProperty(rXPropSet, "TextField"))
+ if (GetProperty(rXPropSet, u"TextField"_ustr))
mAny >>= rXTextField;
if( rXTextField.is() )
rXPropSet.set( rXTextField, UNO_QUERY );
}
// field properties starts here
- if (GetProperty(rXPropSet, "URL"))
+ if (GetProperty(rXPropSet, u"URL"_ustr))
{
OUString sURL;
@@ -2890,7 +2890,7 @@ OUString DrawingML::GetFieldValue( const css::uno::Reference< css::text::XTextRa
Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
OUString aFieldType, aFieldValue;
- if (GetProperty(rXPropSet, "TextPortionType"))
+ if (GetProperty(rXPropSet, u"TextPortionType"_ustr))
{
aFieldType = *o3tl::doAccess<OUString>(mAny);
SAL_INFO("oox.shape", "field type: " << aFieldType);
@@ -2899,7 +2899,7 @@ OUString DrawingML::GetFieldValue( const css::uno::Reference< css::text::XTextRa
if( aFieldType == "TextField" )
{
Reference< XTextField > rXTextField;
- if (GetProperty(rXPropSet, "TextField"))
+ if (GetProperty(rXPropSet, u"TextField"_ustr))
mAny >>= rXTextField;
if( rXTextField.is() )
{
@@ -2923,7 +2923,7 @@ OUString DrawingML::GetFieldValue( const css::uno::Reference< css::text::XTextRa
else if( aFieldKind == "URL" )
{
bIsURLField = true;
- if (GetProperty(rXPropSet, "Representation"))
+ if (GetProperty(rXPropSet, u"Representation"_ustr))
mAny >>= aFieldValue;
}
@@ -3034,13 +3034,13 @@ OUString DrawingML::GetDatetimeTypeFromDateTime(SvxDateFormat eDate, SvxTimeForm
{
if (aTimeField == "datetime11" || aTimeField == "datetime13")
// only datetime format that has Date and HH:MM:SS
- return "datetime9"; // dd/mm/yyyy H:MM:SS
+ return u"datetime9"_ustr; // dd/mm/yyyy H:MM:SS
else
// only datetime format that has Date and HH:MM
- return "datetime8"; // dd/mm/yyyy H:MM
+ return u"datetime8"_ustr; // dd/mm/yyyy H:MM
}
else
- return "";
+ return u""_ustr;
}
void DrawingML::WriteRun( const Reference< XTextRange >& rRun,
@@ -3049,15 +3049,15 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun,
{
Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
sal_Int16 nLevel = -1;
- if (GetProperty(rXPropSet, "NumberingLevel"))
+ if (GetProperty(rXPropSet, u"NumberingLevel"_ustr))
mAny >>= nLevel;
bool bNumberingIsNumber = true;
- if (GetProperty(rXPropSet, "NumberingIsNumber"))
+ if (GetProperty(rXPropSet, u"NumberingIsNumber"_ustr))
mAny >>= bNumberingIsNumber;
float nFontSize = -1;
- if (GetProperty(rXPropSet, "CharHeight"))
+ if (GetProperty(rXPropSet, u"CharHeight"_ustr))
mAny >>= nFontSize;
bool bIsURLField = false;
@@ -3079,7 +3079,7 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun,
try
{
- if( !xPropSet.is() || !( xPropSet->getPropertyValue( "PlaceholderText" ) >>= sText ) )
+ if( !xPropSet.is() || !( xPropSet->getPropertyValue( u"PlaceholderText"_ustr ) >>= sText ) )
return;
if( sText.isEmpty() )
return;
@@ -3161,7 +3161,7 @@ static OUString GetAutoNumType(SvxNumType nNumberingType, bool bSDot, bool bPBeh
case SVX_NUM_ARABIC :
{
if (sPrefixSuffix.isEmpty())
- return "arabicPlain";
+ return u"arabicPlain"_ustr;
else
return "arabic" + sPrefixSuffix;
}
@@ -3174,7 +3174,7 @@ static OUString GetAutoNumType(SvxNumType nNumberingType, bool bSDot, bool bPBeh
void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropSet, float fFirstCharHeight, sal_Int16 nLevel )
{
- if (nLevel < 0 || !GetProperty(rXPropSet, "NumberingRules"))
+ if (nLevel < 0 || !GetProperty(rXPropSet, u"NumberingRules"_ustr))
return;
Reference< XIndexAccess > rXIndexAccess;
@@ -3352,7 +3352,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
void DrawingML::WriteParagraphTabStops(const Reference<XPropertySet>& rXPropSet)
{
css::uno::Sequence<css::style::TabStop> aTabStops;
- if (GetProperty(rXPropSet, "ParaTabStops"))
+ if (GetProperty(rXPropSet, u"ParaTabStops"_ustr))
aTabStops = *o3tl::doAccess<css::uno::Sequence<css::style::TabStop>>(mAny);
if (aTabStops.getLength() > 0)
@@ -3389,14 +3389,14 @@ bool DrawingML::IsGroupShape( const Reference< XShape >& rXShape )
if ( rXShape.is() )
{
uno::Reference<lang::XServiceInfo> xServiceInfo(rXShape, uno::UNO_QUERY_THROW);
- bRet = xServiceInfo->supportsService("com.sun.star.drawing.GroupShape");
+ bRet = xServiceInfo->supportsService(u"com.sun.star.drawing.GroupShape"_ustr);
}
return bRet;
}
sal_Int32 DrawingML::getBulletMarginIndentation (const Reference< XPropertySet >& rXPropSet,sal_Int16 nLevel, std::u16string_view propName)
{
- if (nLevel < 0 || !GetProperty(rXPropSet, "NumberingRules"))
+ if (nLevel < 0 || !GetProperty(rXPropSet, u"NumberingRules"_ustr))
return 0;
Reference< XIndexAccess > rXIndexAccess;
@@ -3476,7 +3476,7 @@ bool DrawingML::WriteParagraphProperties(const Reference<XTextContent>& rParagra
return false;
sal_Int16 nLevel = -1;
- if (GetProperty(rXPropSet, "NumberingLevel"))
+ if (GetProperty(rXPropSet, u"NumberingLevel"_ustr))
mAny >>= nLevel;
bool bWriteNumbering = true;
@@ -3489,14 +3489,14 @@ bool DrawingML::WriteParagraphProperties(const Reference<XTextContent>& rParagra
bool bNumberingOnThisLevel = false;
if (nLevel > -1)
{
- Reference< XIndexAccess > xNumberingRules(rXPropSet->getPropertyValue("NumberingRules"), UNO_QUERY);
+ Reference< XIndexAccess > xNumberingRules(rXPropSet->getPropertyValue(u"NumberingRules"_ustr), UNO_QUERY);
const PropertyValues& rNumRuleOfLevel = xNumberingRules->getByIndex(nLevel).get<PropertyValues>();
for (const PropertyValue& rRule : rNumRuleOfLevel)
if (rRule.Name == "NumberingType" && rRule.Value.hasValue())
bNumberingOnThisLevel = rRule.Value.get<sal_uInt16>() != style::NumberingType::NUMBER_NONE;
}
- const bool bIsNumberingVisible = rXPropSet->getPropertyValue("NumberingIsNumber").get<bool>();
+ const bool bIsNumberingVisible = rXPropSet->getPropertyValue(u"NumberingIsNumber"_ustr).get<bool>();
const bool bIsLineEmpty = !xParaText->getString().getLength();
bWriteNumbering = !bIsLineEmpty && bIsNumberingVisible && (nLevel != -1);
@@ -3506,13 +3506,13 @@ bool DrawingML::WriteParagraphProperties(const Reference<XTextContent>& rParagra
}
sal_Int16 nTmp = sal_Int16(style::ParagraphAdjust_LEFT);
- if (GetProperty(rXPropSet, "ParaAdjust"))
+ if (GetProperty(rXPropSet, u"ParaAdjust"_ustr))
mAny >>= nTmp;
style::ParagraphAdjust nAlignment = static_cast<style::ParagraphAdjust>(nTmp);
bool bHasLinespacing = false;
LineSpacing aLineSpacing;
- if (GetPropertyAndState(rXPropSet, rXPropState, "ParaLineSpacing", eState)
+ if (GetPropertyAndState(rXPropSet, rXPropState, u"ParaLineSpacing"_ustr, eState)
&& (mAny >>= aLineSpacing)
&& (eState == beans::PropertyState_DIRECT_VALUE ||
// only export if it differs from the default 100% line spacing
@@ -3520,7 +3520,7 @@ bool DrawingML::WriteParagraphProperties(const Reference<XTextContent>& rParagra
bHasLinespacing = true;
bool bRtl = false;
- if (GetProperty(rXPropSet, "WritingMode"))
+ if (GetProperty(rXPropSet, u"WritingMode"_ustr))
{
sal_Int16 nWritingMode;
if( ( mAny >>= nWritingMode ) && nWritingMode == text::WritingMode2::RL_TB )
@@ -3532,17 +3532,17 @@ bool DrawingML::WriteParagraphProperties(const Reference<XTextContent>& rParagra
sal_Int32 nParaLeftMargin = 0;
sal_Int32 nParaFirstLineIndent = 0;
- if (GetProperty(rXPropSet, "ParaLeftMargin"))
+ if (GetProperty(rXPropSet, u"ParaLeftMargin"_ustr))
mAny >>= nParaLeftMargin;
- if (GetProperty(rXPropSet, "ParaFirstLineIndent"))
+ if (GetProperty(rXPropSet, u"ParaFirstLineIndent"_ustr))
mAny >>= nParaFirstLineIndent;
sal_Int32 nParaTopMargin = 0;
sal_Int32 nParaBottomMargin = 0;
- if (GetProperty(rXPropSet, "ParaTopMargin"))
+ if (GetProperty(rXPropSet, u"ParaTopMargin"_ustr))
mAny >>= nParaTopMargin;
- if (GetProperty(rXPropSet, "ParaBottomMargin"))
+ if (GetProperty(rXPropSet, u"ParaBottomMargin"_ustr))
mAny >>= nParaBottomMargin;
sal_Int32 nLeftMargin = getBulletMarginIndentation ( rXPropSet, nLevel,u"LeftMargin");
@@ -3557,7 +3557,7 @@ bool DrawingML::WriteParagraphProperties(const Reference<XTextContent>& rParagra
}
sal_Int32 nParaDefaultTabSize = 0;
- if (GetProperty(rXPropSet, "ParaTabStopDefaultDistance"))
+ if (GetProperty(rXPropSet, u"ParaTabStopDefaultDistance"_ustr))
mAny >>= nParaDefaultTabSize;
if (nParaLeftMargin) // For Paragraph
@@ -3645,8 +3645,8 @@ void DrawingML::WriteLstStyles(const css::uno::Reference<css::text::XTextContent
Reference<XPropertySetInfo> xFirstRunPropSetInfo
= xFirstRunPropSet->getPropertySetInfo();
- if (xFirstRunPropSetInfo->hasPropertyByName("CharHeight"))
- fFirstCharHeight = xFirstRunPropSet->getPropertyValue("CharHeight").get<float>();
+ if (xFirstRunPropSetInfo->hasPropertyByName(u"CharHeight"_ustr))
+ fFirstCharHeight = xFirstRunPropSet->getPropertyValue(u"CharHeight"_ustr).get<float>();
mpFS->startElementNS(XML_a, XML_lstStyle);
if( !WriteParagraphProperties(rParagraph, fFirstCharHeight, XML_lvl1pPr) )
@@ -3685,9 +3685,9 @@ void DrawingML::WriteParagraph( const Reference< XTextContent >& rParagraph,
float fFirstCharHeight = rnCharHeight / 1000.;
Reference< XPropertySet > xFirstRunPropSet (run, UNO_QUERY);
Reference< XPropertySetInfo > xFirstRunPropSetInfo = xFirstRunPropSet->getPropertySetInfo();
- if( xFirstRunPropSetInfo->hasPropertyByName("CharHeight") )
+ if( xFirstRunPropSetInfo->hasPropertyByName(u"CharHeight"_ustr) )
{
- fFirstCharHeight = xFirstRunPropSet->getPropertyValue("CharHeight").get<float>();
+ fFirstCharHeight = xFirstRunPropSet->getPropertyValue(u"CharHeight"_ustr).get<float>();
rnCharHeight = 100 * fFirstCharHeight;
rbOverridingCharHeight = true;
}
@@ -3711,7 +3711,7 @@ bool DrawingML::IsFontworkShape(const css::uno::Reference<css::beans::XPropertyS
if (rXShapePropSet.is())
{
Sequence<PropertyValue> aCustomShapeGeometryProps;
- if (GetProperty(rXShapePropSet, "CustomShapeGeometry"))
+ if (GetProperty(rXShapePropSet, u"CustomShapeGeometry"_ustr))
{
mAny >>= aCustomShapeGeometryProps;
uno::Sequence<beans::PropertyValue> aTextPathSeq;
@@ -3756,13 +3756,13 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
// top inset looks a bit different compared to ppt export
// check if something related doesn't work as expected
- if (GetProperty(rXPropSet, "TextLeftDistance"))
+ if (GetProperty(rXPropSet, u"TextLeftDistance"_ustr))
mAny >>= nLeft;
- if (GetProperty(rXPropSet, "TextRightDistance"))
+ if (GetProperty(rXPropSet, u"TextRightDistance"_ustr))
mAny >>= nRight;
- if (GetProperty(rXPropSet, "TextUpperDistance"))
+ if (GetProperty(rXPropSet, u"TextUpperDistance"_ustr))
mAny >>= nTop;
- if (GetProperty(rXPropSet, "TextLowerDistance"))
+ if (GetProperty(rXPropSet, u"TextLowerDistance"_ustr))
mAny >>= nBottom;
// Transform the text distance values so they are compatible with OOXML insets
@@ -3793,13 +3793,13 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
}
std::optional<OString> sWritingMode;
- if (GetProperty(rXPropSet, "TextWritingMode"))
+ if (GetProperty(rXPropSet, u"TextWritingMode"_ustr))
{
WritingMode eMode;
if( ( mAny >>= eMode ) && eMode == WritingMode_TB_RL )
sWritingMode = "eaVert";
}
- if (GetProperty(rXPropSet, "WritingMode"))
+ if (GetProperty(rXPropSet, u"WritingMode"_ustr))
{
sal_Int16 nWritingMode;
if (mAny >>= nWritingMode)
@@ -3821,12 +3821,12 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
Sequence<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentSeq;
uno::Sequence<beans::PropertyValue> aTextPathSeq;
bool bScaleX(false);
- OUString sShapeType("non-primitive");
+ OUString sShapeType(u"non-primitive"_ustr);
OUString sMSWordPresetTextWarp;
sal_Int32 nTextPreRotateAngle = 0; // degree
std::optional<Degree100> nTextRotateAngleDeg100; // text area rotation
- if (GetProperty(rXPropSet, "CustomShapeGeometry"))
+ if (GetProperty(rXPropSet, u"CustomShapeGeometry"_ustr))
{
Sequence< PropertyValue > aProps;
if ( mAny >>= aProps )
@@ -3869,7 +3869,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
if (xTextFrame)
{
uno::Reference<beans::XPropertySet> xPropSet(xTextFrame, uno::UNO_QUERY);
- auto aAny = xPropSet->getPropertyValue("WritingMode");
+ auto aAny = xPropSet->getPropertyValue(u"WritingMode"_ustr);
sal_Int16 nWritingMode;
if (aAny >>= nWritingMode)
{
@@ -3901,10 +3901,10 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
std::optional<OUString> sVertOverflow;
bool bUpright = false;
std::optional<OString> isUpright;
- if (rXPropSet->getPropertySetInfo()->hasPropertyByName("InteropGrabBag"))
+ if (rXPropSet->getPropertySetInfo()->hasPropertyByName(u"InteropGrabBag"_ustr))
{
uno::Sequence<beans::PropertyValue> aGrabBag;
- rXPropSet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ rXPropSet->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag;
for (const auto& aProp : aGrabBag)
{
if (aProp.Name == "Upright")
@@ -3949,7 +3949,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
if (bUpright)
{
Degree100 nShapeRotateAngleDeg100(0_deg100);
- if (GetProperty(rXPropSet, "RotateAngle"))
+ if (GetProperty(rXPropSet, u"RotateAngle"_ustr))
nShapeRotateAngleDeg100 = Degree100(mAny.get<sal_Int32>());
// Depending on shape rotation, the import has made 90deg changes to properties
// "TextPreRotateAngle" and "TextRotateAngle". Revert it.
@@ -4057,10 +4057,10 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
// LibreOffice has 12 value sets, MS Office only 6. We map them so, that it reverses the
// 6 mappings from import, and we assign the others approximately.
TextVerticalAdjust eVerticalAlignment(TextVerticalAdjust_TOP);
- if (GetProperty(rXPropSet, "TextVerticalAdjust"))
+ if (GetProperty(rXPropSet, u"TextVerticalAdjust"_ustr))
mAny >>= eVerticalAlignment;
TextHorizontalAdjust eHorizontalAlignment(TextHorizontalAdjust_CENTER);
- if (GetProperty(rXPropSet, "TextHorizontalAdjust"))
+ if (GetProperty(rXPropSet, u"TextHorizontalAdjust"_ustr))
mAny >>= eHorizontalAlignment;
const char* sAnchor = nullptr;
@@ -4095,7 +4095,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
bool bHasWrap = false;
bool bWrap = false;
// Only custom shapes obey the TextWordWrap option, normal text always wraps.
- if (dynamic_cast<SvxCustomShape*>(rXIface.get()) && GetProperty(rXPropSet, "TextWordWrap"))
+ if (dynamic_cast<SvxCustomShape*>(rXIface.get()) && GetProperty(rXPropSet, u"TextWordWrap"_ustr))
{
mAny >>= bWrap;
bHasWrap = true;
@@ -4126,14 +4126,14 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
// TextShape's automatic word wrapping, then we need to set
// wrapping to square.
uno::Reference<lang::XServiceInfo> xServiceInfo(rXIface, uno::UNO_QUERY);
- if ((xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.drawing.TextShape"))
+ if ((xServiceInfo.is() && xServiceInfo->supportsService(u"com.sun.star.drawing.TextShape"_ustr))
|| bIsFontworkShape)
pWrap = "square";
}
sal_Int16 nCols = 0;
sal_Int32 nColSpacing = -1;
- if (GetProperty(rXPropSet, "TextColumns"))
+ if (GetProperty(rXPropSet, u"TextColumns"_ustr))
{
if (css::uno::Reference<css::text::XTextColumns> xCols{ mAny, css::uno::UNO_QUERY })
{
@@ -4141,19 +4141,19 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
if (css::uno::Reference<css::beans::XPropertySet> xProps{ mAny,
css::uno::UNO_QUERY })
{
- if (GetProperty(xProps, "AutomaticDistance"))
+ if (GetProperty(xProps, u"AutomaticDistance"_ustr))
mAny >>= nColSpacing;
}
}
}
- if (!sVertOverflow && GetProperty(rXPropSet, "TextClipVerticalOverflow") && mAny.get<bool>())
+ if (!sVertOverflow && GetProperty(rXPropSet, u"TextClipVerticalOverflow"_ustr) && mAny.get<bool>())
{
sVertOverflow = "clip";
}
// tdf#151134 When writing placeholder shapes, inset must be explicitly specified
- bool bRequireInset = GetProperty(rXPropSet, "IsPresentationObject") && rXPropSet->getPropertyValue("IsPresentationObject").get<bool>();
+ bool bRequireInset = GetProperty(rXPropSet, u"IsPresentationObject"_ustr) && rXPropSet->getPropertyValue(u"IsPresentationObject"_ustr).get<bool>();
mpFS->startElementNS( (nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr,
XML_numCol, sax_fastparser::UseIf(OString::number(nCols), nCols > 0),
@@ -4256,7 +4256,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
// tdf#112312: only custom shapes obey the TextAutoGrowHeight option
bool bTextAutoGrowHeight = false;
auto pSdrObjCustomShape = xShape.is() ? dynamic_cast<SdrObjCustomShape*>(SdrObject::getSdrObjectFromXShape(xShape)) : nullptr;
- if (pSdrObjCustomShape && GetProperty(rXPropSet, "TextAutoGrowHeight"))
+ if (pSdrObjCustomShape && GetProperty(rXPropSet, u"TextAutoGrowHeight"_ustr))
{
mAny >>= bTextAutoGrowHeight;
}
@@ -4265,7 +4265,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
if (GetDocumentType() == DOCUMENT_PPTX)
{
TextFitToSizeType eFit = TextFitToSizeType_NONE;
- if (GetProperty(rXPropSet, "TextFitToSize"))
+ if (GetProperty(rXPropSet, u"TextFitToSize"_ustr))
mAny >>= eFit;
if (eFit == TextFitToSizeType_AUTOFIT)
@@ -4300,7 +4300,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
{
// tdf#127030: Only custom shapes obey the TextAutoGrowHeight option.
bool bTextAutoGrowHeight = false;
- if (dynamic_cast<SvxCustomShape*>(rXIface.get()) && GetProperty(rXPropSet, "TextAutoGrowHeight"))
+ if (dynamic_cast<SvxCustomShape*>(rXIface.get()) && GetProperty(rXPropSet, u"TextAutoGrowHeight"_ustr))
mAny >>= bTextAutoGrowHeight;
mpFS->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit));
}
@@ -4440,7 +4440,7 @@ static std::map< OString, std::vector<OString> > lcl_getAdjNames()
{
std::map< OString, std::vector<OString> > aRet;
- OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-adj-names");
+ OUString aPath(u"$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-adj-names"_ustr);
rtl::Bootstrap::expandMacros(aPath);
SvFileStream aStream(aPath, StreamMode::READ);
if (aStream.GetError() != ERRCODE_NONE)
@@ -4679,7 +4679,7 @@ bool DrawingML::WriteCustomGeometry(
try
{
- aAny = aXPropSet->getPropertyValue( "CustomShapeGeometry" );
+ aAny = aXPropSet->getPropertyValue( u"CustomShapeGeometry"_ustr );
if ( !aAny.hasValue() )
return false;
}
@@ -5314,10 +5314,10 @@ void DrawingML::WritePolyPolygon(const css::uno::Reference<css::drawing::XShape>
awt::Point aPos = rXShape->getPosition();
Reference<XPropertySet> xPropertySet(rXShape, UNO_QUERY);
uno::Reference<XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
- if (xPropertySetInfo->hasPropertyByName("AnchorPosition"))
+ if (xPropertySetInfo->hasPropertyByName(u"AnchorPosition"_ustr))
{
awt::Point aAnchorPosition;
- xPropertySet->getPropertyValue("AnchorPosition") >>= aAnchorPosition;
+ xPropertySet->getPropertyValue(u"AnchorPosition"_ustr) >>= aAnchorPosition;
aPos.X += aAnchorPosition.X;
aPos.Y += aAnchorPosition.Y;
}
@@ -5436,20 +5436,20 @@ sax_fastparser::FSHelperPtr DrawingML::CreateOutputStream (
void DrawingML::WriteFill(const Reference<XPropertySet>& xPropSet, const awt::Size& rSize)
{
- if ( !GetProperty( xPropSet, "FillStyle" ) )
+ if ( !GetProperty( xPropSet, u"FillStyle"_ustr ) )
return;
FillStyle aFillStyle( FillStyle_NONE );
- xPropSet->getPropertyValue( "FillStyle" ) >>= aFillStyle;
+ xPropSet->getPropertyValue( u"FillStyle"_ustr ) >>= aFillStyle;
// map full transparent background to no fill
if (aFillStyle == FillStyle_SOLID)
{
OUString sFillTransparenceGradientName;
- if (GetProperty(xPropSet, "FillTransparenceGradientName")
+ if (GetProperty(xPropSet, u"FillTransparenceGradientName"_ustr)
&& (mAny >>= sFillTransparenceGradientName)
&& !sFillTransparenceGradientName.isEmpty()
- && GetProperty(xPropSet, "FillTransparenceGradient"))
+ && GetProperty(xPropSet, u"FillTransparenceGradient"_ustr))
{
// check if a fully transparent TransparenceGradient is used
// use BGradient constructor & tooling here now
@@ -5463,19 +5463,19 @@ void DrawingML::WriteFill(const Reference<XPropertySet>& xPropSet, const awt::Si
aFillStyle = FillStyle_NONE;
}
}
- else if ( GetProperty( xPropSet, "FillTransparence" ) )
+ else if ( GetProperty( xPropSet, u"FillTransparence"_ustr ) )
{
// check if a fully transparent FillTransparence is used
sal_Int16 nVal = 0;
- xPropSet->getPropertyValue( "FillTransparence" ) >>= nVal;
+ xPropSet->getPropertyValue( u"FillTransparence"_ustr ) >>= nVal;
if ( nVal == 100 )
aFillStyle = FillStyle_NONE;
}
}
bool bUseBackground(false);
- if (GetProperty(xPropSet, "FillUseSlideBackground"))
- xPropSet->getPropertyValue("FillUseSlideBackground") >>= bUseBackground;
+ if (GetProperty(xPropSet, u"FillUseSlideBackground"_ustr))
+ xPropSet->getPropertyValue(u"FillUseSlideBackground"_ustr) >>= bUseBackground;
switch( aFillStyle )
{
@@ -5486,7 +5486,7 @@ void DrawingML::WriteFill(const Reference<XPropertySet>& xPropSet, const awt::Si
WriteGradientFill( xPropSet );
break;
case FillStyle_BITMAP :
- WriteBlipFill( xPropSet, "FillBitmap", rSize );
+ WriteBlipFill( xPropSet, u"FillBitmap"_ustr, rSize );
break;
case FillStyle_HATCH :
WritePattFill( xPropSet );
@@ -5530,7 +5530,7 @@ void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, const Sequence< Proper
void DrawingML::WriteShapeStyle( const Reference< XPropertySet >& xPropSet )
{
// check existence of the grab bag
- if ( !GetProperty( xPropSet, "InteropGrabBag" ) )
+ if ( !GetProperty( xPropSet, u"InteropGrabBag"_ustr ) )
return;
// extract the relevant properties from the grab bag
@@ -5747,8 +5747,8 @@ static sal_Int32 lcl_CalculateDir(const double dX, const double dY)
void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
{
Sequence< PropertyValue > aGrabBag, aEffects, aOuterShdwProps;
- bool bHasInteropGrabBag = rXPropSet->getPropertySetInfo()->hasPropertyByName("InteropGrabBag");
- if (bHasInteropGrabBag && GetProperty(rXPropSet, "InteropGrabBag"))
+ bool bHasInteropGrabBag = rXPropSet->getPropertySetInfo()->hasPropertyByName(u"InteropGrabBag"_ustr);
+ if (bHasInteropGrabBag && GetProperty(rXPropSet, u"InteropGrabBag"_ustr))
{
mAny >>= aGrabBag;
auto pProp = std::find_if(std::cbegin(aGrabBag), std::cend(aGrabBag),
@@ -5769,16 +5769,16 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
if( !aEffects.hasElements() )
{
bool bHasShadow = false;
- if( GetProperty( rXPropSet, "Shadow" ) )
+ if( GetProperty( rXPropSet, u"Shadow"_ustr ) )
mAny >>= bHasShadow;
bool bHasEffects = bHasShadow;
- if (!bHasEffects && GetProperty(rXPropSet, "GlowEffectRadius"))
+ if (!bHasEffects && GetProperty(rXPropSet, u"GlowEffectRadius"_ustr))
{
sal_Int32 rad = 0;
mAny >>= rad;
bHasEffects = rad > 0;
}
- if (!bHasEffects && GetProperty(rXPropSet, "SoftEdgeRadius"))
+ if (!bHasEffects && GetProperty(rXPropSet, u"SoftEdgeRadius"_ustr))
{
sal_Int32 rad = 0;
mAny >>= rad;
@@ -5793,21 +5793,21 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
{
double dX = +0.0, dY = +0.0;
sal_Int32 nBlur =0;
- rXPropSet->getPropertyValue( "ShadowXDistance" ) >>= dX;
- rXPropSet->getPropertyValue( "ShadowYDistance" ) >>= dY;
- rXPropSet->getPropertyValue( "ShadowBlur" ) >>= nBlur;
+ rXPropSet->getPropertyValue( u"ShadowXDistance"_ustr ) >>= dX;
+ rXPropSet->getPropertyValue( u"ShadowYDistance"_ustr ) >>= dY;
+ rXPropSet->getPropertyValue( u"ShadowBlur"_ustr ) >>= nBlur;
Sequence< PropertyValue > aShadowAttribsGrabBag{
- comphelper::makePropertyValue("dist", lcl_CalculateDist(dX, dY)),
- comphelper::makePropertyValue("dir", lcl_CalculateDir(dX, dY)),
- comphelper::makePropertyValue("blurRad", oox::drawingml::convertHmmToEmu(nBlur)),
- comphelper::makePropertyValue("rotWithShape", false) //ooxml default is 'true', so must write it
+ comphelper::makePropertyValue(u"dist"_ustr, lcl_CalculateDist(dX, dY)),
+ comphelper::makePropertyValue(u"dir"_ustr, lcl_CalculateDir(dX, dY)),
+ comphelper::makePropertyValue(u"blurRad"_ustr, oox::drawingml::convertHmmToEmu(nBlur)),
+ comphelper::makePropertyValue(u"rotWithShape"_ustr, false) //ooxml default is 'true', so must write it
};
Sequence< PropertyValue > aShadowGrabBag{
- comphelper::makePropertyValue("Attribs", aShadowAttribsGrabBag),
- comphelper::makePropertyValue("RgbClr", rXPropSet->getPropertyValue( "ShadowColor" )),
- comphelper::makePropertyValue("RgbClrTransparency", rXPropSet->getPropertyValue( "ShadowTransparence" ))
+ comphelper::makePropertyValue(u"Attribs"_ustr, aShadowAttribsGrabBag),
+ comphelper::makePropertyValue(u"RgbClr"_ustr, rXPropSet->getPropertyValue( u"ShadowColor"_ustr )),
+ comphelper::makePropertyValue(u"RgbClrTransparency"_ustr, rXPropSet->getPropertyValue( u"ShadowTransparence"_ustr ))
};
WriteShapeEffect( u"outerShdw", aShadowGrabBag );
@@ -5827,9 +5827,9 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
double dX = +0.0, dY = +0.0;
sal_Int32 nBlur =0;
- rXPropSet->getPropertyValue( "ShadowXDistance" ) >>= dX;
- rXPropSet->getPropertyValue( "ShadowYDistance" ) >>= dY;
- rXPropSet->getPropertyValue( "ShadowBlur" ) >>= nBlur;
+ rXPropSet->getPropertyValue( u"ShadowXDistance"_ustr ) >>= dX;
+ rXPropSet->getPropertyValue( u"ShadowYDistance"_ustr ) >>= dY;
+ rXPropSet->getPropertyValue( u"ShadowBlur"_ustr ) >>= nBlur;
for( auto& rAttribsProp : asNonConstRange(aAttribsProps) )
@@ -5852,11 +5852,11 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
}
else if( rOuterShdwProp.Name == "RgbClr" )
{
- rOuterShdwProp.Value = rXPropSet->getPropertyValue( "ShadowColor" );
+ rOuterShdwProp.Value = rXPropSet->getPropertyValue( u"ShadowColor"_ustr );
}
else if( rOuterShdwProp.Name == "RgbClrTransparency" )
{
- rOuterShdwProp.Value = rXPropSet->getPropertyValue( "ShadowTransparence" );
+ rOuterShdwProp.Value = rXPropSet->getPropertyValue( u"ShadowTransparence"_ustr );
}
}
@@ -5894,22 +5894,22 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
void DrawingML::WriteGlowEffect(const Reference< XPropertySet >& rXPropSet)
{
- if (!rXPropSet->getPropertySetInfo()->hasPropertyByName("GlowEffectRadius"))
+ if (!rXPropSet->getPropertySetInfo()->hasPropertyByName(u"GlowEffectRadius"_ustr))
{
return;
}
sal_Int32 nRad = 0;
- rXPropSet->getPropertyValue("GlowEffectRadius") >>= nRad;
+ rXPropSet->getPropertyValue(u"GlowEffectRadius"_ustr) >>= nRad;
if (!nRad)
return;
Sequence< PropertyValue > aGlowAttribs{ comphelper::makePropertyValue(
- "rad", oox::drawingml::convertHmmToEmu(nRad)) };
+ u"rad"_ustr, oox::drawingml::convertHmmToEmu(nRad)) };
Sequence< PropertyValue > aGlowProps{
- comphelper::makePropertyValue("Attribs", aGlowAttribs),
- comphelper::makePropertyValue("RgbClr", rXPropSet->getPropertyValue("GlowEffectColor")),
- comphelper::makePropertyValue("RgbClrTransparency", rXPropSet->getPropertyValue("GlowEffectTransparency"))
+ comphelper::makePropertyValue(u"Attribs"_ustr, aGlowAttribs),
+ comphelper::makePropertyValue(u"RgbClr"_ustr, rXPropSet->getPropertyValue(u"GlowEffectColor"_ustr)),
+ comphelper::makePropertyValue(u"RgbClrTransparency"_ustr, rXPropSet->getPropertyValue(u"GlowEffectTransparency"_ustr))
};
// TODO other stuff like saturation or luminance
@@ -5918,19 +5918,19 @@ void DrawingML::WriteGlowEffect(const Reference< XPropertySet >& rXPropSet)
void DrawingML::WriteSoftEdgeEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet)
{
- if (!rXPropSet->getPropertySetInfo()->hasPropertyByName("SoftEdgeRadius"))
+ if (!rXPropSet->getPropertySetInfo()->hasPropertyByName(u"SoftEdgeRadius"_ustr))
{
return;
}
sal_Int32 nRad = 0;
- rXPropSet->getPropertyValue("SoftEdgeRadius") >>= nRad;
+ rXPropSet->getPropertyValue(u"SoftEdgeRadius"_ustr) >>= nRad;
if (!nRad)
return;
css::uno::Sequence<css::beans::PropertyValue> aAttribs{ comphelper::makePropertyValue(
- "rad", oox::drawingml::convertHmmToEmu(nRad)) };
- css::uno::Sequence<css::beans::PropertyValue> aProps{ comphelper::makePropertyValue("Attribs",
+ u"rad"_ustr, oox::drawingml::convertHmmToEmu(nRad)) };
+ css::uno::Sequence<css::beans::PropertyValue> aProps{ comphelper::makePropertyValue(u"Attribs"_ustr,
aAttribs) };
WriteShapeEffect(u"softEdge", aProps);
@@ -5939,7 +5939,7 @@ void DrawingML::WriteSoftEdgeEffect(const css::uno::Reference<css::beans::XPrope
void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool bIsText )
{
// check existence of the grab bag
- if( !GetProperty( xPropSet, "InteropGrabBag" ) )
+ if( !GetProperty( xPropSet, u"InteropGrabBag"_ustr ) )
return;
// extract the relevant properties from the grab bag
@@ -6217,7 +6217,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool
void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet )
{
- if( !GetProperty( rXPropSet, "InteropGrabBag" ) )
+ if( !GetProperty( rXPropSet, u"InteropGrabBag"_ustr ) )
return;
PropertyValue aEffect;
@@ -6288,7 +6288,7 @@ OString DrawingML::WriteWdpPicture( const OUString& rFileId, const Sequence< sal
sal_Int32 nWdpImageCount = rGraphicExportCache.nextWdpImageCount();
OUString sFileName = u"media/hdphoto"_ustr + OUString::number(nWdpImageCount) + u".wdp"_ustr;
OUString sFragment = GetComponentDir() + u"/"_ustr + sFileName;
- Reference< XOutputStream > xOutStream = mpFB->openFragmentStream(sFragment, "image/vnd.ms-photo");
+ Reference< XOutputStream > xOutStream = mpFB->openFragmentStream(sFragment, u"image/vnd.ms-photo"_ustr);
xOutStream->writeBytes( rPictureData );
xOutStream->closeOutput();
@@ -6438,7 +6438,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
// Get the dsp:damaModelExt node from the dom
uno::Reference<xml::dom::XNodeList> nodeList = dataDom->getElementsByTagNameNS(
- "http://schemas.microsoft.com/office/drawing/2008/diagram", "dataModelExt");
+ u"http://schemas.microsoft.com/office/drawing/2008/diagram"_ustr, u"dataModelExt"_ustr);
// There must be one element only so get it
uno::Reference<xml::dom::XNode> node = nodeList->item(0);
@@ -6447,7 +6447,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
uno::Reference<xml::dom::XNamedNodeMap> nodeMap = node->getAttributes();
// Get the node with the relId attribute and set its new value
- uno::Reference<xml::dom::XNode> relIdNode = nodeMap->getNamedItem("relId");
+ uno::Reference<xml::dom::XNode> relIdNode = nodeMap->getNamedItem(u"relId"_ustr);
relIdNode->setNodeValue(drawingRelId);
}
@@ -6470,7 +6470,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
serializer.set(dataDom, uno::UNO_QUERY);
uno::Reference<io::XOutputStream> xDataOutputStream = mpFB->openFragmentStream(
sDir + "/" + dataFileName,
- "application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml");
+ u"application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml"_ustr);
writer->setOutputStream(xDataOutputStream);
serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
uno::Sequence<beans::StringPair>());
@@ -6482,7 +6482,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
serializer.set(layoutDom, uno::UNO_QUERY);
writer->setOutputStream(mpFB->openFragmentStream(
sDir + "/" + layoutFileName,
- "application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml"));
+ u"application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml"_ustr));
serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
uno::Sequence<beans::StringPair>());
@@ -6490,7 +6490,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
serializer.set(styleDom, uno::UNO_QUERY);
writer->setOutputStream(mpFB->openFragmentStream(
sDir + "/" + styleFileName,
- "application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml"));
+ u"application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml"_ustr));
serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
uno::Sequence<beans::StringPair>());
@@ -6498,7 +6498,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
serializer.set(colorDom, uno::UNO_QUERY);
writer->setOutputStream(mpFB->openFragmentStream(
sDir + "/" + colorFileName,
- "application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml"));
+ u"application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml"_ustr));
serializer->serialize(uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
uno::Sequence<beans::StringPair>());
@@ -6508,7 +6508,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
serializer.set(drawingDom, uno::UNO_QUERY);
uno::Reference<io::XOutputStream> xDrawingOutputStream = mpFB->openFragmentStream(
- sDir + "/" + drawingFileName, "application/vnd.ms-office.drawingml.diagramDrawing+xml");
+ sDir + "/" + drawingFileName, u"application/vnd.ms-office.drawingml.diagramDrawing+xml"_ustr);
writer->setOutputStream(xDrawingOutputStream);
serializer->serialize(
uno::Reference<xml::sax::XDocumentHandler>(writer, uno::UNO_QUERY_THROW),
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index ee4092bb56fc..d3e847d84211 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -264,7 +264,7 @@ static uno::Reference<io::XInputStream> lcl_StoreOwnAsOOXML(
// fragment stream, an error during export means we'd have to delete it
uno::Reference<io::XStream> const xTempStream(
xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.comp.MemoryStream", xContext),
+ u"com.sun.star.comp.MemoryStream"_ustr, xContext),
uno::UNO_QUERY_THROW);
uno::Sequence<beans::PropertyValue> args( comphelper::InitPropertySequence({
{ "OutputStream", Any(xTempStream->getOutputStream()) },
@@ -273,7 +273,7 @@ static uno::Reference<io::XInputStream> lcl_StoreOwnAsOOXML(
uno::Reference<frame::XStorable> xStorable(xObj->getComponent(), uno::UNO_QUERY);
try
{
- xStorable->storeToURL("private:stream", args);
+ xStorable->storeToURL(u"private:stream"_ustr, args);
}
catch (uno::Exception const&)
{
@@ -372,10 +372,10 @@ bool ShapeExport::NonEmptyText( const Reference< XInterface >& xIface )
Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
if ( xPropSetInfo.is() )
{
- if ( xPropSetInfo->hasPropertyByName( "IsEmptyPresentationObject" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"IsEmptyPresentationObject"_ustr ) )
{
bool bIsEmptyPresObj = false;
- if ( xPropSet->getPropertyValue( "IsEmptyPresentationObject" ) >>= bIsEmptyPresObj )
+ if ( xPropSet->getPropertyValue( u"IsEmptyPresentationObject"_ustr ) >>= bIsEmptyPresObj )
{
SAL_INFO("oox.shape", "empty presentation object " << bIsEmptyPresObj << " , props:");
if( bIsEmptyPresObj )
@@ -383,10 +383,10 @@ bool ShapeExport::NonEmptyText( const Reference< XInterface >& xIface )
}
}
- if ( xPropSetInfo->hasPropertyByName( "IsPresentationObject" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"IsPresentationObject"_ustr ) )
{
bool bIsPresObj = false;
- if ( xPropSet->getPropertyValue( "IsPresentationObject" ) >>= bIsPresObj )
+ if ( xPropSet->getPropertyValue( u"IsPresentationObject"_ustr ) >>= bIsPresObj )
{
SAL_INFO("oox.shape", "presentation object " << bIsPresObj << ", props:");
if( bIsPresObj )
@@ -401,8 +401,8 @@ bool ShapeExport::NonEmptyText( const Reference< XInterface >& xIface )
static void AddExtLst(FSHelperPtr const& pFS, Reference<XPropertySet> const& xShape)
{
- if (xShape->getPropertySetInfo()->hasPropertyByName("Decorative")
- && xShape->getPropertyValue("Decorative").get<bool>())
+ if (xShape->getPropertySetInfo()->hasPropertyByName(u"Decorative"_ustr)
+ && xShape->getPropertyValue(u"Decorative"_ustr).get<bool>())
{
pFS->startElementNS(XML_a, XML_extLst);
// FSNS(XML_xmlns, XML_a), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)));
@@ -541,7 +541,7 @@ ShapeExport& ShapeExport::WriteGroupShape(const uno::Reference<drawing::XShape>&
// tdf#128820: WriteGraphicObjectShapePart calls WriteTextShape for non-empty simple
// text objects, which needs writing into wps::wsp element, so make sure to use wps
// namespace for those objects
- if (xServiceInfo->supportsService("com.sun.star.drawing.GraphicObjectShape")
+ if (xServiceInfo->supportsService(u"com.sun.star.drawing.GraphicObjectShape"_ustr)
&& !IsNonEmptySimpleText(xChild))
mnXmlNamespace = XML_pic;
else
@@ -770,8 +770,8 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
bool bHasGeometrySeq(false);
Sequence< PropertyValue > aGeometrySeq;
- OUString sShapeType("non-primitive"); // default in ODF
- if (GetProperty(rXPropSet, "CustomShapeGeometry"))
+ OUString sShapeType(u"non-primitive"_ustr); // default in ODF
+ if (GetProperty(rXPropSet, u"CustomShapeGeometry"_ustr))
{
SAL_INFO("oox.shape", "got custom shape geometry");
if (mAny >>= aGeometrySeq)
@@ -841,7 +841,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
{
bool bUseBackground = false;
- if (GetProperty(rXPropSet, "FillUseSlideBackground"))
+ if (GetProperty(rXPropSet, u"FillUseSlideBackground"_ustr))
mAny >>= bUseBackground;
if (bUseBackground)
mpFS->startElementNS(mnXmlNamespace, XML_sp, XML_useBgFill, "1");
@@ -849,7 +849,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
mpFS->startElementNS(mnXmlNamespace, XML_sp);
bool isVisible = true ;
- if( GetProperty(rXPropSet, "Visible"))
+ if( GetProperty(rXPropSet, u"Visible"_ustr))
{
mAny >>= isVisible;
}
@@ -859,7 +859,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
OString::number(GetShapeID(xShape) == -1 ? GetNewShapeID(xShape) : GetShapeID(xShape)),
XML_name, GetShapeName(xShape), XML_hidden, sax_fastparser::UseIf("1", !isVisible));
- if( GetProperty(rXPropSet, "URL") )
+ if( GetProperty(rXPropSet, u"URL"_ustr) )
{
OUString sURL;
mAny >>= sURL;
@@ -875,10 +875,10 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
}
OUString sBookmark;
- if (GetProperty(rXPropSet, "Bookmark"))
+ if (GetProperty(rXPropSet, u"Bookmark"_ustr))
mAny >>= sBookmark;
- if (GetProperty(rXPropSet, "OnClick"))
+ if (GetProperty(rXPropSet, u"OnClick"_ustr))
{
OUString sPPAction;
presentation::ClickAction eClickAction = presentation::ClickAction_NONE;
@@ -945,7 +945,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
: GetShapeID(xShape)),
XML_name, GetShapeName(xShape));
- if (GetProperty(rXPropSet, "Hyperlink"))
+ if (GetProperty(rXPropSet, u"Hyperlink"_ustr))
{
OUString sURL;
mAny >>= sURL;
@@ -1154,7 +1154,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
bool bHas3DEffectinShape = false;
uno::Sequence<beans::PropertyValue> grabBag;
- rXPropSet->getPropertyValue("InteropGrabBag") >>= grabBag;
+ rXPropSet->getPropertyValue(u"InteropGrabBag"_ustr) >>= grabBag;
for (auto const& it : grabBag)
if (it.Name == "3DEffectProperties")
@@ -1207,7 +1207,7 @@ ShapeExport& ShapeExport::WriteEllipseShape( const Reference< XShape >& xShape )
CircleKind eCircleKind(CircleKind_FULL);
if (xProps.is())
- xProps->getPropertyValue("CircleKind" ) >>= eCircleKind;
+ xProps->getPropertyValue(u"CircleKind"_ustr ) >>= eCircleKind;
// visual shape properties
pFS->startElementNS( mnXmlNamespace, XML_spPr );
@@ -1221,8 +1221,8 @@ ShapeExport& ShapeExport::WriteEllipseShape( const Reference< XShape >& xShape )
sal_Int32 nEndAngleIntern(0);
if (xProps.is())
{
- xProps->getPropertyValue("CircleStartAngle" ) >>= nStartAngleIntern;
- xProps->getPropertyValue("CircleEndAngle") >>= nEndAngleIntern;
+ xProps->getPropertyValue(u"CircleStartAngle"_ustr ) >>= nStartAngleIntern;
+ xProps->getPropertyValue(u"CircleEndAngle"_ustr) >>= nEndAngleIntern;
}
std::vector< std::pair<sal_Int32,sal_Int32>> aAvList;
awt::Size aSize = xShape->getSize();
@@ -1260,7 +1260,7 @@ ShapeExport& ShapeExport::WriteEllipseShape( const Reference< XShape >& xShape )
FillStyle eFillStyle(FillStyle_NONE);
uno::Any aNewValue;
aNewValue <<= eFillStyle;
- xProps->setPropertyValue("FillStyle", aNewValue);
+ xProps->setPropertyValue(u"FillStyle"_ustr, aNewValue);
}
WriteFill( xProps );
WriteOutline( xProps );
@@ -1306,15 +1306,15 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
{
xGraphic.set(pGraphic->GetXGraphic());
}
- else if (xShapeProps.is() && xShapeProps->getPropertySetInfo()->hasPropertyByName("Graphic"))
+ else if (xShapeProps.is() && xShapeProps->getPropertySetInfo()->hasPropertyByName(u"Graphic"_ustr))
{
- xShapeProps->getPropertyValue("Graphic") >>= xGraphic;
+ xShapeProps->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
}
// tdf#155903 Only for PPTX, Microsoft does not support this feature in Word and Excel.
bool bHasMediaURL = GetDocumentType() == DOCUMENT_PPTX && xShapeProps.is()
- && xShapeProps->getPropertySetInfo()->hasPropertyByName("MediaURL")
- && (xShapeProps->getPropertyValue("MediaURL") >>= sMediaURL);
+ && xShapeProps->getPropertySetInfo()->hasPropertyByName(u"MediaURL"_ustr)
+ && (xShapeProps->getPropertyValue(u"MediaURL"_ustr) >>= sMediaURL);
if (!xGraphic.is() && !bHasMediaURL)
{
@@ -1337,13 +1337,13 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
OUString sDescr, sURL, sBookmark, sPPAction;
bool bHaveDesc;
- if ( ( bHaveDesc = GetProperty( xShapeProps, "Description" ) ) )
+ if ( ( bHaveDesc = GetProperty( xShapeProps, u"Description"_ustr ) ) )
mAny >>= sDescr;
- if ( GetProperty( xShapeProps, "URL" ) )
+ if ( GetProperty( xShapeProps, u"URL"_ustr ) )
mAny >>= sURL;
- if (GetProperty(xShapeProps, "Bookmark"))
+ if (GetProperty(xShapeProps, u"Bookmark"_ustr))
mAny >>= sBookmark;
- if (GetProperty(xShapeProps, "OnClick"))
+ if (GetProperty(xShapeProps, u"OnClick"_ustr))
mAny >>= eClickAction;
pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
@@ -1381,7 +1381,7 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
// OOXTODO: //cNvPr children: XML_extLst, XML_hlinkHover
if (bHasMediaURL || !sPPAction.isEmpty())
pFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), "", XML_action,
- bHasMediaURL ? "ppaction://media" : sPPAction);
+ bHasMediaURL ? u"ppaction://media"_ustr : sPPAction);
if( !sURL.isEmpty() )
{
OUString sRelId = mpFB->addRelation( mpFS->getOutputStream(),
@@ -1430,8 +1430,8 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
else if (bHasMediaURL)
{
Reference<graphic::XGraphic> xFallbackGraphic;
- if (xShapeProps->getPropertySetInfo()->hasPropertyByName("FallbackGraphic"))
- xShapeProps->getPropertyValue("FallbackGraphic") >>= xFallbackGraphic;
+ if (xShapeProps->getPropertySetInfo()->hasPropertyByName(u"FallbackGraphic"_ustr))
+ xShapeProps->getPropertyValue(u"FallbackGraphic"_ustr) >>= xFallbackGraphic;
WriteXGraphicBlip(xShapeProps, xFallbackGraphic, mbUserShapes);
}
@@ -1444,7 +1444,7 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
// now we stretch always when we get pGraphic (when changing that
// behavior, test n#780830 for regression, where the OLE sheet might get tiled
bool bStretch = false;
- if( !pGraphic && GetProperty( xShapeProps, "FillBitmapStretch" ) )
+ if( !pGraphic && GetProperty( xShapeProps, u"FillBitmapStretch"_ustr ) )
mAny >>= bStretch;
if ( pGraphic || bStretch )
@@ -1463,9 +1463,9 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
// visual shape properties
pFS->startElementNS(mnXmlNamespace, XML_spPr);
bool bFlipH = false;
- if( xShapeProps->getPropertySetInfo()->hasPropertyByName("IsMirrored") )
+ if( xShapeProps->getPropertySetInfo()->hasPropertyByName(u"IsMirrored"_ustr) )
{
- xShapeProps->getPropertyValue("IsMirrored") >>= bFlipH;
+ xShapeProps->getPropertyValue(u"IsMirrored"_ustr) >>= bFlipH;
}
WriteShapeTransformation( xShape, XML_a, bFlipH, false, false, false, true );
WritePresetShape( "rect"_ostr );
@@ -1609,7 +1609,7 @@ static void lcl_GetConnectorAdjustValue(const Reference<XShape>& xShape, tools::
{
Reference<XPropertySet> xShapeProps(xShape, UNO_QUERY);
bool bIsOOXMLCurve(false);
- xShapeProps->getPropertyValue("EdgeOOXMLCurve") >>= bIsOOXMLCurve;
+ xShapeProps->getPropertyValue(u"EdgeOOXMLCurve"_ustr) >>= bIsOOXMLCurve;
sal_Int32 nAdjCount = 0;
if (eConnectorType == ConnectorType_CURVE)
{
@@ -1730,10 +1730,10 @@ static sal_Int32 lcl_GetGluePointId(const Reference<XShape>& xShape, sal_Int32 n
bool bFlipV = false;
Reference<XPropertySet> xShapeProps(xShape, UNO_QUERY);
if (xShapeProps.is() && xShapeProps->getPropertySetInfo()
- && xShapeProps->getPropertySetInfo()->hasPropertyByName("CustomShapeGeometry"))
+ && xShapeProps->getPropertySetInfo()->hasPropertyByName(u"CustomShapeGeometry"_ustr))
{
Sequence<PropertyValue> aGeometrySeq;
- xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeometrySeq;
+ xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aGeometrySeq;
for (int i = 0; i < aGeometrySeq.getLength(); i++)
{
const PropertyValue& rProp = aGeometrySeq[i];
@@ -1779,7 +1779,7 @@ ShapeExport& ShapeExport::WriteConnectorShape( const Reference< XShape >& xShape
Reference< XShape > rXShapeB;
PropertyState eState;
ConnectorType eConnectorType = ConnectorType_STANDARD;
- if (GetProperty(rXPropSet, "EdgeKind"))
+ if (GetProperty(rXPropSet, u"EdgeKind"_ustr))
mAny >>= eConnectorType;
switch( eConnectorType ) {
@@ -1796,23 +1796,23 @@ ShapeExport& ShapeExport::WriteConnectorShape( const Reference< XShape >& xShape
break;
}
- if (GetPropertyAndState( rXPropSet, rXPropState, "EdgeStartPoint", eState ) && eState == beans::PropertyState_DIRECT_VALUE )
+ if (GetPropertyAndState( rXPropSet, rXPropState, u"EdgeStartPoint"_ustr, eState ) && eState == beans::PropertyState_DIRECT_VALUE )
{
mAny >>= aStartPoint;
- if (GetPropertyAndState( rXPropSet, rXPropState, "EdgeEndPoint", eState ) && eState == beans::PropertyState_DIRECT_VALUE )
+ if (GetPropertyAndState( rXPropSet, rXPropState, u"EdgeEndPoint"_ustr, eState ) && eState == beans::PropertyState_DIRECT_VALUE )
mAny >>= aEndPoint;
}
- if (GetProperty(rXPropSet, "EdgeStartConnection"))
+ if (GetProperty(rXPropSet, u"EdgeStartConnection"_ustr))
mAny >>= rXShapeA;
- if (GetProperty(rXPropSet, "EdgeEndConnection"))
+ if (GetProperty(rXPropSet, u"EdgeEndConnection"_ustr))
mAny >>= rXShapeB;
- if (GetProperty(rXPropSet, "StartGluePointIndex"))
+ if (GetProperty(rXPropSet, u"StartGluePointIndex"_ustr))
mAny >>= nStartGlueId;
if (nStartGlueId != -1)
nStartGlueId = lcl_GetGluePointId(rXShapeA, nStartGlueId);
- if (GetProperty(rXPropSet, "EndGluePointIndex"))
+ if (GetProperty(rXPropSet, u"EndGluePointIndex"_ustr))
mAny >>= nEndGlueId;
if (nEndGlueId != -1)
nEndGlueId = lcl_GetGluePointId(rXShapeB, nEndGlueId);
@@ -2009,7 +2009,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( const Reference< XShape >& xShape
Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
if( xShapeProps.is() )
{
- xShapeProps->getPropertyValue( "CornerRadius" ) >>= nRadius;
+ xShapeProps->getPropertyValue( u"CornerRadius"_ustr ) >>= nRadius;
}
if( nRadius )
@@ -2112,9 +2112,9 @@ ShapeExport& ShapeExport::WriteShape( const Reference< XShape >& xShape )
{
Reference< XPropertySet > xShapeProperties(xShape, UNO_QUERY);
if (xShapeProperties && xShapeProperties->getPropertySetInfo()
- && xShapeProperties->getPropertySetInfo()->hasPropertyByName("IsPresentationObject")
- && xShapeProperties->getPropertyValue("IsPresentationObject").hasValue())
- mbPlaceholder = xShapeProperties->getPropertyValue("IsPresentationObject").get<bool>();
+ && xShapeProperties->getPropertySetInfo()->hasPropertyByName(u"IsPresentationObject"_ustr)
+ && xShapeProperties->getPropertyValue(u"IsPresentationObject"_ustr).hasValue())
+ mbPlaceholder = xShapeProperties->getPropertyValue(u"IsPresentationObject"_ustr).get<bool>();
}
(this->*(aConverterIterator->second))(xShape);
@@ -2128,9 +2128,9 @@ static bool lcl_isTextBox(const Reference<XInterface>& xIface)
if (!xPropertySet.is())
return false;
uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
- if (!xPropertySetInfo->hasPropertyByName("TextBox"))
+ if (!xPropertySetInfo->hasPropertyByName(u"TextBox"_ustr))
return false;
- css::uno::Any aTextBox(xPropertySet->getPropertyValue("TextBox"));
+ css::uno::Any aTextBox(xPropertySet->getPropertyValue(u"TextBox"_ustr));
if (!aTextBox.hasValue())
return false;
return aTextBox.get<bool>();
@@ -2178,7 +2178,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
mpFS->startElementNS(XML_a, XML_graphicData,
XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/table");
- if ( xPropSet.is() && ( xPropSet->getPropertyValue( "Model" ) >>= xTable ) )
+ if ( xPropSet.is() && ( xPropSet->getPropertyValue( u"Model"_ustr ) >>= xTable ) )
{
mpFS->startElementNS(XML_a, XML_tbl);
mpFS->startElementNS(XML_a, XML_tblPr);
@@ -2196,7 +2196,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
{
Reference< XPropertySet > xColPropSet( xColumns->getByIndex( x ), UNO_QUERY_THROW );
sal_Int32 nWidth(0);
- xColPropSet->getPropertyValue( "Width" ) >>= nWidth;
+ xColPropSet->getPropertyValue( u"Width"_ustr ) >>= nWidth;
mpFS->singleElementNS(XML_a, XML_gridCol,
XML_w, OString::number(oox::drawingml::convertHmmToEmu(nWidth)));
@@ -2213,7 +2213,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
Reference< XPropertySet > xRowPropSet( xRows->getByIndex( nRow ), UNO_QUERY_THROW );
sal_Int32 nRowHeight(0);
- xRowPropSet->getPropertyValue( "Height" ) >>= nRowHeight;
+ xRowPropSet->getPropertyValue( u"Height"_ustr ) >>= nRowHeight;
mpFS->startElementNS(XML_a, XML_tr,
XML_h, OString::number(oox::drawingml::convertHmmToEmu(nRowHeight)));
@@ -2366,24 +2366,24 @@ void ShapeExport::WriteTableCellProperties(const Reference< XPropertySet>& xCell
TextVerticalAdjust eVerticalAlignment;
const char* sVerticalAlignment;
- Any aLeftMargin = xCellPropSet->getPropertyValue("TextLeftDistance");
+ Any aLeftMargin = xCellPropSet->getPropertyValue(u"TextLeftDistance"_ustr);
aLeftMargin >>= nLeftMargin;
- Any aRightMargin = xCellPropSet->getPropertyValue("TextRightDistance");
+ Any aRightMargin = xCellPropSet->getPropertyValue(u"TextRightDistance"_ustr);
aRightMargin >>= nRightMargin;
- Any aVerticalAlignment = xCellPropSet->getPropertyValue("TextVerticalAdjust");
+ Any aVerticalAlignment = xCellPropSet->getPropertyValue(u"TextVerticalAdjust"_ustr);
aVerticalAlignment >>= eVerticalAlignment;
sVerticalAlignment = GetTextVerticalAdjust(eVerticalAlignment);
sal_Int32 nRotateAngle = 0;
- Any aRotateAngle = xCellPropSet->getPropertyValue("RotateAngle");
+ Any aRotateAngle = xCellPropSet->getPropertyValue(u"RotateAngle"_ustr);
aRotateAngle >>= nRotateAngle;
std::optional<OString> aTextVerticalValue = GetTextVerticalType(nRotateAngle);
Sequence<PropertyValue> aGrabBag;
if( !aTextVerticalValue &&
- (xCellPropSet->getPropertyValue("CellInteropGrabBag") >>= aGrabBag) )
+ (xCellPropSet->getPropertyValue(u"CellInteropGrabBag"_ustr) >>= aGrabBag) )
{
for (auto const& rIt : aGrabBag)
{
@@ -2461,19 +2461,19 @@ void ShapeExport::WriteTableCellBorders(const Reference< XPropertySet>& xCellPro
BorderLine2 aBorderLine;
// lnL - Left Border Line Properties of table cell
- xCellPropSet->getPropertyValue("LeftBorder") >>= aBorderLine;
+ xCellPropSet->getPropertyValue(u"LeftBorder"_ustr) >>= aBorderLine;
WriteBorderLine( XML_lnL, aBorderLine );
// lnR - Right Border Line Properties of table cell
- xCellPropSet->getPropertyValue("RightBorder") >>= aBorderLine;
+ xCellPropSet->getPropertyValue(u"RightBorder"_ustr) >>= aBorderLine;
WriteBorderLine( XML_lnR, aBorderLine );
// lnT - Top Border Line Properties of table cell
- xCellPropSet->getPropertyValue("TopBorder") >>= aBorderLine;
+ xCellPropSet->getPropertyValue(u"TopBorder"_ustr) >>= aBorderLine;
WriteBorderLine( XML_lnT, aBorderLine );
// lnB - Bottom Border Line Properties of table cell
- xCellPropSet->getPropertyValue("BottomBorder") >>= aBorderLine;
+ xCellPropSet->getPropertyValue(u"BottomBorder"_ustr) >>= aBorderLine;
WriteBorderLine( XML_lnB, aBorderLine );
}
@@ -2521,7 +2521,7 @@ ShapeExport& ShapeExport::WriteTextShape( const Reference< XShape >& xShape )
XML_id, OString::number(GetNewShapeID(xShape)),
XML_name, GetShapeName(xShape));
OUString sURL;
- if (GetProperty(xShapeProps, "URL"))
+ if (GetProperty(xShapeProps, u"URL"_ustr))
mAny >>= sURL;
if (!sURL.isEmpty())
@@ -2550,7 +2550,7 @@ ShapeExport& ShapeExport::WriteTextShape( const Reference< XShape >& xShape )
uno::Reference<beans::XPropertySet> xPropertySet(xShape, UNO_QUERY);
if (!IsFontworkShape(xShapeProps)) // Fontwork needs fill and outline in run properties instead.
{
- WriteBlipOrNormalFill(xPropertySet, "Graphic", xShape->getSize());
+ WriteBlipOrNormalFill(xPropertySet, u"Graphic"_ustr, xShape->getSize());
WriteOutline(xPropertySet);
WriteShapeEffects(xPropertySet);
}
@@ -2568,7 +2568,7 @@ void ShapeExport::WriteMathShape(Reference<XShape> const& xShape)
Reference<XPropertySet> const xPropSet(xShape, UNO_QUERY);
assert(xPropSet.is());
Reference<XModel> xMathModel;
- xPropSet->getPropertyValue("Model") >>= xMathModel;
+ xPropSet->getPropertyValue(u"Model"_ustr) >>= xMathModel;
assert(xMathModel.is());
assert(GetDocumentType() != DOCUMENT_DOCX); // should be written in DocxAttributeOutput
SAL_WARN_IF(GetDocumentType() == DOCUMENT_XLSX, "oox.shape", "Math export to XLSX isn't tested, should it happen here?");
@@ -2624,7 +2624,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
enum { CHART, MATH, OTHER } eType(OTHER);
OUString clsid;
- xPropSet->getPropertyValue("CLSID") >>= clsid;
+ xPropSet->getPropertyValue(u"CLSID"_ustr) >>= clsid;
if (!clsid.isEmpty())
{
SvGlobalName aClassID;
@@ -2639,7 +2639,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
if (CHART == eType)
{
Reference< XChartDocument > xChartDoc;
- xPropSet->getPropertyValue("Model") >>= xChartDoc;
+ xPropSet->getPropertyValue(u"Model"_ustr) >>= xChartDoc;
assert(xChartDoc.is());
//export the chart
#if !ENABLE_WASM_STRIP_CHART
@@ -2659,7 +2659,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
}
uno::Reference<embed::XEmbeddedObject> const xObj(
- xPropSet->getPropertyValue("EmbeddedObject"), uno::UNO_QUERY);
+ xPropSet->getPropertyValue(u"EmbeddedObject"_ustr), uno::UNO_QUERY);
if (!xObj.is())
{
@@ -2685,7 +2685,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
uno::Reference<container::XChild>(xObj, uno::UNO_QUERY_THROW)->getParent(),
uno::UNO_QUERY_THROW);
- xParent->getPropertyValue("InteropGrabBag") >>= grabBag;
+ xParent->getPropertyValue(u"InteropGrabBag"_ustr) >>= grabBag;
entryName = uno::Reference<embed::XEmbedPersist>(xObj, uno::UNO_QUERY_THROW)->getEntryName();
}
@@ -2739,7 +2739,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
OUString sRelId;
if (!xInStream.is())
{
- xPropSet->getPropertyValue("LinkURL") >>= sURL;
+ xPropSet->getPropertyValue(u"LinkURL"_ustr) >>= sURL;
if (sURL.isEmpty())
return *this;
@@ -2779,7 +2779,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
}
sal_Int64 nAspect;
- bool bShowAsIcon = (xPropSet->getPropertyValue("Aspect") >>= nAspect)
+ bool bShowAsIcon = (xPropSet->getPropertyValue(u"Aspect"_ustr) >>= nAspect)
&& nAspect == embed::Aspects::MSOLE_ICON;
mpFS->startElementNS(mnXmlNamespace, XML_graphicFrame);
@@ -2896,7 +2896,7 @@ OUString ShapeExport::GetShapeName(const Reference<XShape>& xShape)
// Empty name keeps the object unnamed.
OUString sName;
- if (GetProperty(rXPropSet, "Name"))
+ if (GetProperty(rXPropSet, u"Name"_ustr))
mAny >>= sName;
return sName;
}
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 8438befa62af..fdb74b2c138a 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1200,7 +1200,7 @@ static std::vector<OString> lcl_getShapeTypes()
{
std::vector<OString> aRet;
- OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/vml-shape-types");
+ OUString aPath(u"$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/vml-shape-types"_ustr);
rtl::Bootstrap::expandMacros(aPath);
SvFileStream aStream(aPath, StreamMode::READ);
if (aStream.GetError() != ERRCODE_NONE)
@@ -1223,9 +1223,9 @@ static bool lcl_isTextBox(const SdrObject* pSdrObject)
if (!xPropertySet.is())
return false;
uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
- if (!xPropertySetInfo->hasPropertyByName("TextBox"))
+ if (!xPropertySetInfo->hasPropertyByName(u"TextBox"_ustr))
return false;
- css::uno::Any aTextBox(xPropertySet->getPropertyValue("TextBox"));
+ css::uno::Any aTextBox(xPropertySet->getPropertyValue(u"TextBox"_ustr));
if (!aTextBox.hasValue())
return false;
return aTextBox.get<bool>();
@@ -1236,10 +1236,10 @@ static OUString lcl_getAnchorIdFromGrabBag(const SdrObject* pSdrObject)
OUString aResult;
uno::Reference<beans::XPropertySet> xShape(const_cast<SdrObject*>(pSdrObject)->getUnoShape(), uno::UNO_QUERY);
- if (xShape->getPropertySetInfo()->hasPropertyByName("InteropGrabBag"))
+ if (xShape->getPropertySetInfo()->hasPropertyByName(u"InteropGrabBag"_ustr))
{
- comphelper::SequenceAsHashMap aInteropGrabBag(xShape->getPropertyValue("InteropGrabBag"));
- auto it = aInteropGrabBag.find("AnchorId");
+ comphelper::SequenceAsHashMap aInteropGrabBag(xShape->getPropertyValue(u"InteropGrabBag"_ustr));
+ auto it = aInteropGrabBag.find(u"AnchorId"_ustr);
if (it != aInteropGrabBag.end())
it->second >>= aResult;
}
@@ -1530,10 +1530,10 @@ void VMLExport::EndShape( sal_Int32 nShapeElement )
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
bool bBottomToTop = false;
- if (xPropertySetInfo->hasPropertyByName("CustomShapeGeometry"))
+ if (xPropertySetInfo->hasPropertyByName(u"CustomShapeGeometry"_ustr))
{
// In this case a DrawingML DOCX was imported.
- auto aAny = xPropertySet->getPropertyValue("WritingMode");
+ auto aAny = xPropertySet->getPropertyValue(u"WritingMode"_ustr);
sal_Int16 nWritingMode;
if ((aAny >>= nWritingMode) && nWritingMode == text::WritingMode2::BT_LR)
bBottomToTop = true;
@@ -1547,7 +1547,7 @@ void VMLExport::EndShape( sal_Int32 nShapeElement )
{
auto xTextFrame = pTextExport->GetUnoTextFrame(xShape);
uno::Reference<beans::XPropertySet> xPropSet(xTextFrame, uno::UNO_QUERY);
- auto aAny = xPropSet->getPropertyValue("WritingMode");
+ auto aAny = xPropSet->getPropertyValue(u"WritingMode"_ustr);
sal_Int16 nWritingMode;
if (aAny >>= nWritingMode)
{
diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx
index 7a973975f3d2..488105d4eed1 100644
--- a/oox/source/helper/attributelist.cxx
+++ b/oox/source/helper/attributelist.cxx
@@ -357,7 +357,7 @@ util::DateTime AttributeList::getDateTime( sal_Int32 nAttrToken, const util::Dat
std::vector<sal_Int32> AttributeList::getTokenList(sal_Int32 nAttrToken) const
{
std::vector<sal_Int32> aValues;
- OUString sValue = getString(nAttrToken, "");
+ OUString sValue = getString(nAttrToken, u""_ustr);
sal_Int32 nIndex = 0;
do
{
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx
index c4c2cff479ad..9986bfd9d3f7 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -233,17 +233,17 @@ Reference< XGraphic > GraphicHelper::importGraphic( const Reference< XInputStrea
Reference< XGraphic > xGraphic;
if( rxInStrm.is() && mxGraphicProvider.is() ) try
{
- Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("InputStream", rxInStrm),
- comphelper::makePropertyValue("LazyRead", bLazyLoad) };
+ Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"InputStream"_ustr, rxInStrm),
+ comphelper::makePropertyValue(u"LazyRead"_ustr, bLazyLoad) };
if ( pExtHeader && pExtHeader->mapMode > 0 )
{
aArgs.realloc( aArgs.getLength() + 1 );
auto pArgs = aArgs.getArray();
Sequence< PropertyValue > aFilterData{
- comphelper::makePropertyValue("ExternalWidth", pExtHeader->xExt),
- comphelper::makePropertyValue("ExternalHeight", pExtHeader->yExt),
- comphelper::makePropertyValue("ExternalMapMode", pExtHeader->mapMode)
+ comphelper::makePropertyValue(u"ExternalWidth"_ustr, pExtHeader->xExt),
+ comphelper::makePropertyValue(u"ExternalHeight"_ustr, pExtHeader->yExt),
+ comphelper::makePropertyValue(u"ExternalMapMode"_ustr, pExtHeader->mapMode)
};
pArgs[ 2 ].Name = "FilterData";
pArgs[ 2 ].Value <<= aFilterData;
diff --git a/oox/source/helper/modelobjecthelper.cxx b/oox/source/helper/modelobjecthelper.cxx
index e38a6ee207e2..5ea9fa94ef83 100644
--- a/oox/source/helper/modelobjecthelper.cxx
+++ b/oox/source/helper/modelobjecthelper.cxx
@@ -96,12 +96,12 @@ constexpr OUStringLiteral gaBitmapUrlNameBase( u"msFillBitmap " ); ///< Base
constexpr OUStringLiteral gaHatchNameBase( u"msFillHatch " ); ///< Base name for all named fill hatches.
ModelObjectHelper::ModelObjectHelper( const Reference< XMultiServiceFactory >& rxModelFactory ) :
- maMarkerContainer( rxModelFactory, "com.sun.star.drawing.MarkerTable" ),
- maDashContainer( rxModelFactory, "com.sun.star.drawing.DashTable" ),
- maGradientContainer( rxModelFactory, "com.sun.star.drawing.GradientTable" ),
- maTransGradContainer( rxModelFactory, "com.sun.star.drawing.TransparencyGradientTable" ),
- maBitmapUrlContainer( rxModelFactory, "com.sun.star.drawing.BitmapTable" ),
- maHatchContainer( rxModelFactory, "com.sun.star.drawing.HatchTable" )
+ maMarkerContainer( rxModelFactory, u"com.sun.star.drawing.MarkerTable"_ustr ),
+ maDashContainer( rxModelFactory, u"com.sun.star.drawing.DashTable"_ustr ),
+ maGradientContainer( rxModelFactory, u"com.sun.star.drawing.GradientTable"_ustr ),
+ maTransGradContainer( rxModelFactory, u"com.sun.star.drawing.TransparencyGradientTable"_ustr ),
+ maBitmapUrlContainer( rxModelFactory, u"com.sun.star.drawing.BitmapTable"_ustr ),
+ maHatchContainer( rxModelFactory, u"com.sun.star.drawing.HatchTable"_ustr )
{
}
diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx
index a48860c35481..a559dd5e9fd4 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -81,7 +81,7 @@ void SAL_CALL UnoBinaryInputStream::skipBytes( sal_Int32 nBytesToSkip )
sal_Int32 SAL_CALL UnoBinaryInputStream::available()
{
ensureConnected();
- throw RuntimeException( "Functionality not supported", Reference< XInputStream >() );
+ throw RuntimeException( u"Functionality not supported"_ustr, Reference< XInputStream >() );
}
void SAL_CALL UnoBinaryInputStream::closeInput()
@@ -94,7 +94,7 @@ void SAL_CALL UnoBinaryInputStream::closeInput()
void UnoBinaryInputStream::ensureConnected() const
{
if( !mpInStrm )
- throw NotConnectedException( "Stream closed" );
+ throw NotConnectedException( u"Stream closed"_ustr );
}
} // namespace
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 4a2287bc196b..189f62ab249a 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -208,8 +208,8 @@ void lclPrepareConverter( PropertySet& rConverter, const Reference< XModel >& rx
{
Reference< XMultiServiceFactory > xModelFactory( rxDocModel, UNO_QUERY_THROW );
OUString aServiceName = bRange ?
- OUString( "com.sun.star.table.CellRangeAddressConversion" ) :
- OUString( "com.sun.star.table.CellAddressConversion" );
+ u"com.sun.star.table.CellRangeAddressConversion"_ustr :
+ u"com.sun.star.table.CellAddressConversion"_ustr;
rConverter.set( xModelFactory->createInstance( aServiceName ) );
}
catch (const Exception&)
@@ -345,11 +345,11 @@ void ControlConverter::bindToSources( const Reference< XControlModel >& rxCtrlMo
}
// create argument sequence
- Sequence< Any > aArgs{ Any(NamedValue("BoundCell", Any(aAddress))) };
+ Sequence< Any > aArgs{ Any(NamedValue(u"BoundCell"_ustr, Any(aAddress))) };
// create the CellValueBinding instance and set at the control model
Reference< XMultiServiceFactory > xModelFactory( mxDocModel, UNO_QUERY_THROW );
- Reference< XValueBinding > xBinding( xModelFactory->createInstanceWithArguments( "com.sun.star.table.CellValueBinding", aArgs ), UNO_QUERY_THROW );
+ Reference< XValueBinding > xBinding( xModelFactory->createInstanceWithArguments( u"com.sun.star.table.CellValueBinding"_ustr, aArgs ), UNO_QUERY_THROW );
xBindable->setValueBinding( xBinding );
}
catch (const Exception&)
@@ -376,11 +376,11 @@ void ControlConverter::bindToSources( const Reference< XControlModel >& rxCtrlMo
}
// create argument sequence
- Sequence< Any > aArgs{ Any(NamedValue("CellRange", Any(aRangeAddr))) };
+ Sequence< Any > aArgs{ Any(NamedValue(u"CellRange"_ustr, Any(aRangeAddr))) };
// create the EntrySource instance and set at the control model
Reference< XMultiServiceFactory > xModelFactory( mxDocModel, UNO_QUERY_THROW );
- Reference< XListEntrySource > xEntrySource( xModelFactory->createInstanceWithArguments("com.sun.star.table.CellRangeListSource", aArgs ), UNO_QUERY_THROW );
+ Reference< XListEntrySource > xEntrySource( xModelFactory->createInstanceWithArguments(u"com.sun.star.table.CellRangeListSource"_ustr, aArgs ), UNO_QUERY_THROW );
xEntrySink->setListEntrySource( xEntrySource );
}
catch (const Exception&)
@@ -593,39 +593,39 @@ OUString ControlModelBase::getServiceName() const
ApiControlType eCtrlType = getControlType();
if( mbAwtModel ) switch( eCtrlType )
{
- case API_CONTROL_BUTTON: return "com.sun.star.awt.UnoControlButtonModel";
- case API_CONTROL_FIXEDTEXT: return "com.sun.star.awt.UnoControlFixedTextModel";
- case API_CONTROL_IMAGE: return "com.sun.star.awt.UnoControlImageControlModel";
- case API_CONTROL_CHECKBOX: return "com.sun.star.awt.UnoControlCheckBoxModel";
- case API_CONTROL_RADIOBUTTON: return "com.sun.star.form.component.RadioButton";
- case API_CONTROL_EDIT: return "com.sun.star.awt.UnoControlEditModel";
- case API_CONTROL_NUMERIC: return "com.sun.star.awt.UnoControlNumericFieldModel";
- case API_CONTROL_LISTBOX: return "com.sun.star.form.component.ListBox";
- case API_CONTROL_COMBOBOX: return "com.sun.star.form.component.ComboBox";
- case API_CONTROL_SPINBUTTON: return "com.sun.star.form.component.SpinButton";
- case API_CONTROL_SCROLLBAR: return "com.sun.star.form.component.ScrollBar";
- case API_CONTROL_PROGRESSBAR: return "com.sun.star.awt.UnoControlProgressBarModel";
- case API_CONTROL_GROUPBOX: return "com.sun.star.form.component.GroupBox";
- case API_CONTROL_FRAME: return "com.sun.star.awt.UnoFrameModel";
- case API_CONTROL_PAGE: return "com.sun.star.awt.UnoPageModel";
- case API_CONTROL_MULTIPAGE: return "com.sun.star.awt.UnoMultiPageModel";
- case API_CONTROL_DIALOG: return "com.sun.star.awt.UnoControlDialogModel";
+ case API_CONTROL_BUTTON: return u"com.sun.star.awt.UnoControlButtonModel"_ustr;
+ case API_CONTROL_FIXEDTEXT: return u"com.sun.star.awt.UnoControlFixedTextModel"_ustr;
+ case API_CONTROL_IMAGE: return u"com.sun.star.awt.UnoControlImageControlModel"_ustr;
+ case API_CONTROL_CHECKBOX: return u"com.sun.star.awt.UnoControlCheckBoxModel"_ustr;
+ case API_CONTROL_RADIOBUTTON: return u"com.sun.star.form.component.RadioButton"_ustr;
+ case API_CONTROL_EDIT: return u"com.sun.star.awt.UnoControlEditModel"_ustr;
+ case API_CONTROL_NUMERIC: return u"com.sun.star.awt.UnoControlNumericFieldModel"_ustr;
+ case API_CONTROL_LISTBOX: return u"com.sun.star.form.component.ListBox"_ustr;
+ case API_CONTROL_COMBOBOX: return u"com.sun.star.form.component.ComboBox"_ustr;
+ case API_CONTROL_SPINBUTTON: return u"com.sun.star.form.component.SpinButton"_ustr;
+ case API_CONTROL_SCROLLBAR: return u"com.sun.star.form.component.ScrollBar"_ustr;
+ case API_CONTROL_PROGRESSBAR: return u"com.sun.star.awt.UnoControlProgressBarModel"_ustr;
+ case API_CONTROL_GROUPBOX: return u"com.sun.star.form.component.GroupBox"_ustr;
+ case API_CONTROL_FRAME: return u"com.sun.star.awt.UnoFrameModel"_ustr;
+ case API_CONTROL_PAGE: return u"com.sun.star.awt.UnoPageModel"_ustr;
+ case API_CONTROL_MULTIPAGE: return u"com.sun.star.awt.UnoMultiPageModel"_ustr;
+ case API_CONTROL_DIALOG: return u"com.sun.star.awt.UnoControlDialogModel"_ustr;
default: OSL_FAIL( "ControlModelBase::getServiceName - no AWT model service supported" );
}
else switch( eCtrlType )
{
- case API_CONTROL_BUTTON: return "com.sun.star.form.component.CommandButton";
- case API_CONTROL_FIXEDTEXT: return "com.sun.star.form.component.FixedText";
- case API_CONTROL_IMAGE: return "com.sun.star.form.component.DatabaseImageControl";
- case API_CONTROL_CHECKBOX: return "com.sun.star.form.component.CheckBox";
- case API_CONTROL_RADIOBUTTON: return "com.sun.star.form.component.RadioButton";
- case API_CONTROL_EDIT: return "com.sun.star.form.component.TextField";
- case API_CONTROL_NUMERIC: return "com.sun.star.form.component.NumericField";
- case API_CONTROL_LISTBOX: return "com.sun.star.form.component.ListBox";
- case API_CONTROL_COMBOBOX: return "com.sun.star.form.component.ComboBox";
- case API_CONTROL_SPINBUTTON: return "com.sun.star.form.component.SpinButton";
- case API_CONTROL_SCROLLBAR: return "com.sun.star.form.component.ScrollBar";
- case API_CONTROL_GROUPBOX: return "com.sun.star.form.component.GroupBox";
+ case API_CONTROL_BUTTON: return u"com.sun.star.form.component.CommandButton"_ustr;
+ case API_CONTROL_FIXEDTEXT: return u"com.sun.star.form.component.FixedText"_ustr;
+ case API_CONTROL_IMAGE: return u"com.sun.star.form.component.DatabaseImageControl"_ustr;
+ case API_CONTROL_CHECKBOX: return u"com.sun.star.form.component.CheckBox"_ustr;
+ case API_CONTROL_RADIOBUTTON: return u"com.sun.star.form.component.RadioButton"_ustr;
+ case API_CONTROL_EDIT: return u"com.sun.star.form.component.TextField"_ustr;
+ case API_CONTROL_NUMERIC: return u"com.sun.star.form.component.NumericField"_ustr;
+ case API_CONTROL_LISTBOX: return u"com.sun.star.form.component.ListBox"_ustr;
+ case API_CONTROL_COMBOBOX: return u"com.sun.star.form.component.ComboBox"_ustr;
+ case API_CONTROL_SPINBUTTON: return u"com.sun.star.form.component.SpinButton"_ustr;
+ case API_CONTROL_SCROLLBAR: return u"com.sun.star.form.component.ScrollBar"_ustr;
+ case API_CONTROL_GROUPBOX: return u"com.sun.star.form.component.GroupBox"_ustr;
default: OSL_FAIL( "ControlModelBase::getServiceName - no form component service supported" );
}
return OUString();
@@ -654,7 +654,7 @@ void ControlModelBase::convertSize( PropertyMap& rPropMap, const ControlConverte
ComCtlModelBase::ComCtlModelBase( sal_uInt32 nDataPartId5, sal_uInt32 nDataPartId6,
sal_uInt16 nVersion ) :
- maFontData( "Tahoma", 82500 ),
+ maFontData( u"Tahoma"_ustr, 82500 ),
mnFlags( 0 ),
mnVersion( nVersion ),
mnDataPartId5( nDataPartId5 ),
@@ -1569,7 +1569,7 @@ void AxMorphDataModelBase::convertProperties( PropertyMap& rPropMap, const Contr
{
// If unspecified, radio buttons autoGroup in the same document/sheet
// NOTE: form controls should not autoGroup with ActiveX controls - see drawingfragment.cxx
- OUString sGroupName = !maGroupName.isEmpty() ? maGroupName : "autoGroup_";
+ OUString sGroupName = !maGroupName.isEmpty() ? maGroupName : u"autoGroup_"_ustr;
rPropMap.setProperty( PROP_GroupName, sGroupName );
}
AxFontDataModel::convertProperties( rPropMap, rConv );
@@ -2760,14 +2760,14 @@ Reference< XIndexContainer > const & EmbeddedForm::createXForm()
try
{
Reference< XNameContainer > xFormsNC( mxFormsSupp->getForms(), UNO_SET_THROW );
- OUString aFormName = "Standard";
+ OUString aFormName = u"Standard"_ustr;
if( xFormsNC->hasByName( aFormName ) )
{
mxFormIC.set( xFormsNC->getByName( aFormName ), UNO_QUERY_THROW );
}
else if( mxModelFactory.is() )
{
- Reference< XForm > xForm( mxModelFactory->createInstance( "com.sun.star.form.component.Form" ), UNO_QUERY_THROW );
+ Reference< XForm > xForm( mxModelFactory->createInstance( u"com.sun.star.form.component.Form"_ustr ), UNO_QUERY_THROW );
xFormsNC->insertByName( aFormName, Any( xForm ) );
mxFormIC.set( xForm, UNO_QUERY_THROW );
}
diff --git a/oox/source/ole/axcontrolfragment.cxx b/oox/source/ole/axcontrolfragment.cxx
index 5091af660713..f988e0e56a11 100644
--- a/oox/source/ole/axcontrolfragment.cxx
+++ b/oox/source/ole/axcontrolfragment.cxx
@@ -132,7 +132,7 @@ ContextHandlerRef AxControlFragment::onCreateContext( sal_Int32 nElement, const
// Try to import as a parent control
bool bImportedAsParent = false;
OleStorage aStorage( getFilter().getComponentContext(), xStrgStrm, false );
- BinaryXInputStream aInStrm( aStorage.openInputStream( "f" ), true );
+ BinaryXInputStream aInStrm( aStorage.openInputStream( u"f"_ustr ), true );
if( !aInStrm.isEof() )
{
if( AxContainerModelBase* pModel = dynamic_cast< AxContainerModelBase* >( mrControl.createModelFromGuid( aClassId ) ) )
@@ -144,7 +144,7 @@ ContextHandlerRef AxControlFragment::onCreateContext( sal_Int32 nElement, const
// Import it as a non-parent control
if(!bImportedAsParent)
{
- BinaryXInputStream aInStrm2(aStorage.openInputStream("contents"), true);
+ BinaryXInputStream aInStrm2(aStorage.openInputStream(u"contents"_ustr), true);
if (!aInStrm2.isEof())
{
if (ControlModelBase* pModel = mrControl.createModelFromGuid(aClassId))
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index e5a81320156b..ae0cafdebb25 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -351,7 +351,7 @@ OleFormCtrlExportHelper::OleFormCtrlExportHelper( const Reference< XComponentCo
Reference< XServiceInfo > xInfo( xCntrlModel,
UNO_QUERY);
if (xInfo->
- supportsService( "com.sun.star.form.component.FormattedField" ) )
+ supportsService( u"com.sun.star.form.component.FormattedField"_ustr ) )
nClassId = FORMULAFIELD;
}
else if ( nClassId == FormComponentType::COMMANDBUTTON )
@@ -364,7 +364,7 @@ OleFormCtrlExportHelper::OleFormCtrlExportHelper( const Reference< XComponentCo
{
Reference< XServiceInfo > xInfo( xCntrlModel,
UNO_QUERY);
- if (xInfo->supportsService("com.sun.star.form.component.ImageControl" ) )
+ if (xInfo->supportsService(u"com.sun.star.form.component.ImageControl"_ustr ) )
nClassId = FormComponentType::IMAGECONTROL;
}
@@ -424,7 +424,7 @@ MSConvertOCXControls::~MSConvertOCXControls()
bool
MSConvertOCXControls::importControlFromStream( ::oox::BinaryInputStream& rInStrm, Reference< XFormComponent >& rxFormComp, std::u16string_view rGuidString )
{
- ::oox::ole::EmbeddedControl aControl( "Unknown" );
+ ::oox::ole::EmbeddedControl aControl( u"Unknown"_ustr );
if( ::oox::ole::ControlModelBase* pModel = aControl.createModelFromGuid( rGuidString ) )
{
pModel->importBinaryModel( rInStrm );
@@ -491,13 +491,13 @@ bool MSConvertOCXControls::ReadOCXStorage( rtl::Reference<SotStorage> const & xO
{
if ( xOleStg.is() )
{
- rtl::Reference<SotStorageStream> pNameStream = xOleStg->OpenSotStream("\3OCXNAME", StreamMode::READ);
+ rtl::Reference<SotStorageStream> pNameStream = xOleStg->OpenSotStream(u"\3OCXNAME"_ustr, StreamMode::READ);
BinaryXInputStream aNameStream( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper( *pNameStream ) ), true );
- rtl::Reference<SotStorageStream> pContents = xOleStg->OpenSotStream("contents", StreamMode::READ);
+ rtl::Reference<SotStorageStream> pContents = xOleStg->OpenSotStream(u"contents"_ustr, StreamMode::READ);
BinaryXInputStream aInStrm( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper( *pContents ) ), true );
- rtl::Reference<SotStorageStream> pClsStrm = xOleStg->OpenSotStream("\1CompObj", StreamMode::READ);
+ rtl::Reference<SotStorageStream> pClsStrm = xOleStg->OpenSotStream(u"\1CompObj"_ustr, StreamMode::READ);
BinaryXInputStream aClsStrm( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper(*pClsStrm ) ), true );
aClsStrm.skip(12);
@@ -550,17 +550,17 @@ bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxModel, r
rName = exportHelper.getTypeName();
xOleStg->SetClass( aName, SotClipboardFormatId::EMBEDDED_OBJ_OLE, sFullName);
{
- rtl::Reference<SotStorageStream> pNameStream = xOleStg->OpenSotStream("\3OCXNAME");
+ rtl::Reference<SotStorageStream> pNameStream = xOleStg->OpenSotStream(u"\3OCXNAME"_ustr);
Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pNameStream );
exportHelper.exportName( xOut );
}
{
- rtl::Reference<SotStorageStream> pObjStream = xOleStg->OpenSotStream("\1CompObj");
+ rtl::Reference<SotStorageStream> pObjStream = xOleStg->OpenSotStream(u"\1CompObj"_ustr);
Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pObjStream );
exportHelper.exportCompObj( xOut );
}
{
- rtl::Reference<SotStorageStream> pContents = xOleStg->OpenSotStream("contents");
+ rtl::Reference<SotStorageStream> pContents = xOleStg->OpenSotStream(u"contents"_ustr);
Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pContents );
exportHelper.exportControl( xOut, rSize );
}
diff --git a/oox/source/ole/oleobjecthelper.cxx b/oox/source/ole/oleobjecthelper.cxx
index f99e4a897ec0..801a7ce0aed7 100644
--- a/oox/source/ole/oleobjecthelper.cxx
+++ b/oox/source/ole/oleobjecthelper.cxx
@@ -65,7 +65,7 @@ OleObjectHelper::OleObjectHelper(
assert(m_xModel.is());
if( rxModelFactory.is() ) try
{
- mxResolver.set( rxModelFactory->createInstance( "com.sun.star.document.ImportEmbeddedObjectResolver" ), UNO_QUERY );
+ mxResolver.set( rxModelFactory->createInstance( u"com.sun.star.document.ImportEmbeddedObjectResolver"_ustr ), UNO_QUERY );
}
catch(const Exception& )
{
@@ -96,7 +96,7 @@ void SaveInteropProperties(uno::Reference<frame::XModel> const& xModel,
// get interop grab bag from document
uno::Reference<beans::XPropertySet> const xDocProps(xModel, uno::UNO_QUERY);
- comphelper::SequenceAsHashMap aGrabBag(xDocProps->getPropertyValue("InteropGrabBag"));
+ comphelper::SequenceAsHashMap aGrabBag(xDocProps->getPropertyValue(u"InteropGrabBag"_ustr));
// get EmbeddedObjects property inside grab bag
comphelper::SequenceAsHashMap objectsList;
@@ -104,7 +104,7 @@ void SaveInteropProperties(uno::Reference<frame::XModel> const& xModel,
if (grabIt != aGrabBag.end())
objectsList << grabIt->second;
- uno::Sequence< beans::PropertyValue > aGrabBagAttribute{ comphelper::makePropertyValue("ProgID",
+ uno::Sequence< beans::PropertyValue > aGrabBagAttribute{ comphelper::makePropertyValue(u"ProgID"_ustr,
rProgId) };
// If we got an "old name", erase that first.
@@ -121,7 +121,7 @@ void SaveInteropProperties(uno::Reference<frame::XModel> const& xModel,
aGrabBag[sEmbeddingsPropName] <<= objectsList.getAsConstPropertyValueList();
// put grab bag back into the document
- xDocProps->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag.getAsConstPropertyValueList()));
+ xDocProps->setPropertyValue(u"InteropGrabBag"_ustr, uno::Any(aGrabBag.getAsConstPropertyValueList()));
}
bool OleObjectHelper::importOleObject( PropertyMap& rPropMap, const OleObjectInfo& rOleObject, const awt::Size& rObjSize )
diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx
index 5f2ca4d41428..b223f376d82a 100644
--- a/oox/source/ole/olestorage.cxx
+++ b/oox/source/ole/olestorage.cxx
@@ -230,7 +230,7 @@ void OleStorage::initStorage( const Reference< XInputStream >& rxInStream )
Reference< XMultiServiceFactory > xFactory( mxContext->getServiceManager(), UNO_QUERY_THROW );
Sequence< Any > aArgs{ Any(xInStrm),
Any(true) };// true = do not create a copy of the input stream
- mxStorage.set( xFactory->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", aArgs ), UNO_QUERY_THROW );
+ mxStorage.set( xFactory->createInstanceWithArguments(u"com.sun.star.embed.OLESimpleStorage"_ustr, aArgs ), UNO_QUERY_THROW );
}
catch(const Exception& )
{
@@ -245,7 +245,7 @@ void OleStorage::initStorage( const Reference< XStream >& rxOutStream )
Reference< XMultiServiceFactory > xFactory( mxContext->getServiceManager(), UNO_QUERY_THROW );
Sequence< Any > aArgs{ Any(rxOutStream),
Any(true) }; // true = do not create a copy of the stream
- mxStorage.set( xFactory->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", aArgs ), UNO_QUERY_THROW );
+ mxStorage.set( xFactory->createInstanceWithArguments(u"com.sun.star.embed.OLESimpleStorage"_ustr, aArgs ), UNO_QUERY_THROW );
}
catch(const Exception& )
{
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index dd9de50a2501..a194a910f4b8 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -153,7 +153,7 @@ VbaDummyFormControl::VbaDummyFormControl( const OUString& rName )
mxCtrlModel = std::make_shared<AxLabelModel>();
mxCtrlModel->setAwtModelMode();
- mxCtrlModel->importProperty( XML_Size, "10;10" );
+ mxCtrlModel->importProperty( XML_Size, u"10;10"_ustr );
}
} // namespace
@@ -393,7 +393,7 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
/* Open the 'f' stream containing the model of this control and a list
of site models for all child controls. */
- BinaryXInputStream aFStrm( rStrg.openInputStream( "f" ), true );
+ BinaryXInputStream aFStrm( rStrg.openInputStream( u"f"_ustr ), true );
OSL_ENSURE( !aFStrm.isEof(), "VbaFormControl::importStorage - missing 'f' stream" );
/* Read the properties of this container control and the class table
@@ -409,7 +409,7 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
/* Open the 'o' stream containing models of embedded simple
controls. Stream may be empty or missing, if this control
contains no controls or only container controls. */
- BinaryXInputStream aOStrm( rStrg.openInputStream( "o" ), true );
+ BinaryXInputStream aOStrm( rStrg.openInputStream( u"o"_ustr ), true );
/* Iterate over all embedded controls, import model from 'o'
stream (for embedded simple controls) or from the substorage
@@ -424,7 +424,7 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
AxMultiPageModel* pMultiPage = dynamic_cast< AxMultiPageModel* >( pContainerModel );
assert(pMultiPage);
{
- BinaryXInputStream aXStrm( rStrg.openInputStream( "x" ), true );
+ BinaryXInputStream aXStrm( rStrg.openInputStream( u"x"_ustr ), true );
pMultiPage->importPageAndMultiPageProperties( aXStrm, maControls.size() );
}
typedef std::unordered_map< sal_uInt32, std::shared_ptr< VbaFormControl > > IdToPageMap;
@@ -796,7 +796,7 @@ void VbaUserForm::importForm( const Reference< XNameContainer >& rxDialogLib,
return;
// check that the '03VBFrame' stream exists, this is required for forms
- BinaryXInputStream aInStrm( rVbaFormStrg.openInputStream( "\003VBFrame" ), true );
+ BinaryXInputStream aInStrm( rVbaFormStrg.openInputStream( u"\003VBFrame"_ustr ), true );
OSL_ENSURE( !aInStrm.isEof(), "VbaUserForm::importForm - missing \\003VBFrame stream" );
if( aInStrm.isEof() )
return;
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 44657ebc3408..049c8fc1e9a9 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -630,8 +630,8 @@ void writeREFERENCE(SvStream& rStrm, const OUString& name, std::u16string_view l
void writePROJECTREFERENCES(SvStream& rStrm, const rtl_TextEncoding eTextEncoding)
{
// TODO: find out where these references are coming from
- writeREFERENCE(rStrm, "stdole", u"*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\SysWOW64\\stdole2.tlb#OLE Automation", eTextEncoding);
- writeREFERENCE(rStrm, "Office", u"*\\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.0#0#C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE14\\MSO.DLL#Microsoft Office 14.0 Object Library", eTextEncoding);
+ writeREFERENCE(rStrm, u"stdole"_ustr, u"*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\SysWOW64\\stdole2.tlb#OLE Automation", eTextEncoding);
+ writeREFERENCE(rStrm, u"Office"_ustr, u"*\\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.0#0#C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE14\\MSO.DLL#Microsoft Office 14.0 Object Library", eTextEncoding);
}
// section 2.3.4.2.3.1
@@ -1040,12 +1040,12 @@ void VbaExport::exportVBA(SotStorage* pRootStorage)
getCorrectExportOrder(xNameContainer, aLibraryMap);
// start here with the VBA export
- rtl::Reference<SotStorage> xVBAStream = pRootStorage->OpenSotStorage("VBA", StreamMode::READWRITE);
- rtl::Reference<SotStorageStream> pDirStream = xVBAStream->OpenSotStream("dir", StreamMode::READWRITE);
+ rtl::Reference<SotStorage> xVBAStream = pRootStorage->OpenSotStorage(u"VBA"_ustr, StreamMode::READWRITE);
+ rtl::Reference<SotStorageStream> pDirStream = xVBAStream->OpenSotStream(u"dir"_ustr, StreamMode::READWRITE);
- rtl::Reference<SotStorageStream> pVBAProjectStream = xVBAStream->OpenSotStream("_VBA_PROJECT", StreamMode::READWRITE);
- rtl::Reference<SotStorageStream> pPROJECTStream = pRootStorage->OpenSotStream("PROJECT", StreamMode::READWRITE);
- rtl::Reference<SotStorageStream> pPROJECTwmStream = pRootStorage->OpenSotStream("PROJECTwm", StreamMode::READWRITE);
+ rtl::Reference<SotStorageStream> pVBAProjectStream = xVBAStream->OpenSotStream(u"_VBA_PROJECT"_ustr, StreamMode::READWRITE);
+ rtl::Reference<SotStorageStream> pPROJECTStream = pRootStorage->OpenSotStream(u"PROJECT"_ustr, StreamMode::READWRITE);
+ rtl::Reference<SotStorageStream> pPROJECTwmStream = pRootStorage->OpenSotStream(u"PROJECTwm"_ustr, StreamMode::READWRITE);
const rtl_TextEncoding eTextEncoding = getVBATextEncoding();
@@ -1182,7 +1182,7 @@ rtl_TextEncoding VbaExport::getVBATextEncoding() const
if (xProps.is())
try
{
- xProps->getPropertyValue("VBATextEncoding") >>= aTextEncoding;
+ xProps->getPropertyValue(u"VBATextEncoding"_ustr) >>= aTextEncoding;
}
catch (const css::uno::Exception&)
{
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index 3f52d15032e7..ccacfbd98c89 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -70,7 +70,7 @@ bool lclReadConfigItem( const Reference< XInterface >& rxConfigAccess, const OUS
// some applications do not support all configuration items, assume 'false' in this case
try
{
- Any aItem = ConfigurationHelper::readRelativeKey( rxConfigAccess, "Filter/Import/VBA", rItemName );
+ Any aItem = ConfigurationHelper::readRelativeKey( rxConfigAccess, u"Filter/Import/VBA"_ustr, rItemName );
return aItem.has< bool >() && aItem.get< bool >();
}
catch(const Exception& )
@@ -103,17 +103,17 @@ VbaFilterConfig::~VbaFilterConfig()
bool VbaFilterConfig::isImportVba() const
{
- return lclReadConfigItem( mxConfigAccess, "Load" );
+ return lclReadConfigItem( mxConfigAccess, u"Load"_ustr );
}
bool VbaFilterConfig::isImportVbaExecutable() const
{
- return lclReadConfigItem( mxConfigAccess, "Executable" );
+ return lclReadConfigItem( mxConfigAccess, u"Executable"_ustr );
}
bool VbaFilterConfig::isExportVba() const
{
- return lclReadConfigItem( mxConfigAccess, "Save" );
+ return lclReadConfigItem( mxConfigAccess, u"Save"_ustr );
}
VbaMacroAttacherBase::VbaMacroAttacherBase( OUString aMacroName ) :
@@ -143,7 +143,7 @@ VbaProject::VbaProject( const Reference< XComponentContext >& rxContext,
VbaFilterConfig( rxContext, rConfigCompName ),
mxContext( rxContext ),
mxDocModel( rxDocModel ),
- maPrjName( "Standard" )
+ maPrjName( u"Standard"_ustr )
{
OSL_ENSURE( mxContext.is(), "VbaProject::VbaProject - missing component context" );
OSL_ENSURE( mxDocModel.is(), "VbaProject::VbaProject - missing document model" );
@@ -192,7 +192,7 @@ void VbaProject::importVbaData(const uno::Reference<io::XInputStream>& xInputStr
uno::Reference<embed::XStorage> xDocStorage = xStorageBasedDoc->getDocumentStorage();
{
const sal_Int32 nOpenMode = ElementModes::SEEKABLE | ElementModes::WRITE | ElementModes::TRUNCATE;
- uno::Reference<io::XOutputStream> xDocStream(xDocStorage->openStreamElement("_MS_VBA_Macros_XML", nOpenMode), uno::UNO_QUERY);
+ uno::Reference<io::XOutputStream> xDocStream(xDocStorage->openStreamElement(u"_MS_VBA_Macros_XML"_ustr, nOpenMode), uno::UNO_QUERY);
comphelper::OStorageHelper::CopyInputToOutput(xInputStream, xDocStream);
}
uno::Reference<embed::XTransactedObject>(xDocStorage, uno::UNO_QUERY_THROW)->commit();
@@ -267,7 +267,7 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap
void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
{
- StorageRef xVbaStrg = rVbaPrjStrg.openSubStorage( "VBA", false );
+ StorageRef xVbaStrg = rVbaPrjStrg.openSubStorage( u"VBA"_ustr, false );
OSL_ENSURE( xVbaStrg, "VbaProject::readVbaModules - cannot open 'VBA' substorage" );
if( !xVbaStrg )
return;
@@ -276,7 +276,7 @@ void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
project such as the text encoding used throughout several streams, and
a list of all code modules.
*/
- BinaryXInputStream aInStrm( xVbaStrg->openInputStream( "dir" ), true );
+ BinaryXInputStream aInStrm( xVbaStrg->openInputStream( u"dir"_ustr ), true );
// VbaInputStream implements decompression
VbaInputStream aDirStrm( aInStrm );
OSL_ENSURE( !aDirStrm.isEof(), "VbaProject::importVba - cannot open 'dir' stream" );
@@ -360,7 +360,7 @@ void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
- The line 'BaseClass=<modulename>' declares a code module attached
to a user form with the same name.
*/
- BinaryXInputStream aPrjStrm( rVbaPrjStrg.openInputStream( "PROJECT" ), true );
+ BinaryXInputStream aPrjStrm( rVbaPrjStrg.openInputStream( u"PROJECT"_ustr ), true );
OSL_ENSURE( !aPrjStrm.isEof(), "VbaProject::importVba - cannot open 'PROJECT' stream" );
// do not exit if this stream does not exist, but proceed to load the modules below
if( !aPrjStrm.isEof() )
@@ -418,7 +418,7 @@ void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
xVBACompat->setProjectName( maPrjName );
uno::Reference<beans::XPropertySet> xProps(xVBACompat, uno::UNO_QUERY_THROW);
- xProps->setPropertyValue("VBATextEncoding", uno::Any(eTextEnc));
+ xProps->setPropertyValue(u"VBATextEncoding"_ustr, uno::Any(eTextEnc));
}
catch(const Exception& )
{
@@ -432,7 +432,7 @@ void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper )
{
- StorageRef xVbaStrg = rVbaPrjStrg.openSubStorage( "VBA", false );
+ StorageRef xVbaStrg = rVbaPrjStrg.openSubStorage( u"VBA"_ustr, false );
OSL_ENSURE( xVbaStrg, "VbaProject::importModulesAndForms - cannot open 'VBA' substorage" );
if( !xVbaStrg )
return;
@@ -463,7 +463,7 @@ void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicH
Reference< XNameAccess > xDocObjectNA;
try
{
- xDocObjectNA.set( xModelFactory->createInstance( "ooo.vba.VBAObjectModuleObjectProvider" ), UNO_QUERY );
+ xDocObjectNA.set( xModelFactory->createInstance( u"ooo.vba.VBAObjectModuleObjectProvider"_ustr ), UNO_QUERY );
}
catch(const Exception& )
{
@@ -534,7 +534,7 @@ void VbaProject::attachMacros()
Reference< XMultiComponentFactory > xFactory( mxContext->getServiceManager(), UNO_SET_THROW );
Sequence< Any > aArgs{ Any(mxDocModel), Any(maPrjName) };
Reference< XVBAMacroResolver > xResolver( xFactory->createInstanceWithArgumentsAndContext(
- "com.sun.star.script.vba.VBAMacroResolver", aArgs, mxContext ), UNO_QUERY_THROW );
+ u"com.sun.star.script.vba.VBAMacroResolver"_ustr, aArgs, mxContext ), UNO_QUERY_THROW );
maMacroAttachers.forEachMem( &VbaMacroAttacherBase::resolveAndAttachMacro, ::std::cref( xResolver ) );
}
@@ -555,7 +555,7 @@ void VbaProject::copyStorage( StorageBase& rVbaPrjStrg )
Reference< XStorage > xDocStorage( xStorageBasedDoc->getDocumentStorage(), UNO_SET_THROW );
{
const sal_Int32 nOpenMode = ElementModes::SEEKABLE | ElementModes::WRITE | ElementModes::TRUNCATE;
- Reference< XStream > xDocStream( xDocStorage->openStreamElement( "_MS_VBA_Macros", nOpenMode ), UNO_SET_THROW );
+ Reference< XStream > xDocStream( xDocStorage->openStreamElement( u"_MS_VBA_Macros"_ustr, nOpenMode ), UNO_SET_THROW );
OleStorage aDestStorage( mxContext, xDocStream, false );
rVbaPrjStrg.copyStorageToStorage( aDestStorage );
aDestStorage.commit();
diff --git a/oox/source/ppt/comments.cxx b/oox/source/ppt/comments.cxx
index c38397fcad69..b85d95b4a692 100644
--- a/oox/source/ppt/comments.cxx
+++ b/oox/source/ppt/comments.cxx
@@ -74,7 +74,7 @@ OUString Comment::getAuthor(const CommentAuthorList& list)
if (author.id.toInt32() == nId)
return author.name;
}
- return "Anonymous";
+ return u"Anonymous"_ustr;
}
const Comment& CommentList::getCommentAtIndex(int index)
diff --git a/oox/source/ppt/commontimenodecontext.cxx b/oox/source/ppt/commontimenodecontext.cxx
index e7d1cf1dce44..aa897a286362 100644
--- a/oox/source/ppt/commontimenodecontext.cxx
+++ b/oox/source/ppt/commontimenodecontext.cxx
@@ -367,7 +367,7 @@ OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_I
if( attribs.hasAttribute( XML_afterEffect ) )
{
- aUserData[ "after-effect" ]
+ aUserData[ u"after-effect"_ustr ]
<<= attribs.getBool( XML_afterEffect, false );
}
aProps[ NP_AUTOREVERSE ] <<= attribs.getBool( XML_autoRev, false );
@@ -485,7 +485,7 @@ OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_I
nEnum = EffectNodeType::DEFAULT;
break;
}
- aUserData[ "node-type" ] <<= nEnum;
+ aUserData[ u"node-type"_ustr ] <<= nEnum;
}
// ST_TLTimeNodePresetClassType
@@ -519,7 +519,7 @@ OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_I
nEffectPresetClass = 0;
break;
}
- aUserData[ "preset-class" ] <<= nEffectPresetClass;
+ aUserData[ u"preset-class"_ustr ] <<= nEffectPresetClass;
if( attribs.hasAttribute( XML_presetID ) )
{
sal_Int32 nPresetId = attribs.getInteger( XML_presetID, 0 );
@@ -527,12 +527,12 @@ OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_I
while( p->mpStrPresetId && ((p->mnPresetClass != nEffectPresetClass) || (p->mnPresetId != nPresetId )) )
p++;
- aUserData[ "preset-id" ]
+ aUserData[ u"preset-id"_ustr ]
<<= OUString::createFromAscii( p->mpStrPresetId );
sal_Int32 nPresetSubType = attribs.getInteger( XML_presetSubtype, 0 );
if( nPresetSubType )
{
- aUserData[ "preset-sub-type" ] <<= getConvertedSubType( nEffectPresetClass, nPresetId, nPresetSubType );
+ aUserData[ u"preset-sub-type"_ustr ] <<= getConvertedSubType( nEffectPresetClass, nPresetId, nPresetSubType );
}
}
}
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 55e094db652f..0767dc00118b 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -201,7 +201,7 @@ sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDe
}));
Reference<css::lang::XMultiServiceFactory> aFactory(getComponentContext()->getServiceManager(), UNO_QUERY_THROW);
- Reference< XExporter > xExporter(aFactory->createInstanceWithArguments("com.sun.star.comp.Impress.oox.PowerPointExport", aArguments), UNO_QUERY);
+ Reference< XExporter > xExporter(aFactory->createInstanceWithArguments(u"com.sun.star.comp.Impress.oox.PowerPointExport"_ustr, aArguments), UNO_QUERY);
if (Reference<XFilter> xFilter{ xExporter, UNO_QUERY })
{
@@ -294,7 +294,7 @@ GraphicHelper* PowerPointImport::implCreateGraphicHelper() const
OUString PowerPointImport::getImplementationName()
{
- return "com.sun.star.comp.oox.ppt.PowerPointImport";
+ return u"com.sun.star.comp.oox.ppt.PowerPointImport"_ustr;
}
}
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 5d0152f2d6a8..c443e3bd5e52 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -245,9 +245,9 @@ void PPTShape::addShape(
// and looks for time format in the 4 bits after that
sal_Int32 nDateTimeFormat = static_cast<sal_Int32>(eDateFormat) |
static_cast<sal_Int32>(eTimeFormat) << 4;
- xPropertySet->setPropertyValue( "IsDateTimeVisible", Any(true) );
- xPropertySet->setPropertyValue( "IsDateTimeFixed", Any(false) );
- xPropertySet->setPropertyValue( "DateTimeFormat", Any(nDateTimeFormat) );
+ xPropertySet->setPropertyValue( u"IsDateTimeVisible"_ustr, Any(true) );
+ xPropertySet->setPropertyValue( u"IsDateTimeFixed"_ustr, Any(false) );
+ xPropertySet->setPropertyValue( u"DateTimeFormat"_ustr, Any(nDateTimeFormat) );
return;
}
}
@@ -270,8 +270,8 @@ void PPTShape::addShape(
// if it is possible to get the footer as a property the LO way,
// get it and discard the shape
Reference< XPropertySet > xPropertySet( rSlidePersist.getPage(), UNO_QUERY );
- xPropertySet->setPropertyValue( "IsFooterVisible", Any( true ) );
- xPropertySet->setPropertyValue( "FooterText", Any(rFooterText) );
+ xPropertySet->setPropertyValue( u"IsFooterVisible"_ustr, Any( true ) );
+ xPropertySet->setPropertyValue( u"FooterText"_ustr, Any(rFooterText) );
return;
}
}
@@ -291,7 +291,7 @@ void PPTShape::addShape(
// do that and discard the shape
Reference<XPropertySet> xPropertySet(rSlidePersist.getPage(),
UNO_QUERY);
- xPropertySet->setPropertyValue("IsPageNumberVisible", Any(true));
+ xPropertySet->setPropertyValue(u"IsPageNumberVisible"_ustr, Any(true));
return;
}
}
@@ -414,7 +414,7 @@ void PPTShape::addShape(
} else if (!mpPlaceholder) {
aMasterTextListStyle.reset();
}
- SAL_INFO("oox.ppt","placeholder id: " << (pPlaceholder ? pPlaceholder->getId() : "not found"));
+ SAL_INFO("oox.ppt","placeholder id: " << (pPlaceholder ? pPlaceholder->getId() : u"not found"_ustr));
}
if (!sServiceName.isEmpty())
@@ -489,7 +489,7 @@ void PPTShape::addShape(
Reference < XText > xText(mxShape, UNO_QUERY);
if(xText.is())
{
- xText->setString("");
+ xText->setString(u""_ustr);
Reference < XTextCursor > xTextCursor = xText->createTextCursor();
xText->insertTextContent( xTextCursor, xField, false);
}
@@ -590,7 +590,7 @@ void PPTShape::addShape(
pProperties->Name = "EventType";
pProperties->Handle = -1;
- pProperties->Value <<= OUString("Presentation");
+ pProperties->Value <<= u"Presentation"_ustr;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
pProperties++;
diff --git a/oox/source/ppt/presPropsfragmenthandler.cxx b/oox/source/ppt/presPropsfragmenthandler.cxx
index 2cd9d82950d0..e82fd6f3d7dc 100644
--- a/oox/source/ppt/presPropsfragmenthandler.cxx
+++ b/oox/source/ppt/presPropsfragmenthandler.cxx
@@ -39,8 +39,8 @@ void PresPropsFragmentHandler::finalizeImport()
getFilter().getModel(), css::uno::UNO_QUERY_THROW);
css::uno::Reference<css::beans::XPropertySet> xPresentationProps(
xPresentationSupplier->getPresentation(), css::uno::UNO_QUERY_THROW);
- xPresentationProps->setPropertyValue("IsEndless", css::uno::Any(m_bLoop));
- xPresentationProps->setPropertyValue("IsAutomatic", css::uno::Any(!m_bTiming));
+ xPresentationProps->setPropertyValue(u"IsEndless"_ustr, css::uno::Any(m_bLoop));
+ xPresentationProps->setPropertyValue(u"IsAutomatic"_ustr, css::uno::Any(!m_bTiming));
if (!m_sId.isEmpty())
{
@@ -49,7 +49,7 @@ void PresPropsFragmentHandler::finalizeImport()
css::uno::Reference<css::container::XNameContainer> mxCustShows;
mxCustShows = XCustPresentationSupplier->getCustomPresentations();
const css::uno::Sequence<OUString> aNameSeq(mxCustShows->getElementNames());
- xPresentationProps->setPropertyValue("CustomShow",
+ xPresentationProps->setPropertyValue(u"CustomShow"_ustr,
css::uno::Any(aNameSeq[m_sId.toInt32()]));
}
@@ -60,7 +60,7 @@ void PresPropsFragmentHandler::finalizeImport()
Reference<drawing::XDrawPage> xDrawPage;
xDrawPages->getByIndex(m_sSt.toInt32() - 1) >>= xDrawPage;
Reference<container::XNamed> xNamed(xDrawPage, uno::UNO_QUERY_THROW);
- xPresentationProps->setPropertyValue("FirstPage", uno::Any(xNamed->getName()));
+ xPresentationProps->setPropertyValue(u"FirstPage"_ustr, uno::Any(xNamed->getName()));
}
}
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 955f4e246de1..fc2f42f6a011 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -166,7 +166,7 @@ void PresentationFragmentHandler::importSlideNames(XmlFilterBase& rFilter, const
Reference<container::XNamed> xName(rSlidePersist[nPage]->getPage(), UNO_QUERY_THROW);
xName->setName(
aTitleText
- + (nCount == 1 ? OUString("") : " (" + OUString::number(nCount) + ")"));
+ + (nCount == 1 ? u""_ustr : " (" + OUString::number(nCount) + ")"));
}
}
}
@@ -288,7 +288,7 @@ void PresentationFragmentHandler::importMasterSlide(const Reference<frame::XMode
pMasterPersistPtr->createXShapes( rFilter );
uno::Reference< beans::XPropertySet > xSet(pMasterPersistPtr->getPage(), uno::UNO_QUERY_THROW);
- xSet->setPropertyValue("SlideLayout", Any(pMasterPersistPtr->getLayoutFromValueToken()));
+ xSet->setPropertyValue(u"SlideLayout"_ustr, Any(pMasterPersistPtr->getLayoutFromValueToken()));
oox::drawingml::ThemePtr pTheme = pMasterPersistPtr->getTheme();
if (pTheme)
@@ -346,7 +346,7 @@ void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::Theme
comphelper::makePropertyValue(
"ppt/theme/theme" + OUString::number(nThemeIdx) + ".xml", aCurrentTheme),
// store DOM fragment for SmartArt re-generation
- comphelper::makePropertyValue("OOXTheme", pThemePtr->getFragment())
+ comphelper::makePropertyValue(u"OOXTheme"_ustr, pThemePtr->getFragment())
};
aThemesHashMap << aTheme;
@@ -483,7 +483,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
mpTextListStyle );
FragmentHandlerRef xCommentAuthorsFragmentHandler(
new SlideFragmentHandler( getFilter(),
- "ppt/commentAuthors.xml",
+ u"ppt/commentAuthors.xml"_ustr,
pCommentAuthorsPersistPtr,
Slide ) );
@@ -520,7 +520,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
// crash (back() on empty vector is undefined) and losing other
// comment data that might be there (author, position, timestamp etc.)
pCommentsPersistPtr->getCommentsList().cmLst.back().setText(
- comment_handler->getCharVector().empty() ? "" :
+ comment_handler->getCharVector().empty() ? u""_ustr :
comment_handler->getCharVector().back() );
}
pCommentsPersistPtr->getCommentAuthors().setValues(maAuthorList);
@@ -564,9 +564,9 @@ void PresentationFragmentHandler::finalizeImport()
// writing back the original PageCount of this document, it can be accessed from the XModel
// via getArgs after the import.
- rFilterData["OriginalPageCount"] <<= nPageCount;
- bool bImportNotesPages = rFilterData.getUnpackedValueOrDefault("ImportNotesPages", true);
- OUString aPageRange = rFilterData.getUnpackedValueOrDefault("PageRange", OUString());
+ rFilterData[u"OriginalPageCount"_ustr] <<= nPageCount;
+ bool bImportNotesPages = rFilterData.getUnpackedValueOrDefault(u"ImportNotesPages"_ustr, true);
+ OUString aPageRange = rFilterData.getUnpackedValueOrDefault(u"PageRange"_ustr, OUString());
if( !aPageRange.getLength() )
{
@@ -699,18 +699,18 @@ void PresentationFragmentHandler::finalizeImport()
if (!sAlgorithmName.isEmpty())
{
uno::Sequence<beans::PropertyValue> aResult{
- comphelper::makePropertyValue("algorithm-name", sAlgorithmName),
- comphelper::makePropertyValue("salt", sSalt),
- comphelper::makePropertyValue("iteration-count", nSpinCount),
- comphelper::makePropertyValue("hash", sHash)
+ comphelper::makePropertyValue(u"algorithm-name"_ustr, sAlgorithmName),
+ comphelper::makePropertyValue(u"salt"_ustr, sSalt),
+ comphelper::makePropertyValue(u"iteration-count"_ustr, nSpinCount),
+ comphelper::makePropertyValue(u"hash"_ustr, sHash)
};
try
{
uno::Reference<beans::XPropertySet> xDocSettings(
getFilter().getModelFactory()->createInstance(
- "com.sun.star.document.Settings"),
+ u"com.sun.star.document.Settings"_ustr),
uno::UNO_QUERY);
- xDocSettings->setPropertyValue("ModifyPasswordInfo", uno::Any(aResult));
+ xDocSettings->setPropertyValue(u"ModifyPasswordInfo"_ustr, uno::Any(aResult));
}
catch (const uno::Exception&)
{
@@ -734,7 +734,7 @@ void PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlide
const int nCount = xMasterSlide->getCount();
uno::Reference< beans::XPropertySet > xSet( xSlide, uno::UNO_QUERY_THROW );
- xSet->setPropertyValue( "Layout", Any( pMasterPersistPtr->getLayoutFromValueToken() ) );
+ xSet->setPropertyValue( u"Layout"_ustr, Any( pMasterPersistPtr->getLayoutFromValueToken() ) );
while( nCount < xMasterSlide->getCount())
{
@@ -754,8 +754,8 @@ void PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlide
if ( xPropertySet.is() )
{
awt::Size& rPageSize( rSlidePersistPtr->isNotesPage() ? maNotesSize : maSlideSize );
- xPropertySet->setPropertyValue( "Width", Any( rPageSize.Width ) );
- xPropertySet->setPropertyValue( "Height", Any( rPageSize.Height ) );
+ xPropertySet->setPropertyValue( u"Width"_ustr, Any( rPageSize.Width ) );
+ xPropertySet->setPropertyValue( u"Height"_ustr, Any( rPageSize.Height ) );
oox::ppt::HeaderFooter aHeaderFooter( rSlidePersistPtr->getHeaderFooter() );
if ( !rSlidePersistPtr->isMasterPage() )
@@ -763,10 +763,10 @@ void PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlide
try
{
if ( rSlidePersistPtr->isNotesPage() )
- xPropertySet->setPropertyValue( "IsHeaderVisible", Any( aHeaderFooter.mbHeader ) );
- xPropertySet->setPropertyValue( "IsFooterVisible", Any( aHeaderFooter.mbFooter ) );
- xPropertySet->setPropertyValue( "IsDateTimeVisible", Any( aHeaderFooter.mbDateTime ) );
- xPropertySet->setPropertyValue( "IsPageNumberVisible", Any( aHeaderFooter.mbSlideNumber ) );
+ xPropertySet->setPropertyValue( u"IsHeaderVisible"_ustr, Any( aHeaderFooter.mbHeader ) );
+ xPropertySet->setPropertyValue( u"IsFooterVisible"_ustr, Any( aHeaderFooter.mbFooter ) );
+ xPropertySet->setPropertyValue( u"IsDateTimeVisible"_ustr, Any( aHeaderFooter.mbDateTime ) );
+ xPropertySet->setPropertyValue( u"IsPageNumberVisible"_ustr, Any( aHeaderFooter.mbSlideNumber ) );
}
catch( uno::Exception& )
{
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 491b7c90ed64..64577409c0b1 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -84,7 +84,7 @@ SlideFragmentHandler::~SlideFragmentHandler()
std::optional<bool> aShowMasterShapes = rAttribs.getBool(XML_showMasterSp);
if (aShowMasterShapes.has_value() && !aShowMasterShapes.value())
- xSet->setPropertyValue("IsBackgroundObjectsVisible", Any(false));
+ xSet->setPropertyValue(u"IsBackgroundObjectsVisible"_ustr, Any(false));
aPropMap.setProperty( PROP_Visible, rAttribs.getBool( XML_show, true ));
aSlideProp.setProperties( aPropMap );
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index a4225f95cd43..bc7fc3514a68 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -195,8 +195,8 @@ void SlidePersist::createBackground( const XmlFilterBase& rFilterBase )
css::awt::Size aSize;
Reference< css::beans::XPropertySet > xSet(mxPage, UNO_QUERY);
- xSet->getPropertyValue("Width") >>= aSize.Width;
- xSet->getPropertyValue("Height") >>= aSize.Height;
+ xSet->getPropertyValue(u"Width"_ustr) >>= aSize.Width;
+ xSet->getPropertyValue(u"Height"_ustr) >>= aSize.Height;
oox::drawingml::ShapePropertyIds aPropertyIds = oox::drawingml::ShapePropertyInfo::DEFAULT.mrPropertyIds;
aPropertyIds[oox::drawingml::ShapeProperty::FillGradient] = PROP_FillGradientName;
@@ -394,14 +394,14 @@ static void lcl_SetEdgeLineValue(uno::Reference<drawing::XShape>& rXConnector,
tools::Rectangle aS, aE; // Start, End rectangle
uno::Reference<drawing::XShape> xStartSp, xEndSp;
uno::Reference<beans::XPropertySet> xPropSet(rXConnector, uno::UNO_QUERY);
- xPropSet->getPropertyValue("EdgeStartPoint") >>= aStartPt;
- xPropSet->getPropertyValue("EdgeEndPoint") >>= aEndPt;
- xPropSet->getPropertyValue("StartShape") >>= xStartSp;
- xPropSet->getPropertyValue("EndShape") >>= xEndSp;
- xPropSet->setPropertyValue("EdgeNode1HorzDist", Any(sal_Int32(0)));
- xPropSet->setPropertyValue("EdgeNode1VertDist", Any(sal_Int32(0)));
- xPropSet->setPropertyValue("EdgeNode2HorzDist", Any(sal_Int32(0)));
- xPropSet->setPropertyValue("EdgeNode2VertDist", Any(sal_Int32(0)));
+ xPropSet->getPropertyValue(u"EdgeStartPoint"_ustr) >>= aStartPt;
+ xPropSet->getPropertyValue(u"EdgeEndPoint"_ustr) >>= aEndPt;
+ xPropSet->getPropertyValue(u"StartShape"_ustr) >>= xStartSp;
+ xPropSet->getPropertyValue(u"EndShape"_ustr) >>= xEndSp;
+ xPropSet->setPropertyValue(u"EdgeNode1HorzDist"_ustr, Any(sal_Int32(0)));
+ xPropSet->setPropertyValue(u"EdgeNode1VertDist"_ustr, Any(sal_Int32(0)));
+ xPropSet->setPropertyValue(u"EdgeNode2HorzDist"_ustr, Any(sal_Int32(0)));
+ xPropSet->setPropertyValue(u"EdgeNode2VertDist"_ustr, Any(sal_Int32(0)));
SdrObject* pStartObj = xStartSp.is() ? SdrObject::getSdrObjectFromXShape(xStartSp) : nullptr;
SdrObject* pEndObj = xEndSp.is() ? SdrObject::getSdrObjectFromXShape(xEndSp) : nullptr;
@@ -616,7 +616,7 @@ static void lcl_SetEdgeLineValue(uno::Reference<drawing::XShape>& rXConnector,
nEdge += aConnSize.Height;
}
}
- xPropSet->setPropertyValue("EdgeLine1Delta", Any(nEdge / 2));
+ xPropSet->setPropertyValue(u"EdgeLine1Delta"_ustr, Any(nEdge / 2));
}
}
}
@@ -674,21 +674,21 @@ void SlidePersist::createConnectorShapeConnection()
bool bStart = aConnectorShapeProperties[j].mbStartShape;
if (bStart)
{
- xPropertySet->setPropertyValue("StartShape", uno::Any(xShape));
- xPropertySet->setPropertyValue("StartGluePointIndex", uno::Any(nGlueId));
+ xPropertySet->setPropertyValue(u"StartShape"_ustr, uno::Any(xShape));
+ xPropertySet->setPropertyValue(u"StartGluePointIndex"_ustr, uno::Any(nGlueId));
}
else
{
- xPropertySet->setPropertyValue("EndShape", uno::Any(xShape));
- xPropertySet->setPropertyValue("EndGluePointIndex", uno::Any(nGlueId));
+ xPropertySet->setPropertyValue(u"EndShape"_ustr, uno::Any(xShape));
+ xPropertySet->setPropertyValue(u"EndGluePointIndex"_ustr, uno::Any(nGlueId));
}
}
}
uno::Reference<beans::XPropertySetInfo> xPropInfo = xPropertySet->getPropertySetInfo();
- if (xPropInfo->hasPropertyByName("EdgeKind"))
+ if (xPropInfo->hasPropertyByName(u"EdgeKind"_ustr))
{
ConnectorType aConnectorType;
- xPropertySet->getPropertyValue("EdgeKind") >>= aConnectorType;
+ xPropertySet->getPropertyValue(u"EdgeKind"_ustr) >>= aConnectorType;
if (aConnectorType == ConnectorType_STANDARD)
lcl_SetEdgeLineValue(xConnector, pIt->second);
}
diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx
index e8732e8858a6..1e0aa84ce036 100644
--- a/oox/source/ppt/timenode.cxx
+++ b/oox/source/ppt/timenode.cxx
@@ -599,7 +599,7 @@ namespace oox::ppt {
case AnimationNodeType::SEQ:
{
sal_Int16 nEnum = 0;
- if( maUserData[ "node-type" ] >>= nEnum )
+ if( maUserData[ u"node-type"_ustr ] >>= nEnum )
{
if( nEnum == EffectNodeType::MAIN_SEQUENCE )
{
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index c012097004e9..7f8ec35c7350 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -301,7 +301,7 @@ void SAL_CALL ShapeContextHandler::startFastElement
{
// Get Target for Type = "officeDocument" from _rels/.rels file
// aOfficeDocumentFragmentPath is pointing to "word/document.xml" for docx & to "ppt/presentation.xml" for pptx
- FragmentHandlerRef rFragmentHandlerRef(new ShapeFragmentHandler(*mxShapeFilterBase, "/"));
+ FragmentHandlerRef rFragmentHandlerRef(new ShapeFragmentHandler(*mxShapeFilterBase, u"/"_ustr));
OUString aOfficeDocumentFragmentPath = rFragmentHandlerRef->getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
// Get the theme DO NOT use msRelationFragmentPath for getting theme as for a document there is a single theme in document.xml.rels
@@ -363,13 +363,13 @@ void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
return;
uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY);
- bool bTextFrame = xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame");
+ bool bTextFrame = xServiceInfo.is() && xServiceInfo->supportsService(u"com.sun.star.text.TextFrame"_ustr);
bool bTextBox = false;
if (!bTextFrame)
{
uno::Reference<beans::XPropertySet> xPropertySet(mxSavedShape, uno::UNO_QUERY);
if (xPropertySet.is())
- xPropertySet->getPropertyValue("TextBox") >>= bTextBox;
+ xPropertySet->getPropertyValue(u"TextBox"_ustr) >>= bTextBox;
}
if (bTextFrame || bTextBox)
mxWpsContext.clear();
@@ -559,7 +559,7 @@ ShapeContextHandler::getShape()
basegfx::B2DHomMatrix aMatrix;
oox::drawingml::ShapePtr xShapePtr( mxChartShapeContext->getShape());
// See SwXTextDocument::createInstance(), ODF import uses the same hack.
- xShapePtr->setServiceName("com.sun.star.drawing.temporaryForXMLImportOLE2Shape");
+ xShapePtr->setServiceName(u"com.sun.star.drawing.temporaryForXMLImportOLE2Shape"_ustr);
xShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, xShapePtr->getFillProperties() );
xResult = xShapePtr->getXShape();
mxChartShapeContext.clear();
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 37c58d25029e..4734505302bb 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -103,7 +103,7 @@ bool lcl_getAttributeAsString(const uno::Sequence<beans::PropertyValue>& aProper
{
comphelper::SequenceAsHashMap aPropertyValueAsMap(aPropertyValueAsSeq);
uno::Sequence<beans::PropertyValue> aAttributesSeq;
- if (!((aPropertyValueAsMap.getValue("attributes") >>= aAttributesSeq)
+ if (!((aPropertyValueAsMap.getValue(u"attributes"_ustr) >>= aAttributesSeq)
&& aAttributesSeq.hasElements()))
return false;
comphelper::SequenceAsHashMap aAttributesMap(aAttributesSeq);
@@ -120,7 +120,7 @@ bool lcl_getAttributeAsNumber(const uno::Sequence<beans::PropertyValue>& rProper
{
comphelper::SequenceAsHashMap aPropertyValueAsMap(rPropertyValueAsSeq);
uno::Sequence<beans::PropertyValue> aAttributesSeq;
- if (!((aPropertyValueAsMap.getValue("attributes") >>= aAttributesSeq)
+ if (!((aPropertyValueAsMap.getValue(u"attributes"_ustr) >>= aAttributesSeq)
&& aAttributesSeq.hasElements()))
return false;
comphelper::SequenceAsHashMap aAttributesMap(aAttributesSeq);
@@ -225,7 +225,7 @@ void lcl_getFillDetailsFromPropSeq(const uno::Sequence<beans::PropertyValue>& rT
// First get stop colors
comphelper::SequenceAsHashMap aPropMap(aPropSeq);
uno::Sequence<beans::PropertyValue> aGsLstSeq;
- if (aPropMap.getValue("gsLst") >>= aGsLstSeq)
+ if (aPropMap.getValue(u"gsLst"_ustr) >>= aGsLstSeq)
{
for (auto it = aGsLstSeq.begin(); it < aGsLstSeq.end(); ++it)
{
@@ -248,30 +248,30 @@ void lcl_getFillDetailsFromPropSeq(const uno::Sequence<beans::PropertyValue>& rT
}
// Now determine kind of gradient.
uno::Sequence<beans::PropertyValue> aKindSeq;
- if (aPropMap.getValue("lin") >>= aKindSeq)
+ if (aPropMap.getValue(u"lin"_ustr) >>= aKindSeq)
{
// aKindSeq contains the attributes "ang" and "scaled"
sal_Int32 nAngle; // in 1/60000 deg
- if (lcl_getAttributeAsNumber(aKindSeq, "ang", nAngle))
+ if (lcl_getAttributeAsNumber(aKindSeq, u"ang"_ustr, nAngle))
rFillProperties.maGradientProps.moShadeAngle = nAngle;
OUString sScaledString;
- if (lcl_getAttributeAsString(aKindSeq, "scaled", sScaledString))
+ if (lcl_getAttributeAsString(aKindSeq, u"scaled"_ustr, sScaledString))
rFillProperties.maGradientProps.moShadeScaled
= sScaledString == u"1" || sScaledString == u"true";
return;
}
- if (aPropMap.getValue("path") >>= aKindSeq)
+ if (aPropMap.getValue(u"path"_ustr) >>= aKindSeq)
{
// aKindSeq contains the attribute "path" for the kind of path and a property "fillToRect"
// which defines the center rectangle of the gradient. The property "a:tileRect" known from
// fill of shapes does not exist in w14 namespace.
OUString sKind;
- if (lcl_getAttributeAsString(aKindSeq, "path", sKind))
+ if (lcl_getAttributeAsString(aKindSeq, u"path"_ustr, sKind))
rFillProperties.maGradientProps.moGradientPath
= oox::AttributeConversion::decodeToken(sKind);
comphelper::SequenceAsHashMap aKindMap(aKindSeq);
uno::Sequence<beans::PropertyValue> aFillToRectSeq;
- if (aKindMap.getValue("fillToRect") >>= aFillToRectSeq)
+ if (aKindMap.getValue(u"fillToRect"_ustr) >>= aFillToRectSeq)
{
// The values l, t, r and b are not coordinates, but determine an offset from the
// edge of the bounding box of the shape. This unusual meaning of X1, Y1, X2 and
@@ -316,7 +316,8 @@ void lcl_getLineDetailsFromPropSeq(const uno::Sequence<beans::PropertyValue>& rT
{
// LineProperties has no member to store a miter limit. Therefore some heuristic is
// added here. 0 is default for attribute "lim" in MS Office. It is rendered same as bevel.
- sal_Int32 nMiterLimit = aTextOutlineMap.getUnpackedValueOrDefault("lim", sal_Int32(0));
+ sal_Int32 nMiterLimit
+ = aTextOutlineMap.getUnpackedValueOrDefault(u"lim"_ustr, sal_Int32(0));
if (nMiterLimit == 0)
rLineProperties.moLineJoint = oox::XML_bevel;
else
@@ -406,13 +407,13 @@ lcl_generateFillPropertiesFromTextProps(const comphelper::SequenceAsHashMap& rTe
// no textFill, look for theme color, tint and shade
bool bColorFound(false);
OUString sColorString;
- if (aCharInteropGrabBagMap.getValue("CharThemeOriginalColor") >>= sColorString)
+ if (aCharInteropGrabBagMap.getValue(u"CharThemeOriginalColor"_ustr) >>= sColorString)
{
sal_Int32 nThemeOrigColor = oox::AttributeConversion::decodeIntegerHex(sColorString);
aFillProperties.maFillColor.setSrgbClr(nThemeOrigColor);
bColorFound = true;
}
- if (aCharInteropGrabBagMap.getValue("CharThemeColor") >>= sColorString)
+ if (aCharInteropGrabBagMap.getValue(u"CharThemeColor"_ustr) >>= sColorString)
{
sal_Int32 nColorToken = oox::AttributeConversion::decodeToken(sColorString);
aFillProperties.maFillColor.setSchemeClr(nColorToken);
@@ -420,7 +421,7 @@ lcl_generateFillPropertiesFromTextProps(const comphelper::SequenceAsHashMap& rTe
bColorFound = true;
// A character color has shade or tint, a shape color has lumMod and lumOff.
OUString sTransformString;
- if (aCharInteropGrabBagMap.getValue("CharThemeColorTint") >>= sTransformString)
+ if (aCharInteropGrabBagMap.getValue(u"CharThemeColorTint"_ustr) >>= sTransformString)
{
double fTint = oox::AttributeConversion::decodeIntegerHex(sTransformString);
fTint = fTint / 255.0 * oox::drawingml::MAX_PERCENT;
@@ -430,7 +431,8 @@ lcl_generateFillPropertiesFromTextProps(const comphelper::SequenceAsHashMap& rTe
aFillProperties.maFillColor.addTransformation(OOX_TOKEN(w14, lumOff),
static_cast<sal_Int32>(fOff + 0.5));
}
- else if (aCharInteropGrabBagMap.getValue("CharThemeColorShade") >>= sTransformString)
+ else if (aCharInteropGrabBagMap.getValue(u"CharThemeColorShade"_ustr)
+ >>= sTransformString)
{
double fShade = oox::AttributeConversion::decodeIntegerHex(sTransformString);
fShade = fShade / 255.0 * oox::drawingml::MAX_PERCENT;
@@ -466,7 +468,7 @@ void lcl_setTextAnchorFromTextProps(const uno::Reference<beans::XPropertySet>& x
// Fontwork does not evaluate paragraph alignment but uses text anchor instead
auto eHorzAdjust(drawing::TextHorizontalAdjust_CENTER);
sal_Int16 nParaAlign = sal_Int16(drawing::TextHorizontalAdjust_CENTER);
- aTextPropMap.getValue("ParaAdjust") >>= nParaAlign;
+ aTextPropMap.getValue(u"ParaAdjust"_ustr) >>= nParaAlign;
switch (nParaAlign)
{
case sal_Int16(style::ParagraphAdjust_LEFT):
@@ -478,8 +480,8 @@ void lcl_setTextAnchorFromTextProps(const uno::Reference<beans::XPropertySet>& x
default:
eHorzAdjust = drawing::TextHorizontalAdjust_CENTER;
}
- xShapePropertySet->setPropertyValue("TextHorizontalAdjust", uno::Any(eHorzAdjust));
- xShapePropertySet->setPropertyValue("TextVerticalAdjust",
+ xShapePropertySet->setPropertyValue(u"TextHorizontalAdjust"_ustr, uno::Any(eHorzAdjust));
+ xShapePropertySet->setPropertyValue(u"TextVerticalAdjust"_ustr,
uno::Any(drawing::TextVerticalAdjust_TOP));
}
@@ -609,14 +611,14 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
sal_Int32 nVert = rAttribs.getToken(XML_vert, XML_horz);
if (nVert == XML_eaVert)
{
- xPropertySet->setPropertyValue("TextWritingMode",
+ xPropertySet->setPropertyValue(u"TextWritingMode"_ustr,
uno::Any(text::WritingMode_TB_RL));
- xPropertySet->setPropertyValue("WritingMode",
+ xPropertySet->setPropertyValue(u"WritingMode"_ustr,
uno::Any(text::WritingMode2::TB_RL));
}
else if (nVert == XML_mongolianVert)
{
- xPropertySet->setPropertyValue("WritingMode",
+ xPropertySet->setPropertyValue(u"WritingMode"_ustr,
uno::Any(text::WritingMode2::TB_LR));
}
else if (nVert == XML_wordArtVert || nVert == XML_wordArtVertRtl)
@@ -624,7 +626,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
// Multiline wordArtVert is not implemented yet.
// It will render all the text in 1 line.
// Map 'wordArtVertRtl' to 'wordArtVert', as they are the same now.
- xPropertySet->setPropertyValue("WritingMode",
+ xPropertySet->setPropertyValue(u"WritingMode"_ustr,
uno::Any(text::WritingMode2::STACKED));
}
else if (nVert != XML_horz) // cases XML_vert and XML_vert270
@@ -635,7 +637,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
// Need transformation matrix since RotateAngle does not contain flip.
drawing::HomogenMatrix3 aMatrix;
- xPropertySet->getPropertyValue("Transformation") >>= aMatrix;
+ xPropertySet->getPropertyValue(u"Transformation"_ustr) >>= aMatrix;
basegfx::B2DHomMatrix aTransformation;
aTransformation.set(0, 0, aMatrix.Line1.Column1);
aTransformation.set(0, 1, aMatrix.Line1.Column2);
@@ -656,28 +658,28 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
if ((nVert == XML_vert && nRotate == 270)
|| (nVert == XML_vert270 && nRotate == 90))
{
- xPropertySet->setPropertyValue("WritingMode",
+ xPropertySet->setPropertyValue(u"WritingMode"_ustr,
uno::Any(text::WritingMode2::LR_TB));
// ToDo: Remember original vert value and remove hack on export.
}
else if (nVert == XML_vert)
- xPropertySet->setPropertyValue("WritingMode",
+ xPropertySet->setPropertyValue(u"WritingMode"_ustr,
uno::Any(text::WritingMode2::TB_RL90));
else // nVert == XML_vert270
- xPropertySet->setPropertyValue("WritingMode",
+ xPropertySet->setPropertyValue(u"WritingMode"_ustr,
uno::Any(text::WritingMode2::BT_LR));
}
if (bool bUpright = rAttribs.getBool(XML_upright, false))
{
uno::Sequence<beans::PropertyValue> aGrabBag;
- xPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ xPropertySet->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag;
sal_Int32 length = aGrabBag.getLength();
aGrabBag.realloc(length + 1);
auto pGrabBag = aGrabBag.getArray();
pGrabBag[length].Name = "Upright";
pGrabBag[length].Value <<= bUpright;
- xPropertySet->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag));
+ xPropertySet->setPropertyValue(u"InteropGrabBag"_ustr, uno::Any(aGrabBag));
}
if (xServiceInfo.is())
@@ -696,8 +698,8 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
= (aInsets[i] == XML_lIns || aInsets[i] == XML_rIns) ? 254 : 127;
}
const OUString aShapeProps[]
- = { OUString("TextLeftDistance"), OUString("TextUpperDistance"),
- OUString("TextRightDistance"), OUString("TextLowerDistance") };
+ = { u"TextLeftDistance"_ustr, u"TextUpperDistance"_ustr,
+ u"TextRightDistance"_ustr, u"TextLowerDistance"_ustr };
for (std::size_t i = 0; i < SAL_N_ELEMENTS(aShapeProps); ++i)
if (oInsets[i])
xPropertySet->setPropertyValue(aShapeProps[i], uno::Any(*oInsets[i]));
@@ -708,12 +710,12 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
{
drawing::TextVerticalAdjust eAdjust
= drawingml::GetTextVerticalAdjust(rAttribs.getToken(XML_anchor, XML_t));
- xPropertySet->setPropertyValue("TextVerticalAdjust", uno::Any(eAdjust));
+ xPropertySet->setPropertyValue(u"TextVerticalAdjust"_ustr, uno::Any(eAdjust));
}
// Apply character color of the shape to the shape's textbox.
uno::Reference<text::XText> xText(mxShape, uno::UNO_QUERY);
- uno::Any xCharColor = xPropertySet->getPropertyValue("CharColor");
+ uno::Any xCharColor = xPropertySet->getPropertyValue(u"CharColor"_ustr);
Color aColor = COL_AUTO;
if ((xCharColor >>= aColor) && aColor != COL_AUTO)
{
@@ -736,7 +738,8 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
continue;
if (uno::Reference<beans::XPropertySet> xParaPropSet{ xParagraph,
uno::UNO_QUERY })
- if ((xParaPropSet->getPropertyValue("ParaBackColor") >>= aColor)
+ if ((xParaPropSet->getPropertyValue(u"ParaBackColor"_ustr)
+ >>= aColor)
&& aColor != COL_AUTO)
continue;
@@ -750,19 +753,22 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
const uno::Reference<beans::XPropertyState> xRunState(
xRun, uno::UNO_QUERY);
if (!xRunState
- || xRunState->getPropertyState("CharColor")
+ || xRunState->getPropertyState(u"CharColor"_ustr)
== beans::PropertyState_DEFAULT_VALUE)
{
uno::Reference<beans::XPropertySet> xRunPropSet(xRun,
uno::UNO_QUERY);
if (!xRunPropSet)
continue;
- if ((xRunPropSet->getPropertyValue("CharBackColor") >>= aColor)
+ if ((xRunPropSet->getPropertyValue(u"CharBackColor"_ustr)
+ >>= aColor)
&& aColor != COL_AUTO)
continue;
- if (!(xRunPropSet->getPropertyValue("CharColor") >>= aColor)
+ if (!(xRunPropSet->getPropertyValue(u"CharColor"_ustr)
+ >>= aColor)
|| aColor == COL_AUTO)
- xRunPropSet->setPropertyValue("CharColor", xCharColor);
+ xRunPropSet->setPropertyValue(u"CharColor"_ustr,
+ xCharColor);
}
}
}
@@ -770,7 +776,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
}
auto nWrappingType = rAttribs.getToken(XML_wrap, XML_square);
- xPropertySet->setPropertyValue("TextWordWrap",
+ xPropertySet->setPropertyValue(u"TextWordWrap"_ustr,
uno::Any(nWrappingType == XML_square));
return this;
@@ -820,13 +826,13 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
if (xPropertySet.is())
{
- if (xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
+ if (xServiceInfo->supportsService(u"com.sun.star.text.TextFrame"_ustr))
xPropertySet->setPropertyValue(
- "FrameIsAutomaticHeight",
+ u"FrameIsAutomaticHeight"_ustr,
uno::Any(getBaseToken(nElementToken) == XML_spAutoFit));
else
xPropertySet->setPropertyValue(
- "TextAutoGrowHeight",
+ u"TextAutoGrowHeight"_ustr,
uno::Any(getBaseToken(nElementToken) == XML_spAutoFit));
}
}
@@ -840,10 +846,10 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
std::optional<OUString> presetShapeName = rAttribs.getString(XML_prst);
const OUString& preset = presetShapeName.value();
comphelper::SequenceAsHashMap aCustomShapeGeometry(
- xPropertySet->getPropertyValue("CustomShapeGeometry"));
- aCustomShapeGeometry["PresetTextWarp"] <<= preset;
+ xPropertySet->getPropertyValue(u"CustomShapeGeometry"_ustr));
+ aCustomShapeGeometry[u"PresetTextWarp"_ustr] <<= preset;
xPropertySet->setPropertyValue(
- "CustomShapeGeometry",
+ u"CustomShapeGeometry"_ustr,
uno::Any(aCustomShapeGeometry.getAsConstPropertyValueList()));
}
}
@@ -916,8 +922,8 @@ void WpsContext::onEndElement()
OUString sMSPresetType;
comphelper::SequenceAsHashMap aCustomShapeGeometry(
- xShapePropertySet->getPropertyValue("CustomShapeGeometry"));
- aCustomShapeGeometry["PresetTextWarp"] >>= sMSPresetType;
+ xShapePropertySet->getPropertyValue(u"CustomShapeGeometry"_ustr));
+ aCustomShapeGeometry[u"PresetTextWarp"_ustr] >>= sMSPresetType;
if (sMSPresetType.isEmpty() || sMSPresetType == u"textNoShape")
return;
@@ -925,7 +931,7 @@ void WpsContext::onEndElement()
// the old kind WordArt, which is based on a rectangle. In case of non rectangular shape we keep
// the shape and do not convert the text to Fontwork.
OUString sType;
- aCustomShapeGeometry["Type"] >>= sType;
+ aCustomShapeGeometry[u"Type"_ustr] >>= sType;
if (sType != u"ooxml-rect")
return;
@@ -941,7 +947,7 @@ void WpsContext::onEndElement()
pCustomShape->NbcSetText(sFrameContent);
// Setting the property "TextBox" to false includes removing the attached frame from the shape.
- xShapePropertySet->setPropertyValue("TextBox", uno::Any(false));
+ xShapePropertySet->setPropertyValue(u"TextBox"_ustr, uno::Any(false));
// Set the shape into text path mode, so that the text is drawn as Fontwork. Word renders a legacy
// "text on path" without the legacy stretching, therefore use false for bFromWordArt.
@@ -980,8 +986,8 @@ void WpsContext::onEndElement()
lcl_applyUsedTextPropsToAllTextRuns(xNewText, aTextPropVec);
// Fontwork stretches the text to the given path. So adapt shape size to text is nonsensical.
- xShapePropertySet->setPropertyValue("TextAutoGrowHeight", uno::Any(false));
- xShapePropertySet->setPropertyValue("TextAutoGrowWidth", uno::Any(false));
+ xShapePropertySet->setPropertyValue(u"TextAutoGrowHeight"_ustr, uno::Any(false));
+ xShapePropertySet->setPropertyValue(u"TextAutoGrowWidth"_ustr, uno::Any(false));
}
}
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
index eaa0ecf1c110..7d65872b4cf0 100644
--- a/oox/source/vml/vmldrawing.cxx
+++ b/oox/source/vml/vmldrawing.cxx
@@ -165,19 +165,19 @@ void Drawing::convertAndInsert() const
Reference< XPropertySet > aProps( xCtrlModel, UNO_QUERY_THROW );
OUString sName;
- aProps->getPropertyValue("Name") >>= sName;
+ aProps->getPropertyValue(u"Name"_ustr) >>= sName;
const ::Point aPoint( xCtrlShape->getPosition().X, xCtrlShape->getPosition().Y );
const ::Size aSize( xCtrlShape->getSize().Width, xCtrlShape->getSize().Height );
const tools::Rectangle aRect( aPoint, aSize );
if ( !sName.isEmpty()
- && xModelSI->supportsService("com.sun.star.awt.UnoControlGroupBoxModel") )
+ && xModelSI->supportsService(u"com.sun.star.awt.UnoControlGroupBoxModel"_ustr) )
{
GroupBoxMap[sName] = aRect;
}
- else if ( xModelSI->supportsService("com.sun.star.awt.UnoControlRadioButtonModel") )
+ else if ( xModelSI->supportsService(u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr) )
{
OUString sGroupName;
- aProps->getPropertyValue("GroupName") >>= sGroupName;
+ aProps->getPropertyValue(u"GroupName"_ustr) >>= sGroupName;
// only Form Controls are affected by Group Boxes - see drawingfragment.cxx
if ( sGroupName == "autoGroup_formControl" )
RadioButtonMap[aProps] = aRect;
@@ -195,7 +195,7 @@ void Drawing::convertAndInsert() const
{
if ( BoxItr.second.Contains(RadioItr->second) )
{
- RadioItr->first->setPropertyValue("GroupName", aGroup );
+ RadioItr->first->setPropertyValue(u"GroupName"_ustr, aGroup );
// If conflict, first created GroupBox wins
RadioItr = RadioButtonMap.erase(RadioItr);
}
@@ -276,12 +276,12 @@ Reference< XShape > Drawing::createAndInsertXShape( const OUString& rService,
else
{
Reference< XPropertySet > xPropSet( xShape, UNO_QUERY_THROW );
- xPropSet->setPropertyValue( "HoriOrient", Any( HoriOrientation::NONE ) );
- xPropSet->setPropertyValue( "VertOrient", Any( VertOrientation::NONE ) );
- xPropSet->setPropertyValue( "HoriOrientPosition", Any( rShapeRect.X ) );
- xPropSet->setPropertyValue( "VertOrientPosition", Any( rShapeRect.Y ) );
- xPropSet->setPropertyValue( "HoriOrientRelation", Any( RelOrientation::FRAME ) );
- xPropSet->setPropertyValue( "VertOrientRelation", Any( RelOrientation::FRAME ) );
+ xPropSet->setPropertyValue( u"HoriOrient"_ustr, Any( HoriOrientation::NONE ) );
+ xPropSet->setPropertyValue( u"VertOrient"_ustr, Any( VertOrientation::NONE ) );
+ xPropSet->setPropertyValue( u"HoriOrientPosition"_ustr, Any( rShapeRect.X ) );
+ xPropSet->setPropertyValue( u"VertOrientPosition"_ustr, Any( rShapeRect.Y ) );
+ xPropSet->setPropertyValue( u"HoriOrientRelation"_ustr, Any( RelOrientation::FRAME ) );
+ xPropSet->setPropertyValue( u"VertOrientRelation"_ustr, Any( RelOrientation::FRAME ) );
}
xShape->setSize( awt::Size( rShapeRect.Width, rShapeRect.Height ) );
}
@@ -303,7 +303,7 @@ Reference< XShape > Drawing::createAndInsertXControlShape( const ::oox::ole::Emb
Reference< XControlModel > xCtrlModel( getControlForm().convertAndInsert( rControl, rnCtrlIndex ), UNO_SET_THROW );
// create the control shape
- xShape = createAndInsertXShape( "com.sun.star.drawing.ControlShape", rxShapes, rShapeRect );
+ xShape = createAndInsertXShape( u"com.sun.star.drawing.ControlShape"_ustr, rxShapes, rShapeRect );
// set the control model at the shape
Reference< XControlShape >( xShape, UNO_QUERY_THROW )->setControl( xCtrlModel );
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 5fb422e63b9d..3eefc8abd090 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -982,7 +982,7 @@ static beans::PropertyValue lcl_createTextpathProps()
void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Reference<drawing::XShape>& xShape, const GraphicHelper& rGraphicHelper) const
{
- OUString sFont = "";
+ OUString sFont = u""_ustr;
if (moString.has_value())
{
@@ -990,7 +990,7 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Referen
xTextRange->setString(moString.value());
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
- uno::Sequence<beans::PropertyValue> aGeomPropSeq = xPropertySet->getPropertyValue("CustomShapeGeometry").get< uno::Sequence<beans::PropertyValue> >();
+ uno::Sequence<beans::PropertyValue> aGeomPropSeq = xPropertySet->getPropertyValue(u"CustomShapeGeometry"_ustr).get< uno::Sequence<beans::PropertyValue> >();
bool bFound = false;
for (beans::PropertyValue& rProp : asNonConstRange(aGeomPropSeq))
{
@@ -1025,7 +1025,7 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Referen
aValue = aValue.substr(1, aValue.size() - 2);
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
- xPropertySet->setPropertyValue("CharFontName", uno::Any(OUString(aValue)));
+ xPropertySet->setPropertyValue(u"CharFontName"_ustr, uno::Any(OUString(aValue)));
sFont = aValue;
}
else if (aName == u"font-size")
@@ -1034,7 +1034,7 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Referen
float nSize = drawingml::convertEmuToPoints(lclGetEmu(rGraphicHelper, aOptString, 1));
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
- xPropertySet->setPropertyValue("CharHeight", uno::Any(nSize));
+ xPropertySet->setPropertyValue(u"CharHeight"_ustr, uno::Any(nSize));
}
}
}
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 8f16c6267211..d8ac1b1ed9af 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -390,36 +390,36 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS
if( s_mso_next_textbox.startsWith("#") )
s_mso_next_textbox = s_mso_next_textbox.copy(1);
- if (xSInfo->supportsService("com.sun.star.text.TextFrame"))
+ if (xSInfo->supportsService(u"com.sun.star.text.TextFrame"_ustr))
{
uno::Reference<beans::XPropertySet> propertySet (xShape, uno::UNO_QUERY);
- uno::Any aAny = propertySet->getPropertyValue("FrameInteropGrabBag");
+ uno::Any aAny = propertySet->getPropertyValue(u"FrameInteropGrabBag"_ustr);
auto aGrabBag = comphelper::sequenceToContainer< std::vector<beans::PropertyValue> >(aAny.get< uno::Sequence<beans::PropertyValue> >());
- aGrabBag.push_back(comphelper::makePropertyValue("VML-Z-ORDER", maTypeModel.maZIndex.toInt32()));
+ aGrabBag.push_back(comphelper::makePropertyValue(u"VML-Z-ORDER"_ustr, maTypeModel.maZIndex.toInt32()));
if( !s_mso_next_textbox.isEmpty() )
- aGrabBag.push_back(comphelper::makePropertyValue("mso-next-textbox", s_mso_next_textbox));
+ aGrabBag.push_back(comphelper::makePropertyValue(u"mso-next-textbox"_ustr, s_mso_next_textbox));
if( !sLinkChainName.isEmpty() )
{
- aGrabBag.push_back(comphelper::makePropertyValue("TxbxHasLink", true));
- aGrabBag.push_back(comphelper::makePropertyValue("Txbx-Id", id));
- aGrabBag.push_back(comphelper::makePropertyValue("Txbx-Seq", seq));
- aGrabBag.push_back(comphelper::makePropertyValue("LinkChainName", sLinkChainName));
+ aGrabBag.push_back(comphelper::makePropertyValue(u"TxbxHasLink"_ustr, true));
+ aGrabBag.push_back(comphelper::makePropertyValue(u"Txbx-Id"_ustr, id));
+ aGrabBag.push_back(comphelper::makePropertyValue(u"Txbx-Seq"_ustr, seq));
+ aGrabBag.push_back(comphelper::makePropertyValue(u"LinkChainName"_ustr, sLinkChainName));
}
if(!maTypeModel.maRotation.isEmpty())
- aGrabBag.push_back(comphelper::makePropertyValue("mso-rotation-angle", ConversionHelper::decodeRotation(maTypeModel.maRotation).get()));
- propertySet->setPropertyValue("FrameInteropGrabBag", uno::Any(comphelper::containerToSequence(aGrabBag)));
+ aGrabBag.push_back(comphelper::makePropertyValue(u"mso-rotation-angle"_ustr, ConversionHelper::decodeRotation(maTypeModel.maRotation).get()));
+ propertySet->setPropertyValue(u"FrameInteropGrabBag"_ustr, uno::Any(comphelper::containerToSequence(aGrabBag)));
sal_Int32 backColorTransparency = 0;
- propertySet->getPropertyValue("BackColorTransparency")
+ propertySet->getPropertyValue(u"BackColorTransparency"_ustr)
>>= backColorTransparency;
- if (propertySet->getPropertyValue("FillStyle") == FillStyle_NONE &&
+ if (propertySet->getPropertyValue(u"FillStyle"_ustr) == FillStyle_NONE &&
backColorTransparency == 100)
{
// If there is no fill, the Word default is 100% transparency.
- propertySet->setPropertyValue("FillTransparence", Any(sal_Int16(100)));
+ propertySet->setPropertyValue(u"FillTransparence"_ustr, Any(sal_Int16(100)));
}
}
else
@@ -428,7 +428,7 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS
{
uno::Sequence<beans::PropertyValue> aGrabBag;
uno::Reference<beans::XPropertySet> propertySet (xShape, uno::UNO_QUERY);
- propertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ propertySet->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag;
sal_Int32 length;
length = aGrabBag.getLength();
@@ -460,7 +460,7 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS
pGrabBag[length+3].Name = "LinkChainName";
pGrabBag[length+3].Value <<= sLinkChainName;
}
- propertySet->setPropertyValue( "InteropGrabBag", uno::Any(aGrabBag) );
+ propertySet->setPropertyValue( u"InteropGrabBag"_ustr, uno::Any(aGrabBag) );
}
}
Reference< XControlShape > xControlShape( xShape, uno::UNO_QUERY );
@@ -522,7 +522,7 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
::oox::drawingml::ShapePropertyMap aPropMap(makeShapePropertyMap());
uno::Reference<lang::XServiceInfo> xSInfo(rxShape, uno::UNO_QUERY_THROW);
- if (xSInfo->supportsService("com.sun.star.text.TextFrame"))
+ if (xSInfo->supportsService(u"com.sun.star.text.TextFrame"_ustr))
{
const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
// Any other service supporting the ShadowFormat property?
@@ -561,7 +561,7 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
aPropMap.erase(PROP_LineColor);
}
}
- else if (xSInfo->supportsService("com.sun.star.drawing.CustomShape"))
+ else if (xSInfo->supportsService(u"com.sun.star.drawing.CustomShape"_ustr))
{
const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
maTypeModel.maTextpathModel.pushToPropMap(aPropMap, rxShape, rGraphicHelper);
@@ -870,7 +870,7 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
{
aPropertySet.setAnyProperty(PROP_RotateAngle, Any((*oRotation).get()));
uno::Reference<lang::XServiceInfo> xServiceInfo(rxShapes, uno::UNO_QUERY);
- if (!xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
+ if (!xServiceInfo->supportsService(u"com.sun.star.drawing.GroupShape"_ustr))
{
// If rotation is used, simple setPosition() is not enough.
aPropertySet.setAnyProperty(PROP_HoriOrientPosition, Any(aShapeRect.X));
@@ -885,9 +885,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
// It might occur internally in SdrObject of "sw" module, not here.
// The associated properties "PROP_MirroredX" and "PROP_MirroredY" have to be set here so that direction change will occur internally.
if (bFlipX)
- aPropVec.push_back(comphelper::makePropertyValue("MirroredX", true));
+ aPropVec.push_back(comphelper::makePropertyValue(u"MirroredX"_ustr, true));
if (bFlipY)
- aPropVec.push_back(comphelper::makePropertyValue("MirroredY", true));
+ aPropVec.push_back(comphelper::makePropertyValue(u"MirroredY"_ustr, true));
if (!maTypeModel.maAdjustments.isEmpty())
{
@@ -957,7 +957,7 @@ Reference< XShape > SimpleShape::createPictureObject(const Reference< XShapes >&
const awt::Rectangle& rShapeRect,
uno::Reference<graphic::XGraphic> const & rxGraphic) const
{
- Reference< XShape > xShape = mrDrawing.createAndInsertXShape( "com.sun.star.drawing.GraphicObjectShape", rxShapes, rShapeRect );
+ Reference< XShape > xShape = mrDrawing.createAndInsertXShape( u"com.sun.star.drawing.GraphicObjectShape"_ustr, rxShapes, rShapeRect );
if( xShape.is() )
{
PropertySet aPropSet(xShape);
@@ -967,7 +967,7 @@ Reference< XShape > SimpleShape::createPictureObject(const Reference< XShapes >&
}
uno::Reference< lang::XServiceInfo > xServiceInfo(rxShapes, uno::UNO_QUERY);
// If the shape has an absolute position, set the properties accordingly, unless we're inside a group shape.
- if ( maTypeModel.maPosition == "absolute" && !xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
+ if ( maTypeModel.maPosition == "absolute" && !xServiceInfo->supportsService(u"com.sun.star.drawing.GroupShape"_ustr))
{
aPropSet.setProperty(PROP_HoriOrientPosition, rShapeRect.X);
aPropSet.setProperty(PROP_VertOrientPosition, rShapeRect.Y);
@@ -1016,7 +1016,7 @@ Reference< XShape > SimpleShape::createPictureObject(const Reference< XShapes >&
}
RectangleShape::RectangleShape( Drawing& rDrawing ) :
- SimpleShape( rDrawing, "com.sun.star.drawing.RectangleShape" )
+ SimpleShape( rDrawing, u"com.sun.star.drawing.RectangleShape"_ustr )
{
}
@@ -1048,12 +1048,12 @@ Reference<XShape> RectangleShape::implConvertAndInsert(const Reference<XShapes>&
}
EllipseShape::EllipseShape( Drawing& rDrawing ) :
- SimpleShape( rDrawing, "com.sun.star.drawing.EllipseShape" )
+ SimpleShape( rDrawing, u"com.sun.star.drawing.EllipseShape"_ustr )
{
}
PolyLineShape::PolyLineShape( Drawing& rDrawing ) :
- SimpleShape( rDrawing, "com.sun.star.drawing.PolyLineShape" )
+ SimpleShape( rDrawing, u"com.sun.star.drawing.PolyLineShape"_ustr )
{
}
@@ -1070,7 +1070,7 @@ Reference< XShape > PolyLineShape::implConvertAndInsert( const Reference< XShape
if (aAbsPoints.size() > 2 && aAbsPoints.front().X == aAbsPoints.back().X
&& aAbsPoints.front().Y == aAbsPoints.back().Y)
{
- const_cast<PolyLineShape*>(this)->setService("com.sun.star.drawing.PolyPolygonShape");
+ const_cast<PolyLineShape*>(this)->setService(u"com.sun.star.drawing.PolyPolygonShape"_ustr);
}
}
@@ -1135,7 +1135,7 @@ namespace
}
LineShape::LineShape(Drawing& rDrawing)
- : SimpleShape(rDrawing, "com.sun.star.drawing.LineShape")
+ : SimpleShape(rDrawing, u"com.sun.star.drawing.LineShape"_ustr)
{
}
@@ -1179,7 +1179,7 @@ awt::Rectangle LineShape::getRelRectangle() const
}
BezierShape::BezierShape(Drawing& rDrawing)
- : SimpleShape(rDrawing, "com.sun.star.drawing.OpenBezierShape")
+ : SimpleShape(rDrawing, u"com.sun.star.drawing.OpenBezierShape"_ustr)
{
}
@@ -1189,7 +1189,7 @@ Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes
sal_Int32 nPos = maShapeModel.maVmlPath.lastIndexOf(',');
if ( nPos != -1 && maShapeModel.maVmlPath.indexOf('x', nPos) != -1 )
{
- const_cast<BezierShape*>( this )->setService( "com.sun.star.drawing.ClosedBezierShape" );
+ const_cast<BezierShape*>( this )->setService( u"com.sun.star.drawing.ClosedBezierShape"_ustr );
}
awt::Rectangle aCoordSys = getCoordSystem();
@@ -1261,7 +1261,7 @@ Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes
&& aCoordLists.front().front().Y == aCoordLists.back().back().Y )
{ // HACK: If the shape is in fact closed, which can be found out only when the path is known,
// force to closed bezier shape (otherwise e.g. fill won't work).
- const_cast< BezierShape* >( this )->setService( "com.sun.star.drawing.ClosedBezierShape" );
+ const_cast< BezierShape* >( this )->setService( u"com.sun.star.drawing.ClosedBezierShape"_ustr );
}
}
@@ -1284,7 +1284,7 @@ Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes
}
CustomShape::CustomShape( Drawing& rDrawing ) :
- SimpleShape( rDrawing, "com.sun.star.drawing.CustomShape" )
+ SimpleShape( rDrawing, u"com.sun.star.drawing.CustomShape"_ustr )
{
}
@@ -1332,7 +1332,7 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes
awt::Size aOleSize( rShapeRect.Width, rShapeRect.Height );
if( rFilter.getOleObjectHelper().importOleObject( aOleProps, *pOleObjectInfo, aOleSize ) )
{
- Reference< XShape > xShape = mrDrawing.createAndInsertXShape( "com.sun.star.drawing.OLE2Shape", rxShapes, rShapeRect );
+ Reference< XShape > xShape = mrDrawing.createAndInsertXShape( u"com.sun.star.drawing.OLE2Shape"_ustr, rxShapes, rShapeRect );
if( xShape.is() )
{
// set the replacement graphic
@@ -1457,33 +1457,33 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes
// Store signature line properties
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
- xPropertySet->setPropertyValue("IsSignatureLine", uno::Any(true));
- xPropertySet->setPropertyValue("SignatureLineId",
+ xPropertySet->setPropertyValue(u"IsSignatureLine"_ustr, uno::Any(true));
+ xPropertySet->setPropertyValue(u"SignatureLineId"_ustr,
uno::Any(getShapeModel().maSignatureId));
xPropertySet->setPropertyValue(
- "SignatureLineSuggestedSignerName",
+ u"SignatureLineSuggestedSignerName"_ustr,
uno::Any(getShapeModel().maSignatureLineSuggestedSignerName));
xPropertySet->setPropertyValue(
- "SignatureLineSuggestedSignerTitle",
+ u"SignatureLineSuggestedSignerTitle"_ustr,
uno::Any(getShapeModel().maSignatureLineSuggestedSignerTitle));
xPropertySet->setPropertyValue(
- "SignatureLineSuggestedSignerEmail",
+ u"SignatureLineSuggestedSignerEmail"_ustr,
uno::Any(getShapeModel().maSignatureLineSuggestedSignerEmail));
xPropertySet->setPropertyValue(
- "SignatureLineSigningInstructions",
+ u"SignatureLineSigningInstructions"_ustr,
uno::Any(getShapeModel().maSignatureLineSigningInstructions));
xPropertySet->setPropertyValue(
- "SignatureLineShowSignDate",
+ u"SignatureLineShowSignDate"_ustr,
uno::Any(getShapeModel().mbSignatureLineShowSignDate));
xPropertySet->setPropertyValue(
- "SignatureLineCanAddComment",
+ u"SignatureLineCanAddComment"_ustr,
uno::Any(getShapeModel().mbSignatureLineCanAddComment));
- xPropertySet->setPropertyValue("SignatureLineIsSigned", uno::Any(bIsSigned));
+ xPropertySet->setPropertyValue(u"SignatureLineIsSigned"_ustr, uno::Any(bIsSigned));
if (!aGraphicPath.isEmpty())
{
xGraphic = rFilter.getGraphicHelper().importEmbeddedGraphic(aGraphicPath);
- xPropertySet->setPropertyValue("SignatureLineUnsignedImage", uno::Any(xGraphic));
+ xPropertySet->setPropertyValue(u"SignatureLineUnsignedImage"_ustr, uno::Any(xGraphic));
}
return xShape;
}
@@ -1548,7 +1548,7 @@ Reference< XShape > GroupShape::implConvertAndInsert( const Reference< XShapes >
aParentAnchor.maCoordSys = getCoordSystem();
if( !mxChildren->empty() && (aParentAnchor.maCoordSys.Width > 0) && (aParentAnchor.maCoordSys.Height > 0) ) try
{
- xGroupShape = mrDrawing.createAndInsertXShape( "com.sun.star.drawing.GroupShape", rxShapes, rShapeRect );
+ xGroupShape = mrDrawing.createAndInsertXShape( u"com.sun.star.drawing.GroupShape"_ustr, rxShapes, rShapeRect );
Reference< XShapes > xChildShapes( xGroupShape, UNO_QUERY_THROW );
mxChildren->convertAndInsert( xChildShapes, &aParentAnchor );
if( !xChildShapes->hasElements() )
@@ -1568,11 +1568,11 @@ Reference< XShape > GroupShape::implConvertAndInsert( const Reference< XShapes >
if (xPropertySet.is())
{
uno::Sequence<beans::PropertyValue> aGrabBag;
- xPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ xPropertySet->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag;
sal_Int32 nLength = aGrabBag.getLength();
aGrabBag.realloc(nLength + 1);
- aGrabBag.getArray()[nLength] = comphelper::makePropertyValue("mso-edit-as", maTypeModel.maEditAs);
- xPropertySet->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag));
+ aGrabBag.getArray()[nLength] = comphelper::makePropertyValue(u"mso-edit-as"_ustr, maTypeModel.maEditAs);
+ xPropertySet->setPropertyValue(u"InteropGrabBag"_ustr, uno::Any(aGrabBag));
}
// Make sure group shapes are inline as well, unless there is an explicit different style.
PropertySet aPropertySet(xGroupShape);
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index 20ce2fa37434..fb009020bf72 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -319,12 +319,12 @@ ShapeTypeContext::ShapeTypeContext(ContextHandler2Helper const & rParent,
// - o:hrpct is not in % but in 0.1%
// - if o:hrpct is not given, 100% width is assumed
// - given width is used only if explicit o:hrpct="0" is given
- OUString hrpct = rAttribs.getString( O_TOKEN( hrpct ), "1000" );
+ OUString hrpct = rAttribs.getString( O_TOKEN( hrpct ), u"1000"_ustr );
if( hrpct != "0" )
mrTypeModel.maWidthPercent = OUString::number( hrpct.toInt32() );
mrTypeModel.maWrapDistanceLeft = "0";
mrTypeModel.maWrapDistanceRight = "0";
- mrTypeModel.maPositionHorizontal = rAttribs.getString( O_TOKEN( hralign ), "left" );
+ mrTypeModel.maPositionHorizontal = rAttribs.getString( O_TOKEN( hralign ), u"left"_ustr );
mrTypeModel.moWrapType = "topAndBottom";
}
@@ -548,10 +548,10 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const Attri
if (mrShapeModel.mbInGroup)
// FIXME: without this a text will be added into the group-shape instead of its
// parent shape
- dynamic_cast<SimpleShape&>(mrShape).setService("com.sun.star.drawing.TextShape");
+ dynamic_cast<SimpleShape&>(mrShape).setService(u"com.sun.star.drawing.TextShape"_ustr);
else
// FIXME: without this we does not handle some properties like shadow
- dynamic_cast<SimpleShape&>(mrShape).setService("com.sun.star.text.TextFrame");
+ dynamic_cast<SimpleShape&>(mrShape).setService(u"com.sun.star.text.TextFrame"_ustr);
}
return new TextBoxContext( *this, mrShapeModel.createTextBox(mrShape.getTypeModel()), rAttribs,
mrShape.getDrawing().getFilter().getGraphicHelper());
@@ -559,13 +559,13 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const Attri
case VMLX_TOKEN( ClientData ):
// tdf#41466 ActiveX control shapes with a textbox are transformed into a frame
// (see unit test testActiveXOptionButtonGroup)
- dynamic_cast<SimpleShape&>(mrShape).setService("com.sun.star.text.TextFrame");
+ dynamic_cast<SimpleShape&>(mrShape).setService(u"com.sun.star.text.TextFrame"_ustr);
return new ClientDataContext( *this, mrShapeModel.createClientData(), rAttribs );
case VMLPPT_TOKEN( textdata ):
// Force RectangleShape, this is ugly :(
// and is there because of the lines above which change it to TextFrame
dynamic_cast< SimpleShape& >( mrShape ).setService(
- "com.sun.star.drawing.RectangleShape");
+ u"com.sun.star.drawing.RectangleShape"_ustr);
mrShapeModel.maLegacyDiagramPath = getFragmentPathFromRelId(rAttribs.getStringDefaulted(XML_id));
break;
case O_TOKEN( signatureline ):
@@ -580,9 +580,9 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const Attri
mrShapeModel.maSignatureLineSigningInstructions
= rAttribs.getStringDefaulted(O_TOKEN(signinginstructions));
mrShapeModel.mbSignatureLineShowSignDate = ConversionHelper::decodeBool(
- rAttribs.getString(XML_showsigndate, "t")); // default is true
+ rAttribs.getString(XML_showsigndate, u"t"_ustr)); // default is true
mrShapeModel.mbSignatureLineCanAddComment = ConversionHelper::decodeBool(
- rAttribs.getString(XML_allowcomments, "f")); // default is false
+ rAttribs.getString(XML_allowcomments, u"f"_ustr)); // default is false
break;
case O_TOKEN( lock ):
// TODO
diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx
index b2c6fd407ea6..5b8f94585b88 100644
--- a/oox/source/vml/vmltextbox.cxx
+++ b/oox/source/vml/vmltextbox.cxx
@@ -167,9 +167,9 @@ void TextBox::convert(const uno::Reference<drawing::XShape>& xShape) const
// Track the style in a grabBag for use later when style details are known.
comphelper::SequenceAsHashMap aGrabBag;
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY_THROW);
- aGrabBag.update( xPropertySet->getPropertyValue("CharInteropGrabBag") );
- aGrabBag["mso-pStyle"] <<= sParaStyle;
- xPropertySet->setPropertyValue("CharInteropGrabBag", uno::Any(aGrabBag.getAsConstPropertyValueList()));
+ aGrabBag.update( xPropertySet->getPropertyValue(u"CharInteropGrabBag"_ustr) );
+ aGrabBag[u"mso-pStyle"_ustr] <<= sParaStyle;
+ xPropertySet->setPropertyValue(u"CharInteropGrabBag"_ustr, uno::Any(aGrabBag.getAsConstPropertyValueList()));
}
catch (const uno::Exception&)
{
@@ -181,7 +181,7 @@ void TextBox::convert(const uno::Reference<drawing::XShape>& xShape) const
xCursor->gotoEnd(false);
xCursor->goLeft(1, true);
if (xCursor->getString() == "\n")
- xCursor->setString("");
+ xCursor->setString(u""_ustr);
if ( maLayoutFlow != "vertical" )
return;
@@ -195,9 +195,9 @@ void TextBox::convert(const uno::Reference<drawing::XShape>& xShape) const
// As a result, we need to set horizontal adjustment here to 'right',
// that will result in vertical 'top' after writing mode is applied,
// which matches the VML behavior.
- xProperties->setPropertyValue("TextHorizontalAdjust", uno::Any(drawing::TextHorizontalAdjust_RIGHT));
+ xProperties->setPropertyValue(u"TextHorizontalAdjust"_ustr, uno::Any(drawing::TextHorizontalAdjust_RIGHT));
- xProperties->setPropertyValue( "TextWritingMode", uno::Any( text::WritingMode_TB_RL ) );
+ xProperties->setPropertyValue( u"TextWritingMode"_ustr, uno::Any( text::WritingMode_TB_RL ) );
}
} // namespace oox::vml
diff --git a/oox/source/vml/vmltextboxcontext.cxx b/oox/source/vml/vmltextboxcontext.cxx
index 0a3f255d766d..f180e79375ba 100644
--- a/oox/source/vml/vmltextboxcontext.cxx
+++ b/oox/source/vml/vmltextboxcontext.cxx
@@ -128,7 +128,7 @@ void TextPortionContext::onStartElement(const AttributeList& rAttribs)
maFont.monSize = rAttribs.getInteger( W_TOKEN(val) );
break;
case W_TOKEN(br):
- mrTextBox.appendPortion( maParagraph, maFont, "\n" );
+ mrTextBox.appendPortion( maParagraph, maFont, u"\n"_ustr );
break;
case W_TOKEN(color):
maFont.moColor = rAttribs.getString( W_TOKEN(val) );
@@ -278,7 +278,7 @@ void TextBoxContext::onEndElement()
{
if (getCurrentElement() == W_TOKEN(p))
{
- mrTextBox.appendPortion( maParagraph, TextFontModel(), "\n" );
+ mrTextBox.appendPortion( maParagraph, TextFontModel(), u"\n"_ustr );
maParagraph = TextParagraphModel();
}
}