summaryrefslogtreecommitdiffstats
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/MultiPropertySetHelper.hxx12
-rw-r--r--xmloff/inc/animations.hxx2
-rw-r--r--xmloff/inc/txtfldi.hxx2
-rw-r--r--xmloff/qa/unit/draw.cxx202
-rw-r--r--xmloff/qa/unit/style.cxx198
-rw-r--r--xmloff/qa/unit/text.cxx631
-rw-r--r--xmloff/qa/unit/text/txtprmap.cxx32
-rw-r--r--xmloff/qa/unit/uxmloff.cxx20
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx12
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx70
-rw-r--r--xmloff/source/chart/SchXMLCalculationSettingsContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx54
-rw-r--r--xmloff/source/chart/SchXMLDataTableContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx196
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx10
-rw-r--r--xmloff/source/chart/SchXMLLegendContext.cxx10
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx118
-rw-r--r--xmloff/source/chart/SchXMLPropertyMappingContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx6
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx82
-rw-r--r--xmloff/source/chart/SchXMLSeriesHelper.cxx4
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx8
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx10
-rw-r--r--xmloff/source/chart/XMLChartStyleContext.cxx4
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx2
-rw-r--r--xmloff/source/core/RDFaExportHelper.cxx2
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx8
-rw-r--r--xmloff/source/core/unoatrcn.cxx4
-rw-r--r--xmloff/source/core/xmlerror.cxx2
-rw-r--r--xmloff/source/core/xmlexp.cxx46
-rw-r--r--xmloff/source/core/xmlimp.cxx120
-rw-r--r--xmloff/source/draw/QRCodeContext.cxx2
-rw-r--r--xmloff/source/draw/SignatureLineContext.cxx24
-rw-r--r--xmloff/source/draw/XMLGraphicsDefaultStyle.cxx14
-rw-r--r--xmloff/source/draw/XMLImageMapContext.cxx20
-rw-r--r--xmloff/source/draw/XMLNumberStyles.cxx55
-rw-r--r--xmloff/source/draw/XMLReplacementImageContext.cxx4
-rw-r--r--xmloff/source/draw/XMLShapeStyleContext.cxx2
-rw-r--r--xmloff/source/draw/animationexport.cxx68
-rw-r--r--xmloff/source/draw/animationimport.cxx22
-rw-r--r--xmloff/source/draw/animexp.cxx4
-rw-r--r--xmloff/source/draw/descriptionimp.cxx4
-rw-r--r--xmloff/source/draw/eventimp.cxx6
-rw-r--r--xmloff/source/draw/layerexp.cxx8
-rw-r--r--xmloff/source/draw/layerimp.cxx18
-rw-r--r--xmloff/source/draw/sdpropls.cxx4
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx124
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx30
-rw-r--r--xmloff/source/draw/shapeexport.cxx276
-rw-r--r--xmloff/source/draw/shapeimport.cxx16
-rw-r--r--xmloff/source/draw/xexptran.cxx10
-rw-r--r--xmloff/source/draw/ximp3dobject.cxx20
-rw-r--r--xmloff/source/draw/ximp3dscene.cxx68
-rw-r--r--xmloff/source/draw/ximpbody.cxx4
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx2
-rw-r--r--xmloff/source/draw/ximpgrp.cxx2
-rw-r--r--xmloff/source/draw/ximppage.cxx26
-rw-r--r--xmloff/source/draw/ximpshap.cxx276
-rw-r--r--xmloff/source/draw/ximpshow.cxx28
-rw-r--r--xmloff/source/draw/ximpstyl.cxx12
-rw-r--r--xmloff/source/forms/elementexport.cxx10
-rw-r--r--xmloff/source/forms/elementimport.cxx4
-rw-r--r--xmloff/source/forms/eventexport.cxx2
-rw-r--r--xmloff/source/forms/formattributes.cxx156
-rw-r--r--xmloff/source/forms/gridcolumnproptranslator.cxx2
-rw-r--r--xmloff/source/forms/layerexport.cxx6
-rw-r--r--xmloff/source/forms/propertyexport.cxx8
-rw-r--r--xmloff/source/meta/MetaExportComponent.cxx10
-rw-r--r--xmloff/source/meta/MetaImportComponent.cxx10
-rw-r--r--xmloff/source/meta/xmlmetai.cxx8
-rw-r--r--xmloff/source/meta/xmlversion.cxx12
-rw-r--r--xmloff/source/script/xmlbasicscript.cxx17
-rw-r--r--xmloff/source/style/MultiPropertySetHelper.cxx19
-rw-r--r--xmloff/source/style/PageMasterExportPropMapper.cxx16
-rw-r--r--xmloff/source/style/PageMasterImportContext.cxx18
-rw-r--r--xmloff/source/style/PageMasterImportPropMapper.cxx6
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx20
-rw-r--r--xmloff/source/style/XMLPageExport.cxx14
-rw-r--r--xmloff/source/style/XMLThemeContext.cxx2
-rw-r--r--xmloff/source/style/impastpl.cxx8
-rw-r--r--xmloff/source/style/prstylei.cxx68
-rw-r--r--xmloff/source/style/styleexp.cxx26
-rw-r--r--xmloff/source/style/xmlaustp.cxx2
-rw-r--r--xmloff/source/style/xmlnume.cxx14
-rw-r--r--xmloff/source/style/xmlnumfe.cxx6
-rw-r--r--xmloff/source/style/xmlnumfi.cxx2
-rw-r--r--xmloff/source/style/xmlnumi.cxx60
-rw-r--r--xmloff/source/table/XMLTableExport.cxx46
-rw-r--r--xmloff/source/table/XMLTableImport.cxx4
-rw-r--r--xmloff/source/text/XMLAutoMarkFileContext.cxx2
-rw-r--r--xmloff/source/text/XMLAutoTextEventExport.cxx6
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.cxx2
-rw-r--r--xmloff/source/text/XMLCalculationSettingsContext.cxx2
-rw-r--r--xmloff/source/text/XMLComplexColorExport.cxx2
-rw-r--r--xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx4
-rw-r--r--xmloff/source/text/XMLFootnoteImportContext.cxx6
-rw-r--r--xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx22
-rw-r--r--xmloff/source/text/XMLIndexBibliographyEntryContext.cxx2
-rw-r--r--xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx4
-rw-r--r--xmloff/source/text/XMLIndexObjectSourceContext.cxx10
-rw-r--r--xmloff/source/text/XMLIndexSourceBaseContext.cxx6
-rw-r--r--xmloff/source/text/XMLIndexSpanEntryContext.cxx2
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx29
-rw-r--r--xmloff/source/text/XMLIndexTOCSourceContext.cxx8
-rw-r--r--xmloff/source/text/XMLIndexTOCStylesContext.cxx2
-rw-r--r--xmloff/source/text/XMLIndexTabStopEntryContext.cxx2
-rw-r--r--xmloff/source/text/XMLIndexTableSourceContext.cxx6
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.cxx63
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.hxx15
-rw-r--r--xmloff/source/text/XMLIndexTitleTemplateContext.cxx4
-rw-r--r--xmloff/source/text/XMLIndexUserSourceContext.cxx16
-rw-r--r--xmloff/source/text/XMLLineNumberingExport.cxx22
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.cxx4
-rw-r--r--xmloff/source/text/XMLRedlineExport.cxx36
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx195
-rw-r--r--xmloff/source/text/XMLSectionImportContext.cxx22
-rw-r--r--xmloff/source/text/XMLSectionSourceDDEImportContext.cxx4
-rw-r--r--xmloff/source/text/XMLSectionSourceImportContext.cxx4
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx62
-rw-r--r--xmloff/source/text/XMLTextHeaderFooterContext.cxx10
-rw-r--r--xmloff/source/text/XMLTextListAutoStylePool.cxx4
-rw-r--r--xmloff/source/text/XMLTextListItemContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx12
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx16
-rw-r--r--xmloff/source/text/XMLTextNumRuleInfo.cxx36
-rw-r--r--xmloff/source/text/txtexppr.cxx8
-rw-r--r--xmloff/source/text/txtflde.cxx44
-rw-r--r--xmloff/source/text/txtfldi.cxx190
-rw-r--r--xmloff/source/text/txtimp.cxx54
-rw-r--r--xmloff/source/text/txtlists.cxx4
-rw-r--r--xmloff/source/text/txtparae.cxx166
-rw-r--r--xmloff/source/text/txtparai.cxx118
-rw-r--r--xmloff/source/text/txtprhdl.cxx1
-rw-r--r--xmloff/source/text/txtprmap.cxx2
-rw-r--r--xmloff/source/text/txtstyle.cxx8
-rw-r--r--xmloff/source/text/txtstyli.cxx20
-rw-r--r--xmloff/source/text/txtvfldi.cxx44
-rw-r--r--xmloff/source/text/xmlcontentcontrolcontext.cxx44
-rw-r--r--xmloff/source/text/xmllinebreakcontext.cxx4
-rw-r--r--xmloff/source/transform/DocumentTContext.cxx2
-rw-r--r--xmloff/source/transform/EventMap.cxx140
-rw-r--r--xmloff/source/transform/EventMap.hxx7
-rw-r--r--xmloff/source/transform/EventOASISTContext.cxx10
-rw-r--r--xmloff/source/transform/EventOOoTContext.cxx6
-rw-r--r--xmloff/source/transform/OOo2Oasis.cxx112
-rw-r--r--xmloff/source/transform/Oasis2OOo.cxx6
-rw-r--r--xmloff/source/transform/TransformerBase.cxx8
-rw-r--r--xmloff/source/xforms/XFormsBindContext.cxx18
-rw-r--r--xmloff/source/xforms/XFormsModelContext.cxx2
-rw-r--r--xmloff/source/xforms/XFormsSubmissionContext.cxx30
-rw-r--r--xmloff/source/xforms/xformsapi.cxx2
-rw-r--r--xmloff/source/xforms/xformsexport.cxx151
153 files changed, 2708 insertions, 2737 deletions
diff --git a/xmloff/inc/MultiPropertySetHelper.hxx b/xmloff/inc/MultiPropertySetHelper.hxx
index 9d539fa26287..f081e92572da 100644
--- a/xmloff/inc/MultiPropertySetHelper.hxx
+++ b/xmloff/inc/MultiPropertySetHelper.hxx
@@ -21,6 +21,7 @@
#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <memory>
+#include <span>
namespace com::sun::star
{
@@ -62,10 +63,7 @@ class XPropertySetInfo;
class MultiPropertySetHelper
{
/// names of all properties
- std::unique_ptr<OUString[]> pPropertyNames;
-
- /// length of pPropertyNames array
- sal_Int16 nLength;
+ std::span<const OUString> pPropertyNames;
/// the sequence of property names that the current (multi)
/// property set implementation supports
@@ -85,7 +83,7 @@ class MultiPropertySetHelper
css::uno::Any aEmptyAny;
public:
- MultiPropertySetHelper(const char** pNames);
+ MultiPropertySetHelper(std::span<const OUString> pNames);
~MultiPropertySetHelper();
@@ -169,7 +167,7 @@ const css::uno::Any& MultiPropertySetHelper::getValue(sal_Int16 nValueNo)
{
assert(pValues && "called getValue() without calling getValues()");
assert(pSequenceIndex && "called getValue() without calling hasProperties()");
- assert(nValueNo < nLength);
+ assert(o3tl::make_unsigned(nValueNo) < pPropertyNames.size());
sal_Int16 nIndex = pSequenceIndex[nValueNo];
return (nIndex != -1) ? pValues[nIndex] : aEmptyAny;
@@ -178,7 +176,7 @@ const css::uno::Any& MultiPropertySetHelper::getValue(sal_Int16 nValueNo)
bool MultiPropertySetHelper::hasProperty(sal_Int16 nValueNo)
{
assert(pSequenceIndex && "called hasProperty() without calling hasProperties()");
- assert(nValueNo < nLength);
+ assert(o3tl::make_unsigned(nValueNo) < pPropertyNames.size());
return pSequenceIndex[nValueNo] != -1;
}
diff --git a/xmloff/inc/animations.hxx b/xmloff/inc/animations.hxx
index 935ebf0396f7..6ab3cd903a1e 100644
--- a/xmloff/inc/animations.hxx
+++ b/xmloff/inc/animations.hxx
@@ -45,7 +45,7 @@ extern const SvXMLEnumMapEntry<sal_Int16> aAnimations_EnumMap_Command[];
struct ImplAttributeNameConversion
{
token::XMLTokenEnum meXMLToken;
- const char* mpAPIName;
+ OUString maAPIName;
};
extern const struct ImplAttributeNameConversion* getAnimationAttributeNamesConversionList();
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 4639ec43f38b..7a9deab5a0d5 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -953,7 +953,7 @@ private:
virtual void PrepareField(
const css::uno::Reference<css::beans::XPropertySet> & xPropertySet) override;
- static const char* MapBibliographyFieldName(sal_Int32 nElement);
+ static OUString MapBibliographyFieldName(sal_Int32 nElement);
};
/** Import an annotation field (<text:annotation>) */
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx
index 985af4f1ad5e..05d5a756d6e9 100644
--- a/xmloff/qa/unit/draw.cxx
+++ b/xmloff/qa/unit/draw.cxx
@@ -70,7 +70,7 @@ public:
};
XmloffDrawTest::XmloffDrawTest()
- : UnoApiXmlTest("/xmloff/qa/unit/data/")
+ : UnoApiXmlTest(u"/xmloff/qa/unit/data/"_ustr)
{
}
@@ -89,14 +89,14 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextBoxLoss)
{
// Load a document that has a shape with a textbox in it. Save it to ODF and reload.
loadFromFile(u"textbox-loss.docx");
- saveAndReload("impress8");
+ saveAndReload(u"impress8"_ustr);
// Make sure that the shape is still a textbox.
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(1), uno::UNO_QUERY);
bool bTextBox = false;
- xShape->getPropertyValue("TextBox") >>= bTextBox;
+ xShape->getPropertyValue(u"TextBox"_ustr) >>= bTextBox;
// Without the accompanying fix in place, this test would have failed, as the shape only had
// editeng text, losing the image part of the shape text.
@@ -109,18 +109,18 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf141301_Extrusion_Angle)
loadFromFile(u"tdf141301_Extrusion_Skew.odg");
// Prepare use of XPath
- save("draw8");
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ save(u"draw8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without fix draw:extrusion-skew="50 -135" was not written to file although "50 -135" is not
// default in ODF, but only default inside LO.
- assertXPath(pXmlDoc, "//draw:enhanced-geometry"_ostr, "extrusion-skew"_ostr, "50 -135");
+ assertXPath(pXmlDoc, "//draw:enhanced-geometry"_ostr, "extrusion-skew"_ostr, u"50 -135"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeExport)
{
// Create an Impress document which has a master page which has a theme associated with it.
- mxComponent = loadFromDesktop("private:factory/simpress");
+ mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XMasterPageTarget> xDrawPage(
xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
@@ -143,13 +143,13 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeExport)
pTheme->setColorSet(pColorSet);
uno::Reference<util::XTheme> xTheme = model::theme::createXTheme(pTheme);
- xMasterPage->setPropertyValue("Theme", uno::Any(xTheme));
+ xMasterPage->setPropertyValue(u"Theme"_ustr, uno::Any(xTheme));
// Export to ODP:
- save("impress8");
+ save(u"impress8"_ustr);
// Check if the 12 colors are written in the XML:
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 12
// - Actual : 0
@@ -185,9 +185,9 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testVideoSnapshot)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1356), rCrop.Right);
// Execute ODP export:
- save("impress8");
+ save(u"impress8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Check that the preview was exported:
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -195,10 +195,10 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testVideoSnapshot)
// - XPath '//draw:frame[@draw:style-name='gr1']/draw:image' number of nodes is incorrect
// i.e. the preview wasn't exported to ODP.
assertXPath(pXmlDoc, "//draw:frame[@draw:style-name='gr1']/draw:image"_ostr, "href"_ostr,
- "Pictures/MediaPreview1.png");
+ u"Pictures/MediaPreview1.png"_ustr);
// Check that the crop was exported:
assertXPath(pXmlDoc, "//style:style[@style:name='gr1']/style:graphic-properties"_ostr,
- "clip"_ostr, "rect(0cm, 1.356cm, 0cm, 1.356cm)");
+ "clip"_ostr, u"rect(0cm, 1.356cm, 0cm, 1.356cm)"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeImport)
@@ -213,7 +213,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeImport)
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());
@@ -222,10 +222,10 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeImport)
auto pTheme = pUnoTheme->getTheme();
CPPUNIT_ASSERT(pTheme);
- CPPUNIT_ASSERT_EQUAL(OUString("Office Theme"), pTheme->GetName());
+ CPPUNIT_ASSERT_EQUAL(u"Office Theme"_ustr, pTheme->GetName());
auto pColorSet = pTheme->getColorSet();
CPPUNIT_ASSERT(pColorSet);
- CPPUNIT_ASSERT_EQUAL(OUString("Office"), pColorSet->getName());
+ CPPUNIT_ASSERT_EQUAL(u"Office"_ustr, pColorSet->getName());
CPPUNIT_ASSERT_EQUAL(Color(0x954F72),
pColorSet->getColor(model::ThemeColorType::FollowedHyperlink));
@@ -239,7 +239,7 @@ void checkFillAndLineComplexColors(uno::Reference<drawing::XShape> const& xShape
uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY);
{
uno::Reference<util::XComplexColor> xComplexColor;
- xShapeProperties->getPropertyValue("FillComplexColor") >>= xComplexColor;
+ xShapeProperties->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor;
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent3, aComplexColor.getThemeColorType());
@@ -253,7 +253,7 @@ void checkFillAndLineComplexColors(uno::Reference<drawing::XShape> const& xShape
}
{
uno::Reference<util::XComplexColor> xComplexColor;
- xShapeProperties->getPropertyValue("LineComplexColor") >>= xComplexColor;
+ xShapeProperties->getPropertyValue(u"LineComplexColor"_ustr) >>= xComplexColor;
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent3, aComplexColor.getThemeColorType());
@@ -275,7 +275,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testFillAndLineThemeColorExportImport)
checkFillAndLineComplexColors(getShape(0));
- save("impress8");
+ save(u"impress8"_ustr);
load(maTempFile.GetURL());
@@ -286,62 +286,62 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport)
{
// Given a document that refers to a theme color:
loadFromFile(u"Reference-ThemeColors-TextAndFill.pptx");
- save("impress8");
+ save(u"impress8"_ustr);
// Make sure the export result has the theme reference:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Text color
OString aStyle1(
"//style:style[@style:name='T2']/style:text-properties/loext:char-complex-color"_ostr);
- assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, "theme");
- assertXPath(pXmlDoc, aStyle1, "theme-type"_ostr, "accent3");
- assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[1]", "type"_ostr, "lummod");
- assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[1]", "value"_ostr, "2000");
- assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[2]", "type"_ostr, "lumoff");
- assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[2]", "value"_ostr, "8000");
+ assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, u"theme"_ustr);
+ assertXPath(pXmlDoc, aStyle1, "theme-type"_ostr, u"accent3"_ustr);
+ assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[1]", "type"_ostr, u"lummod"_ustr);
+ assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[1]", "value"_ostr, u"2000"_ustr);
+ assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[2]", "type"_ostr, u"lumoff"_ustr);
+ assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[2]", "value"_ostr, u"8000"_ustr);
OString aStyle2(
"//style:style[@style:name='T3']/style:text-properties/loext:char-complex-color"_ostr);
- assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, "theme");
- assertXPath(pXmlDoc, aStyle2, "theme-type"_ostr, "accent3");
- assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[1]", "type"_ostr, "lummod");
- assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[1]", "value"_ostr, "6000");
- assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[2]", "type"_ostr, "lumoff");
- assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[2]", "value"_ostr, "4000");
+ assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, u"theme"_ustr);
+ assertXPath(pXmlDoc, aStyle2, "theme-type"_ostr, u"accent3"_ustr);
+ assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[1]", "type"_ostr, u"lummod"_ustr);
+ assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[1]", "value"_ostr, u"6000"_ustr);
+ assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[2]", "type"_ostr, u"lumoff"_ustr);
+ assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[2]", "value"_ostr, u"4000"_ustr);
OString aStyle3(
"//style:style[@style:name='T4']/style:text-properties/loext:char-complex-color"_ostr);
- assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, "theme");
- assertXPath(pXmlDoc, aStyle3, "theme-type"_ostr, "accent3");
- assertXPath(pXmlDoc, aStyle3 + "/loext:transformation[1]", "type"_ostr, "lummod");
- assertXPath(pXmlDoc, aStyle3 + "/loext:transformation[1]", "value"_ostr, "5000");
+ assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, u"theme"_ustr);
+ assertXPath(pXmlDoc, aStyle3, "theme-type"_ostr, u"accent3"_ustr);
+ assertXPath(pXmlDoc, aStyle3 + "/loext:transformation[1]", "type"_ostr, u"lummod"_ustr);
+ assertXPath(pXmlDoc, aStyle3 + "/loext:transformation[1]", "value"_ostr, u"5000"_ustr);
// Shapes fill color
OString aShape1("//style:style[@style:name='gr1']/style:graphic-properties/"
"loext:fill-complex-color"_ostr);
- assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, "theme");
- assertXPath(pXmlDoc, aShape1, "theme-type"_ostr, "accent2");
- assertXPath(pXmlDoc, aShape1 + "/loext:transformation[1]", "type"_ostr, "lummod");
- assertXPath(pXmlDoc, aShape1 + "/loext:transformation[1]", "value"_ostr, "2000");
- assertXPath(pXmlDoc, aShape1 + "/loext:transformation[2]", "type"_ostr, "lumoff");
- assertXPath(pXmlDoc, aShape1 + "/loext:transformation[2]", "value"_ostr, "8000");
+ assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, u"theme"_ustr);
+ assertXPath(pXmlDoc, aShape1, "theme-type"_ostr, u"accent2"_ustr);
+ assertXPath(pXmlDoc, aShape1 + "/loext:transformation[1]", "type"_ostr, u"lummod"_ustr);
+ assertXPath(pXmlDoc, aShape1 + "/loext:transformation[1]", "value"_ostr, u"2000"_ustr);
+ assertXPath(pXmlDoc, aShape1 + "/loext:transformation[2]", "type"_ostr, u"lumoff"_ustr);
+ assertXPath(pXmlDoc, aShape1 + "/loext:transformation[2]", "value"_ostr, u"8000"_ustr);
OString aShape2("//style:style[@style:name='gr2']/style:graphic-properties/"
"loext:fill-complex-color"_ostr);
- assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, "theme");
- assertXPath(pXmlDoc, aShape2, "theme-type"_ostr, "accent2");
- assertXPath(pXmlDoc, aShape2 + "/loext:transformation[1]", "type"_ostr, "lummod");
- assertXPath(pXmlDoc, aShape2 + "/loext:transformation[1]", "value"_ostr, "6000");
- assertXPath(pXmlDoc, aShape2 + "/loext:transformation[2]", "type"_ostr, "lumoff");
- assertXPath(pXmlDoc, aShape2 + "/loext:transformation[2]", "value"_ostr, "4000");
+ assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, u"theme"_ustr);
+ assertXPath(pXmlDoc, aShape2, "theme-type"_ostr, u"accent2"_ustr);
+ assertXPath(pXmlDoc, aShape2 + "/loext:transformation[1]", "type"_ostr, u"lummod"_ustr);
+ assertXPath(pXmlDoc, aShape2 + "/loext:transformation[1]", "value"_ostr, u"6000"_ustr);
+ assertXPath(pXmlDoc, aShape2 + "/loext:transformation[2]", "type"_ostr, u"lumoff"_ustr);
+ assertXPath(pXmlDoc, aShape2 + "/loext:transformation[2]", "value"_ostr, u"4000"_ustr);
OString aShape3("//style:style[@style:name='gr3']/style:graphic-properties/"
"loext:fill-complex-color"_ostr);
- assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, "theme");
- assertXPath(pXmlDoc, aShape3, "theme-type"_ostr, "accent2");
- assertXPath(pXmlDoc, aShape3 + "/loext:transformation[1]", "type"_ostr, "lummod");
- assertXPath(pXmlDoc, aShape3 + "/loext:transformation[1]", "value"_ostr, "5000");
+ assertXPath(pXmlDoc, aStyle1, "color-type"_ostr, u"theme"_ustr);
+ assertXPath(pXmlDoc, aShape3, "theme-type"_ostr, u"accent2"_ustr);
+ assertXPath(pXmlDoc, aShape3 + "/loext:transformation[1]", "type"_ostr, u"lummod"_ustr);
+ assertXPath(pXmlDoc, aShape3 + "/loext:transformation[1]", "value"_ostr, u"5000"_ustr);
// reload
load(maTempFile.GetURL());
@@ -352,7 +352,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport)
CPPUNIT_ASSERT(xShape.is());
uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY);
uno::Reference<util::XComplexColor> xComplexColor;
- xShapeProperties->getPropertyValue("FillComplexColor") >>= xComplexColor;
+ xShapeProperties->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor;
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent2, aComplexColor.getThemeColorType());
@@ -369,7 +369,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport)
CPPUNIT_ASSERT(xShape.is());
uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY);
uno::Reference<util::XComplexColor> xComplexColor;
- xShapeProperties->getPropertyValue("FillComplexColor") >>= xComplexColor;
+ xShapeProperties->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor;
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent2, aComplexColor.getThemeColorType());
@@ -386,7 +386,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport)
CPPUNIT_ASSERT(xShape.is());
uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY);
uno::Reference<util::XComplexColor> xComplexColor;
- xShapeProperties->getPropertyValue("FillComplexColor") >>= xComplexColor;
+ xShapeProperties->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor;
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent2, aComplexColor.getThemeColorType());
@@ -405,7 +405,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport)
uno::Reference<beans::XPropertySet> xPortion = getShapeTextPortion(0, xShape);
CPPUNIT_ASSERT(xPortion.is());
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::Accent3, aComplexColor.getThemeColorType());
@@ -426,7 +426,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport)
uno::Reference<beans::XPropertySet> xPortion = getShapeTextPortion(0, xShape);
CPPUNIT_ASSERT(xPortion.is());
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::Accent3, aComplexColor.getThemeColorType());
@@ -447,7 +447,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport)
uno::Reference<beans::XPropertySet> xPortion = getShapeTextPortion(0, xShape);
CPPUNIT_ASSERT(xPortion.is());
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::Accent3, aComplexColor.getThemeColorType());
@@ -461,7 +461,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport)
CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeColor_ShapeFill)
{
loadFromFile(u"ReferenceShapeFill.pptx");
- save("impress8");
+ save(u"impress8"_ustr);
// reload
load(maTempFile.GetURL());
@@ -470,7 +470,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeColor_ShapeFill)
CPPUNIT_ASSERT(xShape.is());
uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY);
uno::Reference<util::XComplexColor> xComplexColor;
- xShapeProperties->getPropertyValue("FillComplexColor") >>= xComplexColor;
+ xShapeProperties->getPropertyValue(u"FillComplexColor"_ustr) >>= xComplexColor;
CPPUNIT_ASSERT(xComplexColor.is());
auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent6, aComplexColor.getThemeColorType());
@@ -495,8 +495,8 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTableInShape)
uno::Reference<text::XTextTable> xTable(xEnum->nextElement(), uno::UNO_QUERY);
// Without the accompanying fix in place, this test would have crashed, as xTable was an empty
// reference, i.e. the table inside the shape was lost.
- uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("A1"), xCell->getString());
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName(u"A1"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(u"A1"_ustr, xCell->getString());
}
// Tests for save/load of new (LO 7.4) attribute loext:extrusion-metal-type
@@ -506,19 +506,19 @@ void lcl_assertMetalProperties(std::string_view sInfo, uno::Reference<drawing::X
{
uno::Reference<beans::XPropertySet> xShapeProps(rxShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGeoPropSeq;
- xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeoPropSeq;
+ xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aGeoPropSeq;
comphelper::SequenceAsHashMap aGeoPropMap(aGeoPropSeq);
uno::Sequence<beans::PropertyValue> aExtrusionSeq;
- aGeoPropMap.getValue("Extrusion") >>= aExtrusionSeq;
+ aGeoPropMap.getValue(u"Extrusion"_ustr) >>= aExtrusionSeq;
comphelper::SequenceAsHashMap aExtrusionPropMap(aExtrusionSeq);
bool bIsMetal(false);
- aExtrusionPropMap.getValue("Metal") >>= bIsMetal;
+ aExtrusionPropMap.getValue(u"Metal"_ustr) >>= bIsMetal;
OString sMsg = OString::Concat(sInfo) + " Metal";
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), bIsMetal);
sal_Int16 nMetalType(-1);
- aExtrusionPropMap.getValue("MetalType") >>= nMetalType;
+ aExtrusionPropMap.getValue(u"MetalType"_ustr) >>= nMetalType;
sMsg = OString::Concat(sInfo) + " MetalType";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
sMsg.getStr(), css::drawing::EnhancedCustomShapeMetalType::MetalMSCompatible, nMetalType);
@@ -533,17 +533,17 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionMetalTypeExtended)
lcl_assertMetalProperties("from doc", xShape);
// Test, that new attribute is written with loext namespace. Adapt when attribute is added to ODF.
- save("writer8");
+ save(u"writer8"_ustr);
// assert XML.
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
- assertXPath(pXmlDoc, "//draw:enhanced-geometry"_ostr, "extrusion-metal"_ostr, "true");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc, "//draw:enhanced-geometry"_ostr, "extrusion-metal"_ostr, u"true"_ustr);
assertXPath(
pXmlDoc,
"//draw:enhanced-geometry[@loext:extrusion-metal-type='loext:MetalMSCompatible']"_ostr);
// reload
- mxComponent = loadFromDesktop(maTempFile.GetURL(), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(maTempFile.GetURL(), u"com.sun.star.text.TextDocument"_ustr);
// verify properties
uno::Reference<drawing::XShape> xShapeReload(getShape(0));
lcl_assertMetalProperties("from ODF 1.3 extended", xShapeReload);
@@ -557,11 +557,11 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionMetalTypeStrict)
// added to ODF.
const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(GetODFDefaultVersion());
SetODFDefaultVersion(SvtSaveOptions::ODFVER_013);
- save("writer8");
+ save(u"writer8"_ustr);
// assert XML.
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
- assertXPath(pXmlDoc, "//draw:enhanced-geometry"_ostr, "extrusion-metal"_ostr, "true");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc, "//draw:enhanced-geometry"_ostr, "extrusion-metal"_ostr, u"true"_ustr);
assertXPath(pXmlDoc, "//draw:enhanced-geometry[@loext:extrusion-metal-type]"_ostr, 0);
SetODFDefaultVersion(nCurrentODFVersion);
@@ -573,14 +573,14 @@ void lcl_assertSpecularityProperty(std::string_view sInfo, uno::Reference<drawin
{
uno::Reference<beans::XPropertySet> xShapeProps(rxShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGeoPropSeq;
- xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeoPropSeq;
+ xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aGeoPropSeq;
comphelper::SequenceAsHashMap aGeoPropMap(aGeoPropSeq);
uno::Sequence<beans::PropertyValue> aExtrusionSeq;
- aGeoPropMap.getValue("Extrusion") >>= aExtrusionSeq;
+ aGeoPropMap.getValue(u"Extrusion"_ustr) >>= aExtrusionSeq;
comphelper::SequenceAsHashMap aExtrusionPropMap(aExtrusionSeq);
double fSpecularity(-1.0);
- aExtrusionPropMap.getValue("Specularity") >>= fSpecularity;
+ aExtrusionPropMap.getValue(u"Specularity"_ustr) >>= fSpecularity;
OString sMsg = OString::Concat(sInfo) + "Specularity";
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMsg.getStr(), 122.0703125, fSpecularity);
}
@@ -595,16 +595,16 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionSpecularityExtended)
// Test, that attribute is written in draw namespace with value 100% and in loext namespace with
// value 122.0703125%.
- save("writer8");
+ save(u"writer8"_ustr);
// assert XML.
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(pXmlDoc, "//draw:enhanced-geometry[@draw:extrusion-specularity='100%']"_ostr);
assertXPath(pXmlDoc,
"//draw:enhanced-geometry[@loext:extrusion-specularity-loext='122.0703125%']"_ostr);
// reload and verify, that the loext value is used
- mxComponent = loadFromDesktop(maTempFile.GetURL(), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(maTempFile.GetURL(), u"com.sun.star.text.TextDocument"_ustr);
// verify properties
uno::Reference<drawing::XShape> xShapeReload(getShape(0));
lcl_assertSpecularityProperty("from ODF 1.3 extended", xShapeReload);
@@ -618,7 +618,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionSpecularity)
// Save to ODF 1.3 strict and make sure it does not produce a validation error.
const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(GetODFDefaultVersion());
SetODFDefaultVersion(SvtSaveOptions::ODFVER_013);
- save("writer8");
+ save(u"writer8"_ustr);
SetODFDefaultVersion(nCurrentODFVersion);
}
@@ -629,7 +629,7 @@ bool lcl_getShapeSegments(uno::Sequence<drawing::EnhancedCustomShapeSegment>& rS
const uno::Reference<drawing::XShape>& xShape)
{
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY_THROW);
- uno::Any anotherAny = xShapeProps->getPropertyValue("CustomShapeGeometry");
+ uno::Any anotherAny = xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr);
uno::Sequence<beans::PropertyValue> aCustomShapeGeometry;
if (!(anotherAny >>= aCustomShapeGeometry))
return false;
@@ -707,18 +707,18 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextRotationPlusPre)
uno::Reference<drawing::XShape> xShape(getShape(0));
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGeomSeq;
- xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeomSeq;
+ xShapeProps->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aGeomSeq;
auto aGeomVec(comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(aGeomSeq));
- aGeomVec.push_back(comphelper::makePropertyValue("TextRotateAngle", sal_Int32(45)));
+ aGeomVec.push_back(comphelper::makePropertyValue(u"TextRotateAngle"_ustr, sal_Int32(45)));
aGeomSeq = comphelper::containerToSequence(aGeomVec);
- xShapeProps->setPropertyValue("CustomShapeGeometry", uno::Any(aGeomSeq));
+ xShapeProps->setPropertyValue(u"CustomShapeGeometry"_ustr, uno::Any(aGeomSeq));
// Save to ODF. Without the fix, a file format error was produced, because attribute
// draw:text-rotate-angle was written twice, one from TextPreRotateAngle and the other from
// TextRotateAngle.
// This should already catch the format error, but does not, see tdf#149567
// But reload catches it.
- saveAndReload("writer8");
+ saveAndReload(u"writer8"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf156975_ThemeExport)
@@ -727,7 +727,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf156975_ThemeExport)
// Without fix for tdf#156975 it was not written at all.
// The test needs to be adapted, when themes are available in ODF.
- mxComponent = loadFromDesktop("private:factory/sdraw");
+ mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr);
// generate a theme to be sure we have got one and know the values
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XMasterPageTarget> xDrawPage(
@@ -752,13 +752,13 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf156975_ThemeExport)
pTheme->setColorSet(pColorSet);
uno::Reference<util::XTheme> xTheme = model::theme::createXTheme(pTheme);
- xMasterPageProps->setPropertyValue("Theme", uno::Any(xTheme));
+ xMasterPageProps->setPropertyValue(u"Theme"_ustr, uno::Any(xTheme));
// save as odg
- save("draw8");
+ save(u"draw8"_ustr);
// and check the markup.
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
static constexpr OString sThemePath
= "//office:master-styles/style:master-page/loext:theme"_ostr;
assertXPath(pXmlDoc, sThemePath, 1);
@@ -770,12 +770,12 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf156975_ThemeExport)
const OString sThemeColorPath = sThemeColorsPath + "/loext:color";
assertXPath(pXmlDoc, sThemeColorPath, 12);
- assertXPath(pXmlDoc, sThemeColorPath + "[3]", "name"_ostr, "dark2");
- assertXPath(pXmlDoc, sThemeColorPath + "[3]", "color"_ostr, "#002200");
- assertXPath(pXmlDoc, sThemeColorPath + "[9]", "name"_ostr, "accent5");
- assertXPath(pXmlDoc, sThemeColorPath + "[9]", "color"_ostr, "#880088");
- assertXPath(pXmlDoc, sThemeColorPath + "[12]", "name"_ostr, "followed-hyperlink");
- assertXPath(pXmlDoc, sThemeColorPath + "[12]", "color"_ostr, "#b0b0b0");
+ assertXPath(pXmlDoc, sThemeColorPath + "[3]", "name"_ostr, u"dark2"_ustr);
+ assertXPath(pXmlDoc, sThemeColorPath + "[3]", "color"_ostr, u"#002200"_ustr);
+ assertXPath(pXmlDoc, sThemeColorPath + "[9]", "name"_ostr, u"accent5"_ustr);
+ assertXPath(pXmlDoc, sThemeColorPath + "[9]", "color"_ostr, u"#880088"_ustr);
+ assertXPath(pXmlDoc, sThemeColorPath + "[12]", "name"_ostr, u"followed-hyperlink"_ustr);
+ assertXPath(pXmlDoc, sThemeColorPath + "[12]", "color"_ostr, u"#b0b0b0"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf157018_ThemeImportDraw)
@@ -791,7 +791,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf157018_ThemeImportDraw)
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;
CPPUNIT_ASSERT(xTheme.is());
// Then make sure it is the custom color theme
@@ -800,10 +800,10 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf157018_ThemeImportDraw)
auto pTheme = pUnoTheme->getTheme();
CPPUNIT_ASSERT(pTheme);
- CPPUNIT_ASSERT_EQUAL(OUString("Custom"), pTheme->GetName());
+ CPPUNIT_ASSERT_EQUAL(u"Custom"_ustr, pTheme->GetName());
auto pColorSet = pTheme->getColorSet();
CPPUNIT_ASSERT(pColorSet);
- CPPUNIT_ASSERT_EQUAL(OUString("My Colors"), pColorSet->getName());
+ CPPUNIT_ASSERT_EQUAL(u"My Colors"_ustr, pColorSet->getName());
// and test some colors
CPPUNIT_ASSERT_EQUAL(Color(0xFFFF11), pColorSet->getColor(model::ThemeColorType::Light1));
@@ -819,7 +819,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, test_scene3d_ooxml_light)
loadFromFile(u"Scene3d_LightRig_threePt.pptx");
// Without fix this would have failed with validation error.
- save("impress8");
+ save(u"impress8"_ustr);
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/xmloff/qa/unit/style.cxx b/xmloff/qa/unit/style.cxx
index 5da0c51d73ea..e3ee10a5c1d3 100644
--- a/xmloff/qa/unit/style.cxx
+++ b/xmloff/qa/unit/style.cxx
@@ -35,7 +35,7 @@ public:
};
XmloffStyleTest::XmloffStyleTest()
- : UnoApiXmlTest("/xmloff/qa/unit/data/")
+ : UnoApiXmlTest(u"/xmloff/qa/unit/data/"_ustr)
{
}
@@ -56,11 +56,11 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFillImageBase64)
loadFromFile(u"fill-image-base64.fodg");
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XNameContainer> xBitmaps(
- xFactory->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.drawing.BitmapTable"_ustr), uno::UNO_QUERY);
// Without the accompanying fix in place, this test would have failed, as the base64 stream was
// not considered when parsing the fill-image style.
- CPPUNIT_ASSERT(xBitmaps->hasByName("libreoffice_0"));
+ CPPUNIT_ASSERT(xBitmaps->hasByName(u"libreoffice_0"_ustr));
}
namespace
@@ -91,13 +91,13 @@ Color asColor(com::sun::star::rendering::RGBColor const& rRGBColor)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFontSorting)
{
// Given an empty document with default fonts (Liberation Sans, Lucida Sans, etc):
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
// When saving that document to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure <style:font-face> elements are sorted (by style:name="..."):
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
xmlXPathObjectPtr pXPath = getXPathNode(
pXmlDoc, "/office:document-content/office:font-face-decls/style:font-face"_ostr);
xmlNodeSetPtr pXmlNodes = pXPath->nodesetval;
@@ -158,12 +158,12 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testRtlGutter)
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies
= xStyleFamiliesSupplier->getStyleFamilies();
- uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("PageStyles"),
- uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xStandard(xStyleFamily->getByName("Standard"),
+ uno::Reference<container::XNameAccess> xStyleFamily(
+ xStyleFamilies->getByName(u"PageStyles"_ustr), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStandard(xStyleFamily->getByName(u"Standard"_ustr),
uno::UNO_QUERY);
bool bRtlGutter{};
- xStandard->getPropertyValue("RtlGutter") >>= bRtlGutter;
+ xStandard->getPropertyValue(u"RtlGutter"_ustr) >>= bRtlGutter;
// Without the accompanying fix in place, this test would have failed as
// <style:page-layout-properties>'s style:writing-mode="..." did not affect RtlGutter.
CPPUNIT_ASSERT(bRtlGutter);
@@ -190,17 +190,17 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testWritingModeBTLR)
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Save::ODF::DefaultVersion::set(3, pBatch);
pBatch->commit();
- save("writer8");
+ save(u"writer8"_ustr);
// With applied fix for tdf150407 still loext:writing-mode="bt-lr" has to be written.
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
assertXPath(pXmlDoc,
"/office:document-styles/office:styles/style:style[@style:name='FrameBTLR']/"
"style:graphic-properties[@loext:writing-mode]"_ostr);
assertXPath(pXmlDoc,
"/office:document-styles/office:styles/style:style[@style:name='FrameBTLR']/"
"style:graphic-properties"_ostr,
- "writing-mode"_ostr, "bt-lr");
+ "writing-mode"_ostr, u"bt-lr"_ustr);
}
loadFromFile(u"tdf150407_WritingModeBTLR_style.odt");
@@ -210,11 +210,11 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testWritingModeBTLR)
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Save::ODF::DefaultVersion::set(10, pBatch);
pBatch->commit();
- save("writer8");
+ save(u"writer8"_ustr);
// Without the fix an faulty 'writing-mode="bt-lr"' attribute was written in productive build.
// A debug build fails assertion in SvXMLNamespaceMap::GetQNameByKey().
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
assertXPathNoAttribute(pXmlDoc,
"/office:document-styles/office:styles/"
"style:style[@style:name='FrameBTLR']/style:graphic-properties"_ostr,
@@ -243,11 +243,11 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelBottomMargin)
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Save::ODF::DefaultVersion::set(3, pBatch);
pBatch->commit();
- save("writer8");
+ save(u"writer8"_ustr);
// With applied fix for tdf150407 still loext:vertical-rel="page-content-bottom" has to be
// written.
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[@style:name='gr1']/"
@@ -256,7 +256,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelBottomMargin)
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[@style:name='gr1']/"
"style:graphic-properties"_ostr,
- "vertical-rel"_ostr, "page-content-bottom");
+ "vertical-rel"_ostr, u"page-content-bottom"_ustr);
}
loadFromFile(u"tdf150407_PosRelBottomMargin.docx");
@@ -266,11 +266,11 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelBottomMargin)
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Save::ODF::DefaultVersion::set(10, pBatch);
pBatch->commit();
- save("writer8");
+ save(u"writer8"_ustr);
// Without the fix an faulty 'vertical-rel="page-content-bottom"' attribute was written in
// productive build. A debug build fails assertion in SvXMLNamespaceMap::GetQNameByKey().
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPathNoAttribute(pXmlDoc,
"/office:document-content/office:automatic-styles/"
"style:style[@style:name='gr1']/style:graphic-properties"_ostr,
@@ -299,11 +299,11 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelTopMargin)
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Save::ODF::DefaultVersion::set(3, pBatch);
pBatch->commit();
- save("writer8");
+ save(u"writer8"_ustr);
// With applied fix for tdf150407 still loext:vertical-rel="page-content-top has to be
// written.
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[@style:name='gr1']/"
@@ -312,7 +312,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelTopMargin)
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[@style:name='gr1']/"
"style:graphic-properties"_ostr,
- "vertical-rel"_ostr, "page-content-top");
+ "vertical-rel"_ostr, u"page-content-top"_ustr);
}
loadFromFile(u"tdf150407_PosRelTopMargin.docx");
@@ -322,11 +322,11 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelTopMargin)
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Save::ODF::DefaultVersion::set(10, pBatch);
pBatch->commit();
- save("writer8");
+ save(u"writer8"_ustr);
// Without the fix an faulty 'vertical-rel="page-content-top"' attribute was written in
// productive build. A debug build fails assertion in SvXMLNamespaceMap::GetQNameByKey().
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPathNoAttribute(pXmlDoc,
"/office:document-content/office:automatic-styles/"
"style:style[@style:name='gr1']/style:graphic-properties"_ostr,
@@ -341,24 +341,24 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMCGR_OldToNew)
loadFromFile(u"MCGR_OldToNew.odg");
// saveAndReload includes validation and must not fail with the new elements and attributes.
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
// Examine file markup
// For compatibility the file should still have the old attributes 'start-color' and 'end-color'
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
OString sPath
= "/office:document-styles/office:styles/draw:gradient[@draw:name='red2yellow']"_ostr;
- assertXPath(pXmlDoc, sPath, "start-color"_ostr, "#ff0000");
- assertXPath(pXmlDoc, sPath, "end-color"_ostr, "#ffff00");
+ assertXPath(pXmlDoc, sPath, "start-color"_ostr, u"#ff0000"_ustr);
+ assertXPath(pXmlDoc, sPath, "end-color"_ostr, u"#ffff00"_ustr);
// And it must have the new 'gradient-stop' elements.
// The prefix 'loext' needs to be adapted, when the element is available in ODF strict.
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "offset"_ostr, "0");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-type"_ostr, "rgb");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-value"_ostr, "#ff0000");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "offset"_ostr, "1");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-type"_ostr, "rgb");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-value"_ostr, "#ffff00");
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "offset"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-type"_ostr, u"rgb"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-value"_ostr, u"#ff0000"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "offset"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-type"_ostr, u"rgb"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-value"_ostr, u"#ffff00"_ustr);
// Examine reloaded file
uno::Reference<drawing::XShape> xShape(getShape(0));
@@ -367,10 +367,10 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMCGR_OldToNew)
// The old properties need to be still available, as they might be used in macros.
OUString sGradientName;
- xShapeProperties->getPropertyValue("FillGradientName") >>= sGradientName;
+ xShapeProperties->getPropertyValue(u"FillGradientName"_ustr) >>= sGradientName;
CPPUNIT_ASSERT_EQUAL(u"red2yellow"_ustr, sGradientName);
awt::Gradient2 aGradient;
- xShapeProperties->getPropertyValue("FillGradient") >>= aGradient;
+ xShapeProperties->getPropertyValue(u"FillGradient"_ustr) >>= aGradient;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, Color(ColorTransparency, aGradient.StartColor));
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, Color(ColorTransparency, aGradient.EndColor));
@@ -395,29 +395,29 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMCGR_OldToNew_opacity)
loadFromFile(u"MCGR_OldToNew_opacity.odg");
// saveAndReload includes validation and must not fail with the new elements and attributes.
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
// Examine file markup
// For compatibility the file should still have the old attributes.
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
OString sPath = "/office:document-styles/office:styles/draw:opacity"_ostr;
- assertXPath(pXmlDoc, sPath, "start"_ostr, "10%"); // UI 90% transparency
- assertXPath(pXmlDoc, sPath, "end"_ostr, "100%"); // UI 0% transparency
- assertXPath(pXmlDoc, sPath, "border"_ostr, "20%");
- assertXPath(pXmlDoc, sPath, "cx"_ostr, "50%");
- assertXPath(pXmlDoc, sPath, "cy"_ostr, "50%");
- assertXPath(pXmlDoc, sPath, "style"_ostr, "radial");
+ assertXPath(pXmlDoc, sPath, "start"_ostr, u"10%"_ustr); // UI 90% transparency
+ assertXPath(pXmlDoc, sPath, "end"_ostr, u"100%"_ustr); // UI 0% transparency
+ assertXPath(pXmlDoc, sPath, "border"_ostr, u"20%"_ustr);
+ assertXPath(pXmlDoc, sPath, "cx"_ostr, u"50%"_ustr);
+ assertXPath(pXmlDoc, sPath, "cy"_ostr, u"50%"_ustr);
+ assertXPath(pXmlDoc, sPath, "style"_ostr, u"radial"_ustr);
// And it must have the new 'opacity-stop' elements.
// The prefix 'loext' needs to be adapted, when the element is available in ODF strict.
OString sFirstStop = sPath + "/loext:opacity-stop[1]";
- assertXPath(pXmlDoc, sFirstStop, "offset"_ostr, "0");
+ assertXPath(pXmlDoc, sFirstStop, "offset"_ostr, u"0"_ustr);
// Because of converting through color, the grade of opacity is not exact "0.1"
double fOpacity = getXPathContent(pXmlDoc, sFirstStop + "/@svg:stop-opacity").toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.1, fOpacity, 0.002);
- assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[2]", "offset"_ostr, "1");
- assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[2]", "stop-opacity"_ostr, "1");
+ assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[2]", "offset"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[2]", "stop-opacity"_ostr, u"1"_ustr);
// Examine reloaded file
uno::Reference<drawing::XShape> xShape(getShape(0));
@@ -426,7 +426,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMCGR_OldToNew_opacity)
// The old properties need to be still available, as they might be used in macros.
awt::Gradient2 aGradient;
- xShapeProperties->getPropertyValue("FillTransparenceGradient") >>= aGradient;
+ xShapeProperties->getPropertyValue(u"FillTransparenceGradient"_ustr) >>= aGradient;
CPPUNIT_ASSERT_EQUAL(Color(0xE5E5E5), Color(ColorTransparency, aGradient.StartColor));
CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aGradient.EndColor));
CPPUNIT_ASSERT_EQUAL(sal_Int16(20), aGradient.Border);
@@ -455,32 +455,32 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMCGR_threeStops)
loadFromFile(u"MCGR_threeStops.fodt");
// saveAndReload includes validation and must not fail with the new elements and attributes.
- saveAndReload("draw8");
+ saveAndReload(u"draw8"_ustr);
// Examine file markup
// For compatibility the file should still have the old attributes 'start-color' and 'end-color'
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
OString sPath
= "/office:document-styles/office:styles/draw:gradient[@draw:name='threeStops']"_ostr;
- assertXPath(pXmlDoc, sPath, "start-color"_ostr, "#ff0000");
- assertXPath(pXmlDoc, sPath, "end-color"_ostr, "#ffff00");
- assertXPath(pXmlDoc, sPath, "style"_ostr, "square");
- assertXPath(pXmlDoc, sPath, "cx"_ostr, "0%");
- assertXPath(pXmlDoc, sPath, "cy"_ostr, "50%");
- assertXPath(pXmlDoc, sPath, "angle"_ostr, "45deg");
- assertXPath(pXmlDoc, sPath, "border"_ostr, "10%");
+ assertXPath(pXmlDoc, sPath, "start-color"_ostr, u"#ff0000"_ustr);
+ assertXPath(pXmlDoc, sPath, "end-color"_ostr, u"#ffff00"_ustr);
+ assertXPath(pXmlDoc, sPath, "style"_ostr, u"square"_ustr);
+ assertXPath(pXmlDoc, sPath, "cx"_ostr, u"0%"_ustr);
+ assertXPath(pXmlDoc, sPath, "cy"_ostr, u"50%"_ustr);
+ assertXPath(pXmlDoc, sPath, "angle"_ostr, u"45deg"_ustr);
+ assertXPath(pXmlDoc, sPath, "border"_ostr, u"10%"_ustr);
// And it must have the new 'gradient-stop' elements.
// The prefix 'loext' needs to be adapted, when the element is available in ODF strict.
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "offset"_ostr, "0");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-type"_ostr, "rgb");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-value"_ostr, "#ff0000");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "offset"_ostr, "0.3");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-type"_ostr, "rgb");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-value"_ostr, "#0099bb");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[3]", "offset"_ostr, "1");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[3]", "color-type"_ostr, "rgb");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[3]", "color-value"_ostr, "#ffff00");
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "offset"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-type"_ostr, u"rgb"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-value"_ostr, u"#ff0000"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "offset"_ostr, u"0.3"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-type"_ostr, u"rgb"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-value"_ostr, u"#0099bb"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[3]", "offset"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[3]", "color-type"_ostr, u"rgb"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[3]", "color-value"_ostr, u"#ffff00"_ustr);
// Examine reloaded file
uno::Reference<drawing::XShape> xShape(getShape(0));
@@ -489,10 +489,10 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMCGR_threeStops)
// The old properties need to be still available, as they might be used in macros.
OUString sGradientName;
- xShapeProperties->getPropertyValue("FillGradientName") >>= sGradientName;
+ xShapeProperties->getPropertyValue(u"FillGradientName"_ustr) >>= sGradientName;
CPPUNIT_ASSERT_EQUAL(u"threeStops"_ustr, sGradientName);
awt::Gradient2 aGradient;
- xShapeProperties->getPropertyValue("FillGradient") >>= aGradient;
+ xShapeProperties->getPropertyValue(u"FillGradient"_ustr) >>= aGradient;
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, Color(ColorTransparency, aGradient.StartColor));
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, Color(ColorTransparency, aGradient.EndColor));
CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_SQUARE, aGradient.Style);
@@ -535,24 +535,24 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBorderRestoration)
// Save to ODF_LATEST which is currently ODF 1.3 extended. Make sure gradient-stop elements have
// offsets 0 and 1, and border is written as 50%.
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_LATEST);
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
OString sPath
= "/office:document-styles/office:styles/draw:gradient[@draw:name='Gradient_20_1']"_ostr;
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-value"_ostr, "#ff0000");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "offset"_ostr, "1");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-value"_ostr, "#ffff00");
- assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "offset"_ostr, "0");
- assertXPath(pXmlDoc, sPath, "border"_ostr, "50%");
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "color-value"_ostr, u"#ff0000"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[2]", "offset"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "color-value"_ostr, u"#ffff00"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:gradient-stop[1]", "offset"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sPath, "border"_ostr, u"50%"_ustr);
// Save to ODF 1.3 strict and make sure border, start-color and end-color are suitable set.
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
- save("impress8");
- pXmlDoc = parseExport("styles.xml");
+ save(u"impress8"_ustr);
+ pXmlDoc = parseExport(u"styles.xml"_ustr);
assertXPath(pXmlDoc, sPath + "/loext:gradient-stop", 0);
- assertXPath(pXmlDoc, sPath, "start-color"_ostr, "#ffff00");
- assertXPath(pXmlDoc, sPath, "end-color"_ostr, "#ff0000");
- assertXPath(pXmlDoc, sPath, "border"_ostr, "50%");
+ assertXPath(pXmlDoc, sPath, "start-color"_ostr, u"#ffff00"_ustr);
+ assertXPath(pXmlDoc, sPath, "end-color"_ostr, u"#ff0000"_ustr);
+ assertXPath(pXmlDoc, sPath, "border"_ostr, u"50%"_ustr);
// Set back to original ODF default version.
SetODFDefaultVersion(nCurrentODFVersion);
@@ -573,23 +573,23 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testTransparencyBorderRestoration)
// Save to ODF_LATEST which is currently ODF 1.3 extended. Make sure transparency gradient-stop
//elements are written with offset 0 and 1, and border is written as 40%.
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_LATEST);
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
OString sPath = "/office:document-styles/office:styles/draw:opacity[1]"_ostr;
- assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[2]", "stop-opacity"_ostr, "0.9");
- assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[2]", "offset"_ostr, "1");
- assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[1]", "stop-opacity"_ostr, "0");
- assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[1]", "offset"_ostr, "0");
- assertXPath(pXmlDoc, sPath, "border"_ostr, "40%");
+ assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[2]", "stop-opacity"_ostr, u"0.9"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[2]", "offset"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[1]", "stop-opacity"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sPath + "/loext:opacity-stop[1]", "offset"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sPath, "border"_ostr, u"40%"_ustr);
// Save to ODF 1.3 strict and make sure border, start and end opacity are suitable set.
SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
- save("impress8");
- pXmlDoc = parseExport("styles.xml");
+ save(u"impress8"_ustr);
+ pXmlDoc = parseExport(u"styles.xml"_ustr);
assertXPath(pXmlDoc, sPath + "/loext:opacity-stop", 0);
- assertXPath(pXmlDoc, sPath, "start"_ostr, "0%");
- assertXPath(pXmlDoc, sPath, "end"_ostr, "90%");
- assertXPath(pXmlDoc, sPath, "border"_ostr, "40%");
+ assertXPath(pXmlDoc, sPath, "start"_ostr, u"0%"_ustr);
+ assertXPath(pXmlDoc, sPath, "end"_ostr, u"90%"_ustr);
+ assertXPath(pXmlDoc, sPath, "border"_ostr, u"40%"_ustr);
// Set back to original ODF default version.
SetODFDefaultVersion(nCurrentODFVersion);
@@ -609,8 +609,8 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAxialGradientCompatible)
//Round-trip through OOXML.
// FixMe tdf#153183. Here "Attribute 'ID' is not allowed to appear in element 'v:rect'".
skipValidation();
- saveAndReload("Office Open XML Text");
- saveAndReload("writer8");
+ saveAndReload(u"Office Open XML Text"_ustr);
+ saveAndReload(u"writer8"_ustr);
// Examine reloaded file
uno::Reference<drawing::XShape> xShape(getShape(0));
@@ -619,7 +619,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAxialGradientCompatible)
// Without fix these would have failed with Style=0 (=LINEAR), StartColor=0xFFFF00 and Border=0.
awt::Gradient2 aGradient;
- xShapeProperties->getPropertyValue("FillGradient") >>= aGradient;
+ xShapeProperties->getPropertyValue(u"FillGradient"_ustr) >>= aGradient;
CPPUNIT_ASSERT_EQUAL_MESSAGE("gradient style", awt::GradientStyle_AXIAL, aGradient.Style);
CPPUNIT_ASSERT_EQUAL_MESSAGE("EndColor", sal_Int32(0xFFFF00), aGradient.EndColor);
CPPUNIT_ASSERT_EQUAL_MESSAGE("StartColor", sal_Int32(0x1E90FF), aGradient.StartColor);
@@ -641,8 +641,8 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAxialTransparencyCompatible)
//Round-trip through OOXML.
// FixMe tdf#153183, and error in charSpace and in CharacterSet
//skipValidation();
- saveAndReload("Office Open XML Text");
- saveAndReload("writer8");
+ saveAndReload(u"Office Open XML Text"_ustr);
+ saveAndReload(u"writer8"_ustr);
// Examine reloaded file
uno::Reference<drawing::XShape> xShape(getShape(0));
@@ -651,7 +651,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAxialTransparencyCompatible)
// Without fix these would have failed with Style=LINEAR, StartColor=0xCCCCCC and wrong Border.
awt::Gradient2 aTransGradient;
- xShapeProperties->getPropertyValue("FillTransparenceGradient") >>= aTransGradient;
+ xShapeProperties->getPropertyValue(u"FillTransparenceGradient"_ustr) >>= aTransGradient;
CPPUNIT_ASSERT_EQUAL_MESSAGE("gradient style", awt::GradientStyle_AXIAL, aTransGradient.Style);
CPPUNIT_ASSERT_EQUAL_MESSAGE("EndColor", sal_Int32(0xCCCCCC), aTransGradient.EndColor);
CPPUNIT_ASSERT_EQUAL_MESSAGE("StartColor", sal_Int32(0x191919), aTransGradient.StartColor);
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
index e6433b2b70f9..1679af04bc1f 100644
--- a/xmloff/qa/unit/text.cxx
+++ b/xmloff/qa/unit/text.cxx
@@ -39,7 +39,7 @@ public:
};
XmloffStyleTest::XmloffStyleTest()
- : UnoApiXmlTest("/xmloff/qa/unit/data/")
+ : UnoApiXmlTest(u"/xmloff/qa/unit/data/"_ustr)
{
}
@@ -52,11 +52,11 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMailMergeInEditeng)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCommentProperty)
{
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Sequence<beans::PropertyValue> aCommentProps = comphelper::InitPropertySequence({
- { "Text", uno::Any(OUString("comment")) },
+ { "Text", uno::Any(u"comment"_ustr) },
});
- dispatchCommand(mxComponent, ".uno:InsertAnnotation", aCommentProps);
+ dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, aCommentProps);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(),
uno::UNO_QUERY);
@@ -64,25 +64,25 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCommentProperty)
uno::Reference<container::XEnumerationAccess> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xPortionEnum = xPara->createEnumeration();
uno::Reference<beans::XPropertySet> xPortion(xPortionEnum->nextElement(), uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xField(xPortion->getPropertyValue("TextField"),
+ uno::Reference<beans::XPropertySet> xField(xPortion->getPropertyValue(u"TextField"_ustr),
uno::UNO_QUERY);
- xField->setPropertyValue("Resolved", uno::Any(true));
- xField->setPropertyValue("ParentName", uno::Any(OUString("parent_comment_name")));
+ xField->setPropertyValue(u"Resolved"_ustr, uno::Any(true));
+ xField->setPropertyValue(u"ParentName"_ustr, uno::Any(u"parent_comment_name"_ustr));
- saveAndReload("writer8");
+ saveAndReload(u"writer8"_ustr);
xTextDocument.set(mxComponent, uno::UNO_QUERY);
xParaEnumAccess.set(xTextDocument->getText(), uno::UNO_QUERY);
xParaEnum = xParaEnumAccess->createEnumeration();
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
xPortionEnum = xPara->createEnumeration();
xPortion.set(xPortionEnum->nextElement(), uno::UNO_QUERY);
- xField.set(xPortion->getPropertyValue("TextField"), uno::UNO_QUERY);
+ xField.set(xPortion->getPropertyValue(u"TextField"_ustr), uno::UNO_QUERY);
bool bResolved = false;
- xField->getPropertyValue("Resolved") >>= bResolved;
+ xField->getPropertyValue(u"Resolved"_ustr) >>= bResolved;
OUString parentName;
- xField->getPropertyValue("ParentName") >>= parentName;
+ xField->getPropertyValue(u"ParentName"_ustr) >>= parentName;
CPPUNIT_ASSERT_EQUAL(
- OUString("parent_comment_name"),
+ u"parent_comment_name"_ustr,
parentName); // Check if the parent comment name is written and read correctly.
// Without the accompanying fix in place, this test would have failed, as the resolved state was
// not saved for non-range comments.
@@ -92,19 +92,19 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCommentProperty)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBibliographyLocalUrl)
{
// Given a document with a biblio field, with non-empty LocalURL:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xField(
- xFactory->createInstance("com.sun.star.text.TextField.Bibliography"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.text.TextField.Bibliography"_ustr), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aFields = {
- comphelper::makePropertyValue("BibiliographicType", text::BibliographyDataType::WWW),
- comphelper::makePropertyValue("Identifier", OUString("AT")),
- comphelper::makePropertyValue("Author", OUString("Author")),
- comphelper::makePropertyValue("Title", OUString("Title")),
- comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")),
- comphelper::makePropertyValue("LocalURL", OUString("file:///home/me/test.pdf")),
+ comphelper::makePropertyValue(u"BibiliographicType"_ustr, text::BibliographyDataType::WWW),
+ comphelper::makePropertyValue(u"Identifier"_ustr, u"AT"_ustr),
+ comphelper::makePropertyValue(u"Author"_ustr, u"Author"_ustr),
+ comphelper::makePropertyValue(u"Title"_ustr, u"Title"_ustr),
+ comphelper::makePropertyValue(u"URL"_ustr, u"http://www.example.com/test.pdf#page=1"_ustr),
+ comphelper::makePropertyValue(u"LocalURL"_ustr, u"file:///home/me/test.pdf"_ustr),
};
- xField->setPropertyValue("Fields", uno::Any(aFields));
+ xField->setPropertyValue(u"Fields"_ustr, uno::Any(aFields));
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
@@ -112,7 +112,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBibliographyLocalUrl)
xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
// When invoking ODT export + import on it:
- saveAndReload("writer8");
+ saveAndReload(u"writer8"_ustr);
// Without the accompanying fix in place, this test would have resulted in an assertion failure,
// as LocalURL was mapped to XML_TOKEN_INVALID.
@@ -124,27 +124,28 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBibliographyLocalUrl)
uno::Reference<container::XEnumerationAccess> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xPortionEnum = xPara->createEnumeration();
uno::Reference<beans::XPropertySet> xPortion(xPortionEnum->nextElement(), uno::UNO_QUERY);
- xField.set(xPortion->getPropertyValue("TextField"), uno::UNO_QUERY);
- comphelper::SequenceAsHashMap aMap(xField->getPropertyValue("Fields"));
- CPPUNIT_ASSERT(aMap.contains("LocalURL"));
- auto aActual = aMap["LocalURL"].get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("file:///home/me/test.pdf"), aActual);
+ xField.set(xPortion->getPropertyValue(u"TextField"_ustr), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aMap(xField->getPropertyValue(u"Fields"_ustr));
+ CPPUNIT_ASSERT(aMap.contains(u"LocalURL"_ustr));
+ auto aActual = aMap[u"LocalURL"_ustr].get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"file:///home/me/test.pdf"_ustr, aActual);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBibliographyTargetURL1)
{
// Given a document with a biblio field, with non-empty LocalURL:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xField(
- xFactory->createInstance("com.sun.star.text.TextField.Bibliography"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.text.TextField.Bibliography"_ustr), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aFields = {
- comphelper::makePropertyValue("Identifier", OUString("AT")),
- comphelper::makePropertyValue("URL", OUString("https://display.url/test1.pdf#page=1")),
- comphelper::makePropertyValue("TargetType", OUString("1")),
- comphelper::makePropertyValue("TargetURL", OUString("https://target.url/test2.pdf#page=2")),
+ comphelper::makePropertyValue(u"Identifier"_ustr, u"AT"_ustr),
+ comphelper::makePropertyValue(u"URL"_ustr, u"https://display.url/test1.pdf#page=1"_ustr),
+ comphelper::makePropertyValue(u"TargetType"_ustr, u"1"_ustr),
+ comphelper::makePropertyValue(u"TargetURL"_ustr,
+ u"https://target.url/test2.pdf#page=2"_ustr),
};
- xField->setPropertyValue("Fields", uno::Any(aFields));
+ xField->setPropertyValue(u"Fields"_ustr, uno::Any(aFields));
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
@@ -152,7 +153,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBibliographyTargetURL1)
xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
// When invoking ODT export + import on it:
- saveAndReload("writer8");
+ saveAndReload(u"writer8"_ustr);
// Then make sure that URL, TargetURL and UseTargetURL are preserved and independent:
xTextDocument.set(mxComponent, uno::UNO_QUERY);
@@ -162,19 +163,19 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBibliographyTargetURL1)
uno::Reference<container::XEnumerationAccess> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xPortionEnum = xPara->createEnumeration();
uno::Reference<beans::XPropertySet> xPortion(xPortionEnum->nextElement(), uno::UNO_QUERY);
- xField.set(xPortion->getPropertyValue("TextField"), uno::UNO_QUERY);
- comphelper::SequenceAsHashMap aMap(xField->getPropertyValue("Fields"));
+ xField.set(xPortion->getPropertyValue(u"TextField"_ustr), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aMap(xField->getPropertyValue(u"Fields"_ustr));
- CPPUNIT_ASSERT(aMap.contains("URL"));
- CPPUNIT_ASSERT_EQUAL(OUString("https://display.url/test1.pdf#page=1"),
- aMap["URL"].get<OUString>());
+ CPPUNIT_ASSERT(aMap.contains(u"URL"_ustr));
+ CPPUNIT_ASSERT_EQUAL(u"https://display.url/test1.pdf#page=1"_ustr,
+ aMap[u"URL"_ustr].get<OUString>());
- CPPUNIT_ASSERT(aMap.contains("TargetURL"));
- CPPUNIT_ASSERT_EQUAL(OUString("https://target.url/test2.pdf#page=2"),
- aMap["TargetURL"].get<OUString>());
+ CPPUNIT_ASSERT(aMap.contains(u"TargetURL"_ustr));
+ CPPUNIT_ASSERT_EQUAL(u"https://target.url/test2.pdf#page=2"_ustr,
+ aMap[u"TargetURL"_ustr].get<OUString>());
- CPPUNIT_ASSERT(aMap.contains("TargetType"));
- CPPUNIT_ASSERT_EQUAL(OUString("1"), aMap["TargetType"].get<OUString>());
+ CPPUNIT_ASSERT(aMap.contains(u"TargetType"_ustr));
+ CPPUNIT_ASSERT_EQUAL(u"1"_ustr, aMap[u"TargetType"_ustr].get<OUString>());
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCommentTableBorder)
@@ -195,23 +196,24 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testParaStyleListLevel)
uno::Reference<container::XNameAccess> xStyleFamilies
= xStyleFamiliesSupplier->getStyleFamilies();
uno::Reference<container::XNameAccess> xStyleFamily(
- xStyleFamilies->getByName("ParagraphStyles"), uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xStyle(xStyleFamily->getByName("mystyle"), uno::UNO_QUERY);
+ xStyleFamilies->getByName(u"ParagraphStyles"_ustr), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(xStyleFamily->getByName(u"mystyle"_ustr),
+ uno::UNO_QUERY);
sal_Int16 nNumberingLevel{};
- CPPUNIT_ASSERT(xStyle->getPropertyValue("NumberingLevel") >>= nNumberingLevel);
+ CPPUNIT_ASSERT(xStyle->getPropertyValue(u"NumberingLevel"_ustr) >>= nNumberingLevel);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(1), nNumberingLevel);
// Test the export as well:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure we save the style's numbering level:
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
// Without the accompanying fix in place, this failed with:
// - XPath '/office:document-styles/office:styles/style:style[@style:name='mystyle']' no attribute 'list-level' exist
// i.e. a custom NumberingLevel was lost on save.
assertXPath(pXmlDoc,
"/office:document-styles/office:styles/style:style[@style:name='mystyle']"_ostr,
- "list-level"_ostr, "2");
+ "list-level"_ostr, u"2"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContinueNumberingWord)
@@ -228,12 +230,12 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContinueNumberingWord)
xParaEnum->nextElement();
xParaEnum->nextElement();
uno::Reference<beans::XPropertySet> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
- auto aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
+ auto aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
// Without the accompanying fix in place, this failed with:
// - Expected: 2.
// - Actual : 1.
// i.e. the numbering was not continued, like in Word.
- CPPUNIT_ASSERT_EQUAL(OUString("2."), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"2."_ustr, aActual);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListId)
@@ -242,10 +244,10 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListId)
loadFromFile(u"list-id.fodt");
// When storing that document as ODF:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure that unreferenced xml:id="..." attributes are not written:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this failed with:
// - XPath '//text:list' unexpected 'id' attribute
// i.e. xml:id="..." was written unconditionally, even when no other list needed it.
@@ -262,55 +264,55 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListId2)
auto xParaEnum(xParaEnumAccess->createEnumeration());
auto xPara(xParaEnum->nextElement().queryThrow<beans::XPropertySet>());
- auto aActual(xPara->getPropertyValue("ListLabelString").get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("1."), aActual);
+ auto aActual(xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"1."_ustr, aActual);
xParaEnum->nextElement(); // Skip empty intermediate paragraph
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("2."), aActual);
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"2."_ustr, aActual);
xParaEnum->nextElement(); // Skip empty intermediate paragraph
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("3."), aActual);
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"3."_ustr, aActual);
xParaEnum->nextElement(); // Skip empty intermediate paragraph
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("4."), aActual);
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"4."_ustr, aActual);
// When storing that document as ODF:
// Without the fix in place, automatic validation would fail with:
// Error: "list123456789012345" is referenced by an IDREF, but not defined.
- saveAndReload("writer8");
+ saveAndReload(u"writer8"_ustr);
xTextDocument.set(mxComponent.queryThrow<css::text::XTextDocument>());
xParaEnumAccess.set(xTextDocument->getText().queryThrow<css::container::XEnumerationAccess>());
xParaEnum.set(xParaEnumAccess->createEnumeration());
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("1."), aActual);
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"1."_ustr, aActual);
xParaEnum->nextElement(); // Skip empty intermediate paragraph
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("2."), aActual);
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"2."_ustr, aActual);
xParaEnum->nextElement(); // Skip empty intermediate paragraph
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("3."), aActual);
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"3."_ustr, aActual);
xParaEnum->nextElement(); // Skip empty intermediate paragraph
// Check that the last item number is correct
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
// Without the fix in place, this would fail with:
// - Expected: 4.
// - Actual : 1.
// i.e. the numbering was not continued.
- CPPUNIT_ASSERT_EQUAL(OUString("4."), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"4."_ustr, aActual);
// Then make sure that required xml:id="..." attributes is written when the style changes:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
// Without the fix in place, this would fail,
// i.e. xml:id="..." was omitted, even though it was needed for the next item.
@@ -325,7 +327,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListIdState)
{
// tdf#149668: given a document with 3 paragraphs: an outer numbering on para 1 & 3, an inner
// numbering on para 2:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
auto xTextDocument(mxComponent.queryThrow<text::XTextDocument>());
auto xText(xTextDocument->getText());
xText->insertControlCharacter(xText->getEnd(), css::text::ControlCharacter::PARAGRAPH_BREAK,
@@ -336,15 +338,15 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListIdState)
auto paraEnumAccess(xText.queryThrow<container::XEnumerationAccess>());
auto paraEnum(paraEnumAccess->createEnumeration());
auto xParaProps(paraEnum->nextElement().queryThrow<beans::XPropertySet>());
- xParaProps->setPropertyValue("NumberingStyleName", css::uno::Any(OUString("Numbering ABC")));
+ xParaProps->setPropertyValue(u"NumberingStyleName"_ustr, css::uno::Any(u"Numbering ABC"_ustr));
xParaProps.set(paraEnum->nextElement().queryThrow<beans::XPropertySet>());
- xParaProps->setPropertyValue("NumberingStyleName", css::uno::Any(OUString("Numbering 123")));
+ xParaProps->setPropertyValue(u"NumberingStyleName"_ustr, css::uno::Any(u"Numbering 123"_ustr));
xParaProps.set(paraEnum->nextElement().queryThrow<beans::XPropertySet>());
- xParaProps->setPropertyValue("NumberingStyleName", css::uno::Any(OUString("Numbering ABC")));
+ xParaProps->setPropertyValue(u"NumberingStyleName"_ustr, css::uno::Any(u"Numbering ABC"_ustr));
// When storing that document as ODF:
- save("writer8");
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ save(u"writer8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Make sure that xml:id="..." gets written for para 1, as it'll be continued in para 3.
// Without the accompanying fix in place, this test would have failed,
@@ -368,79 +370,79 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListIdOnRestart)
auto xParaEnum(xParaEnumAccess->createEnumeration());
auto xPara(xParaEnum->nextElement().queryThrow<beans::XPropertySet>());
- auto aActual(xPara->getPropertyValue("ListLabelString").get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("1."), aActual);
- OUString list_id = xPara->getPropertyValue("ListId").get<OUString>();
+ auto aActual(xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"1."_ustr, aActual);
+ OUString list_id = xPara->getPropertyValue(u"ListId"_ustr).get<OUString>();
xParaEnum->nextElement(); // Skip empty intermediate paragraph
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY_THROW);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("2."), aActual);
- CPPUNIT_ASSERT_EQUAL(list_id, xPara->getPropertyValue("ListId").get<OUString>());
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"2."_ustr, aActual);
+ CPPUNIT_ASSERT_EQUAL(list_id, xPara->getPropertyValue(u"ListId"_ustr).get<OUString>());
xParaEnum->nextElement(); // Skip empty intermediate paragraph
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
// Check that restart was applied correctly, with simple 'text:continue-numbering="true"'
- CPPUNIT_ASSERT_EQUAL(OUString("1."), aActual);
- CPPUNIT_ASSERT_EQUAL(list_id, xPara->getPropertyValue("ListId").get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"1."_ustr, aActual);
+ CPPUNIT_ASSERT_EQUAL(list_id, xPara->getPropertyValue(u"ListId"_ustr).get<OUString>());
// When storing that document as ODF:
- saveAndReload("writer8");
+ saveAndReload(u"writer8"_ustr);
xTextDocument.set(mxComponent, uno::UNO_QUERY_THROW);
xParaEnumAccess.set(xTextDocument->getText(), uno::UNO_QUERY_THROW);
xParaEnum.set(xParaEnumAccess->createEnumeration());
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY_THROW);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("1."), aActual);
- list_id = xPara->getPropertyValue("ListId").get<OUString>();
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"1."_ustr, aActual);
+ list_id = xPara->getPropertyValue(u"ListId"_ustr).get<OUString>();
xParaEnum->nextElement(); // Skip empty intermediate paragraph
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY_THROW);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("2."), aActual);
- CPPUNIT_ASSERT_EQUAL(list_id, xPara->getPropertyValue("ListId").get<OUString>());
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"2."_ustr, aActual);
+ CPPUNIT_ASSERT_EQUAL(list_id, xPara->getPropertyValue(u"ListId"_ustr).get<OUString>());
xParaEnum->nextElement(); // Skip empty intermediate paragraph
xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY_THROW);
- aActual = xPara->getPropertyValue("ListLabelString").get<OUString>();
- CPPUNIT_ASSERT_EQUAL(OUString("1."), aActual);
- CPPUNIT_ASSERT_EQUAL(list_id, xPara->getPropertyValue("ListId").get<OUString>());
+ aActual = xPara->getPropertyValue(u"ListLabelString"_ustr).get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(u"1."_ustr, aActual);
+ CPPUNIT_ASSERT_EQUAL(list_id, xPara->getPropertyValue(u"ListId"_ustr).get<OUString>());
// Then make sure that no xml:id="..." attribute is written, even in restarted case:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "//text:list"_ostr, 3);
assertXPathNoAttribute(pXmlDoc, "//text:list[1]"_ostr, "id"_ostr);
assertXPathNoAttribute(pXmlDoc, "//text:list[2]"_ostr, "id"_ostr);
assertXPathNoAttribute(pXmlDoc, "//text:list[3]"_ostr, "id"_ostr);
assertXPathNoAttribute(pXmlDoc, "//text:list[3]"_ostr, "continue-list"_ostr);
- assertXPath(pXmlDoc, "//text:list[3]"_ostr, "continue-numbering"_ostr, "true");
+ assertXPath(pXmlDoc, "//text:list[3]"_ostr, "continue-numbering"_ostr, u"true"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testClearingBreakExport)
{
// Given a document with a clearing break:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextContent> xLineBreak(
- xMSF->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.LineBreak"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
// SwLineBreakClear::ALL;
sal_Int16 eClear = 3;
- xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+ xLineBreakProps->setPropertyValue(u"Clear"_ustr, uno::Any(eClear));
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure the expected markup is used:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this failed with:
// - XPath '//text:line-break' number of nodes is incorrect
// i.e. the clearing break was lost on export.
- assertXPath(pXmlDoc, "//text:line-break"_ostr, "clear"_ostr, "all");
+ assertXPath(pXmlDoc, "//text:line-break"_ostr, "clear"_ostr, u"all"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testClearingBreakImport)
@@ -466,108 +468,109 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testClearingBreakImport)
// linebreak, text).
uno::Reference<beans::XPropertySet> xPortion(xPortions->nextElement(), uno::UNO_QUERY);
OUString aTextPortionType;
- xPortion->getPropertyValue("TextPortionType") >>= aTextPortionType;
- CPPUNIT_ASSERT_EQUAL(OUString("LineBreak"), aTextPortionType);
+ xPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aTextPortionType;
+ CPPUNIT_ASSERT_EQUAL(u"LineBreak"_ustr, aTextPortionType);
uno::Reference<text::XTextContent> xLineBreak;
- xPortion->getPropertyValue("LineBreak") >>= xLineBreak;
+ xPortion->getPropertyValue(u"LineBreak"_ustr) >>= xLineBreak;
uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
sal_Int16 eClear{};
- xLineBreakProps->getPropertyValue("Clear") >>= eClear;
+ xLineBreakProps->getPropertyValue(u"Clear"_ustr) >>= eClear;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(3), eClear);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testRelativeWidth)
{
// Given a document with an 50% wide text frame:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies
= xStyleFamiliesSupplier->getStyleFamilies();
- uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("PageStyles"),
- uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xStyle(xStyleFamily->getByName("Standard"), uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xStyleFamily(
+ xStyleFamilies->getByName(u"PageStyles"_ustr), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(xStyleFamily->getByName(u"Standard"_ustr),
+ uno::UNO_QUERY);
// Body frame width is 6cm (2+2cm margin).
- xStyle->setPropertyValue("Width", uno::Any(static_cast<sal_Int32>(10000)));
+ xStyle->setPropertyValue(u"Width"_ustr, uno::Any(static_cast<sal_Int32>(10000)));
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextContent> xTextFrame(
- xMSF->createInstance("com.sun.star.text.TextFrame"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.TextFrame"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextFrameProps(xTextFrame, uno::UNO_QUERY);
- xTextFrameProps->setPropertyValue("RelativeWidth", uno::Any(static_cast<sal_Int16>(50)));
+ xTextFrameProps->setPropertyValue(u"RelativeWidth"_ustr, uno::Any(static_cast<sal_Int16>(50)));
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
xText->insertTextContent(xCursor, xTextFrame, /*bAbsorb=*/false);
// Body frame width is 16cm.
- xStyle->setPropertyValue("Width", uno::Any(static_cast<sal_Int32>(20000)));
+ xStyle->setPropertyValue(u"Width"_ustr, uno::Any(static_cast<sal_Int32>(20000)));
- save("writer8");
+ save(u"writer8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this failed with:
// - Expected: 3.1492in (8cm)
// - Actual : 0.0161in (0.04 cm)
// i.e. the fallback width value wasn't the expected half of the body frame width, but a smaller
// value.
- assertXPath(pXmlDoc, "//draw:frame"_ostr, "width"_ostr, "3.1492in");
+ assertXPath(pXmlDoc, "//draw:frame"_ostr, "width"_ostr, u"3.1492in"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testScaleWidthAndHeight)
{
// Given a broken document where both IsSyncHeightToWidth and IsSyncWidthToHeight are set to
// true:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextContent> xTextFrame(
- xMSF->createInstance("com.sun.star.text.TextFrame"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.TextFrame"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextFrameProps(xTextFrame, uno::UNO_QUERY);
- xTextFrameProps->setPropertyValue("Width", uno::Any(static_cast<sal_Int16>(2000)));
- xTextFrameProps->setPropertyValue("Height", uno::Any(static_cast<sal_Int16>(1000)));
- xTextFrameProps->setPropertyValue("IsSyncHeightToWidth", uno::Any(true));
- xTextFrameProps->setPropertyValue("IsSyncWidthToHeight", uno::Any(true));
+ xTextFrameProps->setPropertyValue(u"Width"_ustr, uno::Any(static_cast<sal_Int16>(2000)));
+ xTextFrameProps->setPropertyValue(u"Height"_ustr, uno::Any(static_cast<sal_Int16>(1000)));
+ xTextFrameProps->setPropertyValue(u"IsSyncHeightToWidth"_ustr, uno::Any(true));
+ xTextFrameProps->setPropertyValue(u"IsSyncWidthToHeight"_ustr, uno::Any(true));
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
xText->insertTextContent(xCursor, xTextFrame, /*bAbsorb=*/false);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure that we still export a non-zero size:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this failed with:
// - Expected: 0.7874in
// - Actual : 0in
// i.e. the exported size was 0, not 2000 mm100 in inches.
- assertXPath(pXmlDoc, "//draw:frame"_ostr, "width"_ostr, "0.7874in");
+ assertXPath(pXmlDoc, "//draw:frame"_ostr, "width"_ostr, u"0.7874in"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContentControlExport)
{
// Given a document with a content control around one or more text portions:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
- xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xText->insertString(xCursor, u"test"_ustr, /*bAbsorb=*/false);
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<text::XTextContent> xContentControl(
- xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.ContentControl"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
- xContentControlProps->setPropertyValue("ShowingPlaceHolder", uno::Any(true));
+ xContentControlProps->setPropertyValue(u"ShowingPlaceHolder"_ustr, uno::Any(true));
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure the expected markup is used:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this failed with:
// - XPath '//loext:content-control' number of nodes is incorrect
// i.e. the content control was lost on export.
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "showing-place-holder"_ostr, "true");
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "showing-place-holder"_ostr, u"true"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContentControlImport)
@@ -585,26 +588,26 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContentControlImport)
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
OUString aPortionType;
- xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ xTextPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aPortionType;
// Without the accompanying fix in place, this failed with:
// - Expected: ContentControl
// - Actual : Text
// i.e. the content control was lost on import.
- CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
uno::Reference<text::XTextContent> xContentControl;
- xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
uno::Reference<text::XTextRange> xContentControlRange(xContentControl, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xContentControlRange->getText();
uno::Reference<container::XEnumerationAccess> xContentEnumAccess(xText, uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xContentEnum = xContentEnumAccess->createEnumeration();
uno::Reference<text::XTextRange> xContent(xContentEnum->nextElement(), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("test"), xContent->getString());
+ CPPUNIT_ASSERT_EQUAL(u"test"_ustr, xContent->getString());
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCheckboxContentControlExport)
{
// Given a document with a checkbox content control around a text portion:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -613,21 +616,21 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCheckboxContentControlExport)
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<text::XTextContent> xContentControl(
- xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.ContentControl"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
- xContentControlProps->setPropertyValue("Checkbox", uno::Any(true));
- xContentControlProps->setPropertyValue("Checked", uno::Any(true));
- xContentControlProps->setPropertyValue("CheckedState", uno::Any(u"☒"_ustr));
- xContentControlProps->setPropertyValue("UncheckedState", uno::Any(u"☐"_ustr));
+ xContentControlProps->setPropertyValue(u"Checkbox"_ustr, uno::Any(true));
+ xContentControlProps->setPropertyValue(u"Checked"_ustr, uno::Any(true));
+ xContentControlProps->setPropertyValue(u"CheckedState"_ustr, uno::Any(u"☒"_ustr));
+ xContentControlProps->setPropertyValue(u"UncheckedState"_ustr, uno::Any(u"☐"_ustr));
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure the expected markup is used:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "checkbox"_ostr, "true");
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "checked"_ostr, "true");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "checkbox"_ostr, u"true"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "checked"_ostr, u"true"_ustr);
assertXPath(pXmlDoc, "//loext:content-control"_ostr, "checked-state"_ostr, u"☒"_ustr);
assertXPath(pXmlDoc, "//loext:content-control"_ostr, "unchecked-state"_ostr, u"☐"_ustr);
}
@@ -647,24 +650,24 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCheckboxContentControlImport)
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
OUString aPortionType;
- xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
- CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ xTextPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
uno::Reference<text::XTextContent> xContentControl;
- xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
bool bCheckbox{};
- xContentControlProps->getPropertyValue("Checkbox") >>= bCheckbox;
+ xContentControlProps->getPropertyValue(u"Checkbox"_ustr) >>= bCheckbox;
// Without the accompanying fix in place, this failed, as the checkbox-related attributes were
// ignored on import.
CPPUNIT_ASSERT(bCheckbox);
bool bChecked{};
- xContentControlProps->getPropertyValue("Checked") >>= bChecked;
+ xContentControlProps->getPropertyValue(u"Checked"_ustr) >>= bChecked;
CPPUNIT_ASSERT(bChecked);
OUString aCheckedState;
- xContentControlProps->getPropertyValue("CheckedState") >>= aCheckedState;
+ xContentControlProps->getPropertyValue(u"CheckedState"_ustr) >>= aCheckedState;
CPPUNIT_ASSERT_EQUAL(u"☒"_ustr, aCheckedState);
OUString aUncheckedState;
- xContentControlProps->getPropertyValue("UncheckedState") >>= aUncheckedState;
+ xContentControlProps->getPropertyValue(u"UncheckedState"_ustr) >>= aUncheckedState;
CPPUNIT_ASSERT_EQUAL(u"☐"_ustr, aUncheckedState);
uno::Reference<text::XTextRange> xContentControlRange(xContentControl, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xContentControlRange->getText();
@@ -677,57 +680,60 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCheckboxContentControlImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlExport)
{
// Given a document with a dropdown content control around a text portion:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
- xText->insertString(xCursor, "choose an item", /*bAbsorb=*/false);
+ xText->insertString(xCursor, u"choose an item"_ustr, /*bAbsorb=*/false);
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<text::XTextContent> xContentControl(
- xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.ContentControl"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
{
- xContentControlProps->setPropertyValue("DropDown", uno::Any(true));
+ xContentControlProps->setPropertyValue(u"DropDown"_ustr, uno::Any(true));
uno::Sequence<beans::PropertyValues> aListItems = {
{
- comphelper::makePropertyValue("DisplayText", uno::Any(OUString("red"))),
- comphelper::makePropertyValue("Value", uno::Any(OUString("R"))),
+ comphelper::makePropertyValue(u"DisplayText"_ustr, uno::Any(u"red"_ustr)),
+ comphelper::makePropertyValue(u"Value"_ustr, uno::Any(u"R"_ustr)),
},
{
- comphelper::makePropertyValue("DisplayText", uno::Any(OUString("green"))),
- comphelper::makePropertyValue("Value", uno::Any(OUString("G"))),
+ comphelper::makePropertyValue(u"DisplayText"_ustr, uno::Any(u"green"_ustr)),
+ comphelper::makePropertyValue(u"Value"_ustr, uno::Any(u"G"_ustr)),
},
{
- comphelper::makePropertyValue("DisplayText", uno::Any(OUString("blue"))),
- comphelper::makePropertyValue("Value", uno::Any(OUString("B"))),
+ comphelper::makePropertyValue(u"DisplayText"_ustr, uno::Any(u"blue"_ustr)),
+ comphelper::makePropertyValue(u"Value"_ustr, uno::Any(u"B"_ustr)),
},
};
- xContentControlProps->setPropertyValue("ListItems", uno::Any(aListItems));
+ xContentControlProps->setPropertyValue(u"ListItems"_ustr, uno::Any(aListItems));
}
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure the expected markup is used:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "dropdown"_ostr, "true");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "dropdown"_ostr, u"true"_ustr);
// Without the accompanying fix in place, this failed with:
// - Expected: 1
// - Actual : 0
// - XPath '//loext:content-control/loext:list-item[1]' number of nodes is incorrect
// i.e. the list items were lost on export.
assertXPath(pXmlDoc, "//loext:content-control/loext:list-item[1]"_ostr, "display-text"_ostr,
- "red");
- assertXPath(pXmlDoc, "//loext:content-control/loext:list-item[1]"_ostr, "value"_ostr, "R");
+ u"red"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control/loext:list-item[1]"_ostr, "value"_ostr,
+ u"R"_ustr);
assertXPath(pXmlDoc, "//loext:content-control/loext:list-item[2]"_ostr, "display-text"_ostr,
- "green");
- assertXPath(pXmlDoc, "//loext:content-control/loext:list-item[2]"_ostr, "value"_ostr, "G");
+ u"green"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control/loext:list-item[2]"_ostr, "value"_ostr,
+ u"G"_ustr);
assertXPath(pXmlDoc, "//loext:content-control/loext:list-item[3]"_ostr, "display-text"_ostr,
- "blue");
- assertXPath(pXmlDoc, "//loext:content-control/loext:list-item[3]"_ostr, "value"_ostr, "B");
+ u"blue"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control/loext:list-item[3]"_ostr, "value"_ostr,
+ u"B"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlImport)
@@ -745,65 +751,65 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlImport)
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
OUString aPortionType;
- xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
- CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ xTextPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
uno::Reference<text::XTextContent> xContentControl;
- xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValues> aListItems;
- xContentControlProps->getPropertyValue("ListItems") >>= aListItems;
+ xContentControlProps->getPropertyValue(u"ListItems"_ustr) >>= aListItems;
// Without the accompanying fix in place, this failed with:
// - Expected: 3
// - Actual : 0
// i.e. the list items were lost on import.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), aListItems.getLength());
comphelper::SequenceAsHashMap aMap0(aListItems[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("red"), aMap0["DisplayText"].get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("R"), aMap0["Value"].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"red"_ustr, aMap0[u"DisplayText"_ustr].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"R"_ustr, aMap0[u"Value"_ustr].get<OUString>());
comphelper::SequenceAsHashMap aMap1(aListItems[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("green"), aMap1["DisplayText"].get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("G"), aMap1["Value"].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"green"_ustr, aMap1[u"DisplayText"_ustr].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"G"_ustr, aMap1[u"Value"_ustr].get<OUString>());
comphelper::SequenceAsHashMap aMap2(aListItems[2]);
- CPPUNIT_ASSERT_EQUAL(OUString("blue"), aMap2["DisplayText"].get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("B"), aMap2["Value"].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"blue"_ustr, aMap2[u"DisplayText"_ustr].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"B"_ustr, aMap2[u"Value"_ustr].get<OUString>());
uno::Reference<text::XTextRange> xContentControlRange(xContentControl, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xContentControlRange->getText();
uno::Reference<container::XEnumerationAccess> xContentEnumAccess(xText, uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xContentEnum = xContentEnumAccess->createEnumeration();
uno::Reference<text::XTextRange> xContent(xContentEnum->nextElement(), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("choose a color"), xContent->getString());
+ CPPUNIT_ASSERT_EQUAL(u"choose a color"_ustr, xContent->getString());
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPictureContentControlExport)
{
// Given a document with a picture content control around an as-char image:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
uno::Reference<beans::XPropertySet> xTextGraphic(
- xMSF->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
- xTextGraphic->setPropertyValue("AnchorType",
+ xMSF->createInstance(u"com.sun.star.text.TextGraphicObject"_ustr), uno::UNO_QUERY);
+ xTextGraphic->setPropertyValue(u"AnchorType"_ustr,
uno::Any(text::TextContentAnchorType_AS_CHARACTER));
uno::Reference<text::XTextContent> xTextContent(xTextGraphic, uno::UNO_QUERY);
xText->insertTextContent(xCursor, xTextContent, false);
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<text::XTextContent> xContentControl(
- xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.ContentControl"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
- xContentControlProps->setPropertyValue("Picture", uno::Any(true));
+ xContentControlProps->setPropertyValue(u"Picture"_ustr, uno::Any(true));
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure the expected markup is used:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'picture' exist
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "picture"_ostr, "true");
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "picture"_ostr, u"true"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPictureContentControlImport)
@@ -821,13 +827,13 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPictureContentControlImport)
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
OUString aPortionType;
- xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
- CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ xTextPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
uno::Reference<text::XTextContent> xContentControl;
- xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
bool bPicture{};
- xContentControlProps->getPropertyValue("Picture") >>= bPicture;
+ xContentControlProps->getPropertyValue(u"Picture"_ustr) >>= bPicture;
// Without the accompanying fix in place, this failed, as the picture attribute was ignored on
// import.
CPPUNIT_ASSERT(bPicture);
@@ -836,36 +842,37 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPictureContentControlImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDateContentControlExport)
{
// Given a document with a date content control around a text portion:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
- xText->insertString(xCursor, "choose a date", /*bAbsorb=*/false);
+ xText->insertString(xCursor, u"choose a date"_ustr, /*bAbsorb=*/false);
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<text::XTextContent> xContentControl(
- xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.ContentControl"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
- xContentControlProps->setPropertyValue("Date", uno::Any(true));
- xContentControlProps->setPropertyValue("DateFormat", uno::Any(OUString("YYYY-MM-DD")));
- xContentControlProps->setPropertyValue("DateLanguage", uno::Any(OUString("en-US")));
- xContentControlProps->setPropertyValue("CurrentDate",
- uno::Any(OUString("2022-05-25T00:00:00Z")));
+ xContentControlProps->setPropertyValue(u"Date"_ustr, uno::Any(true));
+ xContentControlProps->setPropertyValue(u"DateFormat"_ustr, uno::Any(u"YYYY-MM-DD"_ustr));
+ xContentControlProps->setPropertyValue(u"DateLanguage"_ustr, uno::Any(u"en-US"_ustr));
+ xContentControlProps->setPropertyValue(u"CurrentDate"_ustr,
+ uno::Any(u"2022-05-25T00:00:00Z"_ustr));
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure the expected markup is used:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'date' exist
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "date"_ostr, "true");
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "date-format"_ostr, "YYYY-MM-DD");
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "date-rfc-language-tag"_ostr, "en-US");
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "date"_ostr, u"true"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "date-format"_ostr, u"YYYY-MM-DD"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "date-rfc-language-tag"_ostr,
+ u"en-US"_ustr);
assertXPath(pXmlDoc, "//loext:content-control"_ostr, "current-date"_ostr,
- "2022-05-25T00:00:00Z");
+ u"2022-05-25T00:00:00Z"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDateContentControlImport)
@@ -883,53 +890,53 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDateContentControlImport)
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
OUString aPortionType;
- xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
- CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ xTextPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
uno::Reference<text::XTextContent> xContentControl;
- xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
bool bDate{};
- xContentControlProps->getPropertyValue("Date") >>= bDate;
+ xContentControlProps->getPropertyValue(u"Date"_ustr) >>= bDate;
// Without the accompanying fix in place, this test would have failed, the content control was
// imported as a default rich text one.
CPPUNIT_ASSERT(bDate);
OUString aDateFormat;
- xContentControlProps->getPropertyValue("DateFormat") >>= aDateFormat;
- CPPUNIT_ASSERT_EQUAL(OUString("YYYY-MM-DD"), aDateFormat);
+ xContentControlProps->getPropertyValue(u"DateFormat"_ustr) >>= aDateFormat;
+ CPPUNIT_ASSERT_EQUAL(u"YYYY-MM-DD"_ustr, aDateFormat);
OUString aDateLanguage;
- xContentControlProps->getPropertyValue("DateLanguage") >>= aDateLanguage;
- CPPUNIT_ASSERT_EQUAL(OUString("en-US"), aDateLanguage);
+ xContentControlProps->getPropertyValue(u"DateLanguage"_ustr) >>= aDateLanguage;
+ CPPUNIT_ASSERT_EQUAL(u"en-US"_ustr, aDateLanguage);
OUString aCurrentDate;
- xContentControlProps->getPropertyValue("CurrentDate") >>= aCurrentDate;
- CPPUNIT_ASSERT_EQUAL(OUString("2022-05-25T00:00:00Z"), aCurrentDate);
+ xContentControlProps->getPropertyValue(u"CurrentDate"_ustr) >>= aCurrentDate;
+ CPPUNIT_ASSERT_EQUAL(u"2022-05-25T00:00:00Z"_ustr, aCurrentDate);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPlainTextContentControlExport)
{
// Given a document with a plain text content control around a text portion:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
- xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xText->insertString(xCursor, u"test"_ustr, /*bAbsorb=*/false);
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<text::XTextContent> xContentControl(
- xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.ContentControl"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
- xContentControlProps->setPropertyValue("PlainText", uno::Any(true));
+ xContentControlProps->setPropertyValue(u"PlainText"_ustr, uno::Any(true));
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure the expected markup is used:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'plain-text' exist
// i.e. the plain text content control was turned into a rich text one on export.
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "plain-text"_ostr, "true");
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "plain-text"_ostr, u"true"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPlainTextContentControlImport)
@@ -947,13 +954,13 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPlainTextContentControlImport)
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
OUString aPortionType;
- xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
- CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ xTextPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
uno::Reference<text::XTextContent> xContentControl;
- xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
bool bPlainText{};
- xContentControlProps->getPropertyValue("PlainText") >>= bPlainText;
+ xContentControlProps->getPropertyValue(u"PlainText"_ustr) >>= bPlainText;
// Without the accompanying fix in place, this test would have failed, the import result was a
// rich text content control (not a plain text one).
CPPUNIT_ASSERT(bPlainText);
@@ -962,66 +969,67 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPlainTextContentControlImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testComboBoxContentControlExport)
{
// Given a document with a combo box content control around a text portion:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
- xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xText->insertString(xCursor, u"test"_ustr, /*bAbsorb=*/false);
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<text::XTextContent> xContentControl(
- xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.ContentControl"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
- xContentControlProps->setPropertyValue("ComboBox", uno::Any(true));
+ xContentControlProps->setPropertyValue(u"ComboBox"_ustr, uno::Any(true));
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure the expected markup is used:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'combobox' exist
// i.e. the combo box content control was turned into a drop-down one on export.
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "combobox"_ostr, "true");
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "combobox"_ostr, u"true"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlExport)
{
// Given a document with a content control and its alias around a text portion:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
- xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xText->insertString(xCursor, u"test"_ustr, /*bAbsorb=*/false);
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<text::XTextContent> xContentControl(
- xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xMSF->createInstance(u"com.sun.star.text.ContentControl"_ustr), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
- xContentControlProps->setPropertyValue("Alias", uno::Any(OUString("my alias")));
- xContentControlProps->setPropertyValue("Tag", uno::Any(OUString("my tag")));
- xContentControlProps->setPropertyValue("Id", uno::Any(static_cast<sal_Int32>(-2147483648)));
- xContentControlProps->setPropertyValue("TabIndex", uno::Any(sal_uInt32(3)));
- xContentControlProps->setPropertyValue("Lock", uno::Any(OUString("unlocked")));
+ xContentControlProps->setPropertyValue(u"Alias"_ustr, uno::Any(u"my alias"_ustr));
+ xContentControlProps->setPropertyValue(u"Tag"_ustr, uno::Any(u"my tag"_ustr));
+ xContentControlProps->setPropertyValue(u"Id"_ustr,
+ uno::Any(static_cast<sal_Int32>(-2147483648)));
+ xContentControlProps->setPropertyValue(u"TabIndex"_ustr, uno::Any(sal_uInt32(3)));
+ xContentControlProps->setPropertyValue(u"Lock"_ustr, uno::Any(u"unlocked"_ustr));
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
// When exporting to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure the expected markup is used:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - Expression: prop
// - XPath '//loext:content-control' no attribute 'alias' exist
// i.e. alias was lost on export.
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "alias"_ostr, "my alias");
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "tag"_ostr, "my tag");
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "id"_ostr, "-2147483648");
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "tab-index"_ostr, "3");
- assertXPath(pXmlDoc, "//loext:content-control"_ostr, "lock"_ostr, "unlocked");
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "alias"_ostr, u"my alias"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "tag"_ostr, u"my tag"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "id"_ostr, u"-2147483648"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "tab-index"_ostr, u"3"_ustr);
+ assertXPath(pXmlDoc, "//loext:content-control"_ostr, "lock"_ostr, u"unlocked"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testComboBoxContentControlImport)
@@ -1039,13 +1047,13 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testComboBoxContentControlImport)
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
OUString aPortionType;
- xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
- CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ xTextPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
uno::Reference<text::XTextContent> xContentControl;
- xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
bool bComboBox{};
- xContentControlProps->getPropertyValue("ComboBox") >>= bComboBox;
+ xContentControlProps->getPropertyValue(u"ComboBox"_ustr) >>= bComboBox;
// Without the accompanying fix in place, this test would have failed, the import result was a
// drop-down content control (not a combo box one).
CPPUNIT_ASSERT(bComboBox);
@@ -1066,30 +1074,30 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlImport)
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
OUString aPortionType;
- xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
- CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ xTextPortion->getPropertyValue(u"TextPortionType"_ustr) >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(u"ContentControl"_ustr, aPortionType);
uno::Reference<text::XTextContent> xContentControl;
- xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ xTextPortion->getPropertyValue(u"ContentControl"_ustr) >>= xContentControl;
uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
OUString aAlias;
- xContentControlProps->getPropertyValue("Alias") >>= aAlias;
+ xContentControlProps->getPropertyValue(u"Alias"_ustr) >>= aAlias;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: my alias
// - Actual :
// i.e. the alias was lost on import.
- CPPUNIT_ASSERT_EQUAL(OUString("my alias"), aAlias);
+ CPPUNIT_ASSERT_EQUAL(u"my alias"_ustr, aAlias);
OUString aTag;
- xContentControlProps->getPropertyValue("Tag") >>= aTag;
- CPPUNIT_ASSERT_EQUAL(OUString("my tag"), aTag);
+ xContentControlProps->getPropertyValue(u"Tag"_ustr) >>= aTag;
+ CPPUNIT_ASSERT_EQUAL(u"my tag"_ustr, aTag);
sal_Int32 nId = 0;
- xContentControlProps->getPropertyValue("Id") >>= nId;
+ xContentControlProps->getPropertyValue(u"Id"_ustr) >>= nId;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2147483647), nId);
sal_uInt32 nTabIndex;
- xContentControlProps->getPropertyValue("TabIndex") >>= nTabIndex;
+ xContentControlProps->getPropertyValue(u"TabIndex"_ustr) >>= nTabIndex;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(4), nTabIndex);
OUString aLock;
- xContentControlProps->getPropertyValue("Lock") >>= aLock;
- CPPUNIT_ASSERT_EQUAL(OUString("sdtContentLocked"), aLock);
+ xContentControlProps->getPropertyValue(u"Lock"_ustr) >>= aLock;
+ CPPUNIT_ASSERT_EQUAL(u"sdtContentLocked"_ustr, aLock);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlAutostyleExport)
@@ -1101,7 +1109,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlAutostyleExport)
// When saving that document to ODT, then make sure no assertion failure happens:
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aStoreProps = comphelper::InitPropertySequence({
- { "FilterName", uno::Any(OUString("writer8")) },
+ { "FilterName", uno::Any(u"writer8"_ustr) },
});
// Without the accompanying fix in place, this test would have failed, we had duplicated XML
// attributes.
@@ -1112,26 +1120,26 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testScaleWidthRedline)
{
// Given a document with change tracking enabled, one image is part of a delete redline:
loadFromFile(u"scale-width-redline.fodt");
- dispatchCommand(mxComponent, ".uno:TrackChanges", {});
- dispatchCommand(mxComponent, ".uno:GoToEndOfLine", {});
- dispatchCommand(mxComponent, ".uno:EndOfParaSel", {});
- dispatchCommand(mxComponent, ".uno:Delete", {});
+ dispatchCommand(mxComponent, u".uno:TrackChanges"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:GoToEndOfLine"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:EndOfParaSel"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:Delete"_ustr, {});
// When saving to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure that a non-zero size is written to the output:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 6.1728in
// - Actual : 0in
// i.e. the deleted image had zero size, which is incorrect.
- assertXPath(pXmlDoc, "//draw:frame[@draw:name='Image45']"_ostr, "width"_ostr, "6.1728in");
+ assertXPath(pXmlDoc, "//draw:frame[@draw:name='Image45']"_ostr, "width"_ostr, u"6.1728in"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testThemeExport)
{
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -1154,55 +1162,55 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testThemeExport)
pTheme->setColorSet(pColorSet);
uno::Reference<util::XTheme> xTheme = model::theme::createXTheme(pTheme);
- xPageProps->setPropertyValue("Theme", uno::Any(xTheme));
+ xPageProps->setPropertyValue(u"Theme"_ustr, uno::Any(xTheme));
// Export to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Check if the 12 colors are written in the XML:
- xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
OString aThemePath = "//office:styles/loext:theme/loext:theme-colors/loext:color"_ostr;
assertXPath(pXmlDoc, aThemePath, 12);
- assertXPath(pXmlDoc, aThemePath + "[1]", "name"_ostr, "dark1");
- assertXPath(pXmlDoc, aThemePath + "[1]", "color"_ostr, "#101010");
- assertXPath(pXmlDoc, aThemePath + "[2]", "name"_ostr, "light1");
- assertXPath(pXmlDoc, aThemePath + "[2]", "color"_ostr, "#202020");
- assertXPath(pXmlDoc, aThemePath + "[12]", "name"_ostr, "followed-hyperlink");
- assertXPath(pXmlDoc, aThemePath + "[12]", "color"_ostr, "#c0c0c0");
+ assertXPath(pXmlDoc, aThemePath + "[1]", "name"_ostr, u"dark1"_ustr);
+ assertXPath(pXmlDoc, aThemePath + "[1]", "color"_ostr, u"#101010"_ustr);
+ assertXPath(pXmlDoc, aThemePath + "[2]", "name"_ostr, u"light1"_ustr);
+ assertXPath(pXmlDoc, aThemePath + "[2]", "color"_ostr, u"#202020"_ustr);
+ assertXPath(pXmlDoc, aThemePath + "[12]", "name"_ostr, u"followed-hyperlink"_ustr);
+ assertXPath(pXmlDoc, aThemePath + "[12]", "color"_ostr, u"#c0c0c0"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFloatingTableExport)
{
// Given a document with a floating table:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
// Insert a table:
uno::Sequence<beans::PropertyValue> aArgs = {
- comphelper::makePropertyValue("Rows", static_cast<sal_Int32>(1)),
- comphelper::makePropertyValue("Columns", static_cast<sal_Int32>(1)),
+ comphelper::makePropertyValue(u"Rows"_ustr, static_cast<sal_Int32>(1)),
+ comphelper::makePropertyValue(u"Columns"_ustr, static_cast<sal_Int32>(1)),
};
- dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+ dispatchCommand(mxComponent, u".uno:InsertTable"_ustr, aArgs);
// Select it:
- dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
// Wrap in a fly:
aArgs = {
- comphelper::makePropertyValue("AnchorType", static_cast<sal_uInt16>(0)),
+ comphelper::makePropertyValue(u"AnchorType"_ustr, static_cast<sal_uInt16>(0)),
};
- dispatchCommand(mxComponent, ".uno:InsertFrame", aArgs);
+ dispatchCommand(mxComponent, u".uno:InsertFrame"_ustr, aArgs);
// Mark it as a floating table:
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xFrame(
- xTextFramesSupplier->getTextFrames()->getByName("Frame1"), uno::UNO_QUERY);
- xFrame->setPropertyValue("IsSplitAllowed", uno::Any(true));
+ xTextFramesSupplier->getTextFrames()->getByName(u"Frame1"_ustr), uno::UNO_QUERY);
+ xFrame->setPropertyValue(u"IsSplitAllowed"_ustr, uno::Any(true));
// When saving to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure we write a floating table, not a textframe containing a table:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//draw:frame' no attribute 'may-break-between-pages' exist
// i.e. no floating table was exported.
- assertXPath(pXmlDoc, "//draw:frame"_ostr, "may-break-between-pages"_ostr, "true");
+ assertXPath(pXmlDoc, "//draw:frame"_ostr, "may-break-between-pages"_ostr, u"true"_ustr);
}
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFloatingTableImport)
@@ -1214,10 +1222,10 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFloatingTableImport)
// Then make sure that the matching text frame property is set:
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xFrame(
- xTextFramesSupplier->getTextFrames()->getByName("Frame1"), uno::UNO_QUERY);
+ xTextFramesSupplier->getTextFrames()->getByName(u"Frame1"_ustr), uno::UNO_QUERY);
bool bIsSplitAllowed = false;
// Without the accompanying fix in place, this test would have failed, the property was false.
- xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed;
+ xFrame->getPropertyValue(u"IsSplitAllowed"_ustr) >>= bIsSplitAllowed;
CPPUNIT_ASSERT(bIsSplitAllowed);
}
@@ -1247,16 +1255,17 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testParagraphScopedTabDistance)
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 10000
// - Actual : 0
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(10000),
- xPropSet->getPropertyValue("ParaTabStopDefaultDistance").get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(
+ static_cast<sal_Int32>(10000),
+ xPropSet->getPropertyValue(u"ParaTabStopDefaultDistance"_ustr).get<sal_Int32>());
// Save the imported file to test the export too
- save("impress8");
+ save(u"impress8"_ustr);
// Then make sure we write the tab-stop-distance
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
assertXPath(pXmlDoc, "//style:style[@style:name='P1']/style:paragraph-properties"_ostr,
- "tab-stop-distance"_ostr, "10cm");
+ "tab-stop-distance"_ostr, u"10cm"_ustr);
assertXPath(pXmlDoc, "//text:p[@text:style-name='P1']"_ostr);
}
@@ -1278,7 +1287,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testNestedSpans)
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
float fWeight{};
- xTextPortion->getPropertyValue("CharWeight") >>= fWeight;
+ xTextPortion->getPropertyValue(u"CharWeight"_ustr) >>= fWeight;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 150 (awt::FontWeight::BOLD)
// - Actual : 100 (awt::FontWeight::NORMAL)
diff --git a/xmloff/qa/unit/text/txtprmap.cxx b/xmloff/qa/unit/text/txtprmap.cxx
index 08c91c4c1a78..f2f737214dd0 100644
--- a/xmloff/qa/unit/text/txtprmap.cxx
+++ b/xmloff/qa/unit/text/txtprmap.cxx
@@ -27,44 +27,44 @@ public:
}
Test::Test()
- : UnoApiXmlTest("/xmloff/qa/unit/data/")
+ : UnoApiXmlTest(u"/xmloff/qa/unit/data/"_ustr)
{
}
CPPUNIT_TEST_FIXTURE(Test, testFloatingTableWrapTextAtFlyStartExport)
{
// Given a document with a floating table:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
// Insert a table:
uno::Sequence<beans::PropertyValue> aArgs = {
- comphelper::makePropertyValue("Rows", static_cast<sal_Int32>(1)),
- comphelper::makePropertyValue("Columns", static_cast<sal_Int32>(1)),
+ comphelper::makePropertyValue(u"Rows"_ustr, static_cast<sal_Int32>(1)),
+ comphelper::makePropertyValue(u"Columns"_ustr, static_cast<sal_Int32>(1)),
};
- dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+ dispatchCommand(mxComponent, u".uno:InsertTable"_ustr, aArgs);
// Select it:
- dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
// Wrap in a fly:
aArgs = {
- comphelper::makePropertyValue("AnchorType", static_cast<sal_uInt16>(0)),
+ comphelper::makePropertyValue(u"AnchorType"_ustr, static_cast<sal_uInt16>(0)),
};
- dispatchCommand(mxComponent, ".uno:InsertFrame", aArgs);
+ dispatchCommand(mxComponent, u".uno:InsertFrame"_ustr, aArgs);
// Mark it as a floating table that wraps on all pages:
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xFrame(
- xTextFramesSupplier->getTextFrames()->getByName("Frame1"), uno::UNO_QUERY);
- xFrame->setPropertyValue("IsSplitAllowed", uno::Any(true));
- xFrame->setPropertyValue("WrapTextAtFlyStart", uno::Any(true));
+ xTextFramesSupplier->getTextFrames()->getByName(u"Frame1"_ustr), uno::UNO_QUERY);
+ xFrame->setPropertyValue(u"IsSplitAllowed"_ustr, uno::Any(true));
+ xFrame->setPropertyValue(u"WrapTextAtFlyStart"_ustr, uno::Any(true));
// When saving to ODT:
- save("writer8");
+ save(u"writer8"_ustr);
// Then make sure we write a floating table, that wraps on all pages:
- xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//style:graphic-properties' no attribute 'wrap-text-at-frame-start' exist
// i.e. no floating table was exported.
assertXPath(pXmlDoc, "//style:graphic-properties"_ostr, "wrap-text-at-frame-start"_ostr,
- "true");
+ u"true"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, testFloatingTableWrapTextAtFlyStartImport)
@@ -77,10 +77,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTableWrapTextAtFlyStartImport)
// Then make sure that the matching text frame property is set:
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xFrame(
- xTextFramesSupplier->getTextFrames()->getByName("Frame1"), uno::UNO_QUERY);
+ xTextFramesSupplier->getTextFrames()->getByName(u"Frame1"_ustr), uno::UNO_QUERY);
bool bWrapTextAtFlyStart = false;
// Without the accompanying fix in place, this test would have failed, the property was false.
- xFrame->getPropertyValue("WrapTextAtFlyStart") >>= bWrapTextAtFlyStart;
+ xFrame->getPropertyValue(u"WrapTextAtFlyStart"_ustr) >>= bWrapTextAtFlyStart;
CPPUNIT_ASSERT(bWrapTextAtFlyStart);
}
diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx
index d87a3e86eeec..7fb1004bf612 100644
--- a/xmloff/qa/unit/uxmloff.cxx
+++ b/xmloff/qa/unit/uxmloff.cxx
@@ -56,7 +56,7 @@ void Test::setUp()
BootstrapFixture::setUp();
pExport = new SchXMLExport(
- comphelper::getProcessComponentContext(), "SchXMLExport.Compact",
+ comphelper::getProcessComponentContext(), u"SchXMLExport.Compact"_ustr,
SvXMLExportFlags::ALL);
}
@@ -78,26 +78,26 @@ void Test::testAutoStylePool()
xPool->AddFamily( XmlStyleFamily::TEXT_PARAGRAPH,
GetXMLToken( XML_PARAGRAPH ),
xExportPropMapper.get(),
- OUString( "Bob" ) );
+ u"Bob"_ustr );
- OUString aName = xPool->Add( XmlStyleFamily::TEXT_PARAGRAPH, "", {} );
+ OUString aName = xPool->Add( XmlStyleFamily::TEXT_PARAGRAPH, u""_ustr, {} );
// not that interesting but worth checking
bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
if (bHack)
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "style / naming changed", OUString("Bob"), aName );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "style / naming changed", u"Bob"_ustr, aName );
else
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "style / naming changed", OUString("Bob1"), aName );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "style / naming changed", u"Bob1"_ustr, aName );
// find ourselves again:
- OUString aSameName = xPool->Find( XmlStyleFamily::TEXT_PARAGRAPH, "", {} );
+ OUString aSameName = xPool->Find( XmlStyleFamily::TEXT_PARAGRAPH, u""_ustr, {} );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "same style not found", aName, aSameName );
}
void Test::testMetaGenerator()
{
comphelper::PropertyMapEntry const aInfoMap[] = {
- { OUString("BuildId"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
+ { u"BuildId"_ustr, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
};
uno::Reference<beans::XPropertySet> const xInfoSet(
comphelper::GenericPropertySet_CreateInstance(
@@ -206,7 +206,7 @@ void Test::testMetaGenerator()
{
// the DocumentInfo instance is cached so need fresh SvXMLImport
rtl::Reference<SvXMLImport> const pImport(new SvXMLImport(
- comphelper::getProcessComponentContext(), "testdummy",
+ comphelper::getProcessComponentContext(), u"testdummy"_ustr,
SvXMLImportFlags::ALL));
pImport->initialize(uno::Sequence<uno::Any>{ uno::Any(xInfoSet) });
@@ -216,11 +216,11 @@ void Test::testMetaGenerator()
{
CPPUNIT_ASSERT_EQUAL_MESSAGE(pGenerator,
OUString::createFromAscii(pBuildId),
- xInfoSet->getPropertyValue("BuildId").get<OUString>());
+ xInfoSet->getPropertyValue(u"BuildId"_ustr).get<OUString>());
}
else
{
- CPPUNIT_ASSERT_MESSAGE(pGenerator, !xInfoSet->getPropertyValue("BuildId").hasValue());
+ CPPUNIT_ASSERT_MESSAGE(pGenerator, !xInfoSet->getPropertyValue(u"BuildId"_ustr).hasValue());
}
CPPUNIT_ASSERT_EQUAL_MESSAGE(pGenerator, nResult, pImport->getGeneratorVersion());
}
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index c51818af7b5b..512e629ff106 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -1007,17 +1007,17 @@ bool XMLChartImportPropertyMapper::handleSpecialItem(
case XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE:
{
if (IsXMLToken( rValue, XML_LINEAR ))
- rProperty.maValue <<= OUString("com.sun.star.chart2.LinearRegressionCurve");
+ rProperty.maValue <<= u"com.sun.star.chart2.LinearRegressionCurve"_ustr;
else if (IsXMLToken( rValue, XML_LOGARITHMIC))
- rProperty.maValue <<= OUString("com.sun.star.chart2.LogarithmicRegressionCurve");
+ rProperty.maValue <<= u"com.sun.star.chart2.LogarithmicRegressionCurve"_ustr;
else if (IsXMLToken( rValue, XML_EXPONENTIAL))
- rProperty.maValue <<= OUString("com.sun.star.chart2.ExponentialRegressionCurve");
+ rProperty.maValue <<= u"com.sun.star.chart2.ExponentialRegressionCurve"_ustr;
else if (IsXMLToken( rValue, XML_POWER))
- rProperty.maValue <<= OUString("com.sun.star.chart2.PotentialRegressionCurve");
+ rProperty.maValue <<= u"com.sun.star.chart2.PotentialRegressionCurve"_ustr;
else if (IsXMLToken( rValue, XML_POLYNOMIAL))
- rProperty.maValue <<= OUString("com.sun.star.chart2.PolynomialRegressionCurve");
+ rProperty.maValue <<= u"com.sun.star.chart2.PolynomialRegressionCurve"_ustr;
else if (IsXMLToken( rValue, XML_MOVING_AVERAGE))
- rProperty.maValue <<= OUString("com.sun.star.chart2.MovingAverageRegressionCurve");
+ rProperty.maValue <<= u"com.sun.star.chart2.MovingAverageRegressionCurve"_ustr;
}
break;
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index b6097590868f..4e118e81c72c 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -221,7 +221,7 @@ void SchXMLAxisContext::CreateGrid( const OUString& sAutoStyleName, bool bIsMajo
if( xGridProp.is())
{
// the line color is black as default, in the model it is a light gray
- xGridProp->setPropertyValue("LineColor",
+ xGridProp->setPropertyValue(u"LineColor"_ustr,
uno::Any( COL_BLACK ));
if (!sAutoStyleName.isEmpty())
m_rImportHelper.FillAutoStyle(sAutoStyleName, xGridProp);
@@ -394,7 +394,7 @@ void SchXMLAxisContext::CreateAxis()
{
try
{
- xDiaProp->setPropertyValue("HasXAxis", uno::Any(true) );
+ xDiaProp->setPropertyValue(u"HasXAxis"_ustr, uno::Any(true) );
}
catch( beans::UnknownPropertyException & )
{
@@ -410,23 +410,23 @@ void SchXMLAxisContext::CreateAxis()
uno::Any aFalseBool( uno::Any( false ));
// #i109879# the line color is black as default, in the model it is a light gray
- m_xAxisProps->setPropertyValue("LineColor",
+ m_xAxisProps->setPropertyValue(u"LineColor"_ustr,
uno::Any( COL_BLACK ));
- m_xAxisProps->setPropertyValue("DisplayLabels", aFalseBool );
+ m_xAxisProps->setPropertyValue(u"DisplayLabels"_ustr, aFalseBool );
// Compatibility option: starting from LibreOffice 5.1 the rotated
// layout is preferred to staggering for axis labels.
// So the import default value for having compatibility with ODF
// documents created with earlier LibreOffice versions is `true`.
if( GetImport().getGeneratorVersion() != SvXMLImport::ProductVersionUnknown )
- m_xAxisProps->setPropertyValue("TryStaggeringFirst", aTrueBool );
+ m_xAxisProps->setPropertyValue(u"TryStaggeringFirst"_ustr, aTrueBool );
// #88077# AutoOrigin 'on' is default
- m_xAxisProps->setPropertyValue("AutoOrigin", aTrueBool );
+ m_xAxisProps->setPropertyValue(u"AutoOrigin"_ustr, aTrueBool );
if( m_bAxisTypeImported )
- m_xAxisProps->setPropertyValue("AxisType", uno::Any(m_nAxisType) );
+ m_xAxisProps->setPropertyValue(u"AxisType"_ustr, uno::Any(m_nAxisType) );
if( !m_aAutoStyleName.isEmpty())
{
@@ -478,7 +478,7 @@ void SchXMLAxisContext::CreateAxis()
Reference< beans::XPropertySet > xNewAxisProp( xAxis, uno::UNO_QUERY );
if( xNewAxisProp.is() )
{
- xNewAxisProp->setPropertyValue("LineStyle"
+ xNewAxisProp->setPropertyValue(u"LineStyle"_ustr
, uno::Any(drawing::LineStyle_NONE));
}
}
@@ -486,7 +486,7 @@ void SchXMLAxisContext::CreateAxis()
if( m_bAdaptXAxisOrientationForOld2DBarCharts && m_aCurrentAxis.eDimension == SCH_XML_AXIS_X )
{
bool bIs3DChart = false;
- if( xDiaProp.is() && ( xDiaProp->getPropertyValue("Dim3D") >>= bIs3DChart )
+ if( xDiaProp.is() && ( xDiaProp->getPropertyValue(u"Dim3D"_ustr) >>= bIs3DChart )
&& !bIs3DChart )
{
Reference< chart2::XChartDocument > xChart2Document( GetImport().GetModel(), uno::UNO_QUERY );
@@ -501,7 +501,7 @@ void SchXMLAxisContext::CreateAxis()
bool bSwapXandYAxis = false;
Reference< chart2::XCoordinateSystem > xCooSys( aCooSysSeq[0] );
Reference< beans::XPropertySet > xCooSysProp( xCooSys, uno::UNO_QUERY );
- if( xCooSysProp.is() && ( xCooSysProp->getPropertyValue("SwapXAndYAxis") >>= bSwapXandYAxis )
+ if( xCooSysProp.is() && ( xCooSysProp->getPropertyValue(u"SwapXAndYAxis"_ustr) >>= bSwapXandYAxis )
&& bSwapXandYAxis )
{
Reference< chart2::XAxis > xAxis = xCooSys->getAxisByDimension( 0, m_aCurrentAxis.nAxisIndex );
@@ -535,18 +535,18 @@ void SchXMLAxisContext::CreateAxis()
bool bIs3DChart = false;
double fMajorOrigin = -1;
OUString sChartType = m_xDiagram->getDiagramType();
- if ((xDiaProp->getPropertyValue("Dim3D") >>= bIs3DChart) && bIs3DChart
+ if ((xDiaProp->getPropertyValue(u"Dim3D"_ustr) >>= bIs3DChart) && bIs3DChart
&& (sChartType == "com.sun.star.chart.BarDiagram" || sChartType == "com.sun.star.chart.StockDiagram"))
{
aScaleData.ShiftedCategoryPosition = true;
xAxis->setScaleData(aScaleData);
}
- else if ((m_xAxisProps->getPropertyValue("MajorOrigin") >>= fMajorOrigin)
+ else if ((m_xAxisProps->getPropertyValue(u"MajorOrigin"_ustr) >>= fMajorOrigin)
&& (rtl::math::approxEqual(fMajorOrigin, 0.0) || rtl::math::approxEqual(fMajorOrigin, 0.5)))
{
aScaleData.ShiftedCategoryPosition = rtl::math::approxEqual(fMajorOrigin, 0.5);
xAxis->setScaleData(aScaleData);
- m_xAxisProps->setPropertyValue("MajorOrigin", uno::Any());
+ m_xAxisProps->setPropertyValue(u"MajorOrigin"_ustr, uno::Any());
}
}
@@ -694,31 +694,31 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
chart2::ScaleData aMainXScale = xMainXAxis->getScaleData();
if( rChartTypeServiceName == u"com.sun.star.chart2.ScatterChartType" )
{
- xMainYAxisProp->setPropertyValue("CrossoverPosition"
+ xMainYAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_VALUE) );
double fCrossoverValue = 0.0;
aMainXScale.Origin >>= fCrossoverValue;
- xMainYAxisProp->setPropertyValue("CrossoverValue"
+ xMainYAxisProp->setPropertyValue(u"CrossoverValue"_ustr
, uno::Any( fCrossoverValue ) );
if( aMainXScale.Orientation == chart2::AxisOrientation_REVERSE )
{
- xMainYAxisProp->setPropertyValue("LabelPosition"
+ xMainYAxisProp->setPropertyValue(u"LabelPosition"_ustr
, uno::Any( css::chart::ChartAxisLabelPosition_OUTSIDE_END) );
- xMainYAxisProp->setPropertyValue("MarkPosition"
+ xMainYAxisProp->setPropertyValue(u"MarkPosition"_ustr
, uno::Any( css::chart::ChartAxisMarkPosition_AT_LABELS) );
if( xSecondaryYAxisProp.is() )
- xSecondaryYAxisProp->setPropertyValue("CrossoverPosition"
+ xSecondaryYAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_START) );
}
else
{
- xMainYAxisProp->setPropertyValue("LabelPosition"
+ xMainYAxisProp->setPropertyValue(u"LabelPosition"_ustr
, uno::Any( css::chart::ChartAxisLabelPosition_OUTSIDE_START) );
- xMainYAxisProp->setPropertyValue("MarkPosition"
+ xMainYAxisProp->setPropertyValue(u"MarkPosition"_ustr
, uno::Any( css::chart::ChartAxisMarkPosition_AT_LABELS) );
if( xSecondaryYAxisProp.is() )
- xSecondaryYAxisProp->setPropertyValue("CrossoverPosition"
+ xSecondaryYAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_END) );
}
}
@@ -726,48 +726,48 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
{
if( aMainXScale.Orientation == chart2::AxisOrientation_REVERSE )
{
- xMainYAxisProp->setPropertyValue("CrossoverPosition"
+ xMainYAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_END) );
if( xSecondaryYAxisProp.is() )
- xSecondaryYAxisProp->setPropertyValue("CrossoverPosition"
+ xSecondaryYAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_START) );
}
else
{
- xMainYAxisProp->setPropertyValue("CrossoverPosition"
+ xMainYAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_START) );
if( xSecondaryYAxisProp.is() )
- xSecondaryYAxisProp->setPropertyValue("CrossoverPosition"
+ xSecondaryYAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_END) );
}
}
chart2::ScaleData aMainYScale = xMainYAxis->getScaleData();
- xMainXAxisProp->setPropertyValue("CrossoverPosition"
+ xMainXAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_VALUE) );
double fCrossoverValue = 0.0;
aMainYScale.Origin >>= fCrossoverValue;
- xMainXAxisProp->setPropertyValue("CrossoverValue"
+ xMainXAxisProp->setPropertyValue(u"CrossoverValue"_ustr
, uno::Any( fCrossoverValue ) );
if( aMainYScale.Orientation == chart2::AxisOrientation_REVERSE )
{
- xMainXAxisProp->setPropertyValue("LabelPosition"
+ xMainXAxisProp->setPropertyValue(u"LabelPosition"_ustr
, uno::Any( css::chart::ChartAxisLabelPosition_OUTSIDE_END) );
- xMainXAxisProp->setPropertyValue("MarkPosition"
+ xMainXAxisProp->setPropertyValue(u"MarkPosition"_ustr
, uno::Any( css::chart::ChartAxisMarkPosition_AT_LABELS) );
if( xSecondaryXAxisProp.is() )
- xSecondaryXAxisProp->setPropertyValue("CrossoverPosition"
+ xSecondaryXAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_START) );
}
else
{
- xMainXAxisProp->setPropertyValue("LabelPosition"
+ xMainXAxisProp->setPropertyValue(u"LabelPosition"_ustr
, uno::Any( css::chart::ChartAxisLabelPosition_OUTSIDE_START) );
- xMainXAxisProp->setPropertyValue("MarkPosition"
+ xMainXAxisProp->setPropertyValue(u"MarkPosition"_ustr
, uno::Any( css::chart::ChartAxisMarkPosition_AT_LABELS) );
if( xSecondaryXAxisProp.is() )
- xSecondaryXAxisProp->setPropertyValue("CrossoverPosition"
+ xSecondaryXAxisProp->setPropertyValue(u"CrossoverPosition"_ustr
, uno::Any( css::chart::ChartAxisPosition_END) );
}
}
@@ -832,7 +832,7 @@ void DateScaleContext::startFastElement( sal_Int32 /*nElement*/,
// parse attributes
bool bSetNewIncrement=false;
chart::TimeIncrement aIncrement;
- m_xAxisProps->getPropertyValue("TimeIncrement") >>= aIncrement;
+ m_xAxisProps->getPropertyValue(u"TimeIncrement"_ustr) >>= aIncrement;
for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
{
@@ -886,7 +886,7 @@ void DateScaleContext::startFastElement( sal_Int32 /*nElement*/,
}
if( bSetNewIncrement )
- m_xAxisProps->setPropertyValue("TimeIncrement", uno::Any( aIncrement ) );
+ m_xAxisProps->setPropertyValue(u"TimeIncrement"_ustr, uno::Any( aIncrement ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx
index d0b329e486fb..2b16258e2518 100644
--- a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx
+++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx
@@ -65,7 +65,7 @@ void SchXMLCalculationSettingsContext::endFastElement(sal_Int32 )
if ( m_aNullDate.hasValue() )
{
Reference < XPropertySet > xPropSet ( GetImport().GetModel(), UNO_QUERY );
- xPropSet->setPropertyValue ( "NullDate", m_aNullDate );
+ xPropSet->setPropertyValue ( u"NullDate"_ustr, m_aNullDate );
}
}
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 7066bfe1ef71..540f39ca9f01 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -77,7 +77,7 @@ void lcl_setRoleAtLabeledSequence(
{
uno::Reference< beans::XPropertySet > xProp( xValues, uno::UNO_QUERY );
if( xProp.is())
- xProp->setPropertyValue("Role", uno::Any( rRole ));
+ xProp->setPropertyValue(u"Role"_ustr, uno::Any( rRole ));
}
}
@@ -265,7 +265,7 @@ void setDataProvider(uno::Reference<chart2::XChartDocument> const & xChartDoc, O
if (!xChartDoc->getDataProvider().is())
{
bool bHasDataPilotSource = !sDataPilotSource.isEmpty();
- OUString aDataProviderServiceName("com.sun.star.chart2.data.DataProvider");
+ OUString aDataProviderServiceName(u"com.sun.star.chart2.data.DataProvider"_ustr);
if (bHasDataPilotSource)
aDataProviderServiceName = "com.sun.star.chart2.data.PivotTableDataProvider";
@@ -431,9 +431,9 @@ void SchXMLChartContext::startFastElement( sal_Int32 /*nElement*/,
{
try
{
- xDocProp->getPropertyValue("BaseDiagram") >>= aOldChartTypeName;
+ xDocProp->getPropertyValue(u"BaseDiagram"_ustr) >>= aOldChartTypeName;
maChartTypeServiceName = SchXMLTools::GetNewChartTypeName( aOldChartTypeName );
- xDocProp->setPropertyValue("RefreshAddInAllowed", uno::Any( false) );
+ xDocProp->setPropertyValue(u"RefreshAddInAllowed"_ustr, uno::Any( false) );
}
catch(const uno::Exception&)
{
@@ -656,15 +656,15 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram(
uno::Sequence< beans::PropertyValue > aArgs{
beans::PropertyValue(
- "CellRangeRepresentation",
+ u"CellRangeRepresentation"_ustr,
-1, uno::Any( rRectangularRange ),
beans::PropertyState_DIRECT_VALUE ),
beans::PropertyValue(
- "DataRowSource",
+ u"DataRowSource"_ustr,
-1, uno::Any( eDataRowSource ),
beans::PropertyState_DIRECT_VALUE ),
beans::PropertyValue(
- "FirstCellAsLabel",
+ u"FirstCellAsLabel"_ustr,
-1, uno::Any( bFirstCellAsLabel ),
beans::PropertyState_DIRECT_VALUE )
};
@@ -673,7 +673,7 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram(
{
aArgs.realloc( aArgs.getLength() + 1 );
aArgs.getArray()[ sal::static_int_cast<sal_uInt32>(aArgs.getLength()) - 1 ] = beans::PropertyValue(
- "SequenceMapping",
+ u"SequenceMapping"_ustr,
-1, uno::Any( !sColTrans.empty()
? lcl_getNumberSequenceFromString( sColTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() )
: lcl_getNumberSequenceFromString( sRowTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() ) ),
@@ -688,7 +688,7 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram(
utl::MediaDescriptor aMediaDescriptor( xNewDoc->getArgs() );
utl::MediaDescriptor::const_iterator aIt(
- aMediaDescriptor.find( OUString( "HierarchicalDocumentName" )));
+ aMediaDescriptor.find( u"HierarchicalDocumentName"_ustr));
if( aIt != aMediaDescriptor.end() )
{
aChartOleObjectName = (*aIt).second.get< OUString >();
@@ -698,7 +698,7 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram(
{
aArgs.realloc( aArgs.getLength() + 1 );
aArgs.getArray()[ sal::static_int_cast<sal_uInt32>(aArgs.getLength()) - 1 ] = beans::PropertyValue(
- "ChartOleObjectName",
+ u"ChartOleObjectName"_ustr,
-1, uno::Any( aChartOleObjectName ),
beans::PropertyState_DIRECT_VALUE );
}
@@ -710,11 +710,11 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram(
aArgs.realloc( aArgs.getLength() + 2 );
auto pArgs = aArgs.getArray();
pArgs[ sal::static_int_cast<sal_uInt32>(aArgs.getLength()) - 2 ] = beans::PropertyValue(
- "HasCategories",
+ u"HasCategories"_ustr,
-1, uno::Any( bHasCateories ),
beans::PropertyState_DIRECT_VALUE );
pArgs[ sal::static_int_cast<sal_uInt32>(aArgs.getLength()) - 1 ] = beans::PropertyValue(
- "UseCategoriesAsX",
+ u"UseCategoriesAsX"_ustr,
-1, uno::Any( false ),//categories in ODF files are not to be used as x values (independent from what is offered in our ui)
beans::PropertyState_DIRECT_VALUE );
@@ -750,7 +750,7 @@ void SchXMLChartContext::endFastElement(sal_Int32 )
Reference< chart2::XDiagram> xDia(xNewDoc->getFirstDiagram());
uno::Reference< beans::XPropertySet > xDiaProp( xDia, uno::UNO_QUERY );
if( xDiaProp.is()) {
- xDiaProp->setPropertyValue("SubPieType", uno::Any(mPieSubType));
+ xDiaProp->setPropertyValue(u"SubPieType"_ustr, uno::Any(mPieSubType));
}
}
@@ -760,13 +760,13 @@ void SchXMLChartContext::endFastElement(sal_Int32 )
if( xDiaProp.is())
{
if( maSeriesDefaultsAndStyles.maStackedDefault.hasValue())
- xDiaProp->setPropertyValue("Stacked",maSeriesDefaultsAndStyles.maStackedDefault);
+ xDiaProp->setPropertyValue(u"Stacked"_ustr,maSeriesDefaultsAndStyles.maStackedDefault);
if( maSeriesDefaultsAndStyles.maPercentDefault.hasValue())
- xDiaProp->setPropertyValue("Percent",maSeriesDefaultsAndStyles.maPercentDefault);
+ xDiaProp->setPropertyValue(u"Percent"_ustr,maSeriesDefaultsAndStyles.maPercentDefault);
if( maSeriesDefaultsAndStyles.maDeepDefault.hasValue())
- xDiaProp->setPropertyValue("Deep",maSeriesDefaultsAndStyles.maDeepDefault);
+ xDiaProp->setPropertyValue(u"Deep"_ustr,maSeriesDefaultsAndStyles.maDeepDefault);
if( maSeriesDefaultsAndStyles.maStackedBarsConnectedDefault.hasValue())
- xDiaProp->setPropertyValue("StackedBarsConnected",maSeriesDefaultsAndStyles.maStackedBarsConnectedDefault);
+ xDiaProp->setPropertyValue(u"StackedBarsConnected"_ustr,maSeriesDefaultsAndStyles.maStackedBarsConnectedDefault);
}
//the OOo 2.0 implementation and older has a bug with donuts
@@ -837,7 +837,7 @@ void SchXMLChartContext::endFastElement(sal_Int32 )
try
{
if( bOlderThan2_3 && xDiaProp.is() )//for older charts the hidden cells were removed by calc on the fly
- xDiaProp->setPropertyValue("IncludeHiddenCells",uno::Any(false));
+ xDiaProp->setPropertyValue(u"IncludeHiddenCells"_ustr,uno::Any(false));
// note: mbRowHasLabels means the first row contains labels, that means we have "column-descriptions",
// (analogously mbColHasLabels means we have "row-descriptions")
@@ -942,7 +942,7 @@ void SchXMLChartContext::endFastElement(sal_Int32 )
}
if( xProp.is())
- xProp->setPropertyValue("RefreshAddInAllowed", uno::Any( true) );
+ xProp->setPropertyValue(u"RefreshAddInAllowed"_ustr, uno::Any( true) );
}
void SchXMLChartContext::MergeSeriesForStockChart()
@@ -970,7 +970,7 @@ void SchXMLChartContext::MergeSeriesForStockChart()
{
xDSContainer.set( *pChartType, uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xCTProp( *pChartType, uno::UNO_QUERY_THROW );
- xCTProp->getPropertyValue("Japanese") >>= bHasJapaneseCandlestick;
+ xCTProp->getPropertyValue(u"Japanese"_ustr) >>= bHasJapaneseCandlestick;
}
}
@@ -991,27 +991,27 @@ void SchXMLChartContext::MergeSeriesForStockChart()
if( bHasJapaneseCandlestick )
{
// open values
- lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], "values-first");
+ lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], u"values-first"_ustr);
aNewSeriesRange[i] = aSeriesSeq[ nSeriesIndex ];
// low values
lcl_MoveDataToCandleStickSeries(
uno::Reference< chart2::data::XDataSource >( aSeriesSeq[ ++nSeriesIndex ], uno::UNO_QUERY_THROW ),
- aNewSeries[i], "values-min");
+ aNewSeries[i], u"values-min"_ustr);
}
else
{
// low values
- lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], "values-min");
+ lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], u"values-min"_ustr);
aNewSeriesRange[i] = aSeriesSeq[ nSeriesIndex ];
}
// high values
lcl_MoveDataToCandleStickSeries(
uno::Reference< chart2::data::XDataSource >( aSeriesSeq[ ++nSeriesIndex ], uno::UNO_QUERY_THROW ),
- aNewSeries[i], "values-max");
+ aNewSeries[i], u"values-max"_ustr);
// close values
lcl_MoveDataToCandleStickSeries(
uno::Reference< chart2::data::XDataSource >( aSeriesSeq[ ++nSeriesIndex ], uno::UNO_QUERY_THROW ),
- aNewSeries[i], "values-last");
+ aNewSeries[i], u"values-last"_ustr);
}
xDSContainer->setDataSeries( aNewSeries );
}
@@ -1048,7 +1048,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SchXMLChartContext::cr
{
if( xProp.is())
{
- xProp->setPropertyValue("HasMainTitle", uno::Any(true) );
+ xProp->setPropertyValue(u"HasMainTitle"_ustr, uno::Any(true) );
}
pContext = new SchXMLTitleContext( mrImportHelper, GetImport(),
maMainTitle, xDoc->getTitle() );
@@ -1059,7 +1059,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SchXMLChartContext::cr
{
if( xProp.is())
{
- xProp->setPropertyValue("HasSubTitle", uno::Any(true) );
+ xProp->setPropertyValue(u"HasSubTitle"_ustr, uno::Any(true) );
}
pContext = new SchXMLTitleContext( mrImportHelper, GetImport(),
maSubTitle, xDoc->getSubTitle() );
diff --git a/xmloff/source/chart/SchXMLDataTableContext.cxx b/xmloff/source/chart/SchXMLDataTableContext.cxx
index 107dca2d1329..e13e2f1aa6c5 100644
--- a/xmloff/source/chart/SchXMLDataTableContext.cxx
+++ b/xmloff/source/chart/SchXMLDataTableContext.cxx
@@ -57,7 +57,7 @@ void SchXMLDataTableContext::startFastElement(
// Create a new DataTable instance
uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory();
uno::Reference<chart2::XDataTable> xDataTable(
- xFactory->createInstance("com.sun.star.chart2.DataTable"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.chart2.DataTable"_ustr), uno::UNO_QUERY);
if (!xDataTable.is())
return;
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 778969ecf83c..7ab061cb815a 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -325,7 +325,7 @@ CustomLabelData lcl_getCustomLabelField(SvXMLExport const& rExport,
if(Reference<beans::XPropertySet> xLabels = rSeries->getDataPointByIndex(nDataPointIndex); xLabels.is())
{
- if(Any aAny = xLabels->getPropertyValue("CustomLabelFields"); aAny.hasValue())
+ if(Any aAny = xLabels->getPropertyValue(u"CustomLabelFields"_ustr); aAny.hasValue())
{
CustomLabelData aData;
Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aCustomLabels;
@@ -364,7 +364,7 @@ css::chart2::RelativePosition lcl_getCustomLabelPosition(
if (Reference<beans::XPropertySet> xLabels = rSeries->getDataPointByIndex(nDataPointIndex); xLabels.is())
{
- if (Any aAny = xLabels->getPropertyValue("CustomLabelPosition"); aAny.hasValue())
+ if (Any aAny = xLabels->getPropertyValue(u"CustomLabelPosition"_ustr); aAny.hasValue())
{
chart2::RelativePosition aCustomLabelPos;
aAny >>= aCustomLabelPos;
@@ -389,7 +389,7 @@ public:
OUString aRole;
return ( xProp.is() &&
- (xProp->getPropertyValue( "Role" ) >>= aRole ) &&
+ (xProp->getPropertyValue( u"Role"_ustr ) >>= aRole ) &&
m_aRole == aRole );
}
@@ -445,7 +445,7 @@ Reference< chart2::data::XDataSource > lcl_createDataSource(
comphelper::getProcessComponentContext() );
Reference< chart2::data::XDataSink > xSink(
xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.chart2.data.DataSource", xContext ),
+ u"com.sun.star.chart2.data.DataSource"_ustr, xContext ),
uno::UNO_QUERY_THROW );
xSink->setData( aData );
@@ -506,12 +506,12 @@ Reference< chart2::data::XDataSource > lcl_pressUsedDataIntoRectangularFormat( c
//the first x-values is always the next sequence //todo ... other x-values get lost for old format
Reference< chart2::data::XLabeledDataSequence > xXValues(
- lcl_getDataSequenceByRole( aSeriesSeqVector, "values-x" ) );
+ lcl_getDataSequenceByRole( aSeriesSeqVector, u"values-x"_ustr ) );
if( xXValues.is() )
aLabeledSeqVector.push_back( xXValues );
//add all other sequences now without x-values
- lcl_MatchesRole aHasXValues( "values-x" );
+ lcl_MatchesRole aHasXValues( u"values-x"_ustr );
std::copy_if(aSeriesSeqVector.begin(), aSeriesSeqVector.end(), std::back_inserter(aLabeledSeqVector),
[&aHasXValues](const auto& rSeriesSeq) { return !aHasXValues( rSeriesSeq ); });
@@ -529,7 +529,7 @@ 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 & )
@@ -695,7 +695,7 @@ uno::Sequence< OUString > lcl_DataSequenceToStringSequence(
if( xProp.is() )
{
OUString aRole;
- xProp->getPropertyValue("Role") >>= aRole;
+ xProp->getPropertyValue(u"Role"_ustr) >>= aRole;
if( aRole.match("values-x") )
{
//lcl_clearIfNoValuesButTextIsContained - replace by indices if the values are not appropriate
@@ -731,7 +731,7 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque
uno::Sequence< sal_Int32 > aHiddenValues;
try
{
- xProp->getPropertyValue("HiddenValues") >>= aHiddenValues;
+ xProp->getPropertyValue(u"HiddenValues"_ustr) >>= aHiddenValues;
if( !aHiddenValues.hasElements() )
return true;
}
@@ -980,7 +980,7 @@ void lcl_exportNumberFormat( const OUString& rPropertyName, const Reference< bea
Reference< chart2::data::XDataSequence > xSequence( rSequence->getValues());
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-" ))
{
aResult.push_back( xSequence );
@@ -1184,23 +1184,23 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
{
try
{
- Any aAny = xDocPropSet->getPropertyValue("HasMainTitle");
+ Any aAny = xDocPropSet->getPropertyValue(u"HasMainTitle"_ustr);
aAny >>= bHasMainTitle;
- aAny = xDocPropSet->getPropertyValue("HasSubTitle");
+ aAny = xDocPropSet->getPropertyValue(u"HasSubTitle"_ustr);
aAny >>= bHasSubTitle;
- aAny = xDocPropSet->getPropertyValue("HasLegend");
+ aAny = xDocPropSet->getPropertyValue(u"HasLegend"_ustr);
aAny >>= bHasLegend;
if ( bIncludeTable )
{
- aAny = xDocPropSet->getPropertyValue("NullDate");
+ aAny = xDocPropSet->getPropertyValue(u"NullDate"_ustr);
if ( !aAny.hasValue() )
{
Reference<container::XChild> xChild(rChartDoc, uno::UNO_QUERY );
if ( xChild.is() )
{
Reference< beans::XPropertySet > xParentDoc( xChild->getParent(),uno::UNO_QUERY);
- if ( xParentDoc.is() && xParentDoc->getPropertySetInfo()->hasPropertyByName("NullDate") )
- aAny = xParentDoc->getPropertyValue("NullDate");
+ if ( xParentDoc.is() && xParentDoc->getPropertySetInfo()->hasPropertyByName(u"NullDate"_ustr) )
+ aAny = xParentDoc->getPropertyValue(u"NullDate"_ustr);
}
}
@@ -1241,7 +1241,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012)
{
- OUString aDataProviderURL( ".." );
+ OUString aDataProviderURL( u".."_ustr );
if( xNewDoc->hasInternalDataProvider() )
aDataProviderURL = ".";
else //special handling for data base data provider necessary
@@ -1407,7 +1407,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
// export legend anchor position
try
{
- Any aAny( xProp->getPropertyValue("Alignment"));
+ Any aAny( xProp->getPropertyValue(u"Alignment"_ustr));
if( SchXMLEnumConverter::getLegendPositionConverter().exportXML( msString, aAny, mrExport.GetMM100UnitConverter() ) )
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LEGEND_POSITION, msString );
}
@@ -1421,7 +1421,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
{
if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED)
{
- Any aAny( xProp->getPropertyValue("Overlay"));
+ Any aAny( xProp->getPropertyValue(u"Overlay"_ustr));
if(aAny.get<bool>())
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_OVERLAY, OUString::boolean(true));
}
@@ -1442,7 +1442,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
{
chart::ChartLegendExpansion nLegendExpansion = chart::ChartLegendExpansion_HIGH;
OUString aExpansionString;
- Any aAny( xProp->getPropertyValue("Expansion"));
+ Any aAny( xProp->getPropertyValue(u"Expansion"_ustr));
bool bHasExpansion = (aAny >>= nLegendExpansion);
if( bHasExpansion && SchXMLEnumConverter::getLegendExpansionConverter().exportXML( aExpansionString, aAny, mrExport.GetMM100UnitConverter() ) )
{
@@ -1557,7 +1557,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
// get a sequence of non-chart shapes (inserted via clipboard)
try
{
- Any aShapesAny = xDocPropSet->getPropertyValue("AdditionalShapes");
+ Any aShapesAny = xDocPropSet->getPropertyValue(u"AdditionalShapes"_ustr);
aShapesAny >>= mxAdditionalShapes;
}
catch( const uno::Exception & )
@@ -1641,7 +1641,7 @@ void SchXMLExportHelper_Impl::exportTable()
{
bool bProtected = false;
Reference< beans::XPropertySet > xProps( mrExport.GetModel(), uno::UNO_QUERY_THROW );
- if ( ( xProps->getPropertyValue("DisableDataTableDialog") >>= bProtected ) &&
+ if ( ( xProps->getPropertyValue(u"DisableDataTableDialog"_ustr) >>= bProtected ) &&
bProtected )
{
mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_PROTECTED, XML_TRUE );
@@ -1962,9 +1962,9 @@ void SchXMLExportHelper_Impl::exportPlotArea(
{
bool bFirstCol = false, bFirstRow = false;
- aAny = xDocProp->getPropertyValue( "DataSourceLabelsInFirstColumn" );
+ aAny = xDocProp->getPropertyValue( u"DataSourceLabelsInFirstColumn"_ustr );
aAny >>= bFirstCol;
- aAny = xDocProp->getPropertyValue( "DataSourceLabelsInFirstRow" );
+ aAny = xDocProp->getPropertyValue( u"DataSourceLabelsInFirstRow"_ustr );
aAny >>= bFirstRow;
if( bFirstCol || bFirstRow )
@@ -2002,7 +2002,7 @@ void SchXMLExportHelper_Impl::exportPlotArea(
// 3d attributes
try
{
- aAny = xPropSet->getPropertyValue("Dim3D");
+ aAny = xPropSet->getPropertyValue(u"Dim3D"_ustr);
aAny >>= bIs3DChart;
if( bIs3DChart )
@@ -2224,7 +2224,7 @@ void SchXMLExportHelper_Impl::exportDateScale( const Reference< beans::XProperty
return;
chart::TimeIncrement aIncrement;
- if( !(rAxisProps->getPropertyValue("TimeIncrement") >>= aIncrement) )
+ if( !(rAxisProps->getPropertyValue(u"TimeIncrement"_ustr) >>= aIncrement) )
return;
sal_Int32 nTimeResolution = css::chart::TimeUnit::DAY;
@@ -2383,13 +2383,13 @@ void SchXMLExportHelper_Impl::exportAxis(
if (sChartType == u"com.sun.star.chart.BarDiagram" || sChartType == u"com.sun.star.chart.StockDiagram")
{
if (!bShiftedCatPos)
- rAxisProps->setPropertyValue("MajorOrigin", uno::Any(0.0));
+ rAxisProps->setPropertyValue(u"MajorOrigin"_ustr, uno::Any(0.0));
}
else if (bShiftedCatPos)
- rAxisProps->setPropertyValue("MajorOrigin", uno::Any(0.5));
+ rAxisProps->setPropertyValue(u"MajorOrigin"_ustr, uno::Any(0.5));
}
- lcl_exportNumberFormat( "NumberFormat", rAxisProps, mrExport );
+ lcl_exportNumberFormat( u"NumberFormat"_ustr, rAxisProps, mrExport );
aPropertyStates = mxExpPropMapper->Filter(mrExport, rAxisProps);
if (!maSrcShellID.isEmpty() && !maDestShellID.isEmpty() && maSrcShellID != maDestShellID)
@@ -2479,25 +2479,25 @@ void SchXMLExportHelper_Impl::exportAxes(
// get multiple properties using XMultiPropertySet
MultiPropertySetHandler aDiagramProperties (xDiagram);
- aDiagramProperties.Add ("HasXAxis", bHasXAxis);
- aDiagramProperties.Add ("HasYAxis", bHasYAxis);
- aDiagramProperties.Add ("HasZAxis", bHasZAxis);
- aDiagramProperties.Add ("HasSecondaryXAxis", bHasSecondaryXAxis);
- aDiagramProperties.Add ("HasSecondaryYAxis", bHasSecondaryYAxis);
+ aDiagramProperties.Add (u"HasXAxis"_ustr, bHasXAxis);
+ aDiagramProperties.Add (u"HasYAxis"_ustr, bHasYAxis);
+ aDiagramProperties.Add (u"HasZAxis"_ustr, bHasZAxis);
+ aDiagramProperties.Add (u"HasSecondaryXAxis"_ustr, bHasSecondaryXAxis);
+ aDiagramProperties.Add (u"HasSecondaryYAxis"_ustr, bHasSecondaryYAxis);
- aDiagramProperties.Add ("HasXAxisTitle", bHasXAxisTitle);
- aDiagramProperties.Add ("HasYAxisTitle", bHasYAxisTitle);
- aDiagramProperties.Add ("HasZAxisTitle", bHasZAxisTitle);
- aDiagramProperties.Add ("HasSecondaryXAxisTitle", bHasSecondaryXAxisTitle);
- aDiagramProperties.Add ("HasSecondaryYAxisTitle", bHasSecondaryYAxisTitle);
+ aDiagramProperties.Add (u"HasXAxisTitle"_ustr, bHasXAxisTitle);
+ aDiagramProperties.Add (u"HasYAxisTitle"_ustr, bHasYAxisTitle);
+ aDiagramProperties.Add (u"HasZAxisTitle"_ustr, bHasZAxisTitle);
+ aDiagramProperties.Add (u"HasSecondaryXAxisTitle"_ustr, bHasSecondaryXAxisTitle);
+ aDiagramProperties.Add (u"HasSecondaryYAxisTitle"_ustr, bHasSecondaryYAxisTitle);
- aDiagramProperties.Add ("HasXAxisGrid", bHasXAxisMajorGrid);
- aDiagramProperties.Add ("HasYAxisGrid", bHasYAxisMajorGrid);
- aDiagramProperties.Add ("HasZAxisGrid", bHasZAxisMajorGrid);
+ aDiagramProperties.Add (u"HasXAxisGrid"_ustr, bHasXAxisMajorGrid);
+ aDiagramProperties.Add (u"HasYAxisGrid"_ustr, bHasYAxisMajorGrid);
+ aDiagramProperties.Add (u"HasZAxisGrid"_ustr, bHasZAxisMajorGrid);
- aDiagramProperties.Add ("HasXAxisHelpGrid", bHasXAxisMinorGrid);
- aDiagramProperties.Add ("HasYAxisHelpGrid", bHasYAxisMinorGrid);
- aDiagramProperties.Add ("HasZAxisHelpGrid", bHasZAxisMinorGrid);
+ aDiagramProperties.Add (u"HasXAxisHelpGrid"_ustr, bHasXAxisMinorGrid);
+ aDiagramProperties.Add (u"HasYAxisHelpGrid"_ustr, bHasYAxisMinorGrid);
+ aDiagramProperties.Add (u"HasZAxisHelpGrid"_ustr, bHasZAxisMinorGrid);
if ( ! aDiagramProperties.GetProperties ())
{
@@ -2652,15 +2652,15 @@ void lcl_createDataLabelProperties(
};
const API2ODFMapItem aLabelFoo2ODFArray[]
- = { API2ODFMapItem("LabelBorderStyle", XML_NAMESPACE_DRAW, "stroke"),
- API2ODFMapItem("LabelBorderWidth", XML_NAMESPACE_SVG, "stroke-width"),
- API2ODFMapItem("LabelBorderColor", XML_NAMESPACE_SVG, "stroke-color"),
- API2ODFMapItem("LabelBorderDashName", XML_NAMESPACE_DRAW, "stroke-dash"),
- API2ODFMapItem("LabelBorderTransparency", XML_NAMESPACE_SVG, "stroke-opacity"),
- API2ODFMapItem("LabelFillStyle", XML_NAMESPACE_DRAW, "fill"),
- API2ODFMapItem("LabelFillBackground", XML_NAMESPACE_DRAW, "fill-hatch-solid"),
- API2ODFMapItem("LabelFillHatchName", XML_NAMESPACE_DRAW, "fill-hatch-name"),
- API2ODFMapItem("LabelFillColor", XML_NAMESPACE_DRAW, "fill-color") };
+ = { API2ODFMapItem(u"LabelBorderStyle"_ustr, XML_NAMESPACE_DRAW, u"stroke"_ustr),
+ API2ODFMapItem(u"LabelBorderWidth"_ustr, XML_NAMESPACE_SVG, u"stroke-width"_ustr),
+ API2ODFMapItem(u"LabelBorderColor"_ustr, XML_NAMESPACE_SVG, u"stroke-color"_ustr),
+ API2ODFMapItem(u"LabelBorderDashName"_ustr, XML_NAMESPACE_DRAW, u"stroke-dash"_ustr),
+ API2ODFMapItem(u"LabelBorderTransparency"_ustr, XML_NAMESPACE_SVG, u"stroke-opacity"_ustr),
+ API2ODFMapItem(u"LabelFillStyle"_ustr, XML_NAMESPACE_DRAW, u"fill"_ustr),
+ API2ODFMapItem(u"LabelFillBackground"_ustr, XML_NAMESPACE_DRAW, u"fill-hatch-solid"_ustr),
+ API2ODFMapItem(u"LabelFillHatchName"_ustr, XML_NAMESPACE_DRAW, u"fill-hatch-name"_ustr),
+ API2ODFMapItem(u"LabelFillColor"_ustr, XML_NAMESPACE_DRAW, u"fill-color"_ustr) };
for (const auto& rIt : aLabelFoo2ODFArray)
{
@@ -2718,7 +2718,7 @@ void SchXMLExportHelper_Impl::exportSeries(
bool bJapaneseCandleSticks = false;
Reference< beans::XPropertySet > xCTProp( rChartType, uno::UNO_QUERY );
if( xCTProp.is())
- xCTProp->getPropertyValue("Japanese") >>= bJapaneseCandleSticks;
+ xCTProp->getPropertyValue(u"Japanese"_ustr) >>= bJapaneseCandleSticks;
exportCandleStickSeries(
xDSCnt->getDataSeries(), xNewDiagram, bJapaneseCandleSticks, bExportContent );
continue;
@@ -2754,7 +2754,7 @@ void SchXMLExportHelper_Impl::exportSeries(
OUString aRole;
Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY );
if( xSeqProp.is())
- xSeqProp->getPropertyValue("Role") >>= aRole;
+ xSeqProp->getPropertyValue(u"Role"_ustr) >>= aRole;
// "main" sequence
if( aRole == aLabelRole )
{
@@ -2788,10 +2788,10 @@ void SchXMLExportHelper_Impl::exportSeries(
// determine attached axis
try
{
- Any aAny( xPropSet->getPropertyValue( "Axis" ));
+ Any aAny( xPropSet->getPropertyValue( u"Axis"_ustr ));
aAny >>= nAttachedAxis;
- aAny = xPropSet->getPropertyValue( "MeanValue" );
+ aAny = xPropSet->getPropertyValue( u"MeanValue"_ustr );
aAny >>= bHasMeanValueLine;
}
catch( const beans::UnknownPropertyException & )
@@ -2803,8 +2803,8 @@ void SchXMLExportHelper_Impl::exportSeries(
mrExport.getSaneDefaultVersion());
if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012)
{
- lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport );
- lcl_exportNumberFormat( "PercentageNumberFormat", xPropSet, mrExport );
+ lcl_exportNumberFormat( u"NumberFormat"_ustr, xPropSet, mrExport );
+ lcl_exportNumberFormat( u"PercentageNumberFormat"_ustr, xPropSet, mrExport );
}
if( mxExpPropMapper.is())
@@ -2839,7 +2839,7 @@ void SchXMLExportHelper_Impl::exportSeries(
{
if (xPropSet.is())
{
- Any aAny = xPropSet->getPropertyValue("ShowLegendEntry");
+ Any aAny = xPropSet->getPropertyValue(u"ShowLegendEntry"_ustr);
if (!aAny.get<bool>())
{
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_HIDE_LEGEND, OUString::boolean(true));
@@ -2856,7 +2856,7 @@ void SchXMLExportHelper_Impl::exportSeries(
{
try
{
- xLSProp->getPropertyValue("HasStringLabel") >>= bHasString;
+ xLSProp->getPropertyValue(u"HasStringLabel"_ustr) >>= bHasString;
}
catch (const beans::UnknownPropertyException&) {}
}
@@ -2911,7 +2911,7 @@ void SchXMLExportHelper_Impl::exportSeries(
Reference< chart2::data::XDataSequence > xYValuesForBubbleChart;
if( bIsBubbleChart )
{
- 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() )
{
xYValuesForBubbleChart = xSequence->getValues();
@@ -2921,7 +2921,7 @@ void SchXMLExportHelper_Impl::exportSeries(
}
if( bIsScatterChart || bIsBubbleChart )
{
- 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() );
@@ -2962,7 +2962,7 @@ void SchXMLExportHelper_Impl::exportSeries(
Reference< beans::XPropertySet > xStatProp;
try
{
- Any aPropAny( xPropSet->getPropertyValue( "DataMeanValueProperties" ));
+ Any aPropAny( xPropSet->getPropertyValue( u"DataMeanValueProperties"_ustr ));
aPropAny >>= xStatProp;
}
catch( const uno::Exception & )
@@ -3128,8 +3128,8 @@ void SchXMLExportHelper_Impl::exportRegressionCurve(
xEquationProperties.set( xRegCurve->getEquationProperties() );
if( xEquationProperties.is())
{
- xEquationProperties->getPropertyValue( "ShowEquation") >>= bShowEquation;
- xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient") >>= bShowRSquared;
+ xEquationProperties->getPropertyValue( u"ShowEquation"_ustr) >>= bShowEquation;
+ xEquationProperties->getPropertyValue( u"ShowCorrelationCoefficient"_ustr) >>= bShowRSquared;
bExportEquation = ( bShowEquation || bShowRSquared );
const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(
@@ -3142,7 +3142,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve(
{
// number format
sal_Int32 nNumberFormat = 0;
- if( (xEquationProperties->getPropertyValue("NumberFormat") >>= nNumberFormat ) &&
+ if( (xEquationProperties->getPropertyValue(u"NumberFormat"_ustr) >>= nNumberFormat ) &&
nNumberFormat != -1 )
{
mrExport.addDataStyle( nNumberFormat );
@@ -3170,7 +3170,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve(
// export position
chart2::RelativePosition aRelativePosition;
- if( xEquationProperties->getPropertyValue( "RelativePosition" ) >>= aRelativePosition )
+ if( xEquationProperties->getPropertyValue( u"RelativePosition"_ustr ) >>= aRelativePosition )
{
double fX = aRelativePosition.Primary * rPageSize.Width;
double fY = aRelativePosition.Secondary * rPageSize.Height;
@@ -3224,18 +3224,18 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe
try
{
- Any aAny = xSeriesProp->getPropertyValue( bYError ? OUString("ErrorBarY") : OUString("ErrorBarX") );
+ Any aAny = xSeriesProp->getPropertyValue( bYError ? u"ErrorBarY"_ustr : u"ErrorBarX"_ustr );
aAny >>= xErrorBarProp;
if ( xErrorBarProp.is() )
{
- aAny = xErrorBarProp->getPropertyValue("ShowNegativeError" );
+ aAny = xErrorBarProp->getPropertyValue(u"ShowNegativeError"_ustr );
aAny >>= bNegative;
- aAny = xErrorBarProp->getPropertyValue("ShowPositiveError" );
+ aAny = xErrorBarProp->getPropertyValue(u"ShowPositiveError"_ustr );
aAny >>= bPositive;
- aAny = xErrorBarProp->getPropertyValue("ErrorBarStyle" );
+ aAny = xErrorBarProp->getPropertyValue(u"ErrorBarStyle"_ustr );
aAny >>= nErrorBarStyle;
}
}
@@ -3303,7 +3303,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
xSource->getDataSequences());
sal_Int32 nSeriesLength =
- lcl_getSequenceLengthByRole( aSeqCnt, "values-last");
+ lcl_getSequenceLengthByRole( aSeqCnt, u"values-last"_ustr);
if( bExportContent )
{
@@ -3315,7 +3315,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
if( bJapaneseCandleSticks )
{
tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole(
- aSeqCnt, "values-first", xNewDoc, m_aDataSequencesToExport ));
+ aSeqCnt, u"values-first"_ustr, xNewDoc, m_aDataSequencesToExport ));
if( !aRanges.second.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second );
if( !aRanges.first.isEmpty())
@@ -3332,7 +3332,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
// low
{
tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole(
- aSeqCnt, "values-min", xNewDoc, m_aDataSequencesToExport ));
+ aSeqCnt, u"values-min"_ustr, xNewDoc, m_aDataSequencesToExport ));
if( !aRanges.second.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second );
if( !aRanges.first.isEmpty())
@@ -3349,7 +3349,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
// high
{
tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole(
- aSeqCnt, "values-max", xNewDoc, m_aDataSequencesToExport ));
+ aSeqCnt, u"values-max"_ustr, xNewDoc, m_aDataSequencesToExport ));
if( !aRanges.second.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second );
if( !aRanges.first.isEmpty())
@@ -3366,7 +3366,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
// close
{
tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole(
- aSeqCnt, "values-last", xNewDoc, m_aDataSequencesToExport ));
+ aSeqCnt, u"values-last"_ustr, xNewDoc, m_aDataSequencesToExport ));
if( !aRanges.second.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second );
if( !aRanges.first.isEmpty())
@@ -3421,13 +3421,13 @@ void SchXMLExportHelper_Impl::exportDataPoints(
Sequence<sal_Int32> deletedLegendEntriesSeq;
if( xSeriesProperties.is())
{
- xSeriesProperties->getPropertyValue("AttributedDataPoints") >>= aDataPointSeq;
- xSeriesProperties->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint;
+ xSeriesProperties->getPropertyValue(u"AttributedDataPoints"_ustr) >>= aDataPointSeq;
+ xSeriesProperties->getPropertyValue(u"VaryColorsByPoint"_ustr) >>= bVaryColorsByPoint;
const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(
mrExport.getSaneDefaultVersion());
if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED) // do not export to ODF 1.3 or older
- xSeriesProperties->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq;
+ xSeriesProperties->getPropertyValue(u"DeletedLegendEntries"_ustr) >>= deletedLegendEntriesSeq;
}
sal_Int32 nSize = aDataPointSeq.getLength();
@@ -3483,8 +3483,8 @@ void SchXMLExportHelper_Impl::exportDataPoints(
mrExport.getSaneDefaultVersion());
if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012 && bExportNumFmt)
{
- lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport );
- lcl_exportNumberFormat( "PercentageNumberFormat", xPropSet, mrExport );
+ lcl_exportNumberFormat( u"NumberFormat"_ustr, xPropSet, mrExport );
+ lcl_exportNumberFormat( u"PercentageNumberFormat"_ustr, xPropSet, mrExport );
}
// Generate style for <chart:data-label> child element
@@ -3497,10 +3497,10 @@ void SchXMLExportHelper_Impl::exportDataPoints(
if (nCurrentODFVersion & SvtSaveOptions::ODFSVER_EXTENDED)
{
sal_Int32 nPlacement = 0;
- xPropSet->getPropertyValue("LabelPlacement") >>= nPlacement;
+ xPropSet->getPropertyValue(u"LabelPlacement"_ustr) >>= nPlacement;
if (nPlacement == chart::DataLabelPlacement::CUSTOM)
{
- xPropSet->setPropertyValue("LabelPlacement",
+ xPropSet->setPropertyValue(u"LabelPlacement"_ustr,
uno::Any(chart::DataLabelPlacement::OUTSIDE));
}
}
@@ -3580,8 +3580,8 @@ void SchXMLExportHelper_Impl::exportDataPoints(
mrExport.getSaneDefaultVersion());
if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012)
{
- lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport );
- lcl_exportNumberFormat( "PercentageNumberFormat", xPropSet, mrExport );
+ lcl_exportNumberFormat( u"NumberFormat"_ustr, xPropSet, mrExport );
+ lcl_exportNumberFormat( u"PercentageNumberFormat"_ustr, xPropSet, mrExport );
}
// Generate style for <chart:data-label> child element
@@ -3817,8 +3817,8 @@ void SchXMLExportHelper_Impl::CollectAutoTextStyle( const css::uno::Reference< b
Sequence< uno::Reference< chart2::XFormattedString > > xFormattedTitle;
OUString aTitle;
- if ((xTitlePropSet->getPropertyValue("String") >>= aTitle) && !aTitle.isEmpty())
- xTitlePropSet->getPropertyValue("FormattedStrings") >>= xFormattedTitle;
+ if ((xTitlePropSet->getPropertyValue(u"String"_ustr) >>= aTitle) && !aTitle.isEmpty())
+ xTitlePropSet->getPropertyValue(u"FormattedStrings"_ustr) >>= xFormattedTitle;
if (xFormattedTitle.hasElements())
{
@@ -3950,7 +3950,7 @@ void SchXMLExport::ExportContent_()
Reference< lang::XServiceInfo > xServ( xChartDoc, uno::UNO_QUERY );
if( xServ.is())
{
- if( xServ->supportsService( "com.sun.star.chart.ChartTableAddressSupplier" ))
+ if( xServ->supportsService( u"com.sun.star.chart.ChartTableAddressSupplier"_ustr ))
{
Reference< beans::XPropertySet > xProp( xServ, uno::UNO_QUERY );
if( xProp.is())
@@ -3959,7 +3959,7 @@ void SchXMLExport::ExportContent_()
try
{
OUString sChartAddress;
- aAny = xProp->getPropertyValue( "ChartRangeAddress" );
+ aAny = xProp->getPropertyValue( u"ChartRangeAddress"_ustr );
aAny >>= sChartAddress;
maExportHelper->m_pImpl->SetChartRangeAddress( sChartAddress );
@@ -4047,7 +4047,7 @@ com_sun_star_comp_Chart_XMLExporter_get_implementation(uno::XComponentContext* p
uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(
- new SchXMLExport(pCtx, "SchXMLExport.Compact",
+ new SchXMLExport(pCtx, u"SchXMLExport.Compact"_ustr,
SvXMLExportFlags::ALL
^ (SvXMLExportFlags::SETTINGS | SvXMLExportFlags::MASTERSTYLES
| SvXMLExportFlags::SCRIPTS)));
@@ -4059,7 +4059,7 @@ com_sun_star_comp_Chart_XMLOasisExporter_get_implementation(uno::XComponentConte
uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(
- new SchXMLExport(pCtx, "SchXMLExport.Oasis.Compact",
+ new SchXMLExport(pCtx, u"SchXMLExport.Oasis.Compact"_ustr,
(SvXMLExportFlags::ALL
^ (SvXMLExportFlags::SETTINGS | SvXMLExportFlags::MASTERSTYLES
| SvXMLExportFlags::SCRIPTS))
@@ -4072,7 +4072,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLStylesExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Styles", SvXMLExportFlags::STYLES));
+ return cppu::acquire(new SchXMLExport(pCtx, u"SchXMLExport.Styles"_ustr, SvXMLExportFlags::STYLES));
}
// Oasis format
@@ -4080,7 +4080,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Oasis.Styles",
+ return cppu::acquire(new SchXMLExport(pCtx, u"SchXMLExport.Oasis.Styles"_ustr,
SvXMLExportFlags::STYLES | SvXMLExportFlags::OASIS));
}
@@ -4088,7 +4088,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLContentExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Content",
+ return cppu::acquire(new SchXMLExport(pCtx, u"SchXMLExport.Content"_ustr,
SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT
| SvXMLExportFlags::FONTDECLS));
}
@@ -4097,7 +4097,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLOasisContentExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Oasis.Content",
+ return cppu::acquire(new SchXMLExport(pCtx, u"SchXMLExport.Oasis.Content"_ustr,
SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT
| SvXMLExportFlags::FONTDECLS
| SvXMLExportFlags::OASIS));
@@ -4109,7 +4109,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Oasis.Meta",
+ return cppu::acquire(new SchXMLExport(pCtx, u"SchXMLExport.Oasis.Meta"_ustr,
SvXMLExportFlags::META | SvXMLExportFlags::OASIS));
}
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 52f0ea4207dd..844fb7363b43 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -225,7 +225,7 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries(
{
xResult.set(
xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.chart2.DataSeries",
+ u"com.sun.star.chart2.DataSeries"_ustr,
xContext ), uno::UNO_QUERY_THROW );
}
if( xResult.is() )
@@ -365,7 +365,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLOasisImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SchXMLImport(pCtx, "SchXMLImport", SvXMLImportFlags::ALL));
+ return cppu::acquire(new SchXMLImport(pCtx, u"SchXMLImport"_ustr, SvXMLImportFlags::ALL));
}
// multiple storage version: one for content / styles / meta
@@ -374,21 +374,21 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLOasisMetaImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SchXMLImport(pCtx, "SchXMLImport.Meta", SvXMLImportFlags::META));
+ return cppu::acquire(new SchXMLImport(pCtx, u"SchXMLImport.Meta"_ustr, SvXMLImportFlags::META));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SchXMLImport(pCtx, "SchXMLImport.Styles", SvXMLImportFlags::STYLES));
+ return cppu::acquire(new SchXMLImport(pCtx, u"SchXMLImport.Styles"_ustr, SvXMLImportFlags::STYLES));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SchXMLImport(pCtx, "SchXMLImport.Content",
+ return cppu::acquire(new SchXMLImport(pCtx, u"SchXMLImport.Content"_ustr,
SvXMLImportFlags::CONTENT | SvXMLImportFlags::AUTOSTYLES
| SvXMLImportFlags::FONTDECLS));
}
diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx
index 712ca3256d3e..13f0f4ab3956 100644
--- a/xmloff/source/chart/SchXMLLegendContext.cxx
+++ b/xmloff/source/chart/SchXMLLegendContext.cxx
@@ -52,7 +52,7 @@ void SchXMLLegendContext::startFastElement( sal_Int32 /*nElement*/,
{
try
{
- xDocProp->setPropertyValue("HasLegend", uno::Any( true ) );
+ xDocProp->setPropertyValue(u"HasLegend"_ustr, uno::Any( true ) );
}
catch(const beans::UnknownPropertyException&)
{
@@ -90,7 +90,7 @@ void SchXMLLegendContext::startFastElement( sal_Int32 /*nElement*/,
try
{
if( SchXMLEnumConverter::getLegendPositionConverter().importXML( aIter.toString(), aAny, GetImport().GetMM100UnitConverter() ) )
- xLegendProps->setPropertyValue("Alignment", aAny );
+ xLegendProps->setPropertyValue(u"Alignment"_ustr, aAny );
}
catch(const beans::UnknownPropertyException&)
{
@@ -101,7 +101,7 @@ void SchXMLLegendContext::startFastElement( sal_Int32 /*nElement*/,
try
{
bOverlay = aIter.toBoolean();
- xLegendProps->setPropertyValue("Overlay", uno::Any(bOverlay));
+ xLegendProps->setPropertyValue(u"Overlay"_ustr, uno::Any(bOverlay));
}
catch(const beans::UnknownPropertyException&)
{
@@ -150,7 +150,7 @@ void SchXMLLegendContext::startFastElement( sal_Int32 /*nElement*/,
}
if( bHasExpansion && nLegendExpansion!= chart::ChartLegendExpansion_CUSTOM )
- xLegendProps->setPropertyValue("Expansion", uno::Any(nLegendExpansion) );
+ xLegendProps->setPropertyValue(u"Expansion"_ustr, uno::Any(nLegendExpansion) );
else if( bHasHeight && bHasWidth )
xLegendShape->setSize( aLegendSize );
@@ -158,7 +158,7 @@ void SchXMLLegendContext::startFastElement( sal_Int32 /*nElement*/,
xLegendShape->setPosition( aLegendPos );
// the fill style has the default "none" in XML, but "solid" in the model.
- xLegendProps->setPropertyValue("FillStyle", uno::Any( drawing::FillStyle_NONE ));
+ xLegendProps->setPropertyValue(u"FillStyle"_ustr, uno::Any( drawing::FillStyle_NONE ));
// set auto-styles for Legend
mrImportHelper.FillAutoStyle(sAutoStyleName, xLegendProps);
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 78dcf0323e15..7beeee3a4fbb 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -94,7 +94,7 @@ void SchXML3DSceneAttributesHelper::getCameraDefaultFromDiagram( const uno::Refe
if( xProp.is() )
{
drawing::CameraGeometry aCamGeo;
- xProp->getPropertyValue("D3DCameraGeometry") >>= aCamGeo;
+ xProp->getPropertyValue(u"D3DCameraGeometry"_ustr) >>= aCamGeo;
maVRP.setX( aCamGeo.vrp.PositionX );
maVRP.setY( aCamGeo.vrp.PositionY );
maVRP.setZ( aCamGeo.vrp.PositionZ );
@@ -179,22 +179,22 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext(
try
{
- xProp->setPropertyValue("HasXAxis", aFalseBool );
- xProp->setPropertyValue("HasXAxisGrid", aFalseBool );
- xProp->setPropertyValue("HasXAxisDescription", aFalseBool );
- xProp->setPropertyValue("HasSecondaryXAxis", aFalseBool );
- xProp->setPropertyValue("HasSecondaryXAxisDescription", aFalseBool );
-
- xProp->setPropertyValue("HasYAxis", aFalseBool );
- xProp->setPropertyValue("HasYAxisGrid", aFalseBool );
- xProp->setPropertyValue("HasYAxisDescription", aFalseBool );
- xProp->setPropertyValue("HasSecondaryYAxis", aFalseBool );
- xProp->setPropertyValue("HasSecondaryYAxisDescription", aFalseBool );
-
- xProp->setPropertyValue("HasZAxis", aFalseBool );
- xProp->setPropertyValue("HasZAxisDescription", aFalseBool );
-
- xProp->setPropertyValue("DataRowSource", uno::Any(chart::ChartDataRowSource_COLUMNS) );
+ xProp->setPropertyValue(u"HasXAxis"_ustr, aFalseBool );
+ xProp->setPropertyValue(u"HasXAxisGrid"_ustr, aFalseBool );
+ xProp->setPropertyValue(u"HasXAxisDescription"_ustr, aFalseBool );
+ xProp->setPropertyValue(u"HasSecondaryXAxis"_ustr, aFalseBool );
+ xProp->setPropertyValue(u"HasSecondaryXAxisDescription"_ustr, aFalseBool );
+
+ xProp->setPropertyValue(u"HasYAxis"_ustr, aFalseBool );
+ xProp->setPropertyValue(u"HasYAxisGrid"_ustr, aFalseBool );
+ xProp->setPropertyValue(u"HasYAxisDescription"_ustr, aFalseBool );
+ xProp->setPropertyValue(u"HasSecondaryYAxis"_ustr, aFalseBool );
+ xProp->setPropertyValue(u"HasSecondaryYAxisDescription"_ustr, aFalseBool );
+
+ xProp->setPropertyValue(u"HasZAxis"_ustr, aFalseBool );
+ xProp->setPropertyValue(u"HasZAxisDescription"_ustr, aFalseBool );
+
+ xProp->setPropertyValue(u"DataRowSource"_ustr, uno::Any(chart::ChartDataRowSource_COLUMNS) );
}
catch( const beans::UnknownPropertyException & )
{
@@ -268,8 +268,8 @@ void SchXMLPlotAreaContext::startFastElement (sal_Int32 /*nElement*/,
{
try
{
- xDocProp->setPropertyValue("DataSourceLabelsInFirstColumn", uno::Any(mrColHasLabels) );
- xDocProp->setPropertyValue("DataSourceLabelsInFirstRow", uno::Any(mrRowHasLabels) );
+ xDocProp->setPropertyValue(u"DataSourceLabelsInFirstColumn"_ustr, uno::Any(mrColHasLabels) );
+ xDocProp->setPropertyValue(u"DataSourceLabelsInFirstRow"_ustr, uno::Any(mrRowHasLabels) );
}
catch( const beans::UnknownPropertyException & )
{
@@ -298,7 +298,7 @@ void SchXMLPlotAreaContext::startFastElement (sal_Int32 /*nElement*/,
pPropStyleContext->FillPropertySet( xProp );
// get the data row source that was set without having data
- xProp->getPropertyValue("DataRowSource")
+ xProp->getPropertyValue(u"DataRowSource"_ustr)
>>= mrDataRowSource;
//lines on/off
@@ -313,12 +313,12 @@ void SchXMLPlotAreaContext::startFastElement (sal_Int32 /*nElement*/,
if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_0( GetImport().GetModel() ) )
{
bool bIs3d = false;
- if( xProp.is() && ( xProp->getPropertyValue("Dim3D") >>= bIs3d ) &&
+ if( xProp.is() && ( xProp->getPropertyValue(u"Dim3D"_ustr) >>= bIs3d ) &&
bIs3d )
{
if( maChartTypeServiceName == "com.sun.star.chart2.PieChartType" || maChartTypeServiceName == "com.sun.star.chart2.DonutChartType" )
{
- OUString aPropName( "StartingAngle" );
+ OUString aPropName( u"StartingAngle"_ustr );
uno::Any aAStartingAngle( SchXMLTools::getPropertyFromContext( aPropName, pPropStyleContext, pStylesCtxt ) );
if( !aAStartingAngle.hasValue() )
xProp->setPropertyValue( aPropName, uno::Any(sal_Int32(0)) ) ;
@@ -335,28 +335,28 @@ void SchXMLPlotAreaContext::startFastElement (sal_Int32 /*nElement*/,
{
try
{
- mrSeriesDefaultsAndStyles.maSymbolTypeDefault = xProp->getPropertyValue("SymbolType");
- mrSeriesDefaultsAndStyles.maDataCaptionDefault = xProp->getPropertyValue("DataCaption");
+ mrSeriesDefaultsAndStyles.maSymbolTypeDefault = xProp->getPropertyValue(u"SymbolType"_ustr);
+ mrSeriesDefaultsAndStyles.maDataCaptionDefault = xProp->getPropertyValue(u"DataCaption"_ustr);
- mrSeriesDefaultsAndStyles.maMeanValueDefault = xProp->getPropertyValue("MeanValue");
- mrSeriesDefaultsAndStyles.maRegressionCurvesDefault = xProp->getPropertyValue("RegressionCurves");
+ mrSeriesDefaultsAndStyles.maMeanValueDefault = xProp->getPropertyValue(u"MeanValue"_ustr);
+ mrSeriesDefaultsAndStyles.maRegressionCurvesDefault = xProp->getPropertyValue(u"RegressionCurves"_ustr);
bool bStacked = false;
- mrSeriesDefaultsAndStyles.maStackedDefault = xProp->getPropertyValue("Stacked");
+ mrSeriesDefaultsAndStyles.maStackedDefault = xProp->getPropertyValue(u"Stacked"_ustr);
mrSeriesDefaultsAndStyles.maStackedDefault >>= bStacked;
- mrSeriesDefaultsAndStyles.maPercentDefault = xProp->getPropertyValue("Percent");
+ mrSeriesDefaultsAndStyles.maPercentDefault = xProp->getPropertyValue(u"Percent"_ustr);
mrSeriesDefaultsAndStyles.maPercentDefault >>= mbPercentStacked;
- mrSeriesDefaultsAndStyles.maStackedBarsConnectedDefault = xProp->getPropertyValue("StackedBarsConnected");
+ mrSeriesDefaultsAndStyles.maStackedBarsConnectedDefault = xProp->getPropertyValue(u"StackedBarsConnected"_ustr);
// deep
- uno::Any aDeepProperty( xProp->getPropertyValue("Deep"));
+ uno::Any aDeepProperty( xProp->getPropertyValue(u"Deep"_ustr));
// #124488# old versions store a 3d area and 3D line deep chart with Deep==false => workaround for this
if( ! (bStacked || mbPercentStacked ))
{
if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( GetImport().GetModel() ) )
{
bool bIs3d = false;
- if( ( xProp->getPropertyValue("Dim3D") >>= bIs3d ) &&
+ if( ( xProp->getPropertyValue(u"Dim3D"_ustr) >>= bIs3d ) &&
bIs3d )
{
if( maChartTypeServiceName == "com.sun.star.chart2.AreaChartType" || maChartTypeServiceName == "com.sun.star.chart2.LineChartType" )
@@ -368,8 +368,8 @@ void SchXMLPlotAreaContext::startFastElement (sal_Int32 /*nElement*/,
}
mrSeriesDefaultsAndStyles.maDeepDefault = aDeepProperty;
- xProp->getPropertyValue("NumberOfLines") >>= mnNumOfLinesProp;
- xProp->getPropertyValue("Volume") >>= mbStockHasVolume;
+ xProp->getPropertyValue(u"NumberOfLines"_ustr) >>= mnNumOfLinesProp;
+ xProp->getPropertyValue(u"Volume"_ustr) >>= mbStockHasVolume;
}
catch( const uno::Exception & )
{
@@ -394,7 +394,7 @@ void SchXMLPlotAreaContext::startFastElement (sal_Int32 /*nElement*/,
// data yet.
mxNewDoc->createInternalDataProvider( false /* bCloneExistingData */ );
if( xProp.is() && mrDataRowSource!=chart::ChartDataRowSource_COLUMNS )
- xProp->setPropertyValue("DataRowSource", uno::Any(mrDataRowSource) );
+ xProp->setPropertyValue(u"DataRowSource"_ustr, uno::Any(mrDataRowSource) );
}
}
@@ -520,7 +520,7 @@ void SchXMLPlotAreaContext::endFastElement(sal_Int32 )
if( xDiaProp.is())
{
bool bIsThreeDim = false;
- uno::Any aAny = xDiaProp->getPropertyValue("Dim3D");
+ uno::Any aAny = xDiaProp->getPropertyValue(u"Dim3D"_ustr);
aAny >>= bIsThreeDim;
// set 3d scene attributes
@@ -535,7 +535,7 @@ void SchXMLPlotAreaContext::endFastElement(sal_Int32 )
{
try
{
- xDiaProp->setPropertyValue("NumberOfLines",
+ xDiaProp->setPropertyValue(u"NumberOfLines"_ustr,
uno::Any( mnNumOfLinesProp ));
}
catch( const uno::Exception & )
@@ -550,7 +550,7 @@ void SchXMLPlotAreaContext::endFastElement(sal_Int32 )
{
try
{
- xDiaProp->setPropertyValue("Volume",
+ xDiaProp->setPropertyValue(u"Volume"_ustr,
uno::Any( true ));
}
catch( const uno::Exception & )
@@ -754,14 +754,14 @@ void SchXMLDataPointContext::startFastElement (sal_Int32 /*Element*/,
{
uno::Sequence<sal_Int32> deletedLegendEntriesSeq;
Reference<beans::XPropertySet> xSeriesProp(mDataPoint.m_xSeries, uno::UNO_QUERY);
- xSeriesProp->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq;
+ xSeriesProp->getPropertyValue(u"DeletedLegendEntries"_ustr) >>= deletedLegendEntriesSeq;
std::vector<sal_Int32> deletedLegendEntries;
for (const auto& deletedLegendEntry : deletedLegendEntriesSeq)
{
deletedLegendEntries.push_back(deletedLegendEntry);
}
deletedLegendEntries.push_back(mDataPoint.m_nPointIndex);
- xSeriesProp->setPropertyValue("DeletedLegendEntries", uno::Any(comphelper::containerToSequence(deletedLegendEntries)));
+ xSeriesProp->setPropertyValue(u"DeletedLegendEntries"_ustr, uno::Any(comphelper::containerToSequence(deletedLegendEntries)));
}
break;
}
@@ -1024,7 +1024,7 @@ static void lcl_setErrorBarSequence ( const uno::Reference< chart2::XChartDocume
Reference< beans::XPropertySet > xSeqProp( xNewSequence, uno::UNO_QUERY );
- xSeqProp->setPropertyValue("Role", uno::Any( aRole ));
+ xSeqProp->setPropertyValue(u"Role"_ustr, uno::Any( aRole ));
Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
@@ -1099,46 +1099,46 @@ void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, const uno::
sal_Int32 aBarStyle = css::chart::ErrorBarStyle::NONE;
aAny >>= aBarStyle;
- xBarProp->setPropertyValue("ErrorBarStyle", aAny);
+ xBarProp->setPropertyValue(u"ErrorBarStyle"_ustr, aAny);
aAny = SchXMLTools::getPropertyFromContext(u"ShowPositiveError",
pSeriesStyleContext,pStylesCtxt);
if(aAny.hasValue())
- xBarProp->setPropertyValue("ShowPositiveError",aAny);
+ xBarProp->setPropertyValue(u"ShowPositiveError"_ustr,aAny);
aAny = SchXMLTools::getPropertyFromContext(u"ShowNegativeError",
pSeriesStyleContext,pStylesCtxt);
if(aAny.hasValue())
- xBarProp->setPropertyValue("ShowNegativeError",aAny);
+ xBarProp->setPropertyValue(u"ShowNegativeError"_ustr,aAny);
aAny = SchXMLTools::getPropertyFromContext(u"PositiveError",
pSeriesStyleContext, pStylesCtxt);
if(aAny.hasValue())
- xBarProp->setPropertyValue("PositiveError", aAny);
+ xBarProp->setPropertyValue(u"PositiveError"_ustr, aAny);
else
{
aAny = SchXMLTools::getPropertyFromContext(u"ConstantErrorHigh",
pSeriesStyleContext, pStylesCtxt);
if(aAny.hasValue())
- xBarProp->setPropertyValue("PositiveError", aAny);
+ xBarProp->setPropertyValue(u"PositiveError"_ustr, aAny);
}
aAny = SchXMLTools::getPropertyFromContext(u"NegativeError",
pSeriesStyleContext, pStylesCtxt);
if(aAny.hasValue())
- xBarProp->setPropertyValue("NegativeError", aAny);
+ xBarProp->setPropertyValue(u"NegativeError"_ustr, aAny);
else
{
aAny = SchXMLTools::getPropertyFromContext(u"ConstantErrorLow",
pSeriesStyleContext, pStylesCtxt);
if(aAny.hasValue())
- xBarProp->setPropertyValue("NegativeError", aAny);
+ xBarProp->setPropertyValue(u"NegativeError"_ustr, aAny);
}
aAny = SchXMLTools::getPropertyFromContext(u"ErrorBarRangePositive",
@@ -1159,15 +1159,15 @@ void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, const uno::
pSeriesStyleContext, pStylesCtxt);
if( aAny.hasValue() )
{
- xBarProp->setPropertyValue("Weight", aAny);
+ xBarProp->setPropertyValue(u"Weight"_ustr, aAny);
}
aAny = SchXMLTools::getPropertyFromContext(u"PercentageError",
pSeriesStyleContext, pStylesCtxt);
if( aAny.hasValue() && aBarStyle == css::chart::ErrorBarStyle::RELATIVE )
{
- xBarProp->setPropertyValue("PositiveError", aAny);
- xBarProp->setPropertyValue("NegativeError", aAny);
+ xBarProp->setPropertyValue(u"PositiveError"_ustr, aAny);
+ xBarProp->setPropertyValue(u"NegativeError"_ustr, aAny);
}
switch(aBarStyle)
@@ -1177,12 +1177,12 @@ void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, const uno::
aAny = SchXMLTools::getPropertyFromContext(u"NegativeError",
pSeriesStyleContext,pStylesCtxt);
- xBarProp->setPropertyValue("NegativeError",aAny);
+ xBarProp->setPropertyValue(u"NegativeError"_ustr,aAny);
aAny = SchXMLTools::getPropertyFromContext(u"PositiveError",
pSeriesStyleContext,pStylesCtxt);
- xBarProp->setPropertyValue("PositiveError",aAny);
+ xBarProp->setPropertyValue(u"PositiveError"_ustr,aAny);
}
break;
default:
@@ -1236,15 +1236,15 @@ void SchXMLStatisticsObjectContext::startFastElement (sal_Int32 /*Element*/,
uno::Reference< lang::XMultiServiceFactory > xFact = comphelper::getProcessServiceFactory();
- uno::Reference< beans::XPropertySet > xBarProp( xFact->createInstance("com.sun.star.chart2.ErrorBar" ),
+ uno::Reference< beans::XPropertySet > xBarProp( xFact->createInstance(u"com.sun.star.chart2.ErrorBar"_ustr ),
uno::UNO_QUERY );
- xBarProp->setPropertyValue("ErrorBarStyle",uno::Any(css::chart::ErrorBarStyle::NONE));
- xBarProp->setPropertyValue("PositiveError",uno::Any(0.0));
- xBarProp->setPropertyValue("NegativeError",uno::Any(0.0));
- xBarProp->setPropertyValue("Weight",uno::Any(1.0));
- xBarProp->setPropertyValue("ShowPositiveError",uno::Any(true));
- xBarProp->setPropertyValue("ShowNegativeError",uno::Any(true));
+ xBarProp->setPropertyValue(u"ErrorBarStyle"_ustr,uno::Any(css::chart::ErrorBarStyle::NONE));
+ xBarProp->setPropertyValue(u"PositiveError"_ustr,uno::Any(0.0));
+ xBarProp->setPropertyValue(u"NegativeError"_ustr,uno::Any(0.0));
+ xBarProp->setPropertyValue(u"Weight"_ustr,uno::Any(1.0));
+ xBarProp->setPropertyValue(u"ShowPositiveError"_ustr,uno::Any(true));
+ xBarProp->setPropertyValue(u"ShowNegativeError"_ustr,uno::Any(true));
// first import defaults from parent style
SetErrorBarStyleProperties( maSeriesStyleName, xBarProp, mrImportHelper );
diff --git a/xmloff/source/chart/SchXMLPropertyMappingContext.cxx b/xmloff/source/chart/SchXMLPropertyMappingContext.cxx
index 325ee10377fe..f26ade653984 100644
--- a/xmloff/source/chart/SchXMLPropertyMappingContext.cxx
+++ b/xmloff/source/chart/SchXMLPropertyMappingContext.cxx
@@ -44,7 +44,7 @@ Reference< chart2::data::XLabeledDataSequence2 > createAndAddSequenceToSeries( c
Reference< chart2::data::XDataSequence > xSeq = SchXMLTools::CreateDataSequence( rRange, xChartDoc );
Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY );
if( xSeqProp.is())
- xSeqProp->setPropertyValue("Role", uno::Any( rRole));
+ xSeqProp->setPropertyValue(u"Role"_ustr, uno::Any( rRole));
xLabeledSeq->setValues( xSeq );
Reference< chart2::data::XDataSink > xSink( xSeriesSource, uno::UNO_QUERY );
diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
index 333e9a7ea9bd..cf290b173cd1 100644
--- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
+++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
@@ -164,15 +164,15 @@ void SchXMLEquationContext::startFastElement (sal_Int32 /*nElement*/,
pPropStyleContext->FillPropertySet( xEquationProperties );
}
}
- xEquationProperties->setPropertyValue( "ShowEquation", uno::Any( bShowEquation ));
- xEquationProperties->setPropertyValue( "ShowCorrelationCoefficient", uno::Any( bShowRSquare ));
+ xEquationProperties->setPropertyValue( u"ShowEquation"_ustr, uno::Any( bShowEquation ));
+ xEquationProperties->setPropertyValue( u"ShowCorrelationCoefficient"_ustr, uno::Any( bShowRSquare ));
if( bHasXPos && bHasYPos )
{
chart2::RelativePosition aRelPos;
aRelPos.Primary = static_cast< double >( aPosition.X ) / static_cast< double >( maChartSize.Width );
aRelPos.Secondary = static_cast< double >( aPosition.Y ) / static_cast< double >( maChartSize.Height );
- xEquationProperties->setPropertyValue( "RelativePosition", uno::Any( aRelPos ));
+ xEquationProperties->setPropertyValue( u"RelativePosition"_ustr, uno::Any( aRelPos ));
}
mrRegressionStyle.m_xEquationProperties.set( xEquationProperties );
}
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 4b6404e0a1ed..62f7a8336155 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -110,12 +110,12 @@ void lcl_setAutomaticSymbolSize( const uno::Reference< beans::XPropertySet >& xS
double fScale = 1;
uno::Reference< beans::XPropertySet > xLegendProp( xChartDoc->getLegend(), uno::UNO_QUERY );
chart::ChartLegendPosition aLegendPosition = chart::ChartLegendPosition_NONE;
- if( xLegendProp.is() && (xLegendProp->getPropertyValue("Alignment") >>= aLegendPosition)
+ if( xLegendProp.is() && (xLegendProp->getPropertyValue(u"Alignment"_ustr) >>= aLegendPosition)
&& chart::ChartLegendPosition_NONE != aLegendPosition )
{
double fFontHeight = 6.0;
- if( xLegendProp->getPropertyValue("CharHeight") >>= fFontHeight )
+ if( xLegendProp->getPropertyValue(u"CharHeight"_ustr) >>= fFontHeight )
fScale = 0.75*fFontHeight/6.0;
}
else
@@ -133,7 +133,7 @@ void lcl_setAutomaticSymbolSize( const uno::Reference< beans::XPropertySet >& xS
aSymbolSize.Width = aSymbolSize.Height;
}
}
- xSeriesOrPointProp->setPropertyValue("SymbolSize",uno::Any( aSymbolSize ));
+ xSeriesOrPointProp->setPropertyValue(u"SymbolSize"_ustr,uno::Any( aSymbolSize ));
}
void lcl_setSymbolSizeIfNeeded( const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp, const SvXMLImport& rImport )
@@ -142,7 +142,7 @@ void lcl_setSymbolSizeIfNeeded( const uno::Reference< beans::XPropertySet >& xSe
return;
sal_Int32 nSymbolType = chart::ChartSymbolType::NONE;
- if( !(xSeriesOrPointProp.is() && ( xSeriesOrPointProp->getPropertyValue("SymbolType") >>= nSymbolType)) )
+ if( !(xSeriesOrPointProp.is() && ( xSeriesOrPointProp->getPropertyValue(u"SymbolType"_ustr) >>= nSymbolType)) )
return;
if(chart::ChartSymbolType::NONE!=nSymbolType)
@@ -150,7 +150,7 @@ void lcl_setSymbolSizeIfNeeded( const uno::Reference< beans::XPropertySet >& xSe
if( chart::ChartSymbolType::BITMAPURL==nSymbolType )
{
//set special size for graphics to indicate to use the bitmap size itself
- xSeriesOrPointProp->setPropertyValue("SymbolSize",uno::Any( awt::Size(-1,-1) ));
+ xSeriesOrPointProp->setPropertyValue(u"SymbolSize"_ustr,uno::Any( awt::Size(-1,-1) ));
}
else
{
@@ -178,11 +178,11 @@ void lcl_setLinkNumberFormatToSourceIfNeeded( const uno::Reference< beans::XProp
return;
bool bLinkToSource = false;
- if( xPointProp.is() && (xPointProp->getPropertyValue("LinkNumberFormatToSource") >>= bLinkToSource) )
+ if( xPointProp.is() && (xPointProp->getPropertyValue(u"LinkNumberFormatToSource"_ustr) >>= bLinkToSource) )
{
if( bLinkToSource )
{
- xPointProp->setPropertyValue("LinkNumberFormatToSource", uno::Any(false));
+ xPointProp->setPropertyValue(u"LinkNumberFormatToSource"_ustr, uno::Any(false));
}
}
}
@@ -192,7 +192,7 @@ void lcl_insertErrorBarLSequencesToMap(
const uno::Reference< beans::XPropertySet > & xSeriesProp )
{
Reference< chart2::data::XDataSource > xErrorBarSource;
- if( ( xSeriesProp->getPropertyValue( "ErrorBarY" ) >>= xErrorBarSource ) &&
+ if( ( xSeriesProp->getPropertyValue( u"ErrorBarY"_ustr ) >>= xErrorBarSource ) &&
xErrorBarSource.is() )
{
const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSequences(
@@ -226,7 +226,7 @@ Reference< chart2::data::XLabeledDataSequence2 > lcl_createAndAddSequenceToSerie
Reference< chart2::data::XDataSequence > xSeq = SchXMLTools::CreateDataSequence( rRange, xChartDoc );
Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY );
if( xSeqProp.is())
- xSeqProp->setPropertyValue("Role", uno::Any( rRole));
+ xSeqProp->setPropertyValue(u"Role"_ustr, uno::Any( rRole));
xLabeledSeq->setValues( xSeq );
// add new sequence to data series / push to front to have the correct sequence order if charttype is changed afterwards
@@ -410,18 +410,18 @@ void SchXMLSeries2Context::startFastElement (sal_Int32 /*Element*/,
if (xSeriesProp.is())
{
if (bHideLegend)
- xSeriesProp->setPropertyValue("ShowLegendEntry", uno::Any(false));
+ xSeriesProp->setPropertyValue(u"ShowLegendEntry"_ustr, uno::Any(false));
if( bIsCandleStick )
{
// set default color for range-line to black (before applying styles)
- xSeriesProp->setPropertyValue("Color",
+ xSeriesProp->setPropertyValue(u"Color"_ustr,
uno::Any( sal_Int32( 0x000000 ))); // black
}
else if ( maSeriesChartTypeName == "com.sun.star.chart2.PieChartType" )
{
//@todo: this property should be saved
- xSeriesProp->setPropertyValue("VaryColorsByPoint",
+ xSeriesProp->setPropertyValue(u"VaryColorsByPoint"_ustr,
uno::Any( true ));
}
@@ -446,10 +446,10 @@ void SchXMLSeries2Context::startFastElement (sal_Int32 /*Element*/,
Reference<beans::XPropertySet> xSeqProp(xSequenceValues, uno::UNO_QUERY);
if (xSeqProp.is())
{
- OUString aMainRole("values-y");
+ OUString aMainRole(u"values-y"_ustr);
if (maSeriesChartTypeName == "com.sun.star.chart2.BubbleChartType")
aMainRole = "values-size";
- xSeqProp->setPropertyValue("Role", uno::Any(aMainRole));
+ xSeqProp->setPropertyValue(u"Role"_ustr, uno::Any(aMainRole));
}
xLabeledSeq->setValues(xSequenceValues);
@@ -478,9 +478,9 @@ void SchXMLSeries2Context::startFastElement (sal_Int32 /*Element*/,
//Labels should always include hidden cells
Reference<beans::XPropertySet> xSeqLabelProp(xSequenceLabel, uno::UNO_QUERY);
- if (xSeqLabelProp.is() && xSeqLabelProp->getPropertySetInfo()->hasPropertyByName("IncludeHiddenCells"))
+ if (xSeqLabelProp.is() && xSeqLabelProp->getPropertySetInfo()->hasPropertyByName(u"IncludeHiddenCells"_ustr))
{
- xSeqLabelProp->setPropertyValue( "IncludeHiddenCells", uno::Any(true));
+ xSeqLabelProp->setPropertyValue( u"IncludeHiddenCells"_ustr, uno::Any(true));
}
xLabeledSeq->setLabel(xSequenceLabel);
@@ -553,7 +553,7 @@ void SchXMLSeries2Context::endFastElement(sal_Int32 )
//different handling for different chart types necessary
if( bIsScatterChart || ( nDomainCount==1 && !bIsBubbleChart ) )
{
- DomainInfo aDomainInfo( "values-x", m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
+ DomainInfo aDomainInfo( u"values-x"_ustr, m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
bool bCreateXValues = true;
if( !maDomainAddresses.empty() )
{
@@ -586,7 +586,7 @@ void SchXMLSeries2Context::endFastElement(sal_Int32 )
{
if( nDomainCount>1 )
{
- DomainInfo aDomainInfo( "values-x", maDomainAddresses[1], m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
+ DomainInfo aDomainInfo( u"values-x"_ustr, maDomainAddresses[1], m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
if( m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.isEmpty() )
{
//for bubble chart the second domain contains the x values which should become an index smaller than y values for own data table
@@ -599,12 +599,12 @@ void SchXMLSeries2Context::endFastElement(sal_Int32 )
}
else if( !m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.isEmpty() )
{
- DomainInfo aDomainInfo( "values-x", m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress, m_rGlobalSeriesImportInfo.nFirstSecondDomainIndex ) ;
+ DomainInfo aDomainInfo( u"values-x"_ustr, m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress, m_rGlobalSeriesImportInfo.nFirstSecondDomainIndex ) ;
aDomainInfos.push_back( aDomainInfo );
}
if( nDomainCount>0)
{
- DomainInfo aDomainInfo( "values-y", maDomainAddresses.front(), m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
+ DomainInfo aDomainInfo( u"values-y"_ustr, maDomainAddresses.front(), m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
if( m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.isEmpty() )
{
m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress = maDomainAddresses.front();
@@ -615,7 +615,7 @@ void SchXMLSeries2Context::endFastElement(sal_Int32 )
}
else if( !m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.isEmpty() )
{
- DomainInfo aDomainInfo( "values-y", m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
+ DomainInfo aDomainInfo( u"values-y"_ustr, m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
aDomainInfos.push_back( aDomainInfo );
}
}
@@ -785,27 +785,27 @@ void SchXMLSeries2Context::setDefaultsToSeries( SeriesDefaultsAndStyles& rSeries
continue;
if( rSeriesDefaultsAndStyles.maSymbolTypeDefault.hasValue() )
- xSeries->setPropertyValue("SymbolType",rSeriesDefaultsAndStyles.maSymbolTypeDefault);
+ xSeries->setPropertyValue(u"SymbolType"_ustr,rSeriesDefaultsAndStyles.maSymbolTypeDefault);
if( rSeriesDefaultsAndStyles.maDataCaptionDefault.hasValue() )
- xSeries->setPropertyValue("DataCaption",rSeriesDefaultsAndStyles.maDataCaptionDefault);
+ xSeries->setPropertyValue(u"DataCaption"_ustr,rSeriesDefaultsAndStyles.maDataCaptionDefault);
if( rSeriesDefaultsAndStyles.maErrorIndicatorDefault.hasValue() )
- xSeries->setPropertyValue("ErrorIndicator",rSeriesDefaultsAndStyles.maErrorIndicatorDefault);
+ xSeries->setPropertyValue(u"ErrorIndicator"_ustr,rSeriesDefaultsAndStyles.maErrorIndicatorDefault);
if( rSeriesDefaultsAndStyles.maErrorCategoryDefault.hasValue() )
- xSeries->setPropertyValue("ErrorCategory",rSeriesDefaultsAndStyles.maErrorCategoryDefault);
+ xSeries->setPropertyValue(u"ErrorCategory"_ustr,rSeriesDefaultsAndStyles.maErrorCategoryDefault);
if( rSeriesDefaultsAndStyles.maConstantErrorLowDefault.hasValue() )
- xSeries->setPropertyValue("ConstantErrorLow",rSeriesDefaultsAndStyles.maConstantErrorLowDefault);
+ xSeries->setPropertyValue(u"ConstantErrorLow"_ustr,rSeriesDefaultsAndStyles.maConstantErrorLowDefault);
if( rSeriesDefaultsAndStyles.maConstantErrorHighDefault.hasValue() )
- xSeries->setPropertyValue("ConstantErrorHigh",rSeriesDefaultsAndStyles.maConstantErrorHighDefault);
+ xSeries->setPropertyValue(u"ConstantErrorHigh"_ustr,rSeriesDefaultsAndStyles.maConstantErrorHighDefault);
if( rSeriesDefaultsAndStyles.maPercentageErrorDefault.hasValue() )
- xSeries->setPropertyValue("PercentageError",rSeriesDefaultsAndStyles.maPercentageErrorDefault);
+ xSeries->setPropertyValue(u"PercentageError"_ustr,rSeriesDefaultsAndStyles.maPercentageErrorDefault);
if( rSeriesDefaultsAndStyles.maErrorMarginDefault.hasValue() )
- xSeries->setPropertyValue("ErrorMargin",rSeriesDefaultsAndStyles.maErrorMarginDefault);
+ xSeries->setPropertyValue(u"ErrorMargin"_ustr,rSeriesDefaultsAndStyles.maErrorMarginDefault);
if( rSeriesDefaultsAndStyles.maMeanValueDefault.hasValue() )
- xSeries->setPropertyValue("MeanValue",rSeriesDefaultsAndStyles.maMeanValueDefault);
+ xSeries->setPropertyValue(u"MeanValue"_ustr,rSeriesDefaultsAndStyles.maMeanValueDefault);
if( rSeriesDefaultsAndStyles.maRegressionCurvesDefault.hasValue() )
- xSeries->setPropertyValue("RegressionCurves",rSeriesDefaultsAndStyles.maRegressionCurvesDefault);
+ xSeries->setPropertyValue(u"RegressionCurves"_ustr,rSeriesDefaultsAndStyles.maRegressionCurvesDefault);
}
catch( uno::Exception & )
{
@@ -857,7 +857,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe
if( seriesStyle.mnAttachedAxis != 1 )
{
- xSeriesProp->setPropertyValue("Axis"
+ xSeriesProp->setPropertyValue(u"Axis"_ustr
, uno::Any(chart::ChartAxisAssign::SECONDARY_Y) );
}
@@ -1038,10 +1038,10 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles
uno::Reference< beans::XPropertySet > xNewSeriesProp(seriesStyle.m_xSeries,uno::UNO_QUERY);
if (seriesStyle.m_xErrorXProperties.is())
- xNewSeriesProp->setPropertyValue("ErrorBarX",uno::Any(seriesStyle.m_xErrorXProperties));
+ xNewSeriesProp->setPropertyValue(u"ErrorBarX"_ustr,uno::Any(seriesStyle.m_xErrorXProperties));
if (seriesStyle.m_xErrorYProperties.is())
- xNewSeriesProp->setPropertyValue("ErrorBarY",uno::Any(seriesStyle.m_xErrorYProperties));
+ xNewSeriesProp->setPropertyValue(u"ErrorBarY"_ustr,uno::Any(seriesStyle.m_xErrorYProperties));
}
try
@@ -1069,10 +1069,10 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles
switch( seriesStyle.meType )
{
case DataRowPointStyle::MEAN_VALUE:
- xSeriesProp->getPropertyValue("DataMeanValueProperties") >>= xStatPropSet;
+ xSeriesProp->getPropertyValue(u"DataMeanValueProperties"_ustr) >>= xStatPropSet;
break;
case DataRowPointStyle::ERROR_INDICATOR:
- xSeriesProp->getPropertyValue("DataErrorProperties") >>= xStatPropSet;
+ xSeriesProp->getPropertyValue(u"DataErrorProperties"_ustr) >>= xStatPropSet;
break;
default:
break;
@@ -1153,7 +1153,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
{
//need to set this explicitly here for old files as the new api does not support this property fully anymore
if( bSwitchOffLinesForScatter )
- xPointProp->setPropertyValue("Lines",uno::Any(false));
+ xPointProp->setPropertyValue(u"Lines"_ustr,uno::Any(false));
}
catch( const uno::Exception & )
{
@@ -1260,8 +1260,8 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
}
}
- xPointProp->setPropertyValue("CustomLabelFields", uno::Any(xLabels));
- xPointProp->setPropertyValue("DataCaption", uno::Any(chart::ChartDataCaption::CUSTOM));
+ xPointProp->setPropertyValue(u"CustomLabelFields"_ustr, uno::Any(xLabels));
+ xPointProp->setPropertyValue(u"DataCaption"_ustr, uno::Any(chart::ChartDataCaption::CUSTOM));
}
if( seriesStyle.mCustomLabelPos[0] != 0.0 || seriesStyle.mCustomLabelPos[1] != 0.0 )
@@ -1269,7 +1269,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
chart2::RelativePosition aCustomlabelPosition;
aCustomlabelPosition.Primary = seriesStyle.mCustomLabelPos[0];
aCustomlabelPosition.Secondary = seriesStyle.mCustomLabelPos[1];
- xPointProp->setPropertyValue("CustomLabelPosition", uno::Any(aCustomlabelPosition));
+ xPointProp->setPropertyValue(u"CustomLabelPosition"_ustr, uno::Any(aCustomlabelPosition));
}
}
catch( const uno::Exception & )
@@ -1295,7 +1295,7 @@ void SchXMLSeries2Context::switchSeriesLinesOff( ::std::vector< DataRowPointStyl
if( !xSeries.is() )
continue;
- xSeries->setPropertyValue("Lines",uno::Any(false));
+ xSeries->setPropertyValue(u"Lines"_ustr,uno::Any(false));
}
catch( uno::Exception & )
{
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index 98b88e36c61c..21f0c14e77f7 100644
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -166,7 +166,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp
uno::Reference< lang::XMultiServiceFactory > xFactory( xChartModel, uno::UNO_QUERY );
if( xFactory.is() )
{
- xRet.set( xFactory->createInstance( "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
+ xRet.set( xFactory->createInstance( u"com.sun.star.comp.chart2.DataSeriesWrapper"_ustr ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{
@@ -198,7 +198,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP
uno::Reference< lang::XMultiServiceFactory > xFactory( xChartModel, uno::UNO_QUERY );
if( xFactory.is() )
{
- xRet.set( xFactory->createInstance( "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
+ xRet.set( xFactory->createInstance( u"com.sun.star.comp.chart2.DataSeriesWrapper"_ustr ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 5aa095211de9..8a40e1e53997 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -763,8 +763,8 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
try
{
Reference< beans::XPropertySet > xProps( xChartDoc, uno::UNO_QUERY_THROW );
- xProps->setPropertyValue( "DisableDataTableDialog", uno::Any( true ) );
- xProps->setPropertyValue( "DisableComplexChartTypes", uno::Any( true ) );
+ xProps->setPropertyValue( u"DisableDataTableDialog"_ustr, uno::Any( true ) );
+ xProps->setPropertyValue( u"DisableComplexChartTypes"_ustr, uno::Any( true ) );
}
catch ( uno::Exception& )
{
@@ -836,7 +836,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
{
Reference< beans::XPropertySet > xOldSequenceProp( rLSeq.second->getValues(), uno::UNO_QUERY );
Reference< chart2::data::XDataSequence > xNewSequence(
- xDataProv->createDataSequenceByRangeRepresentation("categories"));
+ xDataProv->createDataSequenceByRangeRepresentation(u"categories"_ustr));
SchXMLTools::copyProperties(
xOldSequenceProp, Reference< beans::XPropertySet >( xNewSequence, uno::UNO_QUERY ));
rLSeq.second->setValues( xNewSequence );
@@ -894,7 +894,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
if( ! bCategoriesApplied )
{
SchXMLTools::CreateCategories(
- xDataProv, xChartDoc, "categories",
+ xDataProv, xChartDoc, u"categories"_ustr,
0 /* nCooSysIndex */, 0 /* nDimension */ );
}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 42d93685342c..dd5d2c1bbf0c 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -370,7 +370,7 @@ Reference< chart2::data::XDataSequence > CreateDataSequence(
try
{
bool bVal = false;
- uno::Any any = xPropSet->getPropertyValue("UseInternalDataProvider");
+ uno::Any any = xPropSet->getPropertyValue(u"UseInternalDataProvider"_ustr);
if (any >>= bVal)
bUseInternal = bVal;
}
@@ -614,8 +614,8 @@ void exportFormattedText( SvXMLExport& rExport, const uno::Reference< beans::XPr
if (xTitleProps.is())
{
OUString aTitle;
- if ((xTitleProps->getPropertyValue("String") >>= aTitle) && !aTitle.isEmpty())
- xTitleProps->getPropertyValue("FormattedStrings") >>= xFormattedTitle;
+ if ((xTitleProps->getPropertyValue(u"String"_ustr) >>= aTitle) && !aTitle.isEmpty())
+ xTitleProps->getPropertyValue(u"FormattedStrings"_ustr) >>= xFormattedTitle;
}
if (xFormattedTitle.hasElements())
@@ -650,7 +650,7 @@ void importFormattedText( SvXMLImport& rImport, const std::vector<std::pair<OUSt
try
{
- if ((xTitleProp->getPropertyValue("FormattedStrings") >>= xFullTextTitle) &&
+ if ((xTitleProp->getPropertyValue(u"FormattedStrings"_ustr) >>= xFullTextTitle) &&
xFullTextTitle.hasElements())
{
// these are the properties from the textshape object - needs to apply them
@@ -689,7 +689,7 @@ void importFormattedText( SvXMLImport& rImport, const std::vector<std::pair<OUSt
uno::Sequence< Reference< chart2::XFormattedString > > aStringSeq =
comphelper::containerToSequence(aStringVec);
- xTitleProp->setPropertyValue("FormattedStrings", uno::Any(aStringSeq));
+ xTitleProp->setPropertyValue(u"FormattedStrings"_ustr, uno::Any(aStringSeq));
}
catch (const beans::UnknownPropertyException&)
{
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
index 0e41ea40202d..521c3d79bb60 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -99,8 +99,8 @@ void XMLChartStyleContext::FillPropertySet(
TOOLS_WARN_EXCEPTION( "xmloff", "unknown property exception -> shape style not completely imported for chart style" );
}
- lcl_NumberFormatStyleToProperty( msDataStyleName, "NumberFormat", mrStyles, rPropSet );
- lcl_NumberFormatStyleToProperty( msPercentageDataStyleName, "PercentageNumberFormat", mrStyles, rPropSet );
+ lcl_NumberFormatStyleToProperty( msDataStyleName, u"NumberFormat"_ustr, mrStyles, rPropSet );
+ lcl_NumberFormatStyleToProperty( msPercentageDataStyleName, u"PercentageNumberFormat"_ustr, mrStyles, rPropSet );
}
css::uno::Reference< css::xml::sax::XFastContextHandler > XMLChartStyleContext::createFastChildContext(
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index 4e4dd330b09f..edd65fc60640 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -582,7 +582,7 @@ void XMLConfigItemMapIndexedContext::endFastElement(sal_Int32 )
uno::Reference< lang::XMultiServiceFactory > xFac( GetImport().GetModel(), uno::UNO_QUERY );
if( xFac.is() )
{
- uno::Reference< beans::XPropertySet > xProps( xFac->createInstance( "com.sun.star.document.Settings" ), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xProps( xFac->createInstance( u"com.sun.star.document.Settings"_ustr ), uno::UNO_QUERY );
if( xProps.is() && xProps->getPropertySetInfo()->hasPropertyByName( maConfigItemName ) )
{
xProps->getPropertyValue( maConfigItemName ) >>= xForbChars;
diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx
index 40f08a13f200..3e575869b476 100644
--- a/xmloff/source/core/RDFaExportHelper.cxx
+++ b/xmloff/source/core/RDFaExportHelper.cxx
@@ -162,7 +162,7 @@ RDFaExportHelper::AddRDFa(
OUStringBuffer property;
::comphelper::intersperse(curies.begin(), curies.end(),
::comphelper::OUStringBufferAppender(property),
- OUString(" "));
+ u" "_ustr);
m_rExport.AddAttribute(XML_NAMESPACE_XHTML, token::XML_PROPERTY,
property.makeStringAndClear());
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index 648a5d3a2e13..91b4ce443561 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -409,7 +409,7 @@ void XMLSettingsExportHelper::exportIndexAccess(
sal_Int32 nCount = rIndexed->getCount();
for (sal_Int32 i = 0; i < nCount; i++)
{
- exportMapEntry(rIndexed->getByIndex(i), "", false);
+ exportMapEntry(rIndexed->getByIndex(i), u""_ustr, false);
}
m_rContext.EndElement( true );
}
@@ -492,11 +492,11 @@ void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, std::u16string_
if( rAny >>= nTmp )
{
if( nTmp == document::PrinterIndependentLayout::LOW_RESOLUTION )
- rAny <<= OUString("low-resolution");
+ rAny <<= u"low-resolution"_ustr;
else if( nTmp == document::PrinterIndependentLayout::DISABLED )
- rAny <<= OUString("disabled");
+ rAny <<= u"disabled"_ustr;
else if( nTmp == document::PrinterIndependentLayout::HIGH_RESOLUTION )
- rAny <<= OUString("high-resolution");
+ rAny <<= u"high-resolution"_ustr;
}
}
else if( (rName == gsColorTableURL) || (rName == gsLineEndTableURL) || (rName == gsHatchTableURL) ||
diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx
index d3a4f5550eee..932a60757505 100644
--- a/xmloff/source/core/unoatrcn.cxx
+++ b/xmloff/source/core/unoatrcn.cxx
@@ -214,12 +214,12 @@ void SAL_CALL SvUnoAttributeContainer::removeByName(const OUString& Name)
//XServiceInfo
OUString SAL_CALL SvUnoAttributeContainer::getImplementationName()
{
- return "SvUnoAttributeContainer";
+ return u"SvUnoAttributeContainer"_ustr;
}
uno::Sequence< OUString > SvUnoAttributeContainer::getSupportedServiceNames()
{
- return { "com.sun.star.xml.AttributeContainer" };
+ return { u"com.sun.star.xml.AttributeContainer"_ustr };
}
sal_Bool SvUnoAttributeContainer::supportsService(const OUString& ServiceName)
diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx
index bddd1f115d62..75315f78e077 100644
--- a/xmloff/source/core/xmlerror.cxx
+++ b/xmloff/source/core/xmlerror.cxx
@@ -178,7 +178,7 @@ void XMLErrors::AddRecord(
else
{
AddRecord( nId, rParams, rExceptionMessage,
- -1, -1, "", "" );
+ -1, -1, u""_ustr, u""_ustr );
}
}
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index a07e759d61ee..d1ff0d0f7650 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -625,7 +625,7 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo
try
{
Reference < XInterface > xIfc =
- xFactory->createInstance("com.sun.star.xml.NamespaceMap");
+ xFactory->createInstance(u"com.sun.star.xml.NamespaceMap"_ustr);
if( xIfc.is() )
{
Reference< XNameAccess > xNamespaceMap( xIfc, UNO_QUERY );
@@ -741,7 +741,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen
aAny >>= mpImpl->mbOutlineStyleAsNormalListStyle;
}
- OUString sTargetStorage( "TargetStorage" );
+ OUString sTargetStorage( u"TargetStorage"_ustr );
if( xPropertySetInfo->hasPropertyByName( sTargetStorage ) )
mxExportInfo->getPropertyValue( sTargetStorage ) >>= mpImpl->mxTargetStorage;
@@ -862,7 +862,7 @@ sal_Bool SAL_CALL SvXMLExport::supportsService( const OUString& rServiceName )
uno::Sequence< OUString > SAL_CALL SvXMLExport::getSupportedServiceNames( )
{
- return { "com.sun.star.document.ExportFilter", "com.sun.star.xml.XMLExportFilter" };
+ return { u"com.sun.star.document.ExportFilter"_ustr, u"com.sun.star.xml.XMLExportFilter"_ustr };
}
OUString
@@ -1100,8 +1100,8 @@ void SvXMLExport::ImplExportStyles()
void SvXMLExport::ImplExportAutoStyles()
{
// transfer style names (+ families) FROM other components (if appropriate)
- OUString sStyleNames( "StyleNames" );
- OUString sStyleFamilies( "StyleFamilies" );
+ OUString sStyleNames( u"StyleNames"_ustr );
+ OUString sStyleFamilies( u"StyleFamilies"_ustr );
if( ( !( mnExportFlags & SvXMLExportFlags::STYLES ) )
&& mxExportInfo.is()
&& mxExportInfo->getPropertySetInfo()->hasPropertyByName( sStyleNames )
@@ -1240,14 +1240,14 @@ ErrCode SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
{
if (!mxGraphicStorageHandler.is())
{
- mxGraphicStorageHandler.set(xFactory->createInstance( "com.sun.star.document.ExportGraphicStorageHandler"), UNO_QUERY);
+ mxGraphicStorageHandler.set(xFactory->createInstance( u"com.sun.star.document.ExportGraphicStorageHandler"_ustr), UNO_QUERY);
bOwnGraphicResolver = mxGraphicStorageHandler.is();
}
if( !mxEmbeddedResolver.is() )
{
mxEmbeddedResolver.set(
- xFactory->createInstance( "com.sun.star.document.ExportEmbeddedObjectResolver" ), UNO_QUERY);
+ xFactory->createInstance( u"com.sun.star.document.ExportEmbeddedObjectResolver"_ustr ), UNO_QUERY);
bOwnEmbeddedResolver = mxEmbeddedResolver.is();
}
}
@@ -1262,7 +1262,7 @@ ErrCode SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
{
static ::comphelper::PropertyMapEntry const aInfoMap[] =
{
- { OUString("Class"), 0,
+ { u"Class"_ustr, 0,
::cppu::UnoType<OUString>::get(),
PropertyAttribute::MAYBEVOID, 0},
};
@@ -1270,7 +1270,7 @@ ErrCode SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
::comphelper::GenericPropertySet_CreateInstance(
new ::comphelper::PropertySetInfo( aInfoMap ) ) );
- xConvPropSet->setPropertyValue( "Class", Any(GetXMLToken( eClass )) );
+ xConvPropSet->setPropertyValue( u"Class"_ustr, Any(GetXMLToken( eClass )) );
Reference< XPropertySet > xPropSet =
mxExportInfo.is()
@@ -1281,7 +1281,7 @@ ErrCode SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
Sequence<Any> aArgs{ Any(mxHandler), Any(xPropSet), Any(mxModel) };
// get filter component
Reference< xml::sax::XDocumentHandler > xTmpDocHandler(
- m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.comp.Oasis2OOoTransformer", aArgs, m_xContext),
+ m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(u"com.sun.star.comp.Oasis2OOoTransformer"_ustr, aArgs, m_xContext),
UNO_QUERY);
SAL_WARN_IF(!xTmpDocHandler.is(), "xmloff.core", "can't instantiate OASIS transformer component" );
if( xTmpDocHandler.is() )
@@ -1472,7 +1472,7 @@ void SvXMLExport::ExportScripts_()
{
Reference< beans::XPropertySet > xPSet( mxModel, UNO_QUERY );
if ( xPSet.is() )
- xPSet->getPropertyValue("BasicLibraries");
+ xPSet->getPropertyValue(u"BasicLibraries"_ustr);
}
Reference < XDocumentHandler > xHdl( new XMLBasicExportFilter( mxHandler ) );
@@ -1503,7 +1503,7 @@ void SvXMLExport::ExportStyles_( bool )
// export (fill-)gradient-styles
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 );
if( xGradient.is() )
{
XMLGradientStyleExport aGradientStyle( *this );
@@ -1533,7 +1533,7 @@ void SvXMLExport::ExportStyles_( bool )
// export (fill-)hatch-styles
try
{
- uno::Reference< container::XNameAccess > xHatch( xFact->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xHatch( xFact->createInstance(u"com.sun.star.drawing.HatchTable"_ustr), uno::UNO_QUERY );
if( xHatch.is() )
{
XMLHatchStyleExport aHatchStyle( *this );
@@ -1562,7 +1562,7 @@ void SvXMLExport::ExportStyles_( bool )
// export (fill-)bitmap-styles
try
{
- uno::Reference< container::XNameAccess > xBitmap( xFact->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xBitmap( xFact->createInstance(u"com.sun.star.drawing.BitmapTable"_ustr), uno::UNO_QUERY );
if( xBitmap.is() )
{
if( xBitmap->hasElements() )
@@ -1590,7 +1590,7 @@ void SvXMLExport::ExportStyles_( bool )
// export transparency-gradient -styles
try
{
- uno::Reference< container::XNameAccess > xTransGradient( xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xTransGradient( xFact->createInstance(u"com.sun.star.drawing.TransparencyGradientTable"_ustr), uno::UNO_QUERY );
if( xTransGradient.is() )
{
XMLTransGradientStyleExport aTransGradientstyle( *this );
@@ -1620,7 +1620,7 @@ void SvXMLExport::ExportStyles_( bool )
// export marker-styles
try
{
- uno::Reference< container::XNameAccess > xMarker( xFact->createInstance("com.sun.star.drawing.MarkerTable"), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xMarker( xFact->createInstance(u"com.sun.star.drawing.MarkerTable"_ustr), uno::UNO_QUERY );
if( xMarker.is() )
{
XMLMarkerStyleExport aMarkerStyle( *this );
@@ -1650,7 +1650,7 @@ void SvXMLExport::ExportStyles_( bool )
// export dash-styles
try
{
- uno::Reference< container::XNameAccess > xDashes( xFact->createInstance("com.sun.star.drawing.DashTable"), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xDashes( xFact->createInstance(u"com.sun.star.drawing.DashTable"_ustr), uno::UNO_QUERY );
if( xDashes.is() )
{
XMLDashStyleExport aDashStyle( *this );
@@ -1807,7 +1807,7 @@ void SvXMLExport::GetViewSettingsAndViews(uno::Sequence<beans::PropertyValue>& r
{
sal_Int32 nOldLength(rProps.getLength());
rProps.realloc(nOldLength + 1);
- rProps.getArray()[nOldLength] = comphelper::makePropertyValue("Views", xIndexAccess);
+ rProps.getArray()[nOldLength] = comphelper::makePropertyValue(u"Views"_ustr, xIndexAccess);
}
}
@@ -1834,7 +1834,7 @@ void SvXMLExport::collectDataStyles(bool bFromUsedStyles)
if (!xStylesFamilies.is())
return;
- Reference<container::XIndexAccess> xCellStyles(xStylesFamilies->getByName("CellStyles"), uno::UNO_QUERY);
+ Reference<container::XIndexAccess> xCellStyles(xStylesFamilies->getByName(u"CellStyles"_ustr), uno::UNO_QUERY);
if (!xCellStyles.is())
return;
@@ -1849,7 +1849,7 @@ void SvXMLExport::collectDataStyles(bool bFromUsedStyles)
if (xCellProperties.is())
{
sal_Int32 nNumberFormat = 0;
- if (xCellProperties->getPropertyValue("NumberFormat") >>= nNumberFormat)
+ if (xCellProperties->getPropertyValue(u"NumberFormat"_ustr) >>= nNumberFormat)
addDataStyle(nNumberFormat);
}
}
@@ -2053,8 +2053,8 @@ XMLEventExport& SvXMLExport::GetEventExport()
mpEventExport.reset( new XMLEventExport(*this) );
// and register standard handlers + names
- mpEventExport->AddHandler("StarBasic", std::make_unique<XMLStarBasicExportHandler>());
- mpEventExport->AddHandler("Script", std::make_unique<XMLScriptExportHandler>());
+ mpEventExport->AddHandler(u"StarBasic"_ustr, std::make_unique<XMLStarBasicExportHandler>());
+ mpEventExport->AddHandler(u"Script"_ustr, std::make_unique<XMLScriptExportHandler>());
mpEventExport->AddTranslationTable(aStandardEventTable);
}
@@ -2292,7 +2292,7 @@ void SvXMLExport::SetError(
sal_Int32 nId,
const Sequence<OUString>& rMsgParams)
{
- SetError( nId, rMsgParams, "", nullptr );
+ SetError( nId, rMsgParams, u""_ustr, nullptr );
}
void SvXMLExport::DisposingModel()
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 628f19a85b68..b39775f0699d 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -136,10 +136,10 @@ getBuildIdsProperty(uno::Reference<beans::XPropertySet> const& xImportInfo)
{
Reference< XPropertySetInfo > const xSetInfo(
xImportInfo->getPropertySetInfo());
- if (xSetInfo.is() && xSetInfo->hasPropertyByName("BuildId"))
+ if (xSetInfo.is() && xSetInfo->hasPropertyByName(u"BuildId"_ustr))
{
OUString aBuildId;
- xImportInfo->getPropertyValue("BuildId") >>= aBuildId;
+ xImportInfo->getPropertyValue(u"BuildId"_ustr) >>= aBuildId;
return aBuildId;
}
}
@@ -358,7 +358,7 @@ public:
SAL_WARN_IF(!mxComponentContext.is(), "xmloff.core", "SvXMLImport: no ComponentContext");
if (!mxComponentContext.is()) throw uno::RuntimeException();
if (!maSupportedServiceNames.hasElements())
- maSupportedServiceNames = { "com.sun.star.document.ImportFilter", "com.sun.star.xml.XMLImportFilter" };
+ maSupportedServiceNames = { u"com.sun.star.document.ImportFilter"_ustr, u"com.sun.star.xml.XMLImportFilter"_ustr };
}
sal_uInt16 getGeneratorVersion( const SvXMLImport& rImport )
@@ -388,41 +388,41 @@ void SvXMLImport::InitCtor_()
{
// implicit "xml" namespace prefix
mxNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML), XML_NAMESPACE_XML );
- mxNamespaceMap->Add( "_office", GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
- mxNamespaceMap->Add( "_office_ooo", GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT );
- mxNamespaceMap->Add( "_ooo", GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO );
- mxNamespaceMap->Add( "_style", GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
- mxNamespaceMap->Add( "_text", GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
- mxNamespaceMap->Add( "_table", GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
- mxNamespaceMap->Add( "_table_ooo", GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT );
- mxNamespaceMap->Add( "_draw", GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
- mxNamespaceMap->Add( "_draw_ooo", GetXMLToken(XML_N_DRAW_EXT), XML_NAMESPACE_DRAW_EXT );
- mxNamespaceMap->Add( "_dr3d", GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
- mxNamespaceMap->Add( "_fo", GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
- mxNamespaceMap->Add( "_xlink", GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
- mxNamespaceMap->Add( "_dc", GetXMLToken(XML_N_DC), XML_NAMESPACE_DC );
- mxNamespaceMap->Add( "_dom", GetXMLToken(XML_N_DOM), XML_NAMESPACE_DOM );
- mxNamespaceMap->Add( "_meta", GetXMLToken(XML_N_META), XML_NAMESPACE_META );
- mxNamespaceMap->Add( "_number", GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
- mxNamespaceMap->Add( "_svg", GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
- mxNamespaceMap->Add( "_chart", GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
- mxNamespaceMap->Add( "_math", GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH );
- mxNamespaceMap->Add( "_form", GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
- mxNamespaceMap->Add( "_script", GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
- mxNamespaceMap->Add( "_config", GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
- mxNamespaceMap->Add( "_xforms", GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
- mxNamespaceMap->Add( "_formx", GetXMLToken( XML_N_FORMX ), XML_NAMESPACE_FORMX );
- mxNamespaceMap->Add( "_xsd", GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
- mxNamespaceMap->Add( "_xsi", GetXMLToken(XML_N_XSI), XML_NAMESPACE_XFORMS );
- mxNamespaceMap->Add( "_ooow", GetXMLToken(XML_N_OOOW), XML_NAMESPACE_OOOW );
- mxNamespaceMap->Add( "_oooc", GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
- mxNamespaceMap->Add( "_field", GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
- mxNamespaceMap->Add( "_of", GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
- mxNamespaceMap->Add( "_xhtml", GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
- mxNamespaceMap->Add( "_css3text", GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
-
- mxNamespaceMap->Add( "_calc_libo", GetXMLToken(XML_N_CALC_EXT), XML_NAMESPACE_CALC_EXT);
- mxNamespaceMap->Add( "_office_libo",
+ mxNamespaceMap->Add( u"_office"_ustr, GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
+ mxNamespaceMap->Add( u"_office_ooo"_ustr, GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT );
+ mxNamespaceMap->Add( u"_ooo"_ustr, GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO );
+ mxNamespaceMap->Add( u"_style"_ustr, GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
+ mxNamespaceMap->Add( u"_text"_ustr, GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
+ mxNamespaceMap->Add( u"_table"_ustr, GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
+ mxNamespaceMap->Add( u"_table_ooo"_ustr, GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT );
+ mxNamespaceMap->Add( u"_draw"_ustr, GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
+ mxNamespaceMap->Add( u"_draw_ooo"_ustr, GetXMLToken(XML_N_DRAW_EXT), XML_NAMESPACE_DRAW_EXT );
+ mxNamespaceMap->Add( u"_dr3d"_ustr, GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
+ mxNamespaceMap->Add( u"_fo"_ustr, GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
+ mxNamespaceMap->Add( u"_xlink"_ustr, GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
+ mxNamespaceMap->Add( u"_dc"_ustr, GetXMLToken(XML_N_DC), XML_NAMESPACE_DC );
+ mxNamespaceMap->Add( u"_dom"_ustr, GetXMLToken(XML_N_DOM), XML_NAMESPACE_DOM );
+ mxNamespaceMap->Add( u"_meta"_ustr, GetXMLToken(XML_N_META), XML_NAMESPACE_META );
+ mxNamespaceMap->Add( u"_number"_ustr, GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
+ mxNamespaceMap->Add( u"_svg"_ustr, GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
+ mxNamespaceMap->Add( u"_chart"_ustr, GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
+ mxNamespaceMap->Add( u"_math"_ustr, GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH );
+ mxNamespaceMap->Add( u"_form"_ustr, GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
+ mxNamespaceMap->Add( u"_script"_ustr, GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
+ mxNamespaceMap->Add( u"_config"_ustr, GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
+ mxNamespaceMap->Add( u"_xforms"_ustr, GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
+ mxNamespaceMap->Add( u"_formx"_ustr, GetXMLToken( XML_N_FORMX ), XML_NAMESPACE_FORMX );
+ mxNamespaceMap->Add( u"_xsd"_ustr, GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
+ mxNamespaceMap->Add( u"_xsi"_ustr, GetXMLToken(XML_N_XSI), XML_NAMESPACE_XFORMS );
+ mxNamespaceMap->Add( u"_ooow"_ustr, GetXMLToken(XML_N_OOOW), XML_NAMESPACE_OOOW );
+ mxNamespaceMap->Add( u"_oooc"_ustr, GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
+ mxNamespaceMap->Add( u"_field"_ustr, GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
+ mxNamespaceMap->Add( u"_of"_ustr, GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
+ mxNamespaceMap->Add( u"_xhtml"_ustr, GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
+ mxNamespaceMap->Add( u"_css3text"_ustr, GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
+
+ mxNamespaceMap->Add( u"_calc_libo"_ustr, GetXMLToken(XML_N_CALC_EXT), XML_NAMESPACE_CALC_EXT);
+ mxNamespaceMap->Add( u"_office_libo"_ustr,
GetXMLToken(XML_N_LO_EXT), XML_NAMESPACE_LO_EXT);
}
@@ -589,7 +589,7 @@ void SAL_CALL SvXMLImport::startDocument()
{
// #99870# Import... instead of Export...
mxGraphicStorageHandler.set(
- xFactory->createInstance("com.sun.star.document.ImportGraphicStorageHandler"),
+ xFactory->createInstance(u"com.sun.star.document.ImportGraphicStorageHandler"_ustr),
UNO_QUERY);
mpImpl->mbOwnGraphicResolver = mxGraphicStorageHandler.is();
}
@@ -598,7 +598,7 @@ void SAL_CALL SvXMLImport::startDocument()
{
// #99870# Import... instead of Export...
mxEmbeddedResolver.set(
- xFactory->createInstance("com.sun.star.document.ImportEmbeddedObjectResolver"),
+ xFactory->createInstance(u"com.sun.star.document.ImportEmbeddedObjectResolver"_ustr),
UNO_QUERY);
mpImpl->mbOwnEmbeddedResolver = mxEmbeddedResolver.is();
}
@@ -713,10 +713,10 @@ std::optional<SvXMLNamespaceMap> SvXMLImport::processNSAttributes(
if (pImport->mpImpl->mStreamName == "content.xml"
&& !pImport->IsODFVersionConsistent(*pImport->mpImpl->mxODFVersion))
{
- throw xml::sax::SAXException("Inconsistent ODF versions in content.xml and manifest.xml!",
+ throw xml::sax::SAXException(u"Inconsistent ODF versions in content.xml and manifest.xml!"_ustr,
uno::Reference< uno::XInterface >(),
uno::Any(
- packages::zip::ZipIOException("Inconsistent ODF versions in content.xml and manifest.xml!" ) ) );
+ packages::zip::ZipIOException(u"Inconsistent ODF versions in content.xml and manifest.xml!"_ustr ) ) );
}
}
else if( ( rAttrName.getLength() >= 5 ) &&
@@ -785,10 +785,10 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element,
// the ODF version in content.xml and manifest.xml must be the same starting from ODF1.2
if ( mpImpl->mStreamName == "content.xml" && !IsODFVersionConsistent( *mpImpl->mxODFVersion ) )
{
- throw xml::sax::SAXException("Inconsistent ODF versions in content.xml and manifest.xml!",
+ throw xml::sax::SAXException(u"Inconsistent ODF versions in content.xml and manifest.xml!"_ustr,
uno::Reference< uno::XInterface >(),
uno::Any(
- packages::zip::ZipIOException("Inconsistent ODF versions in content.xml and manifest.xml!" ) ) );
+ packages::zip::ZipIOException(u"Inconsistent ODF versions in content.xml and manifest.xml!"_ustr ) ) );
}
}
}
@@ -1066,7 +1066,7 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
}
uno::Reference<lang::XInitialization> const xInit(mxParser, uno::UNO_QUERY_THROW);
- xInit->initialize( { Any(OUString("IgnoreMissingNSDecl")) });
+ xInit->initialize( { Any(u"IgnoreMissingNSDecl"_ustr) });
}
// XServiceInfo
@@ -1130,7 +1130,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetGradientHelper()
try
{
mxGradientHelper.set( xServiceFact->createInstance(
- "com.sun.star.drawing.GradientTable" ), UNO_QUERY);
+ u"com.sun.star.drawing.GradientTable"_ustr ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
{}
@@ -1153,7 +1153,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetHatchHelper()
try
{
mxHatchHelper.set( xServiceFact->createInstance(
- "com.sun.star.drawing.HatchTable" ), UNO_QUERY);
+ u"com.sun.star.drawing.HatchTable"_ustr ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
{}
@@ -1176,7 +1176,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetBitmapHelper()
try
{
mxBitmapHelper.set( xServiceFact->createInstance(
- "com.sun.star.drawing.BitmapTable" ), UNO_QUERY);
+ u"com.sun.star.drawing.BitmapTable"_ustr ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
{}
@@ -1199,7 +1199,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetTransGradientHelp
try
{
mxTransGradientHelper.set( xServiceFact->createInstance(
- "com.sun.star.drawing.TransparencyGradientTable" ), UNO_QUERY);
+ u"com.sun.star.drawing.TransparencyGradientTable"_ustr ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
{}
@@ -1221,7 +1221,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetMarkerHelper()
{
try
{
- mxMarkerHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.MarkerTable" ), UNO_QUERY);
+ mxMarkerHelper.set( xServiceFact->createInstance( u"com.sun.star.drawing.MarkerTable"_ustr ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
{}
@@ -1241,7 +1241,7 @@ const Reference< container::XNameContainer > & SvXMLImport::GetDashHelper()
{
try
{
- mxDashHelper.set( xServiceFact->createInstance( "com.sun.star.drawing.DashTable" ), UNO_QUERY);
+ mxDashHelper.set( xServiceFact->createInstance( u"com.sun.star.drawing.DashTable"_ustr ), UNO_QUERY);
}
catch( lang::ServiceNotRegisteredException& )
{}
@@ -1383,7 +1383,7 @@ Reference < XOutputStream >
Reference< XNameAccess > xNA( mxEmbeddedResolver, UNO_QUERY );
if( xNA.is() )
{
- Any aAny = xNA->getByName( "Obj12345678" );
+ Any aAny = xNA->getByName( u"Obj12345678"_ustr );
aAny >>= xOLEStream;
}
}
@@ -1397,7 +1397,7 @@ OUString SvXMLImport::ResolveEmbeddedObjectURLFromBase64()
if( mxEmbeddedResolver.is() )
{
- sRet = mxEmbeddedResolver->resolveEmbeddedObjectURL( "Obj12345678" );
+ sRet = mxEmbeddedResolver->resolveEmbeddedObjectURL( u"Obj12345678"_ustr );
}
return sRet;
@@ -1412,7 +1412,7 @@ void SvXMLImport::AddStyleDisplayName( XmlStyleFamily nFamily,
mpStyleMap = new StyleMap;
if( mxImportInfo.is() )
{
- OUString sPrivateData( "PrivateData" );
+ OUString sPrivateData( u"PrivateData"_ustr );
Reference< beans::XPropertySetInfo > xPropertySetInfo =
mxImportInfo->getPropertySetInfo();
if( xPropertySetInfo.is() &&
@@ -1544,7 +1544,7 @@ XMLEventImportHelper& SvXMLImport::GetEventImport()
mpEventImportHelper->AddTranslationTable(aStandardEventTable);
// register StarBasic event handler with capitalized spelling
- mpEventImportHelper->RegisterFactory("StarBasic",
+ mpEventImportHelper->RegisterFactory(u"StarBasic"_ustr,
std::make_unique<XMLStarBasicContextFactory>());
}
@@ -1666,7 +1666,7 @@ bool SvXMLImport::IsODFVersionConsistent( const OUString& aODFVersion )
bool bRepairPackage = false;
try
{
- xStorProps->getPropertyValue( "RepairPackage" )
+ xStorProps->getPropertyValue( u"RepairPackage"_ustr )
>>= bRepairPackage;
} catch ( uno::Exception& )
{}
@@ -1675,7 +1675,7 @@ bool SvXMLImport::IsODFVersionConsistent( const OUString& aODFVersion )
if ( !bRepairPackage )
{
OUString aStorVersion;
- xStorProps->getPropertyValue( "Version" )
+ xStorProps->getPropertyValue( u"Version"_ustr )
>>= aStorVersion;
// if the storage version is set in manifest.xml, it must be the same as in content.xml
@@ -1685,13 +1685,13 @@ bool SvXMLImport::IsODFVersionConsistent( const OUString& aODFVersion )
if ( !aStorVersion.isEmpty() )
bResult = aODFVersion == aStorVersion;
else
- xStorProps->setPropertyValue( "Version",
+ xStorProps->setPropertyValue( u"Version"_ustr,
uno::Any( aODFVersion ) );
if ( bResult )
{
bool bInconsistent = false;
- xStorProps->getPropertyValue( "IsInconsistent" )
+ xStorProps->getPropertyValue( u"IsInconsistent"_ustr )
>>= bInconsistent;
bResult = !bInconsistent;
}
@@ -1776,7 +1776,7 @@ void SvXMLImport::SetError(
sal_Int32 nId,
const Sequence<OUString>& rMsgParams)
{
- SetError( nId, rMsgParams, "", nullptr );
+ SetError( nId, rMsgParams, u""_ustr, nullptr );
}
void SvXMLImport::SetError(
diff --git a/xmloff/source/draw/QRCodeContext.cxx b/xmloff/source/draw/QRCodeContext.cxx
index 580e4e8b9a41..3e4c2ea4434f 100644
--- a/xmloff/source/draw/QRCodeContext.cxx
+++ b/xmloff/source/draw/QRCodeContext.cxx
@@ -76,7 +76,7 @@ QRCodeContext::QRCodeContext(SvXMLImport& rImport, sal_Int32 /*nElement*/,
XMLOFF_WARN_UNKNOWN("xmloff", aIter);
}
}
- xPropSet->setPropertyValue("BarCodeProperties", Any(aBarCode));
+ xPropSet->setPropertyValue(u"BarCodeProperties"_ustr, Any(aBarCode));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/xmloff/source/draw/SignatureLineContext.cxx b/xmloff/source/draw/SignatureLineContext.cxx
index 29bc3f79778c..18b721a5312c 100644
--- a/xmloff/source/draw/SignatureLineContext.cxx
+++ b/xmloff/source/draw/SignatureLineContext.cxx
@@ -42,35 +42,35 @@ SignatureLineContext::SignatureLineContext(SvXMLImport& rImport, sal_Int32 /*nEl
{
Reference<beans::XPropertySet> xPropSet(rxShape, UNO_QUERY_THROW);
- xPropSet->setPropertyValue("IsSignatureLine", Any(true));
+ xPropSet->setPropertyValue(u"IsSignatureLine"_ustr, Any(true));
- xPropSet->setPropertyValue("SignatureLineId",
+ xPropSet->setPropertyValue(u"SignatureLineId"_ustr,
Any(xAttrList->getOptionalValue(XML_ELEMENT(LO_EXT, XML_ID))));
xPropSet->setPropertyValue(
- "SignatureLineSuggestedSignerName",
+ u"SignatureLineSuggestedSignerName"_ustr,
Any(xAttrList->getOptionalValue(XML_ELEMENT(LO_EXT, XML_SUGGESTED_SIGNER_NAME))));
xPropSet->setPropertyValue(
- "SignatureLineSuggestedSignerTitle",
+ u"SignatureLineSuggestedSignerTitle"_ustr,
Any(xAttrList->getOptionalValue(XML_ELEMENT(LO_EXT, XML_SUGGESTED_SIGNER_TITLE))));
xPropSet->setPropertyValue(
- "SignatureLineSuggestedSignerEmail",
+ u"SignatureLineSuggestedSignerEmail"_ustr,
Any(xAttrList->getOptionalValue(XML_ELEMENT(LO_EXT, XML_SUGGESTED_SIGNER_EMAIL))));
xPropSet->setPropertyValue(
- "SignatureLineSigningInstructions",
+ u"SignatureLineSigningInstructions"_ustr,
Any(xAttrList->getOptionalValue(XML_ELEMENT(LO_EXT, XML_SIGNING_INSTRUCTIONS))));
bool bShowSignDate = xAttrList->getOptionalValue(XML_ELEMENT(LO_EXT, XML_SHOW_SIGN_DATE))
== GetXMLToken(XML_TRUE);
bool bCanAddComment = xAttrList->getOptionalValue(XML_ELEMENT(LO_EXT, XML_CAN_ADD_COMMENT))
== GetXMLToken(XML_TRUE);
- xPropSet->setPropertyValue("SignatureLineShowSignDate", Any(bShowSignDate));
- xPropSet->setPropertyValue("SignatureLineCanAddComment", Any(bCanAddComment));
+ xPropSet->setPropertyValue(u"SignatureLineShowSignDate"_ustr, Any(bShowSignDate));
+ xPropSet->setPropertyValue(u"SignatureLineCanAddComment"_ustr, Any(bCanAddComment));
// Save unsigned graphic (need it when exporting)
Reference<XGraphic> xUnsignedGraphic;
- xPropSet->getPropertyValue("Graphic") >>= xUnsignedGraphic;
+ xPropSet->getPropertyValue(u"Graphic"_ustr) >>= xUnsignedGraphic;
if (xUnsignedGraphic.is())
- xPropSet->setPropertyValue("SignatureLineUnsignedImage", Any(xUnsignedGraphic));
+ xPropSet->setPropertyValue(u"SignatureLineUnsignedImage"_ustr, Any(xUnsignedGraphic));
Reference<XGraphic> xGraphic;
try
@@ -121,9 +121,9 @@ SignatureLineContext::SignatureLineContext(SvXMLImport& rImport, sal_Int32 /*nEl
xGraphic = pSignatureInfo->InvalidSignatureLineImage;
}
- xPropSet->setPropertyValue("Graphic", Any(xGraphic));
+ xPropSet->setPropertyValue(u"Graphic"_ustr, Any(xGraphic));
}
- xPropSet->setPropertyValue("SignatureLineIsSigned", Any(bIsSigned));
+ xPropSet->setPropertyValue(u"SignatureLineIsSigned"_ustr, Any(bIsSigned));
}
catch (css::uno::Exception&)
{
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
index de6b50a1471e..56f27fce6730 100644
--- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
+++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
@@ -102,7 +102,7 @@ void XMLGraphicsDefaultStyle::SetDefaults()
if( !xFact.is() )
return;
- Reference< XPropertySet > xDefaults( xFact->createInstance( "com.sun.star.drawing.Defaults" ), UNO_QUERY );
+ Reference< XPropertySet > xDefaults( xFact->createInstance( u"com.sun.star.drawing.Defaults"_ustr ), UNO_QUERY );
if( !xDefaults.is() )
return;
// SJ: #i114750#
@@ -125,11 +125,11 @@ void XMLGraphicsDefaultStyle::SetDefaults()
xDefaults->setPropertyValue( sTextWordWrap, Any( bWordWrapDefault ) );
if (GetImport().IsOOoXML()
- && xInfo->hasPropertyByName("IsFollowingTextFlow"))
+ && xInfo->hasPropertyByName(u"IsFollowingTextFlow"_ustr))
{
// OOo 1.x only supported "true" so that is the more appropriate
// default for OOoXML format documents.
- xDefaults->setPropertyValue("IsFollowingTextFlow", uno::Any(true));
+ xDefaults->setPropertyValue(u"IsFollowingTextFlow"_ustr, uno::Any(true));
}
// NOTE: the only reason why it's legal to check "==" (not "<") against
@@ -159,7 +159,7 @@ void XMLGraphicsDefaultStyle::SetDefaults()
{
Color const nStroke(
bIsAOO4 ? Color(128, 128, 128) : COL_BLACK);
- xDefaults->setPropertyValue("LineColor", Any(nStroke));
+ xDefaults->setPropertyValue(u"LineColor"_ustr, Any(nStroke));
}
Color const nFillColor( bIsAOO4
? Color(0xCF, 0xE7, 0xF5) : Color(153, 204, 255));
@@ -168,16 +168,16 @@ void XMLGraphicsDefaultStyle::SetDefaults()
if (std::none_of(GetProperties().begin(), GetProperties().end(),
XMLPropertyByIndex(nFillIndex)))
{
- xDefaults->setPropertyValue("FillColor", Any(nFillColor));
+ xDefaults->setPropertyValue(u"FillColor"_ustr, Any(nFillColor));
}
- if (xInfo->hasPropertyByName("FillColor2"))
+ if (xInfo->hasPropertyByName(u"FillColor2"_ustr))
{
sal_Int32 const nFill2Index(pImpPrMap->GetEntryIndex(
XML_NAMESPACE_DRAW, u"secondary-fill-color", 0));
if (std::none_of(GetProperties().begin(), GetProperties().end(),
XMLPropertyByIndex(nFill2Index)))
{
- xDefaults->setPropertyValue("FillColor2", Any(sal_Int32(nFillColor)));
+ xDefaults->setPropertyValue(u"FillColor2"_ustr, Any(sal_Int32(nFillColor)));
}
}
}
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx
index 3c0b8729fe43..c545c2187add 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -200,12 +200,12 @@ void XMLImageMapObjectContext::ProcessAttribute(
void XMLImageMapObjectContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
- rPropertySet->setPropertyValue( "URL", Any( sUrl ) );
- rPropertySet->setPropertyValue( "Title", Any( sTitleBuffer.makeStringAndClear() ) );
- rPropertySet->setPropertyValue( "Description", Any( sDescriptionBuffer.makeStringAndClear() ) );
- rPropertySet->setPropertyValue( "Target", Any( sTargt ) );
- rPropertySet->setPropertyValue( "IsActive", Any( bIsActive ) );
- rPropertySet->setPropertyValue( "Name", Any( sNam ) );
+ rPropertySet->setPropertyValue( u"URL"_ustr, Any( sUrl ) );
+ rPropertySet->setPropertyValue( u"Title"_ustr, Any( sTitleBuffer.makeStringAndClear() ) );
+ rPropertySet->setPropertyValue( u"Description"_ustr, Any( sDescriptionBuffer.makeStringAndClear() ) );
+ rPropertySet->setPropertyValue( u"Target"_ustr, Any( sTargt ) );
+ rPropertySet->setPropertyValue( u"IsActive"_ustr, Any( bIsActive ) );
+ rPropertySet->setPropertyValue( u"Name"_ustr, Any( sNam ) );
}
namespace {
@@ -299,7 +299,7 @@ void XMLImageMapRectangleContext::ProcessAttribute(
void XMLImageMapRectangleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
- rPropertySet->setPropertyValue( "Boundary", uno::Any(aRectangle) );
+ rPropertySet->setPropertyValue( u"Boundary"_ustr, uno::Any(aRectangle) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);
@@ -376,7 +376,7 @@ void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet)
{
css::drawing::PointSequence aPointSequence;
basegfx::utils::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence);
- rPropertySet->setPropertyValue("Polygon", Any(aPointSequence));
+ rPropertySet->setPropertyValue(u"Polygon"_ustr, Any(aPointSequence));
}
}
@@ -467,9 +467,9 @@ void XMLImageMapCircleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
// center (x,y)
- rPropertySet->setPropertyValue( "Center", uno::Any(aCenter) );
+ rPropertySet->setPropertyValue( u"Center"_ustr, uno::Any(aCenter) );
// radius
- rPropertySet->setPropertyValue( "Radius", uno::Any(nRadius) );
+ rPropertySet->setPropertyValue( u"Radius"_ustr, uno::Any(nRadius) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index 87a34cdcf6c1..ff6a809e7c8d 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -40,33 +40,33 @@ struct SdXMLDataStyleNumber
bool mbLong;
bool mbTextual;
bool mbDecimal02;
- const char* mpText;
+ OUString maText;
};
}
-SdXMLDataStyleNumber const aSdXMLDataStyleNumbers[] =
-{
- { XML_DAY, false, false, false, nullptr },
- { XML_DAY, true, false, false, nullptr },
- { XML_MONTH, true, false, false, nullptr },
- { XML_MONTH, false, true, false, nullptr },
- { XML_MONTH, true, true, false, nullptr },
- { XML_YEAR, false, false, false, nullptr },
- { XML_YEAR, true, false, false, nullptr },
- { XML_DAY_OF_WEEK, false, false, false, nullptr },
- { XML_DAY_OF_WEEK, true, false, false, nullptr },
- { XML_TEXT, false, false, false, "." },
- { XML_TEXT, false, false, false, " " },
- { XML_TEXT, false, false, false, ", " },
- { XML_TEXT, false, false, false, ". " },
- { XML_HOURS, false, false, false, nullptr },
- { XML_MINUTES, false, false, false, nullptr },
- { XML_TEXT, false, false, false, ":" },
- { XML_AM_PM, false, false, false, nullptr },
- { XML_SECONDS, false, false, false, nullptr },
- { XML_SECONDS, false, false, true, nullptr },
- { XML_TOKEN_INVALID, false, false, false, nullptr }
+SdXMLDataStyleNumber constexpr aSdXMLDataStyleNumbers[] =
+{
+ { XML_DAY, false, false, false, u""_ustr },
+ { XML_DAY, true, false, false, u""_ustr },
+ { XML_MONTH, true, false, false, u""_ustr },
+ { XML_MONTH, false, true, false, u""_ustr },
+ { XML_MONTH, true, true, false, u""_ustr },
+ { XML_YEAR, false, false, false, u""_ustr },
+ { XML_YEAR, true, false, false, u""_ustr },
+ { XML_DAY_OF_WEEK, false, false, false, u""_ustr },
+ { XML_DAY_OF_WEEK, true, false, false, u""_ustr },
+ { XML_TEXT, false, false, false, u"."_ustr },
+ { XML_TEXT, false, false, false, u" "_ustr },
+ { XML_TEXT, false, false, false, u", "_ustr },
+ { XML_TEXT, false, false, false, u". "_ustr },
+ { XML_HOURS, false, false, false, u""_ustr },
+ { XML_MINUTES, false, false, false, u""_ustr },
+ { XML_TEXT, false, false, false, u":"_ustr },
+ { XML_AM_PM, false, false, false, u""_ustr },
+ { XML_SECONDS, false, false, false, u""_ustr },
+ { XML_SECONDS, false, false, true, u""_ustr },
+ { XML_TOKEN_INVALID, false, false, false, u""_ustr }
};
// date
@@ -339,10 +339,9 @@ static void SdXMLExportDataStyleNumber( SdXMLExport& rExport, SdXMLDataStyleNumb
}
SvXMLElementExport aNumberStyle( rExport, XML_NAMESPACE_NUMBER, rElement.meNumberStyle, true, false );
- if( rElement.mpText )
+ if( !rElement.maText.isEmpty() )
{
- OUString sAttrValue( OUString::createFromAscii( rElement.mpText ) );
- rExport.GetDocHandler()->characters( sAttrValue );
+ rExport.GetDocHandler()->characters( rElement.maText );
}
}
@@ -613,8 +612,8 @@ void SdXMLNumberFormatImportContext::add( std::u16string_view rNumberStyle, bool
(pStyleMember->mbLong == bLong) &&
(pStyleMember->mbTextual == bTextual) &&
(pStyleMember->mbDecimal02 == bDecimal02) &&
- ( ( (pStyleMember->mpText == nullptr) && (rText.empty()) ) ||
- ( pStyleMember->mpText && (o3tl::equalsAscii( rText, pStyleMember->mpText ) ) ) ) )
+ ( ( (pStyleMember->maText.isEmpty()) && (rText.empty()) ) ||
+ ( !pStyleMember->maText.isEmpty() && rText == pStyleMember->maText ) ) )
{
mnElements[mnIndex++] = static_cast<DataStyleNumber>(nIndex + 1);
return;
diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx
index da49d45e86b7..0fdbbceb57fb 100644
--- a/xmloff/source/draw/XMLReplacementImageContext.cxx
+++ b/xmloff/source/draw/XMLReplacementImageContext.cxx
@@ -71,9 +71,9 @@ void XMLReplacementImageContext::endFastElement(sal_Int32 )
Reference < XPropertySetInfo > xPropSetInfo = m_xPropSet->getPropertySetInfo();
- if (xGraphic.is() && xPropSetInfo->hasPropertyByName("Graphic"))
+ if (xGraphic.is() && xPropSetInfo->hasPropertyByName(u"Graphic"_ustr))
{
- m_xPropSet->setPropertyValue("Graphic", uno::Any(xGraphic));
+ m_xPropSet->setPropertyValue(u"Graphic"_ustr, uno::Any(xGraphic));
}
}
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index da4341731b0f..85428c8bb4ee 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -238,7 +238,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
Sequence<OUString> const seq{ sStyleName };
GetImport().SetError(
XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING,
- seq, "empty style name reference", nullptr );
+ seq, u"empty style name reference"_ustr, nullptr );
break;
}
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index fee665930b24..9be7a7211ec7 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -396,29 +396,29 @@ const SvXMLEnumMapEntry<sal_Int16> aAnimations_EnumMap_Command[] =
const struct ImplAttributeNameConversion* getAnimationAttributeNamesConversionList()
{
- static const struct ImplAttributeNameConversion gImplConversionList[] =
+ static constexpr struct ImplAttributeNameConversion gImplConversionList[]
{
- { XML_X, "X" },
- { XML_Y, "Y" },
- { XML_WIDTH, "Width" },
- { XML_HEIGHT, "Height" },
- { XML_ROTATE, "Rotate" },
- { XML_SKEWX, "SkewX" },
- { XML_FILL_COLOR, "FillColor" },
- { XML_FILL, "FillStyle" },
- { XML_STROKE_COLOR, "LineColor" },
- { XML_STROKE, "LineStyle" },
- { XML_COLOR, "CharColor" },
- { XML_TEXT_ROTATION_ANGLE, "CharRotation" },
- { XML_FONT_WEIGHT, "CharWeight" },
- { XML_TEXT_UNDERLINE, "CharUnderline" },
- { XML_FONT_FAMILY, "CharFontName" },
- { XML_FONT_SIZE, "CharHeight" },
- { XML_FONT_STYLE, "CharPosture" },
- { XML_VISIBILITY, "Visibility" },
- { XML_OPACITY, "Opacity" },
- { XML_DIM, "DimColor" },
- { XML_TOKEN_INVALID, nullptr }
+ { XML_X, u"X"_ustr },
+ { XML_Y, u"Y"_ustr },
+ { XML_WIDTH, u"Width"_ustr },
+ { XML_HEIGHT, u"Height"_ustr },
+ { XML_ROTATE, u"Rotate"_ustr },
+ { XML_SKEWX, u"SkewX"_ustr },
+ { XML_FILL_COLOR, u"FillColor"_ustr },
+ { XML_FILL, u"FillStyle"_ustr },
+ { XML_STROKE_COLOR, u"LineColor"_ustr },
+ { XML_STROKE, u"LineStyle"_ustr },
+ { XML_COLOR, u"CharColor"_ustr },
+ { XML_TEXT_ROTATION_ANGLE, u"CharRotation"_ustr },
+ { XML_FONT_WEIGHT, u"CharWeight"_ustr },
+ { XML_TEXT_UNDERLINE, u"CharUnderline"_ustr },
+ { XML_FONT_FAMILY, u"CharFontName"_ustr },
+ { XML_FONT_SIZE, u"CharHeight"_ustr },
+ { XML_FONT_STYLE, u"CharPosture"_ustr },
+ { XML_VISIBILITY, u"Visibility"_ustr },
+ { XML_OPACITY, u"Opacity"_ustr },
+ { XML_DIM, u"DimColor"_ustr },
+ { XML_TOKEN_INVALID, u""_ustr }
};
return gImplConversionList;
@@ -552,9 +552,9 @@ void AnimationsExporterImpl::exportTransitionNode()
return;
sal_Int16 nTransition = 0;
- mxPageProps->getPropertyValue("TransitionType") >>= nTransition;
+ mxPageProps->getPropertyValue(u"TransitionType"_ustr) >>= nTransition;
- Any aSound( mxPageProps->getPropertyValue("Sound") );
+ Any aSound( mxPageProps->getPropertyValue(u"Sound"_ustr) );
OUString sSoundURL;
aSound >>= sSoundURL;
bool bStopSound = false;
@@ -583,10 +583,10 @@ void AnimationsExporterImpl::exportTransitionNode()
bool bDirection = false;
sal_Int32 nFadeColor = 0;
double fDuration = 0.0;
- mxPageProps->getPropertyValue("TransitionSubtype") >>= nSubtype;
- mxPageProps->getPropertyValue("TransitionDirection") >>= bDirection;
- mxPageProps->getPropertyValue("TransitionFadeColor") >>= nFadeColor;
- mxPageProps->getPropertyValue("TransitionDuration") >>= fDuration;
+ mxPageProps->getPropertyValue(u"TransitionSubtype"_ustr) >>= nSubtype;
+ mxPageProps->getPropertyValue(u"TransitionDirection"_ustr) >>= bDirection;
+ mxPageProps->getPropertyValue(u"TransitionFadeColor"_ustr) >>= nFadeColor;
+ mxPageProps->getPropertyValue(u"TransitionDuration"_ustr) >>= fDuration;
::sax::Converter::convertDouble( sTmp, fDuration );
sTmp.append( 's');
@@ -625,7 +625,7 @@ void AnimationsExporterImpl::exportTransitionNode()
mxExport->AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sSoundURL );
bool bLoopSound = false;
- mxPageProps->getPropertyValue("LoopSound") >>= bLoopSound;
+ mxPageProps->getPropertyValue(u"LoopSound"_ustr) >>= bLoopSound;
if( bLoopSound )
mxExport->AddAttribute( XML_NAMESPACE_SMIL, XML_REPEATCOUNT, XML_INDEFINITE );
@@ -641,14 +641,14 @@ void AnimationsExporterImpl::prepareTransitionNode()
try
{
sal_Int16 nTransition = 0;
- mxPageProps->getPropertyValue("TransitionType") >>= nTransition;
+ mxPageProps->getPropertyValue(u"TransitionType"_ustr) >>= nTransition;
bool bStopSound = false;
OUString sSoundURL;
if( nTransition == 0 )
{
- Any aSound( mxPageProps->getPropertyValue("Sound") );
+ Any aSound( mxPageProps->getPropertyValue(u"Sound"_ustr) );
aSound >>= sSoundURL;
if( !(aSound >>= bStopSound) )
@@ -1104,9 +1104,9 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
if( !sTemp.isEmpty() )
{
const struct ImplAttributeNameConversion* p = getAnimationAttributeNamesConversionList();
- while( p->mpAPIName )
+ while( !p->maAPIName.isEmpty() )
{
- if( sTemp.equalsAscii( p->mpAPIName ) )
+ if( sTemp == p->maAPIName )
{
sTemp = GetXMLToken( p->meXMLToken );
eAttributeName = p->meXMLToken;
@@ -1120,7 +1120,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
}
else
{
- mxExport->AddAttribute( XML_NAMESPACE_SMIL, XML_ATTRIBUTENAME, "invalid" );
+ mxExport->AddAttribute( XML_NAMESPACE_SMIL, XML_ATTRIBUTENAME, u"invalid"_ustr );
}
}
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index 519c3288cdce..608e23cbc225 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -787,11 +787,11 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax:
OUString aName( aIter.toString() );
const struct ImplAttributeNameConversion* p = getAnimationAttributeNamesConversionList();
- while( p->mpAPIName )
+ while( !p->maAPIName.isEmpty() )
{
if( IsXMLToken( aIter, p->meXMLToken ) )
{
- aName = OUString::createFromAscii( p->mpAPIName );
+ aName = p->maAPIName;
meAttributeName = p->meXMLToken;
break;
}
@@ -1212,7 +1212,7 @@ private:
}
AnimationsImport::AnimationsImport( const Reference< XComponentContext > & rxContext )
-: SvXMLImport( rxContext, "xmloff::AnimationsImport", SvXMLImportFlags::META )
+: SvXMLImport( rxContext, u"xmloff::AnimationsImport"_ustr, SvXMLImportFlags::META )
//FIXME: the above "IMPORT_META" used to be a nonsensical "true", question
// remains whether this should be IMPORT_META (same numerical value as
// true) or default IMPORT_ALL
@@ -1292,14 +1292,14 @@ void AnimationNodeContext::postProcessRootNode( const Reference< XAnimationNode
{
Reference< XTransitionFilter > xTransFilter( xChildNode, UNO_QUERY_THROW );
- xPageProps->setPropertyValue("TransitionType", Any( xTransFilter->getTransition() ) );
- xPageProps->setPropertyValue("TransitionSubtype", Any( xTransFilter->getSubtype() ) );
- xPageProps->setPropertyValue("TransitionDirection", Any( xTransFilter->getDirection() ) );
- xPageProps->setPropertyValue("TransitionFadeColor", Any( xTransFilter->getFadeColor() ) );
+ xPageProps->setPropertyValue(u"TransitionType"_ustr, Any( xTransFilter->getTransition() ) );
+ xPageProps->setPropertyValue(u"TransitionSubtype"_ustr, Any( xTransFilter->getSubtype() ) );
+ xPageProps->setPropertyValue(u"TransitionDirection"_ustr, Any( xTransFilter->getDirection() ) );
+ xPageProps->setPropertyValue(u"TransitionFadeColor"_ustr, Any( xTransFilter->getFadeColor() ) );
double fDuration;
if( xTransFilter->getDuration() >>= fDuration )
- xPageProps->setPropertyValue("TransitionDuration", Any( fDuration ) );
+ xPageProps->setPropertyValue(u"TransitionDuration"_ustr, Any( fDuration ) );
}
break;
@@ -1309,7 +1309,7 @@ void AnimationNodeContext::postProcessRootNode( const Reference< XAnimationNode
Reference< XCommand > xCommand( xChildNode, UNO_QUERY_THROW );
if( xCommand->getCommand() == EffectCommands::STOPAUDIO )
{
- xPageProps->setPropertyValue("Sound", Any(true) );
+ xPageProps->setPropertyValue(u"Sound"_ustr, Any(true) );
}
}
break;
@@ -1320,11 +1320,11 @@ void AnimationNodeContext::postProcessRootNode( const Reference< XAnimationNode
OUString sSoundURL;
if( (xAudio->getSource() >>= sSoundURL) && !sSoundURL.isEmpty() )
{
- xPageProps->setPropertyValue("Sound", Any(sSoundURL) );
+ xPageProps->setPropertyValue(u"Sound"_ustr, Any(sSoundURL) );
Timing eTiming;
if( (xAudio->getRepeatCount() >>= eTiming) && (eTiming == Timing_INDEFINITE) )
- xPageProps->setPropertyValue("LoopSound", Any( true ) );
+ xPageProps->setPropertyValue(u"LoopSound"_ustr, Any( true ) );
}
}
break;
diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx
index 0c78f4f1d85b..d4c1771599b4 100644
--- a/xmloff/source/draw/animexp.cxx
+++ b/xmloff/source/draw/animexp.cxx
@@ -262,7 +262,7 @@ void XMLAnimationsExporter::prepare( const Reference< XShape >& xShape )
// check for presentation shape service
{
Reference< XServiceInfo > xServiceInfo( xShape, UNO_QUERY );
- if( !xServiceInfo.is() || !xServiceInfo->supportsService("com.sun.star.presentation.Shape") )
+ if( !xServiceInfo.is() || !xServiceInfo->supportsService(u"com.sun.star.presentation.Shape"_ustr) )
return;
}
@@ -292,7 +292,7 @@ void XMLAnimationsExporter::collect( const Reference< XShape >& xShape, SvXMLExp
// check for presentation shape service
{
Reference< XServiceInfo > xServiceInfo( xShape, UNO_QUERY );
- if( !xServiceInfo.is() || !xServiceInfo->supportsService("com.sun.star.presentation.Shape") )
+ if( !xServiceInfo.is() || !xServiceInfo->supportsService(u"com.sun.star.presentation.Shape"_ustr) )
return;
}
diff --git a/xmloff/source/draw/descriptionimp.cxx b/xmloff/source/draw/descriptionimp.cxx
index e17980f55baa..0e9990fbac06 100644
--- a/xmloff/source/draw/descriptionimp.cxx
+++ b/xmloff/source/draw/descriptionimp.cxx
@@ -49,11 +49,11 @@ void SdXMLDescriptionContext::endFastElement(sal_Int32 )
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY_THROW);
if( (mnElement & TOKEN_MASK) == XML_TITLE)
{
- xPropSet->setPropertyValue("Title", Any(msText));
+ xPropSet->setPropertyValue(u"Title"_ustr, Any(msText));
}
else
{
- xPropSet->setPropertyValue("Description", Any(msText));
+ xPropSet->setPropertyValue(u"Description"_ustr, Any(msText));
}
}
catch( uno::Exception& )
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index f7bcc529bbc6..9e90de023c6d 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -311,7 +311,7 @@ void SdXMLEventContextData::ApplyProperties()
pProperties->Name = "EventType";
pProperties->Handle = -1;
- pProperties->Value <<= OUString( "StarBasic" );
+ pProperties->Value <<= u"StarBasic"_ustr;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
pProperties++;
@@ -330,7 +330,7 @@ void SdXMLEventContextData::ApplyProperties()
{
pProperties->Name = "EventType";
pProperties->Handle = -1;
- pProperties->Value <<= OUString( "Script" );
+ pProperties->Value <<= u"Script"_ustr;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
pProperties++;
@@ -344,7 +344,7 @@ void SdXMLEventContextData::ApplyProperties()
{
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/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx
index 7f4269627f2a..7b51ef42e32e 100644
--- a/xmloff/source/draw/layerexp.cxx
+++ b/xmloff/source/draw/layerexp.cxx
@@ -80,14 +80,14 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
if ( bTmpVisible )
{
if ( !bTmpPrintable )
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY, OUString("screen") );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY, u"screen"_ustr );
}
else
{
if ( bTmpPrintable)
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY, OUString("printer") );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY, u"printer"_ustr );
else
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY, OUString("none") );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DISPLAY, u"none"_ustr );
}
bool bTmpLocked( false );
@@ -95,7 +95,7 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
// only write non-default value, default is "false"
if ( bTmpLocked )
{
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_PROTECTED, OUString("true") );
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_PROTECTED, u"true"_ustr );
}
SvXMLElementExport aEle( rExport, XML_NAMESPACE_DRAW, XML_LAYER, true, true );
diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx
index 36255b438739..aa87e0a48100 100644
--- a/xmloff/source/draw/layerimp.cxx
+++ b/xmloff/source/draw/layerimp.cxx
@@ -130,13 +130,13 @@ void SdXMLLayerContext::endFastElement(sal_Int32 )
SAL_WARN_IF( !xLayer.is(), "xmloff", "xmloff::SdXMLLayerContext::EndElement(), failed to create new XLayer!" );
if( xLayer.is() )
- xLayer->setPropertyValue("Name", Any( msName ) );
+ xLayer->setPropertyValue(u"Name"_ustr, Any( msName ) );
}
if( xLayer.is() )
{
- xLayer->setPropertyValue("Title", Any( sTitleBuffer.makeStringAndClear() ) );
- xLayer->setPropertyValue("Description", Any( sDescriptionBuffer.makeStringAndClear() ) );
+ xLayer->setPropertyValue(u"Title"_ustr, Any( sTitleBuffer.makeStringAndClear() ) );
+ xLayer->setPropertyValue(u"Description"_ustr, Any( sDescriptionBuffer.makeStringAndClear() ) );
bool bIsVisible( true );
bool bIsPrintable( true );
if ( !msDisplay.isEmpty() )
@@ -144,20 +144,20 @@ void SdXMLLayerContext::endFastElement(sal_Int32 )
bIsVisible = (msDisplay == "always") || (msDisplay == "screen");
bIsPrintable = (msDisplay == "always") || (msDisplay == "printer");
}
- xLayer->setPropertyValue("IsVisible", Any( bIsVisible ) );
- xLayer->setPropertyValue("IsPrintable", Any( bIsPrintable ) );
+ xLayer->setPropertyValue(u"IsVisible"_ustr, Any( bIsVisible ) );
+ xLayer->setPropertyValue(u"IsPrintable"_ustr, Any( bIsPrintable ) );
bool bIsLocked( false );
if ( !msProtected.isEmpty() )
bIsLocked = (msProtected == "true");
- xLayer->setPropertyValue("IsLocked", Any( bIsLocked ) );
+ xLayer->setPropertyValue(u"IsLocked"_ustr, Any( bIsLocked ) );
// tdf#129898 repair layer "DrawnInSlideshow", which was wrongly written
// in LO 6.2 to 6.4. It should always have ODF defaults.
if (msName == "DrawnInSlideshow")
{
- xLayer->setPropertyValue("IsVisible", Any(true));
- xLayer->setPropertyValue("IsPrintable", Any(true));
- xLayer->setPropertyValue("IsLocked", Any(false));
+ xLayer->setPropertyValue(u"IsVisible"_ustr, Any(true));
+ xLayer->setPropertyValue(u"IsPrintable"_ustr, Any(true));
+ xLayer->setPropertyValue(u"IsLocked"_ustr, Any(false));
}
}
}
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index e4d40003527f..62235bf73bc8 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -1141,7 +1141,7 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
uno::Reference<ucb::XAnyCompareFactory> xCompareFac( mxModel, uno::UNO_QUERY );
uno::Reference<ucb::XAnyCompare> xCompare;
if( xCompareFac.is() )
- xCompare = xCompareFac->createAnyCompareByName( "NumberingRules" );
+ xCompare = xCompareFac->createAnyCompareByName( u"NumberingRules"_ustr );
pHdl = new XMLNumRulePropHdl( xCompare );
break;
@@ -1566,7 +1566,7 @@ void XMLShapeExportPropertyMapper::ContextFilter(
try
{
awt::Rectangle aRect;
- if( rPropSet->getPropertyValue( "VisibleArea" ) >>= aRect )
+ if( rPropSet->getPropertyValue( u"VisibleArea"_ustr ) >>= aRect )
{
if( pOLEVisAreaLeft )
{
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 0b4fe9895e59..2f8126e34322 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -132,33 +132,33 @@ ImpXMLEXPPageMasterInfo::ImpXMLEXPPageMasterInfo(
Any aAny;
Reference< beans::XPropertySetInfo > xPropsInfo( xPropSet->getPropertySetInfo() );
- if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("BorderBottom"))
+ if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(u"BorderBottom"_ustr))
{
- aAny = xPropSet->getPropertyValue("BorderBottom");
+ aAny = xPropSet->getPropertyValue(u"BorderBottom"_ustr);
aAny >>= mnBorderBottom;
- aAny = xPropSet->getPropertyValue("BorderLeft");
+ aAny = xPropSet->getPropertyValue(u"BorderLeft"_ustr);
aAny >>= mnBorderLeft;
- aAny = xPropSet->getPropertyValue("BorderRight");
+ aAny = xPropSet->getPropertyValue(u"BorderRight"_ustr);
aAny >>= mnBorderRight;
- aAny = xPropSet->getPropertyValue("BorderTop");
+ aAny = xPropSet->getPropertyValue(u"BorderTop"_ustr);
aAny >>= mnBorderTop;
}
- if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("Width"))
+ if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(u"Width"_ustr))
{
- aAny = xPropSet->getPropertyValue("Width");
+ aAny = xPropSet->getPropertyValue(u"Width"_ustr);
aAny >>= mnWidth;
- aAny = xPropSet->getPropertyValue("Height");
+ aAny = xPropSet->getPropertyValue(u"Height"_ustr);
aAny >>= mnHeight;
}
- if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("Orientation"))
+ if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(u"Orientation"_ustr))
{
- aAny = xPropSet->getPropertyValue("Orientation");
+ aAny = xPropSet->getPropertyValue(u"Orientation"_ustr);
aAny >>= meOrientation;
}
}
@@ -444,7 +444,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
if(mxDocMasterPages.is())
{
mnDocMasterPageCount = mxDocMasterPages->getCount();
- maMasterPagesStyleNames.insert( maMasterPagesStyleNames.begin(), mnDocMasterPageCount, "" );
+ maMasterPagesStyleNames.insert( maMasterPagesStyleNames.begin(), mnDocMasterPageCount, u""_ustr );
}
}
@@ -456,8 +456,8 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
if(mxDocDrawPages.is())
{
mnDocDrawPageCount = mxDocDrawPages->getCount();
- maDrawPagesStyleNames.insert( maDrawPagesStyleNames.begin(), mnDocDrawPageCount, "" );
- maDrawNotesPagesStyleNames.insert( maDrawNotesPagesStyleNames.begin(), mnDocDrawPageCount, "" );
+ maDrawPagesStyleNames.insert( maDrawPagesStyleNames.begin(), mnDocDrawPageCount, u""_ustr );
+ maDrawNotesPagesStyleNames.insert( maDrawNotesPagesStyleNames.begin(), mnDocDrawPageCount, u""_ustr );
if( !mbIsDraw )
maDrawPagesAutoLayoutNames.realloc( mnDocDrawPageCount + 1 );
@@ -657,7 +657,7 @@ bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr
if(xPropSet.is())
{
sal_uInt16 nType = sal_uInt16();
- Any aAny = xPropSet->getPropertyValue("Layout");
+ Any aAny = xPropSet->getPropertyValue(u"Layout"_ustr);
if(aAny >>= nType)
{
if(ImpXMLAutoLayoutInfo::IsCreateNecessary(nType))
@@ -1396,8 +1396,8 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons
bool bFixed = false;
sal_Int32 nFormat = 0;
xSet->getPropertyValue( aStrDateTimeTextProp ) >>= aStrText;
- xSet->getPropertyValue("IsDateTimeFixed") >>= bFixed;
- xSet->getPropertyValue("DateTimeFormat") >>= nFormat;
+ xSet->getPropertyValue(u"IsDateTimeFixed"_ustr) >>= bFixed;
+ xSet->getPropertyValue(u"DateTimeFormat"_ustr) >>= nFormat;
if( !bFixed || !aStrText.isEmpty() )
{
@@ -1605,7 +1605,7 @@ void SdXMLExport::ImpWritePresentationStyles()
void SdXMLExport::ExportMeta_()
{
- uno::Sequence<beans::NamedValue> stats { { "ObjectCount", uno::Any(mnObjectCount) } };
+ uno::Sequence<beans::NamedValue> stats { { u"ObjectCount"_ustr, uno::Any(mnObjectCount) } };
// update document statistics at the model
uno::Reference<document::XDocumentPropertiesSupplier> xPropSup(GetModel(),
@@ -1680,7 +1680,7 @@ void SdXMLExport::ExportContent_()
try
{
OUString aBookmarkURL;
- xProps->getPropertyValue("BookmarkURL") >>= aBookmarkURL;
+ xProps->getPropertyValue(u"BookmarkURL"_ustr) >>= aBookmarkURL;
if( !aBookmarkURL.isEmpty() )
{
@@ -1822,11 +1822,11 @@ void SdXMLExport::exportPresentationSettings()
bool bTemp = false;
// export range
- xPresProps->getPropertyValue("IsShowAll") >>= bTemp;
+ xPresProps->getPropertyValue(u"IsShowAll"_ustr) >>= bTemp;
if( !bTemp )
{
OUString aFirstPage;
- xPresProps->getPropertyValue("FirstPage") >>= aFirstPage;
+ xPresProps->getPropertyValue(u"FirstPage"_ustr) >>= aFirstPage;
if( !aFirstPage.isEmpty() )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_START_PAGE, aFirstPage );
@@ -1835,7 +1835,7 @@ void SdXMLExport::exportPresentationSettings()
else
{
OUString aCustomShow;
- xPresProps->getPropertyValue("CustomShow") >>= aCustomShow;
+ xPresProps->getPropertyValue(u"CustomShow"_ustr) >>= aCustomShow;
if( !aCustomShow.isEmpty() )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_SHOW, aCustomShow );
@@ -1844,14 +1844,14 @@ void SdXMLExport::exportPresentationSettings()
}
}
- xPresProps->getPropertyValue("IsEndless") >>= bTemp;
+ xPresProps->getPropertyValue(u"IsEndless"_ustr) >>= bTemp;
if( bTemp )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_ENDLESS, XML_TRUE );
bHasAttr = true;
sal_Int32 nPause = 0;
- xPresProps->getPropertyValue("Pause") >>= nPause;
+ xPresProps->getPropertyValue(u"Pause"_ustr) >>= nPause;
util::Duration aDuration;
aDuration.Seconds = static_cast<sal_uInt16>(nPause);
@@ -1861,28 +1861,28 @@ void SdXMLExport::exportPresentationSettings()
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PAUSE, aOut.makeStringAndClear() );
}
- xPresProps->getPropertyValue("AllowAnimations") >>= bTemp;
+ xPresProps->getPropertyValue(u"AllowAnimations"_ustr) >>= bTemp;
if( !bTemp )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_ANIMATIONS, XML_DISABLED );
bHasAttr = true;
}
- xPresProps->getPropertyValue("IsAlwaysOnTop") >>= bTemp;
+ xPresProps->getPropertyValue(u"IsAlwaysOnTop"_ustr) >>= bTemp;
if( bTemp )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_STAY_ON_TOP, XML_TRUE );
bHasAttr = true;
}
- xPresProps->getPropertyValue("IsAutomatic") >>= bTemp;
+ xPresProps->getPropertyValue(u"IsAutomatic"_ustr) >>= bTemp;
if( bTemp )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_FORCE_MANUAL, XML_TRUE );
bHasAttr = true;
}
- xPresProps->getPropertyValue("IsFullScreen") >>= bTemp;
+ xPresProps->getPropertyValue(u"IsFullScreen"_ustr) >>= bTemp;
if( !bTemp )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_FULL_SCREEN, XML_FALSE );
@@ -1890,32 +1890,32 @@ void SdXMLExport::exportPresentationSettings()
}
// We need to always export this attribute, because the import had the wrong default (tdf#108824)
- xPresProps->getPropertyValue("IsMouseVisible") >>= bTemp;
+ xPresProps->getPropertyValue(u"IsMouseVisible"_ustr) >>= bTemp;
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_MOUSE_VISIBLE, bTemp ? XML_TRUE : XML_FALSE);
bHasAttr = true;
- xPresProps->getPropertyValue("StartWithNavigator") >>= bTemp;
+ xPresProps->getPropertyValue(u"StartWithNavigator"_ustr) >>= bTemp;
if( bTemp )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_START_WITH_NAVIGATOR, XML_TRUE );
bHasAttr = true;
}
- xPresProps->getPropertyValue("UsePen") >>= bTemp;
+ xPresProps->getPropertyValue(u"UsePen"_ustr) >>= bTemp;
if( bTemp )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_MOUSE_AS_PEN, XML_TRUE );
bHasAttr = true;
}
- xPresProps->getPropertyValue("IsTransitionOnClick") >>= bTemp;
+ xPresProps->getPropertyValue(u"IsTransitionOnClick"_ustr) >>= bTemp;
if( !bTemp )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_TRANSITION_ON_CLICK, XML_DISABLED );
bHasAttr = true;
}
- xPresProps->getPropertyValue("IsShowLogo") >>= bTemp;
+ xPresProps->getPropertyValue(u"IsShowLogo"_ustr) >>= bTemp;
if( bTemp )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_SHOW_LOGO, XML_TRUE );
@@ -2368,7 +2368,7 @@ void SdXMLExport::exportTheme(const uno::Reference<drawing::XDrawPage>& xDrawPag
return;
uno::Reference<util::XTheme> xTheme;
- xPropertySet->getPropertyValue("Theme") >>= xTheme;
+ xPropertySet->getPropertyValue(u"Theme"_ustr) >>= xTheme;
if (!xTheme.is())
return;
@@ -2390,7 +2390,7 @@ void SdXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps)
return;
awt::Rectangle aVisArea;
- xPropSet->getPropertyValue("VisibleArea") >>= aVisArea;
+ xPropSet->getPropertyValue(u"VisibleArea"_ustr) >>= aVisArea;
rProps.realloc(4);
beans::PropertyValue* pProps = rProps.getArray();
@@ -2412,7 +2412,7 @@ void SdXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>&
if( !xFac.is() )
return;
- Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), UNO_QUERY );
+ Reference< beans::XPropertySet > xProps( xFac->createInstance(u"com.sun.star.document.Settings"_ustr), UNO_QUERY );
if( xProps.is() )
SvXMLUnitConverter::convertPropertySet( rProps, xProps );
DocumentSettingsSerializer *pFilter(dynamic_cast<DocumentSettingsSerializer *>(xProps.get()));
@@ -2475,7 +2475,7 @@ OUString SdXMLExport::getNavigationOrder( const Reference< XDrawPage >& xDrawPag
try
{
Reference< XPropertySet > xSet( xDrawPage, UNO_QUERY_THROW );
- Reference< XIndexAccess > xNavOrder( xSet->getPropertyValue("NavigationOrder"), UNO_QUERY_THROW );
+ Reference< XIndexAccess > xNavOrder( xSet->getPropertyValue(u"NavigationOrder"_ustr), UNO_QUERY_THROW );
Reference< XIndexAccess > xZOrderAccess = xDrawPage;
@@ -2635,7 +2635,7 @@ com_sun_star_comp_Impress_XMLOasisExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(new SdXMLExport(
- pCtx, "XMLImpressExportOasis", false,
+ pCtx, u"XMLImpressExportOasis"_ustr, false,
SvXMLExportFlags::OASIS | SvXMLExportFlags::META | SvXMLExportFlags::STYLES
| SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::AUTOSTYLES
| SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS | SvXMLExportFlags::SETTINGS
@@ -2647,7 +2647,7 @@ com_sun_star_comp_Impress_XMLOasisStylesExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(new SdXMLExport(
- pCtx, "XMLImpressStylesExportOasis", false,
+ pCtx, u"XMLImpressStylesExportOasis"_ustr, false,
SvXMLExportFlags::OASIS | SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES
| SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::FONTDECLS));
}
@@ -2656,7 +2656,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Impress_XMLOasisContentExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLExport(pCtx, "XMLImpressContentExportOasis", false,
+ return cppu::acquire(new SdXMLExport(pCtx, u"XMLImpressContentExportOasis"_ustr, false,
SvXMLExportFlags::OASIS | SvXMLExportFlags::AUTOSTYLES
| SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS
| SvXMLExportFlags::FONTDECLS));
@@ -2666,7 +2666,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Impress_XMLOasisMetaExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLExport(pCtx, "XMLImpressMetaExportOasis", false,
+ return cppu::acquire(new SdXMLExport(pCtx, u"XMLImpressMetaExportOasis"_ustr, false,
SvXMLExportFlags::OASIS | SvXMLExportFlags::META));
}
@@ -2674,7 +2674,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Impress_XMLOasisSettingsExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLExport(pCtx, "XMLImpressSettingsExportOasis", false,
+ return cppu::acquire(new SdXMLExport(pCtx, u"XMLImpressSettingsExportOasis"_ustr, false,
SvXMLExportFlags::OASIS | SvXMLExportFlags::SETTINGS));
}
@@ -2683,7 +2683,7 @@ com_sun_star_comp_Impress_XMLExporter_get_implementation(uno::XComponentContext*
uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(new SdXMLExport(
- pCtx, "XMLImpressExportOOO", false,
+ pCtx, u"XMLImpressExportOOO"_ustr, false,
SvXMLExportFlags::META | SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES
| SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS
| SvXMLExportFlags::SETTINGS | SvXMLExportFlags::FONTDECLS
@@ -2695,7 +2695,7 @@ com_sun_star_comp_Draw_XMLExporter_get_implementation(uno::XComponentContext* pC
uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(new SdXMLExport(
- pCtx, "XMLDrawExportOOO", true,
+ pCtx, u"XMLDrawExportOOO"_ustr, true,
SvXMLExportFlags::META | SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES
| SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS
| SvXMLExportFlags::SETTINGS | SvXMLExportFlags::FONTDECLS
@@ -2706,7 +2706,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Draw_XMLOasisSettingsExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLExport(pCtx, "XMLDrawSettingsExportOasis", true,
+ return cppu::acquire(new SdXMLExport(pCtx, u"XMLDrawSettingsExportOasis"_ustr, true,
SvXMLExportFlags::OASIS | SvXMLExportFlags::SETTINGS));
}
@@ -2714,7 +2714,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Draw_XMLOasisMetaExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLExport(pCtx, "XMLDrawMetaExportOasis", true,
+ return cppu::acquire(new SdXMLExport(pCtx, u"XMLDrawMetaExportOasis"_ustr, true,
SvXMLExportFlags::OASIS | SvXMLExportFlags::META));
}
@@ -2722,7 +2722,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Draw_XMLOasisContentExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLExport(pCtx, "XMLDrawContentExportOasis", true,
+ return cppu::acquire(new SdXMLExport(pCtx, u"XMLDrawContentExportOasis"_ustr, true,
SvXMLExportFlags::OASIS | SvXMLExportFlags::AUTOSTYLES
| SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS
| SvXMLExportFlags::FONTDECLS));
@@ -2733,7 +2733,7 @@ com_sun_star_comp_Draw_XMLOasisStylesExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(new SdXMLExport(
- pCtx, "XMLDrawStylesExportOasis", true,
+ pCtx, u"XMLDrawStylesExportOasis"_ustr, true,
SvXMLExportFlags::OASIS | SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES
| SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::FONTDECLS));
}
@@ -2743,7 +2743,7 @@ com_sun_star_comp_Draw_XMLOasisExporter_get_implementation(uno::XComponentContex
uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(new SdXMLExport(
- pCtx, "XMLDrawExportOasis", true,
+ pCtx, u"XMLDrawExportOasis"_ustr, true,
SvXMLExportFlags::OASIS | SvXMLExportFlags::META | SvXMLExportFlags::STYLES
| SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::AUTOSTYLES
| SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS | SvXMLExportFlags::SETTINGS
@@ -2755,7 +2755,7 @@ com_sun_star_comp_DrawingLayer_XMLExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(
- new SdXMLExport(pCtx, "XMLDrawingLayerExport", true,
+ new SdXMLExport(pCtx, u"XMLDrawingLayerExport"_ustr, true,
SvXMLExportFlags::OASIS | SvXMLExportFlags::STYLES
| SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT
| SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::EMBEDDED));
@@ -2766,7 +2766,7 @@ com_sun_star_comp_Impress_XMLClipboardExporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(
- new SdXMLExport(pCtx, "XMLImpressClipboardExport", /*bIsDraw=*/false,
+ new SdXMLExport(pCtx, u"XMLImpressClipboardExport"_ustr, /*bIsDraw=*/false,
SvXMLExportFlags::OASIS | SvXMLExportFlags::STYLES
| SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT
| SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::EMBEDDED));
@@ -2789,21 +2789,21 @@ XMLFontAutoStylePool* SdXMLExport::CreateFontAutoStylePool()
Reference<beans::XPropertySetInfo> xInfo;
if (xFactory.is())
- xProps.set(xFactory->createInstance("com.sun.star.document.Settings"), UNO_QUERY);
+ xProps.set(xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), UNO_QUERY);
if (xProps.is())
xInfo = xProps->getPropertySetInfo();
if (xInfo.is() && xProps.is())
{
- if (xInfo->hasPropertyByName("EmbedFonts"))
- xProps->getPropertyValue("EmbedFonts") >>= bEmbedFonts;
- if (xInfo->hasPropertyByName("EmbedOnlyUsedFonts"))
- xProps->getPropertyValue("EmbedOnlyUsedFonts") >>= bEmbedUsedOnly;
- if (xInfo->hasPropertyByName("EmbedLatinScriptFonts"))
- xProps->getPropertyValue("EmbedLatinScriptFonts") >>= bEmbedLatinScript;
- if (xInfo->hasPropertyByName("EmbedAsianScriptFonts"))
- xProps->getPropertyValue("EmbedAsianScriptFonts") >>= bEmbedAsianScript;
- if (xInfo->hasPropertyByName("EmbedComplexScriptFonts"))
- xProps->getPropertyValue("EmbedComplexScriptFonts") >>= bEmbedComplexScript;
+ if (xInfo->hasPropertyByName(u"EmbedFonts"_ustr))
+ xProps->getPropertyValue(u"EmbedFonts"_ustr) >>= bEmbedFonts;
+ if (xInfo->hasPropertyByName(u"EmbedOnlyUsedFonts"_ustr))
+ xProps->getPropertyValue(u"EmbedOnlyUsedFonts"_ustr) >>= bEmbedUsedOnly;
+ if (xInfo->hasPropertyByName(u"EmbedLatinScriptFonts"_ustr))
+ xProps->getPropertyValue(u"EmbedLatinScriptFonts"_ustr) >>= bEmbedLatinScript;
+ if (xInfo->hasPropertyByName(u"EmbedAsianScriptFonts"_ustr))
+ xProps->getPropertyValue(u"EmbedAsianScriptFonts"_ustr) >>= bEmbedAsianScript;
+ if (xInfo->hasPropertyByName(u"EmbedComplexScriptFonts"_ustr))
+ xProps->getPropertyValue(u"EmbedComplexScriptFonts"_ustr) >>= bEmbedComplexScript;
}
} catch(...)
{
@@ -2819,7 +2819,7 @@ XMLFontAutoStylePool* SdXMLExport::CreateFontAutoStylePool()
Reference< beans::XPropertySet > xProps( GetModel(), UNO_QUERY );
if ( xProps.is() ) {
Sequence<Any> aAnySeq;
- if( xProps->getPropertyValue("Fonts") >>= aAnySeq )
+ if( xProps->getPropertyValue(u"Fonts"_ustr) >>= aAnySeq )
{
if( aAnySeq.getLength() % 5 == 0 )
{
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 20bd8f40d216..971c09961f33 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -213,21 +213,21 @@ com_sun_star_comp_Impress_XMLOasisImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(
- new SdXMLImport(pCtx, "XMLImpressImportOasis", false, SvXMLImportFlags::ALL));
+ new SdXMLImport(pCtx, u"XMLImpressImportOasis"_ustr, false, SvXMLImportFlags::ALL));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Draw_XMLOasisImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawImportOasis", true, SvXMLImportFlags::ALL));
+ return cppu::acquire(new SdXMLImport(pCtx, u"XMLDrawImportOasis"_ustr, true, SvXMLImportFlags::ALL));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawStylesImportOasis", true,
+ return cppu::acquire(new SdXMLImport(pCtx, u"XMLDrawStylesImportOasis"_ustr, true,
SvXMLImportFlags::STYLES | SvXMLImportFlags::AUTOSTYLES
| SvXMLImportFlags::MASTERSTYLES));
}
@@ -236,7 +236,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawContentImportOasis", true,
+ return cppu::acquire(new SdXMLImport(pCtx, u"XMLDrawContentImportOasis"_ustr, true,
SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::CONTENT
| SvXMLImportFlags::SCRIPTS
| SvXMLImportFlags::FONTDECLS));
@@ -247,7 +247,7 @@ com_sun_star_comp_Draw_XMLOasisMetaImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(
- new SdXMLImport(pCtx, "XMLDrawMetaImportOasis", true, SvXMLImportFlags::META));
+ new SdXMLImport(pCtx, u"XMLDrawMetaImportOasis"_ustr, true, SvXMLImportFlags::META));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
@@ -255,14 +255,14 @@ com_sun_star_comp_Draw_XMLOasisSettingsImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(
- new SdXMLImport(pCtx, "XMLDrawSettingsImportOasis", true, SvXMLImportFlags::SETTINGS));
+ new SdXMLImport(pCtx, u"XMLDrawSettingsImportOasis"_ustr, true, SvXMLImportFlags::SETTINGS));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Impress_XMLOasisStylesImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLImport(pCtx, "XMLImpressStylesImportOasis", false,
+ return cppu::acquire(new SdXMLImport(pCtx, u"XMLImpressStylesImportOasis"_ustr, false,
SvXMLImportFlags::STYLES | SvXMLImportFlags::AUTOSTYLES
| SvXMLImportFlags::MASTERSTYLES));
}
@@ -271,7 +271,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Impress_XMLOasisContentImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new SdXMLImport(pCtx, "XMLImpressContentImportOasis", false,
+ return cppu::acquire(new SdXMLImport(pCtx, u"XMLImpressContentImportOasis"_ustr, false,
SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::CONTENT
| SvXMLImportFlags::SCRIPTS
| SvXMLImportFlags::FONTDECLS));
@@ -282,7 +282,7 @@ com_sun_star_comp_Impress_XMLOasisMetaImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(
- new SdXMLImport(pCtx, "XMLImpressMetaImportOasis", false, SvXMLImportFlags::META));
+ new SdXMLImport(pCtx, u"XMLImpressMetaImportOasis"_ustr, false, SvXMLImportFlags::META));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
@@ -290,7 +290,7 @@ com_sun_star_comp_Impress_XMLOasisSettingsImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(
- new SdXMLImport(pCtx, "XMLImpressSettingsImportOasis", false, SvXMLImportFlags::SETTINGS));
+ new SdXMLImport(pCtx, u"XMLImpressSettingsImportOasis"_ustr, false, SvXMLImportFlags::SETTINGS));
}
SdXMLImport::SdXMLImport(
@@ -325,7 +325,7 @@ void SAL_CALL SdXMLImport::setTargetDocument( const uno::Reference< lang::XCompo
if( !xDocServices.is() )
throw lang::IllegalArgumentException();
- mbIsDraw = !xDocServices->supportsService("com.sun.star.presentation.PresentationDocument");
+ mbIsDraw = !xDocServices->supportsService(u"com.sun.star.presentation.PresentationDocument"_ustr);
// prepare access to styles
uno::Reference< style::XStyleFamiliesSupplier > xFamSup( GetModel(), uno::UNO_QUERY );
@@ -524,7 +524,7 @@ void SdXMLImport::SetViewSettings(const css::uno::Sequence<css::beans::PropertyV
try
{
- xPropSet->setPropertyValue("VisibleArea", uno::Any( aVisArea ) );
+ xPropSet->setPropertyValue(u"VisibleArea"_ustr, uno::Any( aVisArea ) );
}
catch(const css::uno::Exception&)
{
@@ -540,7 +540,7 @@ void SdXMLImport::SetConfigurationSettings(const css::uno::Sequence<css::beans::
if( !xFac.is() )
return;
- uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xProps( xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY );
if( !xProps.is() )
return;
@@ -668,9 +668,9 @@ void SdXMLImport::NotifyContainsEmbeddedFont()
uno::Reference< lang::XMultiServiceFactory > xFac( GetModel(), uno::UNO_QUERY );
if( xFac.is() )
{
- uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xProps( xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY );
if( xProps.is() )
- xProps->setPropertyValue("EmbedFonts", uno::Any( true ) );
+ xProps->setPropertyValue(u"EmbedFonts"_ustr, uno::Any( true ) );
}
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 0f150c847cd2..9463b3e64eb8 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -230,7 +230,7 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement
if( xSet.is() )
{
OUString aEngine;
- xSet->getPropertyValue("CustomShapeEngine") >>= aEngine;
+ xSet->getPropertyValue(u"CustomShapeEngine"_ustr) >>= aEngine;
if ( aEngine.isEmpty() )
{
aEngine = "com.sun.star.drawing.EnhancedCustomShapeEngine";
@@ -240,8 +240,8 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement
if ( !aEngine.isEmpty() )
{
uno::Sequence< beans::PropertyValue > aPropValues{
- comphelper::makePropertyValue("CustomShape", xShape),
- comphelper::makePropertyValue("ForceGroupWithText", true)
+ comphelper::makePropertyValue(u"CustomShape"_ustr, xShape),
+ comphelper::makePropertyValue(u"ForceGroupWithText"_ustr, true)
};
uno::Sequence< uno::Any > aArgument = { uno::Any(aPropValues) };
uno::Reference< uno::XInterface > xInterface(
@@ -323,9 +323,9 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
- if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("IsEmptyPresentationObject") )
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(u"IsEmptyPresentationObject"_ustr) )
{
- uno::Any aAny = xPropSet->getPropertyValue("IsEmptyPresentationObject");
+ uno::Any aAny = xPropSet->getPropertyValue(u"IsEmptyPresentationObject"_ustr);
aAny >>= bIsEmptyPresObj;
}
@@ -346,8 +346,8 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
if( bObjSupportsStyle )
{
- if( xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName("Style") )
- xPropSet->getPropertyValue("Style") >>= xStyle;
+ if( xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName(u"Style"_ustr) )
+ xPropSet->getPropertyValue(u"Style"_ustr) >>= xStyle;
if(xStyle.is())
{
@@ -359,7 +359,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
if(xStylePropSet.is())
{
OUString aFamilyName;
- xStylePropSet->getPropertyValue("Family") >>= aFamilyName;
+ xStylePropSet->getPropertyValue(u"Family"_ustr) >>= aFamilyName;
if( !aFamilyName.isEmpty() && aFamilyName != "graphics" )
aShapeInfo.mnFamily = XmlStyleFamily::SD_PRESENTATION_ID;
}
@@ -381,7 +381,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
}
}
- if (aParentName.isEmpty() && xPropertySetInfo->hasPropertyByName("TextBox") && xPropSet->getPropertyValue("TextBox").hasValue() && xPropSet->getPropertyValue("TextBox").get<bool>())
+ if (aParentName.isEmpty() && xPropertySetInfo->hasPropertyByName(u"TextBox"_ustr) && xPropSet->getPropertyValue(u"TextBox"_ustr).hasValue() && xPropSet->getPropertyValue(u"TextBox"_ustr).get<bool>())
{
// Shapes with a Writer TextBox always have a parent style.
// If there would be none, then assign the default one.
@@ -461,8 +461,8 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
// * defaults for style properties are not written, but we need to write the "left",
// because we need to distinguish this "left" from the case where not align attribute
// is present which means "void"
- if ( xPropSetInfo->hasPropertyByName( "ParaAdjust" )
- && ( beans::PropertyState_DEFAULT_VALUE == xPropState->getPropertyState( "ParaAdjust" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"ParaAdjust"_ustr )
+ && ( beans::PropertyState_DEFAULT_VALUE == xPropState->getPropertyState( u"ParaAdjust"_ustr ) )
)
{
sal_Int32 nIndex = GetExport().GetTextParagraphExport()->GetParagraphPropertyMapper()->getPropertySetMapper()->FindEntryIndex( CTF_SD_SHAPE_PARA_ADJUST );
@@ -470,7 +470,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
// as member, thus saving time.
DBG_ASSERT(-1 != nIndex, "XMLShapeExport::collectShapeAutoStyles: could not obtain the index for the ParaAdjust context id!");
- XMLPropertyState aAlignDefaultState(nIndex, xPropSet->getPropertyValue("ParaAdjust"));
+ XMLPropertyState aAlignDefaultState(nIndex, xPropSet->getPropertyValue(u"ParaAdjust"_ustr));
aPropStates.push_back( aAlignDefaultState );
}
@@ -482,11 +482,11 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
if( nCount )
{
- aShapeInfo.msTextStyleName = mrExport.GetAutoStylePool()->Find( XmlStyleFamily::TEXT_PARAGRAPH, "", aPropStates );
+ aShapeInfo.msTextStyleName = mrExport.GetAutoStylePool()->Find( XmlStyleFamily::TEXT_PARAGRAPH, u""_ustr, aPropStates );
if(aShapeInfo.msTextStyleName.isEmpty())
{
// Style did not exist, add it to AutoStalePool
- aShapeInfo.msTextStyleName = mrExport.GetAutoStylePool()->Add(XmlStyleFamily::TEXT_PARAGRAPH, "", std::move(aPropStates));
+ aShapeInfo.msTextStyleName = mrExport.GetAutoStylePool()->Add(XmlStyleFamily::TEXT_PARAGRAPH, u""_ustr, std::move(aPropStates));
}
}
}
@@ -731,7 +731,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
{
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY );
OUString aLayerName;
- xProps->getPropertyValue("LayerName") >>= aLayerName;
+ xProps->getPropertyValue(u"LayerName"_ustr) >>= aLayerName;
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_LAYER, aLayerName );
}
@@ -1189,7 +1189,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
if(xPropSet.is())
{
OUString sCLSID;
- if(xPropSet->getPropertyValue("CLSID") >>= sCLSID)
+ if(xPropSet->getPropertyValue(u"CLSID"_ustr) >>= sCLSID)
{
#if !ENABLE_WASM_STRIP_CHART
// WASM_CHART change
@@ -1247,7 +1247,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
if(xPropSet.is()) try
{
OUString sCLSID;
- if(xPropSet->getPropertyValue("CLSID") >>= sCLSID)
+ if(xPropSet->getPropertyValue(u"CLSID"_ustr) >>= sCLSID)
{
if( sCLSID == SvGlobalName( SO3_SC_CLASSID ).GetHexName() )
{
@@ -1328,41 +1328,41 @@ void XMLShapeExport::ImpExportSignatureLine(const uno::Reference<drawing::XShape
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_QUERY);
bool bIsSignatureLine = false;
- xPropSet->getPropertyValue("IsSignatureLine") >>= bIsSignatureLine;
+ xPropSet->getPropertyValue(u"IsSignatureLine"_ustr) >>= bIsSignatureLine;
if (!bIsSignatureLine)
return;
OUString aSignatureLineId;
- xPropSet->getPropertyValue("SignatureLineId") >>= aSignatureLineId;
+ xPropSet->getPropertyValue(u"SignatureLineId"_ustr) >>= aSignatureLineId;
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_ID, aSignatureLineId);
OUString aSuggestedSignerName;
- xPropSet->getPropertyValue("SignatureLineSuggestedSignerName") >>= aSuggestedSignerName;
+ xPropSet->getPropertyValue(u"SignatureLineSuggestedSignerName"_ustr) >>= aSuggestedSignerName;
if (!aSuggestedSignerName.isEmpty())
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SUGGESTED_SIGNER_NAME, aSuggestedSignerName);
OUString aSuggestedSignerTitle;
- xPropSet->getPropertyValue("SignatureLineSuggestedSignerTitle") >>= aSuggestedSignerTitle;
+ xPropSet->getPropertyValue(u"SignatureLineSuggestedSignerTitle"_ustr) >>= aSuggestedSignerTitle;
if (!aSuggestedSignerTitle.isEmpty())
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SUGGESTED_SIGNER_TITLE, aSuggestedSignerTitle);
OUString aSuggestedSignerEmail;
- xPropSet->getPropertyValue("SignatureLineSuggestedSignerEmail") >>= aSuggestedSignerEmail;
+ xPropSet->getPropertyValue(u"SignatureLineSuggestedSignerEmail"_ustr) >>= aSuggestedSignerEmail;
if (!aSuggestedSignerEmail.isEmpty())
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SUGGESTED_SIGNER_EMAIL, aSuggestedSignerEmail);
OUString aSigningInstructions;
- xPropSet->getPropertyValue("SignatureLineSigningInstructions") >>= aSigningInstructions;
+ xPropSet->getPropertyValue(u"SignatureLineSigningInstructions"_ustr) >>= aSigningInstructions;
if (!aSigningInstructions.isEmpty())
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SIGNING_INSTRUCTIONS, aSigningInstructions);
bool bShowSignDate = false;
- xPropSet->getPropertyValue("SignatureLineShowSignDate") >>= bShowSignDate;
+ xPropSet->getPropertyValue(u"SignatureLineShowSignDate"_ustr) >>= bShowSignDate;
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SHOW_SIGN_DATE,
bShowSignDate ? XML_TRUE : XML_FALSE);
bool bCanAddComment = false;
- xPropSet->getPropertyValue("SignatureLineCanAddComment") >>= bCanAddComment;
+ xPropSet->getPropertyValue(u"SignatureLineCanAddComment"_ustr) >>= bCanAddComment;
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_CAN_ADD_COMMENT,
bCanAddComment ? XML_TRUE : XML_FALSE);
@@ -1374,7 +1374,7 @@ void XMLShapeExport::ImpExportQRCode(const uno::Reference<drawing::XShape>& xSha
{
uno::Reference<beans::XPropertySet> xPropSet(xShape, uno::UNO_QUERY);
- uno::Any aAny = xPropSet->getPropertyValue("BarCodeProperties");
+ uno::Any aAny = xPropSet->getPropertyValue(u"BarCodeProperties"_ustr);
css::drawing::BarCode aBarCode;
if(!(aAny >>= aBarCode))
@@ -1426,14 +1426,14 @@ void XMLShapeExport::ExportGraphicDefaults()
try
{
- uno::Reference< beans::XPropertySet > xDefaults( xFact->createInstance("com.sun.star.drawing.Defaults"), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xDefaults( xFact->createInstance(u"com.sun.star.drawing.Defaults"_ustr), uno::UNO_QUERY );
if( xDefaults.is() )
{
aStEx->exportDefaultStyle( xDefaults, XML_STYLE_FAMILY_SD_GRAPHICS_NAME, xPropertySetMapper );
// write graphic styles (family name differs depending on the module)
- aStEx->exportStyleFamily("graphics", XML_STYLE_FAMILY_SD_GRAPHICS_NAME, xPropertySetMapper, false, XmlStyleFamily::SD_GRAPHICS_ID);
- aStEx->exportStyleFamily("GraphicStyles", XML_STYLE_FAMILY_SD_GRAPHICS_NAME, xPropertySetMapper, false, XmlStyleFamily::SD_GRAPHICS_ID);
+ aStEx->exportStyleFamily(u"graphics"_ustr, XML_STYLE_FAMILY_SD_GRAPHICS_NAME, xPropertySetMapper, false, XmlStyleFamily::SD_GRAPHICS_ID);
+ aStEx->exportStyleFamily(u"GraphicStyles"_ustr, XML_STYLE_FAMILY_SD_GRAPHICS_NAME, xPropertySetMapper, false, XmlStyleFamily::SD_GRAPHICS_ID);
}
}
catch(const lang::ServiceNotRegisteredException&)
@@ -1493,13 +1493,13 @@ void XMLShapeExport::ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix&
*/
uno::Any aAny;
if ( !( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) &&
- xPropSet->getPropertySetInfo()->hasPropertyByName("TransformationInHoriL2R") )
+ xPropSet->getPropertySetInfo()->hasPropertyByName(u"TransformationInHoriL2R"_ustr) )
{
- aAny = xPropSet->getPropertyValue("TransformationInHoriL2R");
+ aAny = xPropSet->getPropertyValue(u"TransformationInHoriL2R"_ustr);
}
else
{
- aAny = xPropSet->getPropertyValue("Transformation");
+ aAny = xPropSet->getPropertyValue(u"Transformation"_ustr);
}
drawing::HomogenMatrix3 aMatrix;
aAny >>= aMatrix;
@@ -1634,18 +1634,18 @@ bool XMLShapeExport::ImpExportPresentationAttributes( const uno::Reference< bean
// is empty pres. shape?
- if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("IsEmptyPresentationObject"))
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(u"IsEmptyPresentationObject"_ustr))
{
- xPropSet->getPropertyValue("IsEmptyPresentationObject") >>= bIsEmpty;
+ xPropSet->getPropertyValue(u"IsEmptyPresentationObject"_ustr) >>= bIsEmpty;
if( bIsEmpty )
mrExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PLACEHOLDER, XML_TRUE);
}
// is user-transformed?
- if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("IsPlaceholderDependent"))
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(u"IsPlaceholderDependent"_ustr))
{
bool bTemp = false;
- xPropSet->getPropertyValue("IsPlaceholderDependent") >>= bTemp;
+ xPropSet->getPropertyValue(u"IsPlaceholderDependent"_ustr) >>= bTemp;
if(!bTemp)
mrExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_USER_TRANSFORMED, XML_TRUE);
}
@@ -1809,7 +1809,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
OUString aEventQName(
mrExport.GetNamespaceMap().GetQNameByKey(
- XML_NAMESPACE_DOM, "click" ) );
+ XML_NAMESPACE_DOM, u"click"_ustr ) );
mrExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, aEventQName );
mrExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_ACTION, eStrAction );
@@ -1899,10 +1899,10 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
mrExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_LANGUAGE,
mrExport.GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_OOO,
- "starbasic" ) );
+ u"starbasic"_ustr ) );
OUString aEventQName(
mrExport.GetNamespaceMap().GetQNameByKey(
- XML_NAMESPACE_DOM, "click" ) );
+ XML_NAMESPACE_DOM, u"click"_ustr ) );
mrExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, aEventQName );
if( nFound & Found::LIBRARY )
@@ -1932,10 +1932,10 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
XML_NAMESPACE_OOO, GetXMLToken(XML_SCRIPT) ) );
OUString aEventQName(
mrExport.GetNamespaceMap().GetQNameByKey(
- XML_NAMESPACE_DOM, "click" ) );
+ XML_NAMESPACE_DOM, u"click"_ustr ) );
mrExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, aEventQName );
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aStrMacro );
- mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, "simple" );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, u"simple"_ustr );
SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, true, true);
}
@@ -1951,8 +1951,8 @@ void XMLShapeExport::ImpExportDescription( const uno::Reference< drawing::XShape
OUString aDescription;
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
- xProps->getPropertyValue("Title") >>= aTitle;
- xProps->getPropertyValue("Description") >>= aDescription;
+ xProps->getPropertyValue(u"Title"_ustr) >>= aTitle;
+ xProps->getPropertyValue(u"Description"_ustr) >>= aDescription;
if(!aTitle.isEmpty())
{
@@ -2081,7 +2081,7 @@ void XMLShapeExport::ImpExportTextBoxShape(
// evtl. corner radius?
sal_Int32 nCornerRadius(0);
- xPropSet->getPropertyValue("CornerRadius") >>= nCornerRadius;
+ xPropSet->getPropertyValue(u"CornerRadius"_ustr) >>= nCornerRadius;
if(nCornerRadius)
{
OUStringBuffer sStringBuffer;
@@ -2116,7 +2116,7 @@ void XMLShapeExport::ImpExportRectangleShape(
// evtl. corner radius?
sal_Int32 nCornerRadius(0);
- xPropSet->getPropertyValue("CornerRadius") >>= nCornerRadius;
+ xPropSet->getPropertyValue(u"CornerRadius"_ustr) >>= nCornerRadius;
if(nCornerRadius)
{
OUStringBuffer sStringBuffer;
@@ -2166,10 +2166,10 @@ void XMLShapeExport::ImpExportLineShape(
awt::Point aBasePosition(basegfx::fround(aTRTranslate.getX()),
basegfx::fround(aTRTranslate.getY()));
- if (xPropSet->getPropertySetInfo()->hasPropertyByName("Geometry"))
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName(u"Geometry"_ustr))
{
// get the two points
- uno::Any aAny(xPropSet->getPropertyValue("Geometry"));
+ uno::Any aAny(xPropSet->getPropertyValue(u"Geometry"_ustr));
if (auto pSourcePolyPolygon
= o3tl::tryAccess<drawing::PointSequenceSequence>(aAny))
{
@@ -2257,14 +2257,14 @@ void XMLShapeExport::ImpExportEllipseShape(
ImpExportNewTrans(xPropSet, nFeatures, pRefPoint);
drawing::CircleKind eKind = drawing::CircleKind_FULL;
- xPropSet->getPropertyValue("CircleKind") >>= eKind;
+ xPropSet->getPropertyValue(u"CircleKind"_ustr) >>= eKind;
if( eKind != drawing::CircleKind_FULL )
{
OUStringBuffer sStringBuffer;
sal_Int32 nStartAngle = 0;
sal_Int32 nEndAngle = 0;
- xPropSet->getPropertyValue("CircleStartAngle") >>= nStartAngle;
- xPropSet->getPropertyValue("CircleEndAngle") >>= nEndAngle;
+ xPropSet->getPropertyValue(u"CircleStartAngle"_ustr) >>= nStartAngle;
+ xPropSet->getPropertyValue(u"CircleEndAngle"_ustr) >>= nEndAngle;
const double dStartAngle = nStartAngle / 100.0;
const double dEndAngle = nEndAngle / 100.0;
@@ -2332,7 +2332,7 @@ void XMLShapeExport::ImpExportPolygonShape(
// prepare name (with most used)
enum ::xmloff::token::XMLTokenEnum eName(XML_PATH);
- uno::Any aAny( xPropSet->getPropertyValue("Geometry") );
+ uno::Any aAny( xPropSet->getPropertyValue(u"Geometry"_ustr) );
basegfx::B2DPolyPolygon aPolyPolygon;
// tdf#145240 the Any can contain PolyPolygonBezierCoords or PointSequenceSequence
@@ -2458,10 +2458,10 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
{
OUString aStreamURL;
- xPropSet->getPropertyValue("GraphicStreamURL") >>= aStreamURL;
+ xPropSet->getPropertyValue(u"GraphicStreamURL"_ustr) >>= aStreamURL;
OUString sRequestedName = getNameFromStreamURL(aStreamURL);
- xPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ xPropSet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
OUString sInternalURL;
@@ -2473,7 +2473,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
// apply possible changed stream URL to embedded image object
if (!sRequestedName.isEmpty())
{
- OUString newStreamURL = "vnd.sun.star.Package:";
+ OUString newStreamURL = u"vnd.sun.star.Package:"_ustr;
if (sInternalURL[0] == '#')
{
newStreamURL += sInternalURL.subView(1, sInternalURL.getLength() - 1);
@@ -2485,7 +2485,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
if (newStreamURL != aStreamURL)
{
- xPropSet->setPropertyValue("GraphicStreamURL", uno::Any(newStreamURL));
+ xPropSet->setPropertyValue(u"GraphicStreamURL"_ustr, uno::Any(newStreamURL));
}
}
@@ -2509,7 +2509,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
SvtSaveOptions::ODFSVER_013 <= GetExport().getSaneDefaultVersion()
? XML_NAMESPACE_DRAW
: XML_NAMESPACE_LO_EXT,
- "mime-type", sOutMimeType);
+ u"mime-type"_ustr, sOutMimeType);
}
}
@@ -2530,7 +2530,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
&& officecfg::Office::Common::Save::Graphic::AddReplacementImages::get())
{
uno::Reference<graphic::XGraphic> xReplacementGraphic;
- xPropSet->getPropertyValue("ReplacementGraphic") >>= xReplacementGraphic;
+ xPropSet->getPropertyValue(u"ReplacementGraphic"_ustr) >>= xReplacementGraphic;
// If there is no url, then the graphic is empty
if (xReplacementGraphic.is())
@@ -2555,7 +2555,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
SvtSaveOptions::ODFSVER_013 <= GetExport().getSaneDefaultVersion()
? XML_NAMESPACE_DRAW
: XML_NAMESPACE_LO_EXT,
- "mime-type", aMimeType);
+ u"mime-type"_ustr, aMimeType);
}
SvXMLElementExport aElement(mrExport, XML_NAMESPACE_DRAW, XML_IMAGE, true, true);
@@ -2630,7 +2630,7 @@ void XMLShapeExport::ImpExportConnectorShape(
// export connection kind
drawing::ConnectorType eType = drawing::ConnectorType_STANDARD;
- uno::Any aAny = xProps->getPropertyValue("EdgeKind");
+ uno::Any aAny = xProps->getPropertyValue(u"EdgeKind"_ustr);
aAny >>= eType;
if( eType != drawing::ConnectorType_STANDARD )
@@ -2643,11 +2643,11 @@ void XMLShapeExport::ImpExportConnectorShape(
// export line skew
sal_Int32 nDelta1 = 0, nDelta2 = 0, nDelta3 = 0;
- aAny = xProps->getPropertyValue("EdgeLine1Delta");
+ aAny = xProps->getPropertyValue(u"EdgeLine1Delta"_ustr);
aAny >>= nDelta1;
- aAny = xProps->getPropertyValue("EdgeLine2Delta");
+ aAny = xProps->getPropertyValue(u"EdgeLine2Delta"_ustr);
aAny >>= nDelta2;
- aAny = xProps->getPropertyValue("EdgeLine3Delta");
+ aAny = xProps->getPropertyValue(u"EdgeLine3Delta"_ustr);
aAny >>= nDelta3;
if( nDelta1 != 0 || nDelta2 != 0 || nDelta3 != 0 )
@@ -2688,16 +2688,16 @@ void XMLShapeExport::ImpExportConnectorShape(
the OASIS Open Office file format to the OpenOffice.org file format. (#i36248#)
*/
if ( !( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) &&
- xProps->getPropertySetInfo()->hasPropertyByName("StartPositionInHoriL2R") &&
- xProps->getPropertySetInfo()->hasPropertyByName("EndPositionInHoriL2R") )
+ xProps->getPropertySetInfo()->hasPropertyByName(u"StartPositionInHoriL2R"_ustr) &&
+ xProps->getPropertySetInfo()->hasPropertyByName(u"EndPositionInHoriL2R"_ustr) )
{
- xProps->getPropertyValue("StartPositionInHoriL2R") >>= aStart;
- xProps->getPropertyValue("EndPositionInHoriL2R") >>= aEnd;
+ xProps->getPropertyValue(u"StartPositionInHoriL2R"_ustr) >>= aStart;
+ xProps->getPropertyValue(u"EndPositionInHoriL2R"_ustr) >>= aEnd;
}
else
{
- xProps->getPropertyValue("StartPosition") >>= aStart;
- xProps->getPropertyValue("EndPosition") >>= aEnd;
+ xProps->getPropertyValue(u"StartPosition"_ustr) >>= aStart;
+ xProps->getPropertyValue(u"EndPosition"_ustr) >>= aEnd;
}
if( pRefPoint )
@@ -2749,13 +2749,13 @@ void XMLShapeExport::ImpExportConnectorShape(
uno::Reference< uno::XInterface > xRefE;
// export start connection
- xProps->getPropertyValue("StartShape") >>= xRefS;
+ xProps->getPropertyValue(u"StartShape"_ustr) >>= xRefS;
if( xRefS.is() )
{
const OUString& rShapeId = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xRefS );
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_START_SHAPE, rShapeId);
- aAny = xProps->getPropertyValue("StartGluePointIndex");
+ aAny = xProps->getPropertyValue(u"StartGluePointIndex"_ustr);
sal_Int32 nGluePointId = 0;
if( aAny >>= nGluePointId )
{
@@ -2767,13 +2767,13 @@ void XMLShapeExport::ImpExportConnectorShape(
}
// export end connection
- xProps->getPropertyValue("EndShape") >>= xRefE;
+ xProps->getPropertyValue(u"EndShape"_ustr) >>= xRefE;
if( xRefE.is() )
{
const OUString& rShapeId = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xRefE );
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_END_SHAPE, rShapeId);
- aAny = xProps->getPropertyValue("EndGluePointIndex");
+ aAny = xProps->getPropertyValue(u"EndGluePointIndex"_ustr);
sal_Int32 nGluePointId = 0;
if( aAny >>= nGluePointId )
{
@@ -2785,7 +2785,7 @@ void XMLShapeExport::ImpExportConnectorShape(
}
// get PolygonBezier
- aAny = xProps->getPropertyValue("PolyPolygonBezier");
+ aAny = xProps->getPropertyValue(u"PolyPolygonBezier"_ustr);
auto pSourcePolyPolygon = o3tl::tryAccess<drawing::PolyPolygonBezierCoords>(aAny);
if(pSourcePolyPolygon && pSourcePolyPolygon->Coordinates.getLength())
{
@@ -2857,16 +2857,16 @@ void XMLShapeExport::ImpExportMeasureShape(
the OASIS Open Office file format to the OpenOffice.org file format. (#i36248#)
*/
if ( !( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) &&
- xProps->getPropertySetInfo()->hasPropertyByName("StartPositionInHoriL2R") &&
- xProps->getPropertySetInfo()->hasPropertyByName("EndPositionInHoriL2R") )
+ xProps->getPropertySetInfo()->hasPropertyByName(u"StartPositionInHoriL2R"_ustr) &&
+ xProps->getPropertySetInfo()->hasPropertyByName(u"EndPositionInHoriL2R"_ustr) )
{
- xProps->getPropertyValue("StartPositionInHoriL2R") >>= aStart;
- xProps->getPropertyValue("EndPositionInHoriL2R") >>= aEnd;
+ xProps->getPropertyValue(u"StartPositionInHoriL2R"_ustr) >>= aStart;
+ xProps->getPropertyValue(u"EndPositionInHoriL2R"_ustr) >>= aEnd;
}
else
{
- xProps->getPropertyValue("StartPosition") >>= aStart;
- xProps->getPropertyValue("EndPosition") >>= aEnd;
+ xProps->getPropertyValue(u"StartPosition"_ustr) >>= aStart;
+ xProps->getPropertyValue(u"EndPosition"_ustr) >>= aEnd;
}
if( pRefPoint )
@@ -2967,7 +2967,7 @@ void XMLShapeExport::ImpExportOLE2Shape(
OUString sClassId;
OUString sURL;
bool bInternal = false;
- xPropSet->getPropertyValue("IsInternal") >>= bInternal;
+ xPropSet->getPropertyValue(u"IsInternal"_ustr) >>= bInternal;
{
@@ -2975,10 +2975,10 @@ void XMLShapeExport::ImpExportOLE2Shape(
{
// OOo internal links have no storage persistence, URL is stored in the XML file
// the result LinkURL is empty in case the object is not a link
- xPropSet->getPropertyValue("LinkURL") >>= sURL;
+ xPropSet->getPropertyValue(u"LinkURL"_ustr) >>= sURL;
}
- xPropSet->getPropertyValue("PersistName") >>= sPersistName;
+ xPropSet->getPropertyValue(u"PersistName"_ustr) >>= sPersistName;
if ( sURL.isEmpty() )
{
if( !sPersistName.isEmpty() )
@@ -2988,7 +2988,7 @@ void XMLShapeExport::ImpExportOLE2Shape(
}
if( !bInternal )
- xPropSet->getPropertyValue("CLSID") >>= sClassId;
+ xPropSet->getPropertyValue(u"CLSID"_ustr) >>= sClassId;
if( !sClassId.isEmpty() )
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_CLASS_ID, sClassId );
@@ -3012,7 +3012,7 @@ void XMLShapeExport::ImpExportOLE2Shape(
{
// tdf#153179 Export the preview graphic of the object if the object is missing.
uno::Reference<graphic::XGraphic> xGraphic;
- xPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ xPropSet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
if (xGraphic.is())
{
@@ -3037,7 +3037,7 @@ void XMLShapeExport::ImpExportOLE2Shape(
<= GetExport().getSaneDefaultVersion()
? XML_NAMESPACE_DRAW
: XML_NAMESPACE_LO_EXT,
- "mime-type", aMimeType);
+ u"mime-type"_ustr, aMimeType);
}
SvXMLElementExport aImageElem(mrExport, XML_NAMESPACE_DRAW, XML_IMAGE, true,
@@ -3072,7 +3072,7 @@ void XMLShapeExport::ImpExportOLE2Shape(
{
// embedded XML
uno::Reference< lang::XComponent > xComp;
- xPropSet->getPropertyValue("Model") >>= xComp;
+ xPropSet->getPropertyValue(u"Model"_ustr) >>= xComp;
SAL_WARN_IF( !xComp.is(), "xmloff", "no xModel for own OLE format" );
mrExport.ExportEmbeddedOwnObject( xComp );
}
@@ -3163,7 +3163,7 @@ void XMLShapeExport::ImpExportCaptionShape(
// evtl. corner radius?
sal_Int32 nCornerRadius(0);
- xPropSet->getPropertyValue("CornerRadius") >>= nCornerRadius;
+ xPropSet->getPropertyValue(u"CornerRadius"_ustr) >>= nCornerRadius;
if(nCornerRadius)
{
OUStringBuffer sStringBuffer;
@@ -3173,7 +3173,7 @@ void XMLShapeExport::ImpExportCaptionShape(
}
awt::Point aCaptionPoint;
- xPropSet->getPropertyValue("CaptionPoint") >>= aCaptionPoint;
+ xPropSet->getPropertyValue(u"CaptionPoint"_ustr) >>= aCaptionPoint;
mrExport.GetMM100UnitConverter().convertMeasureToXML(msBuffer,
aCaptionPoint.X);
@@ -3218,14 +3218,14 @@ void XMLShapeExport::ImpExportFrameShape(
// export frame url
OUString aStr;
- xPropSet->getPropertyValue("FrameURL") >>= aStr;
+ xPropSet->getPropertyValue(u"FrameURL"_ustr) >>= aStr;
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStr) );
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
// export name
- xPropSet->getPropertyValue("FrameName") >>= aStr;
+ xPropSet->getPropertyValue(u"FrameName"_ustr) >>= aStr;
if( !aStr.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_FRAME_NAME, aStr );
@@ -3254,24 +3254,24 @@ void XMLShapeExport::ImpExportAppletShape(
// export frame url
OUString aStr;
- xPropSet->getPropertyValue("AppletCodeBase") >>= aStr;
+ xPropSet->getPropertyValue(u"AppletCodeBase"_ustr) >>= aStr;
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStr) );
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
// export draw:applet-name
- xPropSet->getPropertyValue("AppletName") >>= aStr;
+ xPropSet->getPropertyValue(u"AppletName"_ustr) >>= aStr;
if( !aStr.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr );
// export draw:code
- xPropSet->getPropertyValue("AppletCode") >>= aStr;
+ xPropSet->getPropertyValue(u"AppletCode"_ustr) >>= aStr;
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr );
// export draw:may-script
bool bIsScript = false;
- xPropSet->getPropertyValue("AppletIsScript") >>= bIsScript;
+ xPropSet->getPropertyValue(u"AppletIsScript"_ustr) >>= bIsScript;
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MAY_SCRIPT, bIsScript ? XML_TRUE : XML_FALSE );
{
@@ -3280,7 +3280,7 @@ void XMLShapeExport::ImpExportAppletShape(
// export parameters
uno::Sequence< beans::PropertyValue > aCommands;
- xPropSet->getPropertyValue("AppletCommands") >>= aCommands;
+ xPropSet->getPropertyValue(u"AppletCommands"_ustr) >>= aCommands;
for (const auto& rCommand : aCommands)
{
rCommand.Value >>= aStr;
@@ -3310,14 +3310,14 @@ void XMLShapeExport::ImpExportPluginShape(
// export plugin url
OUString aStr;
- xPropSet->getPropertyValue("PluginURL") >>= aStr;
+ xPropSet->getPropertyValue(u"PluginURL"_ustr) >>= aStr;
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStr) );
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
// export mime-type
- xPropSet->getPropertyValue("PluginMimeType") >>= aStr;
+ xPropSet->getPropertyValue(u"PluginMimeType"_ustr) >>= aStr;
if(!aStr.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr );
@@ -3327,7 +3327,7 @@ void XMLShapeExport::ImpExportPluginShape(
// export parameters
uno::Sequence< beans::PropertyValue > aCommands;
- xPropSet->getPropertyValue("PluginCommands") >>= aCommands;
+ xPropSet->getPropertyValue(u"PluginCommands"_ustr) >>= aCommands;
for (const auto& rCommand : aCommands)
{
rCommand.Value >>= aStr;
@@ -3354,15 +3354,15 @@ static void lcl_CopyStream(
if (!xOutStream.is())
{
SAL_WARN("xmloff", "no output stream");
- throw uno::Exception("no output stream",nullptr);
+ throw uno::Exception(u"no output stream"_ustr,nullptr);
}
uno::Reference< beans::XPropertySet > const xStreamProps(xStream,
uno::UNO_QUERY);
if (xStreamProps.is()) { // this is NOT supported in FileSystemStorage
- xStreamProps->setPropertyValue("MediaType",
+ xStreamProps->setPropertyValue(u"MediaType"_ustr,
uno::Any(rMimeType));
xStreamProps->setPropertyValue( // turn off compression
- "Compressed",
+ u"Compressed"_ustr,
uno::Any(false));
}
::comphelper::OStorageHelper::CopyInputToOutput(xInStream, xOutStream);
@@ -3383,7 +3383,7 @@ lcl_StoreMediaAndGetURL(SvXMLExport & rExport,
uno::Reference<embed::XStorage> const xTarget(
rExport.GetTargetStorage(), uno::UNO_SET_THROW);
uno::Reference<io::XInputStream> xInStream;
- xPropSet->getPropertyValue("PrivateStream")
+ xPropSet->getPropertyValue(u"PrivateStream"_ustr)
>>= xInStream;
if (!xInStream.is())
@@ -3425,13 +3425,13 @@ void ExportGraphicPreview(const uno::Reference<graphic::XGraphic>& xGraphic, SvX
OUString sPictureName;
if( bExportEmbedded )
{
- xPictureStream.set( xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.comp.MemoryStream", xContext), uno::UNO_QUERY_THROW );
+ xPictureStream.set( xContext->getServiceManager()->createInstanceWithContext( u"com.sun.star.comp.MemoryStream"_ustr, xContext), uno::UNO_QUERY_THROW );
}
else
{
xStorage.set( rExport.GetTargetStorage(), uno::UNO_SET_THROW );
- xPictureStorage.set( xStorage->openStorageElement( "Pictures" , ::embed::ElementModes::READWRITE ), uno::UNO_SET_THROW );
+ xPictureStorage.set( xStorage->openStorageElement( u"Pictures"_ustr , ::embed::ElementModes::READWRITE ), uno::UNO_SET_THROW );
sal_Int32 nIndex = 0;
do
@@ -3445,8 +3445,8 @@ void ExportGraphicPreview(const uno::Reference<graphic::XGraphic>& xGraphic, SvX
uno::Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(xContext) );
uno::Sequence< beans::PropertyValue > aArgs{
- comphelper::makePropertyValue("MimeType", rMimeType ),
- comphelper::makePropertyValue("OutputStream", xPictureStream->getOutputStream())
+ comphelper::makePropertyValue(u"MimeType"_ustr, rMimeType ),
+ comphelper::makePropertyValue(u"OutputStream"_ustr, xPictureStream->getOutputStream())
};
xProvider->storeGraphic( xGraphic, aArgs );
@@ -3505,9 +3505,9 @@ void XMLShapeExport::ImpExportMediaShape(
// export media url
OUString aMediaURL;
- xPropSet->getPropertyValue("MediaURL") >>= aMediaURL;
+ xPropSet->getPropertyValue(u"MediaURL"_ustr) >>= aMediaURL;
OUString sMimeType;
- xPropSet->getPropertyValue("MediaMimeType") >>= sMimeType;
+ xPropSet->getPropertyValue(u"MediaMimeType"_ustr) >>= sMimeType;
OUString const persistentURL =
lcl_StoreMediaAndGetURL(GetExport(), xPropSet, aMediaURL, sMimeType);
@@ -3542,14 +3542,14 @@ void XMLShapeExport::ImpExportMediaShape(
delete new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true );
sal_Int16 nVolumeDB = 0;
- xPropSet->getPropertyValue("VolumeDB") >>= nVolumeDB;
- mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, "VolumeDB" );
+ xPropSet->getPropertyValue(u"VolumeDB"_ustr) >>= nVolumeDB;
+ mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, u"VolumeDB"_ustr );
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, OUString::number( nVolumeDB ) );
delete new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true );
media::ZoomLevel eZoom;
OUString aZoomValue;
- xPropSet->getPropertyValue("Zoom") >>= eZoom;
+ xPropSet->getPropertyValue(u"Zoom"_ustr) >>= eZoom;
switch( eZoom )
{
case media::ZoomLevel_ZOOM_1_TO_4 : aZoomValue = "25%"; break;
@@ -3567,7 +3567,7 @@ void XMLShapeExport::ImpExportMediaShape(
if( !aZoomValue.isEmpty() )
{
- mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, "Zoom" );
+ mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, u"Zoom"_ustr );
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, aZoomValue );
delete new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true );
}
@@ -3577,12 +3577,12 @@ void XMLShapeExport::ImpExportMediaShape(
if (officecfg::Office::Common::Save::Graphic::AddReplacementImages::get())
{
uno::Reference<graphic::XGraphic> xGraphic;
- xPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ xPropSet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
Graphic aGraphic(xGraphic);
if (!aGraphic.IsNone())
{
// The media has a preview, export it.
- ExportGraphicPreview(xGraphic, mrExport, u"MediaPreview", u".png", "image/png");
+ ExportGraphicPreview(xGraphic, mrExport, u"MediaPreview", u".png", u"image/png"_ustr);
}
}
@@ -3644,7 +3644,7 @@ void XMLShapeExport::ImpExport3DShape(
OUStringBuffer sStringBuffer;
// transformation (UNO_NAME_3D_TRANSFORM_MATRIX == "D3DTransformMatrix")
- uno::Any aAny = xPropSet->getPropertyValue("D3DTransformMatrix");
+ uno::Any aAny = xPropSet->getPropertyValue(u"D3DTransformMatrix"_ustr);
drawing::HomogenMatrix aHomMat;
aAny >>= aHomMat;
SdXMLImExTransform3D aTransform;
@@ -3657,13 +3657,13 @@ void XMLShapeExport::ImpExport3DShape(
case XmlShapeType::Draw3DCubeObject:
{
// minEdge
- aAny = xPropSet->getPropertyValue("D3DPosition");
+ aAny = xPropSet->getPropertyValue(u"D3DPosition"_ustr);
drawing::Position3D aPosition3D;
aAny >>= aPosition3D;
::basegfx::B3DVector aPos3D(aPosition3D.PositionX, aPosition3D.PositionY, aPosition3D.PositionZ);
// maxEdge
- aAny = xPropSet->getPropertyValue("D3DSize");
+ aAny = xPropSet->getPropertyValue(u"D3DSize"_ustr);
drawing::Direction3D aDirection3D;
aAny >>= aDirection3D;
::basegfx::B3DVector aDir3D(aDirection3D.DirectionX, aDirection3D.DirectionY, aDirection3D.DirectionZ);
@@ -3697,13 +3697,13 @@ void XMLShapeExport::ImpExport3DShape(
case XmlShapeType::Draw3DSphereObject:
{
// Center
- aAny = xPropSet->getPropertyValue("D3DPosition");
+ aAny = xPropSet->getPropertyValue(u"D3DPosition"_ustr);
drawing::Position3D aPosition3D;
aAny >>= aPosition3D;
::basegfx::B3DVector aPos3D(aPosition3D.PositionX, aPosition3D.PositionY, aPosition3D.PositionZ);
// Size
- aAny = xPropSet->getPropertyValue("D3DSize");
+ aAny = xPropSet->getPropertyValue(u"D3DSize"_ustr);
drawing::Direction3D aDirection3D;
aAny >>= aDirection3D;
::basegfx::B3DVector aDir3D(aDirection3D.DirectionX, aDirection3D.DirectionY, aDirection3D.DirectionZ);
@@ -3735,7 +3735,7 @@ void XMLShapeExport::ImpExport3DShape(
case XmlShapeType::Draw3DExtrudeObject:
{
// write special 3DLathe/3DExtrude attributes, get 3D tools::PolyPolygon as drawing::PolyPolygonShape3D
- aAny = xPropSet->getPropertyValue("D3DPolyPolygon3D");
+ aAny = xPropSet->getPropertyValue(u"D3DPolyPolygon3D"_ustr);
drawing::PolyPolygonShape3D aUnoPolyPolygon3D;
aAny >>= aUnoPolyPolygon3D;
@@ -3798,7 +3798,7 @@ void XMLShapeExport::export3DSceneAttributes( const css::uno::Reference< css::be
OUStringBuffer sStringBuffer;
// world transformation (UNO_NAME_3D_TRANSFORM_MATRIX == "D3DTransformMatrix")
- uno::Any aAny = xPropSet->getPropertyValue("D3DTransformMatrix");
+ uno::Any aAny = xPropSet->getPropertyValue(u"D3DTransformMatrix"_ustr);
drawing::HomogenMatrix aHomMat;
aAny >>= aHomMat;
SdXMLImExTransform3D aTransform;
@@ -3807,7 +3807,7 @@ void XMLShapeExport::export3DSceneAttributes( const css::uno::Reference< css::be
mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_TRANSFORM, aTransform.GetExportString(mrExport.GetMM100UnitConverter()));
// VRP, VPN, VUP
- aAny = xPropSet->getPropertyValue("D3DCameraGeometry");
+ aAny = xPropSet->getPropertyValue(u"D3DCameraGeometry"_ustr);
drawing::CameraGeometry aCamGeo;
aAny >>= aCamGeo;
@@ -3836,7 +3836,7 @@ void XMLShapeExport::export3DSceneAttributes( const css::uno::Reference< css::be
}
// projection "D3DScenePerspective" drawing::ProjectionMode
- aAny = xPropSet->getPropertyValue("D3DScenePerspective");
+ aAny = xPropSet->getPropertyValue(u"D3DScenePerspective"_ustr);
drawing::ProjectionMode aPrjMode;
aAny >>= aPrjMode;
if(aPrjMode == drawing::ProjectionMode_PARALLEL)
@@ -3846,7 +3846,7 @@ void XMLShapeExport::export3DSceneAttributes( const css::uno::Reference< css::be
mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_PROJECTION, aStr);
// distance
- aAny = xPropSet->getPropertyValue("D3DSceneDistance");
+ aAny = xPropSet->getPropertyValue(u"D3DSceneDistance"_ustr);
sal_Int32 nDistance = 0;
aAny >>= nDistance;
mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer,
@@ -3855,7 +3855,7 @@ void XMLShapeExport::export3DSceneAttributes( const css::uno::Reference< css::be
mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_DISTANCE, aStr);
// focalLength
- aAny = xPropSet->getPropertyValue("D3DSceneFocalLength");
+ aAny = xPropSet->getPropertyValue(u"D3DSceneFocalLength"_ustr);
sal_Int32 nFocalLength = 0;
aAny >>= nFocalLength;
mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer,
@@ -3864,13 +3864,13 @@ void XMLShapeExport::export3DSceneAttributes( const css::uno::Reference< css::be
mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_FOCAL_LENGTH, aStr);
// shadowSlant
- aAny = xPropSet->getPropertyValue("D3DSceneShadowSlant");
+ aAny = xPropSet->getPropertyValue(u"D3DSceneShadowSlant"_ustr);
sal_Int16 nShadowSlant = 0;
aAny >>= nShadowSlant;
mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SHADOW_SLANT, OUString::number(static_cast<sal_Int32>(nShadowSlant)));
// shadeMode
- aAny = xPropSet->getPropertyValue("D3DSceneShadeMode");
+ aAny = xPropSet->getPropertyValue(u"D3DSceneShadeMode"_ustr);
drawing::ShadeMode aShadeMode;
if(aAny >>= aShadeMode)
{
@@ -3891,7 +3891,7 @@ void XMLShapeExport::export3DSceneAttributes( const css::uno::Reference< css::be
mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SHADE_MODE, aStr);
// ambientColor
- aAny = xPropSet->getPropertyValue("D3DSceneAmbientColor");
+ aAny = xPropSet->getPropertyValue(u"D3DSceneAmbientColor"_ustr);
sal_Int32 nAmbientColor = 0;
aAny >>= nAmbientColor;
::sax::Converter::convertColor(sStringBuffer, nAmbientColor);
@@ -3899,7 +3899,7 @@ void XMLShapeExport::export3DSceneAttributes( const css::uno::Reference< css::be
mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_AMBIENT_COLOR, aStr);
// lightingMode
- aAny = xPropSet->getPropertyValue("D3DSceneTwoSidedLighting");
+ aAny = xPropSet->getPropertyValue(u"D3DSceneTwoSidedLighting"_ustr);
bool bTwoSidedLighting = false;
aAny >>= bTwoSidedLighting;
::sax::Converter::convertBool(sStringBuffer, bTwoSidedLighting);
@@ -4379,7 +4379,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc
if ( aGeoPropSet >>= aGeoPropSeq )
{
bool bCoordinates = false;
- OUString aCustomShapeType( "non-primitive" );
+ OUString aCustomShapeType( u"non-primitive"_ustr );
for (const beans::PropertyValue& rGeoProp : aGeoPropSeq)
{
@@ -4780,7 +4780,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc
if (!bSkewValuesProvided)
{
// so we need to export default values explicitly
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_EXTRUSION_SKEW, "50 -135");
+ rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_EXTRUSION_SKEW, u"50 -135"_ustr);
}
}
}
@@ -5091,15 +5091,15 @@ void XMLShapeExport::ImpExportCustomShape(
if ( xPropSetInfo.is() )
{
OUString aStr;
- if ( xPropSetInfo->hasPropertyByName( "CustomShapeEngine" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"CustomShapeEngine"_ustr ) )
{
- uno::Any aEngine( xPropSet->getPropertyValue( "CustomShapeEngine" ) );
+ uno::Any aEngine( xPropSet->getPropertyValue( u"CustomShapeEngine"_ustr ) );
if ( ( aEngine >>= aStr ) && !aStr.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_ENGINE, aStr );
}
- if ( xPropSetInfo->hasPropertyByName( "CustomShapeData" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"CustomShapeData"_ustr ) )
{
- uno::Any aData( xPropSet->getPropertyValue( "CustomShapeData" ) );
+ uno::Any aData( xPropSet->getPropertyValue( u"CustomShapeData"_ustr ) );
if ( ( aData >>= aStr ) && !aStr.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DATA, aStr );
}
@@ -5143,7 +5143,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
{
if( !bIsEmptyPresObj )
{
- uno::Reference< container::XNamed > xTemplate( xPropSet->getPropertyValue("TableTemplate"), uno::UNO_QUERY );
+ uno::Reference< container::XNamed > xTemplate( xPropSet->getPropertyValue(u"TableTemplate"_ustr), uno::UNO_QUERY );
if( xTemplate.is() )
{
const OUString sTemplate( xTemplate->getName() );
@@ -5176,8 +5176,8 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
if (!bIsEmptyPresObj
&& officecfg::Office::Common::Save::Graphic::AddReplacementImages::get())
{
- uno::Reference< graphic::XGraphic > xGraphic( xPropSet->getPropertyValue("ReplacementGraphic"), uno::UNO_QUERY );
- ExportGraphicPreview(xGraphic, mrExport, u"TablePreview", u".svm", "image/x-vclgraphic");
+ uno::Reference< graphic::XGraphic > xGraphic( xPropSet->getPropertyValue(u"ReplacementGraphic"_ustr), uno::UNO_QUERY );
+ ExportGraphicPreview(xGraphic, mrExport, u"TablePreview", u".svm", u"image/x-vclgraphic"_ustr);
}
ImpExportEvents( xShape );
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 06e61539abbf..fe251856a0e4 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -131,7 +131,7 @@ XMLShapeImportHelper::XMLShapeImportHelper(
mpPresPagePropsMapper = new SvXMLImportPropertyMapper( xMapper, rImporter );
uno::Reference< lang::XServiceInfo > xInfo( rImporter.GetModel(), uno::UNO_QUERY );
- mpImpl->mbIsPresentationShapesSupported = xInfo.is() && xInfo->supportsService( "com.sun.star.presentation.PresentationDocument" );
+ mpImpl->mbIsPresentationShapesSupported = xInfo.is() && xInfo->supportsService( u"com.sun.star.presentation.PresentationDocument"_ustr );
}
XMLShapeImportHelper::~XMLShapeImportHelper()
@@ -488,11 +488,11 @@ void XMLShapeImportHelper::finishShape(
{
if ( mrImporter.IsShapePositionInHoriL2R() &&
xPropSet->getPropertySetInfo()->hasPropertyByName(
- "PositionLayoutDir") )
+ u"PositionLayoutDir"_ustr) )
{
uno::Any aPosLayoutDir;
aPosLayoutDir <<= text::PositionLayoutDir::PositionInHoriL2R;
- xPropSet->setPropertyValue( "PositionLayoutDir", aPosLayoutDir );
+ xPropSet->setPropertyValue( u"PositionLayoutDir"_ustr, aPosLayoutDir );
}
}
}
@@ -544,10 +544,10 @@ void ShapeGroupContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos )
uno::Reference< beans::XPropertySet > xPropSet;
aAny >>= xPropSet;
- if( !(xPropSet.is() && xPropSet->getPropertySetInfo()->hasPropertyByName( "ZOrder" )) )
+ if( !(xPropSet.is() && xPropSet->getPropertySetInfo()->hasPropertyByName( u"ZOrder"_ustr )) )
return;
- xPropSet->setPropertyValue( "ZOrder", uno::Any(nDestPos) );
+ xPropSet->setPropertyValue( u"ZOrder"_ustr, uno::Any(nDestPos) );
for( ZOrderHint& rHint : maZOrderList )
{
@@ -794,9 +794,9 @@ void XMLShapeImportHelper::restoreConnections()
uno::Any aLine1Delta;
uno::Any aLine2Delta;
uno::Any aLine3Delta;
- OUString aStr1("EdgeLine1Delta");
- OUString aStr2("EdgeLine2Delta");
- OUString aStr3("EdgeLine3Delta");
+ OUString aStr1(u"EdgeLine1Delta"_ustr);
+ OUString aStr2(u"EdgeLine2Delta"_ustr);
+ OUString aStr3(u"EdgeLine3Delta"_ustr);
aLine1Delta = xConnector->getPropertyValue(aStr1);
aLine2Delta = xConnector->getPropertyValue(aStr2);
aLine3Delta = xConnector->getPropertyValue(aStr3);
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index c3ea5a4b0f70..e3c1133e5739 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -245,8 +245,8 @@ void SdXMLImExTransform2D::AddSkewX(double fNew)
const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& rConv)
{
OUStringBuffer aNewString;
- OUString aClosingBrace(")");
- OUString aEmptySpace(" ");
+ OUString aClosingBrace(u")"_ustr);
+ OUString aEmptySpace(u" "_ustr);
const sal_uInt32 nCount = maList.size();
for(sal_uInt32 a(0); a < nCount; a++)
@@ -618,8 +618,8 @@ void SdXMLImExTransform3D::AddHomogenMatrix(const drawing::HomogenMatrix& xHomMa
const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& rConv)
{
OUStringBuffer aNewString;
- OUString aClosingBrace(")");
- OUString aEmptySpace(" ");
+ OUString aClosingBrace(u")"_ustr);
+ OUString aEmptySpace(u" "_ustr);
const sal_uInt32 nCount = maList.size();
for(sal_uInt32 a(0); a < nCount; a++)
@@ -1034,7 +1034,7 @@ SdXMLImExViewBox::SdXMLImExViewBox(OUString aNew, const SvXMLUnitConverter& rCon
const OUString& SdXMLImExViewBox::GetExportString()
{
OUString aNewString;
- OUString aEmptySpace(" ");
+ OUString aEmptySpace(u" "_ustr);
Imp_PutDoubleChar(aNewString, mfX);
aNewString += aEmptySpace;
diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx
index c17defc2426b..7d9b0f6fbcf8 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -79,7 +79,7 @@ void SdXML3DObjectContext::startFastElement(
// set parameters
if(mbSetTransform)
{
- xPropSet->setPropertyValue("D3DTransformMatrix", uno::Any(mxHomMat));
+ xPropSet->setPropertyValue(u"D3DTransformMatrix"_ustr, uno::Any(mxHomMat));
}
// call parent
@@ -132,7 +132,7 @@ void SdXML3DCubeObjectShapeContext::startFastElement(
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
// create shape
- AddShape( "com.sun.star.drawing.Shape3DCubeObject" );
+ AddShape( u"com.sun.star.drawing.Shape3DCubeObject"_ustr );
if(!mxShape.is())
return;
@@ -160,8 +160,8 @@ void SdXML3DCubeObjectShapeContext::startFastElement(
aDirection3D.DirectionY = maMaxEdge.getY();
aDirection3D.DirectionZ = maMaxEdge.getZ();
- xPropSet->setPropertyValue("D3DPosition", uno::Any(aPosition3D));
- xPropSet->setPropertyValue("D3DSize", uno::Any(aDirection3D));
+ xPropSet->setPropertyValue(u"D3DPosition"_ustr, uno::Any(aPosition3D));
+ xPropSet->setPropertyValue(u"D3DSize"_ustr, uno::Any(aDirection3D));
}
SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext(
@@ -209,7 +209,7 @@ void SdXML3DSphereObjectShapeContext::startFastElement(
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
// create shape
- AddShape( "com.sun.star.drawing.Shape3DSphereObject" );
+ AddShape( u"com.sun.star.drawing.Shape3DSphereObject"_ustr );
if(!mxShape.is())
return;
@@ -234,8 +234,8 @@ void SdXML3DSphereObjectShapeContext::startFastElement(
aDirection3D.DirectionY = maSphereSize.getY();
aDirection3D.DirectionZ = maSphereSize.getZ();
- xPropSet->setPropertyValue("D3DPosition", uno::Any(aPosition3D));
- xPropSet->setPropertyValue("D3DSize", uno::Any(aDirection3D));
+ xPropSet->setPropertyValue(u"D3DPosition"_ustr, uno::Any(aPosition3D));
+ xPropSet->setPropertyValue(u"D3DSize"_ustr, uno::Any(aDirection3D));
}
SdXML3DPolygonBasedShapeContext::SdXML3DPolygonBasedShapeContext(
@@ -301,7 +301,7 @@ void SdXML3DPolygonBasedShapeContext::startFastElement(
aPolyPolygon3D);
// set polygon data
- xPropSet->setPropertyValue("D3DPolyPolygon3D", uno::Any(aPolyPolygon3D));
+ xPropSet->setPropertyValue(u"D3DPolyPolygon3D"_ustr, uno::Any(aPolyPolygon3D));
}
else
{
@@ -331,7 +331,7 @@ void SdXML3DLatheObjectShapeContext::startFastElement(
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
// create shape
- AddShape( "com.sun.star.drawing.Shape3DLatheObject" );
+ AddShape( u"com.sun.star.drawing.Shape3DLatheObject"_ustr );
if(mxShape.is())
{
// add, set style and properties from base shape
@@ -356,7 +356,7 @@ void SdXML3DExtrudeObjectShapeContext::startFastElement(
sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
- AddShape( "com.sun.star.drawing.Shape3DExtrudeObject" );
+ AddShape( u"com.sun.star.drawing.Shape3DExtrudeObject"_ustr );
if(mxShape.is())
{
// add, set style and properties from base shape
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index 41dd535b19ef..a137cc247f4e 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -109,7 +109,7 @@ void SdXML3DSceneShapeContext::startFastElement(
{
// create new 3DScene shape and add it to rShapes, use it
// as base for the new 3DScene import
- AddShape( "com.sun.star.drawing.Shape3DSceneObject" );
+ AddShape( u"com.sun.star.drawing.Shape3DSceneObject"_ustr );
if( mxShape.is() )
{
SetStyle();
@@ -322,21 +322,21 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const css::uno::Reference
// world transformation
if(mbSetTransform)
{
- xPropSet->setPropertyValue("D3DTransformMatrix", uno::Any(mxHomMat));
+ xPropSet->setPropertyValue(u"D3DTransformMatrix"_ustr, uno::Any(mxHomMat));
}
// distance
- xPropSet->setPropertyValue("D3DSceneDistance", uno::Any(mnDistance));
+ xPropSet->setPropertyValue(u"D3DSceneDistance"_ustr, uno::Any(mnDistance));
// focalLength
- xPropSet->setPropertyValue("D3DSceneFocalLength", uno::Any(mnFocalLength));
+ xPropSet->setPropertyValue(u"D3DSceneFocalLength"_ustr, uno::Any(mnFocalLength));
// shadowSlant
- xPropSet->setPropertyValue("D3DSceneShadowSlant", uno::Any(static_cast<sal_Int16>(mnShadowSlant)));
+ xPropSet->setPropertyValue(u"D3DSceneShadowSlant"_ustr, uno::Any(static_cast<sal_Int16>(mnShadowSlant)));
// shadeMode
- xPropSet->setPropertyValue("D3DSceneShadeMode", uno::Any(mxShadeMode));
+ xPropSet->setPropertyValue(u"D3DSceneShadeMode"_ustr, uno::Any(mxShadeMode));
// ambientColor
- xPropSet->setPropertyValue("D3DSceneAmbientColor", uno::Any(maAmbientColor));
+ xPropSet->setPropertyValue(u"D3DSceneAmbientColor"_ustr, uno::Any(maAmbientColor));
// lightingMode
- xPropSet->setPropertyValue("D3DSceneTwoSidedLighting", uno::Any(mbLightingMode));
+ xPropSet->setPropertyValue(u"D3DSceneTwoSidedLighting"_ustr, uno::Any(mbLightingMode));
if( !maList.empty() )
{
@@ -361,58 +361,58 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const css::uno::Reference
{
case 0:
{
- xPropSet->setPropertyValue("D3DSceneLightColor1", aAny);
- xPropSet->setPropertyValue("D3DSceneLightDirection1", aAny2);
- xPropSet->setPropertyValue("D3DSceneLightOn1", aAny3);
+ xPropSet->setPropertyValue(u"D3DSceneLightColor1"_ustr, aAny);
+ xPropSet->setPropertyValue(u"D3DSceneLightDirection1"_ustr, aAny2);
+ xPropSet->setPropertyValue(u"D3DSceneLightOn1"_ustr, aAny3);
break;
}
case 1:
{
- xPropSet->setPropertyValue("D3DSceneLightColor2", aAny);
- xPropSet->setPropertyValue("D3DSceneLightDirection2", aAny2);
- xPropSet->setPropertyValue("D3DSceneLightOn2", aAny3);
+ xPropSet->setPropertyValue(u"D3DSceneLightColor2"_ustr, aAny);
+ xPropSet->setPropertyValue(u"D3DSceneLightDirection2"_ustr, aAny2);
+ xPropSet->setPropertyValue(u"D3DSceneLightOn2"_ustr, aAny3);
break;
}
case 2:
{
- xPropSet->setPropertyValue("D3DSceneLightColor3", aAny);
- xPropSet->setPropertyValue("D3DSceneLightDirection3", aAny2);
- xPropSet->setPropertyValue("D3DSceneLightOn3", aAny3);
+ xPropSet->setPropertyValue(u"D3DSceneLightColor3"_ustr, aAny);
+ xPropSet->setPropertyValue(u"D3DSceneLightDirection3"_ustr, aAny2);
+ xPropSet->setPropertyValue(u"D3DSceneLightOn3"_ustr, aAny3);
break;
}
case 3:
{
- xPropSet->setPropertyValue("D3DSceneLightColor4", aAny);
- xPropSet->setPropertyValue("D3DSceneLightDirection4", aAny2);
- xPropSet->setPropertyValue("D3DSceneLightOn4", aAny3);
+ xPropSet->setPropertyValue(u"D3DSceneLightColor4"_ustr, aAny);
+ xPropSet->setPropertyValue(u"D3DSceneLightDirection4"_ustr, aAny2);
+ xPropSet->setPropertyValue(u"D3DSceneLightOn4"_ustr, aAny3);
break;
}
case 4:
{
- xPropSet->setPropertyValue("D3DSceneLightColor5", aAny);
- xPropSet->setPropertyValue("D3DSceneLightDirection5", aAny2);
- xPropSet->setPropertyValue("D3DSceneLightOn5", aAny3);
+ xPropSet->setPropertyValue(u"D3DSceneLightColor5"_ustr, aAny);
+ xPropSet->setPropertyValue(u"D3DSceneLightDirection5"_ustr, aAny2);
+ xPropSet->setPropertyValue(u"D3DSceneLightOn5"_ustr, aAny3);
break;
}
case 5:
{
- xPropSet->setPropertyValue("D3DSceneLightColor6", aAny);
- xPropSet->setPropertyValue("D3DSceneLightDirection6", aAny2);
- xPropSet->setPropertyValue("D3DSceneLightOn6", aAny3);
+ xPropSet->setPropertyValue(u"D3DSceneLightColor6"_ustr, aAny);
+ xPropSet->setPropertyValue(u"D3DSceneLightDirection6"_ustr, aAny2);
+ xPropSet->setPropertyValue(u"D3DSceneLightOn6"_ustr, aAny3);
break;
}
case 6:
{
- xPropSet->setPropertyValue("D3DSceneLightColor7", aAny);
- xPropSet->setPropertyValue("D3DSceneLightDirection7", aAny2);
- xPropSet->setPropertyValue("D3DSceneLightOn7", aAny3);
+ xPropSet->setPropertyValue(u"D3DSceneLightColor7"_ustr, aAny);
+ xPropSet->setPropertyValue(u"D3DSceneLightDirection7"_ustr, aAny2);
+ xPropSet->setPropertyValue(u"D3DSceneLightOn7"_ustr, aAny3);
break;
}
case 7:
{
- xPropSet->setPropertyValue("D3DSceneLightColor8", aAny);
- xPropSet->setPropertyValue("D3DSceneLightDirection8", aAny2);
- xPropSet->setPropertyValue("D3DSceneLightOn8", aAny3);
+ xPropSet->setPropertyValue(u"D3DSceneLightColor8"_ustr, aAny);
+ xPropSet->setPropertyValue(u"D3DSceneLightDirection8"_ustr, aAny2);
+ xPropSet->setPropertyValue(u"D3DSceneLightOn8"_ustr, aAny3);
break;
}
}
@@ -430,11 +430,11 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const css::uno::Reference
aCamGeo.vup.DirectionX = maVUP.getX();
aCamGeo.vup.DirectionY = maVUP.getY();
aCamGeo.vup.DirectionZ = maVUP.getZ();
- xPropSet->setPropertyValue("D3DCameraGeometry", uno::Any(aCamGeo));
+ xPropSet->setPropertyValue(u"D3DCameraGeometry"_ustr, uno::Any(aCamGeo));
// #91047# set drawing::ProjectionMode AFTER camera geometry is set
// projection "D3DScenePerspective" drawing::ProjectionMode
- xPropSet->setPropertyValue("D3DScenePerspective", uno::Any(mxPrjMode));
+ xPropSet->setPropertyValue(u"D3DScenePerspective"_ustr, uno::Any(mxPrjMode));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
index 764c011eec27..38664f6c121d 100644
--- a/xmloff/source/draw/ximpbody.cxx
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -164,7 +164,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
uno::Reference< beans::XPropertySet > xPropSet(xMasterPage, uno::UNO_QUERY_THROW);
if (xPropSet.is())
{
- OUString aPropName("SlideLayout");
+ OUString aPropName(u"SlideLayout"_ustr);
uno::Reference< beans::XPropertySetInfo > xInfo(xPropSet->getPropertySetInfo());
if (xInfo.is() && xInfo->hasPropertyByName(aPropName))
{
@@ -215,7 +215,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
+ aBookmarkName;
}
- xProps->setPropertyValue("BookmarkURL", uno::Any( sHREF ) );
+ xProps->setPropertyValue(u"BookmarkURL"_ustr, uno::Any( sHREF ) );
}
}
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index 86d8b6bf75e9..28aa08d09a1d 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -882,7 +882,7 @@ void XMLEnhancedCustomShapeContext::startFastElement(
sal_Int32 nAttrNumber;
std::optional<std::string_view> oSpecularityValue; // for postpone extrusion-specularity
std::optional<OUString> oPathValue; // for postpone GetEnhancedPath;
- OUString sType("non-primitive"); // default in ODF
+ OUString sType(u"non-primitive"_ustr); // default in ODF
for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
{
switch( EASGet( aIter.getToken() ) )
diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx
index c9cf7e218a35..1cdc6b0118a2 100644
--- a/xmloff/source/draw/ximpgrp.cxx
+++ b/xmloff/source/draw/ximpgrp.cxx
@@ -75,7 +75,7 @@ void SdXMLGroupShapeContext::startFastElement (sal_Int32 /*nElement*/,
{
// create new group shape and add it to rShapes, use it
// as base for the new group import
- AddShape( "com.sun.star.drawing.GroupShape" );
+ AddShape( u"com.sun.star.drawing.GroupShape"_ustr );
if(mxShape.is())
{
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 37619c72ce34..36ad16ebcb00 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -190,7 +190,7 @@ void DrawAnnotationContext::endFastElement(sal_Int32)
// delete addition newline
mxCursor->gotoEnd( false );
mxCursor->goLeft( 1, true );
- mxCursor->setString( "" );
+ mxCursor->setString( u""_ustr );
// reset cursor
GetImport().GetTextImport()->ResetCursor();
@@ -309,7 +309,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 )
OUString aDateTimeFormat;
const OUString aText( GetSdImport().GetDateTimeDecl( maUseDateTimeDeclName, bFixed, aDateTimeFormat ) );
- xSet->setPropertyValue("IsDateTimeFixed",
+ xSet->setPropertyValue(u"IsDateTimeFixed"_ustr,
Any( bFixed ) );
if( bFixed )
@@ -329,7 +329,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 )
if( pSdNumStyle )
{
- xSet->setPropertyValue("DateTimeFormat",
+ xSet->setPropertyValue(u"DateTimeFormat"_ustr,
Any( pSdNumStyle->GetDrawKey() ) );
}
}
@@ -378,7 +378,7 @@ void SdXMLGenericPageContext::SetStyle( OUString const & rStyleName )
Reference< lang::XMultiServiceFactory > xServiceFact(GetSdImport().GetModel(), uno::UNO_QUERY);
if(xServiceFact.is())
{
- xBackgroundSet.set(xServiceFact->createInstance("com.sun.star.drawing.Background"), UNO_QUERY);
+ xBackgroundSet.set(xServiceFact->createInstance(u"com.sun.star.drawing.Background"_ustr), UNO_QUERY);
}
}
@@ -439,7 +439,7 @@ void SdXMLGenericPageContext::SetLayout()
Reference <beans::XPropertySet> xPropSet(mxShapes, uno::UNO_QUERY);
if(xPropSet.is())
{
- OUString aPropName("Layout");
+ OUString aPropName(u"Layout"_ustr);
Reference< beans::XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo() );
if( xInfo.is() && xInfo->hasPropertyByName( aPropName ) )
xPropSet->setPropertyValue(aPropName, uno::Any( static_cast<sal_Int16>(nType) ) );
@@ -494,13 +494,13 @@ void SdXMLGenericPageContext::SetPageMaster( OUString const & rsPageMasterName )
Reference <beans::XPropertySet> xPropSet(xMasterPage, uno::UNO_QUERY);
if (xPropSet.is())
{
- xPropSet->setPropertyValue("BorderBottom", Any(pPageMasterContext->GetBorderBottom()));
- xPropSet->setPropertyValue("BorderLeft", Any(pPageMasterContext->GetBorderLeft()));
- xPropSet->setPropertyValue("BorderRight", Any(pPageMasterContext->GetBorderRight()));
- xPropSet->setPropertyValue("BorderTop", Any(pPageMasterContext->GetBorderTop()));
- xPropSet->setPropertyValue("Width", Any(pPageMasterContext->GetWidth()));
- xPropSet->setPropertyValue("Height", Any(pPageMasterContext->GetHeight()));
- xPropSet->setPropertyValue("Orientation", Any(pPageMasterContext->GetOrientation()));
+ xPropSet->setPropertyValue(u"BorderBottom"_ustr, Any(pPageMasterContext->GetBorderBottom()));
+ xPropSet->setPropertyValue(u"BorderLeft"_ustr, Any(pPageMasterContext->GetBorderLeft()));
+ xPropSet->setPropertyValue(u"BorderRight"_ustr, Any(pPageMasterContext->GetBorderRight()));
+ xPropSet->setPropertyValue(u"BorderTop"_ustr, Any(pPageMasterContext->GetBorderTop()));
+ xPropSet->setPropertyValue(u"Width"_ustr, Any(pPageMasterContext->GetWidth()));
+ xPropSet->setPropertyValue(u"Height"_ustr, Any(pPageMasterContext->GetHeight()));
+ xPropSet->setPropertyValue(u"Orientation"_ustr, Any(pPageMasterContext->GetOrientation()));
}
}
@@ -588,7 +588,7 @@ void SdXMLGenericPageContext::SetNavigationOrder()
}
Reference< XPropertySet > xSet( mxShapes, UNO_QUERY_THROW );
- xSet->setPropertyValue("NavigationOrder", Any( Reference< XIndexAccess >( new XoNavigationOrderAccess( aShapes ) ) ) );
+ xSet->setPropertyValue(u"NavigationOrder"_ustr, Any( Reference< XIndexAccess >( new XoNavigationOrderAccess( aShapes ) ) ) );
}
catch(const uno::Exception&)
{
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 29770fe10db0..27e98821f19b 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -338,7 +338,7 @@ void SdXMLShapeContext::endFastElement(sal_Int32 )
// delete addition newline
mxCursor->gotoEnd( false );
mxCursor->goLeft( 1, true );
- mxCursor->setString( "" );
+ mxCursor->setString( u""_ustr );
// reset cursor
GetImport().GetTextImport()->ResetCursor();
@@ -356,8 +356,8 @@ void SdXMLShapeContext::endFastElement(sal_Int32 )
{
uno::Reference< beans::XPropertySet > xProp( mxShape, uno::UNO_QUERY );
- if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName( "Hyperlink" ) )
- xProp->setPropertyValue( "Hyperlink", uno::Any( msHyperlink ) );
+ if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName( u"Hyperlink"_ustr ) )
+ xProp->setPropertyValue( u"Hyperlink"_ustr, uno::Any( msHyperlink ) );
Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY );
if( xEventsSupplier.is() )
@@ -365,30 +365,30 @@ void SdXMLShapeContext::endFastElement(sal_Int32 )
Reference< XNameReplace > xEvents( xEventsSupplier->getEvents(), UNO_SET_THROW );
uno::Sequence< beans::PropertyValue > aProperties{
- { /* Name */ "EventType",
+ { /* Name */ u"EventType"_ustr,
/* Handle */ -1,
- /* Value */ uno::Any(OUString( "Presentation" )),
+ /* Value */ uno::Any(u"Presentation"_ustr),
/* State */ beans::PropertyState_DIRECT_VALUE },
- { /* Name */ "ClickAction",
+ { /* Name */ u"ClickAction"_ustr,
/* Handle */ -1,
/* Value */ uno::Any(css::presentation::ClickAction_DOCUMENT),
/* State */ beans::PropertyState_DIRECT_VALUE },
- { /* Name */ "Bookmark",
+ { /* Name */ u"Bookmark"_ustr,
/* Handle */ -1,
/* Value */ uno::Any(msHyperlink),
/* State */ beans::PropertyState_DIRECT_VALUE }
};
- xEvents->replaceByName( "OnClick", Any( aProperties ) );
+ xEvents->replaceByName( u"OnClick"_ustr, Any( aProperties ) );
}
else
{
// in draw use the Bookmark property
Reference< beans::XPropertySet > xSet( mxShape, UNO_QUERY_THROW );
- xSet->setPropertyValue( "Bookmark", Any( msHyperlink ) );
- xSet->setPropertyValue("OnClick", Any( css::presentation::ClickAction_DOCUMENT ) );
+ xSet->setPropertyValue( u"Bookmark"_ustr, Any( msHyperlink ) );
+ xSet->setPropertyValue(u"OnClick"_ustr, Any( css::presentation::ClickAction_DOCUMENT ) );
}
}
catch(const Exception&)
@@ -428,10 +428,10 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
{
uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY_THROW );
if( !mbVisible )
- xSet->setPropertyValue("Visible", uno::Any( false ) );
+ xSet->setPropertyValue(u"Visible"_ustr, uno::Any( false ) );
if( !mbPrintable )
- xSet->setPropertyValue("Printable", uno::Any( false ) );
+ xSet->setPropertyValue(u"Printable"_ustr, uno::Any( false ) );
}
catch(const Exception&)
{
@@ -448,10 +448,10 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
{
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
- if (mnRelWidth && xPropertySetInfo->hasPropertyByName("RelativeWidth"))
- xPropertySet->setPropertyValue("RelativeWidth", uno::Any(mnRelWidth));
- if (mnRelHeight && xPropertySetInfo->hasPropertyByName("RelativeHeight"))
- xPropertySet->setPropertyValue("RelativeHeight", uno::Any(mnRelHeight));
+ if (mnRelWidth && xPropertySetInfo->hasPropertyByName(u"RelativeWidth"_ustr))
+ xPropertySet->setPropertyValue(u"RelativeWidth"_ustr, uno::Any(mnRelWidth));
+ if (mnRelHeight && xPropertySetInfo->hasPropertyByName(u"RelativeHeight"_ustr))
+ xPropertySet->setPropertyValue(u"RelativeHeight"_ustr, uno::Any(mnRelHeight));
}
if( !maShapeId.isEmpty() )
@@ -493,7 +493,7 @@ void SdXMLShapeContext::AddShape(OUString const & serviceName)
if ( serviceName == "com.sun.star.drawing.OLE2Shape" &&
uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() )
{
- xShape.set(xServiceFact->createInstance("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"), uno::UNO_QUERY);
+ xShape.set(xServiceFact->createInstance(u"com.sun.star.drawing.temporaryForXMLImportOLE2Shape"_ustr), uno::UNO_QUERY);
}
else if (serviceName == "com.sun.star.drawing.GraphicObjectShape"
|| serviceName == "com.sun.star.drawing.AppletShape"
@@ -600,7 +600,7 @@ void SdXMLShapeContext::SetTransformation()
aUnoMatrix.Line3.Column2 = 0;
aUnoMatrix.Line3.Column3 = 1;
- xPropSet->setPropertyValue("Transformation", Any(aUnoMatrix));
+ xPropSet->setPropertyValue(u"Transformation"_ustr, Any(aUnoMatrix));
}
void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
@@ -678,10 +678,10 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
else
{
// get graphics family
- if (xFamilies->hasByName("graphics"))
- xFamilies->getByName("graphics") >>= xFamily;
+ if (xFamilies->hasByName(u"graphics"_ustr))
+ xFamilies->getByName(u"graphics"_ustr) >>= xFamily;
else
- xFamilies->getByName("GraphicStyles") >>= xFamily;
+ xFamilies->getByName(u"GraphicStyles"_ustr) >>= xFamily;
aStyleName = GetImport().GetStyleDisplayName(
XmlStyleFamily::SD_GRAPHICS_ID,
@@ -704,7 +704,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
try
{
// set style on object
- xPropSet->setPropertyValue("Style", Any(xStyle));
+ xPropSet->setPropertyValue(u"Style"_ustr, Any(xStyle));
}
catch(const uno::Exception&)
{
@@ -766,7 +766,7 @@ void SdXMLShapeContext::SetLayer()
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
if(xPropSet.is() )
{
- xPropSet->setPropertyValue("LayerName", Any(maLayerName));
+ xPropSet->setPropertyValue(u"LayerName"_ustr, Any(maLayerName));
return;
}
}
@@ -787,13 +787,13 @@ void SdXMLShapeContext::SetThumbnail()
return;
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
- if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName( "ThumbnailGraphic" ) )
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName( u"ThumbnailGraphic"_ustr ) )
{
// load the thumbnail graphic and export it to a wmf stream so we can set
// it at the api
uno::Reference<graphic::XGraphic> xGraphic = GetImport().loadGraphicByURL(maThumbnailURL);
- xPropSet->setPropertyValue("ThumbnailGraphic", uno::Any(xGraphic));
+ xPropSet->setPropertyValue(u"ThumbnailGraphic"_ustr, uno::Any(xGraphic));
}
}
catch(const uno::Exception&)
@@ -960,7 +960,7 @@ void SdXMLRectShapeContext::startFastElement (sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
{
// create rectangle shape
- AddShape("com.sun.star.drawing.RectangleShape");
+ AddShape(u"com.sun.star.drawing.RectangleShape"_ustr);
if(!mxShape.is())
return;
@@ -978,7 +978,7 @@ void SdXMLRectShapeContext::startFastElement (sal_Int32 nElement,
{
try
{
- xPropSet->setPropertyValue("CornerRadius", uno::Any( mnRadius ) );
+ xPropSet->setPropertyValue(u"CornerRadius"_ustr, uno::Any( mnRadius ) );
}
catch(const uno::Exception&)
{
@@ -1045,7 +1045,7 @@ void SdXMLLineShapeContext::startFastElement (sal_Int32 nElement,
// This is necessary to take into account all anchor positions and
// other things. All shape imports use the same import schemata now.
// create necessary shape (Line Shape)
- AddShape("com.sun.star.drawing.PolyLineShape");
+ AddShape(u"com.sun.star.drawing.PolyLineShape"_ustr);
if(!mxShape.is())
return;
@@ -1083,7 +1083,7 @@ void SdXMLLineShapeContext::startFastElement (sal_Int32 nElement,
pInnerSequence++;
*pInnerSequence = awt::Point(o3tl::saturating_sub(mnX2, aTopLeft.X), o3tl::saturating_sub(mnY2, aTopLeft.Y));
- xPropSet->setPropertyValue("Geometry", Any(aPolyPoly));
+ xPropSet->setPropertyValue(u"Geometry"_ustr, Any(aPolyPoly));
}
// Size is included in point coordinates
@@ -1178,7 +1178,7 @@ void SdXMLEllipseShapeContext::startFastElement (sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
{
// create rectangle shape
- AddShape("com.sun.star.drawing.EllipseShape");
+ AddShape(u"com.sun.star.drawing.EllipseShape"_ustr);
if(!mxShape.is())
return;
@@ -1226,9 +1226,9 @@ void SdXMLEllipseShapeContext::startFastElement (sal_Int32 nElement,
mnEndAngle = (54000 - mnOldStartAngle) % 36000;
}
- xPropSet->setPropertyValue("CircleKind", Any( meKind) );
- xPropSet->setPropertyValue("CircleStartAngle", Any(mnStartAngle) );
- xPropSet->setPropertyValue("CircleEndAngle", Any(mnEndAngle) );
+ xPropSet->setPropertyValue(u"CircleKind"_ustr, Any( meKind) );
+ xPropSet->setPropertyValue(u"CircleStartAngle"_ustr, Any(mnStartAngle) );
+ xPropSet->setPropertyValue(u"CircleEndAngle"_ustr, Any(mnEndAngle) );
}
}
@@ -1272,9 +1272,9 @@ void SdXMLPolygonShapeContext::startFastElement (sal_Int32 nElement,
{
// Add, set Style and properties from base shape
if(mbClosed)
- AddShape("com.sun.star.drawing.PolyPolygonShape");
+ AddShape(u"com.sun.star.drawing.PolyPolygonShape"_ustr);
else
- AddShape("com.sun.star.drawing.PolyLineShape");
+ AddShape(u"com.sun.star.drawing.PolyLineShape"_ustr);
if( !mxShape.is() )
return;
@@ -1322,7 +1322,7 @@ void SdXMLPolygonShapeContext::startFastElement (sal_Int32 nElement,
css::drawing::PointSequenceSequence aPointSequenceSequence;
basegfx::utils::B2DPolyPolygonToUnoPointSequenceSequence(basegfx::B2DPolyPolygon(aPolygon), aPointSequenceSequence);
- xPropSet->setPropertyValue("Geometry", Any(aPointSequenceSequence));
+ xPropSet->setPropertyValue(u"Geometry"_ustr, Any(aPointSequenceSequence));
// Size is now contained in the point coordinates, adapt maSize for
// to use the correct transformation matrix in SetTransformation()
maSize.Width = 1;
@@ -1476,7 +1476,7 @@ void SdXMLPathShapeContext::startFastElement (sal_Int32 nElement,
aAny <<= aSourcePolyPolygon;
}
- xPropSet->setPropertyValue("Geometry", aAny);
+ xPropSet->setPropertyValue(u"Geometry"_ustr, aAny);
// Size is now contained in the point coordinates, adapt maSize for
// to use the correct transformation matrix in SetTransformation()
maSize.Width = 1;
@@ -1496,7 +1496,7 @@ SdXMLTextBoxShapeContext::SdXMLTextBoxShapeContext(
uno::Reference< drawing::XShapes > const & rShapes)
: SdXMLShapeContext( rImport, xAttrList, rShapes, false/*bTemporaryShape*/ ),
mnRadius(0),
- maChainNextName("")
+ maChainNextName(u""_ustr)
{
}
@@ -1607,11 +1607,11 @@ void SdXMLTextBoxShapeContext::startFastElement (sal_Int32 nElement,
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
if( xPropsInfo.is() )
{
- if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
+ if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(u"IsEmptyPresentationObject"_ustr))
+ xProps->setPropertyValue(u"IsEmptyPresentationObject"_ustr, css::uno::Any(false) );
- if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
+ if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(u"IsPlaceholderDependent"_ustr))
+ xProps->setPropertyValue(u"IsPlaceholderDependent"_ustr, css::uno::Any(false) );
}
}
}
@@ -1619,7 +1619,7 @@ void SdXMLTextBoxShapeContext::startFastElement (sal_Int32 nElement,
if( bClearText )
{
uno::Reference< text::XText > xText( mxShape, uno::UNO_QUERY );
- xText->setString( "" );
+ xText->setString( u""_ustr );
}
// set parameters on shape
@@ -1642,7 +1642,7 @@ void SdXMLTextBoxShapeContext::startFastElement (sal_Int32 nElement,
{
try
{
- xPropSet->setPropertyValue("CornerRadius", uno::Any( mnRadius ) );
+ xPropSet->setPropertyValue(u"CornerRadius"_ustr, uno::Any( mnRadius ) );
}
catch(const uno::Exception&)
{
@@ -1658,7 +1658,7 @@ void SdXMLTextBoxShapeContext::startFastElement (sal_Int32 nElement,
{
try
{
- xPropSet->setPropertyValue("TextChainNextName",
+ xPropSet->setPropertyValue(u"TextChainNextName"_ustr,
uno::Any( maChainNextName ) );
}
catch(const uno::Exception&)
@@ -1704,7 +1704,7 @@ void SdXMLControlShapeContext::startFastElement (sal_Int32 nElement,
{
// create Control shape
// add, set style and properties from base shape
- AddShape("com.sun.star.drawing.ControlShape");
+ AddShape(u"com.sun.star.drawing.ControlShape"_ustr);
if( !mxShape.is() )
return;
@@ -1939,7 +1939,7 @@ void SdXMLConnectorShapeContext::startFastElement (sal_Int32 nElement,
// create Connector shape
// add, set style and properties from base shape
- AddShape("com.sun.star.drawing.ConnectorShape");
+ AddShape(u"com.sun.star.drawing.ConnectorShape"_ustr);
if(!mxShape.is())
return;
@@ -1968,7 +1968,7 @@ void SdXMLConnectorShapeContext::startFastElement (sal_Int32 nElement,
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if (xProps.is())
- xProps->setPropertyValue("EdgeOOXMLCurve", Any(mbLikelyOOXMLCurve));
+ xProps->setPropertyValue(u"EdgeOOXMLCurve"_ustr, Any(mbLikelyOOXMLCurve));
// add connection ids
if( !maStartShapeId.isEmpty() )
@@ -1978,12 +1978,12 @@ void SdXMLConnectorShapeContext::startFastElement (sal_Int32 nElement,
if( xProps.is() )
{
- xProps->setPropertyValue("StartPosition", Any(maStart));
- xProps->setPropertyValue("EndPosition", Any(maEnd) );
- xProps->setPropertyValue("EdgeKind", Any(mnType) );
- xProps->setPropertyValue("EdgeLine1Delta", Any(mnDelta1) );
- xProps->setPropertyValue("EdgeLine2Delta", Any(mnDelta2) );
- xProps->setPropertyValue("EdgeLine3Delta", Any(mnDelta3) );
+ xProps->setPropertyValue(u"StartPosition"_ustr, Any(maStart));
+ xProps->setPropertyValue(u"EndPosition"_ustr, Any(maEnd) );
+ xProps->setPropertyValue(u"EdgeKind"_ustr, Any(mnType) );
+ xProps->setPropertyValue(u"EdgeLine1Delta"_ustr, Any(mnDelta1) );
+ xProps->setPropertyValue(u"EdgeLine2Delta"_ustr, Any(mnDelta2) );
+ xProps->setPropertyValue(u"EdgeLine3Delta"_ustr, Any(mnDelta3) );
}
SetStyle();
SetLayer();
@@ -2065,7 +2065,7 @@ void SdXMLConnectorShapeContext::startFastElement (sal_Int32 nElement,
if ( bApplySVGD )
{
assert(maPath.getValueType() == cppu::UnoType<drawing::PolyPolygonBezierCoords>::get());
- xProps->setPropertyValue("PolyPolygonBezier", maPath);
+ xProps->setPropertyValue(u"PolyPolygonBezier"_ustr, maPath);
}
}
@@ -2132,7 +2132,7 @@ void SdXMLMeasureShapeContext::startFastElement (sal_Int32 nElement,
{
// create Measure shape
// add, set style and properties from base shape
- AddShape("com.sun.star.drawing.MeasureShape");
+ AddShape(u"com.sun.star.drawing.MeasureShape"_ustr);
if(!mxShape.is())
return;
@@ -2142,15 +2142,15 @@ void SdXMLMeasureShapeContext::startFastElement (sal_Int32 nElement,
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- xProps->setPropertyValue("StartPosition", Any(maStart));
- xProps->setPropertyValue("EndPosition", Any(maEnd) );
+ xProps->setPropertyValue(u"StartPosition"_ustr, Any(maStart));
+ xProps->setPropertyValue(u"EndPosition"_ustr, Any(maEnd) );
}
// delete pre created fields
uno::Reference< text::XText > xText( mxShape, uno::UNO_QUERY );
if( xText.is() )
{
- xText->setString( " " );
+ xText->setString( u" "_ustr );
}
SdXMLShapeContext::startFastElement(nElement, xAttrList);
@@ -2171,7 +2171,7 @@ void SdXMLMeasureShapeContext::endFastElement(sal_Int32 nElement)
xCursor->collapseToStart();
xCursor->goRight( 1, true );
- xCursor->setString( "" );
+ xCursor->setString( u""_ustr );
}
while(false);
@@ -2215,11 +2215,11 @@ void SdXMLPageShapeContext::startFastElement (sal_Int32 nElement,
GetImport().GetShapeImport()->IsPresentationShapesSupported();
uno::Reference< lang::XServiceInfo > xInfo( mxShapes, uno::UNO_QUERY );
- const bool bIsOnHandoutPage = xInfo.is() && xInfo->supportsService("com.sun.star.presentation.HandoutMasterPage");
+ const bool bIsOnHandoutPage = xInfo.is() && xInfo->supportsService(u"com.sun.star.presentation.HandoutMasterPage"_ustr);
if( bIsOnHandoutPage )
{
- AddShape("com.sun.star.presentation.HandoutShape");
+ AddShape(u"com.sun.star.presentation.HandoutShape"_ustr);
}
else
{
@@ -2230,11 +2230,11 @@ void SdXMLPageShapeContext::startFastElement (sal_Int32 nElement,
if(bIsPresentation)
{
- AddShape("com.sun.star.presentation.PageShape");
+ AddShape(u"com.sun.star.presentation.PageShape"_ustr);
}
else
{
- AddShape("com.sun.star.drawing.PageShape");
+ AddShape(u"com.sun.star.drawing.PageShape"_ustr);
}
}
@@ -2280,7 +2280,7 @@ void SdXMLCaptionShapeContext::startFastElement (sal_Int32 nElement,
{
// create Caption shape
// add, set style and properties from base shape
- AddShape("com.sun.star.drawing.CaptionShape");
+ AddShape(u"com.sun.star.drawing.CaptionShape"_ustr);
if( !mxShape.is() )
return;
@@ -2297,20 +2297,20 @@ void SdXMLCaptionShapeContext::startFastElement (sal_Int32 nElement,
bool bIsAutoGrowWidth = false;
if ( xProps.is() )
{
- uno::Any aAny( xProps->getPropertyValue("TextAutoGrowWidth") );
+ uno::Any aAny( xProps->getPropertyValue(u"TextAutoGrowWidth"_ustr) );
aAny >>= bIsAutoGrowWidth;
if ( bIsAutoGrowWidth )
- xProps->setPropertyValue("TextAutoGrowWidth", uno::Any( false ) );
+ xProps->setPropertyValue(u"TextAutoGrowWidth"_ustr, uno::Any( false ) );
}
// set pos, size, shear and rotate
SetTransformation();
if( xProps.is() )
- xProps->setPropertyValue("CaptionPoint", uno::Any( maCaptionPoint ) );
+ xProps->setPropertyValue(u"CaptionPoint"_ustr, uno::Any( maCaptionPoint ) );
if ( bIsAutoGrowWidth )
- xProps->setPropertyValue("TextAutoGrowWidth", uno::Any( true ) );
+ xProps->setPropertyValue(u"TextAutoGrowWidth"_ustr, uno::Any( true ) );
if(mnRadius)
{
@@ -2319,7 +2319,7 @@ void SdXMLCaptionShapeContext::startFastElement (sal_Int32 nElement,
{
try
{
- xPropSet->setPropertyValue("CornerRadius", uno::Any( mnRadius ) );
+ xPropSet->setPropertyValue(u"CornerRadius"_ustr, uno::Any( mnRadius ) );
}
catch(const uno::Exception&)
{
@@ -2412,16 +2412,16 @@ void SdXMLGraphicObjectShapeContext::startFastElement (sal_Int32 nElement,
sal_Int32 nUPD, nBuildId;
if( GetImport().getBuildIds( nUPD, nBuildId ) && (nUPD == 645) ) try
{
- xPropset->setPropertyValue("FillStyle", Any( FillStyle_NONE ) );
- xPropset->setPropertyValue("LineStyle", Any( LineStyle_NONE ) );
+ xPropset->setPropertyValue(u"FillStyle"_ustr, Any( FillStyle_NONE ) );
+ xPropset->setPropertyValue(u"LineStyle"_ustr, Any( LineStyle_NONE ) );
}
catch(const Exception&)
{
}
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xPropset->getPropertySetInfo() );
- if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xPropset->setPropertyValue("IsEmptyPresentationObject", css::uno::Any( mbIsPlaceholder ) );
+ if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(u"IsEmptyPresentationObject"_ustr))
+ xPropset->setPropertyValue(u"IsEmptyPresentationObject"_ustr, css::uno::Any( mbIsPlaceholder ) );
if( !mbIsPlaceholder )
{
@@ -2430,7 +2430,7 @@ void SdXMLGraphicObjectShapeContext::startFastElement (sal_Int32 nElement,
uno::Reference<graphic::XGraphic> xGraphic = GetImport().loadGraphicByURL(maURL);
if (xGraphic.is())
{
- xPropset->setPropertyValue("Graphic", uno::Any(xGraphic));
+ xPropset->setPropertyValue(u"Graphic"_ustr, uno::Any(xGraphic));
}
}
}
@@ -2444,8 +2444,8 @@ void SdXMLGraphicObjectShapeContext::startFastElement (sal_Int32 nElement,
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
if( xPropsInfo.is() )
{
- if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
+ if( xPropsInfo->hasPropertyByName(u"IsPlaceholderDependent"_ustr))
+ xProps->setPropertyValue(u"IsPlaceholderDependent"_ustr, css::uno::Any(false) );
}
}
}
@@ -2466,7 +2466,7 @@ void SdXMLGraphicObjectShapeContext::endFastElement(sal_Int32 nElement)
uno::Reference<beans::XPropertySet> xProperties(mxShape, uno::UNO_QUERY);
if (xProperties.is())
{
- xProperties->setPropertyValue("Graphic", uno::Any(xGraphic));
+ xProperties->setPropertyValue(u"Graphic"_ustr, uno::Any(xGraphic));
}
}
}
@@ -2524,8 +2524,8 @@ void SdXMLChartShapeContext::startFastElement (sal_Int32 nElement,
AddShape(
bIsPresentation
- ? OUString("com.sun.star.presentation.ChartShape")
- : OUString("com.sun.star.drawing.OLE2Shape"));
+ ? u"com.sun.star.presentation.ChartShape"_ustr
+ : u"com.sun.star.drawing.OLE2Shape"_ustr);
if(!mxShape.is())
return;
@@ -2539,14 +2539,14 @@ void SdXMLChartShapeContext::startFastElement (sal_Int32 nElement,
if(xProps.is())
{
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
- if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
+ if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(u"IsEmptyPresentationObject"_ustr))
+ xProps->setPropertyValue(u"IsEmptyPresentationObject"_ustr, css::uno::Any(false) );
uno::Any aAny;
- xProps->setPropertyValue("CLSID", Any(OUString("12DCAE26-281F-416F-a234-c3086127382e")) );
+ xProps->setPropertyValue(u"CLSID"_ustr, Any(u"12DCAE26-281F-416F-a234-c3086127382e"_ustr) );
- aAny = xProps->getPropertyValue("Model");
+ aAny = xProps->getPropertyValue(u"Model"_ustr);
uno::Reference< frame::XModel > xChartModel;
if( aAny >>= xChartModel )
{
@@ -2569,8 +2569,8 @@ void SdXMLChartShapeContext::startFastElement (sal_Int32 nElement,
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
if( xPropsInfo.is() )
{
- if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
+ if( xPropsInfo->hasPropertyByName(u"IsPlaceholderDependent"_ustr))
+ xProps->setPropertyValue(u"IsPlaceholderDependent"_ustr, css::uno::Any(false) );
}
}
}
@@ -2637,7 +2637,7 @@ void SdXMLObjectShapeContext::startFastElement (sal_Int32 /*nElement*/,
if( !(GetImport().getImportFlags() & SvXMLImportFlags::EMBEDDED) && !mbIsPlaceholder && ImpIsEmptyURL(maHref) )
return;
- OUString service("com.sun.star.drawing.OLE2Shape");
+ OUString service(u"com.sun.star.drawing.OLE2Shape"_ustr);
bool bIsPresShape = !maPresentationClass.isEmpty() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
@@ -2672,11 +2672,11 @@ void SdXMLObjectShapeContext::startFastElement (sal_Int32 /*nElement*/,
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
if( xPropsInfo.is() )
{
- if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
+ if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(u"IsEmptyPresentationObject"_ustr))
+ xProps->setPropertyValue(u"IsEmptyPresentationObject"_ustr, css::uno::Any(false) );
- if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
+ if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(u"IsPlaceholderDependent"_ustr))
+ xProps->setPropertyValue(u"IsPlaceholderDependent"_ustr, css::uno::Any(false) );
}
}
}
@@ -2696,13 +2696,13 @@ void SdXMLObjectShapeContext::startFastElement (sal_Int32 /*nElement*/,
if ( aPersistName.startsWith( sURL ) )
aPersistName = aPersistName.copy( sURL.getLength() );
- xProps->setPropertyValue("PersistName",
+ xProps->setPropertyValue(u"PersistName"_ustr,
uno::Any( aPersistName ) );
}
else
{
// this is OOo link object
- xProps->setPropertyValue("LinkURL",
+ xProps->setPropertyValue(u"LinkURL"_ustr,
uno::Any( aPersistName ) );
}
}
@@ -2731,8 +2731,8 @@ void SdXMLObjectShapeContext::endFastElement(sal_Int32 nElement)
if( xProps.is() )
{
- xProps->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_NONE));
- xProps->setPropertyValue("LineStyle", uno::Any(drawing::LineStyle_NONE));
+ xProps->setPropertyValue(u"FillStyle"_ustr, uno::Any(drawing::FillStyle_NONE));
+ xProps->setPropertyValue(u"LineStyle"_ustr, uno::Any(drawing::LineStyle_NONE));
}
}
@@ -2745,7 +2745,7 @@ void SdXMLObjectShapeContext::endFastElement(sal_Int32 nElement)
uno::Reference< beans::XPropertySet > xProps(mxShape, uno::UNO_QUERY);
if( xProps.is() )
- xProps->setPropertyValue("PersistName", uno::Any( aPersistName ) );
+ xProps->setPropertyValue(u"PersistName"_ustr, uno::Any( aPersistName ) );
}
SdXMLShapeContext::endFastElement(nElement);
@@ -2789,10 +2789,10 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLObjectShapeContex
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
if( xPropSet.is() )
{
- xPropSet->setPropertyValue("CLSID", uno::Any( maCLSID ) );
+ xPropSet->setPropertyValue(u"CLSID"_ustr, uno::Any( maCLSID ) );
uno::Reference< lang::XComponent > xComp;
- xPropSet->getPropertyValue("Model") >>= xComp;
+ xPropSet->getPropertyValue(u"Model"_ustr) >>= xComp;
SAL_WARN_IF( !xComp.is(), "xmloff", "no xModel for own OLE format" );
xEContext->SetComponent(xComp);
}
@@ -2819,7 +2819,7 @@ SdXMLAppletShapeContext::~SdXMLAppletShapeContext()
void SdXMLAppletShapeContext::startFastElement (sal_Int32 /*nElement*/,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/)
{
- AddShape("com.sun.star.drawing.AppletShape");
+ AddShape(u"com.sun.star.drawing.AppletShape"_ustr);
if( mxShape.is() )
{
@@ -2863,36 +2863,36 @@ void SdXMLAppletShapeContext::endFastElement(sal_Int32 nElement)
{
// the visual area for applet must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- xProps->setPropertyValue("VisibleArea", Any(aRect) );
+ xProps->setPropertyValue(u"VisibleArea"_ustr, Any(aRect) );
}
if( maParams.hasElements() )
{
- xProps->setPropertyValue("AppletCommands", Any(maParams) );
+ xProps->setPropertyValue(u"AppletCommands"_ustr, Any(maParams) );
}
if( !maHref.isEmpty() )
{
- xProps->setPropertyValue("AppletCodeBase", Any(maHref) );
+ xProps->setPropertyValue(u"AppletCodeBase"_ustr, Any(maHref) );
}
if( !maAppletName.isEmpty() )
{
- xProps->setPropertyValue("AppletName", Any(maAppletName) );
+ xProps->setPropertyValue(u"AppletName"_ustr, Any(maAppletName) );
}
if( mbIsScript )
{
- xProps->setPropertyValue("AppletIsScript", Any(mbIsScript) );
+ xProps->setPropertyValue(u"AppletIsScript"_ustr, Any(mbIsScript) );
}
if( !maAppletCode.isEmpty() )
{
- xProps->setPropertyValue("AppletCode", Any(maAppletCode) );
+ xProps->setPropertyValue(u"AppletCode"_ustr, Any(maAppletCode) );
}
- xProps->setPropertyValue("AppletDocBase", Any(GetImport().GetDocumentBase()) );
+ xProps->setPropertyValue(u"AppletDocBase"_ustr, Any(GetImport().GetDocumentBase()) );
SetThumbnail();
}
@@ -3003,11 +3003,11 @@ void SdXMLPluginShapeContext::startFastElement (sal_Int32 /*nElement*/,
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
if( xPropsInfo.is() )
{
- if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
+ if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(u"IsEmptyPresentationObject"_ustr))
+ xProps->setPropertyValue(u"IsEmptyPresentationObject"_ustr, css::uno::Any(false) );
- if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
+ if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(u"IsPlaceholderDependent"_ustr))
+ xProps->setPropertyValue(u"IsPlaceholderDependent"_ustr, css::uno::Any(false) );
}
}
}
@@ -3070,25 +3070,25 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement)
// in case we have a plugin object
if( maParams.hasElements() )
{
- xProps->setPropertyValue("PluginCommands", Any(maParams) );
+ xProps->setPropertyValue(u"PluginCommands"_ustr, Any(maParams) );
}
if( !maMimeType.isEmpty() )
{
- xProps->setPropertyValue("PluginMimeType", Any(maMimeType) );
+ xProps->setPropertyValue(u"PluginMimeType"_ustr, Any(maMimeType) );
}
if( !maHref.isEmpty() )
{
- xProps->setPropertyValue("PluginURL", Any(maHref) );
+ xProps->setPropertyValue(u"PluginURL"_ustr, Any(maHref) );
}
}
else
{
// in case we have a media object
- xProps->setPropertyValue( "MediaURL", uno::Any(maHref));
+ xProps->setPropertyValue( u"MediaURL"_ustr, uno::Any(maHref));
- xProps->setPropertyValue("MediaMimeType", uno::Any(maMimeType) );
+ xProps->setPropertyValue(u"MediaMimeType"_ustr, uno::Any(maMimeType) );
for (const auto& rParam : maParams)
{
@@ -3098,21 +3098,21 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement)
{
OUString aValueStr;
rParam.Value >>= aValueStr;
- xProps->setPropertyValue("Loop",
+ xProps->setPropertyValue(u"Loop"_ustr,
uno::Any( aValueStr == "true" ) );
}
else if( rName == "Mute" )
{
OUString aValueStr;
rParam.Value >>= aValueStr;
- xProps->setPropertyValue("Mute",
+ xProps->setPropertyValue(u"Mute"_ustr,
uno::Any( aValueStr == "true" ) );
}
else if( rName == "VolumeDB" )
{
OUString aValueStr;
rParam.Value >>= aValueStr;
- xProps->setPropertyValue("VolumeDB",
+ xProps->setPropertyValue(u"VolumeDB"_ustr,
uno::Any( static_cast< sal_Int16 >( aValueStr.toInt32() ) ) );
}
else if( rName == "Zoom" )
@@ -3141,7 +3141,7 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement)
else
eZoomLevel = media::ZoomLevel_NOT_AVAILABLE;
- xProps->setPropertyValue("Zoom", uno::Any( eZoomLevel ) );
+ xProps->setPropertyValue(u"Zoom"_ustr, uno::Any( eZoomLevel ) );
}
}
}
@@ -3203,7 +3203,7 @@ uno::Reference<drawing::XShape> SdXMLFloatingFrameShapeContext::CreateFloatingFr
if (!xServiceFact.is())
return nullptr;
uno::Reference<drawing::XShape> xShape(
- xServiceFact->createInstance("com.sun.star.drawing.FrameShape"), uno::UNO_QUERY);
+ xServiceFact->createInstance(u"com.sun.star.drawing.FrameShape"_ustr), uno::UNO_QUERY);
return xShape;
}
@@ -3224,7 +3224,7 @@ void SdXMLFloatingFrameShapeContext::startFastElement (sal_Int32 /*nElement*/,
// in order to inform the link manager that this is an IFrame that links to
// a URL
if (xProps && !maHref.isEmpty())
- xProps->setPropertyValue("FrameURL", Any(maHref));
+ xProps->setPropertyValue(u"FrameURL"_ustr, Any(maHref));
AddShape(xShape);
@@ -3240,7 +3240,7 @@ void SdXMLFloatingFrameShapeContext::startFastElement (sal_Int32 /*nElement*/,
{
if( !maFrameName.isEmpty() )
{
- xProps->setPropertyValue("FrameName", Any(maFrameName) );
+ xProps->setPropertyValue(u"FrameName"_ustr, Any(maFrameName) );
}
if( !maHref.isEmpty() )
@@ -3248,7 +3248,7 @@ void SdXMLFloatingFrameShapeContext::startFastElement (sal_Int32 /*nElement*/,
if (INetURLObject(maHref).IsExoticProtocol())
GetImport().NotifyMacroEventRead();
- xProps->setPropertyValue("FrameURL", Any(maHref) );
+ xProps->setPropertyValue(u"FrameURL"_ustr, Any(maHref) );
}
}
@@ -3284,7 +3284,7 @@ void SdXMLFloatingFrameShapeContext::endFastElement(sal_Int32 nElement)
{
// the visual area for a floating frame must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- xProps->setPropertyValue("VisibleArea", Any(aRect) );
+ xProps->setPropertyValue(u"VisibleArea"_ustr, Any(aRect) );
}
}
@@ -3365,7 +3365,7 @@ uno::Reference<graphic::XGraphic> SdXMLFrameShapeContext::getGraphicFromImportCo
if (xPropertySet.is())
{
- xPropertySet->getPropertyValue("Graphic") >>= xGraphic;
+ xPropertySet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
}
}
catch( uno::Exception& )
@@ -3397,7 +3397,7 @@ OUString SdXMLFrameShapeContext::getGraphicPackageURLFromImportContext(const SvX
{
const uno::Reference< beans::XPropertySet > xPropSet(pSdXMLGraphicObjectShapeContext->getShape(), uno::UNO_QUERY_THROW);
- xPropSet->getPropertyValue("GraphicStreamURL") >>= aRetval;
+ xPropSet->getPropertyValue(u"GraphicStreamURL"_ustr) >>= aRetval;
}
catch( uno::Exception& )
{
@@ -3698,7 +3698,7 @@ void SdXMLCustomShapeContext::startFastElement (sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
{
// create rectangle shape
- AddShape("com.sun.star.drawing.CustomShape");
+ AddShape(u"com.sun.star.drawing.CustomShape"_ustr);
if ( !mxShape.is() )
return;
@@ -3806,7 +3806,7 @@ void SdXMLCustomShapeContext::endFastElement(sal_Int32 nElement)
uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
if( xPropSet.is() )
{
- xPropSet->setPropertyValue( "CustomShapeGeometry", Any(aSeq) );
+ xPropSet->setPropertyValue( u"CustomShapeGeometry"_ustr, Any(aSeq) );
}
}
catch(const uno::Exception&)
@@ -3823,7 +3823,7 @@ void SdXMLCustomShapeContext::endFastElement(sal_Int32 nElement)
Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( mxShape, UNO_QUERY );
if( xDefaulter.is() )
{
- xDefaulter->createCustomShapeDefaults( "" );
+ xDefaulter->createCustomShapeDefaults( u""_ustr );
}
}
}
@@ -3844,7 +3844,7 @@ void SdXMLCustomShapeContext::endFastElement(sal_Int32 nElement)
if(xPropSet.is())
{
xPropSet->setPropertyValue(
- "FlushCustomShapeUnoApiObjects", css::uno::Any(true));
+ u"FlushCustomShapeUnoApiObjects"_ustr, css::uno::Any(true));
}
}
catch(const uno::Exception&)
@@ -3883,7 +3883,7 @@ SdXMLTableShapeContext::~SdXMLTableShapeContext()
void SdXMLTableShapeContext::startFastElement (sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
{
- OUString service("com.sun.star.drawing.TableShape");
+ OUString service(u"com.sun.star.drawing.TableShape"_ustr);
bool bIsPresShape = !maPresentationClass.isEmpty() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
if( bIsPresShape )
@@ -3908,11 +3908,11 @@ void SdXMLTableShapeContext::startFastElement (sal_Int32 nElement,
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
if( xPropsInfo.is() )
{
- if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
+ if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(u"IsEmptyPresentationObject"_ustr))
+ xProps->setPropertyValue(u"IsEmptyPresentationObject"_ustr, css::uno::Any(false) );
- if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
+ if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(u"IsPlaceholderDependent"_ustr))
+ xProps->setPropertyValue(u"IsPlaceholderDependent"_ustr, css::uno::Any(false) );
}
}
@@ -3924,9 +3924,9 @@ void SdXMLTableShapeContext::startFastElement (sal_Int32 nElement,
{
Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetImport().GetModel(), UNO_QUERY_THROW );
Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() );
- Reference< XNameAccess > xTableFamily( xFamilies->getByName( "table" ), UNO_QUERY_THROW );
+ Reference< XNameAccess > xTableFamily( xFamilies->getByName( u"table"_ustr ), UNO_QUERY_THROW );
Reference< XStyle > xTableStyle( xTableFamily->getByName( msTemplateStyleName ), UNO_QUERY_THROW );
- xProps->setPropertyValue("TableTemplate", Any( xTableStyle ) );
+ xProps->setPropertyValue(u"TableTemplate"_ustr, Any( xTableStyle ) );
}
catch(const Exception&)
{
@@ -3953,7 +3953,7 @@ void SdXMLTableShapeContext::startFastElement (sal_Int32 nElement,
if( xTableImport.is() && xProps.is() )
{
uno::Reference< table::XColumnRowRange > xColumnRowRange(
- xProps->getPropertyValue("Model"), uno::UNO_QUERY );
+ xProps->getPropertyValue(u"Model"_ustr), uno::UNO_QUERY );
if( xColumnRowRange.is() )
mxTableImportContext = xTableImport->CreateTableContext( xColumnRowRange );
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index 0b1fabb53a0a..cf9c540db692 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -77,7 +77,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, const Reference< XFa
{
case XML_ELEMENT(PRESENTATION, XML_START_PAGE):
{
- mxPresProps->setPropertyValue("FirstPage", Any(aIter.toString()) );
+ mxPresProps->setPropertyValue(u"FirstPage"_ustr, Any(aIter.toString()) );
bAll = false;
break;
}
@@ -95,37 +95,37 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, const Reference< XFa
const sal_Int32 nMS = (aDuration.Hours * 60 +
aDuration.Minutes) * 60 + aDuration.Seconds;
- mxPresProps->setPropertyValue("Pause", Any(nMS) );
+ mxPresProps->setPropertyValue(u"Pause"_ustr, Any(nMS) );
break;
}
case XML_ELEMENT(PRESENTATION, XML_ANIMATIONS):
{
aAny <<= IsXMLToken( aIter, XML_ENABLED );
- mxPresProps->setPropertyValue("AllowAnimations", aAny );
+ mxPresProps->setPropertyValue(u"AllowAnimations"_ustr, aAny );
break;
}
case XML_ELEMENT(PRESENTATION, XML_STAY_ON_TOP):
{
aAny <<= IsXMLToken( aIter, XML_TRUE );
- mxPresProps->setPropertyValue("IsAlwaysOnTop", aAny );
+ mxPresProps->setPropertyValue(u"IsAlwaysOnTop"_ustr, aAny );
break;
}
case XML_ELEMENT(PRESENTATION, XML_FORCE_MANUAL):
{
aAny <<= IsXMLToken( aIter, XML_TRUE );
- mxPresProps->setPropertyValue("IsAutomatic", aAny );
+ mxPresProps->setPropertyValue(u"IsAutomatic"_ustr, aAny );
break;
}
case XML_ELEMENT(PRESENTATION, XML_ENDLESS):
{
aAny <<= IsXMLToken( aIter, XML_TRUE );
- mxPresProps->setPropertyValue("IsEndless", aAny );
+ mxPresProps->setPropertyValue(u"IsEndless"_ustr, aAny );
break;
}
case XML_ELEMENT(PRESENTATION, XML_FULL_SCREEN):
{
aAny <<= IsXMLToken( aIter, XML_TRUE );
- mxPresProps->setPropertyValue("IsFullScreen", aAny );
+ mxPresProps->setPropertyValue(u"IsFullScreen"_ustr, aAny );
break;
}
case XML_ELEMENT(PRESENTATION, XML_MOUSE_VISIBLE):
@@ -136,31 +136,31 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, const Reference< XFa
case XML_ELEMENT(PRESENTATION, XML_START_WITH_NAVIGATOR):
{
aAny <<= IsXMLToken( aIter, XML_TRUE );
- mxPresProps->setPropertyValue("StartWithNavigator", aAny );
+ mxPresProps->setPropertyValue(u"StartWithNavigator"_ustr, aAny );
break;
}
case XML_ELEMENT(PRESENTATION, XML_MOUSE_AS_PEN):
{
aAny <<= IsXMLToken( aIter, XML_TRUE );
- mxPresProps->setPropertyValue("UsePen", aAny );
+ mxPresProps->setPropertyValue(u"UsePen"_ustr, aAny );
break;
}
case XML_ELEMENT(PRESENTATION, XML_TRANSITION_ON_CLICK):
{
aAny <<= IsXMLToken( aIter, XML_ENABLED );
- mxPresProps->setPropertyValue("IsTransitionOnClick", aAny );
+ mxPresProps->setPropertyValue(u"IsTransitionOnClick"_ustr, aAny );
break;
}
case XML_ELEMENT(PRESENTATION, XML_SHOW_LOGO):
{
aAny <<= IsXMLToken( aIter, XML_TRUE );
- mxPresProps->setPropertyValue("IsShowLogo", aAny );
+ mxPresProps->setPropertyValue(u"IsShowLogo"_ustr, aAny );
break;
}
}
}
- mxPresProps->setPropertyValue("IsShowAll", Any(bAll) );
- mxPresProps->setPropertyValue("IsMouseVisible", Any(bIsMouseVisible) );
+ mxPresProps->setPropertyValue(u"IsShowAll"_ustr, Any(bAll) );
+ mxPresProps->setPropertyValue(u"IsMouseVisible"_ustr, Any(bIsMouseVisible) );
}
SdXMLShowsContext::~SdXMLShowsContext()
@@ -169,7 +169,7 @@ SdXMLShowsContext::~SdXMLShowsContext()
{
uno::Any aAny;
aAny <<= maCustomShowName;
- mxPresProps->setPropertyValue("CustomShow", aAny );
+ mxPresProps->setPropertyValue(u"CustomShow"_ustr, aAny );
}
}
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 79074418d063..82f9160c2e69 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -1034,8 +1034,8 @@ void SdXMLStylesContext::endFastElement(sal_Int32 )
{
uno::Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() );
- if( xInfoSetInfo->hasPropertyByName("PageLayouts") )
- xInfoSet->setPropertyValue("PageLayouts", uno::Any( getPageLayouts() ) );
+ if( xInfoSetInfo->hasPropertyByName(u"PageLayouts"_ustr) )
+ xInfoSet->setPropertyValue(u"PageLayouts"_ustr, uno::Any( getPageLayouts() ) );
}
}
@@ -1074,7 +1074,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles() const
{
if(GetSdImport().GetLocalDocStyleFamilies().is()) try
{
- uno::Reference< container::XNameAccess > xGraphicPageStyles( GetSdImport().GetLocalDocStyleFamilies()->getByName("graphics"), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xGraphicPageStyles( GetSdImport().GetLocalDocStyleFamilies()->getByName(u"graphics"_ustr), uno::UNO_QUERY_THROW );
ImpSetGraphicStyles(xGraphicPageStyles, XmlStyleFamily::SD_GRAPHICS_ID, u"");
}
@@ -1088,7 +1088,7 @@ void SdXMLStylesContext::ImpSetCellStyles() const
{
if(GetSdImport().GetLocalDocStyleFamilies().is()) try
{
- uno::Reference< container::XNameAccess > xGraphicPageStyles( GetSdImport().GetLocalDocStyleFamilies()->getByName("cell"), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xGraphicPageStyles( GetSdImport().GetLocalDocStyleFamilies()->getByName(u"cell"_ustr), uno::UNO_QUERY_THROW );
ImpSetGraphicStyles(xGraphicPageStyles, XmlStyleFamily::TABLE_CELL, u"");
}
@@ -1111,7 +1111,7 @@ static bool canSkipReset(std::u16string_view rName, const XMLPropStyleContext* p
if (pPropStyle && rName == u"TextAutoGrowHeight")
{
bool bOldStyleTextAutoGrowHeight(false);
- rPropSet->getPropertyValue("TextAutoGrowHeight") >>= bOldStyleTextAutoGrowHeight;
+ rPropSet->getPropertyValue(u"TextAutoGrowHeight"_ustr) >>= bOldStyleTextAutoGrowHeight;
sal_Int32 nIndexStyle = rPrMap->GetEntryIndex(XML_NAMESPACE_DRAW, u"auto-grow-height", 0);
if (nIndexStyle != -1)
@@ -1451,7 +1451,7 @@ bool IsIgnoreFillStyleNamedItem(
// note: the caller must have called FillPropertySet() previously
drawing::FillStyle fillStyle{drawing::FillStyle_NONE};
- xProps->getPropertyValue("FillStyle") >>= fillStyle;
+ xProps->getPropertyValue(u"FillStyle"_ustr) >>= fillStyle;
return fillStyle != nExpectedFillStyle;
}
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index a91b19d42d02..b1dba0d2b6f5 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -345,7 +345,7 @@ namespace xmloff
// later on imported, it overwrites anything which has previously been imported for
// CharStrikeout.
// #i27729#
- exportedProperty( "CharCrossedOut" );
+ exportedProperty( u"CharCrossedOut"_ustr );
}
if ( m_eType == LISTBOX )
@@ -405,7 +405,7 @@ namespace xmloff
OAttributeMetaData::getCommonControlAttributeNamespace(CCAFlags::Label),
OAttributeMetaData::getCommonControlAttributeName(CCAFlags::Label),
rListItem);
- SvXMLElementExport aFormElement(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, "item", true, true);
+ SvXMLElementExport aFormElement(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, u"item"_ustr, true, true);
}
}
}
@@ -1312,7 +1312,7 @@ namespace xmloff
);
aDefaultSelection.erase(aDefaultSelectedPos);
}
- SvXMLElementExport aFormElement(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, "option", true, true);
+ SvXMLElementExport aFormElement(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, u"option"_ustr, true, true);
}
// There may be more "selected" or "default-selected" items than there are in the lists in real,
@@ -1356,7 +1356,7 @@ namespace xmloff
sTrue
);
}
- SvXMLElementExport aFormElement(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, "option", true, true);
+ SvXMLElementExport aFormElement(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, u"option"_ustr, true, true);
}
}
@@ -1860,7 +1860,7 @@ namespace xmloff
try
{
// currently exchanging the data with a database column?
- OUString sBoundFieldPropertyName( "BoundField" );
+ OUString sBoundFieldPropertyName( u"BoundField"_ustr );
if ( m_xPropertyInfo.is() && m_xPropertyInfo->hasPropertyByName( sBoundFieldPropertyName ) )
{
Reference< XPropertySet > xBoundField;
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index a135d7e1795a..5eb3e5bf0d6f 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -1431,7 +1431,7 @@ namespace xmloff
PropertyValueArray::iterator aDefaultControlPropertyPos = ::std::find_if(
m_aValues.begin(),
m_aValues.end(),
- EqualName( "DefaultControl" )
+ EqualName( u"DefaultControl"_ustr )
);
if ( aDefaultControlPropertyPos != m_aValues.end() )
{
@@ -2065,7 +2065,7 @@ namespace xmloff
OUString OFormImport::determineDefaultServiceName() const
{
- return "com.sun.star.form.component.Form";
+ return u"com.sun.star.form.component.Form"_ustr;
}
} // namespace xmloff
diff --git a/xmloff/source/forms/eventexport.cxx b/xmloff/source/forms/eventexport.cxx
index 9a8e0d37c12b..6772a2bcec4d 100644
--- a/xmloff/source/forms/eventexport.cxx
+++ b/xmloff/source/forms/eventexport.cxx
@@ -86,7 +86,7 @@ namespace xmloff
void SAL_CALL OEventDescriptorMapper::replaceByName( const OUString&, const Any& )
{
throw IllegalArgumentException(
- "replacing is not implemented for this wrapper class.", getXWeak(), 1);
+ u"replacing is not implemented for this wrapper class."_ustr, getXWeak(), 1);
}
Any SAL_CALL OEventDescriptorMapper::getByName( const OUString& _rName )
diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx
index 3a979f2599ab..82e8e59d3fd8 100644
--- a/xmloff/source/forms/formattributes.cxx
+++ b/xmloff/source/forms/formattributes.cxx
@@ -35,35 +35,35 @@ namespace xmloff
{
switch (_nId)
{
- case CCAFlags::Name: return "name";
- case CCAFlags::ServiceName: return "control-implementation";
- case CCAFlags::ButtonType: return "button-type";
+ case CCAFlags::Name: return u"name"_ustr;
+ case CCAFlags::ServiceName: return u"control-implementation"_ustr;
+ case CCAFlags::ButtonType: return u"button-type"_ustr;
// disabled(AddAttributeIdLegacy) case CCAFlags::ControlId: return "id";
- case CCAFlags::CurrentSelected: return "current-selected";
- case CCAFlags::CurrentValue: return "current-value";
- case CCAFlags::Disabled: return "disabled";
- case CCAFlags::EnableVisible: return "visible";
- case CCAFlags::Dropdown: return "dropdown";
- case CCAFlags::For: return "for";
- case CCAFlags::ImageData: return "image-data";
- case CCAFlags::Label: return "label";
- case CCAFlags::MaxLength: return "max-length";
- case CCAFlags::Printable: return "printable";
- case CCAFlags::ReadOnly: return "readonly";
- case CCAFlags::Selected: return "selected";
- case CCAFlags::Size: return "size";
- case CCAFlags::TabIndex: return "tab-index";
- case CCAFlags::TargetFrame: return "target-frame";
- case CCAFlags::TargetLocation: return "href"; // the only special thing here: TargetLocation is represented by an xlink:href attribute
- case CCAFlags::TabStop: return "tab-stop";
- case CCAFlags::Title: return "title";
- case CCAFlags::Value: return "value";
- case CCAFlags::Orientation: return "orientation";
- case CCAFlags::VisualEffect: return "visual-effect";
+ case CCAFlags::CurrentSelected: return u"current-selected"_ustr;
+ case CCAFlags::CurrentValue: return u"current-value"_ustr;
+ case CCAFlags::Disabled: return u"disabled"_ustr;
+ case CCAFlags::EnableVisible: return u"visible"_ustr;
+ case CCAFlags::Dropdown: return u"dropdown"_ustr;
+ case CCAFlags::For: return u"for"_ustr;
+ case CCAFlags::ImageData: return u"image-data"_ustr;
+ case CCAFlags::Label: return u"label"_ustr;
+ case CCAFlags::MaxLength: return u"max-length"_ustr;
+ case CCAFlags::Printable: return u"printable"_ustr;
+ case CCAFlags::ReadOnly: return u"readonly"_ustr;
+ case CCAFlags::Selected: return u"selected"_ustr;
+ case CCAFlags::Size: return u"size"_ustr;
+ case CCAFlags::TabIndex: return u"tab-index"_ustr;
+ case CCAFlags::TargetFrame: return u"target-frame"_ustr;
+ case CCAFlags::TargetLocation: return u"href"_ustr; // the only special thing here: TargetLocation is represented by an xlink:href attribute
+ case CCAFlags::TabStop: return u"tab-stop"_ustr;
+ case CCAFlags::Title: return u"title"_ustr;
+ case CCAFlags::Value: return u"value"_ustr;
+ case CCAFlags::Orientation: return u"orientation"_ustr;
+ case CCAFlags::VisualEffect: return u"visual-effect"_ustr;
default:
OSL_FAIL("OAttributeMetaData::getCommonControlAttributeName: invalid id (maybe you or-ed two flags?)!");
}
- return "";
+ return u""_ustr;
}
sal_Int32 OAttributeMetaData::getCommonControlAttributeToken(CCAFlags _nId)
@@ -116,29 +116,29 @@ namespace xmloff
{
switch (_eAttrib)
{
- case faName: return "name";
- case faAction: return "href"; // the only special thing here: Action is represented by an xlink:href attribute
- case faEnctype: return "enctype";
- case faMethod: return "method";
- case faAllowDeletes: return "allow-deletes";
- case faAllowInserts: return "allow-inserts";
- case faAllowUpdates: return "allow-updates";
- case faApplyFilter: return "apply-filter";
- case faCommand: return "command";
- case faCommandType: return "command-type";
- case faEscapeProcessing: return "escape-processing";
- case faDatasource: return "datasource";
- case faDetailFields: return "detail-fields";
- case faFilter: return "filter";
- case faIgnoreResult: return "ignore-result";
- case faMasterFields: return "master-fields";
- case faNavigationMode: return "navigation-mode";
- case faOrder: return "order";
- case faTabbingCycle: return "tab-cycle";
+ case faName: return u"name"_ustr;
+ case faAction: return u"href"_ustr; // the only special thing here: Action is represented by an xlink:href attribute
+ case faEnctype: return u"enctype"_ustr;
+ case faMethod: return u"method"_ustr;
+ case faAllowDeletes: return u"allow-deletes"_ustr;
+ case faAllowInserts: return u"allow-inserts"_ustr;
+ case faAllowUpdates: return u"allow-updates"_ustr;
+ case faApplyFilter: return u"apply-filter"_ustr;
+ case faCommand: return u"command"_ustr;
+ case faCommandType: return u"command-type"_ustr;
+ case faEscapeProcessing: return u"escape-processing"_ustr;
+ case faDatasource: return u"datasource"_ustr;
+ case faDetailFields: return u"detail-fields"_ustr;
+ case faFilter: return u"filter"_ustr;
+ case faIgnoreResult: return u"ignore-result"_ustr;
+ case faMasterFields: return u"master-fields"_ustr;
+ case faNavigationMode: return u"navigation-mode"_ustr;
+ case faOrder: return u"order"_ustr;
+ case faTabbingCycle: return u"tab-cycle"_ustr;
default:
OSL_FAIL("OAttributeMetaData::getFormAttributeName: invalid id!");
}
- return "";
+ return u""_ustr;
}
sal_Int32 OAttributeMetaData::getFormAttributeToken(FormAttributes _eAttrib)
@@ -182,16 +182,16 @@ namespace xmloff
{
switch (_nId)
{
- case DAFlags::BoundColumn: return "bound-column";
- case DAFlags::ConvertEmpty: return "convert-empty-to-null";
- case DAFlags::DataField: return "data-field";
- case DAFlags::ListSource: return "list-source";
- case DAFlags::ListSource_TYPE: return "list-source-type";
- case DAFlags::InputRequired: return "input-required";
+ case DAFlags::BoundColumn: return u"bound-column"_ustr;
+ case DAFlags::ConvertEmpty: return u"convert-empty-to-null"_ustr;
+ case DAFlags::DataField: return u"data-field"_ustr;
+ case DAFlags::ListSource: return u"list-source"_ustr;
+ case DAFlags::ListSource_TYPE: return u"list-source-type"_ustr;
+ case DAFlags::InputRequired: return u"input-required"_ustr;
default:
OSL_FAIL("OAttributeMetaData::getDatabaseAttributeName: invalid id (maybe you or-ed two flags?)!");
}
- return "";
+ return u""_ustr;
}
sal_Int32 OAttributeMetaData::getDatabaseAttributeToken(DAFlags _nId)
@@ -214,13 +214,13 @@ namespace xmloff
{
switch (_nId)
{
- case BAFlags::LinkedCell: return "linked-cell";
- case BAFlags::ListLinkingType: return "list-linkage-type";
- case BAFlags::ListCellRange: return "source-cell-range";
+ case BAFlags::LinkedCell: return u"linked-cell"_ustr;
+ case BAFlags::ListLinkingType: return u"list-linkage-type"_ustr;
+ case BAFlags::ListCellRange: return u"source-cell-range"_ustr;
default:
OSL_FAIL("OAttributeMetaData::getBindingAttributeName: invalid id (maybe you or-ed two flags?)!");
}
- return "";
+ return u""_ustr;
}
sal_Int32 OAttributeMetaData::getBindingAttributeToken(BAFlags _nId)
@@ -240,28 +240,28 @@ namespace xmloff
{
switch (_nId)
{
- case SCAFlags::EchoChar: return "echo-char";
- case SCAFlags::MaxValue: return "max-value";
- case SCAFlags::MinValue: return "min-value";
- case SCAFlags::Validation: return "validation";
- case SCAFlags::GroupName: return "group-name";
- case SCAFlags::MultiLine: return "multi-line";
- case SCAFlags::AutoCompletion: return "auto-complete";
- case SCAFlags::Multiple: return "multiple";
- case SCAFlags::DefaultButton: return "default-button";
- case SCAFlags::CurrentState: return "current-state";
- case SCAFlags::IsTristate: return "is-tristate";
- case SCAFlags::State: return "state";
- case SCAFlags::ColumnStyleName: return "text-style-name";
- case SCAFlags::StepSize: return "step-size";
- case SCAFlags::PageStepSize: return "page-step-size";
- case SCAFlags::RepeatDelay: return "delay-for-repeat";
- case SCAFlags::Toggle: return "toggle";
- case SCAFlags::FocusOnClick: return "focus-on-click";
+ case SCAFlags::EchoChar: return u"echo-char"_ustr;
+ case SCAFlags::MaxValue: return u"max-value"_ustr;
+ case SCAFlags::MinValue: return u"min-value"_ustr;
+ case SCAFlags::Validation: return u"validation"_ustr;
+ case SCAFlags::GroupName: return u"group-name"_ustr;
+ case SCAFlags::MultiLine: return u"multi-line"_ustr;
+ case SCAFlags::AutoCompletion: return u"auto-complete"_ustr;
+ case SCAFlags::Multiple: return u"multiple"_ustr;
+ case SCAFlags::DefaultButton: return u"default-button"_ustr;
+ case SCAFlags::CurrentState: return u"current-state"_ustr;
+ case SCAFlags::IsTristate: return u"is-tristate"_ustr;
+ case SCAFlags::State: return u"state"_ustr;
+ case SCAFlags::ColumnStyleName: return u"text-style-name"_ustr;
+ case SCAFlags::StepSize: return u"step-size"_ustr;
+ case SCAFlags::PageStepSize: return u"page-step-size"_ustr;
+ case SCAFlags::RepeatDelay: return u"delay-for-repeat"_ustr;
+ case SCAFlags::Toggle: return u"toggle"_ustr;
+ case SCAFlags::FocusOnClick: return u"focus-on-click"_ustr;
default:
OSL_FAIL("OAttributeMetaData::getSpecialAttributeName: invalid id (maybe you or-ed two flags?)!");
}
- return "";
+ return u""_ustr;
}
sal_Int32 OAttributeMetaData::getSpecialAttributeToken(SCAFlags _nId)
@@ -306,12 +306,12 @@ namespace xmloff
{
switch (_eAttrib)
{
- case ofaAutomaticFocus: return "automatic-focus";
- case ofaApplyDesignMode: return "apply-design-mode";
+ case ofaAutomaticFocus: return u"automatic-focus"_ustr;
+ case ofaApplyDesignMode: return u"apply-design-mode"_ustr;
default:
OSL_FAIL("OAttributeMetaData::getOfficeFormsAttributeName: invalid id!");
}
- return "";
+ return u""_ustr;
}
xmloff::token::XMLTokenEnum OAttributeMetaData::getOfficeFormsAttributeToken(OfficeFormsAttributes _eAttrib)
diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx b/xmloff/source/forms/gridcolumnproptranslator.cxx
index c1b5b218277f..6e11bf5bc4f7 100644
--- a/xmloff/source/forms/gridcolumnproptranslator.cxx
+++ b/xmloff/source/forms/gridcolumnproptranslator.cxx
@@ -250,7 +250,7 @@ namespace xmloff
{
if (aTranslatedNames.getLength() != aTranslatedValues.getLength())
throw css::lang::IllegalArgumentException(
- "lengths do not match", getXWeak(), -1);
+ u"lengths do not match"_ustr, getXWeak(), -1);
aTranslatedNames.getArray()[ nParaAlignPos ] = ALIGN;
valueParaAdjustToAlign( aTranslatedValues.getArray()[ nParaAlignPos ] );
}
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index dac9297679ae..13785cd60156 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -114,7 +114,7 @@ namespace xmloff
if (!xSI.is())
return false;
- if (!xSI->supportsService("com.sun.star.form.Forms"))
+ if (!xSI->supportsService(u"com.sun.star.form.Forms"_ustr))
{
OSL_FAIL("OFormLayerXMLExport_Impl::impl_isFormPageContainingForms: invalid collection (is no com.sun.star.form.Forms)!");
// nothing to do
@@ -464,7 +464,7 @@ namespace xmloff
OUString lcl_findFreeControlId( const MapPropertySet2Map& _rAllPagesControlIds )
{
- OUString sControlId = "control";
+ OUString sControlId = u"control"_ustr;
size_t nKnownControlCount = ::std::accumulate( _rAllPagesControlIds.begin(), _rAllPagesControlIds.end(), size_t(0), AccumulateSize() );
sControlId += OUString::number( static_cast<sal_Int32>(nKnownControlCount) + 1 );
@@ -691,7 +691,7 @@ namespace xmloff
{
// create it for en-US (does not really matter, as we will specify a locale for every
// concrete language to use)
- Locale aLocale ( "en", "US", OUString() );
+ Locale aLocale ( u"en"_ustr, u"US"_ustr, OUString() );
xFormatsSupplier = NumberFormatsSupplier::createWithLocale( m_rContext.getComponentContext(), aLocale );
m_xControlNumberFormats = xFormatsSupplier->getNumberFormats();
}
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index 1c5c16dfbcb0..303167536486 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -435,11 +435,11 @@ namespace xmloff
exportedProperty(PROPERTY_TIMEFORMAT);
// the following properties should have been exported at the shape already:
- exportedProperty( "VerticalAlign" );
- exportedProperty( "WritingMode" );
- exportedProperty( "ScaleMode" );
+ exportedProperty( u"VerticalAlign"_ustr );
+ exportedProperty( u"WritingMode"_ustr );
+ exportedProperty( u"ScaleMode"_ustr );
// ditto the TextWritingMode
- exportedProperty( "WritingMode" );
+ exportedProperty( u"WritingMode"_ustr );
}
void OPropertyExport::exportGenericPropertyAttribute(
diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx
index b5ad3177e84b..fba83b40297b 100644
--- a/xmloff/source/meta/MetaExportComponent.cxx
+++ b/xmloff/source/meta/MetaExportComponent.cxx
@@ -80,7 +80,7 @@ ErrCode XMLMetaExportComponent::exportDoc( enum XMLTokenEnum )
{
static const ::comphelper::PropertyMapEntry aInfoMap[] =
{
- { OUString("Class"), 0,
+ { u"Class"_ustr, 0,
::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0},
};
@@ -88,7 +88,7 @@ ErrCode XMLMetaExportComponent::exportDoc( enum XMLTokenEnum )
::comphelper::GenericPropertySet_CreateInstance(
new ::comphelper::PropertySetInfo( aInfoMap ) ) );
- xConvPropSet->setPropertyValue("Class", uno::Any(GetXMLToken( XML_TEXT )) );
+ xConvPropSet->setPropertyValue(u"Class"_ustr, uno::Any(GetXMLToken( XML_TEXT )) );
uno::Reference< beans::XPropertySet > xPropSet =
getExportInfo().is()
@@ -102,7 +102,7 @@ ErrCode XMLMetaExportComponent::exportDoc( enum XMLTokenEnum )
// get filter component
xDocHandler.set(
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.comp.Oasis2OOoTransformer", aArgs, xContext),
+ u"com.sun.star.comp.Oasis2OOoTransformer"_ustr, aArgs, xContext),
uno::UNO_QUERY_THROW );
SetDocHandler( xDocHandler );
@@ -167,7 +167,7 @@ XMLMetaExportComponent_get_implementation(
css::uno::XComponentContext *context,
css::uno::Sequence<css::uno::Any> const &)
{
- return cppu::acquire(new XMLMetaExportComponent(context, "XMLMetaExportComponent", SvXMLExportFlags::META|SvXMLExportFlags::OASIS));
+ return cppu::acquire(new XMLMetaExportComponent(context, u"XMLMetaExportComponent"_ustr, SvXMLExportFlags::META|SvXMLExportFlags::OASIS));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
@@ -175,7 +175,7 @@ XMLMetaExportOOo_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(
- new XMLMetaExportComponent(context, "XMLMetaExportOOo", SvXMLExportFlags::META));
+ new XMLMetaExportComponent(context, u"XMLMetaExportOOo"_ustr, SvXMLExportFlags::META));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx
index 9d507ab0f2cf..789d6f12e01b 100644
--- a/xmloff/source/meta/MetaImportComponent.cxx
+++ b/xmloff/source/meta/MetaImportComponent.cxx
@@ -64,7 +64,7 @@ XMLMetaImportComponent_get_implementation(
XMLMetaImportComponent::XMLMetaImportComponent(
const uno::Reference< uno::XComponentContext >& xContext)
- : SvXMLImport(xContext, "XMLMetaImportComponent")
+ : SvXMLImport(xContext, u"XMLMetaImportComponent"_ustr)
{
}
@@ -75,8 +75,8 @@ SvXMLImportContext *XMLMetaImportComponent::CreateFastContext( sal_Int32 nElemen
{
if (!mxDocProps.is()) {
throw uno::RuntimeException(
- "XMLMetaImportComponent::CreateFastContext: setTargetDocument "
- "has not been called", *this);
+ u"XMLMetaImportComponent::CreateFastContext: setTargetDocument "
+ "has not been called"_ustr, *this);
}
return new SvXMLMetaDocumentContext(
*this, mxDocProps);
@@ -90,8 +90,8 @@ void SAL_CALL XMLMetaImportComponent::setTargetDocument(
mxDocProps.set( xDoc, uno::UNO_QUERY );
if( !mxDocProps.is() )
throw lang::IllegalArgumentException(
- "XMLMetaImportComponent::setTargetDocument: argument is no "
- "XDocumentProperties", uno::Reference<uno::XInterface>(*this), 0);
+ u"XMLMetaImportComponent::setTargetDocument: argument is no "
+ "XDocumentProperties"_ustr, uno::Reference<uno::XInterface>(*this), 0);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 09324ba8b2cc..f50feddcb2f8 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -148,8 +148,8 @@ lcl_initDocumentProperties(SvXMLImport & rImport,
} catch (const uno::Exception&) {
css::uno::Any anyEx = cppu::getCaughtException();
throw lang::WrappedTargetRuntimeException(
- "SvXMLMetaDocumentContext::initDocumentProperties: "
- "properties init exception",
+ u"SvXMLMetaDocumentContext::initDocumentProperties: "
+ "properties init exception"_ustr,
rImport, anyEx);
}
}
@@ -167,7 +167,7 @@ lcl_initGenerator(SvXMLImport & rImport,
xPath->registerNS(GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META));
uno::Reference< xml::xpath::XXPathObject > const xObj(
- xPath->eval(xDoc, "string(/office:document-meta/office:meta/meta:generator)"),
+ xPath->eval(xDoc, u"string(/office:document-meta/office:meta/meta:generator)"_ustr),
uno::UNO_SET_THROW);
OUString const value(xObj->getString());
SvXMLMetaDocumentContext::setBuildId(value, rImport.getImportInfo());
@@ -176,7 +176,7 @@ lcl_initGenerator(SvXMLImport & rImport,
} catch (const uno::Exception&) {
css::uno::Any anyEx = cppu::getCaughtException();
throw lang::WrappedTargetRuntimeException(
- "SvXMLMetaDocumentContext::initGenerator: exception",
+ u"SvXMLMetaDocumentContext::initGenerator: exception"_ustr,
rImport, anyEx);
}
}
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 953b1c475ab1..4f1dc8ae5bad 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -48,7 +48,7 @@ XMLVersionListExport::XMLVersionListExport(
const css::uno::Sequence < css::util::RevisionTag >& rVersions,
const OUString &rFileName,
Reference< XDocumentHandler > const &rHandler )
-: SvXMLExport( rContext, "", rFileName, util::MeasureUnit::CM, rHandler ),
+: SvXMLExport( rContext, u""_ustr, rFileName, util::MeasureUnit::CM, rHandler ),
maVersions( rVersions )
{
GetNamespaceMap_().AddAtIndex( xmloff::token::GetXMLToken(xmloff::token::XML_NP_DC),
@@ -104,7 +104,7 @@ ErrCode XMLVersionListExport::exportDoc( enum ::xmloff::token::XMLTokenEnum )
XMLVersionListImport::XMLVersionListImport(
const css::uno::Reference< css::uno::XComponentContext >& rContext,
css::uno::Sequence < css::util::RevisionTag >& rVersions )
-: SvXMLImport(rContext, ""),
+: SvXMLImport(rContext, u""_ustr),
maVersions( rVersions )
{
}
@@ -326,7 +326,7 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt
Reference< io::XOutputStream > xOut = xVerStream->getOutputStream();
if ( !xOut.is() )
- throw uno::RuntimeException("The stream was successfully opened for writing already!");
+ throw uno::RuntimeException(u"The stream was successfully opened for writing already!"_ustr);
xWriter->setOutputStream(xOut);
@@ -360,7 +360,7 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con
if ( xProps.is() )
{
try {
- xProps->getPropertyValue("URL") >>= aParserInput.sSystemId;
+ xProps->getPropertyValue(u"URL"_ustr) >>= aParserInput.sSystemId;
}
catch( uno::Exception& )
{}
@@ -401,7 +401,7 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con
OUString XMLVersionListPersistence::getImplementationName()
{
- return "XMLVersionListPersistence";
+ return u"XMLVersionListPersistence"_ustr;
}
sal_Bool XMLVersionListPersistence::supportsService(
@@ -414,7 +414,7 @@ css::uno::Sequence<OUString>
XMLVersionListPersistence::getSupportedServiceNames()
{
return css::uno::Sequence<OUString>{
- "com.sun.star.document.DocumentRevisionListPersistence"};
+ u"com.sun.star.document.DocumentRevisionListPersistence"_ustr};
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/xmloff/source/script/xmlbasicscript.cxx b/xmloff/source/script/xmlbasicscript.cxx
index fd464e24100b..dc99e90a7d39 100644
--- a/xmloff/source/script/xmlbasicscript.cxx
+++ b/xmloff/source/script/xmlbasicscript.cxx
@@ -85,7 +85,7 @@ BasicLibrariesElement::BasicLibrariesElement(SvXMLImport& rImport,
// try the "BasicLibraries" property (old-style, for compatibility)
Reference<beans::XPropertySet> xPSet(rxModel, UNO_QUERY);
if (xPSet.is())
- xPSet->getPropertyValue("BasicLibraries") >>= m_xLibContainer;
+ xPSet->getPropertyValue(u"BasicLibraries"_ustr) >>= m_xLibContainer;
}
SAL_WARN_IF(!m_xLibContainer.is(), "xmlscript.xmlflat",
@@ -93,7 +93,7 @@ BasicLibrariesElement::BasicLibrariesElement(SvXMLImport& rImport,
if (!m_xLibContainer.is())
{
- throw xml::sax::SAXException("nowhere to import to", Reference<XInterface>(), Any());
+ throw xml::sax::SAXException(u"nowhere to import to"_ustr, Reference<XInterface>(), Any());
}
}
@@ -105,7 +105,7 @@ BasicLibrariesElement::createFastChildContext(sal_Int32 nElement,
{
if (!IsTokenInNamespace(nElement, XML_NAMESPACE_OOO))
{
- throw xml::sax::SAXException("illegal namespace!", Reference<XInterface>(), Any());
+ throw xml::sax::SAXException(u"illegal namespace!"_ustr, Reference<XInterface>(), Any());
}
else if ((nElement & TOKEN_MASK) == XML_LIBRARY_LINKED)
{
@@ -174,7 +174,7 @@ BasicLibrariesElement::createFastChildContext(sal_Int32 nElement,
}
else
{
- throw xml::sax::SAXException("expected library-linked or library-embedded element!",
+ throw xml::sax::SAXException(u"expected library-linked or library-embedded element!"_ustr,
Reference<XInterface>(), Any());
}
@@ -207,7 +207,7 @@ Reference<XFastContextHandler> BasicEmbeddedLibraryElement::createFastChildConte
{
if (!IsTokenInNamespace(nElement, XML_NAMESPACE_OOO))
{
- throw xml::sax::SAXException("illegal namespace!", Reference<XInterface>(), Any());
+ throw xml::sax::SAXException(u"illegal namespace!"_ustr, Reference<XInterface>(), Any());
}
else if ((nElement & TOKEN_MASK) == XML_MODULE)
{
@@ -218,7 +218,8 @@ Reference<XFastContextHandler> BasicEmbeddedLibraryElement::createFastChildConte
}
else
{
- throw xml::sax::SAXException("expected module element!", Reference<XInterface>(), Any());
+ throw xml::sax::SAXException(u"expected module element!"_ustr, Reference<XInterface>(),
+ Any());
}
return nullptr;
@@ -249,7 +250,7 @@ BasicModuleElement::createFastChildContext(sal_Int32 nElement,
if (!IsTokenInNamespace(nElement, XML_NAMESPACE_OOO))
{
- throw xml::sax::SAXException("illegal namespace!", Reference<XInterface>(), Any());
+ throw xml::sax::SAXException(u"illegal namespace!"_ustr, Reference<XInterface>(), Any());
}
else if ((nElement & TOKEN_MASK) == XML_SOURCE_CODE)
{
@@ -263,7 +264,7 @@ BasicModuleElement::createFastChildContext(sal_Int32 nElement,
}
else
{
- throw xml::sax::SAXException("expected source-code element!", Reference<XInterface>(),
+ throw xml::sax::SAXException(u"expected source-code element!"_ustr, Reference<XInterface>(),
Any());
}
diff --git a/xmloff/source/style/MultiPropertySetHelper.cxx b/xmloff/source/style/MultiPropertySetHelper.cxx
index 7636278ebef6..e8c469942ca2 100644
--- a/xmloff/source/style/MultiPropertySetHelper.cxx
+++ b/xmloff/source/style/MultiPropertySetHelper.cxx
@@ -34,18 +34,10 @@ using ::com::sun::star::uno::UNO_QUERY;
MultiPropertySetHelper::MultiPropertySetHelper(
- const char** pNames ) :
- nLength( 0 ),
+ std::span<const OUString> pNames ) :
+ pPropertyNames( pNames ),
pValues( nullptr )
{
- // first count the elements
- for( const char** pPtr = pNames; *pPtr != nullptr; pPtr++ )
- nLength++;
-
- // allocate array and create strings
- pPropertyNames.reset( new OUString[nLength] );
- for( sal_Int16 i = 0; i < nLength; i++ )
- pPropertyNames[i] = OUString::createFromAscii( pNames[i] );
}
@@ -62,13 +54,12 @@ void MultiPropertySetHelper::hasProperties(
// allocate sequence index
if ( !pSequenceIndex )
- pSequenceIndex.reset( new sal_Int16[nLength] );
+ pSequenceIndex.reset( new sal_Int16[pPropertyNames.size()] );
// construct pSequenceIndex
sal_Int16 nNumberOfProperties = 0;
- sal_Int16 i;
- for( i = 0; i < nLength; i++ )
+ for( size_t i = 0; i < pPropertyNames.size(); i++ )
{
// ask for property
bool bHasProperty =
@@ -84,7 +75,7 @@ void MultiPropertySetHelper::hasProperties(
if ( aPropertySequence.getLength() != nNumberOfProperties )
aPropertySequence.realloc( nNumberOfProperties );
OUString* pPropertySequence = aPropertySequence.getArray();
- for( i = 0; i < nLength; i ++ )
+ for( size_t i = 0; i < pPropertyNames.size(); i ++ )
{
sal_Int16 nIndex = pSequenceIndex[i];
if ( nIndex != -1 )
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx
index 7e5d2bcbee6e..20b01b84ee3d 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -632,14 +632,14 @@ void XMLPageMasterExportPropMapper::ContextFilter(
if (pPrint)
{
- lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ANNOTATIONS), "PrintAnnotations", rPropSet);
- lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_CHARTS), "PrintCharts", rPropSet);
- lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_DRAWING), "PrintDrawing", rPropSet);
- lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_FORMULAS), "PrintFormulas", rPropSet);
- lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_GRID), "PrintGrid", rPropSet);
- lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_HEADERS), "PrintHeaders", rPropSet);
- lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_OBJECTS), "PrintObjects", rPropSet);
- lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ZEROVALUES), "PrintZeroValues", rPropSet);
+ lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ANNOTATIONS), u"PrintAnnotations"_ustr, rPropSet);
+ lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_CHARTS), u"PrintCharts"_ustr, rPropSet);
+ lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_DRAWING), u"PrintDrawing"_ustr, rPropSet);
+ lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_FORMULAS), u"PrintFormulas"_ustr, rPropSet);
+ lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_GRID), u"PrintGrid"_ustr, rPropSet);
+ lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_HEADERS), u"PrintHeaders"_ustr, rPropSet);
+ lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_OBJECTS), u"PrintObjects"_ustr, rPropSet);
+ lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ZEROVALUES), u"PrintZeroValues"_ustr, rPropSet);
}
SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rPropState, rPropSet);
diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx
index 4e4a2912918c..53e6654de37f 100644
--- a/xmloff/source/style/PageMasterImportContext.cxx
+++ b/xmloff/source/style/PageMasterImportContext.cxx
@@ -241,11 +241,11 @@ void PageStyleContext::FillPropertySet_PageStyle(
drawing::FillStyle fillStyle{drawing::FillStyle_NONE};
drawing::FillStyle fillStyleHeader{drawing::FillStyle_NONE};
drawing::FillStyle fillStyleFooter{drawing::FillStyle_NONE};
- if (xInfo->hasPropertyByName("FillStyle")) // SwXTextDefaults lacks it?
+ if (xInfo->hasPropertyByName(u"FillStyle"_ustr)) // SwXTextDefaults lacks it?
{
- xPropSet->getPropertyValue("FillStyle") >>= fillStyle;
- xPropSet->getPropertyValue("HeaderFillStyle") >>= fillStyleHeader;
- xPropSet->getPropertyValue("FooterFillStyle") >>= fillStyleFooter;
+ xPropSet->getPropertyValue(u"FillStyle"_ustr) >>= fillStyle;
+ xPropSet->getPropertyValue(u"HeaderFillStyle"_ustr) >>= fillStyleHeader;
+ xPropSet->getPropertyValue(u"FooterFillStyle"_ustr) >>= fillStyleFooter;
}
// handle special attributes which have MID_FLAG_NO_PROPERTY_IMPORT set
@@ -330,7 +330,7 @@ void PageStyleContext::FillPropertySet_PageStyle(
{
bool isFullSize(true); // default is current LO default
drawing::FillStyle fillStyle{drawing::FillStyle_NONE};
- xPropSet->getPropertyValue("FillStyle") >>= fillStyle;
+ xPropSet->getPropertyValue(u"FillStyle"_ustr) >>= fillStyle;
if (GetImport().isGeneratorVersionOlderThan(SvXMLImport::AOO_4x, SvXMLImport::LO_63x)
// also for AOO 4.x, assume there won't ever be a 4.2
|| GetImport().getGeneratorVersion() == SvXMLImport::AOO_4x)
@@ -360,7 +360,7 @@ void PageStyleContext::FillPropertySet_PageStyle(
case drawing::FillStyle_BITMAP:
{
drawing::BitmapMode bitmapMode{};
- xPropSet->getPropertyValue("FillBitmapMode") >>= bitmapMode;
+ xPropSet->getPropertyValue(u"FillBitmapMode"_ustr) >>= bitmapMode;
switch (bitmapMode)
{
case drawing::BitmapMode_REPEAT:
@@ -383,7 +383,7 @@ void PageStyleContext::FillPropertySet_PageStyle(
if (!isFullSize)
{
SAL_INFO("xmloff.style", "FillPropertySet_PageStyle: Heuristically resetting BackgroundFullSize");
- xPropSet->setPropertyValue("BackgroundFullSize", uno::Any(isFullSize));
+ xPropSet->setPropertyValue(u"BackgroundFullSize"_ustr, uno::Any(isFullSize));
}
}
@@ -395,7 +395,7 @@ void PageStyleContext::FillPropertySet_PageStyle(
uno::Any aPageUsage;
XMLPMPropHdl_PageStyleLayout aPageUsageHdl;
if (aPageUsageHdl.importXML(sPageUsage, aPageUsage, GetImport().GetMM100UnitConverter()))
- xPropSet->setPropertyValue("PageStyleLayout", aPageUsage);
+ xPropSet->setPropertyValue(u"PageStyleLayout"_ustr, aPageUsage);
}
}
@@ -424,7 +424,7 @@ void PageStyleContext::SetDefaults( )
Reference < XMultiServiceFactory > xFactory ( GetImport().GetModel(), UNO_QUERY);
if (xFactory.is())
{
- Reference < XInterface > xInt = xFactory->createInstance( "com.sun.star.text.Defaults" );
+ Reference < XInterface > xInt = xFactory->createInstance( u"com.sun.star.text.Defaults"_ustr );
Reference < beans::XPropertySet > xProperties ( xInt, UNO_QUERY );
if ( xProperties.is() )
FillPropertySet_PageStyle(xProperties, nullptr);
diff --git a/xmloff/source/style/PageMasterImportPropMapper.cxx b/xmloff/source/style/PageMasterImportPropMapper.cxx
index 18ee9fcab4a7..2b3a5cb209e1 100644
--- a/xmloff/source/style/PageMasterImportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterImportPropMapper.cxx
@@ -396,16 +396,16 @@ void PageMasterImportPropertyMapper::finished(std::vector< XMLPropertyState >& r
bool bGutterAtTop{};
uno::Reference<lang::XServiceInfo> xSI(GetImport().GetModel(), uno::UNO_QUERY);
- if (xSI.is() && xSI->supportsService("com.sun.star.text.TextDocument"))
+ if (xSI.is() && xSI->supportsService(u"com.sun.star.text.TextDocument"_ustr))
{
uno::Reference<lang::XMultiServiceFactory> xFac(GetImport().GetModel(), uno::UNO_QUERY);
if (xFac.is())
{
uno::Reference<beans::XPropertySet> xProps(
- xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
+ xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY);
if (xProps.is())
{
- xProps->getPropertyValue("GutterAtTop") >>= bGutterAtTop;
+ xProps->getPropertyValue(u"GutterAtTop"_ustr) >>= bGutterAtTop;
}
}
}
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index c89ef5019c62..363b4a575e8e 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -332,26 +332,26 @@ std::unordered_set<OUString> XMLFontAutoStylePool::getUsedFontList()
uno::Reference<beans::XPropertySetInfo> xInfo(xPropertySet ? xPropertySet->getPropertySetInfo() : nullptr);
if (xInfo)
{
- if (m_bEmbedLatinScript && xInfo->hasPropertyByName("CharFontName"))
+ if (m_bEmbedLatinScript && xInfo->hasPropertyByName(u"CharFontName"_ustr))
{
OUString sCharFontName;
- Any aFontAny = xPropertySet->getPropertyValue("CharFontName");
+ Any aFontAny = xPropertySet->getPropertyValue(u"CharFontName"_ustr);
aFontAny >>= sCharFontName;
if (!sCharFontName.isEmpty())
aReturnSet.insert(sCharFontName);
}
- if (m_bEmbedAsianScript && xInfo->hasPropertyByName("CharFontNameAsian"))
+ if (m_bEmbedAsianScript && xInfo->hasPropertyByName(u"CharFontNameAsian"_ustr))
{
OUString sCharFontNameAsian;
- Any aFontAny = xPropertySet->getPropertyValue("CharFontNameAsian");
+ Any aFontAny = xPropertySet->getPropertyValue(u"CharFontNameAsian"_ustr);
aFontAny >>= sCharFontNameAsian;
if (!sCharFontNameAsian.isEmpty())
aReturnSet.insert(sCharFontNameAsian);
}
- if (m_bEmbedComplexScript && xInfo->hasPropertyByName("CharFontNameComplex"))
+ if (m_bEmbedComplexScript && xInfo->hasPropertyByName(u"CharFontNameComplex"_ustr))
{
OUString sCharFontNameComplex;
- Any aFontAny = xPropertySet->getPropertyValue("CharFontNameComplex");
+ Any aFontAny = xPropertySet->getPropertyValue(u"CharFontNameComplex"_ustr);
aFontAny >>= sCharFontNameComplex;
if (!sCharFontNameComplex.isEmpty())
aReturnSet.insert(sCharFontNameComplex);
@@ -512,7 +512,7 @@ void XMLFontAutoStylePool::exportXML()
{
GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_HREF,
fontFilesMap[rEmbeddedFont.aURL]);
- GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, "simple");
+ GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, u"simple"_ustr);
}
// Help consumers of our output by telling them which
@@ -541,7 +541,7 @@ void XMLFontAutoStylePool::exportXML()
}
}
- GetExport().AddAttribute(XML_NAMESPACE_SVG, XML_STRING, "truetype");
+ GetExport().AddAttribute(XML_NAMESPACE_SVG, XML_STRING, u"truetype"_ustr);
SvXMLElementExport fontFaceFormat(GetExport(), XML_NAMESPACE_SVG,
XML_FONT_FACE_FORMAT, true, true);
}
@@ -625,7 +625,7 @@ OUString XMLFontAutoStylePool::embedFontFile(OUString const & fileUrl, OUString
return OUString();
uno::Reference< embed::XStorage > storage;
- storage.set( GetExport().GetTargetStorage()->openStorageElement( "Fonts",
+ storage.set( GetExport().GetTargetStorage()->openStorageElement( u"Fonts"_ustr,
::embed::ElementModes::WRITE ), uno::UNO_SET_THROW );
OUString name = getFreeFontName(storage, rFamilyName);
@@ -634,7 +634,7 @@ OUString XMLFontAutoStylePool::embedFontFile(OUString const & fileUrl, OUString
outputStream.set( storage->openStreamElement( name, ::embed::ElementModes::WRITE ), UNO_QUERY_THROW );
uno::Reference < beans::XPropertySet > propertySet( outputStream, uno::UNO_QUERY );
assert( propertySet.is());
- propertySet->setPropertyValue( "MediaType", uno::Any( OUString( "application/x-font-ttf" ))); // TODO
+ propertySet->setPropertyValue( u"MediaType"_ustr, uno::Any( u"application/x-font-ttf"_ustr)); // TODO
for(;;)
{
sal_Int8 buffer[ 4096 ];
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index c827eb14bdde..31698cbe325d 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -135,15 +135,15 @@ bool XMLPageExport::exportStyle(
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME,
GetExport().EncodeStyleName( sName, &bEncoded ) );
- if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"Hidden"_ustr ) )
{
- uno::Any aValue = xPropSet->getPropertyValue( "Hidden" );
+ uno::Any aValue = xPropSet->getPropertyValue( u"Hidden"_ustr );
bool bHidden = false;
if ((aValue >>= bHidden) && bHidden
&& GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
- GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_HIDDEN, "true");
- GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_HIDDEN, "true"); // FIXME for compatibility
+ GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_HIDDEN, u"true"_ustr);
+ GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_HIDDEN, u"true"_ustr); // FIXME for compatibility
}
}
@@ -234,12 +234,12 @@ XMLPageExport::XMLPageExport(SvXMLExport & rExp)
return;
uno::Reference<beans::XPropertySet> xProps(
- xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
+ xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY);
if (!xProps.is())
return;
bool bGutterAtTop{};
- xProps->getPropertyValue("GutterAtTop") >>= bGutterAtTop;
+ xProps->getPropertyValue(u"GutterAtTop"_ustr) >>= bGutterAtTop;
if (bGutterAtTop)
{
m_xPageMasterExportPropMapper->SetGutterAtTop(true);
@@ -278,7 +278,7 @@ void XMLPageExport::exportDefaultStyle()
if (!xFactory.is())
return;
- Reference < XPropertySet > xPropSet (xFactory->createInstance ( "com.sun.star.text.Defaults" ), UNO_QUERY);
+ Reference < XPropertySet > xPropSet (xFactory->createInstance ( u"com.sun.star.text.Defaults"_ustr ), UNO_QUERY);
if (!xPropSet.is())
return;
diff --git a/xmloff/source/style/XMLThemeContext.cxx b/xmloff/source/style/XMLThemeContext.cxx
index 002140ece452..971c2eaddeb0 100644
--- a/xmloff/source/style/XMLThemeContext.cxx
+++ b/xmloff/source/style/XMLThemeContext.cxx
@@ -51,7 +51,7 @@ XMLThemeContext::~XMLThemeContext()
uno::Reference<beans::XPropertySet> xPropertySet(m_xObjectWithThemeProperty,
uno::UNO_QUERY);
auto xTheme = model::theme::createXTheme(mpTheme);
- xPropertySet->setPropertyValue("Theme", uno::Any(xTheme));
+ xPropertySet->setPropertyValue(u"Theme"_ustr, uno::Any(xTheme));
}
}
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index f70d9361a649..0152c243d6ae 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -95,9 +95,9 @@ data2string(void *data,
switch (type->eTypeClass)
{
case typelib_TypeClass_VOID:
- return "";
+ return u""_ustr;
case typelib_TypeClass_BOOLEAN:
- return *static_cast<const sal_Bool*>(data) ? OUString("true") : OUString("false");
+ return *static_cast<const sal_Bool*>(data) ? u"true"_ustr : u"false"_ustr;
case typelib_TypeClass_BYTE:
return OUString::number(*static_cast<const sal_Int8*>(data));
case typelib_TypeClass_SHORT:
@@ -124,7 +124,7 @@ data2string(void *data,
case typelib_TypeClass_SEQUENCE:
case typelib_TypeClass_EXCEPTION:
case typelib_TypeClass_INTERFACE:
- return "wtf";
+ return u"wtf"_ustr;
case typelib_TypeClass_STRUCT:
return struct2string(data, type->pType);
case typelib_TypeClass_ENUM:
@@ -133,7 +133,7 @@ data2string(void *data,
assert(false); // this cannot happen I hope
break;
}
- return "";
+ return u""_ustr;
}
static OUString any2string(const uno::Any& any)
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index a10fbbaed299..f2e8e7e94983 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -75,13 +75,13 @@ namespace
static const OldFillStyleDefinitionSet theSet = []()
{
OldFillStyleDefinitionSet aSet;
- aSet.insert("BackColorRGB");
- aSet.insert("BackTransparent");
- aSet.insert("BackColorTransparency");
- aSet.insert("BackGraphic");
- aSet.insert("BackGraphicFilter");
- aSet.insert("BackGraphicLocation");
- aSet.insert("BackGraphicTransparency");
+ aSet.insert(u"BackColorRGB"_ustr);
+ aSet.insert(u"BackTransparent"_ustr);
+ aSet.insert(u"BackColorTransparency"_ustr);
+ aSet.insert(u"BackGraphic"_ustr);
+ aSet.insert(u"BackGraphicFilter"_ustr);
+ aSet.insert(u"BackGraphicLocation"_ustr);
+ aSet.insert(u"BackGraphicTransparency"_ustr);
return aSet;
}();
return theSet;
@@ -91,13 +91,13 @@ namespace
static const OldFillStyleDefinitionSet theSet = []()
{
OldFillStyleDefinitionSet aSet;
- aSet.insert("HeaderBackColorRGB");
- aSet.insert("HeaderBackTransparent");
- aSet.insert("HeaderBackColorTransparency");
- aSet.insert("HeaderBackGraphic");
- aSet.insert("HeaderBackGraphicFilter");
- aSet.insert("HeaderBackGraphicLocation");
- aSet.insert("HeaderBackGraphicTransparency");
+ aSet.insert(u"HeaderBackColorRGB"_ustr);
+ aSet.insert(u"HeaderBackTransparent"_ustr);
+ aSet.insert(u"HeaderBackColorTransparency"_ustr);
+ aSet.insert(u"HeaderBackGraphic"_ustr);
+ aSet.insert(u"HeaderBackGraphicFilter"_ustr);
+ aSet.insert(u"HeaderBackGraphicLocation"_ustr);
+ aSet.insert(u"HeaderBackGraphicTransparency"_ustr);
return aSet;
}();
return theSet;
@@ -107,13 +107,13 @@ namespace
static const OldFillStyleDefinitionSet theSet = []()
{
OldFillStyleDefinitionSet aSet;
- aSet.insert("FooterBackColorRGB");
- aSet.insert("FooterBackTransparent");
- aSet.insert("FooterBackColorTransparency");
- aSet.insert("FooterBackGraphic");
- aSet.insert("FooterBackGraphicFilter");
- aSet.insert("FooterBackGraphicLocation");
- aSet.insert("FooterBackGraphicTransparency");
+ aSet.insert(u"FooterBackColorRGB"_ustr);
+ aSet.insert(u"FooterBackTransparent"_ustr);
+ aSet.insert(u"FooterBackColorTransparency"_ustr);
+ aSet.insert(u"FooterBackGraphic"_ustr);
+ aSet.insert(u"FooterBackGraphicFilter"_ustr);
+ aSet.insert(u"FooterBackGraphicLocation"_ustr);
+ aSet.insert(u"FooterBackGraphicTransparency"_ustr);
return aSet;
}();
return theSet;
@@ -125,11 +125,11 @@ namespace
OldFillStyleDefinitionSet aSet;
// Caution: here it is *not* 'ParaBackColorRGB' as it should be, but indeed
// 'ParaBackColor' is used, see aXMLParaPropMap definition (line 313)
- aSet.insert("ParaBackColor");
- aSet.insert("ParaBackTransparent");
- aSet.insert("ParaBackGraphicLocation");
- aSet.insert("ParaBackGraphicFilter");
- aSet.insert("ParaBackGraphic");
+ aSet.insert(u"ParaBackColor"_ustr);
+ aSet.insert(u"ParaBackTransparent"_ustr);
+ aSet.insert(u"ParaBackGraphicLocation"_ustr);
+ aSet.insert(u"ParaBackGraphicFilter"_ustr);
+ aSet.insert(u"ParaBackGraphic"_ustr);
// These are not used in aXMLParaPropMap definition, thus not needed here
// aSet.insert("ParaBackColorTransparency");
@@ -266,7 +266,7 @@ void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
if(bTakeCareOfDrawingLayerFillStyle)
{
// check if new FillStyles are used and if so mark old ones with -1
- static OUString s_FillStyle("FillStyle");
+ static OUString s_FillStyle(u"FillStyle"_ustr);
if(doNewDrawingLayerFillStyleDefinitionsExist(s_FillStyle))
{
@@ -333,8 +333,8 @@ void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
Sequence< OUString > aPropNames
{
(GetFamily() == XmlStyleFamily::TEXT_PARAGRAPH)?
- OUString("ParaAutoStyleName"):
- OUString("CharAutoStyleName")
+ u"ParaAutoStyleName"_ustr:
+ u"CharAutoStyleName"_ustr
};
Sequence< Any > aAny = xAutoStyle->getPropertyValues( aPropNames );
if( aAny.hasElements() )
@@ -520,20 +520,20 @@ void XMLPropStyleContext::Finish( bool bOverwrite )
aLinked = GetImport().GetStyleDisplayName(XmlStyleFamily::TEXT_PARAGRAPH, aLinked);
}
}
- if (!aLinked.isEmpty() && xPropSetInfo->hasPropertyByName("LinkStyle"))
+ if (!aLinked.isEmpty() && xPropSetInfo->hasPropertyByName(u"LinkStyle"_ustr))
{
- uno::Any aAny = xPropSet->getPropertyValue("LinkStyle");
+ uno::Any aAny = xPropSet->getPropertyValue(u"LinkStyle"_ustr);
OUString aCurrentLinked;
aAny >>= aCurrentLinked;
if (aCurrentLinked != aLinked)
{
- xPropSet->setPropertyValue("LinkStyle", uno::Any(aLinked));
+ xPropSet->setPropertyValue(u"LinkStyle"_ustr, uno::Any(aLinked));
}
}
- if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"Hidden"_ustr ) )
{
- xPropSet->setPropertyValue( "Hidden", uno::Any( IsHidden( ) ) );
+ xPropSet->setPropertyValue( u"Hidden"_ustr, uno::Any( IsHidden( ) ) );
}
}
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 91de1963e57e..5f129061318d 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -80,7 +80,7 @@ void XMLStyleExport::exportStyleContent( const Reference< XStyle >& rStyle )
try
{
- uno::Any aProperty = xPropSet->getPropertyValue( "ParaStyleConditions" );
+ uno::Any aProperty = xPropSet->getPropertyValue( u"ParaStyleConditions"_ustr );
uno::Sequence< beans::NamedValue > aSeq;
aProperty >>= aSeq;
@@ -128,19 +128,19 @@ void ExportStyleListlevel(const uno::Reference<beans::XPropertySetInfo>& xPropSe
const uno::Reference<beans::XPropertyState>& xPropState,
const uno::Reference<beans::XPropertySet>& xPropSet, SvXMLExport& rExport)
{
- if (!xPropSetInfo->hasPropertyByName("NumberingLevel"))
+ if (!xPropSetInfo->hasPropertyByName(u"NumberingLevel"_ustr))
{
SAL_WARN("xmloff", "ExportStyleListlevel: no NumberingLevel for a Writer paragraph style");
return;
}
- if (xPropState->getPropertyState("NumberingLevel") != beans::PropertyState_DIRECT_VALUE)
+ if (xPropState->getPropertyState(u"NumberingLevel"_ustr) != beans::PropertyState_DIRECT_VALUE)
{
return;
}
sal_Int16 nNumberingLevel{};
- if (!(xPropSet->getPropertyValue("NumberingLevel") >>= nNumberingLevel))
+ if (!(xPropSet->getPropertyValue(u"NumberingLevel"_ustr) >>= nNumberingLevel))
{
return;
}
@@ -196,15 +196,15 @@ bool XMLStyleExport::exportStyle(
if( !rXMLFamily.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, rXMLFamily);
- if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"Hidden"_ustr ) )
{
- aAny = xPropSet->getPropertyValue( "Hidden" );
+ aAny = xPropSet->getPropertyValue( u"Hidden"_ustr );
bool bHidden = false;
if ((aAny >>= bHidden) && bHidden
&& GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
- GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_HIDDEN, "true");
- GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_HIDDEN, "true"); // FIXME for compatibility
+ GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_HIDDEN, u"true"_ustr);
+ GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_HIDDEN, u"true"_ustr); // FIXME for compatibility
}
}
@@ -237,9 +237,9 @@ bool XMLStyleExport::exportStyle(
}
// style:linked-style-name="..." (SW paragraph and character styles only)
- if (xPropSetInfo->hasPropertyByName("LinkStyle"))
+ if (xPropSetInfo->hasPropertyByName(u"LinkStyle"_ustr))
{
- aAny = xPropSet->getPropertyValue("LinkStyle");
+ aAny = xPropSet->getPropertyValue(u"LinkStyle"_ustr);
OUString sLinkName;
aAny >>= sLinkName;
if (!sLinkName.isEmpty()
@@ -284,7 +284,7 @@ bool XMLStyleExport::exportStyle(
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_DEFAULT_OUTLINE_LEVEL,
- OUString( "" ));
+ u""_ustr);
}
}
}
@@ -332,7 +332,7 @@ bool XMLStyleExport::exportStyle(
Reference< XPropertySet > xNumRulePropSet
(xNumRule, UNO_QUERY);
OUString sOutlineName;
- xNumRulePropSet->getPropertyValue("Name")
+ xNumRulePropSet->getPropertyValue(u"Name"_ustr)
>>= sOutlineName;
bSuppressListStyle = sListName == sOutlineName;
}
@@ -384,7 +384,7 @@ bool XMLStyleExport::exportStyle(
if ( bNoInheritedListStyle )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_LIST_STYLE_NAME,
- OUString( "" ));
+ u""_ustr);
}
}
diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx
index 583c4a7019b4..f9c6408bf772 100644
--- a/xmloff/source/style/xmlaustp.cxx
+++ b/xmloff/source/style/xmlaustp.cxx
@@ -332,7 +332,7 @@ OUString SvXMLAutoStylePoolP::Add( XmlStyleFamily nFamily,
std::vector< XMLPropertyState >&& rProperties )
{
OUString sName;
- m_pImpl->Add(sName, nFamily, "", std::move(rProperties) );
+ m_pImpl->Add(sName, nFamily, u""_ustr, std::move(rProperties) );
return sName;
}
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index a3f20965c52c..74f7abc366f6 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -263,7 +263,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
if (bIsLegal)
{
if (GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
- GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_IS_LEGAL, "true");
+ GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_IS_LEGAL, u"true"_ustr);
}
if (!sListFormat.isEmpty())
{
@@ -306,7 +306,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
else
{
// If 'cBullet' is zero, XML_BULLET_CHAR must exist with blank.
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_BULLET_CHAR, "");
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_BULLET_CHAR, u""_ustr);
}
}
else if( NumberingType::BITMAP == eType )
@@ -676,8 +676,8 @@ void SvxXMLNumRuleExport::exportNumberingRule(
if (bIsHidden
&& GetExport().getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
- GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_HIDDEN, "true");
- GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_HIDDEN, "true"); // FIXME for compatibility
+ GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_HIDDEN, u"true"_ustr);
+ GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_HIDDEN, u"true"_ustr); // FIXME for compatibility
}
// text:consecutive-numbering="..."
@@ -722,9 +722,9 @@ void SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
OUString sName = rStyle->getName();
bool bHidden = false;
- if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"Hidden"_ustr ) )
{
- aAny = xPropSet->getPropertyValue( "Hidden" );
+ aAny = xPropSet->getPropertyValue( u"Hidden"_ustr );
aAny >>= bHidden;
}
@@ -755,7 +755,7 @@ void SvxXMLNumRuleExport::exportOutline()
xCNSupplier->getChapterNumberingRules(), UNO_QUERY );
if (xNumRulePropSet.is())
{
- xNumRulePropSet->getPropertyValue( "Name" ) >>= sOutlineStyleName;
+ xNumRulePropSet->getPropertyValue( u"Name"_ustr ) >>= sOutlineStyleName;
}
}
const SvtSaveOptions::ODFSaneDefaultVersion nODFVersion =
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index ada2cd494665..f09d1e94942b 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -212,7 +212,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
SvXMLExport& rExp,
const uno::Reference< util::XNumberFormatsSupplier >& rSupp ) :
m_rExport( rExp ),
- m_sPrefix( OUString("N") ),
+ m_sPrefix( u"N"_ustr ),
m_pFormatter( nullptr ),
m_bHasText( false )
{
@@ -974,7 +974,7 @@ bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString,
AddToTextElement_Impl( rString.subView( 0, nPos ) );
}
// currency symbol (empty string -> default)
- WriteCurrencyElement_Impl( "", u"" );
+ WriteCurrencyElement_Impl( u""_ustr, u"" );
bRet = true;
// text after currency symbol
@@ -1814,7 +1814,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
nElemType == NF_KEY_R );
WriteYearElement_Impl(
((bImplicitOtherCalendar && !bExplicitCalendar
- && (nElemType == NF_KEY_YY || nElemType == NF_KEY_YYYY)) ? "gregorian" : aCalendar),
+ && (nElemType == NF_KEY_YY || nElemType == NF_KEY_YYYY)) ? u"gregorian"_ustr : aCalendar),
(bSystemDate ? bLongSysDate : bLong));
bAnyContent = true;
}
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index ccbe1bbfd2e6..110300ac1828 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -603,7 +603,7 @@ static void lcl_EnquoteIfNecessary( OUStringBuffer& rContent, const SvXMLNumForm
{
// A quote is turned into "\"" - a quote to end quoted text, an escaped quote,
// and a quote to resume quoting.
- OUString aInsert( "\"\\\"" );
+ OUString aInsert( u"\"\\\""_ustr );
sal_Int32 nPos = 0;
while ( nPos < rContent.getLength() )
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 4d12824ba9d0..8019855f6b16 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -220,7 +220,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
const Reference< xml::sax::XFastAttributeList > & xAttrList )
: SvXMLImportContext( rImport )
-, sNumFormat( "1" )
+, sNumFormat( u"1"_ustr )
, nLevel( -1 )
, nSpaceBefore( 0 )
, nMinLabelWidth( 0 )
@@ -419,34 +419,34 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties()
*sListFormat += sSuffix;
}
- aProperties.push_back(comphelper::makePropertyValue("NumberingType", eType));
+ aProperties.push_back(comphelper::makePropertyValue(u"NumberingType"_ustr, eType));
- aProperties.push_back(comphelper::makePropertyValue("Prefix", sPrefix));
+ aProperties.push_back(comphelper::makePropertyValue(u"Prefix"_ustr, sPrefix));
- aProperties.push_back(comphelper::makePropertyValue("Suffix", sSuffix));
+ aProperties.push_back(comphelper::makePropertyValue(u"Suffix"_ustr, sSuffix));
- aProperties.push_back(comphelper::makePropertyValue("Adjust", eAdjust));
+ aProperties.push_back(comphelper::makePropertyValue(u"Adjust"_ustr, eAdjust));
sal_Int32 nLeftMargin = nSpaceBefore + nMinLabelWidth;
- aProperties.push_back(comphelper::makePropertyValue("LeftMargin", nLeftMargin));
+ aProperties.push_back(comphelper::makePropertyValue(u"LeftMargin"_ustr, nLeftMargin));
sal_Int32 nFirstLineOffset = -nMinLabelWidth;
- aProperties.push_back(comphelper::makePropertyValue("FirstLineOffset", nFirstLineOffset));
+ aProperties.push_back(comphelper::makePropertyValue(u"FirstLineOffset"_ustr, nFirstLineOffset));
- aProperties.push_back(comphelper::makePropertyValue("SymbolTextDistance", static_cast<sal_Int16>(nMinLabelDist)));
+ aProperties.push_back(comphelper::makePropertyValue(u"SymbolTextDistance"_ustr, static_cast<sal_Int16>(nMinLabelDist)));
- aProperties.push_back(comphelper::makePropertyValue("PositionAndSpaceMode", ePosAndSpaceMode));
+ aProperties.push_back(comphelper::makePropertyValue(u"PositionAndSpaceMode"_ustr, ePosAndSpaceMode));
- aProperties.push_back(comphelper::makePropertyValue("LabelFollowedBy", eLabelFollowedBy));
+ aProperties.push_back(comphelper::makePropertyValue(u"LabelFollowedBy"_ustr, eLabelFollowedBy));
- aProperties.push_back(comphelper::makePropertyValue("ListtabStopPosition", nListtabStopPosition));
+ aProperties.push_back(comphelper::makePropertyValue(u"ListtabStopPosition"_ustr, nListtabStopPosition));
- aProperties.push_back(comphelper::makePropertyValue("FirstLineIndent", nFirstLineIndent));
+ aProperties.push_back(comphelper::makePropertyValue(u"FirstLineIndent"_ustr, nFirstLineIndent));
- aProperties.push_back(comphelper::makePropertyValue("IndentAt", nIndentAt));
+ aProperties.push_back(comphelper::makePropertyValue(u"IndentAt"_ustr, nIndentAt));
OUString sDisplayTextStyleName = GetImport().GetStyleDisplayName(XmlStyleFamily::TEXT_TEXT, sTextStyleName);
- aProperties.push_back(comphelper::makePropertyValue("CharStyleName", sDisplayTextStyleName));
+ aProperties.push_back(comphelper::makePropertyValue(u"CharStyleName"_ustr, sDisplayTextStyleName));
if( bBullet )
{
@@ -476,8 +476,8 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties()
// Must append 'cBullet' even if it is zero
// if 'bBullet' is true and 'cBullet' is zero - BulletChar property must be 0.
- aProperties.push_back(comphelper::makePropertyValue("BulletChar", OUString(&cBullet, 1)));
- aProperties.push_back(comphelper::makePropertyValue("BulletFont", aFDesc));
+ aProperties.push_back(comphelper::makePropertyValue(u"BulletChar"_ustr, OUString(&cBullet, 1)));
+ aProperties.push_back(comphelper::makePropertyValue(u"BulletFont"_ustr, aFDesc));
}
if( bImage )
@@ -498,34 +498,34 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties()
if (xBitmap.is())
{
- aProperties.push_back(comphelper::makePropertyValue("GraphicBitmap", xBitmap));
+ aProperties.push_back(comphelper::makePropertyValue(u"GraphicBitmap"_ustr, xBitmap));
}
awt::Size aSize(nImageWidth, nImageHeight);
- aProperties.push_back(comphelper::makePropertyValue("GraphicSize", aSize));
- aProperties.push_back(comphelper::makePropertyValue("VertOrient", eImageVertOrient));
+ aProperties.push_back(comphelper::makePropertyValue(u"GraphicSize"_ustr, aSize));
+ aProperties.push_back(comphelper::makePropertyValue(u"VertOrient"_ustr, eImageVertOrient));
}
if( bNum )
{
- aProperties.push_back(comphelper::makePropertyValue("StartWith", nNumStartValue));
- aProperties.push_back(comphelper::makePropertyValue("ParentNumbering", nNumDisplayLevels));
+ aProperties.push_back(comphelper::makePropertyValue(u"StartWith"_ustr, nNumStartValue));
+ aProperties.push_back(comphelper::makePropertyValue(u"ParentNumbering"_ustr, nNumDisplayLevels));
}
if( ( bNum || bBullet ) && nRelSize )
{
- aProperties.push_back(comphelper::makePropertyValue("BulletRelSize", nRelSize));
+ aProperties.push_back(comphelper::makePropertyValue(u"BulletRelSize"_ustr, nRelSize));
}
if( !bImage && bHasColor )
{
- aProperties.push_back(comphelper::makePropertyValue("BulletColor", m_nColor));
+ aProperties.push_back(comphelper::makePropertyValue(u"BulletColor"_ustr, m_nColor));
}
- aProperties.push_back(comphelper::makePropertyValue("ListFormat", *sListFormat));
+ aProperties.push_back(comphelper::makePropertyValue(u"ListFormat"_ustr, *sListFormat));
if (m_bIsLegal)
- aProperties.push_back(comphelper::makePropertyValue("IsLegal", true));
+ aProperties.push_back(comphelper::makePropertyValue(u"IsLegal"_ustr, true));
return comphelper::containerToSequence(aProperties);
}
@@ -963,7 +963,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
if( !xFactory.is() )
return;
- Reference < XInterface > xIfc = xFactory->createInstance("com.sun.star.style.NumberingStyle");
+ Reference < XInterface > xIfc = xFactory->createInstance(u"com.sun.star.style.NumberingStyle"_ustr);
if( !xIfc.is() )
return;
xStyle.set(xIfc, UNO_QUERY);
@@ -983,8 +983,8 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
bNew = !*o3tl::doAccess<bool>(aAny);
}
- if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
- xPropSet->setPropertyValue( "Hidden", uno::Any( IsHidden( ) ) );
+ if ( xPropSetInfo->hasPropertyByName( u"Hidden"_ustr ) )
+ xPropSet->setPropertyValue( u"Hidden"_ustr, uno::Any( IsHidden( ) ) );
if( rName != GetName() )
GetImport().AddStyleDisplayName( XmlStyleFamily::TEXT_LIST,
@@ -1034,7 +1034,7 @@ Reference < XIndexReplace > SvxXMLListStyleContext::CreateNumRule(
if( !xFactory.is() )
return xNumRule;
- Reference < XInterface > xIfc = xFactory->createInstance("com.sun.star.text.NumberingRules");
+ Reference < XInterface > xIfc = xFactory->createInstance(u"com.sun.star.text.NumberingRules"_ustr);
if( !xIfc.is() )
return xNumRule;
@@ -1076,7 +1076,7 @@ void SvxXMLListStyleContext::SetDefaultStyle(
pProps->Name = "BulletChar";
(pProps++)->Value <<= OUString(sal_Unicode(0xF000 + 149));
pProps->Name = "CharStyleName";
- (pProps++)->Value <<= OUString( "Numbering Symbols" );
+ (pProps++)->Value <<= u"Numbering Symbols"_ustr;
}
rNumRule->replaceByIndex( nLevel, Any(aPropSeq) );
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 0ed9f196d343..fdb6ae532400 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -290,9 +290,9 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
// get style
OUString sParentStyleName;
Reference< XPropertySetInfo > xPropertySetInfo( xCellSet->getPropertySetInfo() );
- if( xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName("Style") )
+ if( xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName(u"Style"_ustr) )
{
- Reference< XStyle > xStyle( xCellSet->getPropertyValue("Style"), UNO_QUERY );
+ Reference< XStyle > xStyle( xCellSet->getPropertyValue(u"Style"_ustr), UNO_QUERY );
if( xStyle.is() )
sParentStyleName = xStyle->getName();
}
@@ -529,16 +529,16 @@ const TableStyleElement* getTableStyleMap()
{
static const struct TableStyleElement gTableStyleElements[] =
{
- { XML_FIRST_ROW, OUString("first-row") },
- { XML_LAST_ROW, OUString("last-row") },
- { XML_FIRST_COLUMN, OUString("first-column") },
- { XML_LAST_COLUMN, OUString("last-column") },
- { XML_BODY, OUString("body") },
- { XML_EVEN_ROWS, OUString("even-rows") },
- { XML_ODD_ROWS, OUString("odd-rows") },
- { XML_EVEN_COLUMNS, OUString("even-columns") },
- { XML_ODD_COLUMNS, OUString("odd-columns") },
- { XML_BACKGROUND, OUString("background") },
+ { XML_FIRST_ROW, u"first-row"_ustr },
+ { XML_LAST_ROW, u"last-row"_ustr },
+ { XML_FIRST_COLUMN, u"first-column"_ustr },
+ { XML_LAST_COLUMN, u"last-column"_ustr },
+ { XML_BODY, u"body"_ustr },
+ { XML_EVEN_ROWS, u"even-rows"_ustr },
+ { XML_ODD_ROWS, u"odd-rows"_ustr },
+ { XML_EVEN_COLUMNS, u"even-columns"_ustr },
+ { XML_ODD_COLUMNS, u"odd-columns"_ustr },
+ { XML_BACKGROUND, u"background"_ustr },
{ XML_TOKEN_END, OUString() }
};
@@ -549,12 +549,12 @@ const TableStyleElement* getWriterSpecificTableStyleMap()
{
static const struct TableStyleElement gWriterSpecificTableStyleElements[] =
{
- { XML_FIRST_ROW_EVEN_COLUMN, OUString("first-row-even-column") },
- { XML_LAST_ROW_EVEN_COLUMN, OUString("last-row-even-column") },
- { XML_FIRST_ROW_END_COLUMN, OUString("first-row-end-column") },
- { XML_FIRST_ROW_START_COLUMN, OUString("first-row-start-column") },
- { XML_LAST_ROW_END_COLUMN, OUString("last-row-end-column") },
- { XML_LAST_ROW_START_COLUMN, OUString("last-row-start-column") },
+ { XML_FIRST_ROW_EVEN_COLUMN, u"first-row-even-column"_ustr },
+ { XML_LAST_ROW_EVEN_COLUMN, u"last-row-even-column"_ustr },
+ { XML_FIRST_ROW_END_COLUMN, u"first-row-end-column"_ustr },
+ { XML_FIRST_ROW_START_COLUMN, u"first-row-start-column"_ustr },
+ { XML_LAST_ROW_END_COLUMN, u"last-row-end-column"_ustr },
+ { XML_LAST_ROW_START_COLUMN, u"last-row-start-column"_ustr },
{ XML_TOKEN_END, OUString() }
};
@@ -565,10 +565,10 @@ static const TableStyleElement* getWriterSpecificTableStyleAttributes()
{
static const struct TableStyleElement gWriterSpecifitTableStyleAttributes[] =
{
- { XML_FIRST_ROW_END_COLUMN, OUString("FirstRowEndColumn") },
- { XML_FIRST_ROW_START_COLUMN, OUString("FirstRowStartColumn") },
- { XML_LAST_ROW_END_COLUMN, OUString("LastRowEndColumn") },
- { XML_LAST_ROW_START_COLUMN, OUString("LastRowStartColumn") },
+ { XML_FIRST_ROW_END_COLUMN, u"FirstRowEndColumn"_ustr },
+ { XML_FIRST_ROW_START_COLUMN, u"FirstRowStartColumn"_ustr },
+ { XML_LAST_ROW_END_COLUMN, u"LastRowEndColumn"_ustr },
+ { XML_LAST_ROW_START_COLUMN, u"LastRowStartColumn"_ustr },
{ XML_TOKEN_END, OUString() }
};
@@ -602,7 +602,7 @@ void XMLTableExport::exportTableTemplates()
try
{
- xTableStylePropSet->getPropertyValue("IsPhysical") >>= bPhysical;
+ xTableStylePropSet->getPropertyValue(u"IsPhysical"_ustr) >>= bPhysical;
}
catch(const Exception&)
{
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 76b5d86c36cc..20e11b89048d 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -308,7 +308,7 @@ void XMLTableImport::finishStyles()
{
const OUString sTemplateName( rTemplate.first );
Reference< XNameReplace > xTemplate(xFactory ? xFactory->createInstance() :
- xMultiFactory->createInstance("com.sun.star.style.TableStyle"), UNO_QUERY_THROW);
+ xMultiFactory->createInstance(u"com.sun.star.style.TableStyle"_ustr), UNO_QUERY_THROW);
std::shared_ptr< XMLTableTemplate > xT( rTemplate.second );
@@ -689,7 +689,7 @@ void XMLCellImportContext::endFastElement(sal_Int32 )
// delete addition newline
mxCursor->gotoEnd( false );
mxCursor->goLeft( 1, true );
- mxCursor->setString( "" );
+ mxCursor->setString( u""_ustr );
// reset cursor
GetImport().GetTextImport()->ResetCursor();
diff --git a/xmloff/source/text/XMLAutoMarkFileContext.cxx b/xmloff/source/text/XMLAutoMarkFileContext.cxx
index cb459516450c..30ebf3d3ff80 100644
--- a/xmloff/source/text/XMLAutoMarkFileContext.cxx
+++ b/xmloff/source/text/XMLAutoMarkFileContext.cxx
@@ -65,7 +65,7 @@ void XMLAutoMarkFileContext::startFastElement(
GetImport().GetModel(), UNO_QUERY );
if (xPropertySet.is())
{
- xPropertySet->setPropertyValue( "IndexAutoMarkFileURL", aAny );
+ xPropertySet->setPropertyValue( u"IndexAutoMarkFileURL"_ustr, aAny );
}
break;
}
diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx
index c0c928858c69..1186470d6c20 100644
--- a/xmloff/source/text/XMLAutoTextEventExport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventExport.cxx
@@ -104,7 +104,7 @@ ErrCode XMLAutoTextEventExport::exportDoc( enum XMLTokenEnum )
// get filter component
Reference< xml::sax::XDocumentHandler > xTmpDocHandler(
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.comp.Oasis2OOoTransformer",
+ u"com.sun.star.comp.Oasis2OOoTransformer"_ustr,
aArgs,
xContext),
UNO_QUERY);
@@ -198,7 +198,7 @@ com_sun_star_comp_Writer_XMLOasisAutotextEventsExporter_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new XMLAutoTextEventExport(
- context, "com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter",
+ context, u"com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter"_ustr,
SvXMLExportFlags::ALL | SvXMLExportFlags::OASIS));
}
@@ -207,7 +207,7 @@ com_sun_star_comp_Writer_XMLAutotextEventsExporter_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new XMLAutoTextEventExport(
- context, "com.sun.star.comp.Writer.XMLAutotextEventsExporter",
+ context, u"com.sun.star.comp.Writer.XMLAutotextEventsExporter"_ustr,
SvXMLExportFlags::ALL));
}
diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx
index 93901ca97fa6..c814ba370ed3 100644
--- a/xmloff/source/text/XMLAutoTextEventImport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventImport.cxx
@@ -40,7 +40,7 @@ using ::xmloff::token::XML_AUTO_TEXT_EVENTS;
XMLAutoTextEventImport::XMLAutoTextEventImport(
const css::uno::Reference<css::uno::XComponentContext>& xContext)
- : SvXMLImport(xContext, "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter")
+ : SvXMLImport(xContext, u"com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter"_ustr)
{
}
diff --git a/xmloff/source/text/XMLCalculationSettingsContext.cxx b/xmloff/source/text/XMLCalculationSettingsContext.cxx
index f314758543dc..7b6f0b1c6999 100644
--- a/xmloff/source/text/XMLCalculationSettingsContext.cxx
+++ b/xmloff/source/text/XMLCalculationSettingsContext.cxx
@@ -63,7 +63,7 @@ void XMLCalculationSettingsContext::endFastElement(sal_Int32 )
if (xTextDoc.is())
{
Reference < XPropertySet > xPropSet ( xTextDoc, UNO_QUERY );
- xPropSet->setPropertyValue ( "TwoDigitYear", Any(nYear) );
+ xPropSet->setPropertyValue ( u"TwoDigitYear"_ustr, Any(nYear) );
}
}
}
diff --git a/xmloff/source/text/XMLComplexColorExport.cxx b/xmloff/source/text/XMLComplexColorExport.cxx
index 7442d23f74c2..2a4170d498fd 100644
--- a/xmloff/source/text/XMLComplexColorExport.cxx
+++ b/xmloff/source/text/XMLComplexColorExport.cxx
@@ -41,7 +41,7 @@ void XMLComplexColorExport::doExport(model::ComplexColor const& rComplexColor, s
XMLTokenEnum nToken = constThemeColorTypeToToken[sal_Int16(eThemeType)];
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_THEME_TYPE, nToken);
- mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_COLOR_TYPE, "theme");
+ mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_COLOR_TYPE, u"theme"_ustr);
SvXMLElementExport aComplexColorElement(mrExport, nPrefix, rLocalName, true, true);
for (auto const& rTransform : rComplexColor.getTransformations())
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index 9c17f5b1f9bf..3b2b20315961 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -122,8 +122,8 @@ XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext(
sal_Int32 /*nElement*/,
const Reference<XFastAttributeList> & xAttrList)
: SvXMLStyleContext(rImport, XmlStyleFamily::TEXT_FOOTNOTECONFIG)
-, sNumFormat("1")
-, sNumSync("false")
+, sNumFormat(u"1"_ustr)
+, sNumSync(u"false"_ustr)
, nOffset(0)
, nNumbering(FootnoteNumbering::PER_PAGE)
, bPosition(false)
diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx
index 93cc5bebe04d..a73147ec09f1 100644
--- a/xmloff/source/text/XMLFootnoteImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteImportContext.cxx
@@ -75,8 +75,8 @@ void XMLFootnoteImportContext::startFastElement(
Reference<XInterface> xIfc = xFactory->createInstance(
bIsEndnote ?
- OUString("com.sun.star.text.Endnote") :
- OUString("com.sun.star.text.Footnote") );
+ u"com.sun.star.text.Endnote"_ustr :
+ u"com.sun.star.text.Footnote"_ustr );
// attach footnote to document
Reference<XTextContent> xTextContent(xIfc, UNO_QUERY);
@@ -89,7 +89,7 @@ void XMLFootnoteImportContext::startFastElement(
{
// get ID ...
Reference<XPropertySet> xPropertySet(xTextContent, UNO_QUERY);
- Any aAny =xPropertySet->getPropertyValue("ReferenceId");
+ Any aAny =xPropertySet->getPropertyValue(u"ReferenceId"_ustr);
sal_Int16 nID = 0;
aAny >>= nID;
diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
index 558f43dfb586..982bbc16816d 100644
--- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
@@ -162,28 +162,28 @@ void XMLIndexAlphabeticalSourceContext::endFastElement(sal_Int32 nElement)
{
aAny <<= GetImport().GetStyleDisplayName(
XmlStyleFamily::TEXT_TEXT, sMainEntryStyleName );
- rIndexPropertySet->setPropertyValue("MainEntryCharacterStyleName",aAny);
+ rIndexPropertySet->setPropertyValue(u"MainEntryCharacterStyleName"_ustr,aAny);
}
- rIndexPropertySet->setPropertyValue("UseAlphabeticalSeparators", css::uno::Any(bSeparators));
- rIndexPropertySet->setPropertyValue("UseCombinedEntries", css::uno::Any(bCombineEntries));
- rIndexPropertySet->setPropertyValue("IsCaseSensitive", css::uno::Any(bCaseSensitive));
- rIndexPropertySet->setPropertyValue("UseKeyAsEntry", css::uno::Any(bEntry));
- rIndexPropertySet->setPropertyValue("UseUpperCase", css::uno::Any(bUpperCase));
- rIndexPropertySet->setPropertyValue("UseDash", css::uno::Any(bCombineDash));
- rIndexPropertySet->setPropertyValue("UsePP", css::uno::Any(bCombinePP));
- rIndexPropertySet->setPropertyValue("IsCommaSeparated", css::uno::Any(bCommaSeparated));
+ rIndexPropertySet->setPropertyValue(u"UseAlphabeticalSeparators"_ustr, css::uno::Any(bSeparators));
+ rIndexPropertySet->setPropertyValue(u"UseCombinedEntries"_ustr, css::uno::Any(bCombineEntries));
+ rIndexPropertySet->setPropertyValue(u"IsCaseSensitive"_ustr, css::uno::Any(bCaseSensitive));
+ rIndexPropertySet->setPropertyValue(u"UseKeyAsEntry"_ustr, css::uno::Any(bEntry));
+ rIndexPropertySet->setPropertyValue(u"UseUpperCase"_ustr, css::uno::Any(bUpperCase));
+ rIndexPropertySet->setPropertyValue(u"UseDash"_ustr, css::uno::Any(bCombineDash));
+ rIndexPropertySet->setPropertyValue(u"UsePP"_ustr, css::uno::Any(bCombinePP));
+ rIndexPropertySet->setPropertyValue(u"IsCommaSeparated"_ustr, css::uno::Any(bCommaSeparated));
if (!sAlgorithm.isEmpty())
{
- rIndexPropertySet->setPropertyValue("SortAlgorithm", css::uno::Any(sAlgorithm));
+ rIndexPropertySet->setPropertyValue(u"SortAlgorithm"_ustr, css::uno::Any(sAlgorithm));
}
if ( !maLanguageTagODF.isEmpty() )
{
aAny <<= maLanguageTagODF.getLanguageTag().getLocale( false);
- rIndexPropertySet->setPropertyValue("Locale", aAny);
+ rIndexPropertySet->setPropertyValue(u"Locale"_ustr, aAny);
}
XMLIndexSourceBaseContext::endFastElement(nElement);
diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
index 8ec3d6ff7e78..0cfa28d7c670 100644
--- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
@@ -40,7 +40,7 @@ XMLIndexBibliographyEntryContext::XMLIndexBibliographyEntryContext(
SvXMLImport& rImport,
XMLIndexTemplateContext& rTemplate ) :
XMLIndexSimpleEntryContext(rImport,
- "TokenBibliographyDataField",
+ u"TokenBibliographyDataField"_ustr,
rTemplate),
nBibliographyInfo(BibliographyDataField::IDENTIFIER),
bBibliographyInfoOK(false)
diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
index 0844e7f5ef56..a3ef81d634aa 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
@@ -46,8 +46,8 @@ XMLIndexChapterInfoEntryContext::XMLIndexChapterInfoEntryContext(
XMLIndexTemplateContext& rTemplate,
bool bT ) :
XMLIndexSimpleEntryContext(rImport,
- (bT ? OUString("TokenEntryNumber")
- : OUString("TokenChapterInfo")),
+ (bT ? u"TokenEntryNumber"_ustr
+ : u"TokenChapterInfo"_ustr),
rTemplate),
nChapterInfo(ChapterFormat::NAME_NUMBER),
bChapterInfoOK(false),
diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.cxx b/xmloff/source/text/XMLIndexObjectSourceContext.cxx
index d016d21c971d..aa75134943b4 100644
--- a/xmloff/source/text/XMLIndexObjectSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexObjectSourceContext.cxx
@@ -101,11 +101,11 @@ void XMLIndexObjectSourceContext::ProcessAttribute(const sax_fastparser::FastAtt
void XMLIndexObjectSourceContext::endFastElement(sal_Int32 nElement)
{
- rIndexPropertySet->setPropertyValue("CreateFromStarCalc", css::uno::Any(bUseCalc));
- rIndexPropertySet->setPropertyValue("CreateFromStarChart", css::uno::Any(bUseChart));
- rIndexPropertySet->setPropertyValue("CreateFromStarDraw", css::uno::Any(bUseDraw));
- rIndexPropertySet->setPropertyValue("CreateFromStarMath", css::uno::Any(bUseMath));
- rIndexPropertySet->setPropertyValue("CreateFromOtherEmbeddedObjects", css::uno::Any(bUseOtherObjects));
+ rIndexPropertySet->setPropertyValue(u"CreateFromStarCalc"_ustr, css::uno::Any(bUseCalc));
+ rIndexPropertySet->setPropertyValue(u"CreateFromStarChart"_ustr, css::uno::Any(bUseChart));
+ rIndexPropertySet->setPropertyValue(u"CreateFromStarDraw"_ustr, css::uno::Any(bUseDraw));
+ rIndexPropertySet->setPropertyValue(u"CreateFromStarMath"_ustr, css::uno::Any(bUseMath));
+ rIndexPropertySet->setPropertyValue(u"CreateFromOtherEmbeddedObjects"_ustr, css::uno::Any(bUseOtherObjects));
XMLIndexSourceBaseContext::endFastElement(nElement);
}
diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx
index c93d2faab5cd..bca46b057232 100644
--- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx
+++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx
@@ -92,8 +92,8 @@ void XMLIndexSourceBaseContext::ProcessAttribute(const sax_fastparser::FastAttri
void XMLIndexSourceBaseContext::endFastElement(sal_Int32 )
{
- rIndexPropertySet->setPropertyValue("IsRelativeTabstops", css::uno::Any(bRelativeTabs));
- rIndexPropertySet->setPropertyValue("CreateFromChapter", css::uno::Any(bChapterIndex));
+ rIndexPropertySet->setPropertyValue(u"IsRelativeTabstops"_ustr, css::uno::Any(bRelativeTabs));
+ rIndexPropertySet->setPropertyValue(u"CreateFromChapter"_ustr, css::uno::Any(bChapterIndex));
}
css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexSourceBaseContext::createFastChildContext(
@@ -122,7 +122,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexSourceBaseCont
{
OUString const convertedStyleName(GetImport().GetStyleDisplayName(
XmlStyleFamily::TEXT_PARAGRAPH, styleName));
- rIndexPropertySet->setPropertyValue("CreateFromParagraphStyle", css::uno::Any(convertedStyleName));
+ rIndexPropertySet->setPropertyValue(u"CreateFromParagraphStyle"_ustr, css::uno::Any(convertedStyleName));
}
}
diff --git a/xmloff/source/text/XMLIndexSpanEntryContext.cxx b/xmloff/source/text/XMLIndexSpanEntryContext.cxx
index ba0c976cfc53..abf7a3eb4eb9 100644
--- a/xmloff/source/text/XMLIndexSpanEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexSpanEntryContext.cxx
@@ -31,7 +31,7 @@ using ::com::sun::star::beans::PropertyValue;
XMLIndexSpanEntryContext::XMLIndexSpanEntryContext(
SvXMLImport& rImport,
XMLIndexTemplateContext& rTemplate ) :
- XMLIndexSimpleEntryContext(rImport, "TokenText",
+ XMLIndexSimpleEntryContext(rImport, u"TokenText"_ustr,
rTemplate)
{
m_nValues++; // one more for the text string
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index b2dfe52e4803..205199269fda 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -51,21 +51,20 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
using namespace ::xmloff::token;
-using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::lang::IllegalArgumentException;
-static const char* aIndexServiceMap[] =
+constexpr OUString aIndexServiceMap[]
{
- "com.sun.star.text.ContentIndex",
- "com.sun.star.text.DocumentIndex",
- "com.sun.star.text.TableIndex",
- "com.sun.star.text.ObjectIndex",
- "com.sun.star.text.Bibliography",
- "com.sun.star.text.UserIndex",
- "com.sun.star.text.IllustrationsIndex"
+ u"com.sun.star.text.ContentIndex"_ustr,
+ u"com.sun.star.text.DocumentIndex"_ustr,
+ u"com.sun.star.text.TableIndex"_ustr,
+ u"com.sun.star.text.ObjectIndex"_ustr,
+ u"com.sun.star.text.Bibliography"_ustr,
+ u"com.sun.star.text.UserIndex"_ustr,
+ u"com.sun.star.text.IllustrationsIndex"_ustr
};
const XMLTokenEnum aIndexSourceElementMap[] =
@@ -169,9 +168,7 @@ void XMLIndexTOCContext::startFastElement(
UNO_QUERY);
if( xFactory.is() )
{
- Reference<XInterface> xIfc =
- xFactory->createInstance(
- OUString::createFromAscii(aIndexServiceMap[eIndexType]));
+ Reference<XInterface> xIfc = xFactory->createInstance(aIndexServiceMap[eIndexType]);
if( xIfc.is() )
{
// get Property set
@@ -232,11 +229,11 @@ void XMLIndexTOCContext::startFastElement(
pStyle->FillPropertySet( xTOCPropertySet );
}
- xTOCPropertySet->setPropertyValue( "IsProtected", Any(bProtected) );
+ xTOCPropertySet->setPropertyValue( u"IsProtected"_ustr, Any(bProtected) );
if (!sIndexName.isEmpty())
{
- xTOCPropertySet->setPropertyValue( "Name", Any(sIndexName) );
+ xTOCPropertySet->setPropertyValue( u"Name"_ustr, Any(sIndexName) );
}
}
@@ -257,13 +254,13 @@ void XMLIndexTOCContext::endFastElement(sal_Int32 )
{
rHelper->GetCursor()->goLeft(1, true);
rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
- "", true);
+ u""_ustr, true);
}
// and delete second marker
rHelper->GetCursor()->goRight(1, true);
rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
- "", true);
+ u""_ustr, true);
// check for Redlines on our end node
GetImport().GetTextImport()->RedlineAdjustStartNodeCursor();
diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
index eb6bf5bac0be..76c57fd15002 100644
--- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
@@ -115,11 +115,11 @@ void XMLIndexTOCSourceContext::ProcessAttribute(const sax_fastparser::FastAttrib
void XMLIndexTOCSourceContext::endFastElement(sal_Int32 nElement)
{
- rIndexPropertySet->setPropertyValue("CreateFromMarks", css::uno::Any(bUseMarks));
- rIndexPropertySet->setPropertyValue("CreateFromOutline", css::uno::Any(bUseOutline));
- rIndexPropertySet->setPropertyValue("CreateFromLevelParagraphStyles", css::uno::Any(bUseParagraphStyles));
+ rIndexPropertySet->setPropertyValue(u"CreateFromMarks"_ustr, css::uno::Any(bUseMarks));
+ rIndexPropertySet->setPropertyValue(u"CreateFromOutline"_ustr, css::uno::Any(bUseOutline));
+ rIndexPropertySet->setPropertyValue(u"CreateFromLevelParagraphStyles"_ustr, css::uno::Any(bUseParagraphStyles));
- rIndexPropertySet->setPropertyValue("Level", css::uno::Any(static_cast<sal_Int16>(nOutlineLevel)));
+ rIndexPropertySet->setPropertyValue(u"Level"_ustr, css::uno::Any(static_cast<sal_Int16>(nOutlineLevel)));
// process common attributes
XMLIndexSourceBaseContext::endFastElement(nElement);
diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
index a410e49f13aa..7f6eb6f6a180 100644
--- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
@@ -95,7 +95,7 @@ void XMLIndexTOCStylesContext::endFastElement(sal_Int32 )
}
// get index replace
- Any aAny = rTOCPropertySet->getPropertyValue("LevelParagraphStyles");
+ Any aAny = rTOCPropertySet->getPropertyValue(u"LevelParagraphStyles"_ustr);
Reference<XIndexReplace> xIndexReplace;
aAny >>= xIndexReplace;
diff --git a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
index d5ad6b8780cb..66667da675c6 100644
--- a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
@@ -40,7 +40,7 @@ using ::com::sun::star::beans::PropertyValue;
XMLIndexTabStopEntryContext::XMLIndexTabStopEntryContext(
SvXMLImport& rImport,
XMLIndexTemplateContext& rTemplate ) :
- XMLIndexSimpleEntryContext(rImport, "TokenTabStop",
+ XMLIndexSimpleEntryContext(rImport, u"TokenTabStop"_ustr,
rTemplate),
nTabPosition(0),
bTabPositionOK(false),
diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx
index d5d4901b0391..a72d898f9457 100644
--- a/xmloff/source/text/XMLIndexTableSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx
@@ -107,16 +107,16 @@ void XMLIndexTableSourceContext::ProcessAttribute(const sax_fastparser::FastAttr
void XMLIndexTableSourceContext::endFastElement(sal_Int32 nElement)
{
- rIndexPropertySet->setPropertyValue("CreateFromLabels", css::uno::Any(bUseCaption));
+ rIndexPropertySet->setPropertyValue(u"CreateFromLabels"_ustr, css::uno::Any(bUseCaption));
if (bSequenceOK)
{
- rIndexPropertySet->setPropertyValue("LabelCategory", css::uno::Any(sSequence));
+ rIndexPropertySet->setPropertyValue(u"LabelCategory"_ustr, css::uno::Any(sSequence));
}
if (bDisplayFormatOK)
{
- rIndexPropertySet->setPropertyValue("LabelDisplayType", css::uno::Any(nDisplayFormat));
+ rIndexPropertySet->setPropertyValue(u"LabelDisplayType"_ustr, css::uno::Any(nDisplayFormat));
}
XMLIndexSourceBaseContext::endFastElement(nElement);
diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx
index 9a521686f596..1a1c52a2a035 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.cxx
@@ -53,7 +53,7 @@ XMLIndexTemplateContext::XMLIndexTemplateContext(
Reference<XPropertySet> & rPropSet,
const SvXMLEnumMapEntry<sal_uInt16>* pLevelNameMap,
enum XMLTokenEnum eLevelAttrName,
- const char** pLevelStylePropMap,
+ std::span<const OUString> pLevelStylePropMap,
const bool* pAllowedTokenTypes,
bool bT )
: SvXMLImportContext(rImport)
@@ -70,7 +70,6 @@ XMLIndexTemplateContext::XMLIndexTemplateContext(
DBG_ASSERT( ((XML_TOKEN_INVALID != eLevelAttrName) && (nullptr != pLevelNameMap))
|| ((XML_TOKEN_INVALID == eLevelAttrName) && (nullptr == pLevelNameMap)),
"need both, attribute name and value map, or neither" );
- SAL_WARN_IF( nullptr == pOutlineLevelStylePropMap, "xmloff", "need property name map" );
SAL_WARN_IF( nullptr == pAllowedTokenTypes, "xmloff", "need allowed tokens map" );
// no map for outline-level? then use 1
@@ -132,7 +131,7 @@ void XMLIndexTemplateContext::endFastElement(sal_Int32 )
std::copy(aValueVector.begin(), aValueVector.end(), aValueSequence.getArray());
// get LevelFormat IndexReplace ...
- Any aAny = rPropertySet->getPropertyValue("LevelFormat");
+ Any aAny = rPropertySet->getPropertyValue(u"LevelFormat"_ustr);
Reference<XIndexReplace> xIndexReplace;
aAny >>= xIndexReplace;
@@ -142,11 +141,11 @@ void XMLIndexTemplateContext::endFastElement(sal_Int32 )
if (!bStyleNameOK)
return;
- const char* pStyleProperty =
+ const OUString pStyleProperty =
pOutlineLevelStylePropMap[nOutlineLevel];
- DBG_ASSERT(nullptr != pStyleProperty, "need property name");
- if (nullptr == pStyleProperty)
+ DBG_ASSERT(!pStyleProperty.isEmpty(), "need property name");
+ if (pStyleProperty.isEmpty())
return;
OUString sDisplayStyleName =
@@ -160,7 +159,7 @@ void XMLIndexTemplateContext::endFastElement(sal_Int32 )
rStyles->hasByName( sDisplayStyleName ) )
{
rPropertySet->setPropertyValue(
- OUString::createFromAscii(pStyleProperty), css::uno::Any(sDisplayStyleName));
+ pStyleProperty, css::uno::Any(sDisplayStyleName));
}
}
@@ -212,22 +211,22 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexTemplateContex
{
case XML_TOK_INDEX_TYPE_ENTRY_TEXT:
pContext = new XMLIndexSimpleEntryContext(
- GetImport(), "TokenEntryText", *this);
+ GetImport(), u"TokenEntryText"_ustr, *this);
break;
case XML_TOK_INDEX_TYPE_PAGE_NUMBER:
pContext = new XMLIndexSimpleEntryContext(
- GetImport(), "TokenPageNumber", *this);
+ GetImport(), u"TokenPageNumber"_ustr, *this);
break;
case XML_TOK_INDEX_TYPE_LINK_START:
pContext = new XMLIndexSimpleEntryContext(
- GetImport(), "TokenHyperlinkStart", *this);
+ GetImport(), u"TokenHyperlinkStart"_ustr, *this);
break;
case XML_TOK_INDEX_TYPE_LINK_END:
pContext = new XMLIndexSimpleEntryContext(
- GetImport(), "TokenHyperlinkEnd", *this);
+ GetImport(), u"TokenHyperlinkEnd"_ustr, *this);
break;
case XML_TOK_INDEX_TYPE_TEXT:
@@ -283,11 +282,12 @@ const SvXMLEnumMapEntry<sal_uInt16> aSvLevelNameTOCMap[] =
{ XML_TOKEN_INVALID, 0 }
};
-const char* aLevelStylePropNameTOCMap[] =
- { nullptr, "ParaStyleLevel1", "ParaStyleLevel2", "ParaStyleLevel3",
- "ParaStyleLevel4", "ParaStyleLevel5", "ParaStyleLevel6",
- "ParaStyleLevel7", "ParaStyleLevel8", "ParaStyleLevel9",
- "ParaStyleLevel10", nullptr };
+constexpr OUString aLevelStylePropNameTOCMapArray[] =
+ { u""_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel2"_ustr, u"ParaStyleLevel3"_ustr,
+ u"ParaStyleLevel4"_ustr, u"ParaStyleLevel5"_ustr, u"ParaStyleLevel6"_ustr,
+ u"ParaStyleLevel7"_ustr, u"ParaStyleLevel8"_ustr, u"ParaStyleLevel9"_ustr,
+ u"ParaStyleLevel10"_ustr, u""_ustr };
+std::span<const OUString> const aLevelStylePropNameTOCMap = aLevelStylePropNameTOCMapArray;
const bool aAllowedTokenTypesTOC[] =
{
@@ -325,9 +325,10 @@ const SvXMLEnumMapEntry<sal_uInt16> aLevelNameAlphaMap[] =
{ XML_TOKEN_INVALID, 0 }
};
-const char* aLevelStylePropNameAlphaMap[] =
- { nullptr, "ParaStyleSeparator", "ParaStyleLevel1", "ParaStyleLevel2",
- "ParaStyleLevel3", nullptr };
+constexpr OUString aLevelStylePropNameAlphaMapArray[] =
+ { u""_ustr, u"ParaStyleSeparator"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel2"_ustr,
+ u"ParaStyleLevel3"_ustr, u""_ustr };
+std::span<const OUString> const aLevelStylePropNameAlphaMap = aLevelStylePropNameAlphaMapArray;
const bool aAllowedTokenTypesAlpha[] =
{
@@ -372,16 +373,17 @@ const SvXMLEnumMapEntry<sal_uInt16> aLevelNameBibliographyMap[] =
};
// TODO: replace with real property names, when available
-const char* aLevelStylePropNameBibliographyMap[] =
+constexpr OUString aLevelStylePropNameBibliographyMapArray[] =
{
- nullptr, "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", nullptr };
+ u""_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u""_ustr };
+std::span<const OUString> const aLevelStylePropNameBibliographyMap = aLevelStylePropNameBibliographyMapArray;
const bool aAllowedTokenTypesBibliography[] =
{
@@ -401,8 +403,9 @@ const bool aAllowedTokenTypesBibliography[] =
// no name map
const SvXMLEnumMapEntry<sal_uInt16>* aLevelNameTableMap = nullptr;
-const char* aLevelStylePropNameTableMap[] =
- { nullptr, "ParaStyleLevel1", nullptr };
+constexpr OUString aLevelStylePropNameTableMapArray[] =
+ { u""_ustr, u"ParaStyleLevel1"_ustr, u""_ustr };
+std::span<const OUString> const aLevelStylePropNameTableMap = aLevelStylePropNameTableMapArray;
const bool aAllowedTokenTypesTable[] =
{
diff --git a/xmloff/source/text/XMLIndexTemplateContext.hxx b/xmloff/source/text/XMLIndexTemplateContext.hxx
index 424693d7e459..2dd7c0b7517a 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.hxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.hxx
@@ -22,6 +22,7 @@
#include <xmloff/xmlictxt.hxx>
#include <xmloff/xmltoken.hxx>
+#include <span>
#include <vector>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -38,23 +39,23 @@ template<typename EnumT> struct SvXMLEnumMapEntry;
// TOC and user defined index:
extern const SvXMLEnumMapEntry<sal_uInt16> aSvLevelNameTOCMap[];
-extern const char* aLevelStylePropNameTOCMap[];
+extern std::span<const OUString> const aLevelStylePropNameTOCMap;
extern const bool aAllowedTokenTypesTOC[];
extern const bool aAllowedTokenTypesUser[];
// alphabetical index:
extern const SvXMLEnumMapEntry<sal_uInt16> aLevelNameAlphaMap[];
-extern const char* aLevelStylePropNameAlphaMap[];
+extern std::span<const OUString> const aLevelStylePropNameAlphaMap;
extern const bool aAllowedTokenTypesAlpha[];
// bibliography:
extern const SvXMLEnumMapEntry<sal_uInt16> aLevelNameBibliographyMap[];
-extern const char* aLevelStylePropNameBibliographyMap[];
+extern std::span<const OUString> const aLevelStylePropNameBibliographyMap;
extern const bool aAllowedTokenTypesBibliography[];
// table, illustration and object tables:
extern const SvXMLEnumMapEntry<sal_uInt16>* aLevelNameTableMap; // NULL: no outline-level
-extern const char* aLevelStylePropNameTableMap[];
+extern std::span<const OUString> const aLevelStylePropNameTableMap;
extern const bool aAllowedTokenTypesTable[];
@@ -70,7 +71,7 @@ class XMLIndexTemplateContext : public SvXMLImportContext
const SvXMLEnumMapEntry<sal_uInt16>* pOutlineLevelNameMap;
enum ::xmloff::token::XMLTokenEnum eOutlineLevelAttrName;
- const char** pOutlineLevelStylePropMap;
+ std::span<const OUString> pOutlineLevelStylePropMap;
const bool* pAllowedTokenTypesMap;
sal_Int32 nOutlineLevel;
@@ -88,7 +89,7 @@ public:
css::uno::Reference<css::beans::XPropertySet> & rPropSet,
const SvXMLEnumMapEntry<EnumT>* aLevelNameMap,
enum ::xmloff::token::XMLTokenEnum eLevelAttrName,
- const char** aLevelStylePropNameMap,
+ std::span<const OUString> aLevelStylePropNameMap,
const bool* aAllowedTokenTypes,
bool bTOC_=false)
: XMLIndexTemplateContext(rImport,rPropSet,
@@ -99,7 +100,7 @@ public:
css::uno::Reference<css::beans::XPropertySet> & rPropSet,
const SvXMLEnumMapEntry<sal_uInt16>* aLevelNameMap,
enum ::xmloff::token::XMLTokenEnum eLevelAttrName,
- const char** aLevelStylePropNameMap,
+ std::span<const OUString> aLevelStylePropNameMap,
const bool* aAllowedTokenTypes,
bool bTOC);
diff --git a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx
index 33cb56770ccd..d621d816b3b6 100644
--- a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx
@@ -74,14 +74,14 @@ void XMLIndexTitleTemplateContext::endFastElement(sal_Int32 )
Any aAny;
aAny <<= sContent.makeStringAndClear();
- rTOCPropertySet->setPropertyValue("Title", aAny);
+ rTOCPropertySet->setPropertyValue(u"Title"_ustr, aAny);
if (bStyleNameOK)
{
aAny <<= GetImport().GetStyleDisplayName(
XmlStyleFamily::TEXT_PARAGRAPH,
sStyleName );
- rTOCPropertySet->setPropertyValue("ParaStyleHeading", aAny);
+ rTOCPropertySet->setPropertyValue(u"ParaStyleHeading"_ustr, aAny);
}
}
diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx
index 78b39b2f723d..f459ea9e996e 100644
--- a/xmloff/source/text/XMLIndexUserSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx
@@ -117,17 +117,17 @@ void XMLIndexUserSourceContext::ProcessAttribute(const sax_fastparser::FastAttri
void XMLIndexUserSourceContext::endFastElement(sal_Int32 nElement)
{
- rIndexPropertySet->setPropertyValue("CreateFromEmbeddedObjects", css::uno::Any(bUseObjects));
- rIndexPropertySet->setPropertyValue("CreateFromGraphicObjects", css::uno::Any(bUseGraphic));
- rIndexPropertySet->setPropertyValue("UseLevelFromSource", css::uno::Any(bUseLevelFromSource));
- rIndexPropertySet->setPropertyValue("CreateFromMarks", css::uno::Any(bUseMarks));
- rIndexPropertySet->setPropertyValue("CreateFromTables", css::uno::Any(bUseTables));
- rIndexPropertySet->setPropertyValue("CreateFromTextFrames", css::uno::Any(bUseFrames));
- rIndexPropertySet->setPropertyValue("CreateFromLevelParagraphStyles", css::uno::Any(bUseLevelParagraphStyles));
+ rIndexPropertySet->setPropertyValue(u"CreateFromEmbeddedObjects"_ustr, css::uno::Any(bUseObjects));
+ rIndexPropertySet->setPropertyValue(u"CreateFromGraphicObjects"_ustr, css::uno::Any(bUseGraphic));
+ rIndexPropertySet->setPropertyValue(u"UseLevelFromSource"_ustr, css::uno::Any(bUseLevelFromSource));
+ rIndexPropertySet->setPropertyValue(u"CreateFromMarks"_ustr, css::uno::Any(bUseMarks));
+ rIndexPropertySet->setPropertyValue(u"CreateFromTables"_ustr, css::uno::Any(bUseTables));
+ rIndexPropertySet->setPropertyValue(u"CreateFromTextFrames"_ustr, css::uno::Any(bUseFrames));
+ rIndexPropertySet->setPropertyValue(u"CreateFromLevelParagraphStyles"_ustr, css::uno::Any(bUseLevelParagraphStyles));
if( !sIndexName.isEmpty() )
{
- rIndexPropertySet->setPropertyValue("UserIndexName", css::uno::Any(sIndexName));
+ rIndexPropertySet->setPropertyValue(u"UserIndexName"_ustr, css::uno::Any(sIndexName));
}
XMLIndexSourceBaseContext::endFastElement(nElement);
diff --git a/xmloff/source/text/XMLLineNumberingExport.cxx b/xmloff/source/text/XMLLineNumberingExport.cxx
index 613f2d0334ed..5e851025120b 100644
--- a/xmloff/source/text/XMLLineNumberingExport.cxx
+++ b/xmloff/source/text/XMLLineNumberingExport.cxx
@@ -68,7 +68,7 @@ void XMLLineNumberingExport::Export()
return;
// char style
- Any aAny = xLineNumbering->getPropertyValue("CharStyleName");
+ Any aAny = xLineNumbering->getPropertyValue(u"CharStyleName"_ustr);
OUString sTmp;
aAny >>= sTmp;
if (!sTmp.isEmpty())
@@ -78,7 +78,7 @@ void XMLLineNumberingExport::Export()
}
// enable
- aAny = xLineNumbering->getPropertyValue("IsOn");
+ aAny = xLineNumbering->getPropertyValue(u"IsOn"_ustr);
if (! *o3tl::doAccess<bool>(aAny))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
@@ -86,7 +86,7 @@ void XMLLineNumberingExport::Export()
}
// count empty lines
- aAny = xLineNumbering->getPropertyValue("CountEmptyLines");
+ aAny = xLineNumbering->getPropertyValue(u"CountEmptyLines"_ustr);
if (! *o3tl::doAccess<bool>(aAny))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
@@ -94,7 +94,7 @@ void XMLLineNumberingExport::Export()
}
// count in frames
- aAny = xLineNumbering->getPropertyValue("CountLinesInFrames");
+ aAny = xLineNumbering->getPropertyValue(u"CountLinesInFrames"_ustr);
if (*o3tl::doAccess<bool>(aAny))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
@@ -102,7 +102,7 @@ void XMLLineNumberingExport::Export()
}
// restart numbering
- aAny = xLineNumbering->getPropertyValue("RestartAtEachPage");
+ aAny = xLineNumbering->getPropertyValue(u"RestartAtEachPage"_ustr);
if (*o3tl::doAccess<bool>(aAny))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
@@ -110,7 +110,7 @@ void XMLLineNumberingExport::Export()
}
// Distance
- aAny = xLineNumbering->getPropertyValue("Distance");
+ aAny = xLineNumbering->getPropertyValue(u"Distance"_ustr);
sal_Int32 nLength = 0;
aAny >>= nLength;
if (nLength != 0)
@@ -124,7 +124,7 @@ void XMLLineNumberingExport::Export()
// NumberingType
OUStringBuffer sNumPosBuf;
- aAny = xLineNumbering->getPropertyValue("NumberingType");
+ aAny = xLineNumbering->getPropertyValue(u"NumberingType"_ustr);
sal_Int16 nFormat = 0;
aAny >>= nFormat;
rExport.GetMM100UnitConverter().convertNumFormat( sNumPosBuf, nFormat );
@@ -139,7 +139,7 @@ void XMLLineNumberingExport::Export()
}
// number position
- aAny = xLineNumbering->getPropertyValue("NumberPosition");
+ aAny = xLineNumbering->getPropertyValue(u"NumberPosition"_ustr);
sal_uInt16 nPosition = 0;
aAny >>= nPosition;
if (SvXMLUnitConverter::convertEnum(sNumPosBuf, nPosition,
@@ -150,7 +150,7 @@ void XMLLineNumberingExport::Export()
}
// sInterval
- aAny = xLineNumbering->getPropertyValue("Interval");
+ aAny = xLineNumbering->getPropertyValue(u"Interval"_ustr);
sal_Int16 nLineInterval = 0;
aAny >>= nLineInterval;
rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_INCREMENT,
@@ -161,14 +161,14 @@ void XMLLineNumberingExport::Export()
true, true);
// line separator
- aAny = xLineNumbering->getPropertyValue("SeparatorText");
+ aAny = xLineNumbering->getPropertyValue(u"SeparatorText"_ustr);
OUString sSeparator;
aAny >>= sSeparator;
if (sSeparator.isEmpty())
return;
// SeparatorInterval
- aAny = xLineNumbering->getPropertyValue("SeparatorInterval");
+ aAny = xLineNumbering->getPropertyValue(u"SeparatorInterval"_ustr);
sal_Int16 nLineDistance = 0;
aAny >>= nLineDistance;
rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_INCREMENT,
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx
index fef92ad213cf..5441db405033 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -127,7 +127,7 @@ XMLTextImportHelper::MakeBackpatcherImpl()
static OUString GetSequenceNumber()
{
- return "SequenceNumber";
+ return u"SequenceNumber"_ustr;
}
@@ -169,7 +169,7 @@ XMLPropertyBackpatcher<OUString>& XMLTextImportHelper::GetSequenceNameBP()
if (!m_xBackpatcherImpl->m_pSequenceNameBackpatcher)
{
m_xBackpatcherImpl->m_pSequenceNameBackpatcher.reset(
- new XMLPropertyBackpatcher<OUString>("SourceName"));
+ new XMLPropertyBackpatcher<OUString>(u"SourceName"_ustr));
}
return *m_xBackpatcherImpl->m_pSequenceNameBackpatcher;
}
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index bff3a772779b..093040c3b15b 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -189,7 +189,7 @@ void XMLRedlineExport::ExportChangesListElements()
uno::UNO_QUERY );
// redlining enabled?
bool bEnabled = *o3tl::doAccess<bool>(aDocPropertySet->getPropertyValue(
- "RecordChanges" ));
+ u"RecordChanges"_ustr ));
// only export if we have redlines or attributes
if ( !(aEnumAccess->hasElements() || bEnabled) )
@@ -223,7 +223,7 @@ void XMLRedlineExport::ExportChangesListElements()
{
// export only if not in header or footer
// (those must be exported with their XText)
- aAny = xPropSet->getPropertyValue("IsInHeaderFooter");
+ aAny = xPropSet->getPropertyValue(u"IsInHeaderFooter"_ustr);
if (! *o3tl::doAccess<bool>(aAny))
{
// and finally, export change
@@ -243,8 +243,8 @@ void XMLRedlineExport::ExportChangeAutoStyle(
if (nullptr != pCurrentChangesList)
{
// put redline in list if it's collapsed or the redline start
- Any aIsStart = rPropSet->getPropertyValue("IsStart");
- Any aIsCollapsed = rPropSet->getPropertyValue("IsCollapsed");
+ Any aIsStart = rPropSet->getPropertyValue(u"IsStart"_ustr);
+ Any aIsCollapsed = rPropSet->getPropertyValue(u"IsCollapsed"_ustr);
if ( *o3tl::doAccess<bool>(aIsStart) ||
*o3tl::doAccess<bool>(aIsCollapsed) )
@@ -252,7 +252,7 @@ void XMLRedlineExport::ExportChangeAutoStyle(
}
// get XText for export of redline auto styles
- Any aAny = rPropSet->getPropertyValue("RedlineText");
+ Any aAny = rPropSet->getPropertyValue(u"RedlineText"_ustr);
Reference<XText> xText;
aAny >>= xText;
if (xText.is())
@@ -290,7 +290,7 @@ void XMLRedlineExport::ExportChangesListAutoStyles()
// export only if not in header or footer
// (those must be exported with their XText)
- aAny = xPropSet->getPropertyValue("IsInHeaderFooter");
+ aAny = xPropSet->getPropertyValue(u"IsInHeaderFooter"_ustr);
if (! *o3tl::doAccess<bool>(aAny))
{
ExportChangeAutoStyle(xPropSet);
@@ -304,7 +304,7 @@ void XMLRedlineExport::ExportChangeInline(
{
// determine element name (depending on collapsed, start/end)
enum XMLTokenEnum eElement = XML_TOKEN_INVALID;
- Any aAny = rPropSet->getPropertyValue("IsCollapsed");
+ Any aAny = rPropSet->getPropertyValue(u"IsCollapsed"_ustr);
bool bCollapsed = *o3tl::doAccess<bool>(aAny);
if (bCollapsed)
{
@@ -312,7 +312,7 @@ void XMLRedlineExport::ExportChangeInline(
}
else
{
- aAny = rPropSet->getPropertyValue("IsStart");
+ aAny = rPropSet->getPropertyValue(u"IsStart"_ustr);
const bool bStart = *o3tl::doAccess<bool>(aAny);
eElement = bStart ? XML_CHANGE_START : XML_CHANGE_END;
}
@@ -337,7 +337,7 @@ void XMLRedlineExport::ExportChangedRegion(
rExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, GetRedlineID(rPropSet));
// merge-last-paragraph
- Any aAny = rPropSet->getPropertyValue("MergeLastPara");
+ Any aAny = rPropSet->getPropertyValue(u"MergeLastPara"_ustr);
if( ! *o3tl::doAccess<bool>(aAny) )
rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_MERGE_LAST_PARAGRAPH,
XML_FALSE);
@@ -349,7 +349,7 @@ void XMLRedlineExport::ExportChangedRegion(
// scope for (first) change element
{
- aAny = rPropSet->getPropertyValue("RedlineType");
+ aAny = rPropSet->getPropertyValue(u"RedlineType"_ustr);
OUString sType;
aAny >>= sType;
SvXMLElementExport aChange(rExport, XML_NAMESPACE_TEXT,
@@ -358,7 +358,7 @@ void XMLRedlineExport::ExportChangedRegion(
ExportChangeInfo(rPropSet);
// get XText from the redline and export (if the XText exists)
- aAny = rPropSet->getPropertyValue("RedlineText");
+ aAny = rPropSet->getPropertyValue(u"RedlineText"_ustr);
Reference<XText> xText;
aAny >>= xText;
if (xText.is())
@@ -372,7 +372,7 @@ void XMLRedlineExport::ExportChangedRegion(
// changed change? Hierarchical changes can only be two levels
// deep. Here we check for the second level.
- aAny = rPropSet->getPropertyValue("RedlineSuccessorData");
+ aAny = rPropSet->getPropertyValue(u"RedlineSuccessorData"_ustr);
Sequence<PropertyValue> aSuccessorData;
aAny >>= aSuccessorData;
@@ -422,7 +422,7 @@ OUString const & XMLRedlineExport::ConvertTypeName(
OUString XMLRedlineExport::GetRedlineID(
const Reference<XPropertySet> & rPropSet)
{
- Any aAny = rPropSet->getPropertyValue("RedlineIdentifier");
+ Any aAny = rPropSet->getPropertyValue(u"RedlineIdentifier"_ustr);
OUString sTmp;
aAny >>= sTmp;
@@ -440,7 +440,7 @@ void XMLRedlineExport::ExportChangeInfo(
SvXMLElementExport aChangeInfo(rExport, XML_NAMESPACE_OFFICE,
XML_CHANGE_INFO, true, true);
- Any aAny = rPropSet->getPropertyValue("RedlineAuthor");
+ Any aAny = rPropSet->getPropertyValue(u"RedlineAuthor"_ustr);
OUString sTmp;
aAny >>= sTmp;
if (!sTmp.isEmpty())
@@ -453,7 +453,7 @@ void XMLRedlineExport::ExportChangeInfo(
: sTmp );
}
- aAny = rPropSet->getPropertyValue("RedlineMovedID");
+ aAny = rPropSet->getPropertyValue(u"RedlineMovedID"_ustr);
sal_uInt32 nTmp(0);
aAny >>= nTmp;
if (nTmp > 1)
@@ -462,7 +462,7 @@ void XMLRedlineExport::ExportChangeInfo(
rExport.Characters( OUString::number( nTmp ) );
}
- aAny = rPropSet->getPropertyValue("RedlineDateTime");
+ aAny = rPropSet->getPropertyValue(u"RedlineDateTime"_ustr);
util::DateTime aDateTime;
aAny >>= aDateTime;
{
@@ -477,7 +477,7 @@ void XMLRedlineExport::ExportChangeInfo(
}
// comment as <text:p> sequence
- aAny = rPropSet->getPropertyValue("RedlineComment");
+ aAny = rPropSet->getPropertyValue(u"RedlineComment"_ustr);
aAny >>= sTmp;
WriteComment( sTmp );
}
@@ -553,7 +553,7 @@ void XMLRedlineExport::ExportStartOrEndRedline(
Any aAny;
try
{
- aAny = rPropSet->getPropertyValue(bStart ? OUString("StartRedline") : OUString("EndRedline"));
+ aAny = rPropSet->getPropertyValue(bStart ? u"StartRedline"_ustr : u"EndRedline"_ustr);
}
catch(const UnknownPropertyException&)
{
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index c26faca46a2e..45bd7dc8f06d 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -92,7 +92,7 @@ void XMLSectionExport::ExportSectionStart(
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_STYLE_NAME,
GetParaExport().Find(
XmlStyleFamily::TEXT_SECTION,
- xPropertySet, "" ) );
+ xPropertySet, u""_ustr ) );
// xml:id for RDF metadata
GetExport().AddAttributeXmlId(rSection);
@@ -133,9 +133,9 @@ bool XMLSectionExport::GetIndex(
// then check if this section happens to be inside an index
if (xSectionPropSet->getPropertySetInfo()->
- hasPropertyByName("DocumentIndex"))
+ hasPropertyByName(u"DocumentIndex"_ustr))
{
- Any aAny = xSectionPropSet->getPropertyValue("DocumentIndex");
+ Any aAny = xSectionPropSet->getPropertyValue(u"DocumentIndex"_ustr);
Reference<XDocumentIndex> xDocumentIndex;
aAny >>= xDocumentIndex;
@@ -144,7 +144,7 @@ bool XMLSectionExport::GetIndex(
{
// is the enclosing index identical with "our" section?
Reference<XPropertySet> xIndexPropSet(xDocumentIndex, UNO_QUERY);
- aAny = xIndexPropSet->getPropertyValue("ContentSection");
+ aAny = xIndexPropSet->getPropertyValue(u"ContentSection"_ustr);
Reference<XTextSection> xEnclosingSection;
aAny >>= xEnclosingSection;
@@ -157,7 +157,7 @@ bool XMLSectionExport::GetIndex(
// else: index header or regular section
// is the enclosing index identical with the header section?
- aAny = xIndexPropSet->getPropertyValue("HeaderSection");
+ aAny = xIndexPropSet->getPropertyValue(u"HeaderSection"_ustr);
// now mis-named: contains header section
aAny >>= xEnclosingSection;
@@ -309,7 +309,7 @@ void XMLSectionExport::ExportIndexHeaderStart(
Reference<XNamed> xName(rSection, UNO_QUERY);
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xName->getName());
Reference<XPropertySet> xPropSet(rSection, UNO_QUERY);
- Any aAny = xPropSet->getPropertyValue("IsProtected");
+ Any aAny = xPropSet->getPropertyValue(u"IsProtected"_ustr);
if (*o3tl::doAccess<bool>(aAny))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTED, XML_TRUE);
@@ -357,7 +357,7 @@ void XMLSectionExport::ExportRegularSectionStart(
Reference<XPropertySet> xPropSet(rSection, UNO_QUERY);
// condition and display
- Any aAny = xPropSet->getPropertyValue("Condition");
+ Any aAny = xPropSet->getPropertyValue(u"Condition"_ustr);
OUString sCond;
aAny >>= sCond;
enum XMLTokenEnum eDisplay = XML_TOKEN_INVALID;
@@ -370,7 +370,7 @@ void XMLSectionExport::ExportRegularSectionStart(
eDisplay = XML_CONDITION;
// #97450# store hidden-status (of conditional sections only)
- aAny = xPropSet->getPropertyValue("IsCurrentlyVisible");
+ aAny = xPropSet->getPropertyValue(u"IsCurrentlyVisible"_ustr);
if (! *o3tl::doAccess<bool>(aAny))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_IS_HIDDEN,
@@ -381,20 +381,20 @@ void XMLSectionExport::ExportRegularSectionStart(
{
eDisplay = XML_NONE;
}
- aAny = xPropSet->getPropertyValue("IsVisible");
+ aAny = xPropSet->getPropertyValue(u"IsVisible"_ustr);
if (! *o3tl::doAccess<bool>(aAny))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_DISPLAY, eDisplay);
}
// protect + protection key
- aAny = xPropSet->getPropertyValue("IsProtected");
+ aAny = xPropSet->getPropertyValue(u"IsProtected"_ustr);
if (*o3tl::doAccess<bool>(aAny))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTED, XML_TRUE);
}
Sequence<sal_Int8> aPassword;
- xPropSet->getPropertyValue("ProtectionKey") >>= aPassword;
+ xPropSet->getPropertyValue(u"ProtectionKey"_ustr) >>= aPassword;
if (aPassword.hasElements())
{
OUStringBuffer aBuffer;
@@ -407,7 +407,7 @@ void XMLSectionExport::ExportRegularSectionStart(
// attribute exists in ODF 1.2 or later; default is SHA1 so no need to write that
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTION_KEY_DIGEST_ALGORITHM,
// write the URL from ODF 1.2, not the W3C one
- "http://www.w3.org/2000/09/xmldsig#sha256");
+ u"http://www.w3.org/2000/09/xmldsig#sha256"_ustr);
}
}
@@ -417,11 +417,11 @@ void XMLSectionExport::ExportRegularSectionStart(
// data source
// unfortunately, we have to test all relevant strings for non-zero length
- aAny = xPropSet->getPropertyValue("FileLink");
+ aAny = xPropSet->getPropertyValue(u"FileLink"_ustr);
SectionFileLink aFileLink;
aAny >>= aFileLink;
- aAny = xPropSet->getPropertyValue("LinkRegion");
+ aAny = xPropSet->getPropertyValue(u"LinkRegion"_ustr);
OUString sRegionName;
aAny >>= sRegionName;
@@ -454,18 +454,18 @@ void XMLSectionExport::ExportRegularSectionStart(
else
{
// check for DDE first
- if (xPropSet->getPropertySetInfo()->hasPropertyByName("DDECommandFile"))
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName(u"DDECommandFile"_ustr))
{
// data source DDE
// unfortunately, we have to test all relevant strings for
// non-zero length
- aAny = xPropSet->getPropertyValue("DDECommandFile");
+ aAny = xPropSet->getPropertyValue(u"DDECommandFile"_ustr);
OUString sApplication;
aAny >>= sApplication;
- aAny = xPropSet->getPropertyValue("DDECommandType");
+ aAny = xPropSet->getPropertyValue(u"DDECommandType"_ustr);
OUString sTopic;
aAny >>= sTopic;
- aAny = xPropSet->getPropertyValue("DDECommandElement");
+ aAny = xPropSet->getPropertyValue(u"DDECommandElement"_ustr);
OUString sItem;
aAny >>= sItem;
@@ -480,7 +480,7 @@ void XMLSectionExport::ExportRegularSectionStart(
GetExport().AddAttribute(XML_NAMESPACE_OFFICE, XML_DDE_ITEM,
sItem);
- aAny = xPropSet->getPropertyValue("IsAutomaticUpdate");
+ aAny = xPropSet->getPropertyValue(u"IsAutomaticUpdate"_ustr);
if (*o3tl::doAccess<bool>(aAny))
{
GetExport().AddAttribute(XML_NAMESPACE_OFFICE,
@@ -509,7 +509,7 @@ void XMLSectionExport::ExportTableOfContentStart(
// outline-level: 1..10
sal_Int16 nLevel = sal_Int16();
- if( rPropertySet->getPropertyValue("Level") >>= nLevel )
+ if( rPropertySet->getPropertyValue(u"Level"_ustr) >>= nLevel )
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
XML_OUTLINE_LEVEL,
@@ -517,15 +517,15 @@ void XMLSectionExport::ExportTableOfContentStart(
}
// use outline level
- ExportBoolean(rPropertySet, "CreateFromOutline",
+ ExportBoolean(rPropertySet, u"CreateFromOutline"_ustr,
XML_USE_OUTLINE_LEVEL, true);
// use index marks
- ExportBoolean(rPropertySet, "CreateFromMarks",
+ ExportBoolean(rPropertySet, u"CreateFromMarks"_ustr,
XML_USE_INDEX_MARKS, true);
// use level styles
- ExportBoolean(rPropertySet, "CreateFromLevelParagraphStyles",
+ ExportBoolean(rPropertySet, u"CreateFromLevelParagraphStyles"_ustr,
XML_USE_INDEX_SOURCE_STYLES, false);
ExportBaseIndexSource(TEXT_SECTION_TYPE_TOC, rPropertySet);
@@ -542,15 +542,15 @@ void XMLSectionExport::ExportObjectIndexStart(
// scope for index source element
{
- ExportBoolean(rPropertySet, "CreateFromOtherEmbeddedObjects",
+ ExportBoolean(rPropertySet, u"CreateFromOtherEmbeddedObjects"_ustr,
XML_USE_OTHER_OBJECTS, false);
- ExportBoolean(rPropertySet, "CreateFromStarCalc",
+ ExportBoolean(rPropertySet, u"CreateFromStarCalc"_ustr,
XML_USE_SPREADSHEET_OBJECTS, false);
- ExportBoolean(rPropertySet, "CreateFromStarChart",
+ ExportBoolean(rPropertySet, u"CreateFromStarChart"_ustr,
XML_USE_CHART_OBJECTS, false);
- ExportBoolean(rPropertySet, "CreateFromStarDraw",
+ ExportBoolean(rPropertySet, u"CreateFromStarDraw"_ustr,
XML_USE_DRAW_OBJECTS, false);
- ExportBoolean(rPropertySet, "CreateFromStarMath",
+ ExportBoolean(rPropertySet, u"CreateFromStarMath"_ustr,
XML_USE_MATH_OBJECTS, false);
ExportBaseIndexSource(TEXT_SECTION_TYPE_OBJECT, rPropertySet);
@@ -603,7 +603,7 @@ void XMLSectionExport::ExportAlphabeticalIndexStart(
{
// style name (if present)
- Any aAny = rPropertySet->getPropertyValue("MainEntryCharacterStyleName");
+ Any aAny = rPropertySet->getPropertyValue(u"MainEntryCharacterStyleName"_ustr);
OUString sStyleName;
aAny >>= sStyleName;
if (!sStyleName.isEmpty())
@@ -614,25 +614,25 @@ void XMLSectionExport::ExportAlphabeticalIndexStart(
}
// other (boolean) attributes
- ExportBoolean(rPropertySet, "IsCaseSensitive", XML_IGNORE_CASE,
+ ExportBoolean(rPropertySet, u"IsCaseSensitive"_ustr, XML_IGNORE_CASE,
false, true);
- ExportBoolean(rPropertySet, "UseAlphabeticalSeparators",
+ ExportBoolean(rPropertySet, u"UseAlphabeticalSeparators"_ustr,
XML_ALPHABETICAL_SEPARATORS, false);
- ExportBoolean(rPropertySet, "UseCombinedEntries", XML_COMBINE_ENTRIES,
+ ExportBoolean(rPropertySet, u"UseCombinedEntries"_ustr, XML_COMBINE_ENTRIES,
true);
- ExportBoolean(rPropertySet, "UseDash", XML_COMBINE_ENTRIES_WITH_DASH,
+ ExportBoolean(rPropertySet, u"UseDash"_ustr, XML_COMBINE_ENTRIES_WITH_DASH,
false);
- ExportBoolean(rPropertySet, "UseKeyAsEntry", XML_USE_KEYS_AS_ENTRIES,
+ ExportBoolean(rPropertySet, u"UseKeyAsEntry"_ustr, XML_USE_KEYS_AS_ENTRIES,
false);
- ExportBoolean(rPropertySet, "UsePP", XML_COMBINE_ENTRIES_WITH_PP,
+ ExportBoolean(rPropertySet, u"UsePP"_ustr, XML_COMBINE_ENTRIES_WITH_PP,
true);
- ExportBoolean(rPropertySet, "UseUpperCase", XML_CAPITALIZE_ENTRIES,
+ ExportBoolean(rPropertySet, u"UseUpperCase"_ustr, XML_CAPITALIZE_ENTRIES,
false);
- ExportBoolean(rPropertySet, "IsCommaSeparated", XML_COMMA_SEPARATED,
+ ExportBoolean(rPropertySet, u"IsCommaSeparated"_ustr, XML_COMMA_SEPARATED,
false);
// sort algorithm
- aAny = rPropertySet->getPropertyValue("SortAlgorithm");
+ aAny = rPropertySet->getPropertyValue(u"SortAlgorithm"_ustr);
OUString sAlgorithm;
aAny >>= sAlgorithm;
if (!sAlgorithm.isEmpty())
@@ -642,7 +642,7 @@ void XMLSectionExport::ExportAlphabeticalIndexStart(
}
// locale
- aAny = rPropertySet->getPropertyValue("Locale");
+ aAny = rPropertySet->getPropertyValue(u"Locale"_ustr);
Locale aLocale;
aAny >>= aLocale;
GetExport().AddLanguageTagAttributes( XML_NAMESPACE_FO, XML_NAMESPACE_STYLE, aLocale, true);
@@ -662,22 +662,22 @@ void XMLSectionExport::ExportUserIndexStart(
// scope for table-of-content-source element
{
// bool attributes
- ExportBoolean(rPropertySet, "CreateFromEmbeddedObjects",
+ ExportBoolean(rPropertySet, u"CreateFromEmbeddedObjects"_ustr,
XML_USE_OBJECTS, false);
- ExportBoolean(rPropertySet, "CreateFromGraphicObjects",
+ ExportBoolean(rPropertySet, u"CreateFromGraphicObjects"_ustr,
XML_USE_GRAPHICS, false);
- ExportBoolean(rPropertySet, "CreateFromMarks",
+ ExportBoolean(rPropertySet, u"CreateFromMarks"_ustr,
XML_USE_INDEX_MARKS, false);
- ExportBoolean(rPropertySet, "CreateFromTables",
+ ExportBoolean(rPropertySet, u"CreateFromTables"_ustr,
XML_USE_TABLES, false);
- ExportBoolean(rPropertySet, "CreateFromTextFrames",
+ ExportBoolean(rPropertySet, u"CreateFromTextFrames"_ustr,
XML_USE_FLOATING_FRAMES, false);
- ExportBoolean(rPropertySet, "UseLevelFromSource",
+ ExportBoolean(rPropertySet, u"UseLevelFromSource"_ustr,
XML_COPY_OUTLINE_LEVELS, false);
- ExportBoolean(rPropertySet, "CreateFromLevelParagraphStyles",
+ ExportBoolean(rPropertySet, u"CreateFromLevelParagraphStyles"_ustr,
XML_USE_INDEX_SOURCE_STYLES, false);
- Any aAny = rPropertySet->getPropertyValue( "UserIndexName" );
+ Any aAny = rPropertySet->getPropertyValue( u"UserIndexName"_ustr );
OUString sIndexName;
aAny >>= sIndexName;
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_INDEX_NAME,
@@ -711,7 +711,7 @@ void XMLSectionExport::ExportBaseIndexStart(
const Reference<XPropertySet> & rPropertySet)
{
// protect + protection key
- Any aAny = rPropertySet->getPropertyValue("IsProtected");
+ Any aAny = rPropertySet->getPropertyValue(u"IsProtected"_ustr);
if (*o3tl::doAccess<bool>(aAny))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTED, XML_TRUE);
@@ -719,7 +719,7 @@ void XMLSectionExport::ExportBaseIndexStart(
// index name
OUString sIndexName;
- rPropertySet->getPropertyValue("Name") >>= sIndexName;
+ rPropertySet->getPropertyValue(u"Name"_ustr) >>= sIndexName;
if ( !sIndexName.isEmpty() )
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, sIndexName);
@@ -755,7 +755,7 @@ void XMLSectionExport::ExportBaseIndexSource(
if (eType != TEXT_SECTION_TYPE_BIBLIOGRAPHY)
{
// document or chapter index?
- aAny = rPropertySet->getPropertyValue("CreateFromChapter");
+ aAny = rPropertySet->getPropertyValue(u"CreateFromChapter"_ustr);
if (*o3tl::doAccess<bool>(aAny))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
@@ -763,7 +763,7 @@ void XMLSectionExport::ExportBaseIndexSource(
}
// tab-stops relative to margin?
- aAny = rPropertySet->getPropertyValue("IsRelativeTabstops");
+ aAny = rPropertySet->getPropertyValue(u"IsRelativeTabstops"_ustr);
if (! *o3tl::doAccess<bool>(aAny))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
@@ -783,7 +783,7 @@ void XMLSectionExport::ExportBaseIndexSource(
// scope for title template (all indices)
{
// header style name
- aAny = rPropertySet->getPropertyValue("ParaStyleHeading");
+ aAny = rPropertySet->getPropertyValue(u"ParaStyleHeading"_ustr);
OUString sStyleName;
aAny >>= sStyleName;
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
@@ -797,14 +797,14 @@ void XMLSectionExport::ExportBaseIndexSource(
true, false);
// title as element content
- aAny = rPropertySet->getPropertyValue("Title");
+ aAny = rPropertySet->getPropertyValue(u"Title"_ustr);
OUString sTitleString;
aAny >>= sTitleString;
GetExport().Characters(sTitleString);
}
// export level templates (all indices)
- aAny = rPropertySet->getPropertyValue("LevelFormat");
+ aAny = rPropertySet->getPropertyValue(u"LevelFormat"_ustr);
Reference<XIndexReplace> xLevelTemplates;
aAny >>= xLevelTemplates;
@@ -830,7 +830,7 @@ void XMLSectionExport::ExportBaseIndexSource(
if ( (TEXT_SECTION_TYPE_TOC == eType) ||
(TEXT_SECTION_TYPE_USER == eType) )
{
- aAny = rPropertySet->getPropertyValue("LevelParagraphStyles");
+ aAny = rPropertySet->getPropertyValue(u"LevelParagraphStyles"_ustr);
Reference<XIndexReplace> xLevelParagraphStyles;
aAny >>= xLevelParagraphStyles;
ExportLevelParagraphStyles(xLevelParagraphStyles);
@@ -839,7 +839,7 @@ void XMLSectionExport::ExportBaseIndexSource(
|| TEXT_SECTION_TYPE_OBJECT == eType
|| TEXT_SECTION_TYPE_TABLE == eType)
{
- Any const any(rPropertySet->getPropertyValue("CreateFromParagraphStyle"));
+ Any const any(rPropertySet->getPropertyValue(u"CreateFromParagraphStyle"_ustr));
if (any.hasValue() &&
(rExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED))
{
@@ -876,7 +876,7 @@ void XMLSectionExport::ExportTableAndIllustrationIndexSourceAttributes(
const Reference<XPropertySet> & rPropertySet)
{
// use caption
- Any aAny = rPropertySet->getPropertyValue("CreateFromLabels");
+ Any aAny = rPropertySet->getPropertyValue(u"CreateFromLabels"_ustr);
if (! *o3tl::doAccess<bool>(aAny))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
@@ -884,7 +884,7 @@ void XMLSectionExport::ExportTableAndIllustrationIndexSourceAttributes(
}
// sequence name
- aAny = rPropertySet->getPropertyValue("LabelCategory");
+ aAny = rPropertySet->getPropertyValue(u"LabelCategory"_ustr);
OUString sSequenceName;
aAny >>= sSequenceName;
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
@@ -892,7 +892,7 @@ void XMLSectionExport::ExportTableAndIllustrationIndexSourceAttributes(
sSequenceName);
// caption format
- aAny = rPropertySet->getPropertyValue("LabelDisplayType");
+ aAny = rPropertySet->getPropertyValue(u"LabelDisplayType"_ustr);
sal_Int16 nType = 0;
aAny >>= nType;
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
@@ -930,29 +930,29 @@ static const XMLTokenEnum* aTypeLevelNameMap[] =
aLevelNameBibliographyMap // bibliography
};
-static const char* aLevelStylePropNameTOCMap[] =
- { nullptr, "ParaStyleLevel1", "ParaStyleLevel2", "ParaStyleLevel3",
- "ParaStyleLevel4", "ParaStyleLevel5", "ParaStyleLevel6",
- "ParaStyleLevel7", "ParaStyleLevel8", "ParaStyleLevel9",
- "ParaStyleLevel10", nullptr };
-static const char* aLevelStylePropNameTableMap[] =
- { nullptr, "ParaStyleLevel1", nullptr };
-static const char* aLevelStylePropNameAlphaMap[] =
- { nullptr, "ParaStyleSeparator", "ParaStyleLevel1", "ParaStyleLevel2",
- "ParaStyleLevel3", nullptr };
-static const char* aLevelStylePropNameBibliographyMap[] =
+constexpr OUString aLevelStylePropNameTOCMap[] =
+ { u""_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel2"_ustr, u"ParaStyleLevel3"_ustr,
+ u"ParaStyleLevel4"_ustr, u"ParaStyleLevel5"_ustr, u"ParaStyleLevel6"_ustr,
+ u"ParaStyleLevel7"_ustr, u"ParaStyleLevel8"_ustr, u"ParaStyleLevel9"_ustr,
+ u"ParaStyleLevel10"_ustr, u""_ustr };
+constexpr OUString aLevelStylePropNameTableMap[] =
+ { u""_ustr, u"ParaStyleLevel1"_ustr, u""_ustr };
+constexpr OUString aLevelStylePropNameAlphaMap[] =
+ { u""_ustr, u"ParaStyleSeparator"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel2"_ustr,
+ u"ParaStyleLevel3"_ustr, u""_ustr };
+constexpr OUString aLevelStylePropNameBibliographyMap[] =
// TODO: replace with real property names, when available
- { nullptr, "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1",
- "ParaStyleLevel1",
- nullptr };
-
-static const char** aTypeLevelStylePropNameMap[] =
+ { u""_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr, u"ParaStyleLevel1"_ustr,
+ u"ParaStyleLevel1"_ustr,
+ u""_ustr };
+
+constexpr const OUString* aTypeLevelStylePropNameMap[] =
{
aLevelStylePropNameTOCMap, // TOC
aLevelStylePropNameTableMap, // table index
@@ -1027,13 +1027,12 @@ bool XMLSectionExport::ExportIndexTemplate(
}
// paragraph level style name
- const char* pPropName(
+ const OUString pPropName(
aTypeLevelStylePropNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]);
- OSL_ENSURE(nullptr != pPropName, "can't find property name");
- if (nullptr != pPropName)
+ OSL_ENSURE(!pPropName.isEmpty(), "can't find property name");
+ if (!pPropName.isEmpty())
{
- Any aAny = rPropertySet->getPropertyValue(
- OUString::createFromAscii(pPropName));
+ Any aAny = rPropertySet->getPropertyValue(pPropName);
OUString sParaStyleName;
aAny >>= sParaStyleName;
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
@@ -1611,22 +1610,22 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
OUString sTmp;
- aAny = xPropSet->getPropertyValue("BracketBefore");
+ aAny = xPropSet->getPropertyValue(u"BracketBefore"_ustr);
aAny >>= sTmp;
rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_PREFIX, sTmp);
- aAny = xPropSet->getPropertyValue("BracketAfter");
+ aAny = xPropSet->getPropertyValue(u"BracketAfter"_ustr);
aAny >>= sTmp;
rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_SUFFIX, sTmp);
- aAny = xPropSet->getPropertyValue("IsNumberEntries");
+ aAny = xPropSet->getPropertyValue(u"IsNumberEntries"_ustr);
if (*o3tl::doAccess<bool>(aAny))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
XML_NUMBERED_ENTRIES, XML_TRUE);
}
- aAny = xPropSet->getPropertyValue("IsSortByPosition");
+ aAny = xPropSet->getPropertyValue(u"IsSortByPosition"_ustr);
if (! *o3tl::doAccess<bool>(aAny))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
@@ -1634,7 +1633,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
}
// sort algorithm
- aAny = xPropSet->getPropertyValue("SortAlgorithm");
+ aAny = xPropSet->getPropertyValue(u"SortAlgorithm"_ustr);
OUString sAlgorithm;
aAny >>= sAlgorithm;
if( !sAlgorithm.isEmpty() )
@@ -1644,7 +1643,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
}
// locale
- aAny = xPropSet->getPropertyValue("Locale");
+ aAny = xPropSet->getPropertyValue(u"Locale"_ustr);
Locale aLocale;
aAny >>= aLocale;
rExport.AddLanguageTagAttributes( XML_NAMESPACE_FO, XML_NAMESPACE_STYLE, aLocale, true);
@@ -1655,7 +1654,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
true, true);
// sort keys
- aAny = xPropSet->getPropertyValue("SortKeys");
+ aAny = xPropSet->getPropertyValue(u"SortKeys"_ustr);
Sequence<Sequence<PropertyValue> > aKeys;
aAny >>= aKeys;
for (const Sequence<PropertyValue>& rKey : aKeys)
@@ -1712,7 +1711,7 @@ bool XMLSectionExport::IsMuteSection(
Reference<XPropertySet> xPropSet(aSection, UNO_QUERY);
if (xPropSet.is())
{
- Any aAny = xPropSet->getPropertyValue("IsGlobalDocumentSection");
+ Any aAny = xPropSet->getPropertyValue(u"IsGlobalDocumentSection"_ustr);
if ( *o3tl::doAccess<bool>(aAny) )
{
@@ -1744,9 +1743,9 @@ bool XMLSectionExport::IsMuteSection(
Reference<XPropertySet> xPropSet(rSection->getAnchor(), UNO_QUERY);
if (xPropSet.is())
{
- if (xPropSet->getPropertySetInfo()->hasPropertyByName("TextSection"))
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName(u"TextSection"_ustr))
{
- Any aAny = xPropSet->getPropertyValue("TextSection");
+ Any aAny = xPropSet->getPropertyValue(u"TextSection"_ustr);
Reference<XTextSection> xSection;
aAny >>= xSection;
@@ -1771,9 +1770,9 @@ bool XMLSectionExport::IsInSection(
Reference<XPropertySet> xPropSet(rContent, UNO_QUERY);
if (xPropSet.is())
{
- if (xPropSet->getPropertySetInfo()->hasPropertyByName("TextSection"))
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName(u"TextSection"_ustr))
{
- Any aAny = xPropSet->getPropertyValue("TextSection");
+ Any aAny = xPropSet->getPropertyValue(u"TextSection"_ustr);
Reference<XTextSection> xSection;
aAny >>= xSection;
diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx
index 554096c887b3..4f8dfabeab8c 100644
--- a/xmloff/source/text/XMLSectionImportContext.cxx
+++ b/xmloff/source/text/XMLSectionImportContext.cxx
@@ -98,8 +98,8 @@ void XMLSectionImportContext::startFastElement( sal_Int32 nElement,
return;
Reference<XInterface> xIfc =
- xFactory->createInstance( bIsIndexHeader ? OUString("com.sun.star.text.IndexHeaderSection")
- : OUString("com.sun.star.text.TextSection") );
+ xFactory->createInstance( bIsIndexHeader ? u"com.sun.star.text.IndexHeaderSection"_ustr
+ : u"com.sun.star.text.TextSection"_ustr );
if (!xIfc.is())
return;
@@ -127,19 +127,19 @@ void XMLSectionImportContext::startFastElement( sal_Int32 nElement,
// IsVisible and condition (not for index headers)
if (! bIsIndexHeader)
{
- xPropSet->setPropertyValue( "IsVisible", Any(bIsVisible) );
+ xPropSet->setPropertyValue( u"IsVisible"_ustr, Any(bIsVisible) );
// #97450# hidden sections must be hidden on reload
// For backwards compatibility, set flag only if it is
// present
if( bIsCurrentlyVisibleOK )
{
- xPropSet->setPropertyValue( "IsCurrentlyVisible", Any(bIsCurrentlyVisible));
+ xPropSet->setPropertyValue( u"IsCurrentlyVisible"_ustr, Any(bIsCurrentlyVisible));
}
if (bCondOK)
{
- xPropSet->setPropertyValue( "Condition", Any(sCond) );
+ xPropSet->setPropertyValue( u"Condition"_ustr, Any(sCond) );
}
}
@@ -147,11 +147,11 @@ void XMLSectionImportContext::startFastElement( sal_Int32 nElement,
if ( bSequenceOK &&
(nElement & TOKEN_MASK) == XML_SECTION )
{
- xPropSet->setPropertyValue("ProtectionKey", Any(aSequence));
+ xPropSet->setPropertyValue(u"ProtectionKey"_ustr, Any(aSequence));
}
// protection
- xPropSet->setPropertyValue( "IsProtected", Any(bProtect) );
+ xPropSet->setPropertyValue( u"IsProtected"_ustr, Any(bProtect) );
// insert marker, <paragraph>, marker; then insert
// section over the first marker character, and delete the
@@ -161,7 +161,7 @@ void XMLSectionImportContext::startFastElement( sal_Int32 nElement,
#ifndef DBG_UTIL
OUString sMarkerString(" ");
#else
- OUString sMarkerString("X");
+ OUString sMarkerString(u"X"_ustr);
#endif
rHelper->InsertString(sMarkerString);
rHelper->InsertControlCharacter(
@@ -182,7 +182,7 @@ void XMLSectionImportContext::startFastElement( sal_Int32 nElement,
// and delete first marker (in section)
rHelper->GetText()->insertString(
- rHelper->GetCursorAsRange(), "", true);
+ rHelper->GetCursorAsRange(), u""_ustr, true);
// finally, check for redlines that should start at
// the section start node
@@ -279,13 +279,13 @@ void XMLSectionImportContext::endFastElement(sal_Int32 )
{
rHelper->GetCursor()->goLeft(1, true);
rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
- "", true);
+ u""_ustr, true);
}
// and delete second marker
rHelper->GetCursor()->goRight(1, true);
rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
- "", true);
+ u""_ustr, true);
// check for redlines to our endnode
rHelper->RedlineAdjustStartNodeCursor();
diff --git a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx
index ad6765f4f99e..49525fd977c0 100644
--- a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx
+++ b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx
@@ -86,11 +86,11 @@ void XMLSectionSourceDDEImportContext::startFastElement(sal_Int32 /*nElement*/,
// DDE not supported on all platforms; query property first
if (!rSectionPropertySet->getPropertySetInfo()->
- hasPropertyByName("DDECommandFile"))
+ hasPropertyByName(u"DDECommandFile"_ustr))
return;
// use multi property set to force single update of connection #83654#
- Sequence<OUString> aNames { "DDECommandFile", "DDECommandType", "DDECommandElement", "IsAutomaticUpdate" };
+ Sequence<OUString> aNames { u"DDECommandFile"_ustr, u"DDECommandType"_ustr, u"DDECommandElement"_ustr, u"IsAutomaticUpdate"_ustr };
Sequence<Any> aValues { Any(sApplication), Any(sTopic), Any(sItem), Any(bAutomaticUpdate) };
Reference<XMultiPropertySet> rMultiPropSet(rSectionPropertySet,
diff --git a/xmloff/source/text/XMLSectionSourceImportContext.cxx b/xmloff/source/text/XMLSectionSourceImportContext.cxx
index 61aeb6b2b95a..a462da9a5b00 100644
--- a/xmloff/source/text/XMLSectionSourceImportContext.cxx
+++ b/xmloff/source/text/XMLSectionSourceImportContext.cxx
@@ -83,12 +83,12 @@ void XMLSectionSourceImportContext::startFastElement( sal_Int32 /*nElement*/,
aFileLink.FileURL = GetImport().GetAbsoluteReference( sURL );
aFileLink.FilterName = sFilterName;
- rSectionPropertySet->setPropertyValue("FileLink", Any(aFileLink));
+ rSectionPropertySet->setPropertyValue(u"FileLink"_ustr, Any(aFileLink));
}
if (!sSectionName.isEmpty())
{
- rSectionPropertySet->setPropertyValue("LinkRegion", Any(sSectionName));
+ rSectionPropertySet->setPropertyValue(u"LinkRegion"_ustr, Any(sSectionName));
}
}
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index 7e0122610f74..036fb1b52139 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -257,7 +257,7 @@ void XMLTextColumnsContext::endFastElement(sal_Int32 nElement )
if( !xFactory.is() )
return;
- Reference<XInterface> xIfc = xFactory->createInstance("com.sun.star.text.TextColumns");
+ Reference<XInterface> xIfc = xFactory->createInstance(u"com.sun.star.text.TextColumns"_ustr);
if( !xIfc.is() )
return;
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index ae037e2ee43d..87752f73b199 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -260,7 +260,7 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
}
}
- OUString sContourPolyPolygon("ContourPolyPolygon");
+ OUString sContourPolyPolygon(u"ContourPolyPolygon"_ustr);
Reference < XPropertySetInfo > xPropSetInfo = rPropSet->getPropertySetInfo();
if(!xPropSetInfo->hasPropertyByName(sContourPolyPolygon) ||
@@ -579,14 +579,14 @@ void XMLTextFrameContext_Impl::Create()
if( rStyles.is() &&
rStyles->hasByName( sDisplayStyleName ) )
{
- xPropSet->setPropertyValue( "FrameStyleName", Any(sDisplayStyleName) );
+ xPropSet->setPropertyValue( u"FrameStyleName"_ustr, Any(sDisplayStyleName) );
}
}
// anchor type (must be set before any other properties, because
// otherwise some orientations cannot be set or will be changed
// afterwards)
- xPropSet->setPropertyValue( "AnchorType", Any(eAnchorType) );
+ xPropSet->setPropertyValue( u"AnchorType"_ustr, Any(eAnchorType) );
// hard properties
if( pStyle )
@@ -594,62 +594,62 @@ void XMLTextFrameContext_Impl::Create()
// x and y
sal_Int16 nHoriOrient = HoriOrientation::NONE;
- aAny = xPropSet->getPropertyValue( "HoriOrient" );
+ aAny = xPropSet->getPropertyValue( u"HoriOrient"_ustr );
aAny >>= nHoriOrient;
if( HoriOrientation::NONE == nHoriOrient )
{
- xPropSet->setPropertyValue( "HoriOrientPosition", Any(nX) );
+ xPropSet->setPropertyValue( u"HoriOrientPosition"_ustr, Any(nX) );
}
sal_Int16 nVertOrient = VertOrientation::NONE;
- aAny = xPropSet->getPropertyValue( "VertOrient" );
+ aAny = xPropSet->getPropertyValue( u"VertOrient"_ustr );
aAny >>= nVertOrient;
if( VertOrientation::NONE == nVertOrient )
{
- xPropSet->setPropertyValue( "VertOrientPosition", Any(nY) );
+ xPropSet->setPropertyValue( u"VertOrientPosition"_ustr, Any(nY) );
}
// width
if( nWidth > 0 )
{
- xPropSet->setPropertyValue( "Width", Any(nWidth) );
+ xPropSet->setPropertyValue( u"Width"_ustr, Any(nWidth) );
}
if( nRelWidth > 0 || nWidth > 0 )
{
- xPropSet->setPropertyValue( "RelativeWidth", Any(nRelWidth) );
+ xPropSet->setPropertyValue( u"RelativeWidth"_ustr, Any(nRelWidth) );
}
if( bSyncWidth || nWidth > 0 )
{
- xPropSet->setPropertyValue( "IsSyncWidthToHeight", Any(bSyncWidth) );
+ xPropSet->setPropertyValue( u"IsSyncWidthToHeight"_ustr, Any(bSyncWidth) );
}
- if( xPropSetInfo->hasPropertyByName( "WidthType" ) &&
+ if( xPropSetInfo->hasPropertyByName( u"WidthType"_ustr ) &&
(bMinWidth || nWidth > 0 || nRelWidth > 0 ) )
{
sal_Int16 nSizeType =
(bMinWidth && XML_TEXT_FRAME_TEXTBOX == nType) ? SizeType::MIN
: SizeType::FIX;
- xPropSet->setPropertyValue( "WidthType", Any(nSizeType) );
+ xPropSet->setPropertyValue( u"WidthType"_ustr, Any(nSizeType) );
}
if( nHeight > 0 )
{
- xPropSet->setPropertyValue( "Height", Any(nHeight) );
+ xPropSet->setPropertyValue( u"Height"_ustr, Any(nHeight) );
}
if( nRelHeight > 0 || nHeight > 0 )
{
- xPropSet->setPropertyValue( "RelativeHeight", Any(nRelHeight) );
+ xPropSet->setPropertyValue( u"RelativeHeight"_ustr, Any(nRelHeight) );
}
if( bSyncHeight || nHeight > 0 )
{
- xPropSet->setPropertyValue( "IsSyncHeightToWidth", Any(bSyncHeight) );
+ xPropSet->setPropertyValue( u"IsSyncHeightToWidth"_ustr, Any(bSyncHeight) );
}
- if( xPropSetInfo->hasPropertyByName( "SizeType" ) &&
+ if( xPropSetInfo->hasPropertyByName( u"SizeType"_ustr ) &&
(bMinHeight || nHeight > 0 || nRelHeight > 0 ) )
{
sal_Int16 nSizeType =
(bMinHeight && XML_TEXT_FRAME_TEXTBOX == nType) ? SizeType::MIN
: SizeType::FIX;
- xPropSet->setPropertyValue( "SizeType", Any(nSizeType) );
+ xPropSet->setPropertyValue( u"SizeType"_ustr, Any(nSizeType) );
}
if( XML_TEXT_FRAME_GRAPHIC == nType )
@@ -669,30 +669,30 @@ void XMLTextFrameContext_Impl::Create()
}
if (xGraphic.is())
- xPropSet->setPropertyValue("Graphic", Any(xGraphic));
+ xPropSet->setPropertyValue(u"Graphic"_ustr, Any(xGraphic));
// filter name
- xPropSet->setPropertyValue( "GraphicFilter", Any(OUString()) );
+ xPropSet->setPropertyValue( u"GraphicFilter"_ustr, Any(OUString()) );
// rotation
- xPropSet->setPropertyValue( "GraphicRotation", Any(nRotation) );
+ xPropSet->setPropertyValue( u"GraphicRotation"_ustr, Any(nRotation) );
}
// page number (must be set after the frame is inserted, because it
// will be overwritten then inserting the frame.
if( TextContentAnchorType_AT_PAGE == eAnchorType && nPage > 0 )
{
- xPropSet->setPropertyValue( "AnchorPageNo", Any(nPage) );
+ xPropSet->setPropertyValue( u"AnchorPageNo"_ustr, Any(nPage) );
}
- if (m_isDecorative && xPropSetInfo->hasPropertyByName("Decorative"))
+ if (m_isDecorative && xPropSetInfo->hasPropertyByName(u"Decorative"_ustr))
{
- xPropSet->setPropertyValue("Decorative", uno::Any(true));
+ xPropSet->setPropertyValue(u"Decorative"_ustr, uno::Any(true));
}
- if (m_isSplitAllowed && xPropSetInfo->hasPropertyByName("IsSplitAllowed"))
+ if (m_isSplitAllowed && xPropSetInfo->hasPropertyByName(u"IsSplitAllowed"_ustr))
{
- xPropSet->setPropertyValue("IsSplitAllowed", uno::Any(true));
+ xPropSet->setPropertyValue(u"IsSplitAllowed"_ustr, uno::Any(true));
}
if( XML_TEXT_FRAME_OBJECT != nType &&
@@ -805,7 +805,7 @@ css::uno::Reference<css::graphic::XGraphic> XMLTextFrameContext::getGraphicFromI
if (xPropertySet.is())
{
- xPropertySet->getPropertyValue("Graphic") >>= xGraphic;
+ xPropertySet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
}
}
catch (uno::Exception&)
@@ -1320,9 +1320,9 @@ void XMLTextFrameContext_Impl::SetTitle( const OUString& rTitle )
if ( xPropSet.is() )
{
Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
- if( xPropSetInfo->hasPropertyByName( "Title" ) )
+ if( xPropSetInfo->hasPropertyByName( u"Title"_ustr ) )
{
- xPropSet->setPropertyValue( "Title", Any( rTitle ) );
+ xPropSet->setPropertyValue( u"Title"_ustr, Any( rTitle ) );
}
}
}
@@ -1332,9 +1332,9 @@ void XMLTextFrameContext_Impl::SetDesc( const OUString& rDesc )
if ( xPropSet.is() )
{
Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
- if( xPropSetInfo->hasPropertyByName( "Description" ) )
+ if( xPropSetInfo->hasPropertyByName( u"Description"_ustr ) )
{
- xPropSet->setPropertyValue( "Description", Any( rDesc ) );
+ xPropSet->setPropertyValue( u"Description"_ustr, Any( rDesc ) );
}
}
}
@@ -1415,7 +1415,7 @@ void XMLTextFrameContext::endFastElement(sal_Int32 )
{
Reference<XPropertySet> xProps(xShape, UNO_QUERY);
if (xProps.is())
- xProps->setPropertyValue("Hyperlink", Any(m_pHyperlink->GetHRef()));
+ xProps->setPropertyValue(u"Hyperlink"_ustr, Any(m_pHyperlink->GetHRef()));
}
if( !pImpl )
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index 786528201dff..dc2be15ca785 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -37,11 +37,11 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport,
bool bFooter, bool bLft, bool bFrst ) :
SvXMLImportContext( rImport ),
xPropSet( rPageStylePropSet ),
- sOn( bFooter ? OUString("FooterIsOn") : OUString("HeaderIsOn") ),
- sShareContent( bFooter ? OUString("FooterIsShared") : OUString("HeaderIsShared") ),
- sText( bFooter ? OUString("FooterText") : OUString("HeaderText") ),
- sTextFirst(bFooter ? OUString("FooterTextFirst") : OUString("HeaderTextFirst")),
- sTextLeft( bFooter ? OUString("FooterTextLeft") : OUString("HeaderTextLeft") ),
+ sOn( bFooter ? u"FooterIsOn"_ustr : u"HeaderIsOn"_ustr ),
+ sShareContent( bFooter ? u"FooterIsShared"_ustr : u"HeaderIsShared"_ustr ),
+ sText( bFooter ? u"FooterText"_ustr : u"HeaderText"_ustr ),
+ sTextFirst(bFooter ? u"FooterTextFirst"_ustr : u"HeaderTextFirst"_ustr),
+ sTextLeft( bFooter ? u"FooterTextLeft"_ustr : u"HeaderTextLeft"_ustr ),
bInsertContent( true ),
bLeft( bLft ),
bFirst( bFrst )
diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx
index 99230ecc1896..8a4dae6f873e 100644
--- a/xmloff/source/text/XMLTextListAutoStylePool.cxx
+++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -145,13 +145,13 @@ class XMLTextListAutoStylePool_Impl : public o3tl::sorted_vector<std::unique_ptr
XMLTextListAutoStylePool::XMLTextListAutoStylePool( SvXMLExport& rExp ) :
m_rExport( rExp ),
- m_sPrefix( "L" ),
+ m_sPrefix( u"L"_ustr ),
m_pPool( new XMLTextListAutoStylePool_Impl ),
m_nName( 0 )
{
Reference<ucb::XAnyCompareFactory> xCompareFac( rExp.GetModel(), uno::UNO_QUERY );
if( xCompareFac.is() )
- mxNumRuleCompare = xCompareFac->createAnyCompareByName( "NumberingRules" );
+ mxNumRuleCompare = xCompareFac->createAnyCompareByName( u"NumberingRules"_ustr );
SvXMLExportFlags nExportFlags = m_rExport.getExportFlags();
bool bStylesOnly = (nExportFlags & SvXMLExportFlags::STYLES) && !(nExportFlags & SvXMLExportFlags::CONTENT);
if( bStylesOnly )
diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx
index 83d23a3659e1..886bc43f17f4 100644
--- a/xmloff/source/text/XMLTextListItemContext.cxx
+++ b/xmloff/source/text/XMLTextListItemContext.cxx
@@ -73,7 +73,7 @@ XMLTextListItemContext::XMLTextListItemContext(
aAny >>= xStyle;
uno::Reference< beans::XPropertySet > xPropSet( xStyle, UNO_QUERY );
- aAny = xPropSet->getPropertyValue("NumberingRules");
+ aAny = xPropSet->getPropertyValue(u"NumberingRules"_ustr);
aAny >>= mxNumRulesOverride;
}
else
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index e51f14a7864e..69c349e659be 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -200,7 +200,7 @@ static auto InsertFieldmark(SvXMLImport & rImport,
xCursor->gotoRange(rHelper.GetCursorAsRange(), true);
Reference<XTextContent> const xContent = XMLTextMarkImportContext::CreateAndInsertMark(
- rImport, "com.sun.star.text.Fieldmark", name, xCursor,
+ rImport, u"com.sun.star.text.Fieldmark"_ustr, name, xCursor,
OUString(), isFieldmarkSeparatorMissing);
if (!xContent.is())
@@ -276,7 +276,7 @@ void XMLTextMarkImportContext::endFastElement(sal_Int32 nElement)
case TypeReference:
// export point reference mark
CreateAndInsertMark(GetImport(),
- "com.sun.star.text.ReferenceMark",
+ u"com.sun.star.text.ReferenceMark"_ustr,
m_sBookmarkName,
m_rHelper.GetCursorAsRange()->getStart());
break;
@@ -304,7 +304,7 @@ void XMLTextMarkImportContext::endFastElement(sal_Int32 nElement)
// export point bookmark
const Reference<XInterface> xContent(
CreateAndInsertMark(GetImport(),
- (bImportAsField ? OUString("com.sun.star.text.FormFieldmark") : sAPI_bookmark),
+ (bImportAsField ? u"com.sun.star.text.FormFieldmark"_ustr : sAPI_bookmark),
m_sBookmarkName,
m_rHelper.GetCursorAsRange()->getStart(),
m_sXmlId) );
@@ -410,8 +410,8 @@ void XMLTextMarkImportContext::endFastElement(sal_Int32 nElement)
const Reference<XPropertySet> xPropertySet(xContent, UNO_QUERY);
if (xPropertySet.is())
{
- xPropertySet->setPropertyValue("BookmarkHidden", uno::Any(m_rHelper.getBookmarkHidden(m_sBookmarkName)));
- xPropertySet->setPropertyValue("BookmarkCondition", uno::Any(m_rHelper.getBookmarkCondition(m_sBookmarkName)));
+ xPropertySet->setPropertyValue(u"BookmarkHidden"_ustr, uno::Any(m_rHelper.getBookmarkHidden(m_sBookmarkName)));
+ xPropertySet->setPropertyValue(u"BookmarkCondition"_ustr, uno::Any(m_rHelper.getBookmarkCondition(m_sBookmarkName)));
}
if (m_sBookmarkName.startsWith("__RefHeading__"))
{
@@ -502,7 +502,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark(
if (isFieldmarkSeparatorMissing)
{
uno::Reference<beans::XPropertySet> const xProps(xIfc, uno::UNO_QUERY_THROW);
- xProps->setPropertyValue("PrivateSeparatorAtStart", uno::Any(true));
+ xProps->setPropertyValue(u"PrivateSeparatorAtStart"_ustr, uno::Any(true));
}
// cast to XTextContent and attach to document
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 034f767ddc5a..1a062b33cfbd 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -56,7 +56,7 @@ Reference < XStyle > XMLTextMasterPageContext::Create()
if( xFactory.is() )
{
Reference < XInterface > xIfc =
- xFactory->createInstance("com.sun.star.style.PageStyle");
+ xFactory->createInstance(u"com.sun.star.style.PageStyle"_ustr);
if( xIfc.is() )
xNewStyle.set( xIfc, UNO_QUERY );
}
@@ -144,7 +144,7 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
Reference < XPropertySet > xPropSet( m_xStyle, UNO_QUERY );
Reference< XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
- OUString sIsPhysical( "IsPhysical" );
+ OUString sIsPhysical( u"IsPhysical"_ustr );
if( !bNew && xPropSetInfo->hasPropertyByName( sIsPhysical ) )
{
aAny = xPropSet->getPropertyValue( sIsPhysical );
@@ -162,11 +162,11 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
if( xMultiStates.is() )
xMultiStates->setAllPropertiesToDefault();
- if ( xPropSetInfo->hasPropertyByName( "GridDisplay" ) )
- xPropSet->setPropertyValue( "GridDisplay", Any(false) );
+ if ( xPropSetInfo->hasPropertyByName( u"GridDisplay"_ustr ) )
+ xPropSet->setPropertyValue( u"GridDisplay"_ustr, Any(false) );
- if ( xPropSetInfo->hasPropertyByName( "GridPrint" ) )
- xPropSet->setPropertyValue( "GridPrint", Any(false) );
+ if ( xPropSetInfo->hasPropertyByName( u"GridPrint"_ustr ) )
+ xPropSet->setPropertyValue( u"GridPrint"_ustr, Any(false) );
m_bInsertHeader = m_bInsertFooter = true;
m_bInsertHeaderLeft = m_bInsertFooterLeft = true;
@@ -291,9 +291,9 @@ void XMLTextMasterPageContext::Finish( bool bOverwrite )
}
}
- if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
+ if ( xPropSetInfo->hasPropertyByName( u"Hidden"_ustr ) )
{
- xPropSet->setPropertyValue( "Hidden", uno::Any( IsHidden( ) ) );
+ xPropSet->setPropertyValue( u"Hidden"_ustr, uno::Any( IsHidden( ) ) );
}
}
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx
index 0e76f04ed3a5..fc6f36644479 100644
--- a/xmloff/source/text/XMLTextNumRuleInfo.cxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx
@@ -61,14 +61,14 @@ void XMLTextNumRuleInfo::Set(
Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
// check if this paragraph supports a numbering
- if( !xPropSetInfo->hasPropertyByName( "NumberingLevel" ) )
+ if( !xPropSetInfo->hasPropertyByName( u"NumberingLevel"_ustr ) )
return;
- if( xPropSet->getPropertyValue( "NumberingLevel" ) >>= mnListLevel )
+ if( xPropSet->getPropertyValue( u"NumberingLevel"_ustr ) >>= mnListLevel )
{
- if( xPropSetInfo->hasPropertyByName( "NumberingRules" ) )
+ if( xPropSetInfo->hasPropertyByName( u"NumberingRules"_ustr ) )
{
- xPropSet->getPropertyValue( "NumberingRules" ) >>= mxNumRules;
+ xPropSet->getPropertyValue( u"NumberingRules"_ustr ) >>= mxNumRules;
}
}
else
@@ -104,10 +104,10 @@ void XMLTextNumRuleInfo::Set(
Reference<XPropertySet> xNumRulesProps(mxNumRules, UNO_QUERY);
if ( xNumRulesProps.is() &&
xNumRulesProps->getPropertySetInfo()->
- hasPropertyByName( "NumberingIsOutline" ) )
+ hasPropertyByName( u"NumberingIsOutline"_ustr ) )
{
bool bIsOutline = false;
- xNumRulesProps->getPropertyValue( "NumberingIsOutline" ) >>= bIsOutline;
+ xNumRulesProps->getPropertyValue( u"NumberingIsOutline"_ustr ) >>= bIsOutline;
bSuppressListStyle = bIsOutline;
}
}
@@ -131,23 +131,23 @@ void XMLTextNumRuleInfo::Set(
SAL_WARN_IF( msNumRulesName.isEmpty(), "xmloff",
"<XMLTextNumRuleInfo::Set(..)> - no name found for numbering rules instance. Serious defect." );
- if( xPropSetInfo->hasPropertyByName( "ListId" ) )
+ if( xPropSetInfo->hasPropertyByName( u"ListId"_ustr ) )
{
- xPropSet->getPropertyValue( "ListId" ) >>= msListId;
+ xPropSet->getPropertyValue( u"ListId"_ustr ) >>= msListId;
}
mbListIdIsDefault = bListIdIsDefault;
mbContinueingPreviousSubTree = false;
- if( xPropSetInfo->hasPropertyByName( "ContinueingPreviousSubTree" ) )
+ if( xPropSetInfo->hasPropertyByName( u"ContinueingPreviousSubTree"_ustr ) )
{
- xPropSet->getPropertyValue( "ContinueingPreviousSubTree" ) >>= mbContinueingPreviousSubTree;
+ xPropSet->getPropertyValue( u"ContinueingPreviousSubTree"_ustr ) >>= mbContinueingPreviousSubTree;
}
mbIsNumbered = true;
- if( xPropSetInfo->hasPropertyByName( "NumberingIsNumber" ) )
+ if( xPropSetInfo->hasPropertyByName( u"NumberingIsNumber"_ustr ) )
{
- if( !(xPropSet->getPropertyValue( "NumberingIsNumber" ) >>= mbIsNumbered ) )
+ if( !(xPropSet->getPropertyValue( u"NumberingIsNumber"_ustr ) >>= mbIsNumbered ) )
{
OSL_FAIL( "numbered paragraph without number info" );
mbIsNumbered = false;
@@ -156,13 +156,13 @@ void XMLTextNumRuleInfo::Set(
if( mbIsNumbered )
{
- if( xPropSetInfo->hasPropertyByName( "ParaIsNumberingRestart" ) )
+ if( xPropSetInfo->hasPropertyByName( u"ParaIsNumberingRestart"_ustr ) )
{
- xPropSet->getPropertyValue( "ParaIsNumberingRestart" ) >>= mbIsRestart;
+ xPropSet->getPropertyValue( u"ParaIsNumberingRestart"_ustr ) >>= mbIsRestart;
}
- if( xPropSetInfo->hasPropertyByName( "NumberingStartValue" ) )
+ if( xPropSetInfo->hasPropertyByName( u"NumberingStartValue"_ustr ) )
{
- xPropSet->getPropertyValue( "NumberingStartValue" ) >>= mnListStartValue;
+ xPropSet->getPropertyValue( u"NumberingStartValue"_ustr ) >>= mnListStartValue;
}
}
@@ -185,9 +185,9 @@ void XMLTextNumRuleInfo::Set(
msListLabelString.clear();
if ( bExportTextNumberElement &&
- xPropSetInfo->hasPropertyByName( "ListLabelString" ) )
+ xPropSetInfo->hasPropertyByName( u"ListLabelString"_ustr ) )
{
- xPropSet->getPropertyValue( "ListLabelString" ) >>= msListLabelString;
+ xPropSet->getPropertyValue( u"ListLabelString"_ustr ) >>= msListLabelString;
}
// paragraph's list level range is [0..9] representing list levels [1..10]
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index f49084d9cbe7..fbb72f355e93 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -1032,7 +1032,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
pAnchorTypeState->maValue >>= eAnchor;
else if( bNeedsAnchor )
{
- Any aAny = rPropSet->getPropertyValue("AnchorType");
+ Any aAny = rPropSet->getPropertyValue(u"AnchorType"_ustr);
aAny >>= eAnchor;
}
@@ -1056,7 +1056,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
if (pRelWidthRel)
{
sal_Int16 nRelWidth = 0;
- rPropSet->getPropertyValue("RelativeWidth") >>= nRelWidth;
+ rPropSet->getPropertyValue(u"RelativeWidth"_ustr) >>= nRelWidth;
if (!nRelWidth)
pRelWidthRel->mnIndex = -1;
}
@@ -1077,7 +1077,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
if (pRelHeightRel)
{
sal_Int16 nRelHeight = 0;
- rPropSet->getPropertyValue("RelativeHeight") >>= nRelHeight;
+ rPropSet->getPropertyValue(u"RelativeHeight"_ustr) >>= nRelHeight;
if (!nRelHeight)
pRelHeightRel->mnIndex = -1;
}
@@ -1194,7 +1194,7 @@ bool lcl_IsOutlineStyle(const SvXMLExport &rExport, std::u16string_view rName)
SAL_WARN_IF( !xNumRule.is(), "xmloff", "no chapter numbering rules" );
if (xNumRule.is())
{
- xNumRule->getPropertyValue("Name") >>= sOutlineName;
+ xNumRule->getPropertyValue(u"Name"_ustr) >>= sOutlineName;
}
}
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index f517bf3595d7..80a98f3dc5c6 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -165,11 +165,11 @@ uno::Reference<text::XText> GetToplevelText(const uno::Reference<text::XText>& x
if (!xPropertySet.is())
return xRet;
- if (!xPropertySet->getPropertySetInfo()->hasPropertyByName("ParentText"))
+ if (!xPropertySet->getPropertySetInfo()->hasPropertyByName(u"ParentText"_ustr))
return xRet;
uno::Reference<text::XText> xParent;
- if (xPropertySet->getPropertyValue("ParentText") >>= xParent)
+ if (xPropertySet->getPropertyValue(u"ParentText"_ustr) >>= xParent)
xRet = xParent;
else
return xRet;
@@ -1106,7 +1106,7 @@ void XMLTextFieldExport::ExportFieldHelper(
// show style, unless name will be shown
ProcessValueAndType(IsStringField(nToken, rPropSet),
GetIntProperty(gsPropertyNumberFormat, rPropSet),
- "", u"", 0.0, // values not used
+ u""_ustr, u"", 0.0, // values not used
false,
false,
!bCmd,
@@ -1147,7 +1147,7 @@ void XMLTextFieldExport::ExportFieldHelper(
bCmd);
ProcessValueAndType(IsStringField(nToken, rPropSet),
GetIntProperty(gsPropertyNumberFormat, rPropSet),
- "", u"", 0.0, // values not used
+ u""_ustr, u"", 0.0, // values not used
false, false, !bCmd,
! GetOptionalBoolProperty(
gsPropertyIsFixedLanguage,
@@ -1230,7 +1230,7 @@ void XMLTextFieldExport::ExportFieldHelper(
{
ProcessValueAndType(false,
GetIntProperty(gsPropertyNumberFormat,rPropSet),
- "", u"", 0.0, // not used
+ u""_ustr, u"", 0.0, // not used
false, false, true,
! GetOptionalBoolProperty(
gsPropertyIsFixedLanguage,
@@ -1272,7 +1272,7 @@ void XMLTextFieldExport::ExportFieldHelper(
{
ProcessValueAndType(false,
GetIntProperty(gsPropertyNumberFormat,rPropSet),
- "", u"", 0.0, // not used
+ u""_ustr, u"", 0.0, // not used
false, false, true,
! GetOptionalBoolProperty(
gsPropertyIsFixedLanguage,
@@ -1404,7 +1404,7 @@ void XMLTextFieldExport::ExportFieldHelper(
{
ProcessValueAndType(false, // doesn't happen for text
GetIntProperty(gsPropertyNumberFormat,rPropSet),
- "", u"", 0.0, // not used
+ u""_ustr, u"", 0.0, // not used
false, false, true, false);
}
ProcessDisplay(GetBoolProperty(gsPropertyIsVisible, rPropSet),
@@ -1429,7 +1429,7 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DOCINFO_PRINT_DATE:
ProcessValueAndType(false,
GetIntProperty(gsPropertyNumberFormat, rPropSet),
- "", u"", 0.0,
+ u""_ustr, u"", 0.0,
false, false, true,
! GetOptionalBoolProperty(
gsPropertyIsFixedLanguage,
@@ -1460,7 +1460,7 @@ void XMLTextFieldExport::ExportFieldHelper(
{
ProcessValueAndType(false, // doesn't happen for text
GetIntProperty(gsPropertyNumberFormat,rPropSet),
- "", u"", 0.0, // not used
+ u""_ustr, u"", 0.0, // not used
false, false, true,
! GetOptionalBoolProperty(
gsPropertyIsFixedLanguage,
@@ -1780,7 +1780,7 @@ void XMLTextFieldExport::ExportFieldHelper(
SvtSaveOptions::ODFSaneDefaultVersion eVersion = rExport.getSaneDefaultVersion();
if (eVersion & SvtSaveOptions::ODFSVER_EXTENDED)
{
- bool b = GetBoolProperty("Resolved", rPropSet);
+ bool b = GetBoolProperty(u"Resolved"_ustr, rPropSet);
OUString aResolvedText;
OUStringBuffer aResolvedTextBuffer;
::sax::Converter::convertBool(aResolvedTextBuffer, b);
@@ -1882,7 +1882,7 @@ void XMLTextFieldExport::ExportFieldHelper(
GetBoolProperty(gsPropertyIsShowFormula, rPropSet) );
ProcessValueAndType( false,
GetIntProperty(gsPropertyNumberFormat, rPropSet),
- "", u"", 0.0f,
+ u""_ustr, u"", 0.0f,
false, false, true,
false );
ExportElement( XML_TABLE_FORMULA, sPresentation );
@@ -2077,7 +2077,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
ProcessValueAndType(
bIsString,
GetIntProperty(gsPropertyNumberFormat, xFieldPropSet),
- "", u"", 0.0,
+ u""_ustr, u"", 0.0,
false, true, false, false);
}
else
@@ -2090,7 +2090,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
// from NumberFormats
ProcessValueAndType(
bIsString,
- 0, "", u"", 0.0,
+ 0, u""_ustr, u"", 0.0,
false, true, false, false);
}
@@ -2163,7 +2163,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
// expression:
ProcessValueAndType(
false,
- 0, "", u"",
+ 0, u""_ustr, u"",
GetDoubleProperty(gsPropertyValue, xPropSet),
true,
true,
@@ -2295,7 +2295,7 @@ void XMLTextFieldExport::ExportMacro(
const OUString& rContent )
{
// some strings we'll need
- OUString sEventType( "EventType" );
+ OUString sEventType( u"EventType"_ustr );
// the description attribute
@@ -2312,13 +2312,13 @@ void XMLTextFieldExport::ExportMacro(
// 1) build sequence of PropertyValues
Sequence<PropertyValue> aSeq;
OUString sName;
- rPropSet->getPropertyValue("ScriptURL") >>= sName;
+ rPropSet->getPropertyValue(u"ScriptURL"_ustr) >>= sName;
// if the ScriptURL property is not empty then this is a Scripting
// Framework URL, otherwise treat it as a Basic Macro
if (!sName.isEmpty())
{
- OUString sScript( "Script" );
+ OUString sScript( u"Script"_ustr );
aSeq = Sequence<PropertyValue>
{
comphelper::makePropertyValue(sEventType, sScript),
@@ -2329,14 +2329,14 @@ void XMLTextFieldExport::ExportMacro(
{
aSeq = Sequence<PropertyValue>
{
- comphelper::makePropertyValue(sEventType, OUString("StarBasic")),
- comphelper::makePropertyValue("Library", rPropSet->getPropertyValue( "MacroLibrary" )),
- comphelper::makePropertyValue("MacroName", rPropSet->getPropertyValue( "MacroName" ))
+ comphelper::makePropertyValue(sEventType, u"StarBasic"_ustr),
+ comphelper::makePropertyValue(u"Library"_ustr, rPropSet->getPropertyValue( u"MacroLibrary"_ustr )),
+ comphelper::makePropertyValue(u"MacroName"_ustr, rPropSet->getPropertyValue( u"MacroName"_ustr ))
};
}
// 2) export the sequence
- GetExport().GetEventExport().ExportSingleEvent( aSeq, "OnClick", false );
+ GetExport().GetEventExport().ExportSingleEvent( aSeq, u"OnClick"_ustr, false );
// and finally, the field presentation
GetExport().Characters(rContent);
@@ -2365,7 +2365,7 @@ void XMLTextFieldExport::ExportMetaField(
// style:data-style-name
ProcessValueAndType(false,
GetIntProperty(gsPropertyNumberFormat, i_xMeta),
- "", u"", 0.0, false, false, true,
+ u""_ustr, u"", 0.0, false, false, true,
false );
// text:meta-field without xml:id is invalid
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 72d866de7ed2..a4a602b63665 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -486,7 +486,7 @@ constexpr OUStringLiteral gsPropertyFieldSubType(u"UserDataType");
XMLSenderFieldImportContext::XMLSenderFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp)
- : XMLTextFieldImportContext(rImport, rHlp, "ExtendedUser")
+ : XMLTextFieldImportContext(rImport, rHlp, u"ExtendedUser"_ustr)
, nSubType(0)
, sPropertyFixed(sAPI_is_fixed)
, sPropertyContent(sAPI_content)
@@ -836,7 +836,7 @@ constexpr OUStringLiteral gsPropertyPlaceholder(u"PlaceHolder");
XMLPlaceholderFieldImportContext::XMLPlaceholderFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp)
-: XMLTextFieldImportContext(rImport, rHlp, "JumpEdit")
+: XMLTextFieldImportContext(rImport, rHlp, u"JumpEdit"_ustr)
, sPropertyHint(sAPI_hint)
, nPlaceholderType(PlaceholderType::TEXT)
{
@@ -1226,7 +1226,7 @@ void XMLDatabaseFieldImportContext::PrepareField(
XMLDatabaseNameImportContext::XMLDatabaseNameImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLDatabaseFieldImportContext(rImport, rHlp, "DatabaseName", true)
+ XMLDatabaseFieldImportContext(rImport, rHlp, u"DatabaseName"_ustr, true)
{
}
@@ -1254,7 +1254,7 @@ XMLDatabaseNextImportContext::XMLDatabaseNextImportContext(
XMLDatabaseNextImportContext::XMLDatabaseNextImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp)
-: XMLDatabaseFieldImportContext(rImport, rHlp, "DatabaseNextSet", false)
+: XMLDatabaseFieldImportContext(rImport, rHlp, u"DatabaseNextSet"_ustr, false)
, sPropertyCondition(sAPI_condition)
, sTrue(sAPI_true)
, bConditionOK(false)
@@ -1303,7 +1303,7 @@ void XMLDatabaseNextImportContext::PrepareField(
XMLDatabaseSelectImportContext::XMLDatabaseSelectImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLDatabaseNextImportContext(rImport, rHlp, "DatabaseNumberOfSet"),
+ XMLDatabaseNextImportContext(rImport, rHlp, u"DatabaseNumberOfSet"_ustr),
sPropertySetNumber(sAPI_set_number),
nNumber(0),
bNumberOK(false)
@@ -1346,11 +1346,11 @@ void XMLDatabaseSelectImportContext::PrepareField(
XMLDatabaseNumberImportContext::XMLDatabaseNumberImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLDatabaseFieldImportContext(rImport, rHlp, "DatabaseSetNumber", true),
+ XMLDatabaseFieldImportContext(rImport, rHlp, u"DatabaseSetNumber"_ustr, true),
sPropertyNumberingType(
sAPI_numbering_type),
sPropertySetNumber(sAPI_set_number),
- sNumberFormat("1"),
+ sNumberFormat(u"1"_ustr),
sNumberSync(GetXMLToken(XML_FALSE)),
nValue(0),
bValueOK(false)
@@ -1767,7 +1767,7 @@ void XMLUserDocInfoImportContext::PrepareField(
XMLHiddenParagraphImportContext::XMLHiddenParagraphImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "HiddenParagraph"),
+ XMLTextFieldImportContext(rImport, rHlp, u"HiddenParagraph"_ustr),
sPropertyCondition(sAPI_condition),
sPropertyIsHidden(sAPI_is_hidden),
bIsHidden(false)
@@ -1819,7 +1819,7 @@ constexpr OUStringLiteral gsPropertyIsConditionTrue(u"IsConditionTrue");
XMLConditionalTextImportContext::XMLConditionalTextImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "ConditionalText"),
+ XMLTextFieldImportContext(rImport, rHlp, u"ConditionalText"_ustr),
sPropertyCondition(sAPI_condition),
sPropertyCurrentPresentation(sAPI_current_presentation),
bConditionOK(false),
@@ -1889,7 +1889,7 @@ void XMLConditionalTextImportContext::PrepareField(
XMLHiddenTextImportContext::XMLHiddenTextImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "HiddenText"),
+ XMLTextFieldImportContext(rImport, rHlp, u"HiddenText"_ustr),
sPropertyCondition(sAPI_condition),
sPropertyContent(sAPI_content),
sPropertyIsHidden(sAPI_is_hidden),
@@ -1963,7 +1963,7 @@ const SvXMLEnumMapEntry<sal_uInt16> aFilenameDisplayMap[] =
XMLFileNameImportContext::XMLFileNameImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "FileName"),
+ XMLTextFieldImportContext(rImport, rHlp, u"FileName"_ustr),
sPropertyFixed(sAPI_is_fixed),
sPropertyFileFormat(sAPI_file_format),
sPropertyCurrentPresentation(
@@ -2047,7 +2047,7 @@ const SvXMLEnumMapEntry<sal_uInt16> aTemplateDisplayMap[] =
XMLTemplateNameImportContext::XMLTemplateNameImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "TemplateName"),
+ XMLTextFieldImportContext(rImport, rHlp, u"TemplateName"_ustr),
sPropertyFileFormat(sAPI_file_format),
nFormat(TemplateDisplayFormat::FULL)
{
@@ -2102,7 +2102,7 @@ constexpr OUStringLiteral gsPropertyLevel(u"Level");
XMLChapterImportContext::XMLChapterImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "Chapter"),
+ XMLTextFieldImportContext(rImport, rHlp, u"Chapter"_ustr),
nFormat(ChapterFormat::NAME_NUMBER),
nLevel(0)
{
@@ -2251,7 +2251,7 @@ OUString XMLCountFieldImportContext::MapTokenToServiceName(
XMLPageVarGetFieldImportContext::XMLPageVarGetFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "ReferencePageGet"),
+ XMLTextFieldImportContext(rImport, rHlp, u"ReferencePageGet"_ustr),
bNumberFormatOK(false)
{
bValid = true;
@@ -2300,7 +2300,7 @@ void XMLPageVarGetFieldImportContext::PrepareField(
XMLPageVarSetFieldImportContext::XMLPageVarSetFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "ReferencePageSet"),
+ XMLTextFieldImportContext(rImport, rHlp, u"ReferencePageSet"_ustr),
nAdjust(0),
bActive(true)
{
@@ -2340,7 +2340,7 @@ void XMLPageVarSetFieldImportContext::ProcessAttribute(
void XMLPageVarSetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- xPropertySet->setPropertyValue("On", Any(bActive));
+ xPropertySet->setPropertyValue(u"On"_ustr, Any(bActive));
xPropertySet->setPropertyValue(sAPI_offset, Any(nAdjust));
}
@@ -2350,7 +2350,7 @@ void XMLPageVarSetFieldImportContext::PrepareField(
XMLMacroFieldImportContext::XMLMacroFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "Macro"),
+ XMLTextFieldImportContext(rImport, rHlp, u"Macro"_ustr),
bDescriptionOK(false)
{
}
@@ -2409,7 +2409,7 @@ void XMLMacroFieldImportContext::PrepareField(
// get event sequence
XMLEventsImportContext* pEvents = xEventContext.get();
Sequence<PropertyValue> aValues;
- pEvents->GetEventSequence( "OnClick", aValues );
+ pEvents->GetEventSequence( u"OnClick"_ustr, aValues );
for (const auto& rValue : aValues)
{
@@ -2453,9 +2453,9 @@ void XMLMacroFieldImportContext::PrepareField(
sMacroName = sMacro;
}
- xPropertySet->setPropertyValue("ScriptURL", Any(sScriptURL));
- xPropertySet->setPropertyValue("MacroName", Any(sMacroName));
- xPropertySet->setPropertyValue("MacroLibrary", Any(sLibraryName));
+ xPropertySet->setPropertyValue(u"ScriptURL"_ustr, Any(sScriptURL));
+ xPropertySet->setPropertyValue(u"MacroName"_ustr, Any(sMacroName));
+ xPropertySet->setPropertyValue(u"MacroLibrary"_ustr, Any(sLibraryName));
}
@@ -2465,7 +2465,7 @@ void XMLMacroFieldImportContext::PrepareField(
XMLReferenceFieldImportContext::XMLReferenceFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_Int32 nToken)
-: XMLTextFieldImportContext(rImport, rHlp, "GetReference")
+: XMLTextFieldImportContext(rImport, rHlp, u"GetReference"_ustr)
, nElementToken(nToken)
, nSource(0)
, nType(ReferenceFieldPart::PAGE_DESC)
@@ -2583,19 +2583,19 @@ void XMLReferenceFieldImportContext::ProcessAttribute(
void XMLReferenceFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- xPropertySet->setPropertyValue("ReferenceFieldPart", Any(nType));
+ xPropertySet->setPropertyValue(u"ReferenceFieldPart"_ustr, Any(nType));
- xPropertySet->setPropertyValue("ReferenceFieldSource", Any(nSource));
+ xPropertySet->setPropertyValue(u"ReferenceFieldSource"_ustr, Any(nSource));
- xPropertySet->setPropertyValue("ReferenceFieldLanguage", Any(sLanguage));
+ xPropertySet->setPropertyValue(u"ReferenceFieldLanguage"_ustr, Any(sLanguage));
switch (nElementToken)
{
case XML_ELEMENT(TEXT, XML_REFERENCE_REF):
case XML_ELEMENT(TEXT, XML_BOOKMARK_REF):
case XML_ELEMENT(TEXT, XML_STYLE_REF):
case XML_ELEMENT(LO_EXT, XML_STYLE_REF):
- xPropertySet->setPropertyValue("SourceName", Any(sName));
- xPropertySet->setPropertyValue("ReferenceFieldFlags", Any(nFlags));
+ xPropertySet->setPropertyValue(u"SourceName"_ustr, Any(sName));
+ xPropertySet->setPropertyValue(u"ReferenceFieldFlags"_ustr, Any(nFlags));
break;
case XML_ELEMENT(TEXT, XML_NOTE_REF):
@@ -2715,18 +2715,18 @@ void XMLDdeFieldDeclImportContext::startFastElement(
Reference<XPropertySet> xPropSet( xIfc, UNO_QUERY );
if (xPropSet.is() &&
xPropSet->getPropertySetInfo()->hasPropertyByName(
- "DDECommandType"))
+ u"DDECommandType"_ustr))
{
xPropSet->setPropertyValue(sAPI_name, Any(sName));
- xPropSet->setPropertyValue("DDECommandType", Any(sCommandApplication));
+ xPropSet->setPropertyValue(u"DDECommandType"_ustr, Any(sCommandApplication));
- xPropSet->setPropertyValue("DDECommandFile", Any(sCommandTopic));
+ xPropSet->setPropertyValue(u"DDECommandFile"_ustr, Any(sCommandTopic));
- xPropSet->setPropertyValue("DDECommandElement",
+ xPropSet->setPropertyValue(u"DDECommandElement"_ustr,
Any(sCommandItem));
- xPropSet->setPropertyValue("IsAutomaticUpdate",
+ xPropSet->setPropertyValue(u"IsAutomaticUpdate"_ustr,
Any(bUpdate));
}
// else: ignore (can't get XPropertySet, or DDE
@@ -2824,7 +2824,7 @@ void XMLDdeFieldImportContext::PrepareField(
XMLSheetNameImportContext::XMLSheetNameImportContext(
SvXMLImport& rImport,
XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "SheetName")
+ XMLTextFieldImportContext(rImport, rHlp, u"SheetName"_ustr)
{
bValid = true; // always valid!
}
@@ -2848,7 +2848,7 @@ void XMLSheetNameImportContext::PrepareField(
XMLPageNameFieldImportContext::XMLPageNameFieldImportContext(
SvXMLImport& rImport, /// XML Import
XMLTextImportHelper& rHlp) /// Text import helper
-: XMLTextFieldImportContext(rImport, rHlp, "PageName" )
+: XMLTextFieldImportContext(rImport, rHlp, u"PageName"_ustr )
{
bValid = true;
}
@@ -2906,17 +2906,17 @@ void XMLUrlFieldImportContext::PrepareField(
if (bFrameOK)
{
- xPropertySet->setPropertyValue("TargetFrame", Any(sFrame));
+ xPropertySet->setPropertyValue(u"TargetFrame"_ustr, Any(sFrame));
}
- xPropertySet->setPropertyValue("Representation", Any(GetContent()));
+ xPropertySet->setPropertyValue(u"Representation"_ustr, Any(GetContent()));
}
XMLBibliographyFieldImportContext::XMLBibliographyFieldImportContext(
SvXMLImport& rImport,
XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "Bibliography")
+ XMLTextFieldImportContext(rImport, rHlp, u"Bibliography"_ustr)
{
bValid = true;
}
@@ -2965,8 +2965,7 @@ void XMLBibliographyFieldImportContext::startFastElement(
{
auto nToken = aIter.getToken() & TOKEN_MASK;
PropertyValue aValue;
- aValue.Name = OUString::createFromAscii(
- MapBibliographyFieldName(nToken));
+ aValue.Name = MapBibliographyFieldName(nToken);
Any aAny;
// special treatment for bibliography type
@@ -3024,123 +3023,122 @@ void XMLBibliographyFieldImportContext::PrepareField(
}
// set sequence
- xPropertySet->setPropertyValue("Fields", Any(aValueSequence));
+ xPropertySet->setPropertyValue(u"Fields"_ustr, Any(aValueSequence));
}
-const char* XMLBibliographyFieldImportContext::MapBibliographyFieldName(
+OUString XMLBibliographyFieldImportContext::MapBibliographyFieldName(
sal_Int32 nElement)
{
- const char* pName = nullptr;
+ OUString pName;
switch (nElement & TOKEN_MASK)
{
case XML_IDENTIFIER:
- pName = "Identifier";
+ pName = u"Identifier"_ustr;
break;
case XML_BIBILIOGRAPHIC_TYPE:
case XML_BIBLIOGRAPHY_TYPE:
// biblio... vs bibilio...: #96658#: also read old documents
- pName = "BibiliographicType";
+ pName = u"BibiliographicType"_ustr;
break;
case XML_ADDRESS:
- pName = "Address";
+ pName = u"Address"_ustr;
break;
case XML_ANNOTE:
- pName = "Annote";
+ pName = u"Annote"_ustr;
break;
case XML_AUTHOR:
- pName = "Author";
+ pName = u"Author"_ustr;
break;
case XML_BOOKTITLE:
- pName = "Booktitle";
+ pName = u"Booktitle"_ustr;
break;
case XML_CHAPTER:
- pName = "Chapter";
+ pName = u"Chapter"_ustr;
break;
case XML_EDITION:
- pName = "Edition";
+ pName = u"Edition"_ustr;
break;
case XML_EDITOR:
- pName = "Editor";
+ pName = u"Editor"_ustr;
break;
case XML_HOWPUBLISHED:
- pName = "Howpublished";
+ pName = u"Howpublished"_ustr;
break;
case XML_INSTITUTION:
- pName = "Institution";
+ pName = u"Institution"_ustr;
break;
case XML_JOURNAL:
- pName = "Journal";
+ pName = u"Journal"_ustr;
break;
case XML_MONTH:
- pName = "Month";
+ pName = u"Month"_ustr;
break;
case XML_NOTE:
- pName = "Note";
+ pName = u"Note"_ustr;
break;
case XML_NUMBER:
- pName = "Number";
+ pName = u"Number"_ustr;
break;
case XML_ORGANIZATIONS:
- pName = "Organizations";
+ pName = u"Organizations"_ustr;
break;
case XML_PAGES:
- pName = "Pages";
+ pName = u"Pages"_ustr;
break;
case XML_PUBLISHER:
- pName = "Publisher";
+ pName = u"Publisher"_ustr;
break;
case XML_SCHOOL:
- pName = "School";
+ pName = u"School"_ustr;
break;
case XML_SERIES:
- pName = "Series";
+ pName = u"Series"_ustr;
break;
case XML_TITLE:
- pName = "Title";
+ pName = u"Title"_ustr;
break;
case XML_REPORT_TYPE:
- pName = "Report_Type";
+ pName = u"Report_Type"_ustr;
break;
case XML_VOLUME:
- pName = "Volume";
+ pName = u"Volume"_ustr;
break;
case XML_YEAR:
- pName = "Year";
+ pName = u"Year"_ustr;
break;
case XML_URL:
- pName = "URL";
+ pName = u"URL"_ustr;
break;
case XML_CUSTOM1:
- pName = "Custom1";
+ pName = u"Custom1"_ustr;
break;
case XML_CUSTOM2:
- pName = "Custom2";
+ pName = u"Custom2"_ustr;
break;
case XML_CUSTOM3:
- pName = "Custom3";
+ pName = u"Custom3"_ustr;
break;
case XML_CUSTOM4:
- pName = "Custom4";
+ pName = u"Custom4"_ustr;
break;
case XML_CUSTOM5:
- pName = "Custom5";
+ pName = u"Custom5"_ustr;
break;
case XML_ISBN:
- pName = "ISBN";
+ pName = u"ISBN"_ustr;
break;
case XML_LOCAL_URL:
- pName = "LocalURL";
+ pName = u"LocalURL"_ustr;
break;
case XML_TARGET_TYPE:
- pName = "TargetType";
+ pName = u"TargetType"_ustr;
break;
case XML_TARGET_URL:
- pName = "TargetURL";
+ pName = u"TargetURL"_ustr;
break;
default:
assert(false && "Unknown bibliography info data");
- pName = nullptr;
}
return pName;
}
@@ -3152,7 +3150,7 @@ XMLAnnotationImportContext::XMLAnnotationImportContext(
SvXMLImport& rImport,
XMLTextImportHelper& rHlp,
sal_Int32 nElement) :
- XMLTextFieldImportContext(rImport, rHlp, "Annotation"),
+ XMLTextFieldImportContext(rImport, rHlp, u"Annotation"_ustr),
mnElement(nElement)
{
bValid = true;
@@ -3197,7 +3195,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLAnnotationImportCon
bOK = CreateField( mxField, sServicePrefix + GetServiceName() );
if (bOK)
{
- Any aAny = mxField->getPropertyValue( "TextRange" );
+ Any aAny = mxField->getPropertyValue( u"TextRange"_ustr );
Reference< XText > xText;
aAny >>= xText;
if( xText.is() )
@@ -3232,7 +3230,7 @@ void XMLAnnotationImportContext::endFastElement(sal_Int32 /*nElement*/)
// delete addition newline
mxCursor->gotoEnd( false );
mxCursor->goLeft( 1, true );
- mxCursor->setString( "" );
+ mxCursor->setString( u""_ustr );
// reset cursor
GetImport().GetTextImport()->ResetCursor();
@@ -3331,12 +3329,12 @@ void XMLAnnotationImportContext::PrepareField(
// import (possibly empty) initials
OUString sInitials( aInitialsBuffer.makeStringAndClear() );
- xPropertySet->setPropertyValue("Initials", Any(sInitials));
+ xPropertySet->setPropertyValue(u"Initials"_ustr, Any(sInitials));
//import resolved flag
bool bTmp(false);
(void)::sax::Converter::convertBool(bTmp, aResolved);
- xPropertySet->setPropertyValue("Resolved", Any(bTmp));
+ xPropertySet->setPropertyValue(u"Resolved"_ustr, Any(bTmp));
util::DateTime aDateTime;
if (::sax::Converter::parseDateTime(aDateTime, aDateBuffer))
@@ -3375,7 +3373,7 @@ void XMLAnnotationImportContext::PrepareField(
XMLScriptImportContext::XMLScriptImportContext(
SvXMLImport& rImport,
XMLTextImportHelper& rHlp)
-: XMLTextFieldImportContext(rImport, rHlp, "Script")
+: XMLTextFieldImportContext(rImport, rHlp, u"Script"_ustr)
, bContentOK(false)
{
}
@@ -3416,9 +3414,9 @@ void XMLScriptImportContext::PrepareField(
xPropertySet->setPropertyValue(sAPI_content, Any(sContent));
// URL or script text? We use URL if we have an href-attribute
- xPropertySet->setPropertyValue("URLContent", Any(bContentOK));
+ xPropertySet->setPropertyValue(u"URLContent"_ustr, Any(bContentOK));
- xPropertySet->setPropertyValue("ScriptType", Any(sScriptType));
+ xPropertySet->setPropertyValue(u"ScriptType"_ustr, Any(sScriptType));
}
@@ -3428,7 +3426,7 @@ void XMLScriptImportContext::PrepareField(
XMLMeasureFieldImportContext::XMLMeasureFieldImportContext(
SvXMLImport& rImport,
XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "Measure"),
+ XMLTextFieldImportContext(rImport, rHlp, u"Measure"_ustr),
mnKind( 0 )
{
}
@@ -3461,7 +3459,7 @@ void XMLMeasureFieldImportContext::ProcessAttribute(
void XMLMeasureFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- xPropertySet->setPropertyValue("Kind", Any(mnKind));
+ xPropertySet->setPropertyValue(u"Kind"_ustr, Any(mnKind));
}
@@ -3471,7 +3469,7 @@ void XMLMeasureFieldImportContext::PrepareField(
XMLDropDownFieldImportContext::XMLDropDownFieldImportContext(
SvXMLImport& rImport,
XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext( rImport, rHlp, "DropDown" ),
+ XMLTextFieldImportContext( rImport, rHlp, u"DropDown"_ustr ),
nSelected( -1 ),
bNameOK( false ),
bHelpOK(false),
@@ -3562,27 +3560,27 @@ void XMLDropDownFieldImportContext::PrepareField(
// now set values:
- xPropertySet->setPropertyValue( "Items", Any(aSequence) );
+ xPropertySet->setPropertyValue( u"Items"_ustr, Any(aSequence) );
if( nSelected >= 0 && nSelected < nLength )
{
- xPropertySet->setPropertyValue( "SelectedItem", Any(pSequence[nSelected]) );
+ xPropertySet->setPropertyValue( u"SelectedItem"_ustr, Any(pSequence[nSelected]) );
}
// set name
if( bNameOK )
{
- xPropertySet->setPropertyValue( "Name", Any(sName) );
+ xPropertySet->setPropertyValue( u"Name"_ustr, Any(sName) );
}
// set help
if( bHelpOK )
{
- xPropertySet->setPropertyValue( "Help", Any(sHelp) );
+ xPropertySet->setPropertyValue( u"Help"_ustr, Any(sHelp) );
}
// set hint
if( bHintOK )
{
- xPropertySet->setPropertyValue( "Tooltip", Any(sHint) );
+ xPropertySet->setPropertyValue( u"Tooltip"_ustr, Any(sHint) );
}
}
@@ -3592,7 +3590,7 @@ void XMLDropDownFieldImportContext::PrepareField(
XMLHeaderFieldImportContext::XMLHeaderFieldImportContext(
SvXMLImport& rImport, /// XML Import
XMLTextImportHelper& rHlp) /// Text import helper
-: XMLTextFieldImportContext(rImport, rHlp, "Header" )
+: XMLTextFieldImportContext(rImport, rHlp, u"Header"_ustr )
{
sServicePrefix = sAPI_presentation_prefix;
bValid = true;
@@ -3614,7 +3612,7 @@ void XMLHeaderFieldImportContext::PrepareField(const Reference<XPropertySet> &)
XMLFooterFieldImportContext::XMLFooterFieldImportContext(
SvXMLImport& rImport, /// XML Import
XMLTextImportHelper& rHlp) /// Text import helper
-: XMLTextFieldImportContext(rImport, rHlp, "Footer" )
+: XMLTextFieldImportContext(rImport, rHlp, u"Footer"_ustr )
{
sServicePrefix = sAPI_presentation_prefix;
bValid = true;
@@ -3637,7 +3635,7 @@ void XMLFooterFieldImportContext::PrepareField(const Reference<XPropertySet> &)
XMLDateTimeFieldImportContext::XMLDateTimeFieldImportContext(
SvXMLImport& rImport, /// XML Import
XMLTextImportHelper& rHlp) /// Text import helper
-: XMLTextFieldImportContext(rImport, rHlp, "DateTime" )
+: XMLTextFieldImportContext(rImport, rHlp, u"DateTime"_ustr )
{
sServicePrefix = sAPI_presentation_prefix;
bValid = true;
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 21870f73a063..7dfb223fd25d 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -648,34 +648,34 @@ bool XMLTextImportHelper::IsDuplicateFrame(const OUString& sName, sal_Int32 nX,
xOtherFrame.set(m_xImpl->m_xObjects->getByName(sName), uno::UNO_QUERY);
Reference< XPropertySetInfo > xPropSetInfo = xOtherFrame->getPropertySetInfo();
- if(xPropSetInfo->hasPropertyByName("Width"))
+ if(xPropSetInfo->hasPropertyByName(u"Width"_ustr))
{
sal_Int32 nOtherWidth = 0;
- xOtherFrame->getPropertyValue("Width") >>= nOtherWidth;
+ xOtherFrame->getPropertyValue(u"Width"_ustr) >>= nOtherWidth;
if(nWidth != nOtherWidth)
return false;
}
- if (xPropSetInfo->hasPropertyByName("Height"))
+ if (xPropSetInfo->hasPropertyByName(u"Height"_ustr))
{
sal_Int32 nOtherHeight = 0;
- xOtherFrame->getPropertyValue("Height") >>= nOtherHeight;
+ xOtherFrame->getPropertyValue(u"Height"_ustr) >>= nOtherHeight;
if (nHeight != nOtherHeight)
return false;
}
- if (xPropSetInfo->hasPropertyByName("HoriOrientPosition"))
+ if (xPropSetInfo->hasPropertyByName(u"HoriOrientPosition"_ustr))
{
sal_Int32 nOtherX = 0;
- xOtherFrame->getPropertyValue("HoriOrientPosition") >>= nOtherX;
+ xOtherFrame->getPropertyValue(u"HoriOrientPosition"_ustr) >>= nOtherX;
if (nX != nOtherX)
return false;
}
- if (xPropSetInfo->hasPropertyByName("VertOrientPosition"))
+ if (xPropSetInfo->hasPropertyByName(u"VertOrientPosition"_ustr))
{
sal_Int32 nOtherY = 0;
- xOtherFrame->getPropertyValue("VertOrientPosition") >>= nOtherY;
+ xOtherFrame->getPropertyValue(u"VertOrientPosition"_ustr) >>= nOtherY;
if (nY != nOtherY)
return false;
}
@@ -794,7 +794,7 @@ void XMLTextImportHelper::DeleteParagraph()
if (m_xImpl->m_xCursor->goLeft( 1, true ))
{
m_xImpl->m_xText->insertString(m_xImpl->m_xCursorAsRange,
- "", true);
+ u""_ustr, true);
}
}
}
@@ -1043,7 +1043,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
if( !sStyleName.isEmpty() )
{
sStyleName = rImport.GetStyleDisplayName( nFamily, sStyleName );
- const OUString rPropName = bPara ? OUString("ParaStyleName") : OUString("CharStyleName");
+ const OUString rPropName = bPara ? u"ParaStyleName"_ustr : u"CharStyleName"_ustr;
const Reference < XNameContainer > & rStyles = bPara
? m_xImpl->m_xParaStyles
: m_xImpl->m_xTextStyles;
@@ -1272,9 +1272,9 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
XmlStyleFamily::TEXT_TEXT,
pStyle->GetDropCapStyleName()) );
if (m_xImpl->m_xTextStyles->hasByName(sDisplayName) &&
- xPropSetInfo->hasPropertyByName("DropCapCharStyleName"))
+ xPropSetInfo->hasPropertyByName(u"DropCapCharStyleName"_ustr))
{
- xPropSet->setPropertyValue("DropCapCharStyleName", Any(sDisplayName));
+ xPropSet->setPropertyValue(u"DropCapCharStyleName"_ustr, Any(sDisplayName));
}
}
@@ -1286,7 +1286,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
{
uno::Reference<beans::XPropertySet> const xTmp(
m_xImpl->m_xServiceFactory->createInstance(
- "com.sun.star.text.TextField.CombinedCharacters"), UNO_QUERY);
+ u"com.sun.star.text.TextField.CombinedCharacters"_ustr), UNO_QUERY);
if( xTmp.is() )
{
// fix cursor if larger than possible for
@@ -1299,7 +1299,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
}
// set field value (the combined character string)
- xTmp->setPropertyValue("Content",
+ xTmp->setPropertyValue(u"Content"_ustr,
Any(rCursor->getString()));
// insert the field over it's original text
@@ -1369,13 +1369,13 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
if (!bOutlineContentVisible)
{
uno::Sequence<beans::PropertyValue> aGrabBag;
- xPropSet->getPropertyValue("ParaInteropGrabBag") >>= aGrabBag;
+ xPropSet->getPropertyValue(u"ParaInteropGrabBag"_ustr) >>= aGrabBag;
sal_Int32 length = aGrabBag.getLength();
aGrabBag.realloc(length + 1);
auto pGrabBag = aGrabBag.getArray();
pGrabBag[length].Name = "OutlineContentVisibleAttr";
pGrabBag[length].Value <<= bool(bOutlineContentVisible);
- xPropSet->setPropertyValue("ParaInteropGrabBag", uno::Any(aGrabBag));
+ xPropSet->setPropertyValue(u"ParaInteropGrabBag"_ustr, uno::Any(aGrabBag));
}
// RFE: inserting headings into text documents (#i70748#)
if ( bApplyOutlineLevelAsListLevel )
@@ -1545,7 +1545,7 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels )
{
Reference<XPropertySet> xChapterNumRule(
m_xImpl->m_xChapterNumbering, UNO_QUERY);
- xChapterNumRule->getPropertyValue("Name") >>= sOutlineStyleName;
+ xChapterNumRule->getPropertyValue(u"Name"_ustr) >>= sOutlineStyleName;
}
const sal_Int32 nCount = m_xImpl->m_xChapterNumbering->getCount();
@@ -1582,7 +1582,7 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels )
m_xImpl->m_xOutlineStylesCandidates[i][j],
m_xImpl->m_xParaStyles,
GetXMLImport(),
- "NumberingStyleName",
+ u"NumberingStyleName"_ustr,
sOutlineStyleName))
{
sChosenStyles[i] =
@@ -1701,7 +1701,7 @@ void XMLTextImportHelper::SetRuby(
{
Reference<XPropertySet> xPropSet(rCursor, UNO_QUERY);
- OUString sRubyText("RubyText");
+ OUString sRubyText(u"RubyText"_ustr);
// if we have one Ruby property, we assume all of them are present
if (!xPropSet.is() ||
@@ -1732,7 +1732,7 @@ void XMLTextImportHelper::SetRuby(
if( (!sDisplayName.isEmpty()) &&
m_xImpl->m_xTextStyles->hasByName( sDisplayName ))
{
- xPropSet->setPropertyValue("RubyCharStyleName", Any(sDisplayName));
+ xPropSet->setPropertyValue(u"RubyCharStyleName"_ustr, Any(sDisplayName));
}
}
}
@@ -2189,7 +2189,7 @@ void XMLTextImportHelper::ConnectFrameChains(
if (m_xImpl->m_xTextFrames.is()
&& m_xImpl->m_xTextFrames->hasByName(sNextFrmName))
{
- rFrmPropSet->setPropertyValue("ChainNextName",
+ rFrmPropSet->setPropertyValue(u"ChainNextName"_ustr,
Any(sNextFrmName));
}
else
@@ -2212,7 +2212,7 @@ void XMLTextImportHelper::ConnectFrameChains(
{
// The previous frame must exist, because it existing than
// inserting the entry
- rFrmPropSet->setPropertyValue("ChainPrevName", Any(*i));
+ rFrmPropSet->setPropertyValue(u"ChainPrevName"_ustr, Any(*i));
i = m_xImpl->m_xPrevFrmNames->erase(i);
j = m_xImpl->m_xNextFrmNames->erase(j);
@@ -2370,7 +2370,7 @@ void XMLTextImportHelper::SetOpenRedlineId( OUString const & rId)
void XMLTextImportHelper::ResetOpenRedlineId()
{
- SetOpenRedlineId("");
+ SetOpenRedlineId(u""_ustr);
}
void
@@ -2417,26 +2417,26 @@ void XMLTextImportHelper::MapCrossRefHeadingFieldsHorribly()
{
uno::Reference<lang::XServiceInfo> const xFieldInfo(
xFields->nextElement(), uno::UNO_QUERY);
- if (!xFieldInfo->supportsService("com.sun.star.text.textfield.GetReference"))
+ if (!xFieldInfo->supportsService(u"com.sun.star.text.textfield.GetReference"_ustr))
{
continue;
}
uno::Reference<beans::XPropertySet> const xField(
xFieldInfo, uno::UNO_QUERY);
sal_uInt16 nType(0);
- xField->getPropertyValue("ReferenceFieldSource") >>= nType;
+ xField->getPropertyValue(u"ReferenceFieldSource"_ustr) >>= nType;
if (text::ReferenceFieldSource::BOOKMARK != nType)
{
continue;
}
OUString name;
- xField->getPropertyValue("SourceName") >>= name;
+ xField->getPropertyValue(u"SourceName"_ustr) >>= name;
auto const iter(m_xImpl->m_xCrossRefHeadingBookmarkMap->find(name));
if (iter == m_xImpl->m_xCrossRefHeadingBookmarkMap->end())
{
continue;
}
- xField->setPropertyValue("SourceName", uno::Any(iter->second));
+ xField->setPropertyValue(u"SourceName"_ustr, uno::Any(iter->second));
}
}
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx
index 86b1d86450da..80e1abd490f2 100644
--- a/xmloff/source/text/txtlists.cxx
+++ b/xmloff/source/text/txtlists.cxx
@@ -190,7 +190,7 @@ OUString XMLTextListsHelper::GetContinueListIdOfProcessedList(
OUString XMLTextListsHelper::GenerateNewListId() const
{
static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
- OUString sTmpStr( "list" );
+ OUString sTmpStr( u"list"_ustr );
if (bHack)
{
@@ -425,7 +425,7 @@ XMLTextListsHelper::MakeNumRule(
uno::Reference< beans::XPropertySet > xPropSet( xStyle,
uno::UNO_QUERY );
- any = xPropSet->getPropertyValue("NumberingRules");
+ any = xPropSet->getPropertyValue(u"NumberingRules"_ustr);
any >>= xNumRules;
}
else
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index b0671175e547..87630d6bf0d0 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -219,9 +219,9 @@ namespace
if(!xShape.is())
return false;
Reference<XServiceInfo> xServiceInfo(xTxtContent, UNO_QUERY);
- return !xServiceInfo->supportsService("com.sun.star.text.TextFrame") &&
- !xServiceInfo->supportsService("com.sun.star.text.TextGraphicObject") &&
- !xServiceInfo->supportsService("com.sun.star.text.TextEmbeddedObject");
+ return !xServiceInfo->supportsService(u"com.sun.star.text.TextFrame"_ustr) &&
+ !xServiceInfo->supportsService(u"com.sun.star.text.TextGraphicObject"_ustr) &&
+ !xServiceInfo->supportsService(u"com.sun.star.text.TextEmbeddedObject"_ustr);
};
class BoundFrames
@@ -470,12 +470,11 @@ static bool txtparae_bContainsIllegalCharacters = false;
// For the export pass all properties can be queried using a multi property
// set.
-static const char* aParagraphPropertyNamesAuto[] =
+constexpr OUString aParagraphPropertyNamesAuto[] =
{
- "NumberingRules",
- "ParaConditionalStyleName",
- "ParaStyleName",
- nullptr
+ u"NumberingRules"_ustr,
+ u"ParaConditionalStyleName"_ustr,
+ u"ParaStyleName"_ustr
};
namespace {
@@ -489,16 +488,15 @@ enum eParagraphPropertyNamesEnumAuto
}
-static const char* aParagraphPropertyNames[] =
+constexpr OUString aParagraphPropertyNames[] =
{
- "NumberingIsNumber",
- "NumberingStyleName",
- "OutlineLevel",
- "ParaConditionalStyleName",
- "ParaStyleName",
- "TextSection",
- "OutlineContentVisible",
- nullptr
+ u"NumberingIsNumber"_ustr,
+ u"NumberingStyleName"_ustr,
+ u"OutlineLevel"_ustr,
+ u"ParaConditionalStyleName"_ustr,
+ u"ParaStyleName"_ustr,
+ u"TextSection"_ustr,
+ u"OutlineContentVisible"_ustr
};
namespace {
@@ -601,14 +599,14 @@ void FieldParamExporter::Export()
Reference< embed::XStorage > xTargetStg = m_pExport->GetTargetStorage();
if (xTargetStg.is()) {
Reference< embed::XStorage > xDstStg = xTargetStg->openStorageElement(
- "OLELinks", embed::ElementModes::WRITE );
+ u"OLELinks"_ustr, embed::ElementModes::WRITE );
if ( !xDstStg->hasByName( sValue ) ) {
Reference< XStorageBasedDocument > xStgDoc (
m_pExport->GetModel( ), UNO_QUERY );
Reference< embed::XStorage > xDocStg = xStgDoc->getDocumentStorage();
Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement(
- "OLELinks", embed::ElementModes::READ );
+ u"OLELinks"_ustr, embed::ElementModes::READ );
xOleStg->copyElementTo( sValue, xDstStg, sValue );
Reference< embed::XTransactedObject > xTransact( xDstStg, UNO_QUERY );
@@ -716,15 +714,15 @@ void XMLTextParagraphExport::Add( XmlStyleFamily nFamily,
UNO_QUERY );
if( xNumPropSet.is() &&
xNumPropSet->getPropertySetInfo()
- ->hasPropertyByName( "IsAutomatic" ) )
+ ->hasPropertyByName( u"IsAutomatic"_ustr ) )
{
- bAdd = *o3tl::doAccess<bool>(xNumPropSet->getPropertyValue( "IsAutomatic" ));
+ bAdd = *o3tl::doAccess<bool>(xNumPropSet->getPropertyValue( u"IsAutomatic"_ustr ));
// Check on outline style (#i73361#)
if ( bAdd &&
xNumPropSet->getPropertySetInfo()
- ->hasPropertyByName( "NumberingIsOutline" ) )
+ ->hasPropertyByName( u"NumberingIsOutline"_ustr ) )
{
- bAdd = !(*o3tl::doAccess<bool>(xNumPropSet->getPropertyValue( "NumberingIsOutline" )));
+ bAdd = !(*o3tl::doAccess<bool>(xNumPropSet->getPropertyValue( u"NumberingIsOutline"_ustr )));
}
}
else
@@ -824,15 +822,15 @@ void XMLTextParagraphExport::Add( XmlStyleFamily nFamily,
UNO_QUERY );
if( xNumPropSet.is() &&
xNumPropSet->getPropertySetInfo()
- ->hasPropertyByName( "IsAutomatic" ) )
+ ->hasPropertyByName( u"IsAutomatic"_ustr ) )
{
- bAdd = *o3tl::doAccess<bool>(xNumPropSet->getPropertyValue( "IsAutomatic" ));
+ bAdd = *o3tl::doAccess<bool>(xNumPropSet->getPropertyValue( u"IsAutomatic"_ustr ));
// Check on outline style (#i73361#)
if ( bAdd &&
xNumPropSet->getPropertySetInfo()
- ->hasPropertyByName( "NumberingIsOutline" ) )
+ ->hasPropertyByName( u"NumberingIsOutline"_ustr ) )
{
- bAdd = !(*o3tl::doAccess<bool>(xNumPropSet->getPropertyValue( "NumberingIsOutline" )));
+ bAdd = !(*o3tl::doAccess<bool>(xNumPropSet->getPropertyValue( u"NumberingIsOutline"_ustr )));
}
}
else
@@ -1349,7 +1347,7 @@ struct XMLTextParagraphExport::DocumentListNodes
try
{
// See SwXTextDocument::getPropertyValue
- xPropSet->getPropertyValue("ODFExport_ListNodes") >>= nodes;
+ xPropSet->getPropertyValue(u"ODFExport_ListNodes"_ustr) >>= nodes;
}
catch (css::beans::UnknownPropertyException&)
{
@@ -1385,7 +1383,7 @@ struct XMLTextParagraphExport::DocumentListNodes
try
{
// See SwXParagraph::Impl::GetPropertyValues_Impl
- xPropSet->getPropertyValue("ODFExport_NodeIndex") >>= index;
+ xPropSet->getPropertyValue(u"ODFExport_NodeIndex"_ustr) >>= index;
}
catch (css::beans::UnknownPropertyException&)
{
@@ -1784,7 +1782,7 @@ void XMLTextParagraphExport::RecordNodeIndex(const css::uno::Reference<css::text
{
sal_Int32 index = 0;
// See SwXParagraph::Impl::GetPropertyValues_Impl
- xPropSet->getPropertyValue("ODFExport_NodeIndex") >>= index;
+ xPropSet->getPropertyValue(u"ODFExport_NodeIndex"_ustr) >>= index;
assert(std::find(maDocumentNodeOrder.begin(), maDocumentNodeOrder.end(), index)
== maDocumentNodeOrder.end());
maDocumentNodeOrder.push_back(index);
@@ -1830,8 +1828,8 @@ void XMLTextParagraphExport::exportTextContentEnumeration(
Reference<XTextSection> xCurrentTextSection(rBaseSection);
MultiPropertySetHelper aPropSetHelper(
- bAutoStyles ? aParagraphPropertyNamesAuto :
- aParagraphPropertyNames );
+ bAutoStyles ? std::span<const OUString>(aParagraphPropertyNamesAuto) :
+ std::span<const OUString>(aParagraphPropertyNames) );
bool bHoldElement = false;
Reference < XTextContent > xTxtCntnt;
@@ -2140,7 +2138,7 @@ void XMLTextParagraphExport::exportParagraph(
Reference< XPropertySet > xNumRulePropSet( xNumRule, UNO_QUERY );
OUString sOutlineName;
xNumRulePropSet->getPropertyValue(
- "Name" ) >>= sOutlineName;
+ u"Name"_ustr ) >>= sOutlineName;
bAssignedtoOutlineStyle = ( sListStyleName == sOutlineName );
}
}
@@ -2161,9 +2159,9 @@ void XMLTextParagraphExport::exportParagraph(
xPropSet->getPropertySetInfo());
if (xPropSetInfo->
- hasPropertyByName("ParaIsNumberingRestart"))
+ hasPropertyByName(u"ParaIsNumberingRestart"_ustr))
{
- xPropSet->getPropertyValue("ParaIsNumberingRestart")
+ xPropSet->getPropertyValue(u"ParaIsNumberingRestart"_ustr)
>>= bIsRestartNumbering;
}
@@ -2174,11 +2172,11 @@ void XMLTextParagraphExport::exportParagraph(
XML_TRUE);
if (xPropSetInfo->
- hasPropertyByName("NumberingStartValue"))
+ hasPropertyByName(u"NumberingStartValue"_ustr))
{
sal_Int32 nStartValue = 0;
- xPropSet->getPropertyValue("NumberingStartValue")
+ xPropSet->getPropertyValue(u"NumberingStartValue"_ustr)
>>= nStartValue;
GetExport().
@@ -2198,7 +2196,7 @@ void XMLTextParagraphExport::exportParagraph(
{
// ParaMarkerAutoStyleSpan is a hidden property, just to pass the autostyle here
// See SwXParagraph::Impl::GetPropertyValues_Impl
- css::uno::Any aVal = xPropSet->getPropertyValue("ParaMarkerAutoStyleSpan");
+ css::uno::Any aVal = xPropSet->getPropertyValue(u"ParaMarkerAutoStyleSpan"_ustr);
if (auto xFakeSpan = aVal.query<css::beans::XPropertySet>())
{
if (bAutoStyles)
@@ -2431,9 +2429,9 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
OUString sName;
Reference< css::container::XNameAccess > xParameters = xFormField->getParameters();
- if (xParameters.is() && xParameters->hasByName("Name"))
+ if (xParameters.is() && xParameters->hasByName(u"Name"_ustr))
{
- const Any aValue = xParameters->getByName("Name");
+ const Any aValue = xParameters->getByName(u"Name"_ustr);
aValue >>= sName;
}
if (sName.isEmpty())
@@ -2494,9 +2492,9 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
OUString sName;
Reference< css::container::XNameAccess > xParameters = xFormField->getParameters();
- if (xParameters.is() && xParameters->hasByName("Name"))
+ if (xParameters.is() && xParameters->hasByName(u"Name"_ustr))
{
- const Any aValue = xParameters->getByName("Name");
+ const Any aValue = xParameters->getByName(u"Name"_ustr);
aValue >>= sName;
}
if (sName.isEmpty())
@@ -2646,7 +2644,7 @@ void XMLTextParagraphExport::exportTextLineBreak(
};
uno::Reference<text::XTextContent> xLineBreak;
- xPropSet->getPropertyValue("LineBreak") >>= xLineBreak;
+ xPropSet->getPropertyValue(u"LineBreak"_ustr) >>= xLineBreak;
if (!xLineBreak.is())
{
return;
@@ -2659,7 +2657,7 @@ void XMLTextParagraphExport::exportTextLineBreak(
}
sal_Int16 eClear{};
- xLineBreakProps->getPropertyValue("Clear") >>= eClear;
+ xLineBreakProps->getPropertyValue(u"Clear"_ustr) >>= eClear;
if (eClear >= 0 && o3tl::make_unsigned(eClear) < SAL_N_ELEMENTS(aLineBreakClears))
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_CLEAR,
@@ -2715,20 +2713,20 @@ void XMLTextParagraphExport::exportTextMark(
{
Reference<XPropertySet> bkmkProps(rPropSet->getPropertyValue(rProperty), UNO_QUERY);
Reference<XPropertySetInfo> bkmkPropInfo = bkmkProps->getPropertySetInfo();
- OUString sHidden("BookmarkHidden");
+ OUString sHidden(u"BookmarkHidden"_ustr);
if (bkmkPropInfo->hasPropertyByName(sHidden))
{
bool bHidden = false;
bkmkProps->getPropertyValue(sHidden) >>= bHidden;
if (bHidden)
{
- GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, "hidden", "true");
- OUString sCondition("BookmarkCondition");
+ GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, u"hidden"_ustr, u"true"_ustr);
+ OUString sCondition(u"BookmarkCondition"_ustr);
if (bkmkPropInfo->hasPropertyByName(sCondition))
{
OUString sBookmarkCondition;
bkmkProps->getPropertyValue(sCondition) >>= sBookmarkCondition;
- GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, "condition", sBookmarkCondition);
+ GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, u"condition"_ustr, sBookmarkCondition);
}
}
}
@@ -2748,7 +2746,7 @@ static bool lcl_txtpara_isBoundAsChar(
const Reference < XPropertySetInfo > & rPropSetInfo )
{
bool bIsBoundAsChar = false;
- OUString sAnchorType( "AnchorType" );
+ OUString sAnchorType( u"AnchorType"_ustr );
if( rPropSetInfo->hasPropertyByName( sAnchorType ) )
{
TextContentAnchorType eAnchor;
@@ -2882,9 +2880,9 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
rPropSet->getPropertyValue(gsRelativeHeight) >>= nRelHeight;
}
awt::Size aLayoutSize;
- if ((nRelWidth > 0 || nRelHeight > 0) && xPropSetInfo->hasPropertyByName("LayoutSize"))
+ if ((nRelWidth > 0 || nRelHeight > 0) && xPropSetInfo->hasPropertyByName(u"LayoutSize"_ustr))
{
- rPropSet->getPropertyValue("LayoutSize") >>= aLayoutSize;
+ rPropSet->getPropertyValue(u"LayoutSize"_ustr) >>= aLayoutSize;
}
bool bUseLayoutSize = true;
@@ -3019,7 +3017,7 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
sValue.makeStringAndClear() );
}
- OUString sZOrder( "ZOrder" );
+ OUString sZOrder( u"ZOrder"_ustr );
if( xPropSetInfo->hasPropertyByName( sZOrder ) )
{
sal_Int32 nZIndex = 0;
@@ -3031,8 +3029,8 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
}
}
- if (xPropSetInfo->hasPropertyByName("IsSplitAllowed")
- && rPropSet->getPropertyValue("IsSplitAllowed").get<bool>())
+ if (xPropSetInfo->hasPropertyByName(u"IsSplitAllowed"_ustr)
+ && rPropSet->getPropertyValue(u"IsSplitAllowed"_ustr).get<bool>())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_MAY_BREAK_BETWEEN_PAGES, XML_TRUE);
}
@@ -3408,7 +3406,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
{
// xlink:href
uno::Reference<graphic::XGraphic> xGraphic;
- rPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ rPropSet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
OUString sInternalURL;
OUString sOutMimeType;
@@ -3446,7 +3444,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
SvtSaveOptions::ODFSVER_013 <= GetExport().getSaneDefaultVersion()
? XML_NAMESPACE_DRAW
: XML_NAMESPACE_LO_EXT,
- "mime-type", sOutMimeType);
+ u"mime-type"_ustr, sOutMimeType);
}
}
@@ -3465,7 +3463,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
// replacement graphic for backwards compatibility, but
// only for SVG and metafiles currently
uno::Reference<graphic::XGraphic> xReplacementGraphic;
- rPropSet->getPropertyValue("ReplacementGraphic") >>= xReplacementGraphic;
+ rPropSet->getPropertyValue(u"ReplacementGraphic"_ustr) >>= xReplacementGraphic;
OUString sInternalURL;
OUString sOutMimeType;
@@ -3498,7 +3496,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
SvtSaveOptions::ODFSVER_013 <= GetExport().getSaneDefaultVersion()
? XML_NAMESPACE_DRAW
: XML_NAMESPACE_LO_EXT,
- "mime-type", sOutMimeType);
+ u"mime-type"_ustr, sOutMimeType);
}
}
@@ -3544,7 +3542,7 @@ void XMLTextParagraphExport::exportEvents( const Reference < XPropertySet > & rP
GetExport().GetEventExport().Export(xEventsSupp);
// image map
- if (rPropSet->getPropertySetInfo()->hasPropertyByName("ImageMap"))
+ if (rPropSet->getPropertySetInfo()->hasPropertyByName(u"ImageMap"_ustr))
GetExport().GetImageMapExport().Export( rPropSet );
}
@@ -3781,7 +3779,7 @@ void XMLTextParagraphExport::exportTextDeclarations()
OUString sUrl;
OUString sIndexAutoMarkFileURL(
- "IndexAutoMarkFileURL");
+ u"IndexAutoMarkFileURL"_ustr);
if (!xPropertySet->getPropertySetInfo()->hasPropertyByName(
sIndexAutoMarkFileURL))
return;
@@ -3891,7 +3889,7 @@ void XMLTextParagraphExport::exportRuby(
// ruby style
GetExport().CheckAttrList();
- OUString sStyleName(Find(XmlStyleFamily::TEXT_RUBY, rPropSet, ""));
+ OUString sStyleName(Find(XmlStyleFamily::TEXT_RUBY, rPropSet, u""_ustr));
SAL_WARN_IF(sStyleName.isEmpty(), "xmloff", "Can't find ruby style!");
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
XML_STYLE_NAME, sStyleName);
@@ -3950,7 +3948,7 @@ void XMLTextParagraphExport::exportMeta(
}
const Reference< XTextContent > xTextContent(
- i_xPortion->getPropertyValue("InContentMetadata"), UNO_QUERY_THROW);
+ i_xPortion->getPropertyValue(u"InContentMetadata"_ustr), UNO_QUERY_THROW);
const Reference< XEnumerationAccess > xEA( xTextContent, UNO_QUERY_THROW );
const Reference< XEnumeration > xTextEnum( xEA->createEnumeration() );
@@ -3984,7 +3982,7 @@ void XMLTextParagraphExport::ExportContentControl(
bExport = false;
}
- uno::Reference<text::XTextContent> xTextContent(xPortion->getPropertyValue("ContentControl"),
+ uno::Reference<text::XTextContent> xTextContent(xPortion->getPropertyValue(u"ContentControl"_ustr),
uno::UNO_QUERY_THROW);
uno::Reference<container::XEnumerationAccess> xEA(xTextContent, uno::UNO_QUERY_THROW);
uno::Reference<container::XEnumeration> xTextEnum = xEA->createEnumeration();
@@ -3993,7 +3991,7 @@ void XMLTextParagraphExport::ExportContentControl(
if (bExport)
{
bool bShowingPlaceHolder = false;
- xPropertySet->getPropertyValue("ShowingPlaceHolder") >>= bShowingPlaceHolder;
+ xPropertySet->getPropertyValue(u"ShowingPlaceHolder"_ustr) >>= bShowingPlaceHolder;
if (bShowingPlaceHolder)
{
OUStringBuffer aBuffer;
@@ -4003,7 +4001,7 @@ void XMLTextParagraphExport::ExportContentControl(
}
bool bCheckbox = false;
- xPropertySet->getPropertyValue("Checkbox") >>= bCheckbox;
+ xPropertySet->getPropertyValue(u"Checkbox"_ustr) >>= bCheckbox;
if (bCheckbox)
{
OUStringBuffer aBuffer;
@@ -4012,7 +4010,7 @@ void XMLTextParagraphExport::ExportContentControl(
}
bool bChecked = false;
- xPropertySet->getPropertyValue("Checked") >>= bChecked;
+ xPropertySet->getPropertyValue(u"Checked"_ustr) >>= bChecked;
if (bChecked)
{
OUStringBuffer aBuffer;
@@ -4021,21 +4019,21 @@ void XMLTextParagraphExport::ExportContentControl(
}
OUString aCheckedState;
- xPropertySet->getPropertyValue("CheckedState") >>= aCheckedState;
+ xPropertySet->getPropertyValue(u"CheckedState"_ustr) >>= aCheckedState;
if (!aCheckedState.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_CHECKED_STATE, aCheckedState);
}
OUString aUncheckedState;
- xPropertySet->getPropertyValue("UncheckedState") >>= aUncheckedState;
+ xPropertySet->getPropertyValue(u"UncheckedState"_ustr) >>= aUncheckedState;
if (!aUncheckedState.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_UNCHECKED_STATE, aUncheckedState);
}
bool bPicture = false;
- xPropertySet->getPropertyValue("Picture") >>= bPicture;
+ xPropertySet->getPropertyValue(u"Picture"_ustr) >>= bPicture;
if (bPicture)
{
OUStringBuffer aBuffer;
@@ -4045,7 +4043,7 @@ void XMLTextParagraphExport::ExportContentControl(
}
bool bDate = false;
- xPropertySet->getPropertyValue("Date") >>= bDate;
+ xPropertySet->getPropertyValue(u"Date"_ustr) >>= bDate;
if (bDate)
{
OUStringBuffer aBuffer;
@@ -4054,27 +4052,27 @@ void XMLTextParagraphExport::ExportContentControl(
}
OUString aDateFormat;
- xPropertySet->getPropertyValue("DateFormat") >>= aDateFormat;
+ xPropertySet->getPropertyValue(u"DateFormat"_ustr) >>= aDateFormat;
if (!aDateFormat.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_DATE_FORMAT, aDateFormat);
}
OUString aDateLanguage;
- xPropertySet->getPropertyValue("DateLanguage") >>= aDateLanguage;
+ xPropertySet->getPropertyValue(u"DateLanguage"_ustr) >>= aDateLanguage;
if (!aDateLanguage.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_DATE_RFC_LANGUAGE_TAG, aDateLanguage);
}
OUString aCurrentDate;
- xPropertySet->getPropertyValue("CurrentDate") >>= aCurrentDate;
+ xPropertySet->getPropertyValue(u"CurrentDate"_ustr) >>= aCurrentDate;
if (!aCurrentDate.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_CURRENT_DATE, aCurrentDate);
}
bool bPlainText = false;
- xPropertySet->getPropertyValue("PlainText") >>= bPlainText;
+ xPropertySet->getPropertyValue(u"PlainText"_ustr) >>= bPlainText;
if (bPlainText)
{
OUStringBuffer aBuffer;
@@ -4083,7 +4081,7 @@ void XMLTextParagraphExport::ExportContentControl(
}
bool bComboBox = false;
- xPropertySet->getPropertyValue("ComboBox") >>= bComboBox;
+ xPropertySet->getPropertyValue(u"ComboBox"_ustr) >>= bComboBox;
if (bComboBox)
{
OUStringBuffer aBuffer;
@@ -4092,7 +4090,7 @@ void XMLTextParagraphExport::ExportContentControl(
}
bool bDropDown = false;
- xPropertySet->getPropertyValue("DropDown") >>= bDropDown;
+ xPropertySet->getPropertyValue(u"DropDown"_ustr) >>= bDropDown;
if (bDropDown)
{
OUStringBuffer aBuffer;
@@ -4101,35 +4099,35 @@ void XMLTextParagraphExport::ExportContentControl(
}
OUString aAlias;
- xPropertySet->getPropertyValue("Alias") >>= aAlias;
+ xPropertySet->getPropertyValue(u"Alias"_ustr) >>= aAlias;
if (!aAlias.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_ALIAS, aAlias);
}
OUString aTag;
- xPropertySet->getPropertyValue("Tag") >>= aTag;
+ xPropertySet->getPropertyValue(u"Tag"_ustr) >>= aTag;
if (!aTag.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_TAG, aTag);
}
sal_Int32 nId = 0;
- xPropertySet->getPropertyValue("Id") >>= nId;
+ xPropertySet->getPropertyValue(u"Id"_ustr) >>= nId;
if (nId)
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_ID, OUString::number(nId));
}
sal_uInt32 nTabIndex = 0;
- if ((xPropertySet->getPropertyValue("TabIndex") >>= nTabIndex) && nTabIndex)
+ if ((xPropertySet->getPropertyValue(u"TabIndex"_ustr) >>= nTabIndex) && nTabIndex)
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_TAB_INDEX,
OUString::number(nTabIndex));
}
OUString aLock;
- xPropertySet->getPropertyValue("Lock") >>= aLock;
+ xPropertySet->getPropertyValue(u"Lock"_ustr) >>= aLock;
if (!aLock.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_LOCK, aLock);
@@ -4143,18 +4141,18 @@ void XMLTextParagraphExport::ExportContentControl(
{
// Export list items of dropdowns.
uno::Sequence<beans::PropertyValues> aListItems;
- xPropertySet->getPropertyValue("ListItems") >>= aListItems;
+ xPropertySet->getPropertyValue(u"ListItems"_ustr) >>= aListItems;
for (const auto& rListItem : aListItems)
{
comphelper::SequenceAsHashMap aMap(rListItem);
- auto it = aMap.find("DisplayText");
+ auto it = aMap.find(u"DisplayText"_ustr);
OUString aValue;
if (it != aMap.end() && (it->second >>= aValue) && !aValue.isEmpty())
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_DISPLAY_TEXT, aValue);
}
- it = aMap.find("Value");
+ it = aMap.find(u"Value"_ustr);
if (it != aMap.end() && (it->second >>= aValue))
{
GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_VALUE, aValue);
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 816bf8769999..5de1e3313a32 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -360,10 +360,10 @@ XMLImpHyperlinkContext_Impl::XMLImpHyperlinkContext_Impl(
{
if( IsXMLToken( sShow, XML_NEW ) )
mpHint->SetTargetFrameName(
- "_blank" );
+ u"_blank"_ustr );
else if( IsXMLToken( sShow, XML_REPLACE ) )
mpHint->SetTargetFrameName(
- "_self" );
+ u"_self"_ustr );
}
if ( mpHint->GetHRef().isEmpty() )
@@ -763,7 +763,7 @@ void XMLMetaImportContext::InsertMeta(
const uno::Reference<rdf::XMetadatable> xMeta(
XMLTextMarkImportContext::CreateAndInsertMark(
GetImport(),
- "com.sun.star.text.InContentMetadata",
+ u"com.sun.star.text.InContentMetadata"_ustr,
OUString(),
i_xInsertionRange, m_XmlId),
uno::UNO_QUERY);
@@ -834,7 +834,7 @@ void XMLMetaFieldImportContext::InsertMeta(
const Reference<XPropertySet> xPropertySet(
XMLTextMarkImportContext::CreateAndInsertMark(
GetImport(),
- "com.sun.star.text.textfield.MetadataField",
+ u"com.sun.star.text.textfield.MetadataField"_ustr,
OUString(),
i_xInsertionRange, m_XmlId),
UNO_QUERY);
@@ -850,8 +850,8 @@ void XMLMetaFieldImportContext::InsertMeta(
if (-1 != nKey)
{
- OUString sPropertyIsFixedLanguage("IsFixedLanguage");
- xPropertySet->setPropertyValue("NumberFormat", Any(nKey));
+ OUString sPropertyIsFixedLanguage(u"IsFixedLanguage"_ustr);
+ xPropertySet->setPropertyValue(u"NumberFormat"_ustr, Any(nKey));
if ( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
{
@@ -1027,7 +1027,7 @@ void XMLIndexMarkImportContext_Impl::ProcessAttribute(
case XML_ELEMENT(TEXT, XML_ALPHABETICAL_INDEX_MARK):
if ( aIter.getToken() == XML_ELEMENT(TEXT, XML_STRING_VALUE) )
{
- rPropSet->setPropertyValue("AlternativeText", uno::Any(aIter.toString()));
+ rPropSet->setPropertyValue(u"AlternativeText"_ustr, uno::Any(aIter.toString()));
}
// else: ignore!
break;
@@ -1153,7 +1153,7 @@ void XMLTOCMarkImportContext_Impl::ProcessAttribute(
&& nTmp < GetImport().GetTextImport()->
GetChapterNumbering()->getCount() )
{
- rPropSet->setPropertyValue("Level", uno::Any(static_cast<sal_Int16>(nTmp - 1)));
+ rPropSet->setPropertyValue(u"Level"_ustr, uno::Any(static_cast<sal_Int16>(nTmp - 1)));
}
// else: value out of range -> ignore
break;
@@ -1199,7 +1199,7 @@ void XMLUserIndexMarkImportContext_Impl::ProcessAttribute(
switch (aIter.getToken())
{
case XML_ELEMENT(TEXT, XML_INDEX_NAME):
- rPropSet->setPropertyValue("UserIndexName", uno::Any(aIter.toString()));
+ rPropSet->setPropertyValue(u"UserIndexName"_ustr, uno::Any(aIter.toString()));
break;
case XML_ELEMENT(TEXT, XML_OUTLINE_LEVEL):
{
@@ -1209,7 +1209,7 @@ void XMLUserIndexMarkImportContext_Impl::ProcessAttribute(
nTmp, aIter.toView(), 0,
GetImport().GetTextImport()->GetChapterNumbering()->getCount()))
{
- rPropSet->setPropertyValue("Level", uno::Any(static_cast<sal_Int16>(nTmp - 1)));
+ rPropSet->setPropertyValue(u"Level"_ustr, uno::Any(static_cast<sal_Int16>(nTmp - 1)));
}
// else: value out of range -> ignore
break;
@@ -1255,19 +1255,19 @@ void XMLAlphaIndexMarkImportContext_Impl::ProcessAttribute(
switch (aIter.getToken())
{
case XML_ELEMENT(TEXT, XML_KEY1):
- rPropSet->setPropertyValue("PrimaryKey", uno::Any(aIter.toString()));
+ rPropSet->setPropertyValue(u"PrimaryKey"_ustr, uno::Any(aIter.toString()));
break;
case XML_ELEMENT(TEXT, XML_KEY2):
- rPropSet->setPropertyValue("SecondaryKey", uno::Any(aIter.toString()));
+ rPropSet->setPropertyValue(u"SecondaryKey"_ustr, uno::Any(aIter.toString()));
break;
case XML_ELEMENT(TEXT, XML_KEY1_PHONETIC):
- rPropSet->setPropertyValue("PrimaryKeyReading", uno::Any(aIter.toString()));
+ rPropSet->setPropertyValue(u"PrimaryKeyReading"_ustr, uno::Any(aIter.toString()));
break;
case XML_ELEMENT(TEXT, XML_KEY2_PHONETIC):
- rPropSet->setPropertyValue("SecondaryKeyReading", uno::Any(aIter.toString()));
+ rPropSet->setPropertyValue(u"SecondaryKeyReading"_ustr, uno::Any(aIter.toString()));
break;
case XML_ELEMENT(TEXT, XML_STRING_VALUE_PHONETIC):
- rPropSet->setPropertyValue("TextReading", uno::Any(aIter.toString()));
+ rPropSet->setPropertyValue(u"TextReading"_ustr, uno::Any(aIter.toString()));
break;
case XML_ELEMENT(TEXT, XML_MAIN_ENTRY):
{
@@ -1277,7 +1277,7 @@ void XMLAlphaIndexMarkImportContext_Impl::ProcessAttribute(
if (::sax::Converter::convertBool(bTmp, aIter.toView()))
bMainEntry = bTmp;
- rPropSet->setPropertyValue("IsMainEntry", uno::Any(bMainEntry));
+ rPropSet->setPropertyValue(u"IsMainEntry"_ustr, uno::Any(bMainEntry));
break;
}
default:
@@ -1383,7 +1383,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLImpSpanContext_Impl
// field (StarCalc, StarDraw, ...)
Reference< beans::XPropertySet > xPropSet( rImport.GetTextImport()->GetCursor(), UNO_QUERY );
- if ( xPropSet->getPropertySetInfo()->hasPropertyByName( "HyperLinkURL" ) )
+ if ( xPropSet->getPropertySetInfo()->hasPropertyByName( u"HyperLinkURL"_ustr ) )
{
pContext = new XMLImpHyperlinkContext_Impl(
rImport,
@@ -1789,54 +1789,13 @@ void XMLParaContext::endFastElement(sal_Int32 )
true,
mbOutlineContentVisible);
- bool bEmptyHints = false;
- XMLHint_Impl* pMarkerStyleHint = nullptr;
- if (m_xHints)
- {
- uno::Reference<text::XTextRangeCompare> xCompare(xTxtImport->GetText(), uno::UNO_QUERY);
- if (xCompare.is())
- {
- try
- {
- for (const auto& pHint : m_xHints->GetHints())
- {
- if (xCompare->compareRegionStarts(pHint->GetStart(), pHint->GetEnd()) == 0)
- {
- bEmptyHints = true;
-
- // Is this the trailing empty span, defining the paragraph mark properties?
- // Convert it to the marker style, for backward compatibility with documents
- // created between commits 6249858a8972aef077e0249bd93cfe8f01bce4d6 and
- // 1a88efa8e02a6d765dab13c7110443bb9e6acecf, where the trailing empty spans
- // were used to store the marker formatting
- if (pHint->GetType() == XMLHintType::XML_HINT_STYLE
- && !m_aMarkerStyleName.hasValue()
- && xCompare->compareRegionStarts(pHint->GetStart(), xEnd) == 0)
- {
- if (auto pStyle = GetImport().GetTextImport()->FindAutoCharStyle(
- static_cast<XMLStyleHint_Impl*>(pHint.get())->GetStyleName()))
- {
- m_aMarkerStyleName = pStyle->GetAutoName();
- pMarkerStyleHint = pHint.get();
- }
- }
- }
- }
- }
- catch (const uno::Exception&)
- {
- TOOLS_WARN_EXCEPTION("xmloff.text", "");
- }
- }
- }
-
if (m_aMarkerStyleName.hasValue())
{
if (auto xPropSet = xStart.query<css::beans::XPropertySet>())
{
try
{
- xPropSet->setPropertyValue("ListAutoFormat", m_aMarkerStyleName);
+ xPropSet->setPropertyValue(u"ListAutoFormat"_ustr, m_aMarkerStyleName);
}
catch (const css::beans::UnknownPropertyException&)
{
@@ -1855,7 +1814,7 @@ void XMLParaContext::endFastElement(sal_Int32 )
if (bIsListHeader)
{
OUString sNumberingIsNumber
- ("NumberingIsNumber");
+ (u"NumberingIsNumber"_ustr);
if(xPropSet->getPropertySetInfo()->
hasPropertyByName(sNumberingIsNumber))
{
@@ -1866,9 +1825,9 @@ void XMLParaContext::endFastElement(sal_Int32 )
if (bIsRestart)
{
OUString sParaIsNumberingRestart
- ("ParaIsNumberingRestart");
+ (u"ParaIsNumberingRestart"_ustr);
OUString sNumberingStartValue
- ("NumberingStartValue");
+ (u"NumberingStartValue"_ustr);
if (xPropSet->getPropertySetInfo()->
hasPropertyByName(sParaIsNumberingRestart))
{
@@ -1889,6 +1848,24 @@ void XMLParaContext::endFastElement(sal_Int32 )
if (m_xHints)
{
+ bool bEmptyHints = false;
+ if (auto xCompare = xTxtImport->GetText().query<text::XTextRangeCompare>())
+ {
+ try
+ {
+ for (const auto& pHint : m_xHints->GetHints())
+ {
+ if (xCompare->compareRegionStarts(pHint->GetStart(), pHint->GetEnd()) == 0)
+ {
+ bEmptyHints = true;
+ }
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("xmloff.text", "");
+ }
+ }
bool bSetNoFormatAttr = false;
uno::Reference<beans::XPropertySet> xCursorProps(xAttrCursor, uno::UNO_QUERY);
if (bEmptyHints || m_aMarkerStyleName.hasValue())
@@ -1896,11 +1873,11 @@ void XMLParaContext::endFastElement(sal_Int32 )
// We have at least one empty hint, then make try to ask the cursor to not upgrade our character
// attributes to paragraph-level formatting, which would lead to incorrect rendering.
uno::Reference<beans::XPropertySetInfo> xCursorPropsInfo = xCursorProps->getPropertySetInfo();
- bSetNoFormatAttr = xCursorPropsInfo->hasPropertyByName("NoFormatAttr");
+ bSetNoFormatAttr = xCursorPropsInfo->hasPropertyByName(u"NoFormatAttr"_ustr);
}
if (bSetNoFormatAttr)
{
- xCursorProps->setPropertyValue("NoFormatAttr", uno::Any(true));
+ xCursorProps->setPropertyValue(u"NoFormatAttr"_ustr, uno::Any(true));
}
for (const auto & i : m_xHints->GetHints())
{
@@ -1910,7 +1887,6 @@ void XMLParaContext::endFastElement(sal_Int32 )
switch( pHint->GetType() )
{
case XMLHintType::XML_HINT_STYLE:
- if (pHint != pMarkerStyleHint) // already processed above
{
const OUString& rStyleName =
static_cast<XMLStyleHint_Impl *>(pHint)->GetStyleName();
@@ -1933,7 +1909,7 @@ void XMLParaContext::endFastElement(sal_Int32 )
// borrow from XMLTextMarkImportContext
XMLTextMarkImportContext::CreateAndInsertMark(
GetImport(),
- "com.sun.star.text.ReferenceMark",
+ u"com.sun.star.text.ReferenceMark"_ustr,
rRefName,
xAttrCursor);
}
@@ -1999,13 +1975,13 @@ void XMLParaContext::endFastElement(sal_Int32 )
TextContentAnchorType eAnchorType =
TextContentAnchorType_AT_PARAGRAPH;
{
- Any aAny = xPropSet->getPropertyValue( "AnchorType" );
+ Any aAny = xPropSet->getPropertyValue( u"AnchorType"_ustr );
aAny >>= eAnchorType;
}
if ( TextContentAnchorType_AT_CHARACTER == eAnchorType )
{
// set anchor position for at-character anchored objects
- xPropSet->setPropertyValue("TextRange", Any(xAttrCursor));
+ xPropSet->setPropertyValue(u"TextRange"_ustr, Any(xAttrCursor));
}
}
}
@@ -2026,13 +2002,13 @@ void XMLParaContext::endFastElement(sal_Int32 )
Reference < XPropertySet > xPropSet( xShape, UNO_QUERY );
TextContentAnchorType eAnchorType = TextContentAnchorType_AT_PARAGRAPH;
{
- Any aAny = xPropSet->getPropertyValue( "AnchorType" );
+ Any aAny = xPropSet->getPropertyValue( u"AnchorType"_ustr );
aAny >>= eAnchorType;
}
if ( TextContentAnchorType_AT_CHARACTER == eAnchorType )
{
// set anchor position for at-character anchored objects
- xPropSet->setPropertyValue("TextRange", Any(xAttrCursor));
+ xPropSet->setPropertyValue(u"TextRange"_ustr, Any(xAttrCursor));
}
}
}
@@ -2044,7 +2020,7 @@ void XMLParaContext::endFastElement(sal_Int32 )
}
if (bSetNoFormatAttr)
{
- xCursorProps->setPropertyValue("NoFormatAttr", uno::Any(false));
+ xCursorProps->setPropertyValue(u"NoFormatAttr"_ustr, uno::Any(false));
}
}
m_xHints.reset();
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index e4d552f5a5ba..6f1df66f68d5 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -233,6 +233,7 @@ SvXMLEnumMapEntry<sal_uInt16> const pXML_ParaVerticalAlign_Enum[] =
SvXMLEnumMapEntry<sal_uInt16> const pXML_ParaHyphenationKeepType_Enum[] =
{
+ { XML_ALWAYS, ParagraphHyphenationKeepType::ALWAYS },
{ XML_AUTO, ParagraphHyphenationKeepType::AUTO },
{ XML_COLUMN, ParagraphHyphenationKeepType::COLUMN },
{ XML_PAGE, ParagraphHyphenationKeepType::PAGE },
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index f5ff3aa4de6e..25cb36ef1b0d 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -346,7 +346,7 @@ XMLPropertyMapEntry constexpr aXMLParaPropMap[] =
MAP_EXT( PROP_ParaHyphenationZone, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_ZONE, XML_TYPE_NUMBER16_NONE|XML_TYPE_PROP_TEXT, 0 ),
MAP_EXT( PROP_ParaHyphenationCompoundMinLeadingChars, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_COMPOUND_REMAIN_CHAR_COUNT, XML_TYPE_NUMBER16_NO_ZERO|XML_TYPE_PROP_TEXT, 0 ),
MP_E( PROP_ParaHyphenationKeep, XML_NAMESPACE_FO, XML_HYPHENATION_KEEP, XML_TYPE_HYPHENATION_KEEP, 0 ),
- MAP_EXT( PROP_ParaHyphenationKeepType, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_KEEP_TYPE, XML_TYPE_HYPHENATION_KEEP_TYPE|XML_TYPE_PROP_TEXT, 0 ),
+ MAP_EXT( PROP_ParaHyphenationKeepType, XML_NAMESPACE_LO_EXT, XML_HYPHENATION_KEEP_TYPE, XML_TYPE_HYPHENATION_KEEP_TYPE|XML_TYPE_PROP_PARAGRAPH, 0 ),
// RES_PARATR_DROP
MP_E( PROP_DropCapWholeWord, XML_NAMESPACE_STYLE, XML_LENGTH, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_DROPCAPWHOLEWORD ),
MP_E( PROP_DropCapCharStyleName, XML_NAMESPACE_STYLE, XML_STYLE_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_DROPCAPCHARSTYLE ),
diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx
index 4f0cf13e84db..eba368134fe7 100644
--- a/xmloff/source/text/txtstyle.cxx
+++ b/xmloff/source/text/txtstyle.cxx
@@ -118,7 +118,7 @@ void XMLTextParagraphExport::exportTextStyles( bool bUsed, bool bProg )
Reference < lang::XMultiServiceFactory > xFactory (GetExport().GetModel(), UNO_QUERY);
if (xFactory.is())
{
- Reference < XPropertySet > xPropSet (xFactory->createInstance ( "com.sun.star.text.Defaults" ), UNO_QUERY);
+ Reference < XPropertySet > xPropSet (xFactory->createInstance ( u"com.sun.star.text.Defaults"_ustr ), UNO_QUERY);
if (xPropSet.is())
{
exportDefaultStyle( xPropSet, GetXMLToken(XML_PARAGRAPH), GetParaPropMapper());
@@ -140,13 +140,13 @@ void XMLTextParagraphExport::exportTextStyles( bool bUsed, bool bProg )
GetExport() ) );
}
}
- exportStyleFamily( "ParagraphStyles", GetXMLToken(XML_PARAGRAPH), GetParaPropMapper(),
+ exportStyleFamily( u"ParagraphStyles"_ustr, GetXMLToken(XML_PARAGRAPH), GetParaPropMapper(),
bUsed, XmlStyleFamily::TEXT_PARAGRAPH);
- exportStyleFamily( "CharacterStyles", GetXMLToken(XML_TEXT), GetTextPropMapper(),
+ exportStyleFamily( u"CharacterStyles"_ustr, GetXMLToken(XML_TEXT), GetTextPropMapper(),
bUsed, XmlStyleFamily::TEXT_TEXT );
// get shape export to make sure the frame family is added correctly.
GetExport().GetShapeExport();
- exportStyleFamily( "FrameStyles", XML_STYLE_FAMILY_SD_GRAPHICS_NAME, m_xFramePropMapper,
+ exportStyleFamily( u"FrameStyles"_ustr, XML_STYLE_FAMILY_SD_GRAPHICS_NAME, m_xFramePropMapper,
bUsed, XmlStyleFamily::TEXT_FRAME);
exportNumStyles( bUsed );
if( !IsBlockMode() )
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index bf4893479d4a..055693d1c071 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -206,10 +206,10 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite )
sal_uInt16 nCategory = ParagraphStyleCategory::TEXT;
if( XmlStyleFamily::TEXT_PARAGRAPH == GetFamily() &&
!m_sCategoryVal.isEmpty() && xStyle->isUserDefined() &&
- xPropSetInfo->hasPropertyByName("Category") &&
+ xPropSetInfo->hasPropertyByName(u"Category"_ustr) &&
SvXMLUnitConverter::convertEnum( nCategory, m_sCategoryVal, aCategoryMap))
{
- xPropSet->setPropertyValue("Category", Any(static_cast<sal_Int16>(nCategory)));
+ xPropSet->setPropertyValue(u"Category"_ustr, Any(static_cast<sal_Int16>(nCategory)));
}
// tell the style about it's events (if applicable)
@@ -238,7 +238,7 @@ void XMLTextStyleContext::SetDefaults( )
Reference < XMultiServiceFactory > xFactory ( GetImport().GetModel(), UNO_QUERY);
if (xFactory.is())
{
- Reference < XInterface > xInt = xFactory->createInstance( "com.sun.star.text.Defaults" );
+ Reference < XInterface > xInt = xFactory->createInstance( u"com.sun.star.text.Defaults"_ustr );
Reference < XPropertySet > xProperties ( xInt, UNO_QUERY );
if ( xProperties.is() )
FillPropertySet ( xProperties );
@@ -330,7 +330,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
if (m_aListLevel.has_value())
{
- xPropSet->setPropertyValue("NumberingLevel", uno::Any(*m_aListLevel));
+ xPropSet->setPropertyValue(u"NumberingLevel"_ustr, uno::Any(*m_aListLevel));
}
}
}
@@ -346,9 +346,9 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
GetImport().GetTextImport()->GetTextStyles();
if( rTextStyles.is() &&
rTextStyles->hasByName( sDisplayDropCapTextStyleName ) &&
- xPropSetInfo->hasPropertyByName("DropCapCharStyleName"))
+ xPropSetInfo->hasPropertyByName(u"DropCapCharStyleName"_ustr))
{
- xPropSet->setPropertyValue("DropCapCharStyleName", Any(sDisplayDropCapTextStyleName));
+ xPropSet->setPropertyValue(u"DropCapCharStyleName"_ustr, Any(sDisplayDropCapTextStyleName));
}
}
@@ -434,8 +434,8 @@ void XMLTextStyleContext::FillPropertySet(
if( GetAutoName().hasValue() )
{
OUString sAutoProp = ( GetFamily() == XmlStyleFamily::TEXT_TEXT ) ?
- OUString( "CharAutoStyleName" ):
- OUString( "ParaAutoStyleName" );
+ u"CharAutoStyleName"_ustr:
+ u"ParaAutoStyleName"_ustr;
try
{
@@ -488,7 +488,7 @@ void XMLTextStyleContext::FillPropertySet(
// border-model: same
if(IsDefaultStyle() && XmlStyleFamily::TABLE_ROW == GetFamily())
{
- OUString sIsSplitAllowed("IsSplitAllowed");
+ OUString sIsSplitAllowed(u"IsSplitAllowed"_ustr);
SAL_WARN_IF( !rPropSet->getPropertySetInfo()->hasPropertyByName( sIsSplitAllowed ), "xmloff", "property missing?" );
rPropSet->setPropertyValue(
sIsSplitAllowed,
@@ -497,7 +497,7 @@ void XMLTextStyleContext::FillPropertySet(
if(IsDefaultStyle() && XmlStyleFamily::TABLE_TABLE == GetFamily())
{
- OUString sCollapsingBorders("CollapsingBorders");
+ OUString sCollapsingBorders(u"CollapsingBorders"_ustr);
SAL_WARN_IF( !rPropSet->getPropertySetInfo()->hasPropertyByName( sCollapsingBorders ), "xmloff", "property missing?" );
rPropSet->setPropertyValue(
sCollapsingBorders,
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 4b02d4b8107e..2280c2912371 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -191,17 +191,17 @@ void XMLVarFieldImportContext::PrepareField(
if (bSetDescription && bDescriptionOK)
{
- xPropertySet->setPropertyValue("Hint", Any(sDescription));
+ xPropertySet->setPropertyValue(u"Hint"_ustr, Any(sDescription));
}
if (bSetHelp && bHelpOK)
{
- xPropertySet->setPropertyValue("Help", Any(sHelp));
+ xPropertySet->setPropertyValue(u"Help"_ustr, Any(sHelp));
}
if (bSetHint && bHintOK)
{
- xPropertySet->setPropertyValue("Tooltip", Any(sHint));
+ xPropertySet->setPropertyValue(u"Tooltip"_ustr, Any(sHint));
}
if (bSetVisible && bDisplayOK)
@@ -212,7 +212,7 @@ void XMLVarFieldImportContext::PrepareField(
// workaround for #no-bug#: display formula by default
if (xPropertySet->getPropertySetInfo()->
- hasPropertyByName("IsShowFormula") &&
+ hasPropertyByName(u"IsShowFormula"_ustr) &&
!bSetDisplayFormula)
{
bDisplayFormula = false;
@@ -223,7 +223,7 @@ void XMLVarFieldImportContext::PrepareField(
if (bSetDisplayFormula)
{
bool bTmp = bDisplayFormula && bDisplayOK;
- xPropertySet->setPropertyValue("IsShowFormula", Any(bTmp));
+ xPropertySet->setPropertyValue(u"IsShowFormula"_ustr, Any(bTmp));
}
// delegate to value helper
@@ -378,7 +378,7 @@ void XMLSequenceFieldImportContext::PrepareField(
// handle reference name
if (bRefNameOK)
{
- Any aAny = xPropertySet->getPropertyValue("SequenceValue");
+ Any aAny = xPropertySet->getPropertyValue(u"SequenceValue"_ustr);
sal_Int16 nValue = 0;
aAny >>= nValue;
GetImportHelper().InsertSequenceID(sRefName, GetName(), nValue);
@@ -438,7 +438,7 @@ void XMLVariableInputFieldImportContext::PrepareField(
{
// set type (input field)
Any aAny;
- xPropertySet->setPropertyValue("Input", Any(true));
+ xPropertySet->setPropertyValue(u"Input"_ustr, Any(true));
// set type
aAny <<= (IsStringValue()? SetVariableType::STRING : SetVariableType::VAR);
@@ -472,7 +472,7 @@ XMLUserFieldImportContext::XMLUserFieldImportContext(
// bug: doesn't work (SO API lacking)
XMLUserFieldInputImportContext::XMLUserFieldInputImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLVarFieldImportContext(rImport, rHlp, "InputUser",
+ XMLVarFieldImportContext(rImport, rHlp, u"InputUser"_ustr,
// description, style
false, false,
true, false, false,
@@ -550,7 +550,7 @@ void XMLExpressionFieldImportContext::PrepareField(
XMLTextInputFieldImportContext::XMLTextInputFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp) :
- XMLVarFieldImportContext(rImport, rHlp, "Input",
+ XMLVarFieldImportContext(rImport, rHlp, u"Input"_ustr,
// description
false, false,
true, true, true,
@@ -576,7 +576,7 @@ void XMLTextInputFieldImportContext::PrepareField(
XMLTableFormulaImportContext::XMLTableFormulaImportContext(
SvXMLImport& rImport,
XMLTextImportHelper& rHlp) :
- XMLTextFieldImportContext(rImport, rHlp, "TableFormula"),
+ XMLTextFieldImportContext(rImport, rHlp, u"TableFormula"_ustr),
aValueHelper(rImport, rHlp, false, true, false, true),
bIsShowFormula(false)
{
@@ -616,10 +616,10 @@ void XMLTableFormulaImportContext::PrepareField(
Any aAny;
// set 'show formula' and presentation
- xPropertySet->setPropertyValue( "IsShowFormula", Any(bIsShowFormula) );
+ xPropertySet->setPropertyValue( u"IsShowFormula"_ustr, Any(bIsShowFormula) );
aAny <<= GetContent();
- xPropertySet->setPropertyValue( "CurrentPresentation", aAny );
+ xPropertySet->setPropertyValue( u"CurrentPresentation"_ustr, aAny );
}
@@ -744,13 +744,13 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext(
switch (eVarType)
{
case VarTypeSequence:
- xFieldMaster->setPropertyValue("ChapterNumberingLevel", Any(nNumLevel));
+ xFieldMaster->setPropertyValue(u"ChapterNumberingLevel"_ustr, Any(nNumLevel));
if (nNumLevel >= 0)
{
OUString sStr(&cSeparationChar, 1);
xFieldMaster->setPropertyValue(
- "NumberingSeparator", Any(sStr));
+ u"NumberingSeparator"_ustr, Any(sStr));
}
break;
case VarTypeSimple:
@@ -766,7 +766,7 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext(
case VarTypeUserField:
{
bool bTmp = !aValueHelper.IsStringValue();
- xFieldMaster->setPropertyValue("IsExpression", Any(bTmp));
+ xFieldMaster->setPropertyValue(u"IsExpression"_ustr, Any(bTmp));
aValueHelper.PrepareField(xFieldMaster);
break;
}
@@ -870,7 +870,7 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
xMaster.set(xIfc, UNO_QUERY);
// set name
- xMaster->setPropertyValue("Name", Any(sName));
+ xMaster->setPropertyValue(u"Name"_ustr, Any(sName));
if (eVarType != VarTypeUserField) {
// set subtype for setexp field
@@ -955,10 +955,10 @@ void XMLDatabaseDisplayImportContext::endFastElement(sal_Int32 )
// create and prepare field master first
if (CreateField(xMaster,
- "com.sun.star.text.FieldMaster.Database"))
+ u"com.sun.star.text.FieldMaster.Database"_ustr))
{
Any aAny;
- xMaster->setPropertyValue("DataColumnName", Any(sColumnName));
+ xMaster->setPropertyValue(u"DataColumnName"_ustr, Any(sColumnName));
// fieldmaster takes database, table and column name
XMLDatabaseFieldImportContext::PrepareField(xMaster);
@@ -986,7 +986,7 @@ void XMLDatabaseDisplayImportContext::endFastElement(sal_Int32 )
// prepare field: format from database?
bool bTmp = !aValueHelper.IsFormatOK();
- xField->setPropertyValue("DataBaseFormat", Any(bTmp));
+ xField->setPropertyValue(u"DataBaseFormat"_ustr, Any(bTmp));
// value, value-type and format done by value helper
aValueHelper.PrepareField(xField);
@@ -1220,10 +1220,10 @@ void XMLValueImportHelper::PrepareField(
xPropertySet->setPropertyValue(sAPI_number_format, Any(nFormatKey));
if( xPropertySet->getPropertySetInfo()->
- hasPropertyByName( "IsFixedLanguage" ) )
+ hasPropertyByName( u"IsFixedLanguage"_ustr ) )
{
bool bIsFixedLanguage = ! bIsDefaultLanguage;
- xPropertySet->setPropertyValue( "IsFixedLanguage", Any(bIsFixedLanguage) );
+ xPropertySet->setPropertyValue( u"IsFixedLanguage"_ustr, Any(bIsFixedLanguage) );
}
}
@@ -1237,7 +1237,7 @@ void XMLValueImportHelper::PrepareField(
}
else
{
- xPropertySet->setPropertyValue("Value", Any(fValue));
+ xPropertySet->setPropertyValue(u"Value"_ustr, Any(fValue));
}
}
}
diff --git a/xmloff/source/text/xmlcontentcontrolcontext.cxx b/xmloff/source/text/xmlcontentcontrolcontext.cxx
index 2a7ef5b2eebe..364cb79cdc30 100644
--- a/xmloff/source/text/xmlcontentcontrolcontext.cxx
+++ b/xmloff/source/text/xmlcontentcontrolcontext.cxx
@@ -197,7 +197,7 @@ void XMLContentControlContext::endFastElement(sal_Int32)
uno::Reference<text::XTextContent> xContentControl
= XMLTextMarkImportContext::CreateAndInsertMark(
- GetImport(), "com.sun.star.text.ContentControl", OUString(), xInsertionCursor);
+ GetImport(), u"com.sun.star.text.ContentControl"_ustr, OUString(), xInsertionCursor);
if (!xContentControl.is())
{
SAL_WARN("xmloff.text", "cannot insert content control");
@@ -212,91 +212,91 @@ void XMLContentControlContext::endFastElement(sal_Int32)
if (m_bShowingPlaceHolder)
{
- xPropertySet->setPropertyValue("ShowingPlaceHolder", uno::Any(m_bShowingPlaceHolder));
+ xPropertySet->setPropertyValue(u"ShowingPlaceHolder"_ustr, uno::Any(m_bShowingPlaceHolder));
}
if (m_bCheckbox)
{
- xPropertySet->setPropertyValue("Checkbox", uno::Any(m_bCheckbox));
+ xPropertySet->setPropertyValue(u"Checkbox"_ustr, uno::Any(m_bCheckbox));
}
if (m_bChecked)
{
- xPropertySet->setPropertyValue("Checked", uno::Any(m_bChecked));
+ xPropertySet->setPropertyValue(u"Checked"_ustr, uno::Any(m_bChecked));
}
if (!m_aCheckedState.isEmpty())
{
- xPropertySet->setPropertyValue("CheckedState", uno::Any(m_aCheckedState));
+ xPropertySet->setPropertyValue(u"CheckedState"_ustr, uno::Any(m_aCheckedState));
}
if (!m_aUncheckedState.isEmpty())
{
- xPropertySet->setPropertyValue("UncheckedState", uno::Any(m_aUncheckedState));
+ xPropertySet->setPropertyValue(u"UncheckedState"_ustr, uno::Any(m_aUncheckedState));
}
if (!m_aListItems.empty())
{
- xPropertySet->setPropertyValue("ListItems",
+ xPropertySet->setPropertyValue(u"ListItems"_ustr,
uno::Any(comphelper::containerToSequence(m_aListItems)));
}
if (m_bPicture)
{
- xPropertySet->setPropertyValue("Picture", uno::Any(m_bPicture));
+ xPropertySet->setPropertyValue(u"Picture"_ustr, uno::Any(m_bPicture));
}
if (m_bDate)
{
- xPropertySet->setPropertyValue("Date", uno::Any(m_bDate));
+ xPropertySet->setPropertyValue(u"Date"_ustr, uno::Any(m_bDate));
}
if (!m_aDateFormat.isEmpty())
{
- xPropertySet->setPropertyValue("DateFormat", uno::Any(m_aDateFormat));
+ xPropertySet->setPropertyValue(u"DateFormat"_ustr, uno::Any(m_aDateFormat));
}
if (!m_aDateLanguage.isEmpty())
{
- xPropertySet->setPropertyValue("DateLanguage", uno::Any(m_aDateLanguage));
+ xPropertySet->setPropertyValue(u"DateLanguage"_ustr, uno::Any(m_aDateLanguage));
}
if (!m_aCurrentDate.isEmpty())
{
- xPropertySet->setPropertyValue("CurrentDate", uno::Any(m_aCurrentDate));
+ xPropertySet->setPropertyValue(u"CurrentDate"_ustr, uno::Any(m_aCurrentDate));
}
if (m_bPlainText)
{
- xPropertySet->setPropertyValue("PlainText", uno::Any(m_bPlainText));
+ xPropertySet->setPropertyValue(u"PlainText"_ustr, uno::Any(m_bPlainText));
}
if (m_bComboBox)
{
- xPropertySet->setPropertyValue("ComboBox", uno::Any(m_bComboBox));
+ xPropertySet->setPropertyValue(u"ComboBox"_ustr, uno::Any(m_bComboBox));
}
if (m_bDropDown)
{
- xPropertySet->setPropertyValue("DropDown", uno::Any(m_bDropDown));
+ xPropertySet->setPropertyValue(u"DropDown"_ustr, uno::Any(m_bDropDown));
}
if (!m_aAlias.isEmpty())
{
- xPropertySet->setPropertyValue("Alias", uno::Any(m_aAlias));
+ xPropertySet->setPropertyValue(u"Alias"_ustr, uno::Any(m_aAlias));
}
if (!m_aTag.isEmpty())
{
- xPropertySet->setPropertyValue("Tag", uno::Any(m_aTag));
+ xPropertySet->setPropertyValue(u"Tag"_ustr, uno::Any(m_aTag));
}
if (m_nId)
{
- xPropertySet->setPropertyValue("Id", uno::Any(m_nId));
+ xPropertySet->setPropertyValue(u"Id"_ustr, uno::Any(m_nId));
}
if (m_nTabIndex)
{
- xPropertySet->setPropertyValue("TabIndex", uno::Any(m_nTabIndex));
+ xPropertySet->setPropertyValue(u"TabIndex"_ustr, uno::Any(m_nTabIndex));
}
if (!m_aLock.isEmpty())
{
- xPropertySet->setPropertyValue("Lock", uno::Any(m_aLock));
+ xPropertySet->setPropertyValue(u"Lock"_ustr, uno::Any(m_aLock));
}
}
@@ -360,8 +360,8 @@ void XMLListItemContext::startFastElement(
}
uno::Sequence<beans::PropertyValue> aListItem = {
- comphelper::makePropertyValue("DisplayText", uno::Any(aDisplayText)),
- comphelper::makePropertyValue("Value", uno::Any(aValue)),
+ comphelper::makePropertyValue(u"DisplayText"_ustr, uno::Any(aDisplayText)),
+ comphelper::makePropertyValue(u"Value"_ustr, uno::Any(aValue)),
};
m_rContentControl.AppendListItem(aListItem);
}
diff --git a/xmloff/source/text/xmllinebreakcontext.cxx b/xmloff/source/text/xmllinebreakcontext.cxx
index 67b56c2d32c8..e79056cda716 100644
--- a/xmloff/source/text/xmllinebreakcontext.cxx
+++ b/xmloff/source/text/xmllinebreakcontext.cxx
@@ -44,14 +44,14 @@ void SvXMLLineBreakContext::startFastElement(
return;
uno::Reference<text::XTextContent> xLineBreak(
- xFactory->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.text.LineBreak"_ustr), uno::UNO_QUERY);
sal_Int16 eClear = 0;
OUString aClear = xAttrList->getValue(XML_ELEMENT(LO_EXT, XML_CLEAR));
if (SvXMLUnitConverter::convertEnum(eClear, aClear, pXML_LineBreakClear_Enum))
{
uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
- xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+ xLineBreakProps->setPropertyValue(u"Clear"_ustr, uno::Any(eClear));
}
m_rHelper.InsertTextContent(xLineBreak);
diff --git a/xmloff/source/transform/DocumentTContext.cxx b/xmloff/source/transform/DocumentTContext.cxx
index a5d12a416c23..9864a8ea32bf 100644
--- a/xmloff/source/transform/DocumentTContext.cxx
+++ b/xmloff/source/transform/DocumentTContext.cxx
@@ -99,7 +99,7 @@ void XMLDocumentTransformerContext::StartElement( const Reference< XAttributeLis
{
Reference< XPropertySetInfo > xPropSetInfo(
rPropSet->getPropertySetInfo() );
- OUString aPropName("Class");
+ OUString aPropName(u"Class"_ustr);
if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName( aPropName ) )
{
Any aAny = rPropSet->getPropertyValue( aPropName );
diff --git a/xmloff/source/transform/EventMap.cxx b/xmloff/source/transform/EventMap.cxx
index 3cfa08a15db0..d509de7352b9 100644
--- a/xmloff/source/transform/EventMap.cxx
+++ b/xmloff/source/transform/EventMap.cxx
@@ -23,81 +23,81 @@
XMLTransformerEventMapEntry const aTransformerEventMap[] =
{
- { XML_NAMESPACE_DOM, "select", "on-select" },
- { XML_NAMESPACE_OFFICE, "insert-start", "on-insert-start" },
- { XML_NAMESPACE_OFFICE, "insert-done", "on-insert-done" },
- { XML_NAMESPACE_OFFICE, "mail-merge", "on-mail-merge" },
- { XML_NAMESPACE_OFFICE, "alpha-char-input", "on-alpha-char-input" },
- { XML_NAMESPACE_OFFICE, "non-alpha-char-input", "on-non-alpha-char-input" },
- { XML_NAMESPACE_DOM, "resize", "on-resize" },
- { XML_NAMESPACE_OFFICE, "move", "on-move" },
- { XML_NAMESPACE_OFFICE, "page-count-change", "on-page-count-change" },
- { XML_NAMESPACE_DOM, "mouseover", "on-mouse-over" },
- { XML_NAMESPACE_DOM, "click", "on-click" },
- { XML_NAMESPACE_DOM, "mouseout", "on-mouse-out" },
- { XML_NAMESPACE_OFFICE, "load-error", "on-load-error" },
- { XML_NAMESPACE_OFFICE, "load-cancel", "on-load-cancel" },
- { XML_NAMESPACE_OFFICE, "load-done", "on-load-done" },
- { XML_NAMESPACE_DOM, "load", "on-load" },
- { XML_NAMESPACE_DOM, "unload", "on-unload" },
- { XML_NAMESPACE_OFFICE, "start-app", "on-start-app" },
- { XML_NAMESPACE_OFFICE, "close-app", "on-close-app" },
- { XML_NAMESPACE_OFFICE, "new", "on-new" },
- { XML_NAMESPACE_OFFICE, "save", "on-save" },
- { XML_NAMESPACE_OFFICE, "save-as", "on-save-as" },
- { XML_NAMESPACE_DOM, "DOMFocusIn", "on-focus" },
- { XML_NAMESPACE_DOM, "DOMFocusOut", "on-unfocus" },
- { XML_NAMESPACE_OFFICE, "print", "on-print" },
- { XML_NAMESPACE_DOM, "error", "on-error" },
- { XML_NAMESPACE_OFFICE, "load-finished", "on-load-finished" },
- { XML_NAMESPACE_OFFICE, "save-finished", "on-save-finished" },
- { XML_NAMESPACE_OFFICE, "modify-changed", "on-modify-changed" },
- { XML_NAMESPACE_OFFICE, "prepare-unload", "on-prepare-unload" },
- { XML_NAMESPACE_OFFICE, "new-mail", "on-new-mail" },
- { XML_NAMESPACE_OFFICE, "toggle-fullscreen", "on-toggle-fullscreen" },
- { XML_NAMESPACE_OFFICE, "save-done", "on-save-done" },
- { XML_NAMESPACE_OFFICE, "save-as-done", "on-save-as-done" },
- { XML_NAMESPACE_OFFICE, "create", "on-create" },
- { XML_NAMESPACE_OFFICE, "save-as-failed", "on-save-as-failed" },
- { XML_NAMESPACE_OFFICE, "save-failed", "on-save-failed" },
- { XML_NAMESPACE_OFFICE, "copy-to-failed", "on-copy-to-failed" },
- { XML_NAMESPACE_OFFICE, "title-changed", "on-title-changed" },
+ { XML_NAMESPACE_DOM, u"select"_ustr, u"on-select"_ustr },
+ { XML_NAMESPACE_OFFICE, u"insert-start"_ustr, u"on-insert-start"_ustr },
+ { XML_NAMESPACE_OFFICE, u"insert-done"_ustr, u"on-insert-done"_ustr },
+ { XML_NAMESPACE_OFFICE, u"mail-merge"_ustr, u"on-mail-merge"_ustr },
+ { XML_NAMESPACE_OFFICE, u"alpha-char-input"_ustr, u"on-alpha-char-input"_ustr },
+ { XML_NAMESPACE_OFFICE, u"non-alpha-char-input"_ustr, u"on-non-alpha-char-input"_ustr },
+ { XML_NAMESPACE_DOM, u"resize"_ustr, u"on-resize"_ustr },
+ { XML_NAMESPACE_OFFICE, u"move"_ustr, u"on-move"_ustr },
+ { XML_NAMESPACE_OFFICE, u"page-count-change"_ustr, u"on-page-count-change"_ustr },
+ { XML_NAMESPACE_DOM, u"mouseover"_ustr, u"on-mouse-over"_ustr },
+ { XML_NAMESPACE_DOM, u"click"_ustr, u"on-click"_ustr },
+ { XML_NAMESPACE_DOM, u"mouseout"_ustr, u"on-mouse-out"_ustr },
+ { XML_NAMESPACE_OFFICE, u"load-error"_ustr, u"on-load-error"_ustr },
+ { XML_NAMESPACE_OFFICE, u"load-cancel"_ustr, u"on-load-cancel"_ustr },
+ { XML_NAMESPACE_OFFICE, u"load-done"_ustr, u"on-load-done"_ustr },
+ { XML_NAMESPACE_DOM, u"load"_ustr, u"on-load"_ustr },
+ { XML_NAMESPACE_DOM, u"unload"_ustr, u"on-unload"_ustr },
+ { XML_NAMESPACE_OFFICE, u"start-app"_ustr, u"on-start-app"_ustr },
+ { XML_NAMESPACE_OFFICE, u"close-app"_ustr, u"on-close-app"_ustr },
+ { XML_NAMESPACE_OFFICE, u"new"_ustr, u"on-new"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save"_ustr, u"on-save"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-as"_ustr, u"on-save-as"_ustr },
+ { XML_NAMESPACE_DOM, u"DOMFocusIn"_ustr, u"on-focus"_ustr },
+ { XML_NAMESPACE_DOM, u"DOMFocusOut"_ustr, u"on-unfocus"_ustr },
+ { XML_NAMESPACE_OFFICE, u"print"_ustr, u"on-print"_ustr },
+ { XML_NAMESPACE_DOM, u"error"_ustr, u"on-error"_ustr },
+ { XML_NAMESPACE_OFFICE, u"load-finished"_ustr, u"on-load-finished"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-finished"_ustr, u"on-save-finished"_ustr },
+ { XML_NAMESPACE_OFFICE, u"modify-changed"_ustr, u"on-modify-changed"_ustr },
+ { XML_NAMESPACE_OFFICE, u"prepare-unload"_ustr, u"on-prepare-unload"_ustr },
+ { XML_NAMESPACE_OFFICE, u"new-mail"_ustr, u"on-new-mail"_ustr },
+ { XML_NAMESPACE_OFFICE, u"toggle-fullscreen"_ustr, u"on-toggle-fullscreen"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-done"_ustr, u"on-save-done"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-as-done"_ustr, u"on-save-as-done"_ustr },
+ { XML_NAMESPACE_OFFICE, u"create"_ustr, u"on-create"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-as-failed"_ustr, u"on-save-as-failed"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-failed"_ustr, u"on-save-failed"_ustr },
+ { XML_NAMESPACE_OFFICE, u"copy-to-failed"_ustr, u"on-copy-to-failed"_ustr },
+ { XML_NAMESPACE_OFFICE, u"title-changed"_ustr, u"on-title-changed"_ustr },
- { XML_NAMESPACE_FORM, "approveaction", "on-approveaction" },
- { XML_NAMESPACE_FORM, "performaction", "on-performaction" },
- { XML_NAMESPACE_DOM, "change", "on-change" },
- { XML_NAMESPACE_FORM, "textchange", "on-textchange" },
- { XML_NAMESPACE_FORM, "itemstatechange", "on-itemstatechange" },
- { XML_NAMESPACE_DOM, "keydown", "on-keydown" },
- { XML_NAMESPACE_DOM, "keyup", "on-keyup" },
- { XML_NAMESPACE_FORM, "mousedrag", "on-mousedrag" },
- { XML_NAMESPACE_DOM, "mousemove", "on-mousemove" },
- { XML_NAMESPACE_DOM, "mousedown", "on-mousedown" },
- { XML_NAMESPACE_DOM, "mouseup", "on-mouseup" },
- { XML_NAMESPACE_FORM, "approvereset", "on-approvereset" },
- { XML_NAMESPACE_DOM, "reset", "on-reset" },
- { XML_NAMESPACE_DOM, "submit", "on-submit" },
- { XML_NAMESPACE_FORM, "approveupdate", "on-approveupdate" },
- { XML_NAMESPACE_FORM, "update", "on-update" },
- { XML_NAMESPACE_FORM, "startreload", "on-startreload" },
- { XML_NAMESPACE_FORM, "reload", "on-reload" },
- { XML_NAMESPACE_FORM, "startunload", "on-startunload" },
- { XML_NAMESPACE_FORM, "confirmdelete", "on-confirmdelete" },
- { XML_NAMESPACE_FORM, "approverowchange", "on-approverowchange" },
- { XML_NAMESPACE_FORM, "rowchange", "on-rowchange" },
- { XML_NAMESPACE_FORM, "approvecursormove", "on-approvecursormove" },
- { XML_NAMESPACE_FORM, "cursormove", "on-cursormove" },
- { XML_NAMESPACE_FORM, "supplyparameter", "on-supplyparameter" },
- { XML_NAMESPACE_FORM, "adjust", "on-adjust" },
- { 0, nullptr, nullptr }
+ { XML_NAMESPACE_FORM, u"approveaction"_ustr, u"on-approveaction"_ustr },
+ { XML_NAMESPACE_FORM, u"performaction"_ustr, u"on-performaction"_ustr },
+ { XML_NAMESPACE_DOM, u"change"_ustr, u"on-change"_ustr },
+ { XML_NAMESPACE_FORM, u"textchange"_ustr, u"on-textchange"_ustr },
+ { XML_NAMESPACE_FORM, u"itemstatechange"_ustr, u"on-itemstatechange"_ustr },
+ { XML_NAMESPACE_DOM, u"keydown"_ustr, u"on-keydown"_ustr },
+ { XML_NAMESPACE_DOM, u"keyup"_ustr, u"on-keyup"_ustr },
+ { XML_NAMESPACE_FORM, u"mousedrag"_ustr, u"on-mousedrag"_ustr },
+ { XML_NAMESPACE_DOM, u"mousemove"_ustr, u"on-mousemove"_ustr },
+ { XML_NAMESPACE_DOM, u"mousedown"_ustr, u"on-mousedown"_ustr },
+ { XML_NAMESPACE_DOM, u"mouseup"_ustr, u"on-mouseup"_ustr },
+ { XML_NAMESPACE_FORM, u"approvereset"_ustr, u"on-approvereset"_ustr },
+ { XML_NAMESPACE_DOM, u"reset"_ustr, u"on-reset"_ustr },
+ { XML_NAMESPACE_DOM, u"submit"_ustr, u"on-submit"_ustr },
+ { XML_NAMESPACE_FORM, u"approveupdate"_ustr, u"on-approveupdate"_ustr },
+ { XML_NAMESPACE_FORM, u"update"_ustr, u"on-update"_ustr },
+ { XML_NAMESPACE_FORM, u"startreload"_ustr, u"on-startreload"_ustr },
+ { XML_NAMESPACE_FORM, u"reload"_ustr, u"on-reload"_ustr },
+ { XML_NAMESPACE_FORM, u"startunload"_ustr, u"on-startunload"_ustr },
+ { XML_NAMESPACE_FORM, u"confirmdelete"_ustr, u"on-confirmdelete"_ustr },
+ { XML_NAMESPACE_FORM, u"approverowchange"_ustr, u"on-approverowchange"_ustr },
+ { XML_NAMESPACE_FORM, u"rowchange"_ustr, u"on-rowchange"_ustr },
+ { XML_NAMESPACE_FORM, u"approvecursormove"_ustr, u"on-approvecursormove"_ustr },
+ { XML_NAMESPACE_FORM, u"cursormove"_ustr, u"on-cursormove"_ustr },
+ { XML_NAMESPACE_FORM, u"supplyparameter"_ustr, u"on-supplyparameter"_ustr },
+ { XML_NAMESPACE_FORM, u"adjust"_ustr, u"on-adjust"_ustr },
+ { 0, u""_ustr, u""_ustr }
};
XMLTransformerEventMapEntry const aFormTransformerEventMap[] =
{
- { XML_NAMESPACE_DOM, "mouseover", "on-mouseover" },
- { XML_NAMESPACE_DOM, "mouseout", "on-mouseout" },
- { XML_NAMESPACE_DOM, "DOMFocusOut", "on-blur" },
- { 0, nullptr, nullptr }
+ { XML_NAMESPACE_DOM, u"mouseover"_ustr, u"on-mouseover"_ustr },
+ { XML_NAMESPACE_DOM, u"mouseout"_ustr, u"on-mouseout"_ustr },
+ { XML_NAMESPACE_DOM, u"DOMFocusOut"_ustr, u"on-blur"_ustr },
+ { 0, u""_ustr, u""_ustr }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/transform/EventMap.hxx b/xmloff/source/transform/EventMap.hxx
index 11d20e1850e0..09caa74fdf2a 100644
--- a/xmloff/source/transform/EventMap.hxx
+++ b/xmloff/source/transform/EventMap.hxx
@@ -20,12 +20,13 @@
#pragma once
#include <sal/types.h>
+#include <rtl/ustring.hxx>
struct XMLTransformerEventMapEntry
{
- sal_uInt16 const m_nOASISPrefix;
- const char* m_pOASISName;
- const char* m_pOOoName;
+ sal_uInt16 m_nOASISPrefix;
+ OUString m_pOASISName;
+ OUString m_pOOoName;
};
extern XMLTransformerEventMapEntry const aTransformerEventMap[];
diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx
index 5d2e31b37cb9..b98d4077dd20 100644
--- a/xmloff/source/transform/EventOASISTContext.cxx
+++ b/xmloff/source/transform/EventOASISTContext.cxx
@@ -55,14 +55,14 @@ XMLTransformerOASISEventMap_Impl::XMLTransformerOASISEventMap_Impl( XMLTransform
XMLTransformerOASISEventMap_Impl::key_type aKey;
XMLTransformerOASISEventMap_Impl::mapped_type aData;
- while( pInit->m_pOASISName )
+ while( !pInit->m_pOASISName.isEmpty() )
{
aKey.m_nPrefix = pInit->m_nOASISPrefix;
- aKey.m_aLocalName = OUString::createFromAscii(pInit->m_pOASISName);
+ aKey.m_aLocalName = pInit->m_pOASISName;
OSL_ENSURE( find( aKey ) == end(), "duplicate event map entry" );
- aData = OUString::createFromAscii(pInit->m_pOOoName);
+ aData = pInit->m_pOOoName;
XMLTransformerOASISEventMap_Impl::value_type aVal( aKey, aData );
@@ -221,7 +221,7 @@ void XMLEventOASISTransformerContext::StartElement(
GetXMLToken( XML_LANGUAGE ) ) );
if (idx != -1)
- pMutableAttrList->SetValueByIndex(idx, "StarBasic");
+ pMutableAttrList->SetValueByIndex(idx, u"StarBasic"_ustr);
OUString aLocQName(
GetTransformer().GetNamespaceMap().GetQNameByKey(
@@ -273,7 +273,7 @@ void XMLEventOASISTransformerContext::StartElement(
GetXMLToken( XML_LANGUAGE ) ) );
if (idx != -1)
- pMutableAttrList->SetValueByIndex(idx, "StarBasic");
+ pMutableAttrList->SetValueByIndex(idx, u"StarBasic"_ustr);
OUString aLocQName(
GetTransformer().GetNamespaceMap().GetQNameByKey(
diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx
index 1611e6b7a10f..210f046d4d9e 100644
--- a/xmloff/source/transform/EventOOoTContext.cxx
+++ b/xmloff/source/transform/EventOOoTContext.cxx
@@ -47,14 +47,14 @@ void XMLTransformerOOoEventMap_Impl::AddMap( XMLTransformerEventMapEntry const *
{
XMLTransformerOOoEventMap_Impl::key_type aKey;
XMLTransformerOOoEventMap_Impl::mapped_type aData;
- while( pInit->m_pOOoName )
+ while( !pInit->m_pOOoName.isEmpty() )
{
- aKey = OUString::createFromAscii(pInit->m_pOOoName);
+ aKey = pInit->m_pOOoName;
OSL_ENSURE( find( aKey ) == end(), "duplicate event map entry" );
aData.m_nPrefix = pInit->m_nOASISPrefix;
- aData.m_aLocalName = OUString::createFromAscii(pInit->m_pOASISName);
+ aData.m_aLocalName = pInit->m_pOASISName;
XMLTransformerOOoEventMap_Impl::value_type aVal( aKey, aData );
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 418c17e9f565..bf0a71494908 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1212,7 +1212,7 @@ void XMLTrackedChangesOOoTContext_Impl::StartElement(
OSL_ENSURE( rPropSet.is(), "no info property set" );
if( rPropSet.is() )
{
- OUString aPropName("RedlineProtectionKey");
+ OUString aPropName(u"RedlineProtectionKey"_ustr);
Reference< XPropertySetInfo > xPropSetInfo(
rPropSet->getPropertySetInfo() );
if( xPropSetInfo.is() &&
@@ -1762,7 +1762,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
xmloff_OOo2OasisTransformer_get_implementation(
css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(new OOo2OasisTransformer("com.sun.star.comp.OOo2OasisTransformer", OUString()));
+ return cppu::acquire(new OOo2OasisTransformer(u"com.sun.star.comp.OOo2OasisTransformer"_ustr, OUString()));
}
#define OOO_IMPORTER( xml_className_get_impl, implName, subServiceName ) \
@@ -1776,92 +1776,92 @@ xml_className_get_impl( \
}
OOO_IMPORTER( xmloff_XMLWriterImportOOO_get_implementation,
- "com.sun.star.comp.Writer.XMLImporter",
- "com.sun.star.comp.Writer.XMLOasisImporter" )
+ u"com.sun.star.comp.Writer.XMLImporter"_ustr,
+ u"com.sun.star.comp.Writer.XMLOasisImporter"_ustr )
OOO_IMPORTER( xmloff_XMLWriterStylesImportOOO_get_implementation,
- "com.sun.star.comp.Writer.XMLStylesImporter",
- "com.sun.star.comp.Writer.XMLOasisStylesImporter" )
+ u"com.sun.star.comp.Writer.XMLStylesImporter"_ustr,
+ u"com.sun.star.comp.Writer.XMLOasisStylesImporter"_ustr )
OOO_IMPORTER( xmloff_XMLWriterContentImportOOO_get_implementation,
- "com.sun.star.comp.Writer.XMLContentImporter",
- "com.sun.star.comp.Writer.XMLOasisContentImporter" )
+ u"com.sun.star.comp.Writer.XMLContentImporter"_ustr,
+ u"com.sun.star.comp.Writer.XMLOasisContentImporter"_ustr )
OOO_IMPORTER( xmloff_XMLWriterMetaImportOOO_get_implementation,
- "com.sun.star.comp.Writer.XMLMetaImporter",
- "com.sun.star.comp.Writer.XMLOasisMetaImporter" )
+ u"com.sun.star.comp.Writer.XMLMetaImporter"_ustr,
+ u"com.sun.star.comp.Writer.XMLOasisMetaImporter"_ustr )
OOO_IMPORTER( xmloff_XMLWriterSettingsImportOOO_get_implementation,
- "com.sun.star.comp.Writer.XMLSettingsImporter",
- "com.sun.star.comp.Writer.XMLOasisSettingsImporter" )
+ u"com.sun.star.comp.Writer.XMLSettingsImporter"_ustr,
+ u"com.sun.star.comp.Writer.XMLOasisSettingsImporter"_ustr )
OOO_IMPORTER( xmloff_XMLImpressImportOOO_get_implementation,
- "com.sun.star.comp.Impress.XMLImporter",
- "com.sun.star.comp.Impress.XMLOasisImporter" )
+ u"com.sun.star.comp.Impress.XMLImporter"_ustr,
+ u"com.sun.star.comp.Impress.XMLOasisImporter"_ustr )
OOO_IMPORTER( xmloff_XMLImpressStylesImportOOO_get_implementation,
- "com.sun.star.comp.Impress.XMLStylesImporter",
- "com.sun.star.comp.Impress.XMLOasisStylesImporter" )
+ u"com.sun.star.comp.Impress.XMLStylesImporter"_ustr,
+ u"com.sun.star.comp.Impress.XMLOasisStylesImporter"_ustr )
OOO_IMPORTER( xmloff_XMLImpressContentImportOOO_get_implementation,
- "com.sun.star.comp.Impress.XMLContentImporter",
- "com.sun.star.comp.Impress.XMLOasisContentImporter" )
+ u"com.sun.star.comp.Impress.XMLContentImporter"_ustr,
+ u"com.sun.star.comp.Impress.XMLOasisContentImporter"_ustr )
OOO_IMPORTER( xmloff_XMLImpressMetaImportOOO_get_implementation,
- "com.sun.star.comp.Impress.XMLMetaImporter",
- "com.sun.star.comp.Impress.XMLOasisMetaImporter" )
+ u"com.sun.star.comp.Impress.XMLMetaImporter"_ustr,
+ u"com.sun.star.comp.Impress.XMLOasisMetaImporter"_ustr )
OOO_IMPORTER( xmloff_XMLImpressSettingsImportOOO_get_implementation,
- "com.sun.star.comp.Impress.XMLSettingsImporter",
- "com.sun.star.comp.Impress.XMLOasisSettingsImporter" )
+ u"com.sun.star.comp.Impress.XMLSettingsImporter"_ustr,
+ u"com.sun.star.comp.Impress.XMLOasisSettingsImporter"_ustr )
OOO_IMPORTER( xmloff_XMLDrawImportOOO_get_implementation,
- "com.sun.star.comp.Draw.XMLImporter",
- "com.sun.star.comp.Draw.XMLOasisImporter" )
+ u"com.sun.star.comp.Draw.XMLImporter"_ustr,
+ u"com.sun.star.comp.Draw.XMLOasisImporter"_ustr )
OOO_IMPORTER( xmloff_XMLDrawStylesImportOOO_get_implementation,
- "com.sun.star.comp.Draw.XMLStylesImporter",
- "com.sun.star.comp.Draw.XMLOasisStylesImporter" )
+ u"com.sun.star.comp.Draw.XMLStylesImporter"_ustr,
+ u"com.sun.star.comp.Draw.XMLOasisStylesImporter"_ustr )
OOO_IMPORTER( xmloff_XMLDrawContentImportOOO_get_implementation,
- "com.sun.star.comp.Draw.XMLContentImporter",
- "com.sun.star.comp.Draw.XMLOasisContentImporter" )
+ u"com.sun.star.comp.Draw.XMLContentImporter"_ustr,
+ u"com.sun.star.comp.Draw.XMLOasisContentImporter"_ustr )
OOO_IMPORTER( xmloff_XMLDrawMetaImportOOO_get_implementation,
- "com.sun.star.comp.Draw.XMLMetaImporter",
- "com.sun.star.comp.Draw.XMLOasisMetaImporter" )
+ u"com.sun.star.comp.Draw.XMLMetaImporter"_ustr,
+ u"com.sun.star.comp.Draw.XMLOasisMetaImporter"_ustr )
OOO_IMPORTER( xmloff_XMLDrawSettingsImportOOO_get_implementation,
- "com.sun.star.comp.Draw.XMLSettingsImporter",
- "com.sun.star.comp.Draw.XMLOasisSettingsImporter" )
+ u"com.sun.star.comp.Draw.XMLSettingsImporter"_ustr,
+ u"com.sun.star.comp.Draw.XMLOasisSettingsImporter"_ustr )
OOO_IMPORTER( xmloff_XMLCalcImportOOO_get_implementation,
- "com.sun.star.comp.Calc.XMLImporter",
- "com.sun.star.comp.Calc.XMLOasisImporter" )
+ u"com.sun.star.comp.Calc.XMLImporter"_ustr,
+ u"com.sun.star.comp.Calc.XMLOasisImporter"_ustr )
OOO_IMPORTER( xmloff_XMLCalcStylesImportOOO_get_implementation,
- "com.sun.star.comp.Calc.XMLStylesImporter",
- "com.sun.star.comp.Calc.XMLOasisStylesImporter" )
+ u"com.sun.star.comp.Calc.XMLStylesImporter"_ustr,
+ u"com.sun.star.comp.Calc.XMLOasisStylesImporter"_ustr )
OOO_IMPORTER( xmloff_XMLCalcContentImportOOO_get_implementation,
- "com.sun.star.comp.Calc.XMLContentImporter",
- "com.sun.star.comp.Calc.XMLOasisContentImporter" )
+ u"com.sun.star.comp.Calc.XMLContentImporter"_ustr,
+ u"com.sun.star.comp.Calc.XMLOasisContentImporter"_ustr )
OOO_IMPORTER( xmloff_XMLCalcMetaImportOOO_get_implementation,
- "com.sun.star.comp.Calc.XMLMetaImporter",
- "com.sun.star.comp.Calc.XMLOasisMetaImporter" )
+ u"com.sun.star.comp.Calc.XMLMetaImporter"_ustr,
+ u"com.sun.star.comp.Calc.XMLOasisMetaImporter"_ustr )
OOO_IMPORTER( xmloff_XMLCalcSettingsImportOOO_get_implementation,
- "com.sun.star.comp.Calc.XMLSettingsImporter",
- "com.sun.star.comp.Calc.XMLOasisSettingsImporter" )
+ u"com.sun.star.comp.Calc.XMLSettingsImporter"_ustr,
+ u"com.sun.star.comp.Calc.XMLOasisSettingsImporter"_ustr )
OOO_IMPORTER( xmloff_XMLChartImportOOO_get_implementation,
- "com.sun.star.comp.Chart.XMLImporter",
- "com.sun.star.comp.Chart.XMLOasisImporter" )
+ u"com.sun.star.comp.Chart.XMLImporter"_ustr,
+ u"com.sun.star.comp.Chart.XMLOasisImporter"_ustr )
OOO_IMPORTER( xmloff_XMLChartStylesImportOOO_get_implementation,
- "com.sun.star.comp.Chart.XMLStylesImporter",
- "com.sun.star.comp.Chart.XMLOasisStylesImporter" )
+ u"com.sun.star.comp.Chart.XMLStylesImporter"_ustr,
+ u"com.sun.star.comp.Chart.XMLOasisStylesImporter"_ustr )
OOO_IMPORTER( xmloff_XMLChartContentImportOOO_get_implementation,
- "com.sun.star.comp.Chart.XMLContentImporter",
- "com.sun.star.comp.Chart.XMLOasisContentImporter" )
+ u"com.sun.star.comp.Chart.XMLContentImporter"_ustr,
+ u"com.sun.star.comp.Chart.XMLOasisContentImporter"_ustr )
OOO_IMPORTER( xmloff_XMLMathMetaImportOOO_get_implementation,
- "com.sun.star.comp.Math.XMLMetaImporter",
- "com.sun.star.comp.Math.XMLOasisMetaImporter" )
+ u"com.sun.star.comp.Math.XMLMetaImporter"_ustr,
+ u"com.sun.star.comp.Math.XMLOasisMetaImporter"_ustr )
OOO_IMPORTER( xmloff_XMLMathSettingsImportOOO_get_implementation,
- "com.sun.star.comp.Math.XMLSettingsImporter",
- "com.sun.star.comp.Math.XMLOasisSettingsImporter" )
+ u"com.sun.star.comp.Math.XMLSettingsImporter"_ustr,
+ u"com.sun.star.comp.Math.XMLOasisSettingsImporter"_ustr )
OOO_IMPORTER( xmloff_XMLMetaImportOOO_get_implementation,
- "com.sun.star.document.XMLMetaImporter",
- "com.sun.star.document.XMLOasisMetaImporter" )
+ u"com.sun.star.document.XMLMetaImporter"_ustr,
+ u"com.sun.star.document.XMLOasisMetaImporter"_ustr )
OOO_IMPORTER( xmloff_XMLAutoTextEventImportOOO_get_implementation,
- "com.sun.star.comp.Writer.XMLAutotextEventsImporter",
- "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter" )
+ u"com.sun.star.comp.Writer.XMLAutotextEventsImporter"_ustr,
+ u"com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter"_ustr )
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx
index 3fdd38fc0bd0..6d4e9e556c88 100644
--- a/xmloff/source/transform/Oasis2OOo.cxx
+++ b/xmloff/source/transform/Oasis2OOo.cxx
@@ -1434,7 +1434,7 @@ void XMLConfigItemTContext_Impl::EndElement()
GetTransformer().GetPropertySet();
if( rPropSet.is() )
{
- OUString aPropName("RedlineProtectionKey");
+ OUString aPropName(u"RedlineProtectionKey"_ustr);
Reference< XPropertySetInfo > xPropSetInfo(
rPropSet->getPropertySetInfo() );
if( xPropSetInfo.is() &&
@@ -1486,7 +1486,7 @@ void XMLTrackedChangesOASISTContext_Impl::StartElement(
GetTransformer().GetPropertySet();
if( rPropSet.is() )
{
- OUString aPropName("RedlineProtectionKey");
+ OUString aPropName(u"RedlineProtectionKey"_ustr);
Reference< XPropertySetInfo > xPropSetInfo(
rPropSet->getPropertySetInfo() );
if( xPropSetInfo.is() &&
@@ -1867,7 +1867,7 @@ Oasis2OOoTransformer::~Oasis2OOoTransformer() noexcept
// XServiceInfo
OUString SAL_CALL Oasis2OOoTransformer::getImplementationName()
{
- return "com.sun.star.comp.Oasis2OOoTransformer";
+ return u"com.sun.star.comp.Oasis2OOoTransformer"_ustr;
}
sal_Bool SAL_CALL Oasis2OOoTransformer::supportsService( const OUString& ServiceName )
diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx
index 90f2baf9de7d..819eb9d89831 100644
--- a/xmloff/source/transform/TransformerBase.cxx
+++ b/xmloff/source/transform/TransformerBase.cxx
@@ -407,7 +407,7 @@ void SAL_CALL XMLTransformerBase::initialize( const Sequence< Any >& aArguments
OUString sRelPath, sName;
Reference< XPropertySetInfo > xPropSetInfo =
m_xPropSet->getPropertySetInfo();
- OUString sPropName( "StreamRelPath" );
+ OUString sPropName( u"StreamRelPath"_ustr );
if( xPropSetInfo->hasPropertyByName(sPropName) )
{
aAny = m_xPropSet->getPropertyValue(sPropName);
@@ -1397,9 +1397,9 @@ bool XMLTransformerBase::isWriter() const
{
Reference< XServiceInfo > xSI( mxModel, UNO_QUERY );
return xSI.is() &&
- ( xSI->supportsService("com.sun.star.text.TextDocument") ||
- xSI->supportsService("com.sun.star.text.WebDocument") ||
- xSI->supportsService("com.sun.star.text.GlobalDocument") );
+ ( xSI->supportsService(u"com.sun.star.text.TextDocument"_ustr) ||
+ xSI->supportsService(u"com.sun.star.text.WebDocument"_ustr) ||
+ xSI->supportsService(u"com.sun.star.text.GlobalDocument"_ustr) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx
index f8190164697b..e0556fa80d2d 100644
--- a/xmloff/source/xforms/XFormsBindContext.cxx
+++ b/xmloff/source/xforms/XFormsBindContext.cxx
@@ -62,28 +62,28 @@ void XFormsBindContext::HandleAttribute( const sax_fastparser::FastAttributeList
switch( aIter.getToken() & TOKEN_MASK )
{
case XML_NODESET:
- xforms_setValue( mxBinding, "BindingExpression", aIter.toString() );
+ xforms_setValue( mxBinding, u"BindingExpression"_ustr, aIter.toString() );
break;
case XML_ID:
- xforms_setValue( mxBinding, "BindingID", aIter.toString() );
+ xforms_setValue( mxBinding, u"BindingID"_ustr, aIter.toString() );
break;
case XML_READONLY:
- xforms_setValue( mxBinding, "ReadonlyExpression", aIter.toString() );
+ xforms_setValue( mxBinding, u"ReadonlyExpression"_ustr, aIter.toString() );
break;
case XML_RELEVANT:
- xforms_setValue( mxBinding, "RelevantExpression", aIter.toString() );
+ xforms_setValue( mxBinding, u"RelevantExpression"_ustr, aIter.toString() );
break;
case XML_REQUIRED:
- xforms_setValue( mxBinding, "RequiredExpression", aIter.toString() );
+ xforms_setValue( mxBinding, u"RequiredExpression"_ustr, aIter.toString() );
break;
case XML_CONSTRAINT:
- xforms_setValue( mxBinding, "ConstraintExpression", aIter.toString() );
+ xforms_setValue( mxBinding, u"ConstraintExpression"_ustr, aIter.toString() );
break;
case XML_CALCULATE:
- xforms_setValue( mxBinding, "CalculateExpression", aIter.toString() );
+ xforms_setValue( mxBinding, u"CalculateExpression"_ustr, aIter.toString() );
break;
case XML_TYPE:
- xforms_setValue( mxBinding, "Type",
+ xforms_setValue( mxBinding, u"Type"_ustr,
xforms_getTypeName( mxModel->getDataTypeRepository(),
GetImport().GetNamespaceMap(),
aIter.toString() ) );
@@ -100,7 +100,7 @@ void XFormsBindContext::startFastElement(
{
// we need to register the namespaces
Reference<XNameContainer> xContainer(
- mxBinding->getPropertyValue( "BindingNamespaces" ),
+ mxBinding->getPropertyValue( u"BindingNamespaces"_ustr ),
UNO_QUERY );
SAL_WARN_IF( !xContainer.is(), "xmloff", "binding should have a namespace container" );
diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx
index fa3c500af4fc..387fb5517d26 100644
--- a/xmloff/source/xforms/XFormsModelContext.cxx
+++ b/xmloff/source/xforms/XFormsModelContext.cxx
@@ -52,7 +52,7 @@ void XFormsModelContext::HandleAttribute(const sax_fastparser::FastAttributeList
switch( aIter.getToken() & TOKEN_MASK)
{
case XML_ID:
- mxModel->setPropertyValue( "ID", Any( aIter.toString() ) );
+ mxModel->setPropertyValue( u"ID"_ustr, Any( aIter.toString() ) );
break;
case XML_SCHEMA:
GetImport().SetError( XMLERROR_XFORMS_NO_SCHEMA_SUPPORT );
diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx
index ed9cf44b7ba7..336efe246030 100644
--- a/xmloff/source/xforms/XFormsSubmissionContext.cxx
+++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx
@@ -69,50 +69,50 @@ void XFormsSubmissionContext::HandleAttribute( const sax_fastparser::FastAttribu
switch( aIter.getToken() & TOKEN_MASK )
{
case XML_ID:
- xforms_setValue( mxSubmission, "ID", aIter.toString() );
+ xforms_setValue( mxSubmission, u"ID"_ustr, aIter.toString() );
break;
case XML_BIND:
- xforms_setValue( mxSubmission, "Bind", aIter.toString() );
+ xforms_setValue( mxSubmission, u"Bind"_ustr, aIter.toString() );
break;
case XML_REF:
- xforms_setValue( mxSubmission, "Ref", aIter.toString() );
+ xforms_setValue( mxSubmission, u"Ref"_ustr, aIter.toString() );
break;
case XML_ACTION:
- xforms_setValue( mxSubmission, "Action", aIter.toString() );
+ xforms_setValue( mxSubmission, u"Action"_ustr, aIter.toString() );
break;
case XML_METHOD:
- xforms_setValue( mxSubmission, "Method", aIter.toString() );
+ xforms_setValue( mxSubmission, u"Method"_ustr, aIter.toString() );
break;
case XML_VERSION:
- xforms_setValue( mxSubmission, "Version", aIter.toString() );
+ xforms_setValue( mxSubmission, u"Version"_ustr, aIter.toString() );
break;
case XML_INDENT:
- xforms_setValue( mxSubmission, "Indent", toBool( aIter.toView() ) );
+ xforms_setValue( mxSubmission, u"Indent"_ustr, toBool( aIter.toView() ) );
break;
case XML_MEDIATYPE:
- xforms_setValue( mxSubmission, "MediaType", aIter.toString() );
+ xforms_setValue( mxSubmission, u"MediaType"_ustr, aIter.toString() );
break;
case XML_ENCODING:
- xforms_setValue( mxSubmission, "Encoding", aIter.toString() );
+ xforms_setValue( mxSubmission, u"Encoding"_ustr, aIter.toString() );
break;
case XML_OMIT_XML_DECLARATION:
- xforms_setValue( mxSubmission, "OmitXmlDeclaration",
+ xforms_setValue( mxSubmission, u"OmitXmlDeclaration"_ustr,
toBool( aIter.toView() ) );
break;
case XML_STANDALONE:
- xforms_setValue( mxSubmission, "Standalone", toBool( aIter.toView() ) );
+ xforms_setValue( mxSubmission, u"Standalone"_ustr, toBool( aIter.toView() ) );
break;
case XML_CDATA_SECTION_ELEMENTS:
- xforms_setValue( mxSubmission, "CDataSectionElement", aIter.toString() );
+ xforms_setValue( mxSubmission, u"CDataSectionElement"_ustr, aIter.toString() );
break;
case XML_REPLACE:
- xforms_setValue( mxSubmission, "Replace", aIter.toString() );
+ xforms_setValue( mxSubmission, u"Replace"_ustr, aIter.toString() );
break;
case XML_SEPARATOR:
- xforms_setValue( mxSubmission, "Separator", aIter.toString() );
+ xforms_setValue( mxSubmission, u"Separator"_ustr, aIter.toString() );
break;
case XML_INCLUDENAMESPACEPREFIXES:
- xforms_setValue( mxSubmission, "IncludeNamespacePrefixes", aIter.toString() );
+ xforms_setValue( mxSubmission, u"IncludeNamespacePrefixes"_ustr, aIter.toString() );
break;
default:
XMLOFF_WARN_UNKNOWN("xmloff", aIter);
diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx
index feb5d732b08c..e156cdbb85a9 100644
--- a/xmloff/source/xforms/xformsapi.cxx
+++ b/xmloff/source/xforms/xformsapi.cxx
@@ -78,7 +78,7 @@ void xforms_addXFormsModel(
if( xForms.is() )
{
OUString sName;
- xModel->getPropertyValue("ID") >>= sName;
+ xModel->getPropertyValue(u"ID"_ustr) >>= sName;
xForms->insertByName( sName, Any( xModel ) );
bSuccess = true;
}
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index b0d5c9e99820..b5037dd637f4 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -110,10 +110,10 @@ namespace {
struct ExportTable
{
- const char* pPropertyName;
- sal_uInt16 const nNamespace;
+ OUString pPropertyName;
+ sal_uInt16 nNamespace;
sal_uInt16 nToken;
- convert_t const aConverter;
+ convert_t aConverter;
};
}
@@ -122,7 +122,7 @@ static void lcl_export( const Reference<XPropertySet>& rPropertySet,
SvXMLExport& rExport,
const ExportTable* pTable );
-#define TABLE_END { nullptr, 0, 0, nullptr }
+#define TABLE_END { u""_ustr, 0, 0, nullptr }
// any conversion functions
static OUString xforms_string( const Any& );
@@ -153,10 +153,10 @@ static OUString lcl_getXSDType( SvXMLExport const & rExport,
// the model
-const ExportTable aXFormsModelTable[] =
+constexpr ExportTable aXFormsModelTable[] =
{
- { "ID", XML_NAMESPACE_NONE, xmloff::token::XML_ID, xforms_string },
- { "SchemaRef", XML_NAMESPACE_NONE, xmloff::token::XML_SCHEMA, xforms_string },
+ { u"ID"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_ID, xforms_string },
+ { u"SchemaRef"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_SCHEMA, xforms_string },
TABLE_END
};
@@ -252,15 +252,15 @@ void exportXFormsInstance( SvXMLExport& rExport,
// the binding
-const ExportTable aXFormsBindingTable[] =
+constexpr ExportTable aXFormsBindingTable[] =
{
- { "BindingID", XML_NAMESPACE_NONE, xmloff::token::XML_ID, xforms_string },
- { "BindingExpression", XML_NAMESPACE_NONE, xmloff::token::XML_NODESET, xforms_string },
- { "ReadonlyExpression", XML_NAMESPACE_NONE, xmloff::token::XML_READONLY, xforms_string },
- { "RelevantExpression", XML_NAMESPACE_NONE, xmloff::token::XML_RELEVANT, xforms_string },
- { "RequiredExpression", XML_NAMESPACE_NONE, xmloff::token::XML_REQUIRED, xforms_string },
- { "ConstraintExpression", XML_NAMESPACE_NONE, xmloff::token::XML_CONSTRAINT, xforms_string },
- { "CalculateExpression", XML_NAMESPACE_NONE, xmloff::token::XML_CALCULATE, xforms_string },
+ { u"BindingID"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_ID, xforms_string },
+ { u"BindingExpression"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_NODESET, xforms_string },
+ { u"ReadonlyExpression"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_READONLY, xforms_string },
+ { u"RelevantExpression"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_RELEVANT, xforms_string },
+ { u"RequiredExpression"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_REQUIRED, xforms_string },
+ { u"ConstraintExpression"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_CONSTRAINT, xforms_string },
+ { u"CalculateExpression"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_CALCULATE, xforms_string },
// type handled separately, for type name <-> XSD type conversion
// { "Type", XML_NAMESPACE_NONE, xmloff::token::XML_TYPE, xforms_string },
TABLE_END
@@ -272,13 +272,13 @@ void exportXFormsBinding( SvXMLExport& rExport,
// name check; generate binding ID if necessary
{
OUString sName;
- xBinding->getPropertyValue( "BindingID" ) >>= sName;
+ xBinding->getPropertyValue( u"BindingID"_ustr ) >>= sName;
if( sName.isEmpty() )
{
// if we don't have a name yet, generate one on the fly
sal_Int64 nId = reinterpret_cast<sal_uInt64>( xBinding.get() );
sName = "bind_" + OUString::number( nId , 16 );
- xBinding->setPropertyValue( "BindingID", Any(sName));
+ xBinding->setPropertyValue( u"BindingID"_ustr, Any(sName));
}
}
@@ -287,14 +287,14 @@ void exportXFormsBinding( SvXMLExport& rExport,
// handle type attribute
{
OUString sTypeName;
- xBinding->getPropertyValue( "Type" ) >>= sTypeName;
+ xBinding->getPropertyValue( u"Type"_ustr ) >>= sTypeName;
try
{
// now get type, and determine whether it's a standard type. If
// so, export the XSD name
Reference<css::xforms::XModel> xModel(
- xBinding->getPropertyValue( "Model" ),
+ xBinding->getPropertyValue( u"Model"_ustr ),
UNO_QUERY );
Reference<XDataTypeRepository> xRepository(
xModel.is() ? xModel->getDataTypeRepository() : Reference<XDataTypeRepository>() );
@@ -306,7 +306,7 @@ void exportXFormsBinding( SvXMLExport& rExport,
// if it's a basic data type, write out the XSD name
// for the XSD type class
bool bIsBasic = false;
- xDataType->getPropertyValue( "IsBasic" ) >>= bIsBasic;
+ xDataType->getPropertyValue( u"IsBasic"_ustr ) >>= bIsBasic;
if( bIsBasic )
sTypeName = lcl_getXSDType( rExport, xDataType );
}
@@ -328,7 +328,7 @@ void exportXFormsBinding( SvXMLExport& rExport,
// to do so, we will write out all missing namespace declaractions.
const SvXMLNamespaceMap& rMap = rExport.GetNamespaceMap();
Reference<XNameAccess> xNamespaces(
- xBinding->getPropertyValue( "ModelNamespaces" ), UNO_QUERY);
+ xBinding->getPropertyValue( u"ModelNamespaces"_ustr ), UNO_QUERY);
if( xNamespaces.is() )
{
// iterate over Prefixes for this binding
@@ -366,23 +366,23 @@ void exportXFormsBinding( SvXMLExport& rExport,
// the submission
-const ExportTable aXFormsSubmissionTable[] =
+constexpr ExportTable aXFormsSubmissionTable[] =
{
- { "ID", XML_NAMESPACE_NONE, xmloff::token::XML_ID, xforms_string },
- { "Bind", XML_NAMESPACE_NONE, xmloff::token::XML_BIND, xforms_string },
- { "Ref", XML_NAMESPACE_NONE, xmloff::token::XML_REF, xforms_string },
- { "Action", XML_NAMESPACE_NONE, xmloff::token::XML_ACTION, xforms_string },
- { "Method", XML_NAMESPACE_NONE, xmloff::token::XML_METHOD, xforms_string },
- { "Version", XML_NAMESPACE_NONE, xmloff::token::XML_VERSION, xforms_string },
- { "Indent", XML_NAMESPACE_NONE, xmloff::token::XML_INDENT, xforms_bool },
- { "MediaType", XML_NAMESPACE_NONE, xmloff::token::XML_MEDIATYPE, xforms_string },
- { "Encoding", XML_NAMESPACE_NONE, xmloff::token::XML_ENCODING, xforms_string },
- { "OmitXmlDeclaration", XML_NAMESPACE_NONE, xmloff::token::XML_OMIT_XML_DECLARATION, xforms_bool },
- { "Standalone", XML_NAMESPACE_NONE, xmloff::token::XML_STANDALONE, xforms_bool },
- { "CDataSectionElement", XML_NAMESPACE_NONE, xmloff::token::XML_CDATA_SECTION_ELEMENTS, xforms_string },
- { "Replace", XML_NAMESPACE_NONE, xmloff::token::XML_REPLACE, xforms_string },
- { "Separator", XML_NAMESPACE_NONE, xmloff::token::XML_SEPARATOR, xforms_string },
- { "IncludeNamespacePrefixes", XML_NAMESPACE_NONE, xmloff::token::XML_INCLUDENAMESPACEPREFIXES, xforms_string },
+ { u"ID"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_ID, xforms_string },
+ { u"Bind"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_BIND, xforms_string },
+ { u"Ref"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_REF, xforms_string },
+ { u"Action"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_ACTION, xforms_string },
+ { u"Method"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_METHOD, xforms_string },
+ { u"Version"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_VERSION, xforms_string },
+ { u"Indent"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_INDENT, xforms_bool },
+ { u"MediaType"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_MEDIATYPE, xforms_string },
+ { u"Encoding"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_ENCODING, xforms_string },
+ { u"OmitXmlDeclaration"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_OMIT_XML_DECLARATION, xforms_bool },
+ { u"Standalone"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_STANDALONE, xforms_bool },
+ { u"CDataSectionElement"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_CDATA_SECTION_ELEMENTS, xforms_string },
+ { u"Replace"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_REPLACE, xforms_string },
+ { u"Separator"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_SEPARATOR, xforms_string },
+ { u"IncludeNamespacePrefixes"_ustr, XML_NAMESPACE_NONE, xmloff::token::XML_INCLUDENAMESPACEPREFIXES, xforms_string },
TABLE_END
};
@@ -400,34 +400,34 @@ void exportXFormsSubmission( SvXMLExport& rExport,
const ExportTable aDataTypeFacetTable[] =
{
- { "Length", XML_NAMESPACE_XSD, xmloff::token::XML_LENGTH, xforms_int32 },
- { "MinLength", XML_NAMESPACE_XSD, xmloff::token::XML_MINLENGTH, xforms_int32 },
- { "MaxLength", XML_NAMESPACE_XSD, xmloff::token::XML_MAXLENGTH, xforms_int32 },
- { "MinInclusiveInt", XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_int32 },
- { "MinExclusiveInt", XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_int32 },
- { "MaxInclusiveInt", XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_int32 },
- { "MaxExclusiveInt", XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_int32 },
- { "MinInclusiveDouble", XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_double },
- { "MinExclusiveDouble", XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_double },
- { "MaxInclusiveDouble", XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_double },
- { "MaxExclusiveDouble", XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_double },
- { "MinInclusiveDate", XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_date },
- { "MinExclusiveDate", XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_date },
- { "MaxInclusiveDate", XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_date },
- { "MaxExclusiveDate", XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_date },
- { "MinInclusiveTime", XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_time },
- { "MinExclusiveTime", XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_time },
- { "MaxInclusiveTime", XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_time },
- { "MaxExclusiveTime", XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_time },
- { "MinInclusiveDateTime", XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_dateTime },
- { "MinExclusiveDateTime", XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_dateTime },
- { "MaxInclusiveDateTime", XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_dateTime },
- { "MaxExclusiveDateTime", XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_dateTime },
- { "Pattern", XML_NAMESPACE_XSD, xmloff::token::XML_PATTERN, xforms_string },
+ { u"Length"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_LENGTH, xforms_int32 },
+ { u"MinLength"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MINLENGTH, xforms_int32 },
+ { u"MaxLength"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXLENGTH, xforms_int32 },
+ { u"MinInclusiveInt"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_int32 },
+ { u"MinExclusiveInt"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_int32 },
+ { u"MaxInclusiveInt"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_int32 },
+ { u"MaxExclusiveInt"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_int32 },
+ { u"MinInclusiveDouble"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_double },
+ { u"MinExclusiveDouble"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_double },
+ { u"MaxInclusiveDouble"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_double },
+ { u"MaxExclusiveDouble"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_double },
+ { u"MinInclusiveDate"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_date },
+ { u"MinExclusiveDate"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_date },
+ { u"MaxInclusiveDate"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_date },
+ { u"MaxExclusiveDate"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_date },
+ { u"MinInclusiveTime"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_time },
+ { u"MinExclusiveTime"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_time },
+ { u"MaxInclusiveTime"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_time },
+ { u"MaxExclusiveTime"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_time },
+ { u"MinInclusiveDateTime"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MININCLUSIVE, xforms_dateTime },
+ { u"MinExclusiveDateTime"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MINEXCLUSIVE, xforms_dateTime },
+ { u"MaxInclusiveDateTime"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXINCLUSIVE, xforms_dateTime },
+ { u"MaxExclusiveDateTime"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_MAXEXCLUSIVE, xforms_dateTime },
+ { u"Pattern"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_PATTERN, xforms_string },
// ??? XML_ENUMERATION,
- { "WhiteSpace", XML_NAMESPACE_XSD, xmloff::token::XML_WHITESPACE, xforms_whitespace },
- { "TotalDigits", XML_NAMESPACE_XSD, xmloff::token::XML_TOTALDIGITS, xforms_int32 },
- { "FractionDigits", XML_NAMESPACE_XSD, xmloff::token::XML_FRACTIONDIGITS, xforms_int32 },
+ { u"WhiteSpace"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_WHITESPACE, xforms_whitespace },
+ { u"TotalDigits"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_TOTALDIGITS, xforms_int32 },
+ { u"FractionDigits"_ustr, XML_NAMESPACE_XSD, xmloff::token::XML_FRACTIONDIGITS, xforms_int32 },
TABLE_END
};
@@ -438,10 +438,10 @@ static void lcl_exportDataTypeFacets( SvXMLExport& rExport,
{
Reference<XPropertySetInfo> xInfo = rPropertySet->getPropertySetInfo();
for( const ExportTable* pCurrent = pTable;
- pCurrent->pPropertyName != nullptr;
+ !pCurrent->pPropertyName.isEmpty();
pCurrent++ )
{
- OUString sName( OUString::createFromAscii( pCurrent->pPropertyName ) );
+ OUString sName( pCurrent->pPropertyName );
if( xInfo->hasPropertyByName( sName ) )
{
OUString sValue = (*pCurrent->aConverter)(
@@ -467,7 +467,7 @@ static OUString lcl_getXSDType( SvXMLExport const & rExport,
XMLTokenEnum eToken = XML_STRING;
sal_uInt16 nDataTypeClass = 0;
- xType->getPropertyValue( "TypeClass" ) >>= nDataTypeClass;
+ xType->getPropertyValue( u"TypeClass"_ustr ) >>= nDataTypeClass;
switch( nDataTypeClass )
{
case css::xsd::DataTypeClass::STRING:
@@ -526,7 +526,7 @@ static void lcl_exportDataType( SvXMLExport& rExport,
{
// we do not need to export basic types; exit if we have one
bool bIsBasic = false;
- xType->getPropertyValue( "IsBasic" ) >>= bIsBasic;
+ xType->getPropertyValue( u"IsBasic"_ustr ) >>= bIsBasic;
if( bIsBasic )
return;
@@ -534,7 +534,7 @@ static void lcl_exportDataType( SvXMLExport& rExport,
// <xsd:simpleType name="...">
OUString sName;
- xType->getPropertyValue( "Name" ) >>= sName;
+ xType->getPropertyValue( u"Name"_ustr ) >>= sName;
rExport.AddAttribute( XML_NAMESPACE_NONE, XML_NAME, sName );
SvXMLElementExport aSimpleType( rExport,
XML_NAMESPACE_XSD, XML_SIMPLETYPE,
@@ -581,7 +581,7 @@ void exportXFormsSchemas( SvXMLExport& rExport,
if( xPropSet.is() )
{
Reference<XDocument> xDocument(
- xPropSet->getPropertyValue( "ForeignSchema" ),
+ xPropSet->getPropertyValue( u"ForeignSchema"_ustr ),
UNO_QUERY );
if( xDocument.is() )
@@ -598,11 +598,10 @@ static void lcl_export( const Reference<XPropertySet>& rPropertySet,
const ExportTable* pTable )
{
for( const ExportTable* pCurrent = pTable;
- pCurrent->pPropertyName != nullptr;
+ !pCurrent->pPropertyName.isEmpty();
pCurrent++ )
{
- Any aAny = rPropertySet->getPropertyValue(
- OUString::createFromAscii( pCurrent->pPropertyName ) );
+ Any aAny = rPropertySet->getPropertyValue( pCurrent->pPropertyName );
OUString sValue = (*pCurrent->aConverter)( aAny );
if( !sValue.isEmpty() )
@@ -705,7 +704,7 @@ OUString xforms_whitespace( const Any& rAny )
/// return name of Binding
static OUString lcl_getXFormsBindName( const Reference<XPropertySet>& xBinding )
{
- OUString sProp( "BindingID" );
+ OUString sProp( u"BindingID"_ustr );
OUString sReturn;
if( xBinding.is() &&
@@ -746,7 +745,7 @@ OUString getXFormsSubmissionName( const Reference<XPropertySet>& xBinding )
{
Reference<XPropertySet> xPropertySet(
xSubmissionSupplier->getSubmission(), UNO_QUERY );
- OUString sProp( "ID" );
+ OUString sProp( u"ID"_ustr );
if( xPropertySet.is() &&
xPropertySet->getPropertySetInfo()->hasPropertyByName( sProp ) )
{
@@ -789,7 +788,7 @@ void getXFormsSettings( const Reference< XNameAccess >& _rXForms, Sequence< Prop
if ( xModelSettings->hasElements() )
{
- _out_rSettings = { comphelper::makePropertyValue("XFormModels", xModelSettings) };
+ _out_rSettings = { comphelper::makePropertyValue(u"XFormModels"_ustr, xModelSettings) };
}
}
catch( const Exception& )