[Libreoffice-commits] core.git: oox/source sc/source sd/source sw/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 5 22:26:09 UTC 2020
oox/source/core/xmlfilterbase.cxx | 18 +--
oox/source/export/chartexport.cxx | 27 ++---
oox/source/export/drawingml.cxx | 45 ++++-----
oox/source/export/shapes.cxx | 14 +--
sc/source/filter/excel/xecontent.cxx | 12 +-
sc/source/filter/excel/xeescher.cxx | 34 +++----
sc/source/filter/excel/xeextlst.cxx | 6 -
sc/source/filter/excel/xestyle.cxx | 7 -
sd/source/filter/eppt/pptx-animations.cxx | 5 -
sd/source/filter/eppt/pptx-epptooxml.cxx | 18 +--
sw/source/filter/ww8/docxattributeoutput.cxx | 118 +++++++++++---------------
sw/source/filter/ww8/docxexport.cxx | 52 +++++------
sw/source/filter/ww8/docxsdrexport.cxx | 8 -
sw/source/filter/ww8/docxtablestyleexport.cxx | 29 +++---
14 files changed, 186 insertions(+), 207 deletions(-)
New commits:
commit 687b6395d4d1810eef911adb3ac4defd7cd863c0
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Jul 6 00:15:20 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Jul 6 00:25:25 2020 +0200
Don't explicitly convert OUString to OString
See commit 57afeb8d9e35933630568a02fc48a00f5582b261
Change-Id: Idb41fb2e3b90bd0eb1d7ebd588c13fd50b9536fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98173
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 17a12acde6e7..b3aec333967e 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -633,11 +633,11 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties
"docProps/core.xml",
"application/vnd.openxmlformats-package.core-properties+xml" );
pCoreProps->startElementNS( XML_cp, XML_coreProperties,
- FSNS(XML_xmlns, XML_cp), rSelf.getNamespaceURL(OOX_NS(packageMetaCorePr)).toUtf8(),
- FSNS(XML_xmlns, XML_dc), rSelf.getNamespaceURL(OOX_NS(dc)).toUtf8(),
- FSNS(XML_xmlns, XML_dcterms), rSelf.getNamespaceURL(OOX_NS(dcTerms)).toUtf8(),
- FSNS(XML_xmlns, XML_dcmitype), rSelf.getNamespaceURL(OOX_NS(dcmiType)).toUtf8(),
- FSNS(XML_xmlns, XML_xsi), rSelf.getNamespaceURL(OOX_NS(xsi)).toUtf8());
+ FSNS(XML_xmlns, XML_cp), rSelf.getNamespaceURL(OOX_NS(packageMetaCorePr)),
+ FSNS(XML_xmlns, XML_dc), rSelf.getNamespaceURL(OOX_NS(dc)),
+ FSNS(XML_xmlns, XML_dcterms), rSelf.getNamespaceURL(OOX_NS(dcTerms)),
+ FSNS(XML_xmlns, XML_dcmitype), rSelf.getNamespaceURL(OOX_NS(dcmiType)),
+ FSNS(XML_xmlns, XML_xsi), rSelf.getNamespaceURL(OOX_NS(xsi)));
#ifdef OOXTODO
writeElement( pCoreProps, FSNS( XML_cp, XML_category ), "category" );
@@ -675,8 +675,8 @@ writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >
"docProps/app.xml",
"application/vnd.openxmlformats-officedocument.extended-properties+xml" );
pAppProps->startElement( XML_Properties,
- XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeExtPr)).toUtf8(),
- FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)).toUtf8());
+ XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeExtPr)),
+ FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)));
writeElement( pAppProps, XML_Template, xProperties->getTemplateName() );
#ifdef OOXTODO
@@ -787,8 +787,8 @@ writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentPropertie
"docProps/custom.xml",
"application/vnd.openxmlformats-officedocument.custom-properties+xml" );
pAppProps->startElement( XML_Properties,
- XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeCustomPr)).toUtf8(),
- FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)).toUtf8());
+ XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeCustomPr)),
+ FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)));
size_t nIndex = 0;
for (const auto& rProp : aprop)
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index e1ff4e7f763c..5f8ea80f8c9b 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -689,7 +689,7 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
XML_id, OString::number(nID),
- XML_name, sName.toUtf8());
+ XML_name, sName);
OUString sURL;
if ( GetProperty( xShapeProps, "URL" ) )
@@ -701,8 +701,7 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
mpURLTransformer->getTransformedString(sURL),
mpURLTransformer->isExternalURL(sURL));
- mpFS->singleElementNS( XML_a, XML_hlinkClick,
- FSNS( XML_r,XML_id ), sRelId.toUtf8() );
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
}
pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
@@ -769,9 +768,9 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
XmlFilterBase* pFB = GetFB();
pFS->singleElement( FSNS( XML_c, XML_chart ),
- FSNS(XML_xmlns, XML_c), pFB->getNamespaceURL(OOX_NS(dmlChart)).toUtf8(),
- FSNS(XML_xmlns, XML_r), pFB->getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
- FSNS(XML_r, XML_id), sId.toUtf8() );
+ FSNS(XML_xmlns, XML_c), pFB->getNamespaceURL(OOX_NS(dmlChart)),
+ FSNS(XML_xmlns, XML_r), pFB->getNamespaceURL(OOX_NS(officeRel)),
+ FSNS(XML_r, XML_id), sId );
pFS->endElement( FSNS( XML_a, XML_graphicData ) );
pFS->endElement( FSNS( XML_a, XML_graphic ) );
@@ -846,9 +845,9 @@ void ChartExport::exportChartSpace( const Reference< css::chart::XChartDocument
FSHelperPtr pFS = GetFS();
XmlFilterBase* pFB = GetFB();
pFS->startElement( FSNS( XML_c, XML_chartSpace ),
- FSNS( XML_xmlns, XML_c ), pFB->getNamespaceURL(OOX_NS(dmlChart)).toUtf8(),
- FSNS( XML_xmlns, XML_a ), pFB->getNamespaceURL(OOX_NS(dml)).toUtf8(),
- FSNS( XML_xmlns, XML_r ), pFB->getNamespaceURL(OOX_NS(officeRel)).toUtf8());
+ FSNS( XML_xmlns, XML_c ), pFB->getNamespaceURL(OOX_NS(dmlChart)),
+ FSNS( XML_xmlns, XML_a ), pFB->getNamespaceURL(OOX_NS(dml)),
+ FSNS( XML_xmlns, XML_r ), pFB->getNamespaceURL(OOX_NS(officeRel)));
// TODO: get the correct editing language
pFS->singleElement(FSNS(XML_c, XML_lang), XML_val, "en-US");
@@ -919,7 +918,7 @@ void ChartExport::exportExternalData( const Reference< css::chart::XChartDocumen
OUString sRelId = GetFB()->addRelation(pFS->getOutputStream(),
type,
relationPath);
- pFS->singleElementNS(XML_c, XML_externalData, FSNS(XML_r, XML_id), sRelId.toUtf8());
+ pFS->singleElementNS(XML_c, XML_externalData, FSNS(XML_r, XML_id), sRelId);
}
void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xChartDoc )
@@ -3147,7 +3146,7 @@ void ChartExport::_exportAxis(
{
pFS->startElement(FSNS(XML_c, XML_dispUnits));
- pFS->singleElement(FSNS(XML_c, XML_builtInUnit), XML_val, aVal.toUtf8());
+ pFS->singleElement(FSNS(XML_c, XML_builtInUnit), XML_val, aVal);
pFS->singleElement(FSNS( XML_c, XML_dispUnitsLbl ));
pFS->endElement( FSNS( XML_c, XML_dispUnits ) );
@@ -3282,8 +3281,8 @@ void writeCustomLabel( const FSHelperPtr& pFS, ChartExport* pChartExport,
else
{
// Field
- pFS->startElement(FSNS(XML_a, XML_fld), XML_id, rField->getGuid().toUtf8(), XML_type,
- sFieldType.toUtf8());
+ pFS->startElement(FSNS(XML_a, XML_fld), XML_id, rField->getGuid(), XML_type,
+ sFieldType);
writeRunProperties(pChartExport, xPropertySet);
pFS->startElement(FSNS(XML_a, XML_t));
@@ -3514,7 +3513,7 @@ void ChartExport::exportDataLabels(
if( eChartType != chart::TYPEID_PIE )
{
pFS->startElement(FSNS(XML_c, XML_extLst));
- pFS->startElement(FSNS(XML_c, XML_ext), XML_uri, "{CE6537A1-D6FC-4f65-9D91-7224C49458BB}", FSNS(XML_xmlns, XML_c15), GetFB()->getNamespaceURL(OOX_NS(c15)).toUtf8());
+ pFS->startElement(FSNS(XML_c, XML_ext), XML_uri, "{CE6537A1-D6FC-4f65-9D91-7224C49458BB}", FSNS(XML_xmlns, XML_c15), GetFB()->getNamespaceURL(OOX_NS(c15)));
pFS->singleElement(FSNS(XML_c15, XML_showLeaderLines), XML_val, "1");
pFS->endElement(FSNS(XML_c, XML_ext));
pFS->endElement(FSNS(XML_c, XML_extLst));
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 4adf7a9406b5..1d52bef4b25c 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -310,19 +310,19 @@ void DrawingML::WriteColor( const OUString& sColorSchemeName, const Sequence< Pr
if( aTransformations.hasElements() )
{
- mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName.toUtf8());
+ mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName);
WriteColorTransformations( aTransformations, nAlpha );
mpFS->endElementNS( XML_a, XML_schemeClr );
}
else if(nAlpha < MAX_PERCENT)
{
- mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName.toUtf8());
+ mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName);
mpFS->singleElementNS(XML_a, XML_alpha, XML_val, OString::number(nAlpha));
mpFS->endElementNS( XML_a, XML_schemeClr );
}
else
{
- mpFS->singleElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName.toUtf8());
+ mpFS->singleElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName);
}
}
@@ -1291,14 +1291,14 @@ void DrawingML::WriteMediaNonVisualProperties(const css::uno::Reference<css::dra
GetFS()->startElementNS(XML_p, XML_nvPr);
GetFS()->singleElementNS(XML_a, eMediaType == Relationship::VIDEO ? XML_videoFile : XML_audioFile,
- FSNS(XML_r, XML_link), aVideoFileRelId.toUtf8());
+ FSNS(XML_r, XML_link), aVideoFileRelId);
GetFS()->startElementNS(XML_p, XML_extLst);
// media extensions; google this ID for details
GetFS()->startElementNS(XML_p, XML_ext, XML_uri, "{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}");
GetFS()->singleElementNS(XML_p14, XML_media,
- bEmbed? FSNS(XML_r, XML_embed): FSNS(XML_r, XML_link), aMediaRelId.toUtf8());
+ bEmbed? FSNS(XML_r, XML_embed): FSNS(XML_r, XML_link), aMediaRelId);
GetFS()->endElementNS(XML_p, XML_ext);
GetFS()->endElementNS(XML_p, XML_extLst);
@@ -1380,7 +1380,7 @@ OUString DrawingML::WriteXGraphicBlip(uno::Reference<beans::XPropertySet> const
}
}
- mpFS->startElementNS(XML_a, XML_blip, FSNS(XML_r, XML_embed), sRelId.toUtf8());
+ mpFS->startElementNS(XML_a, XML_blip, FSNS(XML_r, XML_embed), sRelId);
WriteImageBrightnessContrastTransparence(rXPropSet);
@@ -1975,7 +1975,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
usTypeface = aSubstName;
mpFS->singleElementNS( XML_a, XML_latin,
- XML_typeface, usTypeface.toUtf8(),
+ XML_typeface, usTypeface,
XML_pitchFamily, pitch,
XML_charset, charset );
}
@@ -1997,7 +1997,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
usTypeface = aSubstName;
mpFS->singleElementNS( XML_a, bComplex ? XML_cs : XML_ea,
- XML_typeface, usTypeface.toUtf8(),
+ XML_typeface, usTypeface,
XML_pitchFamily, pitch,
XML_charset, charset );
}
@@ -2022,7 +2022,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
oox::getRelationship(Relationship::HYPERLINK),
sURL, true );
- mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8());
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
}
}
@@ -2188,7 +2188,7 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun,
OString sUUID(comphelper::xml::generateGUIDString());
mpFS->startElementNS( XML_a, XML_fld,
XML_id, sUUID.getStr(),
- XML_type, sFieldValue.toUtf8() );
+ XML_type, sFieldValue );
}
else
{
@@ -2384,7 +2384,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
mpFS->singleElementNS( XML_a, XML_buSzPct,
XML_val, OString::number(std::min<sal_Int32>(std::lround(100000.f * fBulletSizeRel), 400000)));
mpFS->startElementNS(XML_a, XML_buBlip);
- mpFS->singleElementNS(XML_a, XML_blip, FSNS(XML_r, XML_embed), sRelationId.toUtf8());
+ mpFS->singleElementNS(XML_a, XML_blip, FSNS(XML_r, XML_embed), sRelationId);
mpFS->endElementNS( XML_a, XML_buBlip );
}
else
@@ -2408,7 +2408,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
if ( SVX_NUM_CHAR_SPECIAL == nNumberingType )
aBulletChar = SubstituteBullet( aBulletChar, aFontDesc );
mpFS->singleElementNS( XML_a, XML_buFont,
- XML_typeface, aFontDesc.Name.toUtf8(),
+ XML_typeface, aFontDesc.Name,
XML_charset, (aFontDesc.CharSet == awt::CharSet::SYMBOL) ? "2" : nullptr );
}
@@ -2417,12 +2417,12 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
if (!aAutoNumType.isEmpty())
{
mpFS->singleElementNS(XML_a, XML_buAutoNum,
- XML_type, aAutoNumType.toUtf8(),
+ XML_type, aAutoNumType,
XML_startAt, nStartWith > 1 ? OString::number(nStartWith).getStr() : nullptr);
}
else
{
- mpFS->singleElementNS(XML_a, XML_buChar, XML_char, OUString(aBulletChar).toUtf8());
+ mpFS->singleElementNS(XML_a, XML_buChar, XML_char, OUString(aBulletChar));
}
}
}
@@ -2849,7 +2849,7 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
{
if (aAdjustmentSeq.hasElements())
{
- mpFS->startElementNS(XML_a, XML_prstTxWarp, XML_prst, presetWarp.toUtf8());
+ mpFS->startElementNS(XML_a, XML_prstTxWarp, XML_prst, presetWarp);
mpFS->startElementNS(XML_a, XML_avLst);
for (sal_Int32 i = 0, nElems = aAdjustmentSeq.getLength(); i < nElems; ++i )
{
@@ -2895,7 +2895,7 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
}
else
{
- mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst, presetWarp.toUtf8());
+ mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst, presetWarp);
}
}
@@ -4282,7 +4282,7 @@ void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet
mpFS->startElementNS(XML_a, XML_extLst);
mpFS->startElementNS(XML_a, XML_ext, XML_uri, "{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}");
mpFS->startElementNS( XML_a14, XML_imgProps,
- FSNS(XML_xmlns, XML_a14), mpFB->getNamespaceURL(OOX_NS(a14)).toUtf8() );
+ FSNS(XML_xmlns, XML_a14), mpFB->getNamespaceURL(OOX_NS(a14)) );
mpFS->startElementNS(XML_a14, XML_imgLayer, FSNS(XML_r, XML_embed), sRelId);
mpFS->startElementNS(XML_a14, XML_imgEffect);
@@ -4378,9 +4378,8 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
mpFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef);
mpFS->singleElementNS(XML_wp, XML_cNvGraphicFramePr);
- mpFS->startElementNS(
- XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
- mpFB->getNamespaceURL(OOX_NS(dml)).toUtf8());
+ mpFS->startElementNS(XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
+ mpFB->getNamespaceURL(OOX_NS(dml)));
}
else
{
@@ -4394,7 +4393,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
// change tracking extension - required in PPTX
mpFS->startElementNS(XML_p, XML_ext, XML_uri, "{D42A27DB-BD31-4B8C-83A1-F6EECF244321}");
mpFS->singleElementNS(XML_p14, XML_modId,
- FSNS(XML_xmlns, XML_p14), mpFB->getNamespaceURL(OOX_NS(p14)).toUtf8(),
+ FSNS(XML_xmlns, XML_p14), mpFB->getNamespaceURL(OOX_NS(p14)),
XML_val,
OString::number(comphelper::rng::uniform_uint_distribution(1, SAL_MAX_UINT32)));
mpFS->endElementNS(XML_p, XML_ext);
@@ -4484,8 +4483,8 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
}
mpFS->singleElementNS(XML_dgm, XML_relIds,
- FSNS(XML_xmlns, XML_dgm), mpFB->getNamespaceURL(OOX_NS(dmlDiagram)).toUtf8(),
- FSNS(XML_xmlns, XML_r), mpFB->getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
+ FSNS(XML_xmlns, XML_dgm), mpFB->getNamespaceURL(OOX_NS(dmlDiagram)),
+ FSNS(XML_xmlns, XML_r), mpFB->getNamespaceURL(OOX_NS(officeRel)),
FSNS(XML_r, XML_dm), dataRelId, FSNS(XML_r, XML_lo), layoutRelId,
FSNS(XML_r, XML_qs), styleRelId, FSNS(XML_r, XML_cs), colorRelId);
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index eb5eedff1d89..8cab446a3488 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -815,7 +815,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
mpURLTransformer->getTransformedString(sURL),
mpURLTransformer->isExternalURL(sURL));
- mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8());
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
}
}
pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
@@ -1179,7 +1179,7 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
pFS->startElementNS(mnXmlNamespace, XML_pic);
else
pFS->startElementNS(mnXmlNamespace, XML_pic,
- FSNS(XML_xmlns, XML_pic), pFB->getNamespaceURL(OOX_NS(dmlPicture)).toUtf8());
+ FSNS(XML_xmlns, XML_pic), pFB->getNamespaceURL(OOX_NS(dmlPicture)));
pFS->startElementNS(mnXmlNamespace, XML_nvPicPr);
@@ -1208,7 +1208,7 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
mpURLTransformer->getTransformedString(sURL),
mpURLTransformer->isExternalURL(sURL));
- mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8());
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
}
pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
@@ -1882,7 +1882,7 @@ ShapeExport& ShapeExport::WriteTextShape( const Reference< XShape >& xShape )
mpURLTransformer->getTransformedString(sURL),
mpURLTransformer->isExternalURL(sURL));
- mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8());
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
}
pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
}
@@ -1927,7 +1927,7 @@ void ShapeExport::WriteMathShape(Reference<XShape> const& xShape)
// WordProcessingML so write a MCE like PPT 2010 does
mpFS->startElementNS(XML_mc, XML_AlternateContent);
mpFS->startElementNS(XML_mc, XML_Choice,
- FSNS(XML_xmlns, XML_a14), mpFB->getNamespaceURL(OOX_NS(a14)).toUtf8(),
+ FSNS(XML_xmlns, XML_a14), mpFB->getNamespaceURL(OOX_NS(a14)),
XML_Requires, "a14");
mpFS->startElementNS(mnXmlNamespace, XML_sp);
mpFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
@@ -2123,14 +2123,14 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
{
mpFS->startElementNS( mnXmlNamespace, XML_oleObj,
XML_progId, pProgID,
- FSNS(XML_r, XML_id), sRelId.toUtf8(),
+ FSNS(XML_r, XML_id), sRelId,
XML_spid, "" );
}
else
{
mpFS->startElementNS( mnXmlNamespace, XML_oleObj,
//? XML_name, "Document",
- FSNS(XML_r, XML_id), sRelId.toUtf8(),
+ FSNS(XML_r, XML_id), sRelId,
// The spec says that this is a required attribute, but PowerPoint can only handle an empty value.
XML_spid, "" );
}
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index e8aedefa8f42..9e596fdcf35d 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -213,7 +213,7 @@ void XclExpSstImpl::SaveXml( XclExpXmlStream& rStrm )
rStrm.PushStream( pSst );
pSst->startElement( XML_sst,
- XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
+ XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)),
XML_count, OString::number(mnTotal),
XML_uniqueCount, OString::number(mnSize) );
@@ -534,7 +534,7 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
? XclXmlUtils::ToOString( *mxTextMark ).getStr()
: nullptr,
// OOXTODO: XML_tooltip, from record HLinkTooltip 800h wzTooltip
- XML_display, m_Repr.toUtf8() );
+ XML_display, m_Repr );
}
// Label ranges ===============================================================
@@ -1031,12 +1031,12 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
|| eOperation == ScConditionMode::BottomPercent;
bool bPercent = eOperation == ScConditionMode::TopPercent ||
eOperation == ScConditionMode::BottomPercent;
- OString aRank("0");
+ OUString aRank("0");
if(IsTopBottomRule(eOperation))
{
// position and formula grammar are not important
// we only store a number there
- aRank = mrFormatEntry.GetExpression(ScAddress(0,0,0), 0).toUtf8();
+ aRank = mrFormatEntry.GetExpression(ScAddress(0,0,0), 0);
}
OString aText;
if(IsTextRule(eOperation))
@@ -1423,7 +1423,7 @@ void XclExpCondfmt::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_conditionalFormatting,
- XML_sqref, msSeqRef.toUtf8()
+ XML_sqref, msSeqRef
// OOXTODO: XML_pivot
);
@@ -1508,7 +1508,7 @@ void XclExpDataBar::SaveXml( XclExpXmlStream& rStrm )
// extLst entries for Excel 2010 and 2013
rWorksheet->startElement(XML_extLst);
rWorksheet->startElement(XML_ext,
- FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)).toUtf8(),
+ FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)),
XML_uri, "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}");
rWorksheet->startElementNS( XML_x14, XML_id );
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 6a7f4fa5fb9e..8afbe2e3752b 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -448,7 +448,7 @@ void XclExpImgData::SaveXml( XclExpXmlStream& rStrm )
DrawingML aDML(pWorksheet, &rStrm, drawingml::DOCUMENT_XLSX);
OUString rId = aDML.WriteImage( maGraphic );
- pWorksheet->singleElement(XML_picture, FSNS(XML_r, XML_id), rId.toUtf8());
+ pWorksheet->singleElement(XML_picture, FSNS(XML_r, XML_id), rId);
}
XclExpControlHelper::XclExpControlHelper( const XclExpRoot& rRoot ) :
@@ -1098,9 +1098,9 @@ void XclExpTbxControlObj::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& pDrawing = rStrm.GetCurrentStream();
pDrawing->startElement(FSNS(XML_mc, XML_AlternateContent),
- FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)).toUtf8());
+ FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)));
pDrawing->startElement(FSNS(XML_mc, XML_Choice),
- FSNS(XML_xmlns, XML_a14), rStrm.getNamespaceURL(OOX_NS(a14)).toUtf8(),
+ FSNS(XML_xmlns, XML_a14), rStrm.getNamespaceURL(OOX_NS(a14)),
XML_Requires, "a14");
pDrawing->startElement(FSNS(XML_xdr, XML_twoCellAnchor), XML_editAs, "oneCell");
@@ -1119,8 +1119,8 @@ void XclExpTbxControlObj::SaveXml( XclExpXmlStream& rStrm )
{
pDrawing->singleElement(FSNS(XML_xdr, XML_cNvPr),
XML_id, OString::number(mnShapeId).getStr(),
- XML_name, msCtrlName.toUtf8(), // control name
- XML_descr, msLabel.toUtf8(), // description as alt text
+ XML_name, msCtrlName, // control name
+ XML_descr, msLabel, // description as alt text
XML_hidden, mbVisible ? "0" : "1");
pDrawing->singleElement(FSNS(XML_xdr, XML_cNvSpPr));
}
@@ -1222,7 +1222,7 @@ void XclExpTbxControlObj::SaveXml( XclExpXmlStream& rStrm )
pDrawing->startElementNS(XML_a, XML_p);
pDrawing->startElementNS(XML_a, XML_r);
pDrawing->startElementNS(XML_a, XML_t);
- pDrawing->write(msLabel.toUtf8());
+ pDrawing->write(msLabel);
pDrawing->endElementNS(XML_a, XML_t);
pDrawing->endElementNS(XML_a, XML_r);
pDrawing->endElementNS(XML_a, XML_p);
@@ -1284,7 +1284,7 @@ OUString XclExpTbxControlObj::SaveControlPropertiesXml(XclExpXmlStream& rStrm) c
pFormControl->write(" fmlaLink=\"");
if (aCellLink.indexOf('!') < 0)
{
- pFormControl->write(GetTabInfo().GetScTabName( mxCellLinkAddress.Tab() ).toUtf8());
+ pFormControl->write(GetTabInfo().GetScTabName(mxCellLinkAddress.Tab()));
pFormControl->write("!");
}
pFormControl->write(aCellLink);
@@ -1311,14 +1311,14 @@ void XclExpTbxControlObj::SaveSheetXml(XclExpXmlStream& rStrm, const OUString& a
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement(FSNS(XML_mc, XML_AlternateContent),
- FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)).toUtf8());
+ FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)));
rWorksheet->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, "x14");
rWorksheet->startElement(
XML_control,
XML_shapeId, OString::number(mnShapeId).getStr(),
- FSNS(XML_r, XML_id), aIdFormControlPr.toUtf8(),
- XML_name, msLabel.toUtf8()); // text to display with checkbox button
+ FSNS(XML_r, XML_id), aIdFormControlPr,
+ XML_name, msLabel); // text to display with checkbox button
rWorksheet->write("<controlPr defaultSize=\"0\" locked=\"1\" autoFill=\"0\" autoLine=\"0\" autoPict=\"0\"");
@@ -1330,7 +1330,7 @@ void XclExpTbxControlObj::SaveSheetXml(XclExpXmlStream& rStrm, const OUString& a
if (!msCtrlName.isEmpty())
{
rWorksheet->write(" altText=\"");
- rWorksheet->write(msCtrlName.toUtf8()); // alt text
+ rWorksheet->write(msCtrlName); // alt text
rWorksheet->write("\"");
}
@@ -1719,15 +1719,15 @@ void XclExpComments::SaveXml( XclExpXmlStream& rStrm )
if( rStrm.getVersion() == oox::core::ISOIEC_29500_2008 )
rComments->startElement( XML_comments,
- XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
- FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)).toUtf8(),
- FSNS(XML_xmlns, XML_xdr), rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)).toUtf8(),
- FSNS(XML_xmlns, XML_v2), rStrm.getNamespaceURL(OOX_NS(mceTest)).toUtf8(),
+ XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)),
+ FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)),
+ FSNS(XML_xmlns, XML_xdr), rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)),
+ FSNS(XML_xmlns, XML_v2), rStrm.getNamespaceURL(OOX_NS(mceTest)),
FSNS( XML_mc, XML_Ignorable ), "v2" );
else
rComments->startElement( XML_comments,
- XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
- FSNS(XML_xmlns, XML_xdr), rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)).toUtf8() );
+ XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)),
+ FSNS(XML_xmlns, XML_xdr), rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)) );
rComments->startElement(XML_authors);
diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx
index 50ef71556a08..db770b0dc6cd 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -461,7 +461,7 @@ void XclExpExtConditionalFormatting::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElementNS( XML_x14, XML_conditionalFormatting,
- FSNS( XML_xmlns, XML_xm ), rStrm.getNamespaceURL(OOX_NS(xm)).toUtf8() );
+ FSNS( XML_xmlns, XML_xm ), rStrm.getNamespaceURL(OOX_NS(xm)) );
maCfRules.SaveXml( rStrm );
rWorksheet->startElementNS(XML_xm, XML_sqref);
@@ -505,7 +505,7 @@ void XclExpExtCalcPr::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_ext,
- FSNS(XML_xmlns, XML_loext), rStrm.getNamespaceURL(OOX_NS(loext)).toUtf8(),
+ FSNS(XML_xmlns, XML_loext), rStrm.getNamespaceURL(OOX_NS(loext)),
XML_uri, maURI );
rWorksheet->singleElementNS(XML_loext, XML_extCalcPr, XML_stringRefSyntax, maSyntax);
@@ -523,7 +523,7 @@ void XclExpExtCondFormat::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_ext,
- FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)).toUtf8(),
+ FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)),
XML_uri, maURI );
rWorksheet->startElementNS(XML_x14, XML_conditionalFormattings);
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 682de83fe8e3..e91b64b5687c 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1077,7 +1077,7 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm)
aFontName = XclTools::GetXclFontName(aFontName);
if (!aFontName.isEmpty())
{
- rStyleSheet->singleElement(XML_name, XML_val, aFontName.toUtf8());
+ rStyleSheet->singleElement(XML_name, XML_val, aFontName);
}
rtl_TextEncoding eTextEnc = (*maDxfData.pFontAttr)->GetCharSet();
@@ -1328,7 +1328,7 @@ void XclExpNumFmt::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
rStyleSheet->singleElement( XML_numFmt,
XML_numFmtId, OString::number(mnXclNumFmt),
- XML_formatCode, maNumFmtString.toUtf8() );
+ XML_formatCode, maNumFmtString );
}
XclExpNumFmtBuffer::XclExpNumFmtBuffer( const XclExpRoot& rRoot ) :
@@ -3193,8 +3193,7 @@ void XclExpXmlStyleSheet::SaveXml( XclExpXmlStream& rStrm )
OUStringToOString(oox::getRelationship(Relationship::STYLES), RTL_TEXTENCODING_UTF8).getStr());
rStrm.PushStream( aStyleSheet );
- aStyleSheet->startElement( XML_styleSheet,
- XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8() );
+ aStyleSheet->startElement(XML_styleSheet, XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)));
CreateRecord( EXC_ID_FORMATLIST )->SaveXml( rStrm );
CreateRecord( EXC_ID_FONTLIST )->SaveXml( rStrm );
diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx
index 0badff184841..ec0f723c4974 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -129,8 +129,7 @@ void WriteAnimationProperty(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
pFS->singleElementNS(XML_p, XML_fltVal, XML_val, OString::number(fDouble));
break;
case TypeClass_STRING:
- pFS->singleElementNS(XML_p, XML_strVal, XML_val,
- (*o3tl::doAccess<OUString>(rAny)).toUtf8());
+ pFS->singleElementNS(XML_p, XML_strVal, XML_val, *o3tl::doAccess<OUString>(rAny));
break;
default:
break;
@@ -837,7 +836,7 @@ void PPTXAnimationExport::WriteAnimationNodeAnimate(sal_Int32 nXmlNodeType)
aPath = ::basegfx::utils::exportToSvgD(aPolyPoly, false, false, true, true);
}
- mpFS->startElementNS(XML_p, nXmlNodeType, XML_origin, "layout", XML_path, aPath.toUtf8());
+ mpFS->startElementNS(XML_p, nXmlNodeType, XML_origin, "layout", XML_path, aPath);
}
else if (nXmlNodeType == XML_animRot)
{
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 428cfe6169e6..e1cb766858c5 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -955,14 +955,14 @@ void PowerPointExport::WriteAuthors()
"commentAuthors.xml");
pFS->startElementNS(XML_p, XML_cmAuthorLst,
- FSNS(XML_xmlns, XML_p), this->getNamespaceURL(OOX_NS(ppt)).toUtf8());
+ FSNS(XML_xmlns, XML_p), getNamespaceURL(OOX_NS(ppt)));
for (const AuthorsMap::value_type& i : maAuthors)
{
pFS->singleElementNS(XML_p, XML_cmAuthor,
XML_id, OString::number(i.second.nId),
- XML_name, i.first.toUtf8(),
- XML_initials, lcl_GetInitials(i.first).toUtf8(),
+ XML_name, i.first,
+ XML_initials, lcl_GetInitials(i.first),
XML_lastIdx, OString::number(i.second.nLastIndex),
XML_clrIdx, OString::number(i.second.nId));
}
@@ -1004,7 +1004,7 @@ bool PowerPointExport::WriteComments(sal_uInt32 nPageNum)
"application/vnd.openxmlformats-officedocument.presentationml.comments+xml");
pFS->startElementNS(XML_p, XML_cmLst,
- FSNS(XML_xmlns, XML_p), this->getNamespaceURL(OOX_NS(ppt)).toUtf8());
+ FSNS(XML_xmlns, XML_p), this->getNamespaceURL(OOX_NS(ppt)));
do
{
@@ -1092,7 +1092,7 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
mPresentationFS->singleElementNS(XML_p, XML_sldId,
XML_id, OString::number(GetNewSlideId()),
- FSNS(XML_r, XML_id), sRelId.toUtf8());
+ FSNS(XML_r, XML_id), sRelId);
if (nPageNum == mnPages - 1)
mPresentationFS->endElementNS(XML_p, XML_sldIdLst);
@@ -1222,7 +1222,7 @@ void PowerPointExport::AddLayoutIdAndRelation(const FSHelperPtr& pFS, sal_Int32
pFS->singleElementNS(XML_p, XML_sldLayoutId,
XML_id, OString::number(GetNewSlideMasterId()),
- FSNS(XML_r, XML_id), sRelId.toUtf8());
+ FSNS(XML_r, XML_id), sRelId);
}
void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPropertySet > const& aXBackgroundPropSet)
@@ -1243,7 +1243,7 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro
mPresentationFS->singleElementNS(XML_p, XML_sldMasterId,
XML_id, OString::number(GetNewSlideMasterId()),
- FSNS(XML_r, XML_id), sRelId.toUtf8());
+ FSNS(XML_r, XML_id), sRelId);
if (nPageNum == mnMasterPages - 1)
mPresentationFS->endElementNS(XML_p, XML_sldMasterIdLst);
@@ -1839,7 +1839,7 @@ void PowerPointExport::WriteTheme(sal_Int32 nThemeNum)
"application/vnd.openxmlformats-officedocument.theme+xml");
pFS->startElementNS(XML_a, XML_theme,
- FSNS(XML_xmlns, XML_a), this->getNamespaceURL(OOX_NS(dml)).toUtf8(),
+ FSNS(XML_xmlns, XML_a), this->getNamespaceURL(OOX_NS(dml)),
XML_name, "Office Theme");
pFS->startElementNS(XML_a, XML_themeElements);
@@ -1896,7 +1896,7 @@ void PowerPointExport::WriteNotesMaster()
"notesMasters/notesMaster1.xml");
mPresentationFS->singleElementNS(XML_p, XML_notesMasterId,
- FSNS(XML_r, XML_id), sRelId.toUtf8());
+ FSNS(XML_r, XML_id), sRelId);
mPresentationFS->endElementNS(XML_p, XML_notesMasterIdLst);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 920fd650895e..1f4684e3f255 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -184,27 +184,26 @@ class FFDataWriterHelper
const OUString& rHint )
{
m_pSerializer->startElementNS(XML_w, XML_ffData);
- m_pSerializer->singleElementNS(XML_w, XML_name, FSNS(XML_w, XML_val), rName.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_name, FSNS(XML_w, XML_val), rName);
m_pSerializer->singleElementNS(XML_w, XML_enabled);
m_pSerializer->singleElementNS(XML_w, XML_calcOnExit, FSNS(XML_w, XML_val), "0");
if ( !rEntryMacro.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_entryMacro,
- FSNS(XML_w, XML_val), rEntryMacro.toUtf8() );
+ FSNS(XML_w, XML_val), rEntryMacro );
if ( !rExitMacro.isEmpty() )
- m_pSerializer->singleElementNS( XML_w, XML_exitMacro,
- FSNS(XML_w, XML_val), rExitMacro.toUtf8() );
+ m_pSerializer->singleElementNS(XML_w, XML_exitMacro, FSNS(XML_w, XML_val), rExitMacro);
if ( !rHelp.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_helpText,
FSNS(XML_w, XML_type), "text",
- FSNS(XML_w, XML_val), rHelp.toUtf8() );
+ FSNS(XML_w, XML_val), rHelp );
if ( !rHint.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_statusText,
FSNS(XML_w, XML_type), "text",
- FSNS(XML_w, XML_val), rHint.toUtf8() );
+ FSNS(XML_w, XML_val), rHint );
}
void writeFinish()
@@ -247,17 +246,14 @@ public:
m_pSerializer->startElementNS(XML_w, XML_textInput);
if ( !rType.isEmpty() )
- m_pSerializer->singleElementNS( XML_w, XML_type,
- FSNS(XML_w, XML_val), rType.toUtf8() );
+ m_pSerializer->singleElementNS(XML_w, XML_type, FSNS(XML_w, XML_val), rType);
if ( !rDefaultText.isEmpty() )
- m_pSerializer->singleElementNS( XML_w, XML_default,
- FSNS(XML_w, XML_val), rDefaultText.toUtf8() );
+ m_pSerializer->singleElementNS(XML_w, XML_default, FSNS(XML_w, XML_val), rDefaultText);
if ( nMaxLength )
m_pSerializer->singleElementNS( XML_w, XML_maxLength,
FSNS(XML_w, XML_val), OString::number(nMaxLength) );
if ( !rFormat.isEmpty() )
- m_pSerializer->singleElementNS( XML_w, XML_format,
- FSNS(XML_w, XML_val), rFormat.toUtf8() );
+ m_pSerializer->singleElementNS(XML_w, XML_format, FSNS(XML_w, XML_val), rFormat);
m_pSerializer->endElementNS( XML_w, XML_textInput );
writeFinish();
@@ -821,8 +817,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
if (nSdtPrToken == FSNS( XML_w, XML_date ) || nSdtPrToken == FSNS( XML_w, XML_docPartObj ) || nSdtPrToken == FSNS( XML_w, XML_docPartList ) || nSdtPrToken == FSNS( XML_w14, XML_checkbox )) {
const uno::Sequence<xml::FastAttribute> aChildren = pSdtPrTokenChildren->getFastAttributes();
for( const auto& rChild : aChildren )
- m_pSerializer->singleElement( rChild.Token,
- FSNS(XML_w, XML_val), rChild.Value.toUtf8() );
+ m_pSerializer->singleElement(rChild.Token, FSNS(XML_w, XML_val), rChild.Value);
}
m_pSerializer->endElement( nSdtPrToken );
@@ -852,8 +847,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
}
if (!rSdtPrAlias.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_alias, FSNS(XML_w, XML_val),
- rSdtPrAlias.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_alias, FSNS(XML_w, XML_val), rSdtPrAlias);
m_pSerializer->endElementNS( XML_w, XML_sdtPr );
@@ -1256,8 +1250,8 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar
m_pSerializer->startElementNS(XML_w, XML_smartTagPr);
for (const auto& rStatement : aStatements)
m_pSerializer->singleElementNS(XML_w, XML_attr,
- FSNS(XML_w, XML_name), rStatement.first.toUtf8(),
- FSNS(XML_w, XML_val), rStatement.second.toUtf8());
+ FSNS(XML_w, XML_name), rStatement.first,
+ FSNS(XML_w, XML_val), rStatement.second);
m_pSerializer->endElementNS(XML_w, XML_smartTagPr);
m_pSerializer->endElementNS(XML_w, XML_smartTag);
}
@@ -1651,7 +1645,7 @@ void DocxAttributeOutput::DoWriteBookmarkTagStart(const OUString & bookmarkName)
{
m_pSerializer->singleElementNS(XML_w, XML_bookmarkStart,
FSNS(XML_w, XML_id), OString::number(m_nNextBookmarkId),
- FSNS(XML_w, XML_name), BookmarkToWord(bookmarkName).toUtf8());
+ FSNS(XML_w, XML_name), BookmarkToWord(bookmarkName));
}
void DocxAttributeOutput::DoWriteBookmarkTagEnd(const OUString & bookmarkName)
@@ -1745,8 +1739,8 @@ void DocxAttributeOutput::DoWritePermissionTagStart(const OUString & permission)
const OUString permissionName = permissionIdAndName.copy(sparatorIndex + 1);
m_pSerializer->singleElementNS(XML_w, XML_permStart,
- FSNS(XML_w, XML_id), BookmarkToWord(permissionId).toUtf8(),
- FSNS(XML_w, XML_edGrp), BookmarkToWord(permissionName).toUtf8());
+ FSNS(XML_w, XML_id), BookmarkToWord(permissionId),
+ FSNS(XML_w, XML_edGrp), BookmarkToWord(permissionName));
}
else // if (permission.startsWith("permission-for-user:", &permissionIdAndName))
{
@@ -1755,8 +1749,8 @@ void DocxAttributeOutput::DoWritePermissionTagStart(const OUString & permission)
const OUString permissionName = permissionIdAndName.copy(sparatorIndex + 1);
m_pSerializer->singleElementNS(XML_w, XML_permStart,
- FSNS(XML_w, XML_id), BookmarkToWord(permissionId).toUtf8(),
- FSNS(XML_w, XML_ed), BookmarkToWord(permissionName).toUtf8());
+ FSNS(XML_w, XML_id), BookmarkToWord(permissionId),
+ FSNS(XML_w, XML_ed), BookmarkToWord(permissionName));
}
}
@@ -1779,7 +1773,7 @@ void DocxAttributeOutput::DoWritePermissionTagEnd(const OUString & permission)
const OUString permissionId = permissionIdAndName.copy(0, sparatorIndex);
m_pSerializer->singleElementNS(XML_w, XML_permEnd,
- FSNS(XML_w, XML_id), BookmarkToWord(permissionId).toUtf8());
+ FSNS(XML_w, XML_id), BookmarkToWord(permissionId));
}
}
@@ -1918,17 +1912,16 @@ void DocxAttributeOutput::WriteFormDateStart(const OUString& sFullDate, const OU
m_pSerializer->startElementNS(XML_w, XML_sdtPr);
if(!sFullDate.isEmpty())
- m_pSerializer->startElementNS(XML_w, XML_date, FSNS(XML_w, XML_fullDate), sFullDate.toUtf8());
+ m_pSerializer->startElementNS(XML_w, XML_date, FSNS(XML_w, XML_fullDate), sFullDate);
else
m_pSerializer->startElementNS(XML_w, XML_date);
// Replace quotation mark used for marking static strings in date format
- OString sUTF8DateFormat = sDateFormat.toUtf8();
- sUTF8DateFormat = sUTF8DateFormat.replaceAll("\"", "'");
+ OUString sDateFormat1 = sDateFormat.replaceAll("\"", "'");
m_pSerializer->singleElementNS(XML_w, XML_dateFormat,
- FSNS(XML_w, XML_val), sUTF8DateFormat);
+ FSNS(XML_w, XML_val), sDateFormat1);
m_pSerializer->singleElementNS(XML_w, XML_lid,
- FSNS(XML_w, XML_val), sLang.toUtf8());
+ FSNS(XML_w, XML_val), sLang);
m_pSerializer->singleElementNS(XML_w, XML_storeMappedDataAs,
FSNS(XML_w, XML_val), "dateTime");
m_pSerializer->singleElementNS(XML_w, XML_calendar,
@@ -2892,7 +2885,7 @@ void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, co
lang::Locale aLocale( SwBreakIt::Get()->GetLocale(
rNode.GetLang( nPos ) ) );
OUString sLang( LanguageTag::convertToBcp47( aLocale) );
- m_pSerializer->singleElementNS(XML_w, XML_lid, FSNS(XML_w, XML_val), sLang.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_lid, FSNS(XML_w, XML_val), sLang);
m_pSerializer->endElementNS( XML_w, XML_rubyPr );
@@ -3052,7 +3045,6 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
OString aId( OString::number( pRedlineData->GetSeqNo() ) );
const OUString &rAuthor( SW_MOD()->GetRedlineAuthor( pRedlineData->GetAuthor() ) );
- OString aAuthor( rAuthor.toUtf8() );
OString aDate( DateTimeToOString( pRedlineData->GetTimeStamp() ) );
switch( pRedlineData->GetType() )
@@ -3066,7 +3058,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
case RedlineType::Format:
m_pSerializer->startElementNS( XML_w, XML_rPrChange,
FSNS( XML_w, XML_id ), aId,
- FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_author ), rAuthor,
FSNS( XML_w, XML_date ), aDate );
m_pSerializer->endElementNS( XML_w, XML_rPrChange );
@@ -3075,7 +3067,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
case RedlineType::ParagraphFormat:
m_pSerializer->startElementNS( XML_w, XML_pPrChange,
FSNS( XML_w, XML_id ), aId,
- FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_author ), rAuthor,
FSNS( XML_w, XML_date ), aDate );
// Check if there is any extra data stored in the redline object
@@ -4450,9 +4442,9 @@ void DocxAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ )
void DocxAttributeOutput::StartStyles()
{
m_pSerializer->startElementNS( XML_w, XML_styles,
- FSNS( XML_xmlns, XML_w ), GetExport().GetFilter().getNamespaceURL(OOX_NS(doc)).toUtf8(),
- FSNS( XML_xmlns, XML_w14 ), GetExport().GetFilter().getNamespaceURL(OOX_NS(w14)).toUtf8(),
- FSNS( XML_xmlns, XML_mc ), GetExport().GetFilter().getNamespaceURL(OOX_NS(mce)).toUtf8(),
+ FSNS( XML_xmlns, XML_w ), GetExport().GetFilter().getNamespaceURL(OOX_NS(doc)),
+ FSNS( XML_xmlns, XML_w14 ), GetExport().GetFilter().getNamespaceURL(OOX_NS(w14)),
+ FSNS( XML_xmlns, XML_mc ), GetExport().GetFilter().getNamespaceURL(OOX_NS(mce)),
FSNS( XML_mc, XML_Ignorable ), "w14" );
DocDefaults();
@@ -4980,7 +4972,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
sURL, !sURL.startsWith("#") );
m_pSerializer->singleElementNS( XML_a, XML_hlinkClick,
FSNS( XML_xmlns, XML_a ), "http://schemas.openxmlformats.org/drawingml/2006/main",
- FSNS( XML_r, XML_id ), sRelId.toUtf8());
+ FSNS( XML_r, XML_id ), sRelId);
}
}
@@ -4989,25 +4981,24 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
m_pSerializer->startElementNS(XML_wp, XML_cNvGraphicFramePr);
// TODO change aspect?
m_pSerializer->singleElementNS( XML_a, XML_graphicFrameLocks,
- FSNS( XML_xmlns, XML_a ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8(),
+ FSNS( XML_xmlns, XML_a ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)),
XML_noChangeAspect, "1" );
m_pSerializer->endElementNS( XML_wp, XML_cNvGraphicFramePr );
m_pSerializer->startElementNS( XML_a, XML_graphic,
- FSNS( XML_xmlns, XML_a ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8() );
+ FSNS( XML_xmlns, XML_a ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)) );
m_pSerializer->startElementNS( XML_a, XML_graphicData,
XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/picture" );
m_pSerializer->startElementNS( XML_pic, XML_pic,
- FSNS( XML_xmlns, XML_pic ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlPicture)).toUtf8() );
+ FSNS( XML_xmlns, XML_pic ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlPicture)) );
m_pSerializer->startElementNS(XML_pic, XML_nvPicPr);
// It seems pic:cNvpr and wp:docPr are pretty much the same thing with the same attributes
m_pSerializer->startElementNS(XML_pic, XML_cNvPr, docPrAttrListRef);
if(!sURL.isEmpty())
- m_pSerializer->singleElementNS( XML_a, XML_hlinkClick,
- FSNS( XML_r, XML_id ), sRelId.toUtf8());
+ m_pSerializer->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId);
m_pSerializer->endElementNS( XML_pic, XML_cNvPr );
@@ -5160,12 +5151,12 @@ void DocxAttributeOutput::WritePostponedChart()
*/
m_pSerializer->singleElementNS( XML_wp, XML_docPr,
XML_id, OString::number(m_anchorId++),
- XML_name, sName.toUtf8() );
+ XML_name, sName );
m_pSerializer->singleElementNS(XML_wp, XML_cNvGraphicFramePr);
m_pSerializer->startElementNS( XML_a, XML_graphic,
- FSNS( XML_xmlns, XML_a ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8() );
+ FSNS( XML_xmlns, XML_a ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)) );
m_pSerializer->startElementNS( XML_a, XML_graphicData,
XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart" );
@@ -5175,8 +5166,8 @@ void DocxAttributeOutput::WritePostponedChart()
aRelId = m_rExport.OutputChart( xChartDoc, m_nChartCount, m_pSerializer );
m_pSerializer->singleElementNS( XML_c, XML_chart,
- FSNS( XML_xmlns, XML_c ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlChart)).toUtf8(),
- FSNS( XML_xmlns, XML_r ), GetExport().GetFilter().getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
+ FSNS( XML_xmlns, XML_c ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlChart)),
+ FSNS( XML_xmlns, XML_r ), GetExport().GetFilter().getNamespaceURL(OOX_NS(officeRel)),
FSNS( XML_r, XML_id ), aRelId );
m_pSerializer->endElementNS( XML_a, XML_graphicData );
@@ -5290,8 +5281,7 @@ void DocxAttributeOutput::WritePostponedFormControl(const SdrObject* pObject)
else
m_pSerializer->startElementNS(XML_w, XML_date);
- m_pSerializer->singleElementNS(XML_w, XML_dateFormat,
- FSNS(XML_w, XML_val), sDateFormat.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_dateFormat, FSNS(XML_w, XML_val), sDateFormat);
m_pSerializer->singleElementNS(XML_w, XML_lid,
FSNS(XML_w, XML_val), "en-US");
m_pSerializer->singleElementNS(XML_w, XML_storeMappedDataAs,
@@ -5329,8 +5319,8 @@ void DocxAttributeOutput::WritePostponedFormControl(const SdrObject* pObject)
for (const auto& rItem : aItems)
{
m_pSerializer->singleElementNS(XML_w, XML_listItem,
- FSNS(XML_w, XML_displayText), rItem.toUtf8(),
- FSNS(XML_w, XML_value), rItem.toUtf8());
+ FSNS(XML_w, XML_displayText), rItem,
+ FSNS(XML_w, XML_value), rItem);
}
m_pSerializer->endElementNS(XML_w, XML_dropDownList);
@@ -5608,7 +5598,7 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
// shape filled with the preview image
m_pSerializer->singleElementNS( XML_v, XML_imagedata,
- FSNS( XML_r, XML_id ), sImageId.toUtf8(),
+ FSNS( XML_r, XML_id ), sImageId,
FSNS( XML_o, XML_title ), "" );
//export wrap settings
@@ -5641,9 +5631,9 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
// OLE object definition
m_pSerializer->singleElementNS( XML_o, XML_OLEObject,
XML_Type, "Embed",
- XML_ProgID, sProgID.toUtf8(),
+ XML_ProgID, sProgID,
XML_ShapeID, sShapeId.getStr(),
- XML_DrawAspect, sDrawAspect.toUtf8(),
+ XML_DrawAspect, sDrawAspect,
XML_ObjectID, "_" + OString::number(comphelper::rng::uniform_int_distribution(0, std::numeric_limits<int>::max())),
FSNS( XML_r, XML_id ), sId );
@@ -6093,15 +6083,13 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
}
if (!aLink.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_link,
- FSNS(XML_w, XML_val), aLink.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_link, FSNS(XML_w, XML_val), aLink);
if ( bAutoUpdate )
m_pSerializer->singleElementNS(XML_w, XML_autoRedefine);
if (!aUiPriority.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_uiPriority,
- FSNS(XML_w, XML_val), aUiPriority.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_uiPriority, FSNS(XML_w, XML_val), aUiPriority);
if (bSemiHidden)
m_pSerializer->singleElementNS(XML_w, XML_semiHidden);
if (bUnhideWhenUsed)
@@ -6112,8 +6100,7 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
if (bLocked)
m_pSerializer->singleElementNS(XML_w, XML_locked);
if (!aRsid.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_rsid,
- FSNS(XML_w, XML_val), aRsid.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_rsid, FSNS(XML_w, XML_val), aRsid);
}
void DocxAttributeOutput::EndStyle()
@@ -6607,7 +6594,7 @@ void DocxAttributeOutput::TextVerticalAdjustment( const drawing::TextVerticalAdj
void DocxAttributeOutput::StartFont( const OUString& rFamilyName ) const
{
- m_pSerializer->startElementNS(XML_w, XML_font, FSNS(XML_w, XML_name), rFamilyName.toUtf8());
+ m_pSerializer->startElementNS(XML_w, XML_font, FSNS(XML_w, XML_name), rFamilyName);
}
void DocxAttributeOutput::EndFont() const
@@ -6617,7 +6604,7 @@ void DocxAttributeOutput::EndFont() const
void DocxAttributeOutput::FontAlternateName( const OUString& rName ) const
{
- m_pSerializer->singleElementNS(XML_w, XML_altName, FSNS(XML_w, XML_val), rName.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_altName, FSNS(XML_w, XML_val), rName);
}
void DocxAttributeOutput::FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const
@@ -6997,7 +6984,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
static OUString aZeroWidthSpace(u'\x200B');
if (aLevelText == aZeroWidthSpace)
aLevelText.clear();
- m_pSerializer->singleElementNS(XML_w, XML_lvlText, FSNS(XML_w, XML_val), aLevelText.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_lvlText, FSNS(XML_w, XML_val), aLevelText);
}
// bullet
@@ -7613,9 +7600,9 @@ void DocxAttributeOutput::WritePostitFields()
OString idstr = OString::number( rPair.second);
const SwPostItField* f = rPair.first;
m_pSerializer->startElementNS( XML_w, XML_comment, FSNS( XML_w, XML_id ), idstr,
- FSNS( XML_w, XML_author ), f->GetPar1().toUtf8(),
+ FSNS( XML_w, XML_author ), f->GetPar1(),
FSNS( XML_w, XML_date ), DateTimeToOString(f->GetDateTime()),
- FSNS( XML_w, XML_initials ), f->GetInitials().toUtf8() );
+ FSNS( XML_w, XML_initials ), f->GetInitials() );
if (f->GetTextObject() != nullptr)
{
@@ -7662,8 +7649,7 @@ void DocxAttributeOutput::WritePendingPlaceholder()
m_pSerializer->startElementNS(XML_w, XML_sdt);
m_pSerializer->startElementNS(XML_w, XML_sdtPr);
if( !pField->GetPar2().isEmpty())
- m_pSerializer->singleElementNS( XML_w, XML_alias,
- FSNS( XML_w, XML_val ), pField->GetPar2().toUtf8() );
+ m_pSerializer->singleElementNS(XML_w, XML_alias, FSNS(XML_w, XML_val), pField->GetPar2());
m_pSerializer->singleElementNS(XML_w, XML_temporary);
m_pSerializer->singleElementNS(XML_w, XML_showingPlcHdr);
m_pSerializer->singleElementNS(XML_w, XML_text);
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 1b8f95f48115..c5f9d5d4eb42 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -332,16 +332,15 @@ void DocxExport::DoComboBox(const OUString& rName,
{
m_pDocumentFS->startElementNS(XML_w, XML_ffData);
- m_pDocumentFS->singleElementNS(XML_w, XML_name, FSNS(XML_w, XML_val), rName.toUtf8());
+ m_pDocumentFS->singleElementNS(XML_w, XML_name, FSNS(XML_w, XML_val), rName);
m_pDocumentFS->singleElementNS(XML_w, XML_enabled);
if ( !rHelp.isEmpty() )
- m_pDocumentFS->singleElementNS(XML_w, XML_helpText, FSNS(XML_w, XML_val), rHelp.toUtf8());
+ m_pDocumentFS->singleElementNS(XML_w, XML_helpText, FSNS(XML_w, XML_val), rHelp);
if ( !rToolTip.isEmpty() )
- m_pDocumentFS->singleElementNS( XML_w, XML_statusText,
- FSNS( XML_w, XML_val ), rToolTip.toUtf8() );
+ m_pDocumentFS->singleElementNS(XML_w, XML_statusText, FSNS(XML_w, XML_val), rToolTip);
m_pDocumentFS->startElementNS(XML_w, XML_ddList);
@@ -357,8 +356,7 @@ void DocxExport::DoComboBox(const OUString& rName,
auto const nSize(std::min(sal_Int32(25), rListItems.getLength()));
for (auto i = 0; i < nSize; ++i)
{
- m_pDocumentFS->singleElementNS( XML_w, XML_listEntry,
- FSNS(XML_w, XML_val), rListItems[i].toUtf8() );
+ m_pDocumentFS->singleElementNS(XML_w, XML_listEntry, FSNS(XML_w, XML_val), rListItems[i]);
}
m_pDocumentFS->endElementNS( XML_w, XML_ddList );
@@ -471,11 +469,11 @@ std::pair<OString, OString> DocxExport::WriteActiveXObject(const uno::Reference<
sBinaryFileName.copy(sBinaryFileName.lastIndexOf("/") + 1) );
pActiveXFS->singleElementNS(XML_ax, XML_ocx,
- FSNS(XML_xmlns, XML_ax), m_pFilter->getNamespaceURL(OOX_NS(ax)).toUtf8(),
- FSNS(XML_xmlns, XML_r), m_pFilter->getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
+ FSNS(XML_xmlns, XML_ax), m_pFilter->getNamespaceURL(OOX_NS(ax)),
+ FSNS(XML_xmlns, XML_r), m_pFilter->getNamespaceURL(OOX_NS(officeRel)),
FSNS(XML_ax, XML_classid), "{" + sGUID + "}",
FSNS(XML_ax, XML_persistence), "persistStorage",
- FSNS(XML_r, XML_id), sBinaryId.toUtf8());
+ FSNS(XML_r, XML_id), sBinaryId);
OString sXMLId = OUStringToOString(m_pFilter->addRelation(m_pDocumentFS->getOutputStream(),
oox::getRelationship(Relationship::CONTROL),
@@ -752,12 +750,12 @@ void DocxExport::WriteNumbering()
m_pDrawingML->SetFS( pNumberingFS );
pNumberingFS->startElementNS( XML_w, XML_numbering,
- FSNS( XML_xmlns, XML_w ), m_pFilter->getNamespaceURL(OOX_NS(doc)).toUtf8(),
- FSNS( XML_xmlns, XML_o ), m_pFilter->getNamespaceURL(OOX_NS(vmlOffice)).toUtf8(),
- FSNS( XML_xmlns, XML_r ), m_pFilter->getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
- FSNS( XML_xmlns, XML_v ), m_pFilter->getNamespaceURL(OOX_NS(vml)).toUtf8(),
- FSNS( XML_xmlns, XML_mc ), m_pFilter->getNamespaceURL(OOX_NS(mce)).toUtf8(),
- FSNS( XML_xmlns, XML_w14 ), m_pFilter->getNamespaceURL(OOX_NS(w14)).toUtf8(),
+ FSNS( XML_xmlns, XML_w ), m_pFilter->getNamespaceURL(OOX_NS(doc)),
+ FSNS( XML_xmlns, XML_o ), m_pFilter->getNamespaceURL(OOX_NS(vmlOffice)),
+ FSNS( XML_xmlns, XML_r ), m_pFilter->getNamespaceURL(OOX_NS(officeRel)),
+ FSNS( XML_xmlns, XML_v ), m_pFilter->getNamespaceURL(OOX_NS(vml)),
+ FSNS( XML_xmlns, XML_mc ), m_pFilter->getNamespaceURL(OOX_NS(mce)),
+ FSNS( XML_xmlns, XML_w14 ), m_pFilter->getNamespaceURL(OOX_NS(w14)),
FSNS( XML_mc, XML_Ignorable ), "w14" );
BulletDefinitions();
@@ -846,7 +844,7 @@ void DocxExport::WriteHeaderFooter( const SwFormat* pFormat, bool bHeader, const
// and write the reference
m_pDocumentFS->singleElementNS( XML_w, nReference,
FSNS( XML_w, XML_type ), pType,
- FSNS( XML_r, XML_id ), aRelId.toUtf8() );
+ FSNS( XML_r, XML_id ), aRelId );
}
void DocxExport::WriteFonts()
@@ -860,8 +858,8 @@ void DocxExport::WriteFonts()
"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml" );
pFS->startElementNS( XML_w, XML_fonts,
- FSNS( XML_xmlns, XML_w ), m_pFilter->getNamespaceURL(OOX_NS(doc)).toUtf8(),
- FSNS( XML_xmlns, XML_r ), m_pFilter->getNamespaceURL(OOX_NS(officeRel)).toUtf8() );
+ FSNS( XML_xmlns, XML_w ), m_pFilter->getNamespaceURL(OOX_NS(doc)),
+ FSNS( XML_xmlns, XML_r ), m_pFilter->getNamespaceURL(OOX_NS(officeRel)) );
// switch the serializer to redirect the output to word/styles.xml
m_pAttrOutput->SetSerializer( pFS );
@@ -934,8 +932,8 @@ void DocxExport::WriteDocVars(const sax_fastparser::FSHelperPtr& pFS)
bStarted = true;
pFS->startElementNS(XML_w, XML_docVars);
}
- pFS->singleElementNS(XML_w, XML_docVar, FSNS(XML_w, XML_name), aKey.toUtf8(),
- FSNS(XML_w, XML_val), aValue.toUtf8());
+ pFS->singleElementNS(XML_w, XML_docVar, FSNS(XML_w, XML_name), aKey,
+ FSNS(XML_w, XML_val), aValue);
}
if (bStarted)
@@ -978,7 +976,7 @@ void DocxExport::WriteSettings()
"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml" );
pFS->startElementNS( XML_w, XML_settings,
- FSNS( XML_xmlns, XML_w ), m_pFilter->getNamespaceURL(OOX_NS(doc)).toUtf8() );
+ FSNS( XML_xmlns, XML_w ), m_pFilter->getNamespaceURL(OOX_NS(doc)) );
// View
if (pViewShell && pViewShell->GetViewOptions()->getBrowseMode())
@@ -1157,9 +1155,9 @@ void DocxExport::WriteSettings()
rThemeFontLangProp.Value >>= aValues[2];
}
pFS->singleElementNS( XML_w, XML_themeFontLang,
- FSNS( XML_w, XML_val ), aValues[0].toUtf8(),
- FSNS( XML_w, XML_eastAsia ), aValues[1].toUtf8(),
- FSNS( XML_w, XML_bidi ), aValues[2].toUtf8() );
+ FSNS( XML_w, XML_val ), aValues[0],
+ FSNS( XML_w, XML_eastAsia ), aValues[1],
+ FSNS( XML_w, XML_bidi ), aValues[2] );
}
else if ( rProp.Name == "CompatSettings" )
{
@@ -1200,9 +1198,9 @@ void DocxExport::WriteSettings()
}
pFS->singleElementNS( XML_w, XML_compatSetting,
- FSNS( XML_w, XML_name ), aName.toUtf8(),
- FSNS( XML_w, XML_uri ), aUri.toUtf8(),
- FSNS( XML_w, XML_val ), aValue.toUtf8());
+ FSNS( XML_w, XML_name ), aName,
+ FSNS( XML_w, XML_uri ), aUri,
+ FSNS( XML_w, XML_val ), aValue);
}
if ( !bHasCompatibilityMode )
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index e0cf42586727..458493391b27 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -900,14 +900,14 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFo
else if (xServiceInfo->supportsService("com.sun.star.drawing.GraphicObjectShape"))
pNamespace = "http://schemas.openxmlformats.org/drawingml/2006/picture";
pFS->startElementNS(XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
- m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8());
+ m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)));
pFS->startElementNS(XML_a, XML_graphicData, XML_uri, pNamespace);
bool bLockedCanvas = lcl_isLockedCanvas(xShape);
if (bLockedCanvas)
pFS->startElementNS(
XML_lc, XML_lockedCanvas, FSNS(XML_xmlns, XML_lc),
- m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dmlLockedCanvas)).toUtf8());
+ m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dmlLockedCanvas)));
m_pImpl->getExport().OutputDML(xShape);
@@ -1228,7 +1228,7 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
pFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef);
pFS->startElementNS(XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
- m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8());
+ m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)));
pFS->startElementNS(XML_a, XML_graphicData, XML_uri,
"http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
pFS->startElementNS(XML_wps, XML_wsp);
@@ -1281,7 +1281,7 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
if (shapeType.isEmpty())
shapeType = "rect";
- pFS->singleElementNS(XML_a, XML_prstGeom, XML_prst, shapeType.toUtf8());
+ pFS->singleElementNS(XML_a, XML_prstGeom, XML_prst, shapeType);
m_pImpl->setDMLTextFrameSyntax(true);
m_pImpl->getExport().OutputFormat(pParentFrame->GetFrameFormat(), false, false, true);
m_pImpl->setDMLTextFrameSyntax(false);
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index 3854e2b6fef4..13633c349241 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -167,9 +167,9 @@ void DocxTableStyleExport::Impl::tableStyleTableCellMar(
{
comphelper::SequenceAsHashMap aMap(
rProp.Value.get<uno::Sequence<beans::PropertyValue>>());
- m_pSerializer->singleElementNS(
- XML_w, nToken, FSNS(XML_w, XML_w), OString::number(aMap["w"].get<sal_Int32>()),
- FSNS(XML_w, XML_type), aMap["type"].get<OUString>().toUtf8());
+ m_pSerializer->singleElementNS(XML_w, nToken, FSNS(XML_w, XML_w),
+ OString::number(aMap["w"].get<sal_Int32>()),
+ FSNS(XML_w, XML_type), aMap["type"].get<OUString>());
}
}
m_pSerializer->endElementNS(XML_w, nType);
@@ -467,14 +467,14 @@ void DocxTableStyleExport::Impl::tableStyleRPr(const uno::Sequence<beans::Proper
if (bSequenceFlag)
{
m_pSerializer->singleElementNS(XML_w, XML_spacing, FSNS(XML_w, XML_val),
- aSpacingSequence[0].Value.get<OUString>().toUtf8());
+ aSpacingSequence[0].Value.get<OUString>());
}
if (!aSpacing.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_spacing, FSNS(XML_w, XML_val), aSpacing.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_spacing, FSNS(XML_w, XML_val), aSpacing);
if (!aSz.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_sz, FSNS(XML_w, XML_val), aSz.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_sz, FSNS(XML_w, XML_val), aSz);
if (!aSzCs.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_szCs, FSNS(XML_w, XML_val), aSzCs.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_szCs, FSNS(XML_w, XML_val), aSzCs);
m_pSerializer->endElementNS(XML_w, XML_rPr);
}
@@ -510,7 +510,7 @@ void DocxTableStyleExport::Impl::tableStylePPr(const uno::Sequence<beans::Proper
handleBoolean(aSnapToGrid, XML_snapToGrid);
tableStylePSpacing(aSpacing);
if (!aJc.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_jc, FSNS(XML_w, XML_val), aJc.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_jc, FSNS(XML_w, XML_val), aJc);
m_pSerializer->endElementNS(XML_w, XML_pPr);
}
@@ -596,7 +596,7 @@ void DocxTableStyleExport::Impl::tableStyleTcPr(const uno::Sequence<beans::Prope
tableStyleTableCellMar(aTcMar, XML_tcMar);
tableStyleShd(aShd);
if (!aVAlign.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_vAlign, FSNS(XML_w, XML_val), aVAlign.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_vAlign, FSNS(XML_w, XML_val), aVAlign);
m_pSerializer->endElementNS(XML_w, XML_tcPr);
}
@@ -629,7 +629,7 @@ void DocxTableStyleExport::Impl::tableStyleTableStylePr(
aTcPr = rProp.Value.get<uno::Sequence<beans::PropertyValue>>();
}
- m_pSerializer->startElementNS(XML_w, XML_tblStylePr, FSNS(XML_w, XML_type), aType.toUtf8());
+ m_pSerializer->startElementNS(XML_w, XML_tblStylePr, FSNS(XML_w, XML_type), aType);
tableStylePPr(aPPr);
tableStyleRPr(aRPr);
@@ -709,12 +709,11 @@ void DocxTableStyleExport::Impl::TableStyle(const uno::Sequence<beans::PropertyV
sax_fastparser::XFastAttributeListRef xAttributeList(pAttributeList);
m_pSerializer->startElementNS(XML_w, XML_style, xAttributeList);
- m_pSerializer->singleElementNS(XML_w, XML_name, FSNS(XML_w, XML_val), aName.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_name, FSNS(XML_w, XML_val), aName);
if (!aBasedOn.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_basedOn, FSNS(XML_w, XML_val), aBasedOn.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_basedOn, FSNS(XML_w, XML_val), aBasedOn);
if (!aUiPriority.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_uiPriority, FSNS(XML_w, XML_val),
- aUiPriority.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_uiPriority, FSNS(XML_w, XML_val), aUiPriority);
if (bSemiHidden)
m_pSerializer->singleElementNS(XML_w, XML_semiHidden);
if (bUnhideWhenUsed)
@@ -722,7 +721,7 @@ void DocxTableStyleExport::Impl::TableStyle(const uno::Sequence<beans::PropertyV
if (bQFormat)
m_pSerializer->singleElementNS(XML_w, XML_qFormat);
if (!aRsid.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_rsid, FSNS(XML_w, XML_val), aRsid.toUtf8());
+ m_pSerializer->singleElementNS(XML_w, XML_rsid, FSNS(XML_w, XML_val), aRsid);
tableStylePPr(aPPr);
tableStyleRPr(aRPr);
More information about the Libreoffice-commits
mailing list