summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-19 02:24:00 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-19 21:20:46 +0200
commit1fe24bb1e2fbe44a4bf2c03297e259b3a18b1235 (patch)
treee237d906174ec0646fef5051e5f6940da31e28cf
parent2a6450cbe8b57cae240d8cfea02e508cfac78dbe (diff)
Further cleanup of FastSerializerHelper's startElement/singleElement[NS]
Drop FSEND_t: C-style varargs code was replaced since version 6.0 in commit d43fc40718217d89cc95cc3c0bc0b8e7926abcc0, so it's time to remove the last bits. Drop int-to-string macros that are simple wrappers over OString::number. Avoid unnecessary string type conversions. Change-Id: I86478577b8e469f99b5a90619e5f78a61f4f23fb Reviewed-on: https://gerrit.libreoffice.org/70964 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--include/oox/export/utils.hxx12
-rw-r--r--include/sax/fshelper.hxx19
-rw-r--r--oox/source/core/xmlfilterbase.cxx34
-rw-r--r--oox/source/export/chartexport.cxx749
-rw-r--r--oox/source/export/drawingml.cxx508
-rw-r--r--oox/source/export/shapes.cxx313
-rw-r--r--oox/source/export/vmlexport.cxx10
-rw-r--r--sax/source/tools/fshelper.cxx4
-rw-r--r--sc/source/filter/excel/excdoc.cxx10
-rw-r--r--sc/source/filter/excel/excrecds.cxx45
-rw-r--r--sc/source/filter/excel/xecontent.cxx110
-rw-r--r--sc/source/filter/excel/xedbdata.cxx27
-rw-r--r--sc/source/filter/excel/xeescher.cxx59
-rw-r--r--sc/source/filter/excel/xeextlst.cxx49
-rw-r--r--sc/source/filter/excel/xelink.cxx60
-rw-r--r--sc/source/filter/excel/xename.cxx8
-rw-r--r--sc/source/filter/excel/xepage.cxx21
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx113
-rw-r--r--sc/source/filter/excel/xerecord.cxx2
-rw-r--r--sc/source/filter/excel/xestream.cxx14
-rw-r--r--sc/source/filter/excel/xestring.cxx10
-rw-r--r--sc/source/filter/excel/xestyle.cxx173
-rw-r--r--sc/source/filter/excel/xetable.cxx104
-rw-r--r--sc/source/filter/excel/xeview.cxx38
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx81
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx61
-rw-r--r--sd/source/filter/eppt/pptx-animations.cxx118
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx173
-rw-r--r--starmath/source/ooxmlexport.cxx193
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx1086
-rw-r--r--sw/source/filter/ww8/docxexport.cxx103
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx167
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.cxx56
33 files changed, 1807 insertions, 2723 deletions
diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx
index fa758089136e..357597e7a5d4 100644
--- a/include/oox/export/utils.hxx
+++ b/include/oox/export/utils.hxx
@@ -24,21 +24,13 @@
#include <rtl/textenc.h>
#include <sal/types.h>
-inline OString I32S_(sal_Int32 x) { return OString::number(x); }
-inline OString I32SHEX_(sal_Int32 x)
+inline OString I32SHEX(sal_Int32 x)
{
OString aStr = OString::number(x, 16);
while (aStr.getLength() < 6)
aStr = OString("0") + aStr;
- return aStr.getStr();
+ return aStr;
}
-inline OString I64S_(sal_Int64 x) { return OString::number(x); }
-inline OString DS_(double x) { return OString::number(x); }
-#define I32S(x) I32S_(x).getStr()
-#define I32SHEX(x) I32SHEX_(x).getStr()
-#define I64S(x) I64S_(x).getStr()
-#define IS(x) OString::number( x ).getStr()
-#define DS(x) DS_(x).getStr()
/**
* @return const char* literal "true" for true value, or literal "false"
diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx
index c5148dcd0b00..7876e48a6c6c 100644
--- a/include/sax/fshelper.hxx
+++ b/include/sax/fshelper.hxx
@@ -31,13 +31,6 @@ namespace com { namespace sun { namespace star { namespace io { class XOutputStr
namespace sax_fastparser { class FastAttributeList; }
#define FSNS(namespc, element) ((namespc << 16) | element)
-// Backwards compatibility for code that used FSEND to terminate the vararg.
-// As soon as no supported LO version has the varargs code, this can be removed entirely
-// (otherwise backports might break silently if people didn't add FSEND).
-// Ctor is there to get an error when trying to pass it to a vararg by accident.
-struct FSEND_t { FSEND_t() {}; };
-static const FSEND_t FSEND = FSEND_t();
-const sal_Int32 FSEND_internal = -1; // same as XML_TOKEN_INVALID
namespace sax_fastparser {
@@ -69,7 +62,7 @@ public:
pushAttributeValue(attribute, value);
startElement(elementTokenId, std::forward<Args>(args)...);
}
- void startElement(sal_Int32 elementTokenId, FSEND_t);
+ void startElement(sal_Int32 elementTokenId);
/// Start an element. After the first two arguments there can be a number of (attribute, value) pairs.
template<typename... Args>
@@ -85,9 +78,9 @@ public:
pushAttributeValue(attribute, value);
startElementNS(namespaceTokenId, elementTokenId, std::forward<Args>(args)...);
}
- void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, FSEND_t)
+ void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId)
{
- startElement(FSNS(namespaceTokenId, elementTokenId), FSEND);
+ startElement(FSNS(namespaceTokenId, elementTokenId));
}
/// Create a single element. After the first argument there can be a number of (attribute, value) pairs.
@@ -104,7 +97,7 @@ public:
pushAttributeValue(attribute, value);
singleElement(elementTokenId, std::forward<Args>(args)...);
}
- void singleElement(sal_Int32 elementTokenId, FSEND_t);
+ void singleElement(sal_Int32 elementTokenId);
/// Create a single element. After the first two arguments there can be a number of (attribute, value) pairs.
template<typename... Args>
@@ -120,9 +113,9 @@ public:
pushAttributeValue(attribute, value);
singleElementNS(namespaceTokenId, elementTokenId, std::forward<Args>(args)...);
}
- void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, FSEND_t)
+ void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId)
{
- singleElement(FSNS(namespaceTokenId, elementTokenId), FSEND);
+ singleElement(FSNS(namespaceTokenId, elementTokenId));
}
void endElement(sal_Int32 elementTokenId);
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 632a3ce357b6..738412fb182c 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -545,7 +545,7 @@ OUString XmlFilterBase::addRelation( const Reference< XOutputStream >& rOutputSt
static void
writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const OUString& sValue )
{
- pDoc->startElement( nXmlElement, FSEND );
+ pDoc->startElement(nXmlElement);
pDoc->writeEscaped( sValue );
pDoc->endElement( nXmlElement );
}
@@ -553,7 +553,7 @@ writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const OUString& sV
static void
writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const sal_Int32 nValue )
{
- pDoc->startElement( nXmlElement, FSEND );
+ pDoc->startElement(nXmlElement);
pDoc->write( nValue );
pDoc->endElement( nXmlElement );
}
@@ -565,11 +565,9 @@ writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const util::DateTi
return;
if ( ( nXmlElement >> 16 ) != XML_dcterms )
- pDoc->startElement( nXmlElement, FSEND );
+ pDoc->startElement(nXmlElement);
else
- pDoc->startElement( nXmlElement,
- FSNS( XML_xsi, XML_type ), "dcterms:W3CDTF",
- FSEND );
+ pDoc->startElement(nXmlElement, FSNS(XML_xsi, XML_type), "dcterms:W3CDTF");
char pStr[200];
snprintf( pStr, sizeof( pStr ), "%d-%02d-%02dT%02d:%02d:%02dZ",
@@ -622,12 +620,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 ), OUStringToOString(rSelf.getNamespaceURL(OOX_NS(packageMetaCorePr)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_dc ), OUStringToOString(rSelf.getNamespaceURL(OOX_NS(dc)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_dcterms ), OUStringToOString(rSelf.getNamespaceURL(OOX_NS(dcTerms)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_dcmitype ), OUStringToOString(rSelf.getNamespaceURL(OOX_NS(dcmiType)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_xsi ), OUStringToOString(rSelf.getNamespaceURL(OOX_NS(xsi)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ 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());
#ifdef OOXTODO
writeElement( pCoreProps, FSNS( XML_cp, XML_category ), "category" );
@@ -665,9 +662,8 @@ writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >
"docProps/app.xml",
"application/vnd.openxmlformats-officedocument.extended-properties+xml" );
pAppProps->startElement( XML_Properties,
- XML_xmlns, OUStringToOString(rSelf.getNamespaceURL(OOX_NS(officeExtPr)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_vt ), OUStringToOString(rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeExtPr)).toUtf8(),
+ FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)).toUtf8());
writeElement( pAppProps, XML_Template, xProperties->getTemplateName() );
#ifdef OOXTODO
@@ -778,9 +774,8 @@ writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentPropertie
"docProps/custom.xml",
"application/vnd.openxmlformats-officedocument.custom-properties+xml" );
pAppProps->startElement( XML_Properties,
- XML_xmlns, OUStringToOString(rSelf.getNamespaceURL(OOX_NS(officeCustomPr)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_vt ), OUStringToOString(rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ XML_xmlns, rSelf.getNamespaceURL(OOX_NS(officeCustomPr)).toUtf8(),
+ FSNS(XML_xmlns, XML_vt), rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)).toUtf8());
size_t nIndex = 0;
for (const auto& rProp : aprop)
@@ -792,8 +787,7 @@ writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentPropertie
pAppProps->startElement( XML_property ,
XML_fmtid, "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",
XML_pid, OString::number(nIndex + 2),
- XML_name, aName,
- FSEND);
+ XML_name, aName);
switch ( rProp.Value.getValueTypeClass() )
{
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 54379188649e..6d4dc1efa1b3 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -453,9 +453,9 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
- pFS->startElementNS( mnXmlNamespace, XML_graphicFrame, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_graphicFrame);
- pFS->startElementNS( mnXmlNamespace, XML_nvGraphicFramePr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_nvGraphicFramePr);
// TODO: get the correct chart name chart id
OUString sName = "Object 1";
@@ -464,9 +464,8 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
sName = xNamed->getName();
pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( nID ),
- XML_name, sName.toUtf8(),
- FSEND );
+ XML_id, OString::number(nID),
+ XML_name, sName.toUtf8());
OUString sURL;
if ( GetProperty( xShapeProps, "URL" ) )
@@ -479,27 +478,23 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
mpURLTransformer->isExternalURL(sURL));
mpFS->singleElementNS( XML_a, XML_hlinkClick,
- FSNS( XML_r,XML_id ), sRelId.toUtf8(),
- FSEND );
+ FSNS( XML_r,XML_id ), sRelId.toUtf8() );
}
pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
- pFS->singleElementNS( mnXmlNamespace, XML_cNvGraphicFramePr,
- FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvGraphicFramePr);
if( GetDocumentType() == DOCUMENT_PPTX )
- pFS->singleElementNS( mnXmlNamespace, XML_nvPr,
- FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_nvPr);
pFS->endElementNS( mnXmlNamespace, XML_nvGraphicFramePr );
// visual chart properties
WriteShapeTransformation( xShape, mnXmlNamespace );
// writer chart object
- pFS->startElement( FSNS( XML_a, XML_graphic ), FSEND );
+ pFS->startElement(FSNS(XML_a, XML_graphic));
pFS->startElement( FSNS( XML_a, XML_graphicData ),
- XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart",
- FSEND );
+ XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart" );
OUString sId;
const char* sFullPath = nullptr;
const char* sRelativePath = nullptr;
@@ -552,8 +547,7 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
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(),
- FSEND );
+ FSNS(XML_r, XML_id), sId.toUtf8() );
pFS->endElement( FSNS( XML_a, XML_graphicData ) );
pFS->endElement( FSNS( XML_a, XML_graphic ) );
@@ -626,18 +620,13 @@ 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 ), OUStringToOString(pFB->getNamespaceURL(OOX_NS(dmlChart)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_a ), OUStringToOString(pFB->getNamespaceURL(OOX_NS(dml)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_r ), OUStringToOString(pFB->getNamespaceURL(OOX_NS(officeRel)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ 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());
// TODO: get the correct editing language
- pFS->singleElement( FSNS( XML_c, XML_lang ),
- XML_val, "en-US",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_lang), XML_val, "en-US");
- pFS->singleElement(FSNS( XML_c, XML_roundedCorners),
- XML_val, "0",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_roundedCorners), XML_val, "0");
if( !bIncludeTable )
{
@@ -703,9 +692,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), OUStringToOString(sRelId, RTL_TEXTENCODING_UTF8),
- FSEND);
+ pFS->singleElementNS(XML_c, XML_externalData, FSNS(XML_r, XML_id), sRelId.toUtf8());
}
}
@@ -741,8 +728,7 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC
// chart element
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_chart ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_chart));
// title
if( bHasMainTitle )
@@ -751,9 +737,7 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC
if( xShape.is() )
{
exportTitle( xShape );
- pFS->singleElement( FSNS(XML_c, XML_autoTitleDeleted),
- XML_val, "0",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_autoTitleDeleted), XML_val, "0");
}
}
InitPlotArea( );
@@ -765,8 +749,7 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC
Reference< beans::XPropertySet > xFloor( mxNewDiagram->getFloor(), uno::UNO_QUERY );
if( xFloor.is() )
{
- pFS->startElement( FSNS( XML_c, XML_floor ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_floor));
exportShapeProps( xFloor );
pFS->endElement( FSNS( XML_c, XML_floor ) );
}
@@ -777,14 +760,12 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC
if( xWall.is() )
{
// sideWall
- pFS->startElement( FSNS( XML_c, XML_sideWall ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_sideWall));
exportShapeProps( xWall );
pFS->endElement( FSNS( XML_c, XML_sideWall ) );
// backWall
- pFS->startElement( FSNS( XML_c, XML_backWall ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_backWall));
exportShapeProps( xWall );
pFS->endElement( FSNS( XML_c, XML_backWall ) );
}
@@ -800,9 +781,7 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC
uno::Any aPlotVisOnly = xDiagramPropSet->getPropertyValue("IncludeHiddenCells");
bool bIncludeHiddenCells = false;
aPlotVisOnly >>= bIncludeHiddenCells;
- pFS->singleElement( FSNS( XML_c, XML_plotVisOnly ),
- XML_val, ToPsz10(!bIncludeHiddenCells),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_plotVisOnly), XML_val, ToPsz10(!bIncludeHiddenCells));
exportMissingValueTreatment(Reference<beans::XPropertySet>(mxDiagram, uno::UNO_QUERY));
@@ -837,16 +816,13 @@ void ChartExport::exportMissingValueTreatment(const uno::Reference<beans::XPrope
}
FSHelperPtr pFS = GetFS();
- pFS->singleElement( FSNS(XML_c, XML_dispBlanksAs),
- XML_val, pVal,
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_dispBlanksAs), XML_val, pVal);
}
void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& xChartDoc )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_legend ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_legend));
Reference< beans::XPropertySet > xProp( xChartDoc->getLegend(), uno::UNO_QUERY );
if( xProp.is() )
@@ -886,34 +862,24 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x
if( strPos != nullptr )
{
- pFS->singleElement( FSNS( XML_c, XML_legendPos ),
- XML_val, strPos,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_legendPos), XML_val, strPos);
}
uno::Any aRelativePos = xProp->getPropertyValue("RelativePosition");
if (aRelativePos.hasValue())
{
- pFS->startElement(FSNS(XML_c, XML_layout), FSEND);
- pFS->startElement(FSNS(XML_c, XML_manualLayout), FSEND);
+ pFS->startElement(FSNS(XML_c, XML_layout));
+ pFS->startElement(FSNS(XML_c, XML_manualLayout));
- pFS->singleElement(FSNS(XML_c, XML_xMode),
- XML_val, "edge",
- FSEND);
- pFS->singleElement(FSNS(XML_c, XML_yMode),
- XML_val, "edge",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_xMode), XML_val, "edge");
+ pFS->singleElement(FSNS(XML_c, XML_yMode), XML_val, "edge");
chart2::RelativePosition aPos = aRelativePos.get<chart2::RelativePosition>();
const double x = aPos.Primary;
const double y = aPos.Secondary;
- pFS->singleElement(FSNS(XML_c, XML_x),
- XML_val, IS(x),
- FSEND);
- pFS->singleElement(FSNS(XML_c, XML_y),
- XML_val, IS(y),
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_x), XML_val, OString::number(x));
+ pFS->singleElement(FSNS(XML_c, XML_y), XML_val, OString::number(y));
uno::Any aRelativeSize = xProp->getPropertyValue("RelativeSize");
if (aRelativeSize.hasValue())
@@ -923,13 +889,9 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x
const double w = aSize.Primary;
const double h = aSize.Secondary;
- pFS->singleElement(FSNS(XML_c, XML_w),
- XML_val, IS(w),
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_w), XML_val, OString::number(w));
- pFS->singleElement(FSNS(XML_c, XML_h),
- XML_val, IS(h),
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_h), XML_val, OString::number(h));
}
SAL_WARN_IF(aPos.Anchor != css::drawing::Alignment_TOP_LEFT, "oox", "unsupported anchor position");
@@ -940,9 +902,7 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x
if (strPos != nullptr)
{
- pFS->singleElement( FSNS( XML_c, XML_overlay ),
- XML_val, "0",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_overlay), XML_val, "0");
}
// shape properties
@@ -969,13 +929,10 @@ void ChartExport::exportTitle( const Reference< XShape >& xShape )
return;
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_title ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_title));
- pFS->startElement( FSNS( XML_c, XML_tx ),
- FSEND );
- pFS->startElement( FSNS( XML_c, XML_rich ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_tx));
+ pFS->startElement(FSNS(XML_c, XML_rich));
// TODO: bodyPr
const char* sWritingMode = nullptr;
@@ -989,17 +946,13 @@ void ChartExport::exportTitle( const Reference< XShape >& xShape )
pFS->singleElement( FSNS( XML_a, XML_bodyPr ),
XML_vert, sWritingMode,
- XML_rot, oox::drawingml::calcRotationValue(nRotation).getStr(),
- FSEND );
+ XML_rot, oox::drawingml::calcRotationValue(nRotation) );
// TODO: lstStyle
- pFS->singleElement( FSNS( XML_a, XML_lstStyle ),
- FSEND );
+ pFS->singleElement(FSNS(XML_a, XML_lstStyle));
// FIXME: handle multiple paragraphs to parse aText
- pFS->startElement( FSNS( XML_a, XML_p ),
- FSEND );
+ pFS->startElement(FSNS(XML_a, XML_p));
- pFS->startElement( FSNS( XML_a, XML_pPr ),
- FSEND );
+ pFS->startElement(FSNS(XML_a, XML_pPr));
bool bDummy = false;
sal_Int32 nDummy;
@@ -1007,12 +960,10 @@ void ChartExport::exportTitle( const Reference< XShape >& xShape )
pFS->endElement( FSNS( XML_a, XML_pPr ) );
- pFS->startElement( FSNS( XML_a, XML_r ),
- FSEND );
+ pFS->startElement(FSNS(XML_a, XML_r));
bDummy = false;
WriteRunProperties( xPropSet, false, XML_rPr, true, bDummy, nDummy );
- pFS->startElement( FSNS( XML_a, XML_t ),
- FSEND );
+ pFS->startElement(FSNS(XML_a, XML_t));
pFS->writeEscaped( sText );
pFS->endElement( FSNS( XML_a, XML_t ) );
pFS->endElement( FSNS( XML_a, XML_r ) );
@@ -1025,14 +976,10 @@ void ChartExport::exportTitle( const Reference< XShape >& xShape )
uno::Any aManualLayout = xPropSet->getPropertyValue("RelativePosition");
if (aManualLayout.hasValue())
{
- pFS->startElement(FSNS( XML_c, XML_layout ), FSEND);
- pFS->startElement(FSNS(XML_c, XML_manualLayout), FSEND);
- pFS->singleElement(FSNS(XML_c, XML_xMode),
- XML_val, "edge",
- FSEND);
- pFS->singleElement(FSNS(XML_c, XML_yMode),
- XML_val, "edge",
- FSEND);
+ pFS->startElement(FSNS(XML_c, XML_layout));
+ pFS->startElement(FSNS(XML_c, XML_manualLayout));
+ pFS->singleElement(FSNS(XML_c, XML_xMode), XML_val, "edge");
+ pFS->singleElement(FSNS(XML_c, XML_yMode), XML_val, "edge");
Reference<embed::XVisualObject> xVisObject(mxChartModel, uno::UNO_QUERY);
awt::Size aPageSize = xVisObject->getVisualAreaSize(embed::Aspects::MSOLE_CONTENT);
@@ -1042,34 +989,20 @@ void ChartExport::exportTitle( const Reference< XShape >& xShape )
double x = static_cast<double>(aPos2.X) / static_cast<double>(aPageSize.Width);
double y = static_cast<double>(aPos2.Y) / static_cast<double>(aPageSize.Height);
/*
- pFS->singleElement(FSNS(XML_c, XML_wMode),
- XML_val, "edge",
- FSEND);
- pFS->singleElement(FSNS(XML_c, XML_hMode),
- XML_val, "edge",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_wMode), XML_val, "edge");
+ pFS->singleElement(FSNS(XML_c, XML_hMode), XML_val, "edge");
*/
- pFS->singleElement(FSNS(XML_c, XML_x),
- XML_val, IS(x),
- FSEND);
- pFS->singleElement(FSNS(XML_c, XML_y),
- XML_val, IS(y),
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_x), XML_val, OString::number(x));
+ pFS->singleElement(FSNS(XML_c, XML_y), XML_val, OString::number(y));
/*
- pFS->singleElement(FSNS(XML_c, XML_w),
- XML_val, "",
- FSEND);
- pFS->singleElement(FSNS(XML_c, XML_h),
- XML_val, "",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_w), XML_val, "");
+ pFS->singleElement(FSNS(XML_c, XML_h), XML_val, "");
*/
pFS->endElement(FSNS(XML_c, XML_manualLayout));
pFS->endElement(FSNS(XML_c, XML_layout));
}
- pFS->singleElement( FSNS(XML_c, XML_overlay),
- XML_val, "0",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_overlay), XML_val, "0");
// shape properties
if( xPropSet.is() )
@@ -1089,8 +1022,7 @@ void ChartExport::exportPlotArea( const Reference< css::chart::XChartDocument >&
// plot-area element
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_plotArea ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_plotArea));
Reference<beans::XPropertySet> xWall(mxNewDiagram, uno::UNO_QUERY);
if( xWall.is() )
@@ -1233,22 +1165,16 @@ void ChartExport::exportManualLayout(const css::chart2::RelativePosition& rPos,
const bool bIsExcludingDiagramPositioning)
{
FSHelperPtr pFS = GetFS();
- pFS->startElement(FSNS(XML_c, XML_layout), FSEND);
- pFS->startElement(FSNS(XML_c, XML_manualLayout), FSEND);
+ pFS->startElement(FSNS(XML_c, XML_layout));
+ pFS->startElement(FSNS(XML_c, XML_manualLayout));
// By default layoutTarget is set to "outer" and we shouldn't save it in that case
if ( bIsExcludingDiagramPositioning )
{
- pFS->singleElement(FSNS(XML_c, XML_layoutTarget),
- XML_val, "inner",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_layoutTarget), XML_val, "inner");
}
- pFS->singleElement(FSNS(XML_c, XML_xMode),
- XML_val, "edge",
- FSEND);
- pFS->singleElement(FSNS(XML_c, XML_yMode),
- XML_val, "edge",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_xMode), XML_val, "edge");
+ pFS->singleElement(FSNS(XML_c, XML_yMode), XML_val, "edge");
double x = rPos.Primary;
double y = rPos.Secondary;
@@ -1290,21 +1216,13 @@ void ChartExport::exportManualLayout(const css::chart2::RelativePosition& rPos,
SAL_WARN("oox", "unhandled alignment case for manual layout export " << static_cast<sal_uInt16>(rPos.Anchor));
}
- pFS->singleElement(FSNS(XML_c, XML_x),
- XML_val, IS(x),
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_x), XML_val, OString::number(x));
- pFS->singleElement(FSNS(XML_c, XML_y),
- XML_val, IS(y),
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_y), XML_val, OString::number(y));
- pFS->singleElement(FSNS(XML_c, XML_w),
- XML_val, IS(w),
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_w), XML_val, OString::number(w));
- pFS->singleElement(FSNS(XML_c, XML_h),
- XML_val, IS(h),
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_h), XML_val, OString::number(h));
pFS->endElement(FSNS(XML_c, XML_manualLayout));
pFS->endElement(FSNS(XML_c, XML_layout));
@@ -1395,7 +1313,7 @@ void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet
uno::Any rValue = xGradient->getByName( sFillGradientName );
if( rValue >>= aGradient )
{
- mpFS->startElementNS( XML_a, XML_gradFill, FSEND );
+ mpFS->startElementNS(XML_a, XML_gradFill);
WriteGradientFill( aGradient );
mpFS->endElementNS( XML_a, XML_gradFill );
}
@@ -1427,20 +1345,14 @@ void ChartExport::exportDataTable( )
if (bShowVBorder || bShowHBorder || bShowOutline)
{
- pFS->startElement( FSNS( XML_c, XML_dTable),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_dTable));
if (bShowHBorder)
pFS->singleElement( FSNS( XML_c, XML_showHorzBorder ),
- XML_val, "1",
- FSEND );
+ XML_val, "1" );
if (bShowVBorder)
- pFS->singleElement( FSNS( XML_c, XML_showVertBorder ),
- XML_val, "1",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_showVertBorder), XML_val, "1");
if (bShowOutline)
- pFS->singleElement( FSNS( XML_c, XML_showOutline ),
- XML_val, "1",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_showOutline), XML_val, "1");
pFS->endElement( FSNS( XML_c, XML_dTable));
}
@@ -1452,8 +1364,7 @@ void ChartExport::exportAreaChart( const Reference< chart2::XChartType >& xChart
sal_Int32 nTypeId = XML_areaChart;
if( mbIs3DChart )
nTypeId = XML_area3DChart;
- pFS->startElement( FSNS( XML_c, nTypeId ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, nTypeId));
exportGrouping( );
bool bPrimaryAxes = true;
@@ -1469,8 +1380,7 @@ void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartT
if( mbIs3DChart )
nTypeId = XML_bar3DChart;
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, nTypeId ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, nTypeId));
// bar direction
bool bVertical = false;
Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
@@ -1478,9 +1388,7 @@ void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartT
mAny >>= bVertical;
const char* bardir = bVertical? "bar":"col";
- pFS->singleElement( FSNS( XML_c, XML_barDir ),
- XML_val, bardir,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_barDir), XML_val, bardir);
exportGrouping( true );
@@ -1498,9 +1406,7 @@ void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartT
if( aBarPositionSequence.getLength() )
{
sal_Int32 nGapWidth = aBarPositionSequence[0];
- pFS->singleElement( FSNS( XML_c, XML_gapWidth ),
- XML_val, I32S( nGapWidth ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_gapWidth), XML_val, OString::number(nGapWidth));
}
}
@@ -1527,9 +1433,7 @@ void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartT
sShapeType = "pyramid";
break;
}
- pFS->singleElement( FSNS( XML_c, XML_shape ),
- XML_val, sShapeType,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_shape), XML_val, sShapeType);
}
//overlap
@@ -1548,15 +1452,11 @@ void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartT
if( ( mbStacked || mbPercent ) && nOverlap != 100 )
{
nOverlap = 100;
- pFS->singleElement( FSNS( XML_c, XML_overlap ),
- XML_val, I32S( nOverlap ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_overlap), XML_val, OString::number(nOverlap));
}
else // Normal bar chart
{
- pFS->singleElement( FSNS( XML_c, XML_overlap ),
- XML_val, I32S( nOverlap ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_overlap), XML_val, OString::number(nOverlap));
}
}
}
@@ -1569,17 +1469,14 @@ void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartT
void ChartExport::exportBubbleChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_bubbleChart ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_bubbleChart));
exportVaryColors(xChartType);
bool bPrimaryAxes = true;
exportAllSeries(xChartType, bPrimaryAxes);
- pFS->singleElement(FSNS(XML_c, XML_bubble3D),
- XML_val, "0",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_bubble3D), XML_val, "0");
exportAxesId(bPrimaryAxes);
@@ -1589,8 +1486,7 @@ void ChartExport::exportBubbleChart( const Reference< chart2::XChartType >& xCha
void ChartExport::exportDoughnutChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_doughnutChart ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_doughnutChart));
exportVaryColors(xChartType);
@@ -1599,9 +1495,7 @@ void ChartExport::exportDoughnutChart( const Reference< chart2::XChartType >& xC
// firstSliceAng
exportFirstSliceAng( );
//FIXME: holeSize
- pFS->singleElement( FSNS( XML_c, XML_holeSize ),
- XML_val, I32S( 50 ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_holeSize), XML_val, OString::number(50));
pFS->endElement( FSNS( XML_c, XML_doughnutChart ) );
}
@@ -1676,8 +1570,7 @@ void ChartExport::exportLineChart( const Reference< chart2::XChartType >& xChart
sal_Int32 nTypeId = XML_lineChart;
if( mbIs3DChart )
nTypeId = XML_line3DChart;
- pFS->startElement( FSNS( XML_c, nTypeId ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, nTypeId));
exportGrouping( );
@@ -1697,9 +1590,7 @@ void ChartExport::exportLineChart( const Reference< chart2::XChartType >& xChart
exportHiLowLines();
exportUpDownBars(xChartType);
const char* marker = nSymbolType == css::chart::ChartSymbolType::NONE? "0":"1";
- pFS->singleElement( FSNS( XML_c, XML_marker ),
- XML_val, marker,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_marker), XML_val, marker);
}
exportAxesId(bPrimaryAxes, true);
@@ -1720,8 +1611,7 @@ void ChartExport::exportPieChart( const Reference< chart2::XChartType >& xChartT
sal_Int32 nTypeId = XML_pieChart;
if( mbIs3DChart )
nTypeId = XML_pie3DChart;
- pFS->startElement( FSNS( XML_c, nTypeId ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, nTypeId));
exportVaryColors(xChartType);
@@ -1740,8 +1630,7 @@ void ChartExport::exportPieChart( const Reference< chart2::XChartType >& xChartT
void ChartExport::exportRadarChart( const Reference< chart2::XChartType >& xChartType)
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_radarChart ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_radarChart));
// radarStyle
sal_Int32 eChartType = getChartType( );
@@ -1750,9 +1639,7 @@ void ChartExport::exportRadarChart( const Reference< chart2::XChartType >& xChar
radarStyle = "filled";
else
radarStyle = "marker";
- pFS->singleElement( FSNS( XML_c, XML_radarStyle ),
- XML_val, radarStyle,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_radarStyle), XML_val, radarStyle);
exportVaryColors(xChartType);
bool bPrimaryAxes = true;
@@ -1766,8 +1653,7 @@ void ChartExport::exportScatterChartSeries( const Reference< chart2::XChartType
css::uno::Sequence<css::uno::Reference<chart2::XDataSeries>>* pSeries)
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_scatterChart ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_scatterChart));
// TODO:scatterStyle
sal_Int32 nSymbolType = css::chart::ChartSymbolType::NONE;
@@ -1781,9 +1667,7 @@ void ChartExport::exportScatterChartSeries( const Reference< chart2::XChartType
scatterStyle = "line";
}
- pFS->singleElement( FSNS( XML_c, XML_scatterStyle ),
- XML_val, scatterStyle,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_scatterStyle), XML_val, scatterStyle);
exportVaryColors(xChartType);
// FIXME: should export xVal and yVal
@@ -1815,8 +1699,7 @@ void ChartExport::exportScatterChart( const Reference< chart2::XChartType >& xCh
void ChartExport::exportStockChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_stockChart ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_stockChart));
bool bPrimaryAxes = true;
Reference< chart2::XDataSeriesContainer > xDSCnt( xChartType, uno::UNO_QUERY );
@@ -1849,8 +1732,7 @@ void ChartExport::exportHiLowLines()
if( !xStockPropSet.is() )
return;
- pFS->startElement( FSNS( XML_c, XML_hiLowLines ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_hiLowLines));
exportShapeProps( xStockPropSet );
pFS->endElement( FSNS( XML_c, XML_hiLowLines ) );
}
@@ -1866,18 +1748,14 @@ void ChartExport::exportUpDownBars( const Reference< chart2::XChartType >& xChar
if(xChartPropProvider.is())
{
// updownbar
- pFS->startElement( FSNS( XML_c, XML_upDownBars ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_upDownBars));
// TODO: gapWidth
- pFS->singleElement( FSNS( XML_c, XML_gapWidth ),
- XML_val, I32S( 150 ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_gapWidth), XML_val, OString::number(150));
Reference< beans::XPropertySet > xChartPropSet = xChartPropProvider->getUpBar();
if( xChartPropSet.is() )
{
- pFS->startElement( FSNS( XML_c, XML_upBars ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_upBars));
// For Linechart with UpDownBars, spPr is not getting imported
// so no need to call the exportShapeProps() for LineChart
if(xChartType->getChartType() == "com.sun.star.chart2.CandleStickChartType")
@@ -1889,8 +1767,7 @@ void ChartExport::exportUpDownBars( const Reference< chart2::XChartType >& xChar
xChartPropSet = xChartPropProvider->getDownBar();
if( xChartPropSet.is() )
{
- pFS->startElement( FSNS( XML_c, XML_downBars ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_downBars));
if(xChartType->getChartType() == "com.sun.star.chart2.CandleStickChartType")
{
exportShapeProps(xChartPropSet);
@@ -1907,8 +1784,7 @@ void ChartExport::exportSurfaceChart( const Reference< chart2::XChartType >& xCh
sal_Int32 nTypeId = XML_surfaceChart;
if( mbIs3DChart )
nTypeId = XML_surface3DChart;
- pFS->startElement( FSNS( XML_c, nTypeId ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, nTypeId));
exportVaryColors(xChartType);
bool bPrimaryAxes = true;
exportAllSeries(xChartType, bPrimaryAxes);
@@ -1958,15 +1834,11 @@ void ChartExport::exportVaryColors(const Reference<chart2::XChartType>& xChartTy
Any aAnyVaryColors = xDataSeriesProps->getPropertyValue("VaryColorsByPoint");
bool bVaryColors = false;
aAnyVaryColors >>= bVaryColors;
- pFS->singleElement(FSNS(XML_c, XML_varyColors),
- XML_val, bVaryColors ? "1": "0",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_varyColors), XML_val, ToPsz10(bVaryColors));
}
catch (...)
{
- pFS->singleElement(FSNS(XML_c, XML_varyColors),
- XML_val, "0",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_varyColors), XML_val, "0");
}
}
@@ -2020,16 +1892,13 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_ser ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_ser));
// TODO: idx and order
pFS->singleElement( FSNS( XML_c, XML_idx ),
- XML_val, I32S(mnSeriesCount),
- FSEND );
+ XML_val, OString::number(mnSeriesCount) );
pFS->singleElement( FSNS( XML_c, XML_order ),
- XML_val, I32S(mnSeriesCount++),
- FSEND );
+ XML_val, OString::number(mnSeriesCount++) );
// export label
if( xLabelSeq.is() )
@@ -2057,9 +1926,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
case chart::TYPEID_HORBAR:
case chart::TYPEID_BAR:
{
- pFS->singleElement(FSNS(XML_c, XML_invertIfNegative),
- XML_val, "0",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_invertIfNegative), XML_val, "0");
}
break;
case chart::TYPEID_LINE:
@@ -2075,8 +1942,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
sal_Int32 nOffset = 0;
mAny >>= nOffset;
pFS->singleElement( FSNS( XML_c, XML_explosion ),
- XML_val, I32S( nOffset ),
- FSEND );
+ XML_val, OString::number( nOffset ) );
}
break;
}
@@ -2199,17 +2065,14 @@ void ChartExport::exportCandleStickSeries(
Reference< chart2::data::XDataSequence > xValueSeq( xLabeledSeq->getValues());
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_ser ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_ser));
// TODO: idx and order
// idx attribute should start from 1 and not from 0.
pFS->singleElement( FSNS( XML_c, XML_idx ),
- XML_val, I32S(idx+1),
- FSEND );
+ XML_val, OString::number(idx+1) );
pFS->singleElement( FSNS( XML_c, XML_order ),
- XML_val, I32S(idx+1),
- FSEND );
+ XML_val, OString::number(idx+1) );
// export label
if( xLabelSeq.is() )
@@ -2236,30 +2099,21 @@ void ChartExport::exportCandleStickSeries(
void ChartExport::exportSeriesText( const Reference< chart2::data::XDataSequence > & xValueSeq )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_tx ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_tx));
OUString aCellRange = xValueSeq->getSourceRangeRepresentation();
aCellRange = parseFormula( aCellRange );
- pFS->startElement( FSNS( XML_c, XML_strRef ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_strRef));
- pFS->startElement( FSNS( XML_c, XML_f ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_f));
pFS->writeEscaped( aCellRange );
pFS->endElement( FSNS( XML_c, XML_f ) );
OUString aLabelString = lcl_getLabelString( xValueSeq );
- pFS->startElement( FSNS( XML_c, XML_strCache ),
- FSEND );
- pFS->singleElement( FSNS( XML_c, XML_ptCount ),
- XML_val, "1",
- FSEND );
- pFS->startElement( FSNS( XML_c, XML_pt ),
- XML_idx, "0",
- FSEND );
- pFS->startElement( FSNS( XML_c, XML_v ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_strCache));
+ pFS->singleElement(FSNS(XML_c, XML_ptCount), XML_val, "1");
+ pFS->startElement(FSNS(XML_c, XML_pt), XML_idx, "0");
+ pFS->startElement(FSNS(XML_c, XML_v));
pFS->writeEscaped( aLabelString );
pFS->endElement( FSNS( XML_c, XML_v ) );
pFS->endElement( FSNS( XML_c, XML_pt ) );
@@ -2271,35 +2125,26 @@ void ChartExport::exportSeriesText( const Reference< chart2::data::XDataSequence
void ChartExport::exportSeriesCategory( const Reference< chart2::data::XDataSequence > & xValueSeq )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_cat ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_cat));
OUString aCellRange = xValueSeq.is() ? xValueSeq->getSourceRangeRepresentation() : OUString();
aCellRange = parseFormula( aCellRange );
// TODO: need to handle XML_multiLvlStrRef according to aCellRange
- pFS->startElement( FSNS( XML_c, XML_strRef ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_strRef));
- pFS->startElement( FSNS( XML_c, XML_f ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_f));
pFS->writeEscaped( aCellRange );
pFS->endElement( FSNS( XML_c, XML_f ) );
::std::vector< OUString > aCategories;
lcl_fillCategoriesIntoStringVector( xValueSeq, aCategories );
sal_Int32 ptCount = aCategories.size();
- pFS->startElement( FSNS( XML_c, XML_strCache ),
- FSEND );
- pFS->singleElement( FSNS( XML_c, XML_ptCount ),
- XML_val, I32S( ptCount ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_strCache));
+ pFS->singleElement(FSNS(XML_c, XML_ptCount), XML_val, OString::number(ptCount));
for( sal_Int32 i = 0; i < ptCount; i++ )
{
- pFS->startElement( FSNS( XML_c, XML_pt ),
- XML_idx, I32S( i ),
- FSEND );
- pFS->startElement( FSNS( XML_c, XML_v ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_pt), XML_idx, OString::number(i));
+ pFS->startElement(FSNS(XML_c, XML_v));
pFS->writeEscaped( aCategories[i] );
pFS->endElement( FSNS( XML_c, XML_v ) );
pFS->endElement( FSNS( XML_c, XML_pt ) );
@@ -2313,32 +2158,25 @@ void ChartExport::exportSeriesCategory( const Reference< chart2::data::XDataSequ
void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequence > & xValueSeq, sal_Int32 nValueType )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, nValueType ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, nValueType));
OUString aCellRange = xValueSeq.is() ? xValueSeq->getSourceRangeRepresentation() : OUString();
aCellRange = parseFormula( aCellRange );
// TODO: need to handle XML_multiLvlStrRef according to aCellRange
- pFS->startElement( FSNS( XML_c, XML_numRef ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_numRef));
- pFS->startElement( FSNS( XML_c, XML_f ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_f));
pFS->writeEscaped( aCellRange );
pFS->endElement( FSNS( XML_c, XML_f ) );
::std::vector< double > aValues = lcl_getAllValuesFromSequence( xValueSeq );
sal_Int32 ptCount = aValues.size();
- pFS->startElement( FSNS( XML_c, XML_numCache ),
- FSEND );
- pFS->startElement( FSNS( XML_c, XML_formatCode ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_numCache));
+ pFS->startElement(FSNS(XML_c, XML_formatCode));
// TODO: what format code?
pFS->writeEscaped( "General" );
pFS->endElement( FSNS( XML_c, XML_formatCode ) );
- pFS->singleElement( FSNS( XML_c, XML_ptCount ),
- XML_val, I32S( ptCount ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_ptCount), XML_val, OString::number(ptCount));
bool bIsNumberValue = true;
bool bXSeriesValue = false;
@@ -2349,11 +2187,8 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen
for( sal_Int32 i = 0; i < ptCount; i++ )
{
- pFS->startElement( FSNS( XML_c, XML_pt ),
- XML_idx, I32S( i ),
- FSEND );
- pFS->startElement( FSNS( XML_c, XML_v ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_pt), XML_idx, OString::number(i));
+ pFS->startElement(FSNS(XML_c, XML_v));
if (bIsNumberValue && !rtl::math::isNan(aValues[i]))
pFS->write( aValues[i] );
else if(bXSeriesValue)
@@ -2375,8 +2210,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen
void ChartExport::exportShapeProps( const Reference< XPropertySet >& xPropSet )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_spPr ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_spPr));
exportFill( xPropSet );
WriteOutline( xPropSet, getModel() );
@@ -2387,7 +2221,7 @@ void ChartExport::exportShapeProps( const Reference< XPropertySet >& xPropSet )
void ChartExport::exportTextProps(const Reference<XPropertySet>& xPropSet)
{
FSHelperPtr pFS = GetFS();
- pFS->startElement(FSNS(XML_c, XML_txPr), FSEND);
+ pFS->startElement(FSNS(XML_c, XML_txPr));
sal_Int32 nRotation = 0;
if (auto xServiceInfo = uno::Reference<lang::XServiceInfo>(xPropSet, uno::UNO_QUERY))
@@ -2425,14 +2259,14 @@ void ChartExport::exportTextProps(const Reference<XPropertySet>& xPropSet)
}
if (nRotation)
- pFS->singleElement(FSNS(XML_a, XML_bodyPr), XML_rot, I32S(nRotation), FSEND);
+ pFS->singleElement(FSNS(XML_a, XML_bodyPr), XML_rot, OString::number(nRotation));
else
- pFS->singleElement(FSNS(XML_a, XML_bodyPr), FSEND);
+ pFS->singleElement(FSNS(XML_a, XML_bodyPr));
- pFS->singleElement( FSNS( XML_a, XML_lstStyle ), FSEND );
+ pFS->singleElement(FSNS(XML_a, XML_lstStyle));
- pFS->startElement(FSNS(XML_a, XML_p), FSEND);
- pFS->startElement(FSNS(XML_a, XML_pPr), FSEND);
+ pFS->startElement(FSNS(XML_a, XML_p));
+ pFS->startElement(FSNS(XML_a, XML_pPr));
WriteRunProperties(xPropSet, false, XML_defRPr, true, o3tl::temporary(false),
o3tl::temporary(sal_Int32()));
@@ -2642,14 +2476,10 @@ void ChartExport::_exportAxis(
const AxisIdPair& rAxisIdPair )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, nAxisType ),
- FSEND );
- pFS->singleElement( FSNS( XML_c, XML_axId ),
- XML_val, I32S( rAxisIdPair.nAxisId ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, nAxisType));
+ pFS->singleElement(FSNS(XML_c, XML_axId), XML_val, OString::number(rAxisIdPair.nAxisId));
- pFS->startElement( FSNS( XML_c, XML_scaling ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_scaling));
// logBase, min, max
if(GetProperty( xAxisProp, "Logarithmic" ) )
@@ -2659,9 +2489,7 @@ void ChartExport::_exportAxis(
if( bLogarithmic )
{
// default value is 10?
- pFS->singleElement( FSNS( XML_c, XML_logBase ),
- XML_val, I32S( 10 ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_logBase), XML_val, OString::number(10));
}
}
@@ -2671,9 +2499,7 @@ void ChartExport::_exportAxis(
mAny >>= bReverseDirection;
const char* orientation = bReverseDirection ? "maxMin":"minMax";
- pFS->singleElement( FSNS( XML_c, XML_orientation ),
- XML_val, orientation,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_orientation), XML_val, orientation);
bool bAutoMax = false;
if(GetProperty( xAxisProp, "AutoMax" ) )
@@ -2683,9 +2509,7 @@ void ChartExport::_exportAxis(
{
double dMax = 0;
mAny >>= dMax;
- pFS->singleElement( FSNS( XML_c, XML_max ),
- XML_val, IS( dMax ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_max), XML_val, OString::number(dMax));
}
bool bAutoMin = false;
@@ -2696,9 +2520,7 @@ void ChartExport::_exportAxis(
{
double dMin = 0;
mAny >>= dMin;
- pFS->singleElement( FSNS( XML_c, XML_min ),
- XML_val, IS( dMin ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_min), XML_val, OString::number(dMin));
}
pFS->endElement( FSNS( XML_c, XML_scaling ) );
@@ -2715,19 +2537,14 @@ void ChartExport::_exportAxis(
if (!bDeleted)
maExportedAxis.insert(rAxisIdPair.nAxisType);
- pFS->singleElement( FSNS( XML_c, XML_delete ),
- XML_val, !bDeleted && bVisible ? "0" : "1",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_delete), XML_val, !bDeleted && bVisible ? "0" : "1");
// FIXME: axPos, need to check the property "ReverseDirection"
- pFS->singleElement( FSNS( XML_c, XML_axPos ),
- XML_val, sAxisPos,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_axPos), XML_val, sAxisPos);
// major grid line
if( xMajorGrid.is())
{
- pFS->startElement( FSNS( XML_c, XML_majorGridlines ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_majorGridlines));
exportShapeProps( xMajorGrid );
pFS->endElement( FSNS( XML_c, XML_majorGridlines ) );
}
@@ -2735,8 +2552,7 @@ void ChartExport::_exportAxis(
// minor grid line
if( xMinorGrid.is())
{
- pFS->startElement( FSNS( XML_c, XML_minorGridlines ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_minorGridlines));
exportShapeProps( xMinorGrid );
pFS->endElement( FSNS( XML_c, XML_minorGridlines ) );
}
@@ -2760,8 +2576,7 @@ void ChartExport::_exportAxis(
OString sNumberFormatString = OUStringToOString(aNumberFormatString, RTL_TEXTENCODING_UTF8);
pFS->singleElement(FSNS(XML_c, XML_numFmt),
XML_formatCode, sNumberFormatString.getStr(),
- XML_sourceLinked, bLinkedNumFmt ? "1" : "0",
- FSEND);
+ XML_sourceLinked, bLinkedNumFmt ? "1" : "0");
// majorTickMark
sal_Int32 nValue = 0;
@@ -2779,9 +2594,7 @@ void ChartExport::_exportAxis(
majorTickMark = "out";
else
majorTickMark = "none";
- pFS->singleElement( FSNS( XML_c, XML_majorTickMark ),
- XML_val, majorTickMark,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_majorTickMark), XML_val, majorTickMark);
}
// minorTickMark
if(GetProperty( xAxisProp, "HelpMarks" ) )
@@ -2798,9 +2611,7 @@ void ChartExport::_exportAxis(
minorTickMark = "out";
else
minorTickMark = "none";
- pFS->singleElement( FSNS( XML_c, XML_minorTickMark ),
- XML_val, minorTickMark,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_minorTickMark), XML_val, minorTickMark);
}
// tickLblPos
const char* sTickLblPos = nullptr;
@@ -2832,18 +2643,14 @@ void ChartExport::_exportAxis(
{
sTickLblPos = "none";
}
- pFS->singleElement( FSNS( XML_c, XML_tickLblPos ),
- XML_val, sTickLblPos,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_tickLblPos), XML_val, sTickLblPos);
// shape properties
exportShapeProps( xAxisProp );
exportTextProps(xAxisProp);
- pFS->singleElement( FSNS( XML_c, XML_crossAx ),
- XML_val, I32S( rAxisIdPair.nCrossAx ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_crossAx), XML_val, OString::number(rAxisIdPair.nCrossAx));
// crosses & crossesAt
bool bCrossesValue = false;
@@ -2874,17 +2681,13 @@ void ChartExport::_exportAxis(
{
double dValue = 0;
mAny >>= dValue;
- pFS->singleElement( FSNS( XML_c, XML_crossesAt ),
- XML_val, IS( dValue ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_crossesAt), XML_val, OString::number(dValue));
}
else
{
if(sCrosses)
{
- pFS->singleElement(FSNS(XML_c, XML_crosses),
- XML_val, sCrosses,
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_crosses), XML_val, sCrosses);
}
}
@@ -2893,23 +2696,17 @@ void ChartExport::_exportAxis(
{
// FIXME: seems not support? use default value,
const char* const isAuto = "1";
- pFS->singleElement( FSNS( XML_c, XML_auto ),
- XML_val, isAuto,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_auto), XML_val, isAuto);
if( nAxisType == XML_catAx )
{
// FIXME: seems not support? lblAlgn
const char* const sLblAlgn = "ctr";
- pFS->singleElement( FSNS( XML_c, XML_lblAlgn ),
- XML_val, sLblAlgn,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_lblAlgn), XML_val, sLblAlgn);
}
// FIXME: seems not support? lblOffset
- pFS->singleElement( FSNS( XML_c, XML_lblOffset ),
- XML_val, I32S( 100 ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_lblOffset), XML_val, OString::number(100));
}
// TODO: MSO does not support random axis cross position for
@@ -2919,9 +2716,7 @@ void ChartExport::_exportAxis(
sal_Int32 nChartType = getChartType();
if (nAxisType == XML_valAx && (nChartType == chart::TYPEID_LINE || nChartType == chart::TYPEID_SCATTER))
{
- pFS->singleElement( FSNS( XML_c, XML_crossBetween ),
- XML_val, "midCat",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_crossBetween), XML_val, "midCat");
}
// majorUnit
@@ -2933,9 +2728,7 @@ void ChartExport::_exportAxis(
{
double dMajorUnit = 0;
mAny >>= dMajorUnit;
- pFS->singleElement( FSNS( XML_c, XML_majorUnit ),
- XML_val, IS( dMajorUnit ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_majorUnit), XML_val, OString::number(dMajorUnit));
}
// minorUnit
bool bAutoStepHelp = false;
@@ -2956,8 +2749,7 @@ void ChartExport::_exportAxis(
if( dMinorUnitCount != 5 )
{
pFS->singleElement( FSNS( XML_c, XML_minorUnit ),
- XML_val, IS( dMinorUnit ),
- FSEND );
+ XML_val, OString::number( dMinorUnit ) );
}
}
}
@@ -2974,15 +2766,11 @@ void ChartExport::_exportAxis(
mAny >>= aVal;
if(!aVal.isEmpty())
{
- pFS->startElement( FSNS( XML_c, XML_dispUnits ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_dispUnits));
- OString aBuiltInUnit = OUStringToOString(aVal, RTL_TEXTENCODING_UTF8);
- pFS->singleElement( FSNS( XML_c, XML_builtInUnit ),
- XML_val, aBuiltInUnit.getStr(),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_builtInUnit), XML_val, aVal.toUtf8());
- pFS->singleElement(FSNS( XML_c, XML_dispUnitsLbl ),FSEND);
+ pFS->singleElement(FSNS( XML_c, XML_dispUnitsLbl ));
pFS->endElement( FSNS( XML_c, XML_dispUnits ) );
}
}
@@ -3071,14 +2859,14 @@ void writeRunProperties( ChartExport* pChartExport, Reference<XPropertySet> cons
void writeCustomLabel( const FSHelperPtr& pFS, ChartExport* pChartExport,
const Sequence<Reference<chart2::XDataPointCustomLabelField>>& rCustomLabelFields )
{
- pFS->startElement(FSNS(XML_c, XML_tx), FSEND);
- pFS->startElement(FSNS(XML_c, XML_rich), FSEND);
+ pFS->startElement(FSNS(XML_c, XML_tx));
+ pFS->startElement(FSNS(XML_c, XML_rich));
// TODO: body properties?
- pFS->singleElement(FSNS(XML_a, XML_bodyPr), FSEND);
+ pFS->singleElement(FSNS(XML_a, XML_bodyPr));
OUString sFieldType;
- pFS->startElement(FSNS(XML_a, XML_p), FSEND);
+ pFS->startElement(FSNS(XML_a, XML_p));
for (auto& rField : rCustomLabelFields)
{
@@ -3095,17 +2883,17 @@ void writeCustomLabel( const FSHelperPtr& pFS, ChartExport* pChartExport,
if (bNewParagraph)
{
pFS->endElement(FSNS(XML_a, XML_p));
- pFS->startElement(FSNS(XML_a, XML_p), FSEND);
+ pFS->startElement(FSNS(XML_a, XML_p));
continue;
}
if (sFieldType.isEmpty())
{
// Normal text run
- pFS->startElement(FSNS(XML_a, XML_r), FSEND);
+ pFS->startElement(FSNS(XML_a, XML_r));
writeRunProperties(pChartExport, xPropertySet);
- pFS->startElement(FSNS(XML_a, XML_t), FSEND);
+ pFS->startElement(FSNS(XML_a, XML_t));
pFS->writeEscaped(rField->getString());
pFS->endElement(FSNS(XML_a, XML_t));
@@ -3115,10 +2903,10 @@ void writeCustomLabel( const FSHelperPtr& pFS, ChartExport* pChartExport,
{
// Field
pFS->startElement(FSNS(XML_a, XML_fld), XML_id, rField->getGuid().toUtf8(), XML_type,
- sFieldType.toUtf8(), FSEND);
+ sFieldType.toUtf8());
writeRunProperties(pChartExport, xPropertySet);
- pFS->startElement(FSNS(XML_a, XML_t), FSEND);
+ pFS->startElement(FSNS(XML_a, XML_t));
pFS->writeEscaped(rField->getString());
pFS->endElement(FSNS(XML_a, XML_t));
@@ -3149,14 +2937,15 @@ void writeLabelProperties( const FSHelperPtr& pFS, ChartExport* pChartExport,
if (nLabelBorderWidth > 0)
{
- pFS->startElement(FSNS(XML_c, XML_spPr), FSEND);
- pFS->startElement(FSNS(XML_a, XML_ln), XML_w, IS(convertHmmToEmu(nLabelBorderWidth)), FSEND);
+ pFS->startElement(FSNS(XML_c, XML_spPr));
+ pFS->startElement(FSNS(XML_a, XML_ln), XML_w,
+ OString::number(convertHmmToEmu(nLabelBorderWidth)));
if (nLabelBorderColor != -1)
{
- pFS->startElement(FSNS(XML_a, XML_solidFill), FSEND);
+ pFS->startElement(FSNS(XML_a, XML_solidFill));
OString aStr = OString::number(nLabelBorderColor, 16).toAsciiUpperCase();
- pFS->singleElement(FSNS(XML_a, XML_srgbClr), XML_val, aStr.getStr(), FSEND);
+ pFS->singleElement(FSNS(XML_a, XML_srgbClr), XML_val, aStr);
pFS->endElement(FSNS(XML_a, XML_solidFill));
}
@@ -3174,15 +2963,15 @@ void writeLabelProperties( const FSHelperPtr& pFS, ChartExport* pChartExport,
{
if (!rLabelParam.maAllowedValues.count(nLabelPlacement))
nLabelPlacement = rLabelParam.meDefault;
- pFS->singleElement(FSNS(XML_c, XML_dLblPos), XML_val, toOOXMLPlacement(nLabelPlacement), FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_dLblPos), XML_val, toOOXMLPlacement(nLabelPlacement));
}
}
- pFS->singleElement(FSNS(XML_c, XML_showLegendKey), XML_val, ToPsz10(aLabel.ShowLegendSymbol), FSEND);
- pFS->singleElement(FSNS(XML_c, XML_showVal), XML_val, ToPsz10(aLabel.ShowNumber), FSEND);
- pFS->singleElement(FSNS(XML_c, XML_showCatName), XML_val, ToPsz10(aLabel.ShowCategoryName), FSEND);
- pFS->singleElement(FSNS(XML_c, XML_showSerName), XML_val, ToPsz10(false), FSEND);
- pFS->singleElement(FSNS(XML_c, XML_showPercent), XML_val, ToPsz10(aLabel.ShowNumberInPercent), FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_showLegendKey), XML_val, ToPsz10(aLabel.ShowLegendSymbol));
+ pFS->singleElement(FSNS(XML_c, XML_showVal), XML_val, ToPsz10(aLabel.ShowNumber));
+ pFS->singleElement(FSNS(XML_c, XML_showCatName), XML_val, ToPsz10(aLabel.ShowCategoryName));
+ pFS->singleElement(FSNS(XML_c, XML_showSerName), XML_val, ToPsz10(false));
+ pFS->singleElement(FSNS(XML_c, XML_showPercent), XML_val, ToPsz10(aLabel.ShowNumberInPercent));
// Export the text "separator" if exists
uno::Any aAny = xPropSet->getPropertyValue("LabelSeparator");
@@ -3190,7 +2979,7 @@ void writeLabelProperties( const FSHelperPtr& pFS, ChartExport* pChartExport,
{
OUString nLabelSeparator;
aAny >>= nLabelSeparator;
- pFS->startElement( FSNS( XML_c, XML_separator ), FSEND );
+ pFS->startElement(FSNS(XML_c, XML_separator));
pFS->writeEscaped( nLabelSeparator );
pFS->endElement( FSNS( XML_c, XML_separator ) );
}
@@ -3209,7 +2998,7 @@ void ChartExport::exportDataLabels(
return;
FSHelperPtr pFS = GetFS();
- pFS->startElement(FSNS(XML_c, XML_dLbls), FSEND);
+ pFS->startElement(FSNS(XML_c, XML_dLbls));
bool bLinkedNumFmt = true;
if (GetProperty(xPropSet, "LinkNumberFormatToSource"))
@@ -3224,9 +3013,8 @@ void ChartExport::exportDataLabels(
OString sNumberFormatString = OUStringToOString(aNumberFormatString, RTL_TEXTENCODING_UTF8);
pFS->singleElement(FSNS(XML_c, XML_numFmt),
- XML_formatCode, sNumberFormatString.getStr(),
- XML_sourceLinked, bLinkedNumFmt ? "1" : "0",
- FSEND);
+ XML_formatCode, sNumberFormatString,
+ XML_sourceLinked, ToPsz10(bLinkedNumFmt));
}
uno::Sequence<sal_Int32> aAttrLabelIndices;
@@ -3291,8 +3079,8 @@ void ChartExport::exportDataLabels(
if (!xLabelPropSet.is())
continue;
- pFS->startElement(FSNS(XML_c, XML_dLbl), FSEND);
- pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, I32S(nIdx), FSEND);
+ pFS->startElement(FSNS(XML_c, XML_dLbl));
+ pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, OString::number(nIdx));
if (GetProperty(xLabelPropSet, "NumberFormat") || GetProperty(xLabelPropSet, "PercentageNumberFormat"))
{
@@ -3303,7 +3091,7 @@ void ChartExport::exportDataLabels(
OString sNumberFormatString = OUStringToOString(aNumberFormatString, RTL_TEXTENCODING_UTF8);
pFS->singleElement(FSNS(XML_c, XML_numFmt), XML_formatCode, sNumberFormatString.getStr(),
- XML_sourceLinked, bLinkedNumFmt ? "1" : "0", FSEND);
+ XML_sourceLinked, ToPsz10(bLinkedNumFmt));
}
// Individual label property that overwrites the baseline.
@@ -3316,9 +3104,7 @@ void ChartExport::exportDataLabels(
// Baseline label properties for all labels.
writeLabelProperties(pFS, this, xPropSet, aParam);
- pFS->singleElement(FSNS(XML_c, XML_showLeaderLines),
- XML_val, "0",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_showLeaderLines), XML_val, "0");
pFS->endElement(FSNS(XML_c, XML_dLbls));
}
@@ -3373,11 +3159,8 @@ void ChartExport::exportDataPoints(
if( xPropSet.is() )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_dPt ),
- FSEND );
- pFS->singleElement( FSNS( XML_c, XML_idx ),
- XML_val, I32S(nElement),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_dPt));
+ pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, OString::number(nElement));
switch (eChartType)
{
@@ -3390,8 +3173,7 @@ void ChartExport::exportDataPoints(
mAny >>= nOffset;
if (nOffset)
pFS->singleElement( FSNS( XML_c, XML_explosion ),
- XML_val, I32S( nOffset ),
- FSEND );
+ XML_val, OString::number( nOffset ) );
}
break;
}
@@ -3431,11 +3213,8 @@ void ChartExport::exportDataPoints(
if( xPropSet.is() )
{
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_dPt ),
- FSEND );
- pFS->singleElement( FSNS( XML_c, XML_idx ),
- XML_val, I32S(nElement),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_dPt));
+ pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, OString::number(nElement));
switch( eChartType )
{
@@ -3443,9 +3222,7 @@ void ChartExport::exportDataPoints(
case chart::TYPEID_HORBAR:
case chart::TYPEID_BAR:
{
- pFS->singleElement(FSNS(XML_c, XML_invertIfNegative),
- XML_val, "0",
- FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_invertIfNegative), XML_val, "0");
}
break;
}
@@ -3484,12 +3261,8 @@ void ChartExport::exportAxesId(bool bPrimaryAxes, bool bCheckCombinedAxes)
maAxes.emplace_back( eYAxis, nAxisIdy, nAxisIdx );
}
FSHelperPtr pFS = GetFS();
- pFS->singleElement( FSNS( XML_c, XML_axId ),
- XML_val, I32S( nAxisIdx ),
- FSEND );
- pFS->singleElement( FSNS( XML_c, XML_axId ),
- XML_val, I32S( nAxisIdy ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_axId), XML_val, OString::number(nAxisIdx));
+ pFS->singleElement(FSNS(XML_c, XML_axId), XML_val, OString::number(nAxisIdy));
if (mbHasZAxis)
{
sal_Int32 nAxisIdz = 0;
@@ -3498,9 +3271,7 @@ void ChartExport::exportAxesId(bool bPrimaryAxes, bool bCheckCombinedAxes)
nAxisIdz = lcl_generateRandomValue();
maAxes.emplace_back( AXIS_PRIMARY_Z, nAxisIdz, nAxisIdy );
}
- pFS->singleElement( FSNS( XML_c, XML_axId ),
- XML_val, I32S( nAxisIdz ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_axId), XML_val, OString::number(nAxisIdz));
}
}
@@ -3528,9 +3299,7 @@ void ChartExport::exportGrouping( bool isBar )
else
grouping = "standard";
}
- pFS->singleElement( FSNS( XML_c, XML_grouping ),
- XML_val, grouping,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_grouping), XML_val, grouping);
}
void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSeries )
@@ -3565,13 +3334,13 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
aService != "com.sun.star.chart2.MovingAverageRegressionCurve")
continue;
- pFS->startElement( FSNS( XML_c, XML_trendline ), FSEND );
+ pFS->startElement(FSNS(XML_c, XML_trendline));
OUString aName;
xProperties->getPropertyValue("CurveName") >>= aName;
if(!aName.isEmpty())
{
- pFS->startElement( FSNS( XML_c, XML_name), FSEND);
+ pFS->startElement(FSNS(XML_c, XML_name));
pFS->writeEscaped(aName);
pFS->endElement( FSNS( XML_c, XML_name) );
}
@@ -3580,52 +3349,36 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
if( aService == "com.sun.star.chart2.LinearRegressionCurve" )
{
- pFS->singleElement( FSNS( XML_c, XML_trendlineType ),
- XML_val, "linear",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "linear");
}
else if( aService == "com.sun.star.chart2.ExponentialRegressionCurve" )
{
- pFS->singleElement( FSNS( XML_c, XML_trendlineType ),
- XML_val, "exp",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "exp");
}
else if( aService == "com.sun.star.chart2.LogarithmicRegressionCurve" )
{
- pFS->singleElement( FSNS( XML_c, XML_trendlineType ),
- XML_val, "log",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "log");
}
else if( aService == "com.sun.star.chart2.PotentialRegressionCurve" )
{
- pFS->singleElement( FSNS( XML_c, XML_trendlineType ),
- XML_val, "power",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "power");
}
else if( aService == "com.sun.star.chart2.PolynomialRegressionCurve" )
{
- pFS->singleElement( FSNS( XML_c, XML_trendlineType ),
- XML_val, "poly",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "poly");
sal_Int32 aDegree = 2;
xProperties->getPropertyValue( "PolynomialDegree") >>= aDegree;
- pFS->singleElement( FSNS( XML_c, XML_order ),
- XML_val, I32S(aDegree),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_order), XML_val, OString::number(aDegree));
}
else if( aService == "com.sun.star.chart2.MovingAverageRegressionCurve" )
{
- pFS->singleElement( FSNS( XML_c, XML_trendlineType ),
- XML_val, "movingAvg",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_trendlineType), XML_val, "movingAvg");
sal_Int32 aPeriod = 2;
xProperties->getPropertyValue( "MovingAveragePeriod") >>= aPeriod;
- pFS->singleElement( FSNS( XML_c, XML_period ),
- XML_val, I32S(aPeriod),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_period), XML_val, OString::number(aPeriod));
}
else
{
@@ -3641,12 +3394,10 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
xProperties->getPropertyValue("ExtrapolateBackward") >>= fExtrapolateBackward;
pFS->singleElement( FSNS( XML_c, XML_forward ),
- XML_val, OString::number(fExtrapolateForward).getStr(),
- FSEND );
+ XML_val, OString::number(fExtrapolateForward) );
pFS->singleElement( FSNS( XML_c, XML_backward ),
- XML_val, OString::number(fExtrapolateBackward).getStr(),
- FSEND );
+ XML_val, OString::number(fExtrapolateBackward) );
bool bForceIntercept = false;
xProperties->getPropertyValue("ForceIntercept") >>= bForceIntercept;
@@ -3657,8 +3408,7 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
xProperties->getPropertyValue("InterceptValue") >>= fInterceptValue;
pFS->singleElement( FSNS( XML_c, XML_intercept ),
- XML_val, OString::number(fInterceptValue).getStr(),
- FSEND );
+ XML_val, OString::number(fInterceptValue) );
}
// Equation properties
@@ -3673,12 +3423,9 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
xEquationProperties->getPropertyValue("ShowCorrelationCoefficient") >>= bShowCorrelationCoefficient;
pFS->singleElement( FSNS( XML_c, XML_dispRSqr ),
- XML_val, bShowCorrelationCoefficient ? "1" : "0",
- FSEND );
+ XML_val, ToPsz10(bShowCorrelationCoefficient) );
- pFS->singleElement( FSNS( XML_c, XML_dispEq ),
- XML_val, bShowEquation ? "1" : "0",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_dispEq), XML_val, ToPsz10(bShowEquation));
pFS->endElement( FSNS( XML_c, XML_trendline ) );
}
@@ -3696,8 +3443,7 @@ void ChartExport::exportMarker(const Reference< chart2::XDataSeries >& xSeries)
return;
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_marker ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_marker));
sal_Int32 nSymbol = aSymbol.StandardSymbol;
// TODO: more properties support for marker
@@ -3744,7 +3490,7 @@ void ChartExport::exportMarker(const Reference< chart2::XDataSeries >& xSeries)
pSymbolType = "none";
}
- pFS->singleElement(FSNS(XML_c, XML_symbol), XML_val, pSymbolType, FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_symbol), XML_val, pSymbolType);
if (!bSkipFormatting)
{
@@ -3754,12 +3500,9 @@ void ChartExport::exportMarker(const Reference< chart2::XDataSeries >& xSeries)
nSize = nSize/250.0*7.0 + 1; // just guessed based on some test cases,
//the value is always 1 less than the actual value.
nSize = std::min<sal_Int32>( 72, std::max<sal_Int32>( 2, nSize ) );
- pFS->singleElement( FSNS( XML_c, XML_size),
- XML_val, I32S(nSize),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_size), XML_val, OString::number(nSize));
- pFS->startElement( FSNS( XML_c, XML_spPr ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_spPr));
util::Color aColor = aSymbol.FillColor;
if (GetProperty(xPropSet, "Color"))
@@ -3767,7 +3510,7 @@ void ChartExport::exportMarker(const Reference< chart2::XDataSeries >& xSeries)
if (aColor == -1)
{
- pFS->singleElement(FSNS(XML_a, XML_noFill), FSEND);
+ pFS->singleElement(FSNS(XML_a, XML_noFill));
}
else
WriteSolidFill(::Color(aColor));
@@ -3786,9 +3529,7 @@ void ChartExport::exportSmooth()
if( GetProperty( xPropSet, "SplineType" ) )
mAny >>= nSplineType;
const char* pVal = nSplineType != 0 ? "1" : "0";
- pFS->singleElement( FSNS( XML_c, XML_smooth ),
- XML_val, pVal,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_smooth), XML_val, pVal);
}
void ChartExport::exportFirstSliceAng( )
@@ -3801,9 +3542,7 @@ void ChartExport::exportFirstSliceAng( )
// convert to ooxml angle
nStartingAngle = (450 - nStartingAngle ) % 360;
- pFS->singleElement( FSNS( XML_c, XML_firstSliceAng ),
- XML_val, I32S( nStartingAngle ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_firstSliceAng), XML_val, OString::number(nStartingAngle));
}
namespace {
@@ -3873,11 +3612,8 @@ void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps,
return;
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_errBars ),
- FSEND );
- pFS->singleElement( FSNS( XML_c, XML_errDir ),
- XML_val, bYError ? "y" : "x",
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_errBars));
+ pFS->singleElement(FSNS(XML_c, XML_errDir), XML_val, bYError ? "y" : "x");
bool bPositive = false, bNegative = false;
xErrorBarProps->getPropertyValue("ShowPositiveError") >>= bPositive;
xErrorBarProps->getPropertyValue("ShowNegativeError") >>= bNegative;
@@ -3894,15 +3630,9 @@ void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps,
// at least this makes the file valid
pErrBarType = "both";
}
- pFS->singleElement( FSNS( XML_c, XML_errBarType ),
- XML_val, pErrBarType,
- FSEND );
- pFS->singleElement( FSNS( XML_c, XML_errValType ),
- XML_val, pErrorBarStyle,
- FSEND );
- pFS->singleElement( FSNS( XML_c, XML_noEndCap ),
- XML_val, "0",
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_errBarType), XML_val, pErrBarType);
+ pFS->singleElement(FSNS(XML_c, XML_errValType), XML_val, pErrorBarStyle);
+ pFS->singleElement(FSNS(XML_c, XML_noEndCap), XML_val, "0");
if(nErrorBarStyle == cssc::ErrorBarStyle::FROM_DATA)
{
uno::Reference< chart2::data::XDataSource > xDataSource(xErrorBarProps, uno::UNO_QUERY);
@@ -3934,11 +3664,7 @@ void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps,
xErrorBarProps->getPropertyValue("NegativeError") >>= nVal;
}
- OString aVal = OString::number(nVal);
-
- pFS->singleElement( FSNS( XML_c, XML_val ),
- XML_val, aVal.getStr(),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_val), XML_val, OString::number(nVal));
}
exportShapeProps( xErrorBarProps );
@@ -3952,8 +3678,7 @@ void ChartExport::exportView3D()
if( !xPropSet.is() )
return;
FSHelperPtr pFS = GetFS();
- pFS->startElement( FSNS( XML_c, XML_view3D ),
- FSEND );
+ pFS->startElement(FSNS(XML_c, XML_view3D));
sal_Int32 eChartType = getChartType( );
// rotX
if( GetProperty( xPropSet, "RotationHorizontal" ) )
@@ -3972,9 +3697,7 @@ void ChartExport::exportView3D()
else
nRotationX += 360; // X rotation (map Chart2 [-179,180] to OOXML [-90..90])
}
- pFS->singleElement( FSNS( XML_c, XML_rotX ),
- XML_val, I32S( nRotationX ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_rotX), XML_val, OString::number(nRotationX));
}
// rotY
if( GetProperty( xPropSet, "RotationVertical" ) )
@@ -3987,9 +3710,7 @@ void ChartExport::exportView3D()
mAny >>= nStartingAngle;
// convert to ooxml angle
nStartingAngle = (450 - nStartingAngle ) % 360;
- pFS->singleElement( FSNS( XML_c, XML_rotY ),
- XML_val, I32S( nStartingAngle ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_rotY), XML_val, OString::number(nStartingAngle));
}
else
{
@@ -3998,9 +3719,7 @@ void ChartExport::exportView3D()
// Y rotation (map Chart2 [-179,180] to OOXML [0..359])
if( nRotationY < 0 )
nRotationY += 360;
- pFS->singleElement( FSNS( XML_c, XML_rotY ),
- XML_val, I32S( nRotationY ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_rotY), XML_val, OString::number(nRotationY));
}
}
// rAngAx
@@ -4009,9 +3728,7 @@ void ChartExport::exportView3D()
bool bRightAngled = false;
mAny >>= bRightAngled;
const char* sRightAngled = bRightAngled ? "1":"0";
- pFS->singleElement( FSNS( XML_c, XML_rAngAx ),
- XML_val, sRightAngled,
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_rAngAx), XML_val, sRightAngled);
}
// perspective
if( GetProperty( xPropSet, "Perspective" ) )
@@ -4020,9 +3737,7 @@ void ChartExport::exportView3D()
mAny >>= nPerspective;
// map Chart2 [0,100] to OOXML [0..200]
nPerspective *= 2;
- pFS->singleElement( FSNS( XML_c, XML_perspective ),
- XML_val, I32S( nPerspective ),
- FSEND );
+ pFS->singleElement(FSNS(XML_c, XML_perspective), XML_val, OString::number(nPerspective));
}
pFS->endElement( FSNS( XML_c, XML_view3D ) );
}
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 15eeda16f4c6..1b3ec2d6986f 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -168,7 +168,7 @@ namespace
{
void WriteRadialGradientPath(const awt::Gradient& rGradient, const FSHelperPtr& pFS)
{
- pFS->startElementNS(XML_a, XML_path, XML_path, "circle", FSEND);
+ pFS->startElementNS(XML_a, XML_path, XML_path, "circle");
// Write the focus rectangle. Work with the focus point, and assume
// that it extends 50% in all directions. The below
@@ -257,14 +257,14 @@ void DrawingML::WriteColor( ::Color nColor, sal_Int32 nAlpha )
}
if( nAlpha < MAX_PERCENT )
{
- mpFS->startElementNS( XML_a, XML_srgbClr, XML_val, sColor.getStr(), FSEND );
- mpFS->singleElementNS( XML_a, XML_alpha, XML_val, OString::number(nAlpha), FSEND );
+ mpFS->startElementNS(XML_a, XML_srgbClr, XML_val, sColor);
+ mpFS->singleElementNS(XML_a, XML_alpha, XML_val, OString::number(nAlpha));
mpFS->endElementNS( XML_a, XML_srgbClr );
}
else
{
- mpFS->singleElementNS( XML_a, XML_srgbClr, XML_val, sColor.getStr(), FSEND );
+ mpFS->singleElementNS(XML_a, XML_srgbClr, XML_val, sColor);
}
}
@@ -276,17 +276,13 @@ void DrawingML::WriteColor( const OUString& sColorSchemeName, const Sequence< Pr
if( aTransformations.hasElements() )
{
- mpFS->startElementNS( XML_a, XML_schemeClr,
- XML_val, sColorSchemeName.toUtf8(),
- FSEND );
+ mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName.toUtf8());
WriteColorTransformations( aTransformations );
mpFS->endElementNS( XML_a, XML_schemeClr );
}
else
{
- mpFS->singleElementNS( XML_a, XML_schemeClr,
- XML_val, sColorSchemeName.toUtf8(),
- FSEND );
+ mpFS->singleElementNS(XML_a, XML_schemeClr, XML_val, sColorSchemeName.toUtf8());
}
}
@@ -298,21 +294,21 @@ void DrawingML::WriteColorTransformations( const Sequence< PropertyValue >& aTra
if( nToken != XML_TOKEN_INVALID && aTransformations[i].Value.hasValue() )
{
sal_Int32 nValue = aTransformations[i].Value.get<sal_Int32>();
- mpFS->singleElementNS( XML_a, nToken, XML_val, I32S( nValue ), FSEND );
+ mpFS->singleElementNS(XML_a, nToken, XML_val, OString::number(nValue));
}
}
}
void DrawingML::WriteSolidFill( ::Color nColor, sal_Int32 nAlpha )
{
- mpFS->startElementNS( XML_a, XML_solidFill, FSEND );
+ mpFS->startElementNS(XML_a, XML_solidFill);
WriteColor( nColor, nAlpha );
mpFS->endElementNS( XML_a, XML_solidFill );
}
void DrawingML::WriteSolidFill( const OUString& sSchemeName, const Sequence< PropertyValue >& aTransformations )
{
- mpFS->startElementNS( XML_a, XML_solidFill, FSEND );
+ mpFS->startElementNS(XML_a, XML_solidFill);
WriteColor( sSchemeName, aTransformations );
mpFS->endElementNS( XML_a, XML_solidFill );
}
@@ -391,9 +387,7 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
void DrawingML::WriteGradientStop( sal_uInt16 nStop, ::Color nColor )
{
- mpFS->startElementNS( XML_a, XML_gs,
- XML_pos, I32S( nStop * 1000 ),
- FSEND );
+ mpFS->startElementNS(XML_a, XML_gs, XML_pos, OString::number(nStop * 1000));
WriteColor( nColor );
mpFS->endElementNS( XML_a, XML_gs );
}
@@ -448,14 +442,14 @@ void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet )
// If we have no gradient stops that means original gradient were defined by a theme.
if( aGradientStops.hasElements() )
{
- mpFS->startElementNS( XML_a, XML_gradFill, XML_rotWithShape, "0", FSEND );
+ mpFS->startElementNS(XML_a, XML_gradFill, XML_rotWithShape, "0");
WriteGrabBagGradientFill(aGradientStops, aGradient);
mpFS->endElementNS( XML_a, XML_gradFill );
}
}
else
{
- mpFS->startElementNS( XML_a, XML_gradFill, XML_rotWithShape, "0", FSEND );
+ mpFS->startElementNS(XML_a, XML_gradFill, XML_rotWithShape, "0");
WriteGradientFill(aGradient);
mpFS->endElementNS( XML_a, XML_gradFill );
}
@@ -465,7 +459,7 @@ void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet )
void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGradientStops, awt::Gradient rGradient )
{
// write back the original gradient
- mpFS->startElementNS( XML_a, XML_gsLst, FSEND );
+ mpFS->startElementNS(XML_a, XML_gsLst);
// get original stops and write them
for( sal_Int32 i=0; i < aGradientStops.getLength(); ++i )
@@ -493,9 +487,7 @@ void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGrad
aGradientStop[j].Value >>= aTransformations;
}
// write stop
- mpFS->startElementNS( XML_a, XML_gs,
- XML_pos, OString::number( nPos * 100000.0 ).getStr(),
- FSEND );
+ mpFS->startElementNS(XML_a, XML_gs, XML_pos, OString::number(nPos * 100000.0).getStr());
if( sSchemeClr.isEmpty() )
{
// Calculate alpha value (see oox/source/drawingml/color.cxx : getTransparency())
@@ -513,9 +505,9 @@ void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGrad
switch (rGradient.Style)
{
default:
- mpFS->singleElementNS( XML_a, XML_lin,
- XML_ang, I32S( ( ( ( 3600 - rGradient.Angle + 900 ) * 6000 ) % 21600000 ) ),
- FSEND );
+ mpFS->singleElementNS(
+ XML_a, XML_lin, XML_ang,
+ OString::number((((3600 - rGradient.Angle + 900) * 6000) % 21600000)));
break;
case awt::GradientStyle_RADIAL:
WriteRadialGradientPath(rGradient, mpFS);
@@ -529,29 +521,29 @@ void DrawingML::WriteGradientFill( awt::Gradient rGradient )
{
default:
case awt::GradientStyle_LINEAR:
- mpFS->startElementNS( XML_a, XML_gsLst, FSEND );
+ mpFS->startElementNS(XML_a, XML_gsLst);
WriteGradientStop( 0, ColorWithIntensity( rGradient.StartColor, rGradient.StartIntensity ) );
WriteGradientStop( 100, ColorWithIntensity( rGradient.EndColor, rGradient.EndIntensity ) );
mpFS->endElementNS( XML_a, XML_gsLst );
- mpFS->singleElementNS( XML_a, XML_lin,
- XML_ang, I32S( ( ( ( 3600 - rGradient.Angle + 900 ) * 6000 ) % 21600000 ) ),
- FSEND );
+ mpFS->singleElementNS(
+ XML_a, XML_lin, XML_ang,
+ OString::number((((3600 - rGradient.Angle + 900) * 6000) % 21600000)));
break;
case awt::GradientStyle_AXIAL:
- mpFS->startElementNS( XML_a, XML_gsLst, FSEND );
+ mpFS->startElementNS(XML_a, XML_gsLst);
WriteGradientStop( 0, ColorWithIntensity( rGradient.EndColor, rGradient.EndIntensity ) );
WriteGradientStop( 50, ColorWithIntensity( rGradient.StartColor, rGradient.StartIntensity ) );
WriteGradientStop( 100, ColorWithIntensity( rGradient.EndColor, rGradient.EndIntensity ) );
mpFS->endElementNS( XML_a, XML_gsLst );
- mpFS->singleElementNS( XML_a, XML_lin,
- XML_ang, I32S( ( ( ( 3600 - rGradient.Angle + 900 ) * 6000 ) % 21600000 ) ),
- FSEND );
+ mpFS->singleElementNS(
+ XML_a, XML_lin, XML_ang,
+ OString::number((((3600 - rGradient.Angle + 900) * 6000) % 21600000)));
break;
case awt::GradientStyle_RADIAL:
{
- mpFS->startElementNS(XML_a, XML_gsLst, FSEND);
+ mpFS->startElementNS(XML_a, XML_gsLst);
WriteGradientStop(0, ColorWithIntensity(rGradient.EndColor, rGradient.EndIntensity));
if (rGradient.Border > 0 && rGradient.Border < 100)
// Map border to an additional gradient stop, which has the
@@ -572,13 +564,12 @@ void DrawingML::WriteGradientFill( awt::Gradient rGradient )
case awt::GradientStyle_ELLIPTICAL:
case awt::GradientStyle_RECT:
case awt::GradientStyle_SQUARE:
- mpFS->startElementNS( XML_a, XML_gsLst, FSEND );
+ mpFS->startElementNS(XML_a, XML_gsLst);
WriteGradientStop( 0, ColorWithIntensity( rGradient.EndColor, rGradient.EndIntensity ) );
WriteGradientStop( 100, ColorWithIntensity( rGradient.StartColor, rGradient.StartIntensity ) );
mpFS->endElementNS( XML_a, XML_gsLst );
mpFS->singleElementNS( XML_a, XML_path,
- XML_path, ( rGradient.Style == awt::GradientStyle_RADIAL || rGradient.Style == awt::GradientStyle_ELLIPTICAL ) ? "circle" : "rect",
- FSEND );
+ XML_path, ( rGradient.Style == awt::GradientStyle_RADIAL || rGradient.Style == awt::GradientStyle_ELLIPTICAL ) ? "circle" : "rect" );
break;
}
}
@@ -649,8 +640,7 @@ void DrawingML::WriteLineArrow( const Reference< XPropertySet >& rXPropSet, bool
mpFS->singleElementNS( XML_a, bLineStart ? XML_headEnd : XML_tailEnd,
XML_len, len,
XML_type, type,
- XML_w, width,
- FSEND );
+ XML_w, width );
}
}
@@ -776,8 +766,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
mpFS->startElementNS( XML_a, XML_ln,
XML_cap, cap,
XML_w, nLineWidth > 1 && nStyleLineWidth != nLineWidth ?
- I64S( oox::drawingml::convertHmmToEmu( nLineWidth ) ) :nullptr,
- FSEND );
+ OString::number(oox::drawingml::convertHmmToEmu(nLineWidth)).getStr() : nullptr );
if( bColorSet )
{
@@ -821,43 +810,43 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
// keep default mso preset linestyles (instead of custdash)
if (aLineDash.Dots == 1 && relDotLen == 1 && aLineDash.Dashes == 0 && relDashLen == 0 && relDistance == 3)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dot");
}
else if (aLineDash.Dots == 0 && relDotLen == 0 && aLineDash.Dashes == 1 && relDashLen == 4 && relDistance == 3)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash");
}
else if (aLineDash.Dots == 1 && relDotLen == 1 && aLineDash.Dashes == 1 && relDashLen == 4 && relDistance == 3)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dashDot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dashDot");
}
else if (aLineDash.Dots == 0 && relDotLen == 0 && aLineDash.Dashes == 1 && relDashLen == 8 && relDistance == 3)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "lgDash", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "lgDash");
}
else if (aLineDash.Dots == 1 && relDotLen == 1 && aLineDash.Dashes == 1 && relDashLen == 8 && relDistance == 3)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "lgDashDot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "lgDashDot");
}
else if (aLineDash.Dots == 2 && relDotLen == 1 && aLineDash.Dashes == 1 && relDashLen == 8 && relDistance == 3)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "lgDashDotDot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "lgDashDotDot");
}
else if (aLineDash.Dots == 1 && relDotLen == 1 && aLineDash.Dashes == 0 && relDashLen == 0 && relDistance == 1)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDot");
}
else if (aLineDash.Dots == 0 && relDotLen == 0 && aLineDash.Dashes == 1 && relDashLen == 3 && relDistance == 1)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDash", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDash");
}
else if (aLineDash.Dots == 1 && relDotLen == 1 && aLineDash.Dashes == 1 && relDashLen == 3 && relDistance == 1)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDashDot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDashDot");
}
else if (aLineDash.Dots == 2 && relDotLen == 1 && aLineDash.Dashes == 1 && relDashLen == 3 && relDistance == 1)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDashDotDot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDashDotDot");
}
/*convert some LO preset dashes to MSO preset dashes for oox interoperability
LO preset dashes which don't have equivalent in MSO preset dashes: 2 Dots 3 Dashes, Line with Fine Dots, 3 Dashes 3 Dots*/
@@ -865,32 +854,32 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
else if ((aLineDash.Dots == 1 && aLineDash.DotLen == 51 && aLineDash.Dashes == 1 && aLineDash.DashLen == 51 && aLineDash.Distance == 51) ||
(aLineDash.Dots == 1 && aLineDash.DotLen == 0 && aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 50))
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDot");
}
//Fine Dashed -> dash
else if (aLineDash.Dots == 1 && aLineDash.DotLen == 197 && aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 197)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash");
}
//Fine Dotted -> dot
else if (aLineDash.Dots == 1 && aLineDash.DotLen == 0 && aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 457)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dot");
}
//Line Style 9, Dashed -> sysDash
else if ((aLineDash.Dots == 1 && aLineDash.DotLen == 197 && aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 120) ||
(aLineDash.Dots == 1 && aLineDash.DotLen == 197 && aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 127))
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDash", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDash");
}
//2 Dots 1 Dash -> sysDashDotDot
else if (aLineDash.Dots == 2 && aLineDash.DotLen == 0 && aLineDash.Dashes == 1 && aLineDash.DashLen == 203 && aLineDash.Distance == 203)
{
- mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDashDotDot", FSEND);
+ mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDashDotDot");
}
else
{
- mpFS->startElementNS( XML_a, XML_custDash, FSEND );
+ mpFS->startElementNS(XML_a, XML_custDash);
// Check that line-width is positive and distance between dashes\dots is positive
if ( nLineWidth > 0 && aLineDash.Distance > 0 )
@@ -905,8 +894,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
{
mpFS->singleElementNS( XML_a , XML_ds,
XML_d , write1000thOfAPercent(nD),
- XML_sp, write1000thOfAPercent(nSp),
- FSEND );
+ XML_sp, write1000thOfAPercent(nSp) );
}
}
if ( aLineDash.Dots > 0 )
@@ -916,8 +904,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
{
mpFS->singleElementNS( XML_a, XML_ds,
XML_d , write1000thOfAPercent(nD),
- XML_sp, write1000thOfAPercent(nSp),
- FSEND );
+ XML_sp, write1000thOfAPercent(nSp) );
}
}
}
@@ -950,15 +937,15 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
{
case LineJoint_NONE:
case LineJoint_BEVEL:
- mpFS->singleElementNS( XML_a, XML_bevel, FSEND );
+ mpFS->singleElementNS(XML_a, XML_bevel);
break;
default:
case LineJoint_MIDDLE:
case LineJoint_MITER:
- mpFS->singleElementNS( XML_a, XML_miter, FSEND );
+ mpFS->singleElementNS(XML_a, XML_miter);
break;
case LineJoint_ROUND:
- mpFS->singleElementNS( XML_a, XML_round, FSEND );
+ mpFS->singleElementNS(XML_a, XML_round);
break;
}
}
@@ -971,7 +958,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
}
else
{
- mpFS->singleElementNS( XML_a, XML_noFill, FSEND );
+ mpFS->singleElementNS(XML_a, XML_noFill);
}
mpFS->endElementNS( XML_a, XML_ln );
@@ -1196,20 +1183,17 @@ void DrawingML::WriteMediaNonVisualProperties(const css::uno::Reference<css::dra
aMediaRelId = mpFB->addRelation(mpFS->getOutputStream(), oox::getRelationship(Relationship::MEDIA), rURL);
}
- GetFS()->startElementNS(XML_p, XML_nvPr, FSEND);
+ GetFS()->startElementNS(XML_p, XML_nvPr);
GetFS()->singleElementNS(XML_a, eMediaType == Relationship::VIDEO ? XML_videoFile : XML_audioFile,
- FSNS(XML_r, XML_link), aVideoFileRelId.toUtf8(),
- FSEND);
+ FSNS(XML_r, XML_link), aVideoFileRelId.toUtf8());
- GetFS()->startElementNS(XML_p, XML_extLst, FSEND);
- GetFS()->startElementNS(XML_p, XML_ext,
- XML_uri, "{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}", // media extensions; google this ID for details
- FSEND);
+ 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(),
- FSEND);
+ bEmbed? FSNS(XML_r, XML_embed): FSNS(XML_r, XML_link), aMediaRelId.toUtf8());
GetFS()->endElementNS(XML_p, XML_ext);
GetFS()->endElementNS(XML_p, XML_extLst);
@@ -1234,16 +1218,14 @@ void DrawingML::WriteImageBrightnessContrastTransparence(uno::Reference<beans::X
if (nBright || nContrast)
{
mpFS->singleElementNS(XML_a, XML_lum,
- XML_bright, nBright ? I32S(nBright * 1000) : nullptr,
- XML_contrast, nContrast ? I32S(nContrast * 1000) : nullptr,
- FSEND);
+ XML_bright, nBright ? OString::number(nBright * 1000).getStr() : nullptr,
+ XML_contrast, nContrast ? OString::number(nContrast * 1000).getStr() : nullptr);
}
if (nTransparence)
{
sal_Int32 nAlphaMod = (100 - nTransparence ) * PER_PERCENT;
- mpFS->singleElementNS(XML_a, XML_alphaModFix,
- XML_amt, I32S(nAlphaMod), FSEND);
+ mpFS->singleElementNS(XML_a, XML_alphaModFix, XML_amt, OString::number(nAlphaMod));
}
}
@@ -1272,9 +1254,7 @@ OUString DrawingML::WriteXGraphicBlip(uno::Reference<beans::XPropertySet> const
}
}
- mpFS->startElementNS(XML_a, XML_blip,
- FSNS(XML_r, XML_embed), sRelId.toUtf8().getStr(),
- FSEND);
+ mpFS->startElementNS(XML_a, XML_blip, FSNS(XML_r, XML_embed), sRelId.toUtf8());
WriteImageBrightnessContrastTransparence(rXPropSet);
@@ -1297,7 +1277,7 @@ void DrawingML::WriteXGraphicBlipMode(uno::Reference<beans::XPropertySet> const
switch (eBitmapMode)
{
case BitmapMode_REPEAT:
- mpFS->singleElementNS(XML_a, XML_tile, FSEND);
+ mpFS->singleElementNS(XML_a, XML_tile);
break;
case BitmapMode_STRETCH:
WriteXGraphicStretch(rXPropSet, rxGraphic);
@@ -1356,7 +1336,7 @@ void DrawingML::WriteXGraphicBlipFill(uno::Reference<beans::XPropertySet> const
if (!rxGraphic.is() )
return;
- mpFS->startElementNS(nXmlNamespace , XML_blipFill, XML_rotWithShape, "0", FSEND);
+ mpFS->startElementNS(nXmlNamespace , XML_blipFill, XML_rotWithShape, "0");
WriteXGraphicBlip(rXPropSet, rxGraphic, bRelPathToMedia);
@@ -1388,9 +1368,9 @@ void DrawingML::WritePattFill( const Reference< XPropertySet >& rXPropSet )
void DrawingML::WritePattFill(const Reference<XPropertySet>& rXPropSet, const css::drawing::Hatch& rHatch)
{
- mpFS->startElementNS( XML_a , XML_pattFill, XML_prst, GetHatchPattern(rHatch), FSEND );
+ mpFS->startElementNS(XML_a, XML_pattFill, XML_prst, GetHatchPattern(rHatch));
- mpFS->startElementNS( XML_a , XML_fgClr, FSEND );
+ mpFS->startElementNS(XML_a, XML_fgClr);
WriteColor(::Color(rHatch.Color));
mpFS->endElementNS( XML_a , XML_fgClr );
@@ -1412,7 +1392,7 @@ void DrawingML::WritePattFill(const Reference<XPropertySet>& rXPropSet, const cs
}
}
- mpFS->startElementNS( XML_a , XML_bgClr, FSEND );
+ mpFS->startElementNS(XML_a, XML_bgClr);
WriteColor(nColor, nAlpha);
mpFS->endElementNS( XML_a , XML_bgClr );
@@ -1435,11 +1415,10 @@ void DrawingML::WriteGraphicCropProperties(uno::Reference<beans::XPropertySet> c
if ( (0 != aGraphicCropStruct.Left) || (0 != aGraphicCropStruct.Top) || (0 != aGraphicCropStruct.Right) || (0 != aGraphicCropStruct.Bottom) )
{
mpFS->singleElementNS( XML_a, XML_srcRect,
- XML_l, I32S(rtl::math::round(static_cast<double>(aGraphicCropStruct.Left) * 100000 / aOriginalSize.Width())),
- XML_t, I32S(rtl::math::round(static_cast<double>(aGraphicCropStruct.Top) * 100000 / aOriginalSize.Height())),
- XML_r, I32S(rtl::math::round(static_cast<double>(aGraphicCropStruct.Right) * 100000 / aOriginalSize.Width())),
- XML_b, I32S(rtl::math::round(static_cast<double>(aGraphicCropStruct.Bottom) * 100000 / aOriginalSize.Height())),
- FSEND );
+ XML_l, OString::number(rtl::math::round(aGraphicCropStruct.Left * 100000.0 / aOriginalSize.Width())),
+ XML_t, OString::number(rtl::math::round(aGraphicCropStruct.Top * 100000.0 / aOriginalSize.Height())),
+ XML_r, OString::number(rtl::math::round(aGraphicCropStruct.Right * 100000.0 / aOriginalSize.Width())),
+ XML_b, OString::number(rtl::math::round(aGraphicCropStruct.Bottom * 100000.0 / aOriginalSize.Height())) );
}
}
}
@@ -1456,7 +1435,7 @@ void DrawingML::WriteSrcRectXGraphic(uno::Reference<beans::XPropertySet> const &
void DrawingML::WriteXGraphicStretch(uno::Reference<beans::XPropertySet> const & rXPropSet,
uno::Reference<graphic::XGraphic> const & rxGraphic)
{
- mpFS->startElementNS(XML_a, XML_stretch, FSEND);
+ mpFS->startElementNS(XML_a, XML_stretch);
bool bCrop = false;
if (GetProperty(rXPropSet, "GraphicCrop"))
@@ -1472,18 +1451,17 @@ void DrawingML::WriteXGraphicStretch(uno::Reference<beans::XPropertySet> const &
Graphic aGraphic(rxGraphic);
Size aOriginalSize(aGraphic.GetPrefSize());
mpFS->singleElementNS(XML_a, XML_fillRect,
- XML_l, I32S(((aGraphicCropStruct.Left) * 100000) / aOriginalSize.Width()),
- XML_t, I32S(((aGraphicCropStruct.Top) * 100000) / aOriginalSize.Height()),
- XML_r, I32S(((aGraphicCropStruct.Right) * 100000) / aOriginalSize.Width()),
- XML_b, I32S(((aGraphicCropStruct.Bottom) * 100000) / aOriginalSize.Height()),
- FSEND);
+ XML_l, OString::number(((aGraphicCropStruct.Left) * 100000) / aOriginalSize.Width()),
+ XML_t, OString::number(((aGraphicCropStruct.Top) * 100000) / aOriginalSize.Height()),
+ XML_r, OString::number(((aGraphicCropStruct.Right) * 100000) / aOriginalSize.Width()),
+ XML_b, OString::number(((aGraphicCropStruct.Bottom) * 100000) / aOriginalSize.Height()));
bCrop = true;
}
}
if (!bCrop)
{
- mpFS->singleElementNS(XML_a, XML_fillRect, FSEND);
+ mpFS->singleElementNS(XML_a, XML_fillRect);
}
mpFS->endElementNS(XML_a, XML_stretch);
@@ -1496,8 +1474,7 @@ void DrawingML::WriteTransformation(const tools::Rectangle& rRect,
mpFS->startElementNS( nXmlNamespace, XML_xfrm,
XML_flipH, bFlipH ? "1" : nullptr,
XML_flipV, bFlipV ? "1" : nullptr,
- XML_rot, (nRotation % 21600000) ? I32S( nRotation ) : nullptr,
- FSEND );
+ XML_rot, (nRotation % 21600000) ? OString::number(nRotation).getStr() : nullptr );
sal_Int32 nLeft = rRect.Left();
sal_Int32 nTop = rRect.Top();
@@ -1507,13 +1484,21 @@ void DrawingML::WriteTransformation(const tools::Rectangle& rRect,
nTop = 0;
}
- mpFS->singleElementNS( XML_a, XML_off, XML_x, IS( oox::drawingml::convertHmmToEmu( nLeft ) ), XML_y, IS( oox::drawingml::convertHmmToEmu( nTop ) ), FSEND );
- mpFS->singleElementNS( XML_a, XML_ext, XML_cx, IS( oox::drawingml::convertHmmToEmu( rRect.GetWidth() ) ), XML_cy, IS( oox::drawingml::convertHmmToEmu( rRect.GetHeight() ) ), FSEND );
+ mpFS->singleElementNS(XML_a, XML_off,
+ XML_x, OString::number(oox::drawingml::convertHmmToEmu(nLeft)),
+ XML_y, OString::number(oox::drawingml::convertHmmToEmu(nTop)));
+ mpFS->singleElementNS(XML_a, XML_ext,
+ XML_cx, OString::number(oox::drawingml::convertHmmToEmu(rRect.GetWidth())),
+ XML_cy, OString::number(oox::drawingml::convertHmmToEmu(rRect.GetHeight())));
if (GetDocumentType() != DOCUMENT_DOCX && bIsGroupShape)
{
- mpFS->singleElementNS(XML_a, XML_chOff, XML_x, IS(oox::drawingml::convertHmmToEmu(nLeft)), XML_y, IS(oox::drawingml::convertHmmToEmu(nTop)), FSEND);
- mpFS->singleElementNS(XML_a, XML_chExt, XML_cx, IS(oox::drawingml::convertHmmToEmu(rRect.GetWidth())), XML_cy, IS(oox::drawingml::convertHmmToEmu(rRect.GetHeight())), FSEND);
+ mpFS->singleElementNS(XML_a, XML_chOff,
+ XML_x, OString::number(oox::drawingml::convertHmmToEmu(nLeft)),
+ XML_y, OString::number(oox::drawingml::convertHmmToEmu(nTop)));
+ mpFS->singleElementNS(XML_a, XML_chExt,
+ XML_cx, OString::number(oox::drawingml::convertHmmToEmu(rRect.GetWidth())),
+ XML_cy, OString::number(oox::drawingml::convertHmmToEmu(rRect.GetHeight())));
}
mpFS->endElementNS( nXmlNamespace, XML_xfrm );
@@ -1757,14 +1742,13 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
XML_b, bold,
XML_i, italic,
XML_lang, usLanguage.isEmpty() ? nullptr : usLanguage.toUtf8().getStr(),
- XML_sz, IS( nSize ),
+ XML_sz, OString::number(nSize),
// For Condensed character spacing spc value is negative.
- XML_spc, nCharKerning ? IS(nCharKerning) : nullptr,
+ XML_spc, nCharKerning ? OString::number(nCharKerning).getStr() : nullptr,
XML_strike, strikeout,
XML_u, underline,
- XML_baseline, nCharEscapement == 0 ? nullptr : IS( nCharEscapement*1000 ),
- XML_cap, cap,
- FSEND );
+ XML_baseline, nCharEscapement == 0 ? nullptr : OString::number(nCharEscapement*1000).getStr(),
+ XML_cap, cap );
// mso doesn't like text color to be placed after typeface
if ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, "CharColor", eState)
@@ -1794,13 +1778,13 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
// if color is automatic, then we shouldn't write information about color but to take color from character
if( color != COL_AUTO )
{
- mpFS->startElementNS( XML_a, XML_uFill, FSEND);
+ mpFS->startElementNS(XML_a, XML_uFill);
WriteSolidFill( color );
mpFS->endElementNS( XML_a, XML_uFill );
}
else
{
- mpFS->singleElementNS( XML_a, XML_uFillTx, FSEND );
+ mpFS->singleElementNS(XML_a, XML_uFillTx);
}
}
@@ -1818,8 +1802,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
mpFS->singleElementNS( XML_a, XML_latin,
XML_typeface, usTypeface.toUtf8(),
XML_pitchFamily, pitch,
- XML_charset, charset,
- FSEND );
+ XML_charset, charset );
}
if ((bComplex
@@ -1841,8 +1824,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
mpFS->singleElementNS( XML_a, bComplex ? XML_cs : XML_ea,
XML_typeface, usTypeface.toUtf8(),
XML_pitchFamily, pitch,
- XML_charset, charset,
- FSEND );
+ XML_charset, charset );
}
if( bIsField )
@@ -1865,9 +1847,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(),
- FSEND );
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8());
}
}
@@ -2024,8 +2004,7 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun,
if (sText == "\n")
{
- mpFS->singleElementNS( XML_a, XML_br,
- FSEND );
+ mpFS->singleElementNS(XML_a, XML_br);
}
else
{
@@ -2034,17 +2013,16 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun,
OString sUUID(comphelper::xml::generateGUIDString());
mpFS->startElementNS( XML_a, XML_fld,
XML_id, sUUID.getStr(),
- XML_type, OUStringToOString( sFieldValue, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ XML_type, sFieldValue.toUtf8() );
}
else
{
- mpFS->startElementNS( XML_a, XML_r, FSEND );
+ mpFS->startElementNS(XML_a, XML_r);
}
Reference< XPropertySet > xPropSet( rRun, uno::UNO_QUERY );
WriteRunProperties( xPropSet, bIsURLField, XML_rPr, true, rbOverridingCharHeight, rnCharHeight );
- mpFS->startElementNS( XML_a, XML_t, FSEND );
+ mpFS->startElementNS(XML_a, XML_t);
mpFS->writeEscaped( sText );
mpFS->endElementNS( XML_a, XML_t );
@@ -2232,9 +2210,9 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
}
mpFS->singleElementNS( XML_a, XML_buSzPct,
- XML_val, IS( std::min(static_cast<sal_Int32>(std::lround(100000.f * fBulletSizeRel)), static_cast<sal_Int32>(400000))), FSEND);
- mpFS->startElementNS( XML_a, XML_buBlip, FSEND );
- mpFS->singleElementNS(XML_a, XML_blip, FSNS(XML_r, XML_embed), sRelationId.toUtf8(), FSEND);
+ 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->endElementNS( XML_a, XML_buBlip );
}
else
@@ -2245,22 +2223,21 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
{
nBulletColor = ::Color(mbIsBackgroundDark ? 0xffffff : 0x000000);
}
- mpFS->startElementNS( XML_a, XML_buClr, FSEND );
+ mpFS->startElementNS(XML_a, XML_buClr);
WriteColor( nBulletColor );
mpFS->endElementNS( XML_a, XML_buClr );
}
if( nBulletRelSize && nBulletRelSize != 100 )
mpFS->singleElementNS( XML_a, XML_buSzPct,
- XML_val, IS( std::max( sal_Int32(25000), std::min( sal_Int32(400000), 1000*( static_cast<sal_Int32>(nBulletRelSize) ) ) ) ), FSEND );
+ XML_val, OString::number(std::clamp<sal_Int32>(1000*nBulletRelSize, 25000, 400000)));
if( bHasFontDesc )
{
if ( SVX_NUM_CHAR_SPECIAL == nNumberingType )
aBulletChar = SubstituteBullet( aBulletChar, aFontDesc );
mpFS->singleElementNS( XML_a, XML_buFont,
- XML_typeface, aFontDesc.Name.toUtf8().getStr(),
- XML_charset, (aFontDesc.CharSet == awt::CharSet::SYMBOL) ? "2" : nullptr,
- FSEND );
+ XML_typeface, aFontDesc.Name.toUtf8(),
+ XML_charset, (aFontDesc.CharSet == awt::CharSet::SYMBOL) ? "2" : nullptr );
}
OUString aAutoNumType = GetAutoNumType( nNumberingType, bSDot, bPBehind, bPBoth );
@@ -2268,13 +2245,12 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
if (!aAutoNumType.isEmpty())
{
mpFS->singleElementNS(XML_a, XML_buAutoNum,
- XML_type, OUStringToOString(aAutoNumType, RTL_TEXTENCODING_UTF8).getStr(),
- XML_startAt, nStartWith > 1 ? IS(nStartWith) : nullptr,
- FSEND);
+ XML_type, aAutoNumType.toUtf8(),
+ XML_startAt, nStartWith > 1 ? OString::number(nStartWith).getStr() : nullptr);
}
else
{
- mpFS->singleElementNS(XML_a, XML_buChar, XML_char, OUString(aBulletChar).toUtf8(), FSEND);
+ mpFS->singleElementNS(XML_a, XML_buChar, XML_char, OUString(aBulletChar).toUtf8());
}
}
}
@@ -2375,14 +2351,12 @@ void DrawingML::WriteLinespacing( const LineSpacing& rSpacing )
if( rSpacing.Mode == LineSpacingMode::PROP )
{
mpFS->singleElementNS( XML_a, XML_spcPct,
- XML_val, I32S( (static_cast<sal_Int32>(rSpacing.Height))*1000 ),
- FSEND );
+ XML_val, OString::number(static_cast<sal_Int32>(rSpacing.Height)*1000));
}
else
{
mpFS->singleElementNS( XML_a, XML_spcPts,
- XML_val, I32S( std::lround(rSpacing.Height / 25.4 * 72) ),
- FSEND );
+ XML_val, OString::number(std::lround(rSpacing.Height / 25.4 * 72)));
}
}
@@ -2445,47 +2419,43 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara
{
if (nParaLeftMargin) // For Paragraph
mpFS->startElementNS( XML_a, XML_pPr,
- XML_lvl, nLevel > 0 ? I32S( nLevel ) : nullptr,
- XML_marL, nParaLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nParaLeftMargin ) ) : nullptr,
- XML_indent, nParaFirstLineIndent ? I32S( oox::drawingml::convertHmmToEmu( nParaFirstLineIndent ) ) : nullptr,
+ XML_lvl, nLevel > 0 ? OString::number(nLevel).getStr() : nullptr,
+ XML_marL, nParaLeftMargin > 0 ? OString::number(oox::drawingml::convertHmmToEmu(nParaLeftMargin)).getStr() : nullptr,
+ XML_indent, nParaFirstLineIndent ? OString::number(oox::drawingml::convertHmmToEmu(nParaFirstLineIndent)).getStr() : nullptr,
XML_algn, GetAlignment( nAlignment ),
- XML_rtl, bRtl ? ToPsz10(bRtl) : nullptr,
- FSEND );
+ XML_rtl, bRtl ? ToPsz10(bRtl) : nullptr );
else
mpFS->startElementNS( XML_a, XML_pPr,
- XML_lvl, nLevel > 0 ? I32S( nLevel ) : nullptr,
- XML_marL, nLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : nullptr,
- XML_indent, nLineIndentation ? I32S( oox::drawingml::convertHmmToEmu( nLineIndentation ) ) : nullptr,
+ XML_lvl, nLevel > 0 ? OString::number(nLevel).getStr() : nullptr,
+ XML_marL, nLeftMargin > 0 ? OString::number(oox::drawingml::convertHmmToEmu(nLeftMargin)).getStr() : nullptr,
+ XML_indent, nLineIndentation ? OString::number(oox::drawingml::convertHmmToEmu(nLineIndentation)).getStr() : nullptr,
XML_algn, GetAlignment( nAlignment ),
- XML_rtl, bRtl ? ToPsz10(bRtl) : nullptr,
- FSEND );
+ XML_rtl, bRtl ? ToPsz10(bRtl) : nullptr );
if( bHasLinespacing )
{
- mpFS->startElementNS( XML_a, XML_lnSpc, FSEND );
+ mpFS->startElementNS(XML_a, XML_lnSpc);
WriteLinespacing( aLineSpacing );
mpFS->endElementNS( XML_a, XML_lnSpc );
}
if( nParaTopMargin != 0 )
{
- mpFS->startElementNS( XML_a, XML_spcBef, FSEND );
+ mpFS->startElementNS(XML_a, XML_spcBef);
{
mpFS->singleElementNS( XML_a, XML_spcPts,
- XML_val, I32S( std::lround( nParaTopMargin / 25.4 * 72 ) ),
- FSEND );
+ XML_val, OString::number(std::lround(nParaTopMargin / 25.4 * 72)));
}
mpFS->endElementNS( XML_a, XML_spcBef );
}
if( nParaBottomMargin != 0 )
{
- mpFS->startElementNS( XML_a, XML_spcAft, FSEND );
+ mpFS->startElementNS(XML_a, XML_spcAft);
{
mpFS->singleElementNS( XML_a, XML_spcPts,
- XML_val, I32S( std::lround( nParaBottomMargin / 25.4 * 72 ) ),
- FSEND );
+ XML_val, OString::number(std::lround(nParaBottomMargin / 25.4 * 72)));
}
mpFS->endElementNS( XML_a, XML_spcAft );
}
@@ -2507,7 +2477,7 @@ void DrawingML::WriteParagraph( const Reference< XTextContent >& rParagraph,
if( !enumeration.is() )
return;
- mpFS->startElementNS( XML_a, XML_p, FSEND );
+ mpFS->startElementNS(XML_a, XML_p);
bool bPropertiesWritten = false;
while( enumeration->hasMoreElements() )
@@ -2640,26 +2610,24 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
}
mpFS->startElementNS( (nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr,
XML_wrap, pWrap,
- XML_lIns, (nLeft != DEFLRINS) ? IS( oox::drawingml::convertHmmToEmu( nLeft ) ) : nullptr,
- XML_rIns, (nRight != DEFLRINS) ? IS( oox::drawingml::convertHmmToEmu( nRight ) ) : nullptr,
- XML_tIns, (nTop != DEFTBINS) ? IS( oox::drawingml::convertHmmToEmu( nTop ) ) : nullptr,
- XML_bIns, (nBottom != DEFTBINS) ? IS( oox::drawingml::convertHmmToEmu( nBottom ) ) : nullptr,
+ XML_lIns, (nLeft != DEFLRINS) ? OString::number(oox::drawingml::convertHmmToEmu(nLeft)).getStr() : nullptr,
+ XML_rIns, (nRight != DEFLRINS) ? OString::number(oox::drawingml::convertHmmToEmu(nRight)).getStr() : nullptr,
+ XML_tIns, (nTop != DEFTBINS) ? OString::number(oox::drawingml::convertHmmToEmu(nTop)).getStr() : nullptr,
+ XML_bIns, (nBottom != DEFTBINS) ? OString::number(oox::drawingml::convertHmmToEmu(nBottom)).getStr() : nullptr,
XML_anchor, sVerticalAlignment,
XML_anchorCtr, bHorizontalCenter ? "1" : nullptr,
XML_vert, sWritingMode,
- XML_rot, (nTextRotateAngle != 0) ? oox::drawingml::calcRotationValue( nTextRotateAngle * 100 ).getStr() : nullptr,
- FSEND );
+ XML_rot, (nTextRotateAngle != 0) ? oox::drawingml::calcRotationValue( nTextRotateAngle * 100 ).getStr() : nullptr );
if( !presetWarp.isEmpty())
{
- mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst, presetWarp.toUtf8().getStr(),
- FSEND );
+ mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst, presetWarp.toUtf8());
}
if (GetDocumentType() == DOCUMENT_DOCX || GetDocumentType() == DOCUMENT_XLSX)
{
bool bTextAutoGrowHeight = false;
if (GetProperty(rXPropSet, "TextAutoGrowHeight"))
mAny >>= bTextAutoGrowHeight;
- mpFS->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit), FSEND);
+ mpFS->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit));
}
if (GetDocumentType() == DOCUMENT_PPTX)
{
@@ -2683,14 +2651,14 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
}
mpFS->singleElementNS(XML_a, XML_normAutofit, XML_fontScale,
- ( nFontScale < MAX_SCALE_VAL && nFontScale > 0 ) ? I32S(nFontScale) : nullptr, FSEND);
+ ( nFontScale < MAX_SCALE_VAL && nFontScale > 0 ) ? OString::number(nFontScale).getStr() : nullptr);
}
else
{
bool bTextAutoGrowHeight = false;
if (GetProperty(rXPropSet, "TextAutoGrowHeight"))
mAny >>= bTextAutoGrowHeight;
- mpFS->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit), FSEND);
+ mpFS->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit));
}
}
mpFS->endElementNS((nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr);
@@ -2750,37 +2718,30 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
void DrawingML::WritePresetShape( const char* pShape , std::vector< std::pair<sal_Int32,sal_Int32>> & rAvList )
{
- mpFS->startElementNS( XML_a, XML_prstGeom,
- XML_prst, pShape,
- FSEND );
+ mpFS->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
if ( !rAvList.empty() )
{
- mpFS->startElementNS( XML_a, XML_avLst, FSEND );
+ mpFS->startElementNS(XML_a, XML_avLst);
for (auto const& elem : rAvList)
{
OString sName = OString("adj") + ( ( elem.first > 0 ) ? OString::number(elem.first) : OString() );
OString sFmla = OString("val ") + OString::number( elem.second );
- mpFS->singleElementNS( XML_a, XML_gd,
- XML_name, sName.getStr(),
- XML_fmla, sFmla.getStr(),
- FSEND );
+ mpFS->singleElementNS(XML_a, XML_gd, XML_name, sName, XML_fmla, sFmla);
}
mpFS->endElementNS( XML_a, XML_avLst );
}
else
- mpFS->singleElementNS( XML_a, XML_avLst, FSEND );
+ mpFS->singleElementNS(XML_a, XML_avLst);
mpFS->endElementNS( XML_a, XML_prstGeom );
}
void DrawingML::WritePresetShape( const char* pShape )
{
- mpFS->startElementNS( XML_a, XML_prstGeom,
- XML_prst, pShape,
- FSEND );
- mpFS->singleElementNS( XML_a, XML_avLst, FSEND );
+ mpFS->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
+ mpFS->singleElementNS(XML_a, XML_avLst);
mpFS->endElementNS( XML_a, XML_prstGeom );
}
@@ -2815,10 +2776,8 @@ void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool b
if (aAdjMap.find(OString(pShape)) != aAdjMap.end())
aAdjustments = aAdjMap[OString(pShape)];
- mpFS->startElementNS( XML_a, XML_prstGeom,
- XML_prst, pShape,
- FSEND );
- mpFS->startElementNS( XML_a, XML_avLst, FSEND );
+ mpFS->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
+ mpFS->startElementNS(XML_a, XML_avLst);
Sequence< drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
if ( ( rProp.Value >>= aAdjustmentSeq )
@@ -2848,8 +2807,7 @@ void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool b
mpFS->singleElementNS( XML_a, XML_gd,
XML_name, aAdjName,
- XML_fmla, OString("val " + OString::number(nValue)),
- FSEND );
+ XML_fmla, "val " + OString::number(nValue));
}
}
}
@@ -2935,20 +2893,19 @@ bool DrawingML::WriteCustomGeometry(
return false;
}
- mpFS->startElementNS( XML_a, XML_custGeom, FSEND );
- mpFS->singleElementNS( XML_a, XML_avLst, FSEND );
- mpFS->singleElementNS( XML_a, XML_gdLst, FSEND );
- mpFS->singleElementNS( XML_a, XML_ahLst, FSEND );
- mpFS->singleElementNS( XML_a, XML_rect, XML_l, "l", XML_t, "t",
- XML_r, "r", XML_b, "b", FSEND );
- mpFS->startElementNS( XML_a, XML_pathLst, FSEND );
+ mpFS->startElementNS(XML_a, XML_custGeom);
+ mpFS->singleElementNS(XML_a, XML_avLst);
+ mpFS->singleElementNS(XML_a, XML_gdLst);
+ mpFS->singleElementNS(XML_a, XML_ahLst);
+ mpFS->singleElementNS(XML_a, XML_rect, XML_l, "l", XML_t, "t",
+ XML_r, "r", XML_b, "b");
+ mpFS->startElementNS(XML_a, XML_pathLst);
if ( aPathSize.hasElements() )
{
mpFS->startElementNS( XML_a, XML_path,
- XML_w, I64S( aPathSize[0].Width ),
- XML_h, I64S( aPathSize[0].Height ),
- FSEND );
+ XML_w, OString::number(aPathSize[0].Width),
+ XML_h, OString::number(aPathSize[0].Height) );
}
else
{
@@ -2973,9 +2930,8 @@ bool DrawingML::WriteCustomGeometry(
nYMax = nY;
}
mpFS->startElementNS( XML_a, XML_path,
- XML_w, I64S( nXMax - nXMin ),
- XML_h, I64S( nYMax - nYMin ),
- FSEND );
+ XML_w, OString::number(nXMax - nXMin),
+ XML_h, OString::number(nYMax - nYMin) );
}
@@ -2985,7 +2941,7 @@ bool DrawingML::WriteCustomGeometry(
{
if ( aSegments[ j ].Command == drawing::EnhancedCustomShapeSegmentCommand::CLOSESUBPATH )
{
- mpFS->singleElementNS( XML_a, XML_close, FSEND );
+ mpFS->singleElementNS(XML_a, XML_close);
}
for (int k = 0; k < aSegments[j].Count && bOK; ++k)
{
@@ -2997,7 +2953,7 @@ bool DrawingML::WriteCustomGeometry(
bOK = false;
else
{
- mpFS->startElementNS( XML_a, XML_moveTo, FSEND );
+ mpFS->startElementNS(XML_a, XML_moveTo);
WriteCustomGeometryPoint(aPairs[nPairIndex], rSdrObjCustomShape);
mpFS->endElementNS( XML_a, XML_moveTo );
nPairIndex++;
@@ -3010,7 +2966,7 @@ bool DrawingML::WriteCustomGeometry(
bOK = false;
else
{
- mpFS->startElementNS( XML_a, XML_lnTo, FSEND );
+ mpFS->startElementNS(XML_a, XML_lnTo);
WriteCustomGeometryPoint(aPairs[nPairIndex], rSdrObjCustomShape);
mpFS->endElementNS( XML_a, XML_lnTo );
nPairIndex++;
@@ -3023,7 +2979,7 @@ bool DrawingML::WriteCustomGeometry(
bOK = false;
else
{
- mpFS->startElementNS( XML_a, XML_cubicBezTo, FSEND );
+ mpFS->startElementNS(XML_a, XML_cubicBezTo);
for( sal_uInt8 l = 0; l <= 2; ++l )
{
WriteCustomGeometryPoint(aPairs[nPairIndex+l], rSdrObjCustomShape);
@@ -3059,7 +3015,7 @@ bool DrawingML::WriteCustomGeometry(
bOK = false;
else
{
- mpFS->startElementNS( XML_a, XML_quadBezTo, FSEND );
+ mpFS->startElementNS(XML_a, XML_quadBezTo);
for( sal_uInt8 l = 0; l < 2; ++l )
{
WriteCustomGeometryPoint(aPairs[nPairIndex+l], rSdrObjCustomShape);
@@ -3097,10 +3053,7 @@ void DrawingML::WriteCustomGeometryPoint(
sal_Int32 nX = GetCustomGeometryPointValue(rParamPair.First, rSdrObjCustomShape);
sal_Int32 nY = GetCustomGeometryPointValue(rParamPair.Second, rSdrObjCustomShape);
- mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, OString::number(nX).getStr(),
- XML_y, OString::number(nY).getStr(),
- FSEND );
+ mpFS->singleElementNS(XML_a, XML_pt, XML_x, OString::number(nX), XML_y, OString::number(nY));
}
sal_Int32 DrawingML::GetCustomGeometryPointValue(
@@ -3122,27 +3075,21 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon )
if (rPolyPolygon.Count() < 1 && GetDocumentType() != DOCUMENT_DOCX)
return;
- mpFS->startElementNS( XML_a, XML_custGeom, FSEND );
- mpFS->singleElementNS( XML_a, XML_avLst, FSEND );
- mpFS->singleElementNS( XML_a, XML_gdLst, FSEND );
- mpFS->singleElementNS( XML_a, XML_ahLst, FSEND );
- mpFS->singleElementNS( XML_a, XML_rect,
- XML_l, "0",
- XML_t, "0",
- XML_r, "r",
- XML_b, "b",
- FSEND );
+ mpFS->startElementNS(XML_a, XML_custGeom);
+ mpFS->singleElementNS(XML_a, XML_avLst);
+ mpFS->singleElementNS(XML_a, XML_gdLst);
+ mpFS->singleElementNS(XML_a, XML_ahLst);
+ mpFS->singleElementNS(XML_a, XML_rect, XML_l, "0", XML_t, "0", XML_r, "r", XML_b, "b");
- mpFS->startElementNS( XML_a, XML_pathLst, FSEND );
+ mpFS->startElementNS( XML_a, XML_pathLst );
const tools::Rectangle aRect( rPolyPolygon.GetBoundRect() );
// Put all polygons of rPolyPolygon in the same path element
// to subtract the overlapped areas.
mpFS->startElementNS( XML_a, XML_path,
- XML_w, I64S( aRect.GetWidth() ),
- XML_h, I64S( aRect.GetHeight() ),
- FSEND );
+ XML_w, OString::number(aRect.GetWidth()),
+ XML_h, OString::number(aRect.GetHeight()) );
for( sal_uInt16 i = 0; i < rPolyPolygon.Count(); i ++ )
{
@@ -3151,12 +3098,11 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon )
if( rPoly.GetSize() > 0 )
{
- mpFS->startElementNS( XML_a, XML_moveTo, FSEND );
+ mpFS->startElementNS(XML_a, XML_moveTo);
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, I64S( rPoly[ 0 ].X() - aRect.Left() ),
- XML_y, I64S( rPoly[ 0 ].Y() - aRect.Top() ),
- FSEND );
+ XML_x, OString::number(rPoly[0].X() - aRect.Left()),
+ XML_y, OString::number(rPoly[0].Y() - aRect.Top()) );
mpFS->endElementNS( XML_a, XML_moveTo );
}
@@ -3170,13 +3116,12 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon )
if( j+2 < rPoly.GetSize() && rPoly.GetFlags(j+1) == PolyFlags::Control && rPoly.GetFlags(j+2) != PolyFlags::Control )
{
- mpFS->startElementNS( XML_a, XML_cubicBezTo, FSEND );
+ mpFS->startElementNS(XML_a, XML_cubicBezTo);
for( sal_uInt8 k = 0; k <= 2; ++k )
{
- mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, I64S( rPoly[j+k].X() - aRect.Left() ),
- XML_y, I64S( rPoly[j+k].Y() - aRect.Top() ),
- FSEND );
+ mpFS->singleElementNS(XML_a, XML_pt,
+ XML_x, OString::number(rPoly[j+k].X() - aRect.Left()),
+ XML_y, OString::number(rPoly[j+k].Y() - aRect.Top()));
}
mpFS->endElementNS( XML_a, XML_cubicBezTo );
@@ -3185,11 +3130,10 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon )
}
else if( flags == PolyFlags::Normal )
{
- mpFS->startElementNS( XML_a, XML_lnTo, FSEND );
+ mpFS->startElementNS(XML_a, XML_lnTo);
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, I64S( rPoly[j].X() - aRect.Left() ),
- XML_y, I64S( rPoly[j].Y() - aRect.Top() ),
- FSEND );
+ XML_x, OString::number(rPoly[j].X() - aRect.Left()),
+ XML_y, OString::number(rPoly[j].Y() - aRect.Top()) );
mpFS->endElementNS( XML_a, XML_lnTo );
}
}
@@ -3206,16 +3150,14 @@ void DrawingML::WriteConnectorConnections( EscherConnectorListEntry& rConnectorE
if( nStartID != -1 )
{
mpFS->singleElementNS( XML_a, XML_stCxn,
- XML_id, I32S( nStartID ),
- XML_idx, I64S( rConnectorEntry.GetConnectorRule( true ) ),
- FSEND );
+ XML_id, OString::number(nStartID),
+ XML_idx, OString::number(rConnectorEntry.GetConnectorRule(true)) );
}
if( nEndID != -1 )
{
mpFS->singleElementNS( XML_a, XML_endCxn,
- XML_id, I32S( nEndID ),
- XML_idx, I64S( rConnectorEntry.GetConnectorRule( false ) ),
- FSEND );
+ XML_id, OString::number(nEndID),
+ XML_idx, OString::number(rConnectorEntry.GetConnectorRule(false)) );
}
}
@@ -3284,7 +3226,7 @@ void DrawingML::WriteFill( const Reference< XPropertySet >& xPropSet )
WritePattFill( xPropSet );
break;
case FillStyle_NONE:
- mpFS->singleElementNS( XML_a, XML_noFill, FSEND );
+ mpFS->singleElementNS(XML_a, XML_noFill);
break;
default:
;
@@ -3307,14 +3249,14 @@ void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, const Sequence< Proper
else if( aProperties[i].Name == "Transformations" )
aProperties[i].Value >>= aTransformations;
}
- mpFS->startElementNS( XML_a, nTokenId, XML_idx, I32S( nIdx ), FSEND );
+ mpFS->startElementNS(XML_a, nTokenId, XML_idx, OString::number(nIdx));
WriteColor(sSchemeClr, aTransformations);
mpFS->endElementNS( XML_a, nTokenId );
}
else
{
// write mock <a:*Ref> tag
- mpFS->singleElementNS( XML_a, nTokenId, XML_idx, I32S( 0 ), FSEND );
+ mpFS->singleElementNS(XML_a, nTokenId, XML_idx, OString::number(0));
}
}
@@ -3343,7 +3285,7 @@ void DrawingML::WriteShapeStyle( const Reference< XPropertySet >& xPropSet )
WriteStyleProperties( XML_effectRef, aEffectRefProperties );
// write mock <a:fontRef>
- mpFS->singleElementNS( XML_a, XML_fontRef, XML_idx, "minor", FSEND );
+ mpFS->singleElementNS(XML_a, XML_fontRef, XML_idx, "minor");
}
void DrawingML::WriteShapeEffect( const OUString& sName, const Sequence< PropertyValue >& aEffectProps )
@@ -3586,7 +3528,7 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
aShadowGrabBag[2].Name = "RgbClrTransparency";
aShadowGrabBag[2].Value = rXPropSet->getPropertyValue( "ShadowTransparence" );
- mpFS->startElementNS(XML_a, XML_effectLst, FSEND);
+ mpFS->startElementNS(XML_a, XML_effectLst);
WriteShapeEffect( "outerShdw", aShadowGrabBag );
mpFS->endElementNS(XML_a, XML_effectLst);
}
@@ -3628,7 +3570,7 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
}
}
- mpFS->startElementNS(XML_a, XML_effectLst, FSEND);
+ mpFS->startElementNS(XML_a, XML_effectLst);
for( sal_Int32 i=0; i < aEffects.getLength(); ++i )
{
if( aEffects[i].Name == "outerShdw" )
@@ -3753,7 +3695,7 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
}
}
- mpFS->startElementNS( XML_a, XML_scene3d, FSEND );
+ mpFS->startElementNS(XML_a, XML_scene3d);
if( aEffectProps.getLength() > 0 )
{
@@ -3767,7 +3709,7 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
else
{
// a:camera with Word default values - Word won't open the document if this is not present
- mpFS->singleElementNS( XML_a, XML_camera, XML_prst, "orthographicFront", FSEND );
+ mpFS->singleElementNS(XML_a, XML_camera, XML_prst, "orthographicFront");
}
if( aEffectProps.getLength() > 0 )
@@ -3782,7 +3724,7 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
else
{
// a:lightRig with Word default values - Word won't open the document if this is not present
- mpFS->singleElementNS( XML_a, XML_lightRig, XML_rig, "threePt", XML_dir, "t", FSEND );
+ mpFS->singleElementNS(XML_a, XML_lightRig, XML_rig, "threePt", XML_dir, "t");
}
mpFS->endElementNS( XML_a, XML_scene3d );
@@ -3893,7 +3835,7 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
else if( aExtrusionColorProps[i].Name == "rgbClrTransparency" )
aExtrusionColorProps[i].Value >>= nTransparency;
}
- mpFS->startElementNS( XML_a, XML_extrusionClr, FSEND );
+ mpFS->startElementNS(XML_a, XML_extrusionClr);
if( sSchemeClr.isEmpty() )
WriteColor( nColor, MAX_PERCENT - ( PER_PERCENT * nTransparency ) );
@@ -3919,7 +3861,7 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
else if( aContourColorProps[i].Name == "rgbClrTransparency" )
aContourColorProps[i].Value >>= nTransparency;
}
- mpFS->startElementNS( XML_a, XML_contourClr, FSEND );
+ mpFS->startElementNS(XML_a, XML_contourClr);
if( sSchemeClr.isEmpty() )
WriteColor( nColor, MAX_PERCENT - ( PER_PERCENT * nTransparency ) );
@@ -3981,17 +3923,12 @@ void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet
}
}
- mpFS->startElementNS( XML_a, XML_extLst, FSEND );
- mpFS->startElementNS( XML_a, XML_ext,
- XML_uri, "{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}",
- FSEND );
+ 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 ), OUStringToOString(mpFB->getNamespaceURL(OOX_NS(a14)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
- mpFS->startElementNS( XML_a14, XML_imgLayer,
- FSNS( XML_r, XML_embed), sRelId.getStr(),
- FSEND );
- mpFS->startElementNS( XML_a14, XML_imgEffect, FSEND );
+ FSNS(XML_xmlns, XML_a14), mpFB->getNamespaceURL(OOX_NS(a14)).toUtf8() );
+ mpFS->startElementNS(XML_a14, XML_imgLayer, FSNS(XML_r, XML_embed), sRelId);
+ mpFS->startElementNS(XML_a14, XML_imgEffect);
sax_fastparser::XFastAttributeListRef xAttrList( aAttrList );
mpFS->singleElementNS( XML_a14, nEffectToken, xAttrList );
@@ -4083,31 +4020,27 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
if (GetDocumentType() == DOCUMENT_DOCX)
{
mpFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef);
- mpFS->singleElementNS(XML_wp, XML_cNvGraphicFramePr, FSEND);
+ mpFS->singleElementNS(XML_wp, XML_cNvGraphicFramePr);
mpFS->startElementNS(
XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
- OUStringToOString(mpFB->getNamespaceURL(OOX_NS(dml)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
+ mpFB->getNamespaceURL(OOX_NS(dml)).toUtf8());
}
else
{
- mpFS->startElementNS(XML_p, XML_nvGraphicFramePr, FSEND);
+ mpFS->startElementNS(XML_p, XML_nvGraphicFramePr);
mpFS->singleElementNS(XML_p, XML_cNvPr, xDocPrAttrListRef);
- mpFS->singleElementNS(XML_p, XML_cNvGraphicFramePr, FSEND);
+ mpFS->singleElementNS(XML_p, XML_cNvGraphicFramePr);
- mpFS->startElementNS(XML_p, XML_nvPr, FSEND);
- mpFS->startElementNS(XML_p, XML_extLst, FSEND);
+ mpFS->startElementNS(XML_p, XML_nvPr);
+ mpFS->startElementNS(XML_p, XML_extLst);
// change tracking extension - required in PPTX
- mpFS->startElementNS(XML_p, XML_ext, XML_uri, "{D42A27DB-BD31-4B8C-83A1-F6EECF244321}",
- FSEND);
- mpFS->singleElementNS(
- XML_p14, XML_modId, FSNS(XML_xmlns, XML_p14),
- OUStringToOString(mpFB->getNamespaceURL(OOX_NS(p14)), RTL_TEXTENCODING_UTF8).getStr(),
+ 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(),
XML_val,
- OString::number(comphelper::rng::uniform_uint_distribution(1, SAL_MAX_UINT32)).getStr(),
- FSEND);
+ OString::number(comphelper::rng::uniform_uint_distribution(1, SAL_MAX_UINT32)));
mpFS->endElementNS(XML_p, XML_ext);
mpFS->endElementNS(XML_p, XML_extLst);
mpFS->endElementNS(XML_p, XML_nvPr);
@@ -4119,11 +4052,11 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
WriteTransformation(tools::Rectangle(Point(aPos.X, aPos.Y), Size(aSize.Width, aSize.Height)),
XML_p, false, false, 0, false);
- mpFS->startElementNS(XML_a, XML_graphic, FSEND);
+ mpFS->startElementNS(XML_a, XML_graphic);
}
mpFS->startElementNS(XML_a, XML_graphicData, XML_uri,
- "http://schemas.openxmlformats.org/drawingml/2006/diagram", FSEND);
+ "http://schemas.openxmlformats.org/drawingml/2006/diagram");
OUString sRelationCompPrefix = OUString::createFromAscii(GetRelationCompPrefix());
@@ -4185,14 +4118,11 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
relIdNode->setNodeValue(drawingRelId);
}
- mpFS->singleElementNS(
- XML_dgm, XML_relIds, FSNS(XML_xmlns, XML_dgm),
- OUStringToOString(mpFB->getNamespaceURL(OOX_NS(dmlDiagram)), RTL_TEXTENCODING_UTF8)
- .getStr(),
- FSNS(XML_xmlns, XML_r),
- OUStringToOString(mpFB->getNamespaceURL(OOX_NS(officeRel)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS(XML_r, XML_dm), dataRelId.getStr(), FSNS(XML_r, XML_lo), layoutRelId.getStr(),
- FSNS(XML_r, XML_qs), styleRelId.getStr(), FSNS(XML_r, XML_cs), colorRelId.getStr(), FSEND);
+ 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_r, XML_dm), dataRelId, FSNS(XML_r, XML_lo), layoutRelId,
+ FSNS(XML_r, XML_qs), styleRelId, FSNS(XML_r, XML_cs), colorRelId);
mpFS->endElementNS(XML_a, XML_graphicData);
mpFS->endElementNS(XML_a, XML_graphic);
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index b89f1d966868..5005459ffddf 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -118,7 +118,7 @@ using ::css::frame::XModel;
using ::oox::core::XmlFilterBase;
using ::sax_fastparser::FSHelperPtr;
-#define IDS(x) OString(OStringLiteral(#x " ") + OString::number( mnShapeIdMax++ )).getStr()
+#define IDS(x) OString(#x " " + OString::number(mnShapeIdMax++)).getStr()
namespace oox {
@@ -423,7 +423,7 @@ ShapeExport& ShapeExport::WritePolyPolygonShape( const Reference< XShape >& xSha
SAL_INFO("oox.shape", "write polypolygon shape");
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp));
tools::PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon( xShape );
tools::Rectangle aRect( aPolyPolygon.GetBoundRect() );
@@ -437,13 +437,12 @@ ShapeExport& ShapeExport::WritePolyPolygonShape( const Reference< XShape >& xSha
// non visual shape properties
if (GetDocumentType() != DOCUMENT_DOCX)
{
- pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, IDS( Freeform ),
- FSEND );
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS( Freeform ) );
}
- pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
if (GetDocumentType() != DOCUMENT_DOCX)
{
WriteNonVisualProperties( xShape );
@@ -451,7 +450,7 @@ ShapeExport& ShapeExport::WritePolyPolygonShape( const Reference< XShape >& xSha
}
// visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
WriteTransformation( aRect, XML_a );
WritePolyPolygon( aPolyPolygon );
Reference< XPropertySet > xProps( xShape, UNO_QUERY );
@@ -494,25 +493,24 @@ ShapeExport& ShapeExport::WriteGroupShape(const uno::Reference<drawing::XShape>&
mnXmlNamespace = XML_wpg;
}
- pFS->startElementNS(mnXmlNamespace, nGroupShapeToken, FSEND);
+ pFS->startElementNS(mnXmlNamespace, nGroupShapeToken);
// non visual properties
if (GetDocumentType() != DOCUMENT_DOCX)
{
- pFS->startElementNS(mnXmlNamespace, XML_nvGrpSpPr, FSEND);
+ pFS->startElementNS(mnXmlNamespace, XML_nvGrpSpPr);
pFS->singleElementNS(mnXmlNamespace, XML_cNvPr,
- XML_id, I32S(GetNewShapeID(xShape)),
- XML_name, IDS(Group),
- FSEND);
- pFS->singleElementNS(mnXmlNamespace, XML_cNvGrpSpPr, FSEND);
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS(Group));
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvGrpSpPr);
WriteNonVisualProperties(xShape );
pFS->endElementNS(mnXmlNamespace, XML_nvGrpSpPr);
}
else
- pFS->singleElementNS(mnXmlNamespace, XML_cNvGrpSpPr, FSEND);
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvGrpSpPr);
// visual properties
- pFS->startElementNS(mnXmlNamespace, XML_grpSpPr, FSEND);
+ pFS->startElementNS(mnXmlNamespace, XML_grpSpPr);
WriteShapeTransformation(xShape, XML_a, false, false, true);
pFS->endElementNS(mnXmlNamespace, XML_grpSpPr);
@@ -763,7 +761,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
}
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp));
// non visual shape properties
if (GetDocumentType() != DOCUMENT_DOCX)
@@ -773,12 +771,11 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
{
mAny >>= isVisible;
}
- pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
+ pFS->startElementNS( mnXmlNamespace, XML_nvSpPr );
pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
+ XML_id, OString::number(GetNewShapeID(xShape)),
XML_name, IDS( CustomShape ),
- XML_hidden, isVisible ? nullptr : "1",
- FSEND );
+ XML_hidden, isVisible ? nullptr : "1" );
if( GETA( URL ) )
{
@@ -791,21 +788,19 @@ 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(),
- FSEND );
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8());
}
}
pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
- pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
WriteNonVisualProperties( xShape );
pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
}
else
- pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr, FSEND);
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
// visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
// moon is flipped in MSO, and mso-spt89 (right up arrow) is mapped to leftUpArrow
if ( sShapeType == "moon" || sShapeType == "mso-spt89" )
bFlipH = !bFlipH;
@@ -1000,7 +995,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
pFS->endElementNS( mnXmlNamespace, XML_spPr );
- pFS->startElementNS( mnXmlNamespace, XML_style, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_style);
WriteShapeStyle( rXPropSet );
pFS->endElementNS( mnXmlNamespace, XML_style );
@@ -1018,27 +1013,26 @@ ShapeExport& ShapeExport::WriteEllipseShape( const Reference< XShape >& xShape )
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp));
// TODO: arc, section, cut, connector
// non visual shape properties
if (GetDocumentType() != DOCUMENT_DOCX)
{
- pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, IDS( Ellipse ),
- FSEND );
- pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS( Ellipse ) );
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr );
WriteNonVisualProperties( xShape );
pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
}
else
- pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr, FSEND);
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
// visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
+ pFS->startElementNS( mnXmlNamespace, XML_spPr );
WriteShapeTransformation( xShape, XML_a );
WritePresetShape( "ellipse" );
Reference< XPropertySet > xProps( xShape, UNO_QUERY );
@@ -1111,13 +1105,12 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
XmlFilterBase* pFB = GetFB();
if (GetDocumentType() != DOCUMENT_DOCX)
- pFS->startElementNS( mnXmlNamespace, XML_pic, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_pic);
else
- pFS->startElementNS( mnXmlNamespace, XML_pic,
- FSNS(XML_xmlns, XML_pic), OUStringToOString(pFB->getNamespaceURL(OOX_NS(dmlPicture)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_pic,
+ FSNS(XML_xmlns, XML_pic), pFB->getNamespaceURL(OOX_NS(dmlPicture)).toUtf8());
- pFS->startElementNS( mnXmlNamespace, XML_nvPicPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_nvPicPr);
OUString sName, sDescr, sURL;
bool bHaveName, bHaveDesc, bHaveURL;
@@ -1130,19 +1123,17 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
mAny >>= sURL;
pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
+ XML_id, OString::number(GetNewShapeID(xShape)),
XML_name, bHaveName
? sName.toUtf8()
: OString("Picture " + OString::number(mnPictureIdMax++)),
- XML_descr, bHaveDesc ? sDescr.toUtf8().getStr() : nullptr,
- FSEND );
+ XML_descr, bHaveDesc ? sDescr.toUtf8().getStr() : nullptr );
// OOXTODO: //cNvPr children: XML_extLst, XML_hlinkHover
if (bHasMediaURL)
pFS->singleElementNS(XML_a, XML_hlinkClick,
FSNS(XML_r, XML_id), "",
- XML_action, "ppaction://media",
- FSEND);
+ XML_action, "ppaction://media");
if( !sURL.isEmpty() )
{
OUString sRelId = mpFB->addRelation( mpFS->getOutputStream(),
@@ -1150,15 +1141,13 @@ 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(),
- FSEND );
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8());
}
pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
- pFS->singleElementNS( mnXmlNamespace, XML_cNvPicPr,
- // OOXTODO: XML_preferRelativeSize
- FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvPicPr
+ // OOXTODO: XML_preferRelativeSize
+ );
if (bHasMediaURL)
WriteMediaNonVisualProperties(xShape);
else
@@ -1166,7 +1155,7 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
pFS->endElementNS( mnXmlNamespace, XML_nvPicPr );
- pFS->startElementNS( mnXmlNamespace, XML_blipFill, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_blipFill);
if (xGraphic.is())
{
@@ -1193,12 +1182,12 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
mAny >>= bStretch;
if ( pGraphic || bStretch )
- pFS->singleElementNS( XML_a, XML_stretch, FSEND );
+ pFS->singleElementNS(XML_a, XML_stretch);
pFS->endElementNS( mnXmlNamespace, XML_blipFill );
// visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
bool bFlipH = false;
if( xShapeProps->getPropertySetInfo()->hasPropertyByName("IsMirrored") )
{
@@ -1275,23 +1264,22 @@ ShapeExport& ShapeExport::WriteConnectorShape( const Reference< XShape >& xShape
aRect.setHeight( aStartPoint.Y - aEndPoint.Y );
}
- pFS->startElementNS( mnXmlNamespace, XML_cxnSp, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_cxnSp);
// non visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_nvCxnSpPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_nvCxnSpPr);
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, IDS( Line ),
- FSEND );
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS( Line ) );
// non visual connector shape drawing properties
- pFS->startElementNS( mnXmlNamespace, XML_cNvCxnSpPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_cNvCxnSpPr);
WriteConnectorConnections( aConnectorEntry, GetShapeID( rXShapeA ), GetShapeID( rXShapeB ) );
pFS->endElementNS( mnXmlNamespace, XML_cNvCxnSpPr );
- pFS->singleElementNS( mnXmlNamespace, XML_nvPr, FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_nvPr);
pFS->endElementNS( mnXmlNamespace, XML_nvCxnSpPr );
// visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
WriteTransformation( aRect, XML_a, bFlipH, bFlipV );
// TODO: write adjustments (ppt export doesn't work well there either)
WritePresetShape( sGeometry );
@@ -1317,7 +1305,7 @@ ShapeExport& ShapeExport::WriteLineShape( const Reference< XShape >& xShape )
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp));
tools::PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon( xShape );
if( aPolyPolygon.Count() == 1 && aPolyPolygon[ 0 ].GetSize() == 2)
@@ -1331,13 +1319,12 @@ ShapeExport& ShapeExport::WriteLineShape( const Reference< XShape >& xShape )
// non visual shape properties
if (GetDocumentType() != DOCUMENT_DOCX)
{
- pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, IDS( Line ),
- FSEND );
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS( Line ) );
}
- pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr );
if (GetDocumentType() != DOCUMENT_DOCX)
{
WriteNonVisualProperties( xShape );
@@ -1345,7 +1332,7 @@ ShapeExport& ShapeExport::WriteLineShape( const Reference< XShape >& xShape )
}
// visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV, true);
WritePresetShape( "line" );
Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
@@ -1354,7 +1341,7 @@ ShapeExport& ShapeExport::WriteLineShape( const Reference< XShape >& xShape )
pFS->endElementNS( mnXmlNamespace, XML_spPr );
//write style
- pFS->startElementNS( mnXmlNamespace, XML_style, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_style);
WriteShapeStyle( xShapeProps );
pFS->endElementNS( mnXmlNamespace, XML_style );
@@ -1369,9 +1356,8 @@ ShapeExport& ShapeExport::WriteLineShape( const Reference< XShape >& xShape )
ShapeExport& ShapeExport::WriteNonVisualDrawingProperties( const Reference< XShape >& xShape, const char* pName )
{
GetFS()->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, pName,
- FSEND );
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, pName );
return *this;
}
@@ -1388,7 +1374,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( const Reference< XShape >& xShape
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp));
sal_Int32 nRadius = 0;
@@ -1407,18 +1393,17 @@ ShapeExport& ShapeExport::WriteRectangleShape( const Reference< XShape >& xShape
// non visual shape properties
if (GetDocumentType() == DOCUMENT_DOCX)
- pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
- pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, IDS( Rectangle ),
- FSEND );
- pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS( Rectangle ) );
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
WriteNonVisualProperties( xShape );
pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
// visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
WriteShapeTransformation( xShape, XML_a );
WritePresetShape( nRadius == 0 ? "rect" : "roundRect" );
Reference< XPropertySet > xProps( xShape, UNO_QUERY );
@@ -1515,14 +1500,15 @@ ShapeExport& ShapeExport::WriteTextBox( const Reference< XInterface >& xIface, s
{
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( nXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_txBody : XML_txbx), FSEND );
+ pFS->startElementNS(nXmlNamespace,
+ (GetDocumentType() != DOCUMENT_DOCX ? XML_txBody : XML_txbx));
WriteText( xIface, m_presetWarp, /*bBodyPr=*/(GetDocumentType() != DOCUMENT_DOCX) );
pFS->endElementNS( nXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_txBody : XML_txbx) );
if (GetDocumentType() == DOCUMENT_DOCX)
WriteText( xIface, m_presetWarp, /*bBodyPr=*/true, /*bText=*/false, /*nXmlNamespace=*/nXmlNamespace );
}
else if (GetDocumentType() == DOCUMENT_DOCX)
- mpFS->singleElementNS(nXmlNamespace, XML_bodyPr, FSEND);
+ mpFS->singleElementNS(nXmlNamespace, XML_bodyPr);
return *this;
}
@@ -1532,20 +1518,21 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
Reference< XTable > xTable;
Reference< XPropertySet > xPropSet( rXShape, UNO_QUERY );
- mpFS->startElementNS( XML_a, XML_graphic, FSEND );
- mpFS->startElementNS( XML_a, XML_graphicData, XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/table", FSEND );
+ mpFS->startElementNS(XML_a, XML_graphic);
+ mpFS->startElementNS(XML_a, XML_graphicData,
+ XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/table");
if ( xPropSet.is() && ( xPropSet->getPropertyValue( "Model" ) >>= xTable ) )
{
- mpFS->startElementNS( XML_a, XML_tbl, FSEND );
- mpFS->singleElementNS( XML_a, XML_tblPr, FSEND );
+ mpFS->startElementNS(XML_a, XML_tbl);
+ mpFS->singleElementNS(XML_a, XML_tblPr);
Reference< container::XIndexAccess > xColumns( xTable->getColumns(), UNO_QUERY_THROW );
Reference< container::XIndexAccess > xRows( xTable->getRows(), UNO_QUERY_THROW );
sal_uInt16 nRowCount = static_cast< sal_uInt16 >( xRows->getCount() );
sal_uInt16 nColumnCount = static_cast< sal_uInt16 >( xColumns->getCount() );
- mpFS->startElementNS( XML_a, XML_tblGrid, FSEND );
+ mpFS->startElementNS(XML_a, XML_tblGrid);
for ( sal_Int32 x = 0; x < nColumnCount; x++ )
{
@@ -1553,7 +1540,8 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
sal_Int32 nWidth(0);
xColPropSet->getPropertyValue( "Width" ) >>= nWidth;
- mpFS->singleElementNS( XML_a, XML_gridCol, XML_w, I64S(oox::drawingml::convertHmmToEmu(nWidth)), FSEND );
+ mpFS->singleElementNS(XML_a, XML_gridCol,
+ XML_w, OString::number(oox::drawingml::convertHmmToEmu(nWidth)));
}
mpFS->endElementNS( XML_a, XML_tblGrid );
@@ -1569,7 +1557,8 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
xRowPropSet->getPropertyValue( "Height" ) >>= nRowHeight;
- mpFS->startElementNS( XML_a, XML_tr, XML_h, I64S( oox::drawingml::convertHmmToEmu( nRowHeight ) ), FSEND );
+ mpFS->startElementNS(XML_a, XML_tr,
+ XML_h, OString::number(oox::drawingml::convertHmmToEmu(nRowHeight)));
for( sal_Int32 nColumn = 0; nColumn < nColumnCount; nColumn++ )
{
Reference< XMergeableCell > xCell( xTable->getCellByPosition( nColumn, nRow ),
@@ -1582,10 +1571,9 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
if(xCell->getColumnSpan() > 1 && xCell->getRowSpan() > 1)
{
// having both : horizontal and vertical merge
- mpFS->startElementNS(XML_a, XML_tc, XML_gridSpan,
- I32S(xCell->getColumnSpan()),
- XML_rowSpan, I32S(xCell->getRowSpan()),
- FSEND);
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_gridSpan, OString::number(xCell->getColumnSpan()),
+ XML_rowSpan, OString::number(xCell->getRowSpan()));
// since, XMergeableCell doesn't have the information about
// cell having hMerge or vMerge.
// So, Populating the merged cell map in-order to use it to
@@ -1605,8 +1593,8 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
else if(xCell->getColumnSpan() > 1)
{
// having : horizontal merge
- mpFS->startElementNS(XML_a, XML_tc, XML_gridSpan,
- I32S(xCell->getColumnSpan()), FSEND);
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_gridSpan, OString::number(xCell->getColumnSpan()));
for(sal_Int32 columnIndex = nColumn; columnIndex < nColumn + xCell->getColumnSpan(); ++columnIndex) {
sal_Int32 transposeIndexForMergeCell = (nRow*nColumnCount) + columnIndex;
mergedCellMap[transposeIndexForMergeCell] =
@@ -1616,8 +1604,8 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
else if(xCell->getRowSpan() > 1)
{
// having : vertical merge
- mpFS->startElementNS(XML_a, XML_tc, XML_rowSpan,
- I32S(xCell->getRowSpan()), FSEND);
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_rowSpan, OString::number(xCell->getRowSpan()));
for(sal_Int32 rowIndex = nRow; rowIndex < nRow + xCell->getRowSpan(); ++rowIndex) {
sal_Int32 transposeIndexForMergeCell = (rowIndex*nColumnCount) + nColumn;
@@ -1632,7 +1620,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
if(!xCell->isMerged())
{
// independent cell
- mpFS->startElementNS( XML_a, XML_tc, FSEND );
+ mpFS->startElementNS(XML_a, XML_tc);
}
else
{
@@ -1652,16 +1640,15 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
if(parentCell->getColumnSpan() > 1)
{
// vMerge and has gridSpan
- mpFS->startElementNS( XML_a, XML_tc,
- XML_vMerge, I32S(1),
- XML_gridSpan, I32S(xCell->getColumnSpan()),
- FSEND );
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_vMerge, OString::number(1),
+ XML_gridSpan, OString::number(xCell->getColumnSpan()));
}
else
{
// only vMerge
- mpFS->startElementNS( XML_a, XML_tc,
- XML_vMerge, I32S(1), FSEND );
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_vMerge, OString::number(1));
}
}
else if(nRow == parentRowIndex)
@@ -1670,25 +1657,23 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
if(parentCell->getRowSpan() > 1)
{
// hMerge and has rowspan
- mpFS->startElementNS( XML_a, XML_tc,
- XML_hMerge, I32S(1),
- XML_rowSpan, I32S(xCell->getRowSpan()),
- FSEND );
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_hMerge, OString::number(1),
+ XML_rowSpan, OString::number(xCell->getRowSpan()));
}
else
{
// only hMerge
- mpFS->startElementNS( XML_a, XML_tc,
- XML_hMerge, I32S(1), FSEND );
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_hMerge, OString::number(1));
}
}
else
{
// has hMerge and vMerge
- mpFS->startElementNS( XML_a, XML_tc,
- XML_vMerge, I32S(1),
- XML_hMerge, I32S(1),
- FSEND );
+ mpFS->startElementNS(XML_a, XML_tc,
+ XML_vMerge, OString::number(1),
+ XML_hMerge, OString::number(1));
}
}
else
@@ -1727,10 +1712,9 @@ void ShapeExport::WriteTableCellProperties(const Reference< XPropertySet>& xCell
Any aRightMargin = xCellPropSet->getPropertyValue("TextRightDistance");
aRightMargin >>= nRightMargin;
- mpFS->startElementNS( XML_a, XML_tcPr,
- XML_marL, nLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : nullptr,
- XML_marR, nRightMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nRightMargin ) ): nullptr,
- FSEND );
+ mpFS->startElementNS(XML_a, XML_tcPr,
+ XML_marL, nLeftMargin > 0 ? OString::number(oox::drawingml::convertHmmToEmu(nLeftMargin)).getStr() : nullptr,
+ XML_marR, nRightMargin > 0 ? OString::number(oox::drawingml::convertHmmToEmu(nRightMargin)).getStr() : nullptr);
// Write background fill for table cell.
// TODO
@@ -1750,9 +1734,9 @@ void ShapeExport::WriteBorderLine(const sal_Int32 XML_line, const BorderLine2& r
if ( nBorderWidth > 0 )
{
- mpFS->startElementNS( XML_a, XML_line, XML_w, I32S(nBorderWidth), FSEND );
+ mpFS->startElementNS(XML_a, XML_line, XML_w, OString::number(nBorderWidth));
if ( rBorderLine.Color == sal_Int32( COL_AUTO ) )
- mpFS->singleElementNS( XML_a, XML_noFill, FSEND );
+ mpFS->singleElementNS(XML_a, XML_noFill);
else
DrawingML::WriteSolidFill( ::Color(rBorderLine.Color) );
mpFS->endElementNS( XML_a, XML_line );
@@ -1784,21 +1768,18 @@ ShapeExport& ShapeExport::WriteTableShape( const Reference< XShape >& xShape )
{
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( mnXmlNamespace, XML_graphicFrame, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_graphicFrame);
- pFS->startElementNS( mnXmlNamespace, XML_nvGraphicFramePr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_nvGraphicFramePr);
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, IDS(Table),
- FSEND );
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS(Table) );
- pFS->singleElementNS( mnXmlNamespace, XML_cNvGraphicFramePr,
- FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvGraphicFramePr);
if( GetDocumentType() == DOCUMENT_PPTX )
- pFS->singleElementNS( mnXmlNamespace, XML_nvPr,
- FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_nvPr);
pFS->endElementNS( mnXmlNamespace, XML_nvGraphicFramePr );
WriteShapeTransformation( xShape, mnXmlNamespace );
@@ -1813,15 +1794,15 @@ ShapeExport& ShapeExport::WriteTextShape( const Reference< XShape >& xShape )
{
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
+ pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp));
// non visual shape properties
if (GetDocumentType() != DOCUMENT_DOCX)
{
- pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
WriteNonVisualDrawingProperties( xShape, IDS( TextShape ) );
}
- pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, XML_txBox, "1", FSEND );
+ pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr, XML_txBox, "1");
if (GetDocumentType() != DOCUMENT_DOCX)
{
WriteNonVisualProperties( xShape );
@@ -1829,7 +1810,7 @@ ShapeExport& ShapeExport::WriteTextShape( const Reference< XShape >& xShape )
}
// visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
+ pFS->startElementNS(mnXmlNamespace, XML_spPr);
WriteShapeTransformation( xShape, XML_a );
WritePresetShape( "rect" );
uno::Reference<beans::XPropertySet> xPropertySet(xShape, UNO_QUERY);
@@ -1857,29 +1838,27 @@ void ShapeExport::WriteMathShape(Reference<XShape> const& xShape)
// ECMA standard does not actually allow oMath outside of
// WordProcessingML so write a MCE like PPT 2010 does
- mpFS->startElementNS(XML_mc, XML_AlternateContent, FSEND);
+ mpFS->startElementNS(XML_mc, XML_AlternateContent);
mpFS->startElementNS(XML_mc, XML_Choice,
- FSNS(XML_xmlns, XML_a14), OUStringToOString(mpFB->getNamespaceURL(OOX_NS(a14)), RTL_TEXTENCODING_UTF8).getStr(),
- XML_Requires, "a14",
- FSEND);
- mpFS->startElementNS(mnXmlNamespace, XML_sp, FSEND);
- mpFS->startElementNS(mnXmlNamespace, XML_nvSpPr, FSEND);
+ FSNS(XML_xmlns, XML_a14), mpFB->getNamespaceURL(OOX_NS(a14)).toUtf8(),
+ XML_Requires, "a14");
+ mpFS->startElementNS(mnXmlNamespace, XML_sp);
+ mpFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
mpFS->singleElementNS(mnXmlNamespace, XML_cNvPr,
- XML_id, OString::number(GetNewShapeID(xShape)).getStr(),
- XML_name, OString("Formula " + OString::number(mnShapeIdMax++)).getStr(),
- FSEND);
- mpFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr, XML_txBox, "1", FSEND);
- mpFS->singleElementNS(mnXmlNamespace, XML_nvPr, FSEND);
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS(Formula));
+ mpFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr, XML_txBox, "1");
+ mpFS->singleElementNS(mnXmlNamespace, XML_nvPr);
mpFS->endElementNS(mnXmlNamespace, XML_nvSpPr);
- mpFS->startElementNS(mnXmlNamespace, XML_spPr, FSEND);
+ mpFS->startElementNS(mnXmlNamespace, XML_spPr);
WriteShapeTransformation(xShape, XML_a);
WritePresetShape("rect");
mpFS->endElementNS(mnXmlNamespace, XML_spPr);
- mpFS->startElementNS(mnXmlNamespace, XML_txBody, FSEND);
- mpFS->startElementNS(XML_a, XML_bodyPr, FSEND);
+ mpFS->startElementNS(mnXmlNamespace, XML_txBody);
+ mpFS->startElementNS(XML_a, XML_bodyPr);
mpFS->endElementNS(XML_a, XML_bodyPr);
- mpFS->startElementNS(XML_a, XML_p, FSEND);
- mpFS->startElementNS(XML_a14, XML_m, FSEND);
+ mpFS->startElementNS(XML_a, XML_p);
+ mpFS->startElementNS(XML_a14, XML_m);
oox::FormulaExportBase *const pMagic(dynamic_cast<oox::FormulaExportBase*>(xMathModel.get()));
assert(pMagic);
@@ -1890,7 +1869,7 @@ void ShapeExport::WriteMathShape(Reference<XShape> const& xShape)
mpFS->endElementNS(mnXmlNamespace, XML_txBody);
mpFS->endElementNS(mnXmlNamespace, XML_sp);
mpFS->endElementNS(XML_mc, XML_Choice);
- mpFS->startElementNS(XML_mc, XML_Fallback, FSEND);
+ mpFS->startElementNS(XML_mc, XML_Fallback);
// TODO: export bitmap shape as fallback
mpFS->endElementNS(XML_mc, XML_Fallback);
mpFS->endElementNS(XML_mc, XML_AlternateContent);
@@ -2034,36 +2013,31 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
mpFS->getOutputStream(), sRelationType,
OUString::createFromAscii(GetRelationCompPrefix()) + sFileName);
- mpFS->startElementNS( mnXmlNamespace, XML_graphicFrame, FSEND );
+ mpFS->startElementNS(mnXmlNamespace, XML_graphicFrame);
- mpFS->startElementNS( mnXmlNamespace, XML_nvGraphicFramePr, FSEND );
+ mpFS->startElementNS(mnXmlNamespace, XML_nvGraphicFramePr);
mpFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, IDS(Object),
- FSEND );
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS(Object) );
- mpFS->singleElementNS( mnXmlNamespace, XML_cNvGraphicFramePr,
- FSEND );
+ mpFS->singleElementNS(mnXmlNamespace, XML_cNvGraphicFramePr);
if (GetDocumentType() == DOCUMENT_PPTX)
- mpFS->singleElementNS( mnXmlNamespace, XML_nvPr,
- FSEND );
+ mpFS->singleElementNS(mnXmlNamespace, XML_nvPr);
mpFS->endElementNS( mnXmlNamespace, XML_nvGraphicFramePr );
WriteShapeTransformation( xShape, mnXmlNamespace );
- mpFS->startElementNS( XML_a, XML_graphic, FSEND );
- mpFS->startElementNS( XML_a, XML_graphicData,
- XML_uri, "http://schemas.openxmlformats.org/presentationml/2006/ole",
- FSEND );
+ mpFS->startElementNS(XML_a, XML_graphic);
+ mpFS->startElementNS(XML_a, XML_graphicData,
+ XML_uri, "http://schemas.openxmlformats.org/presentationml/2006/ole");
if (pProgID)
{
mpFS->startElementNS( mnXmlNamespace, XML_oleObj,
XML_progId, pProgID,
FSNS(XML_r, XML_id), sRelId.toUtf8(),
- XML_spid, "",
- FSEND );
+ XML_spid, "" );
}
else
{
@@ -2071,11 +2045,10 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
//? XML_name, "Document",
FSNS(XML_r, XML_id), sRelId.toUtf8(),
// The spec says that this is a required attribute, but PowerPoint can only handle an empty value.
- XML_spid, "",
- FSEND );
+ XML_spid, "" );
}
- mpFS->singleElementNS( mnXmlNamespace, XML_embed, FSEND );
+ mpFS->singleElementNS( mnXmlNamespace, XML_embed );
// pic element
SdrObject* pSdrOLE2( GetSdrObjectFromXShape( xShape ) );
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index ff3631236868..9eed6c69e261 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -425,9 +425,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
case ESCHER_WrapThrough: pWrapType = "through"; break;
}
if ( pWrapType )
- m_pSerializer->singleElementNS( XML_w10, XML_wrap,
- XML_type, pWrapType,
- FSEND );
+ m_pSerializer->singleElementNS(XML_w10, XML_wrap, XML_type, pWrapType);
}
bAlreadyWritten[ ESCHER_Prop_WrapText ] = true;
break;
@@ -907,9 +905,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
OUString aTextPathString = SvxMSDffManager::MSDFFReadZString(aStream, opt.nProp.size(), true);
aStream.Seek(0);
- m_pSerializer->singleElementNS( XML_v, XML_path,
- XML_textpathok, "t",
- FSEND );
+ m_pSerializer->singleElementNS(XML_v, XML_path, XML_textpathok, "t");
sax_fastparser::FastAttributeList* pAttrList = FastSerializerHelper::createAttrList();
pAttrList->add(XML_on, "t");
@@ -1374,7 +1370,7 @@ sal_Int32 VMLExport::StartShape()
if( pParaObj )
{
// this is reached only in case some text is attached to the shape
- m_pSerializer->startElementNS(XML_v, XML_textbox, FSEND);
+ m_pSerializer->startElementNS(XML_v, XML_textbox);
m_pTextExport->WriteOutliner(*pParaObj);
m_pSerializer->endElementNS(XML_v, XML_textbox);
if( bOwnParaObj )
diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx
index bd35903bd7a6..69056a626d14 100644
--- a/sax/source/tools/fshelper.cxx
+++ b/sax/source/tools/fshelper.cxx
@@ -40,7 +40,7 @@ FastSerializerHelper::~FastSerializerHelper()
delete mpSerializer;
}
-void FastSerializerHelper::startElement(sal_Int32 elementTokenId, FSEND_t)
+void FastSerializerHelper::startElement(sal_Int32 elementTokenId)
{
mpSerializer->startFastElement(elementTokenId);
}
@@ -52,7 +52,7 @@ void FastSerializerHelper::pushAttributeValue(sal_Int32 attribute, const OString
{
mpSerializer->getTokenValueList().emplace_back(attribute, value.getStr());
}
-void FastSerializerHelper::singleElement(sal_Int32 elementTokenId, FSEND_t)
+void FastSerializerHelper::singleElement(sal_Int32 elementTokenId)
{
mpSerializer->singleFastElement(elementTokenId);
}
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 759c6d3caa82..c0950245464d 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -688,8 +688,7 @@ void ExcTable::WriteXml( XclExpXmlStream& rStrm )
pWorksheet->startElement( XML_worksheet,
XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
- FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
- FSEND );
+ FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8() );
SetCurrScTab( mnScTab );
if (mxCellTable)
@@ -808,15 +807,14 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
rWorkbook->startElement( XML_workbook,
XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
- FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
- FSEND );
+ FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8() );
rWorkbook->singleElement( XML_fileVersion,
- XML_appName, "Calc",
+ XML_appName, "Calc"
// OOXTODO: XML_codeName
// OOXTODO: XML_lastEdited
// OOXTODO: XML_lowestEdited
// OOXTODO: XML_rupBuild
- FSEND );
+ );
if( !maTableList.IsEmpty() )
{
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index fc0b2bbd2caa..b4da8ba38617 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -376,21 +376,20 @@ void XclExpXmlSheetPr::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_transitionEntry,
// OOXTODO: XML_published,
// OOXTODO: XML_codeName,
- XML_filterMode, mpManager ? ToPsz( mpManager->HasFilterMode( mnScTab ) ) : nullptr,
- // OOXTODO: XML_enableFormatConditionsCalculation,
- FSEND );
+ XML_filterMode, mpManager ? ToPsz(mpManager->HasFilterMode(mnScTab)) : nullptr
+ // OOXTODO: XML_enableFormatConditionsCalculation
+ );
// Note : the order of child elements is significant. Don't change the order.
// OOXTODO: XML_outlinePr
if (maTabColor != COL_AUTO)
- rWorksheet->singleElement(
- XML_tabColor, XML_rgb, XclXmlUtils::ToOString(maTabColor).getStr(), FSEND);
+ rWorksheet->singleElement(XML_tabColor, XML_rgb, XclXmlUtils::ToOString(maTabColor));
rWorksheet->singleElement(XML_pageSetUpPr,
// OOXTODO: XML_autoPageBreaks,
- XML_fitToPage, ToPsz(mbFitToPage), FSEND);
+ XML_fitToPage, ToPsz(mbFitToPage));
rWorksheet->endElement( XML_sheetPr );
}
@@ -463,13 +462,12 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
XML_sort, pTabProtect->isOptionEnabled( ScTableProtection::SORT ) ? ToPsz( false ) : nullptr,
XML_autoFilter, pTabProtect->isOptionEnabled( ScTableProtection::AUTOFILTER ) ? ToPsz( false ) : nullptr,
XML_pivotTables, pTabProtect->isOptionEnabled( ScTableProtection::PIVOT_TABLES ) ? ToPsz( false ) : nullptr,
- XML_selectUnlockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_UNLOCKED_CELLS ) ? nullptr : ToPsz( true ),
- FSEND );
+ XML_selectUnlockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_UNLOCKED_CELLS ) ? nullptr : ToPsz( true ) );
const ::std::vector<ScEnhancedProtection>& rProts( pTabProtect->getEnhancedProtection());
if (!rProts.empty())
{
- rWorksheet->startElement( XML_protectedRanges, FSEND);
+ rWorksheet->startElement(XML_protectedRanges);
for (const auto& rProt : rProts)
{
SAL_WARN_IF( rProt.maSecurityDescriptorXML.isEmpty() && !rProt.maSecurityDescriptor.empty(),
@@ -486,8 +484,7 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
XML_hashValue, rProt.maPasswordHash.maHashValue.isEmpty() ? nullptr : rProt.maPasswordHash.maHashValue.toUtf8().getStr(),
XML_saltValue, rProt.maPasswordHash.maSaltValue.isEmpty() ? nullptr : rProt.maPasswordHash.maSaltValue.toUtf8().getStr(),
XML_spinCount, rProt.maPasswordHash.mnSpinCount ? OString::number( rProt.maPasswordHash.mnSpinCount).getStr() : nullptr,
- XML_sqref, rProt.maRangeList.is() ? XclXmlUtils::ToOString( *rProt.maRangeList).getStr() : nullptr,
- FSEND);
+ XML_sqref, rProt.maRangeList.is() ? XclXmlUtils::ToOString( *rProt.maRangeList).getStr() : nullptr);
}
rWorksheet->endElement( XML_protectedRanges);
}
@@ -602,8 +599,7 @@ void ExcFilterCondition::SaveXml( XclExpXmlStream& rStrm )
rStrm.GetCurrentStream()->singleElement( XML_customFilter,
XML_operator, lcl_GetOperator( nOper ),
- XML_val, lcl_GetValue( nType, fVal, pText.get() ).getStr(),
- FSEND );
+ XML_val, lcl_GetValue(nType, fVal, pText.get()) );
}
void ExcFilterCondition::SaveText( XclExpStream& rStrm )
@@ -793,10 +789,10 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_filterColumn,
- XML_colId, OString::number( nCol ).getStr(),
+ XML_colId, OString::number(nCol)
// OOXTODO: XML_hiddenButton, AutoFilter12 fHideArrow?
- // OOXTODO: XML_showButton,
- FSEND );
+ // OOXTODO: XML_showButton
+ );
switch (meType)
{
@@ -807,14 +803,13 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->singleElement( XML_top10,
XML_top, ToPsz( get_flag( nFlags, EXC_AFFLAG_TOP10TOP ) ),
XML_percent, ToPsz( get_flag( nFlags, EXC_AFFLAG_TOP10PERC ) ),
- XML_val, OString::number( (nFlags >> 7 ) ).getStr(),
- // OOXTODO: XML_filterVal,
- FSEND );
+ XML_val, OString::number((nFlags >> 7))
+ // OOXTODO: XML_filterVal
+ );
}
rWorksheet->startElement( XML_customFilters,
- XML_and, ToPsz( (nFlags & EXC_AFFLAG_ANDORMASK) == EXC_AFFLAG_AND ),
- FSEND );
+ XML_and, ToPsz((nFlags & EXC_AFFLAG_ANDORMASK) == EXC_AFFLAG_AND) );
aCond[ 0 ].SaveXml( rStrm );
aCond[ 1 ].SaveXml( rStrm );
rWorksheet->endElement( XML_customFilters );
@@ -824,12 +819,12 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
break;
case MultiValue:
{
- rWorksheet->startElement(XML_filters, FSEND);
+ rWorksheet->startElement(XML_filters);
for (const auto& rMultiValue : maMultiValues)
{
OString aStr = OUStringToOString(rMultiValue, RTL_TEXTENCODING_UTF8);
const char* pz = aStr.getStr();
- rWorksheet->singleElement(XML_filter, XML_val, pz, FSEND);
+ rWorksheet->singleElement(XML_filter, XML_val, pz);
}
rWorksheet->endElement(XML_filters);
}
@@ -991,9 +986,7 @@ void ExcAutoFilterRecs::SaveXml( XclExpXmlStream& rStrm )
return;
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_autoFilter,
- XML_ref, XclXmlUtils::ToOString( maRef ).getStr(),
- FSEND );
+ rWorksheet->startElement(XML_autoFilter, XML_ref, XclXmlUtils::ToOString(maRef));
// OOXTODO: XML_extLst, XML_sortState
if( !maFilterList.IsEmpty() )
maFilterList.SaveXml( rStrm );
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 5d5b4458f762..9ca8310d28a3 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -210,13 +210,12 @@ void XclExpSstImpl::SaveXml( XclExpXmlStream& rStrm )
pSst->startElement( XML_sst,
XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
- XML_count, OString::number( mnTotal ).getStr(),
- XML_uniqueCount, OString::number( mnSize ).getStr(),
- FSEND );
+ XML_count, OString::number(mnTotal),
+ XML_uniqueCount, OString::number(mnSize) );
for (auto const& elem : maStringVector)
{
- pSst->startElement( XML_si, FSEND );
+ pSst->startElement(XML_si);
elem->WriteXml( rStrm );
pSst->endElement( XML_si );
}
@@ -306,15 +305,11 @@ void XclExpMergedcells::SaveXml( XclExpXmlStream& rStrm )
if( !nCount )
return;
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_mergeCells,
- XML_count, OString::number( nCount ).getStr(),
- FSEND );
+ rWorksheet->startElement(XML_mergeCells, XML_count, OString::number(nCount));
for( size_t i = 0; i < nCount; ++i )
{
const ScRange & rRange = maMergedRanges[ i ];
- rWorksheet->singleElement( XML_mergeCell,
- XML_ref, XclXmlUtils::ToOString( rRange ).getStr(),
- FSEND );
+ rWorksheet->singleElement(XML_mergeCell, XML_ref, XclXmlUtils::ToOString(rRange));
}
rWorksheet->endElement( XML_mergeCells );
}
@@ -522,7 +517,7 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
oox::getRelationship(Relationship::HYPERLINK),
msTarget, true ) : OUString();
rStrm.GetCurrentStream()->singleElement( XML_hyperlink,
- XML_ref, XclXmlUtils::ToOString( maScPos ).getStr(),
+ XML_ref, XclXmlUtils::ToOString(maScPos),
FSNS( XML_r, XML_id ), !sId.isEmpty()
? sId.toUtf8().getStr()
: nullptr,
@@ -530,8 +525,7 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
? XclXmlUtils::ToOString( *mxTextMark ).getStr()
: nullptr,
// OOXTODO: XML_tooltip, from record HLinkTooltip 800h wzTooltip
- XML_display, m_Repr.toUtf8(),
- FSEND );
+ XML_display, m_Repr.toUtf8() );
}
// Label ranges ===============================================================
@@ -1043,34 +1037,33 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_cfRule,
XML_type, GetTypeString( mrFormatEntry.GetOperation() ),
- XML_priority, OString::number( mnPriority + 1 ).getStr(),
+ XML_priority, OString::number(mnPriority + 1),
XML_operator, GetOperatorString( mrFormatEntry.GetOperation(), bFmla2 ),
- XML_aboveAverage, OString::number( int(bAboveAverage) ).getStr(),
- XML_equalAverage, OString::number( int(bEqualAverage) ).getStr(),
- XML_bottom, OString::number( int(bBottom) ).getStr(),
- XML_percent, OString::number( int(bPercent) ).getStr(),
- XML_rank, aRank.getStr(),
- XML_text, aText.getStr(),
- XML_dxfId, OString::number( GetDxfs().GetDxfId( mrFormatEntry.GetStyle() ) ).getStr(),
- FSEND );
+ XML_aboveAverage, ToPsz10(bAboveAverage),
+ XML_equalAverage, ToPsz10(bEqualAverage),
+ XML_bottom, ToPsz10(bBottom),
+ XML_percent, ToPsz10(bPercent),
+ XML_rank, aRank,
+ XML_text, aText,
+ XML_dxfId, OString::number(GetDxfs().GetDxfId(mrFormatEntry.GetStyle())) );
if (RequiresFixedFormula(eOperation))
{
- rWorksheet->startElement( XML_formula, FSEND );
+ rWorksheet->startElement(XML_formula);
OString aFormula = GetFixedFormula(eOperation, mrFormatEntry.GetValidSrcPos(), aText);
rWorksheet->writeEscaped(aFormula.getStr());
rWorksheet->endElement( XML_formula );
}
else if(RequiresFormula(eOperation))
{
- rWorksheet->startElement( XML_formula, FSEND );
+ rWorksheet->startElement(XML_formula);
std::unique_ptr<ScTokenArray> pTokenArray(mrFormatEntry.CreateFlatCopiedTokenArray(0));
rWorksheet->writeEscaped(XclXmlUtils::ToOUString( GetCompileFormulaContext(), mrFormatEntry.GetValidSrcPos(),
pTokenArray.get()));
rWorksheet->endElement( XML_formula );
if (bFmla2)
{
- rWorksheet->startElement( XML_formula, FSEND );
+ rWorksheet->startElement(XML_formula);
std::unique_ptr<ScTokenArray> pTokenArray2(mrFormatEntry.CreateFlatCopiedTokenArray(1));
rWorksheet->writeEscaped(XclXmlUtils::ToOUString( GetCompileFormulaContext(), mrFormatEntry.GetValidSrcPos(),
pTokenArray2.get()));
@@ -1158,10 +1151,9 @@ void XclExpDateFormat::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_cfRule,
XML_type, "timePeriod",
- XML_priority, OString::number( mnPriority + 1 ).getStr(),
+ XML_priority, OString::number(mnPriority + 1),
XML_timePeriod, sTimePeriod,
- XML_dxfId, OString::number( GetDxfs().GetDxfId( mrFormatEntry.GetStyleName() ) ).getStr(),
- FSEND );
+ XML_dxfId, OString::number(GetDxfs().GetDxfId(mrFormatEntry.GetStyleName())) );
rWorksheet->endElement( XML_cfRule);
}
@@ -1221,9 +1213,8 @@ void XclExpCfvo::SaveXml( XclExpXmlStream& rStrm )
}
rWorksheet->startElement( XML_cfvo,
- XML_type, getColorScaleType(mrEntry, mbFirst).getStr(),
- XML_val, aValue.getStr(),
- FSEND );
+ XML_type, getColorScaleType(mrEntry, mbFirst),
+ XML_val, aValue );
rWorksheet->endElement( XML_cfvo );
}
@@ -1243,9 +1234,7 @@ void XclExpColScaleCol::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_color,
- XML_rgb, XclXmlUtils::ToOString( mrColor ).getStr(),
- FSEND );
+ rWorksheet->startElement(XML_color, XML_rgb, XclXmlUtils::ToOString(mrColor));
rWorksheet->endElement( XML_color );
}
@@ -1409,9 +1398,9 @@ void XclExpCondfmt::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_conditionalFormatting,
- XML_sqref, msSeqRef.toUtf8(),
- // OOXTODO: XML_pivot,
- FSEND );
+ XML_sqref, msSeqRef.toUtf8()
+ // OOXTODO: XML_pivot
+ );
maCFList.SaveXml( rStrm );
@@ -1442,10 +1431,9 @@ void XclExpColorScale::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->startElement( XML_cfRule,
XML_type, "colorScale",
- XML_priority, OString::number( mnPriority + 1 ).getStr(),
- FSEND );
+ XML_priority, OString::number(mnPriority + 1) );
- rWorksheet->startElement( XML_colorScale, FSEND );
+ rWorksheet->startElement(XML_colorScale);
maCfvoList.SaveXml(rStrm);
maColList.SaveXml(rStrm);
@@ -1479,14 +1467,12 @@ void XclExpDataBar::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->startElement( XML_cfRule,
XML_type, "dataBar",
- XML_priority, OString::number( mnPriority + 1 ).getStr(),
- FSEND );
+ XML_priority, OString::number(mnPriority + 1) );
rWorksheet->startElement( XML_dataBar,
- XML_showValue, OString::number(int(!mrFormat.GetDataBarData()->mbOnlyBar)),
- XML_minLength, OString::number(sal_uInt32(mrFormat.GetDataBarData()->mnMinLength)),
- XML_maxLength, OString::number(sal_uInt32(mrFormat.GetDataBarData()->mnMaxLength)),
- FSEND );
+ XML_showValue, ToPsz10(!mrFormat.GetDataBarData()->mbOnlyBar),
+ XML_minLength, OString::number(sal_uInt32(mrFormat.GetDataBarData()->mnMinLength)),
+ XML_maxLength, OString::number(sal_uInt32(mrFormat.GetDataBarData()->mnMaxLength)) );
mpCfvoLowerLimit->SaveXml(rStrm);
mpCfvoUpperLimit->SaveXml(rStrm);
@@ -1495,13 +1481,12 @@ void XclExpDataBar::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->endElement( XML_dataBar );
// extLst entries for Excel 2010 and 2013
- rWorksheet->startElement( XML_extLst, FSEND );
- rWorksheet->startElement( XML_ext,
- FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)).toUtf8(),
- XML_uri, "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}",
- FSEND );
+ rWorksheet->startElement(XML_extLst);
+ rWorksheet->startElement(XML_ext,
+ FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)).toUtf8(),
+ XML_uri, "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}");
- rWorksheet->startElementNS( XML_x14, XML_id, FSEND );
+ rWorksheet->startElementNS( XML_x14, XML_id );
rWorksheet->write( maGUID.getStr() );
rWorksheet->endElementNS( XML_x14, XML_id );
@@ -1534,15 +1519,13 @@ void XclExpIconSet::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->startElement( XML_cfRule,
XML_type, "iconSet",
- XML_priority, OString::number( mnPriority + 1 ).getStr(),
- FSEND );
+ XML_priority, OString::number(mnPriority + 1) );
const char* pIconSetName = ScIconSetFormat::getIconSetName(mrFormat.GetIconSetData()->eIconSetType);
rWorksheet->startElement( XML_iconSet,
XML_iconSet, pIconSetName,
XML_showValue, mrFormat.GetIconSetData()->mbShowValue ? nullptr : "0",
- XML_reverse, mrFormat.GetIconSetData()->mbReverse ? "1" : nullptr,
- FSEND );
+ XML_reverse, mrFormat.GetIconSetData()->mbReverse ? "1" : nullptr );
maCfvoList.SaveXml( rStrm );
@@ -1847,18 +1830,17 @@ void XclExpDV::SaveXml( XclExpXmlStream& rStrm )
XML_showDropDown, ToPsz( ::get_flag( mnFlags, EXC_DV_SUPPRESSDROPDOWN ) ),
XML_showErrorMessage, ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWERROR ) ),
XML_showInputMessage, ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWPROMPT ) ),
- XML_sqref, XclXmlUtils::ToOString( maScRanges ).getStr(),
- XML_type, lcl_GetValidationType( mnFlags ),
- FSEND );
+ XML_sqref, XclXmlUtils::ToOString(maScRanges),
+ XML_type, lcl_GetValidationType(mnFlags) );
if( !msFormula1.isEmpty() )
{
- rWorksheet->startElement( XML_formula1, FSEND );
+ rWorksheet->startElement(XML_formula1);
rWorksheet->writeEscaped( msFormula1 );
rWorksheet->endElement( XML_formula1 );
}
if( !msFormula2.isEmpty() )
{
- rWorksheet->startElement( XML_formula2, FSEND );
+ rWorksheet->startElement(XML_formula2);
rWorksheet->writeEscaped( msFormula2 );
rWorksheet->endElement( XML_formula2 );
}
@@ -1911,11 +1893,11 @@ void XclExpDval::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_dataValidations,
- XML_count, OString::number( maDVList.GetSize() ).getStr(),
+ XML_count, OString::number(maDVList.GetSize())
// OOXTODO: XML_disablePrompts,
// OOXTODO: XML_xWindow,
- // OOXTODO: XML_yWindow,
- FSEND );
+ // OOXTODO: XML_yWindow
+ );
maDVList.SaveXml( rStrm );
rWorksheet->endElement( XML_dataValidations );
}
diff --git a/sc/source/filter/excel/xedbdata.cxx b/sc/source/filter/excel/xedbdata.cxx
index e60bf5a14086..416cb34da9a6 100644
--- a/sc/source/filter/excel/xedbdata.cxx
+++ b/sc/source/filter/excel/xedbdata.cxx
@@ -67,7 +67,7 @@ void XclExpTablesImpl8::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& pWorksheetStrm = rStrm.GetCurrentStream();
- pWorksheetStrm->startElement( XML_tableParts, FSEND);
+ pWorksheetStrm->startElement(XML_tableParts);
for (auto const& it : maTables)
{
OUString aRelId;
@@ -79,9 +79,7 @@ void XclExpTablesImpl8::SaveXml( XclExpXmlStream& rStrm )
CREATE_OFFICEDOC_RELATION_TYPE("table"),
&aRelId);
- pWorksheetStrm->singleElement( XML_tablePart,
- FSNS(XML_r, XML_id), aRelId.toUtf8(),
- FSEND);
+ pWorksheetStrm->singleElement(XML_tablePart, FSNS(XML_r, XML_id), aRelId.toUtf8());
rStrm.PushStream( pTableStrm);
SaveTableXml( rStrm, it);
@@ -181,13 +179,13 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
sax_fastparser::FSHelperPtr& pTableStrm = rStrm.GetCurrentStream();
pTableStrm->startElement( XML_table,
XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
- XML_id, OString::number( rEntry.mnTableId).getStr(),
+ XML_id, OString::number( rEntry.mnTableId),
XML_name, rData.GetName().toUtf8(),
XML_displayName, rData.GetName().toUtf8(),
XML_ref, XclXmlUtils::ToOString(aRange),
XML_headerRowCount, ToPsz10(rData.HasHeader()),
XML_totalsRowCount, ToPsz10(rData.HasTotals()),
- XML_totalsRowShown, ToPsz10(rData.HasTotals()), // we don't support that but if there are totals they are shown
+ XML_totalsRowShown, ToPsz10(rData.HasTotals()) // we don't support that but if there are totals they are shown
// OOXTODO: XML_comment, ...,
// OOXTODO: XML_connectionId, ...,
// OOXTODO: XML_dataCellStyle, ...,
@@ -202,8 +200,8 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
// OOXTODO: XML_tableType, ...,
// OOXTODO: XML_totalsRowBorderDxfId, ...,
// OOXTODO: XML_totalsRowCellStyle, ...,
- // OOXTODO: XML_totalsRowDxfId, ...,
- FSEND);
+ // OOXTODO: XML_totalsRowDxfId, ...
+ );
if (rData.HasAutoFilter())
{
@@ -222,9 +220,8 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
const std::vector< OUString >& rColNames = rData.GetTableColumnNames();
if (!rColNames.empty())
{
- pTableStrm->startElement( XML_tableColumns,
- XML_count, OString::number( aRange.aEnd.Col() - aRange.aStart.Col() + 1).getStr(),
- FSEND);
+ pTableStrm->startElement(XML_tableColumns,
+ XML_count, OString::number(aRange.aEnd.Col() - aRange.aStart.Col() + 1));
for (size_t i=0, n=rColNames.size(); i < n; ++i)
{
@@ -235,8 +232,8 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
// OOXTODO: write <totalsRowFormula> once we support it.
pTableStrm->singleElement( XML_tableColumn,
- XML_id, OString::number(i+1).getStr(),
- XML_name, OUStringToOString( rColNames[i], RTL_TEXTENCODING_UTF8).getStr(),
+ XML_id, OString::number(i+1),
+ XML_name, rColNames[i].toUtf8()
// OOXTODO: XML_dataCellStyle, ...,
// OOXTODO: XML_dataDxfId, ...,
// OOXTODO: XML_headerRowCellStyle, ...,
@@ -246,8 +243,8 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
// OOXTODO: XML_totalsRowDxfId, ...,
// OOXTODO: XML_totalsRowFunction, ...,
// OOXTODO: XML_totalsRowLabel, ...,
- // OOXTODO: XML_uniqueName, ...,
- FSEND);
+ // OOXTODO: XML_uniqueName, ...
+ );
}
pTableStrm->endElement( XML_tableColumns);
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index f1d41f7a7f7e..0c04cc5ea690 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -130,16 +130,16 @@ const char *ToVertAlign( SdrTextVertAdjust eAdjust )
void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, const tools::Rectangle &aRect )
{
- rComments->startElement( FSNS( XML_xdr, XML_col ), FSEND );
+ rComments->startElement(FSNS(XML_xdr, XML_col));
rComments->writeEscaped( OUString::number( aRect.Left() ) );
rComments->endElement( FSNS( XML_xdr, XML_col ) );
- rComments->startElement( FSNS( XML_xdr, XML_colOff ), FSEND );
+ rComments->startElement(FSNS(XML_xdr, XML_colOff));
rComments->writeEscaped( OUString::number( aRect.Top() ) );
rComments->endElement( FSNS( XML_xdr, XML_colOff ) );
- rComments->startElement( FSNS( XML_xdr, XML_row ), FSEND );
+ rComments->startElement(FSNS(XML_xdr, XML_row));
rComments->writeEscaped( OUString::number( aRect.Right() ) );
rComments->endElement( FSNS( XML_xdr, XML_row ) );
- rComments->startElement( FSNS( XML_xdr, XML_rowOff ), FSEND );
+ rComments->startElement(FSNS(XML_xdr, XML_rowOff));
rComments->writeEscaped( OUString::number( aRect.Bottom() ) );
rComments->endElement( FSNS( XML_xdr, XML_rowOff ) );
}
@@ -437,9 +437,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(),
- FSEND );
+ pWorksheet->singleElement(XML_picture, FSNS(XML_r, XML_id), rId.toUtf8());
}
XclExpControlHelper::XclExpControlHelper( const XclExpRoot& rRoot ) :
@@ -1121,8 +1119,7 @@ void XclExpChartObj::SaveXml( XclExpXmlStream& rStrm )
// FIXME: two cell? it seems the two cell anchor is incorrect.
pDrawing->startElement( FSNS( XML_xdr, XML_twoCellAnchor ), // OOXTODO: oneCellAnchor, absoluteAnchor
- XML_editAs, "oneCell",
- FSEND );
+ XML_editAs, "oneCell" );
Reference< XPropertySet > xPropSet( mxShape, UNO_QUERY );
if (xPropSet.is())
{
@@ -1138,10 +1135,10 @@ void XclExpChartObj::SaveXml( XclExpXmlStream& rStrm )
// TODO: get the correcto chart number
}
- pDrawing->singleElement( FSNS( XML_xdr, XML_clientData),
+ pDrawing->singleElement( FSNS( XML_xdr, XML_clientData)
// OOXTODO: XML_fLocksWithSheet
// OOXTODO: XML_fPrintsWithSheet
- FSEND );
+ );
pDrawing->endElement( FSNS( XML_xdr, XML_twoCellAnchor ) );
}
@@ -1291,11 +1288,11 @@ void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr rComments = rStrm.GetCurrentStream();
rComments->startElement( XML_comment,
- XML_ref, XclXmlUtils::ToOString( maScPos ).getStr(),
- XML_authorId, OString::number( nAuthorId ).getStr(),
- // OOXTODO: XML_guid,
- FSEND );
- rComments->startElement( XML_text, FSEND );
+ XML_ref, XclXmlUtils::ToOString(maScPos),
+ XML_authorId, OString::number(nAuthorId)
+ // OOXTODO: XML_guid
+ );
+ rComments->startElement(XML_text);
// OOXTODO: phoneticPr, rPh, r
if( mpNoteContents )
mpNoteContents->WriteXml( rStrm );
@@ -1308,8 +1305,8 @@ void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm )
#if 1//def XLSX_OOXML_FUTURE
if( rStrm.getVersion() == oox::core::ISOIEC_29500_2008 )
{
- rComments->startElement( FSNS( XML_mc, XML_AlternateContent ), FSEND );
- rComments->startElement( FSNS( XML_mc, XML_Choice ), XML_Requires, "v2", FSEND );
+ rComments->startElement(FSNS(XML_mc, XML_AlternateContent));
+ rComments->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, "v2");
rComments->startElement( XML_commentPr,
XML_autoFill, ToPsz( mbAutoFill ),
XML_autoScale, ToPsz( mbAutoScale ),
@@ -1317,23 +1314,19 @@ void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm )
XML_locked, ToPsz( mbLocked ),
XML_rowHidden, ToPsz( mbRowHidden ),
XML_textHAlign, ToHorizAlign( meTHA ),
- XML_textVAlign, ToVertAlign( meTVA ) ,
- FSEND );
- rComments->startElement( XML_anchor,
- XML_moveWithCells, "false",
- XML_sizeWithCells, "false",
- FSEND );
- rComments->startElement( FSNS( XML_xdr, XML_from ), FSEND );
+ XML_textVAlign, ToVertAlign( meTVA ) );
+ rComments->startElement(XML_anchor, XML_moveWithCells, "false", XML_sizeWithCells, "false");
+ rComments->startElement(FSNS(XML_xdr, XML_from));
lcl_WriteAnchorVertex( rComments, maCommentFrom );
rComments->endElement( FSNS( XML_xdr, XML_from ) );
- rComments->startElement( FSNS( XML_xdr, XML_to ), FSEND );
+ rComments->startElement(FSNS(XML_xdr, XML_to));
lcl_WriteAnchorVertex( rComments, maCommentTo );
rComments->endElement( FSNS( XML_xdr, XML_to ) );
rComments->endElement( XML_anchor );
rComments->endElement( XML_commentPr );
rComments->endElement( FSNS( XML_mc, XML_Choice ) );
- rComments->startElement( FSNS( XML_mc, XML_Fallback ), FSEND );
+ rComments->startElement(FSNS(XML_mc, XML_Fallback));
// Any fallback code ?
rComments->endElement( FSNS( XML_mc, XML_Fallback ) );
rComments->endElement( FSNS( XML_mc, XML_AlternateContent ) );
@@ -1429,15 +1422,13 @@ void XclExpComments::SaveXml( XclExpXmlStream& rStrm )
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(),
- FSNS( XML_mc, XML_Ignorable ), "v2",
- FSEND );
+ 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(),
- FSEND );
+ FSNS(XML_xmlns, XML_xdr), rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)).toUtf8() );
- rComments->startElement( XML_authors, FSEND );
+ rComments->startElement(XML_authors);
typedef std::set<OUString> Authors;
Authors aAuthors;
@@ -1450,13 +1441,13 @@ void XclExpComments::SaveXml( XclExpXmlStream& rStrm )
for( const auto& rAuthor : aAuthors )
{
- rComments->startElement( XML_author, FSEND );
+ rComments->startElement(XML_author);
rComments->writeEscaped( rAuthor );
rComments->endElement( XML_author );
}
rComments->endElement( XML_authors );
- rComments->startElement( XML_commentList, FSEND );
+ rComments->startElement(XML_commentList);
Authors::const_iterator aAuthorsBegin = aAuthors.begin();
for( size_t i = 0; i < nNotes; ++i )
diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx
index 0dcd70e6fa4b..bde5ec191685 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -33,8 +33,7 @@ XclExpExtNegativeColor::XclExpExtNegativeColor( const Color& rColor ):
void XclExpExtNegativeColor::SaveXml( XclExpXmlStream& rStrm )
{
rStrm.GetCurrentStream()->singleElementNS( XML_x14, XML_negativeFillColor,
- XML_rgb, XclXmlUtils::ToOString( maColor ).getStr(),
- FSEND );
+ XML_rgb, XclXmlUtils::ToOString(maColor) );
}
XclExpExtAxisColor::XclExpExtAxisColor( const Color& rColor ):
@@ -45,8 +44,7 @@ XclExpExtAxisColor::XclExpExtAxisColor( const Color& rColor ):
void XclExpExtAxisColor::SaveXml( XclExpXmlStream& rStrm )
{
rStrm.GetCurrentStream()->singleElementNS( XML_x14, XML_axisColor,
- XML_rgb, XclXmlUtils::ToOString( maAxisColor ).getStr(),
- FSEND );
+ XML_rgb, XclXmlUtils::ToOString(maAxisColor) );
}
XclExpExtIcon::XclExpExtIcon(const XclExpRoot& rRoot, const std::pair<ScIconSetType, sal_Int32>& rCustomEntry):
@@ -68,8 +66,7 @@ void XclExpExtIcon::SaveXml(XclExpXmlStream& rStrm)
rWorksheet->singleElementNS(XML_x14, XML_cfIcon,
XML_iconSet, pIconSetName,
- XML_iconId, OString::number(nIndex).getStr(),
- FSEND);
+ XML_iconId, OString::number(nIndex));
}
XclExpExtCfvo::XclExpExtCfvo( const XclExpRoot& rRoot, const ScColorScaleEntry& rEntry, const ScAddress& rSrcPos, bool bFirst ):
@@ -123,16 +120,14 @@ const char* getColorScaleType( ScColorScaleEntryType eType, bool bFirst )
void XclExpExtCfvo::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElementNS( XML_x14, XML_cfvo,
- XML_type, getColorScaleType(meType, mbFirst),
- FSEND );
+ rWorksheet->startElementNS(XML_x14, XML_cfvo, XML_type, getColorScaleType(meType, mbFirst));
if (meType == COLORSCALE_FORMULA ||
meType == COLORSCALE_PERCENT ||
meType == COLORSCALE_PERCENTILE ||
meType == COLORSCALE_VALUE)
{
- rWorksheet->startElementNS(XML_xm, XML_f, FSEND);
+ rWorksheet->startElementNS(XML_xm, XML_f);
rWorksheet->writeEscaped(maValue.getStr());
rWorksheet->endElementNS(XML_xm, XML_f);
}
@@ -180,11 +175,10 @@ void XclExpExtDataBar::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElementNS( XML_x14, XML_dataBar,
- XML_minLength, OString::number(mnMinLength).getStr(),
- XML_maxLength, OString::number(mnMaxLength).getStr(),
+ XML_minLength, OString::number(mnMinLength),
+ XML_maxLength, OString::number(mnMaxLength),
XML_axisPosition, getAxisPosition(meAxisPosition),
- XML_gradient, ToPsz(mbGradient),
- FSEND );
+ XML_gradient, ToPsz(mbGradient) );
mpLowerLimit->SaveXml( rStrm );
mpUpperLimit->SaveXml( rStrm );
@@ -224,8 +218,7 @@ void XclExpExtIconSet::SaveXml(XclExpXmlStream& rStrm)
XML_iconSet, mpIconSetName,
XML_custom, mbCustom ? ToPsz10(mbCustom) : nullptr,
XML_reverse, ToPsz10(mbReverse),
- XML_showValue, ToPsz10(mbShowValue),
- FSEND);
+ XML_showValue, ToPsz10(mbShowValue));
maCfvos.SaveXml(rStrm);
@@ -273,8 +266,7 @@ void XclExpExtCfRule::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->startElementNS( XML_x14, XML_cfRule,
XML_type, pType,
XML_priority, mnPriority == -1 ? nullptr : OString::number(mnPriority).getStr(),
- XML_id, maId.getStr(),
- FSEND );
+ XML_id, maId );
mxEntry->SaveXml( rStrm );
@@ -332,11 +324,10 @@ 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(),
- FSEND );
+ FSNS( XML_xmlns, XML_xm ), rStrm.getNamespaceURL(OOX_NS(xm)).toUtf8() );
maCfRules.SaveXml( rStrm );
- rWorksheet->startElementNS( XML_xm, XML_sqref, FSEND );
+ rWorksheet->startElementNS(XML_xm, XML_sqref);
rWorksheet->write(XclXmlUtils::ToOString(maRange).getStr());
rWorksheet->endElementNS( XML_xm, XML_sqref );
@@ -378,12 +369,9 @@ 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(),
- XML_uri, maURI.getStr(),
- FSEND );
+ XML_uri, maURI );
- rWorksheet->singleElementNS( XML_loext, XML_extCalcPr,
- XML_stringRefSyntax, maSyntax.getStr(),
- FSEND );
+ rWorksheet->singleElementNS(XML_loext, XML_extCalcPr, XML_stringRefSyntax, maSyntax);
rWorksheet->endElement( XML_ext );
}
@@ -399,11 +387,9 @@ 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(),
- XML_uri, maURI.getStr(),
- FSEND );
+ XML_uri, maURI );
- rWorksheet->startElementNS( XML_x14, XML_conditionalFormattings,
- FSEND );
+ rWorksheet->startElementNS(XML_x14, XML_conditionalFormattings);
maCF.SaveXml( rStrm );
@@ -422,8 +408,7 @@ void XclExtLst::SaveXml( XclExpXmlStream& rStrm )
return;
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_extLst,
- FSEND );
+ rWorksheet->startElement(XML_extLst);
maExtEntries.SaveXml(rStrm);
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 750ae8111345..6767324d74cb 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1059,8 +1059,7 @@ void XclExpExtName::SaveXml(XclExpXmlStream& rStrm)
pExternalLink->startElement(XML_definedName,
XML_name, maName.toUtf8(),
XML_refersTo, nullptr,
- XML_sheetId, nullptr,
- FSEND);
+ XML_sheetId, nullptr);
pExternalLink->endElement(XML_definedName);
}
@@ -1219,9 +1218,7 @@ void XclExpCrn::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr pFS = rStrm.GetCurrentStream();
- pFS->startElement( XML_row,
- XML_r, OString::number( mnScRow + 1 ).getStr(),
- FSEND);
+ pFS->startElement(XML_row, XML_r, OString::number(mnScRow + 1));
ScAddress aAdr( mnScCol, mnScRow, 0); // Tab number doesn't matter
for( const auto& rValue : maValues )
@@ -1233,38 +1230,27 @@ void XclExpCrn::SaveXml( XclExpXmlStream& rStrm )
if (rtl::math::isFinite( fVal))
{
// t='n' is omitted
- pFS->startElement( XML_cell,
- XML_r, XclXmlUtils::ToOString( aAdr),
- FSEND);
- pFS->startElement( XML_v, FSEND );
+ pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(aAdr));
+ pFS->startElement(XML_v);
pFS->write( fVal );
}
else
{
- pFS->startElement( XML_cell,
- XML_r, XclXmlUtils::ToOString( aAdr),
- XML_t, "e",
- FSEND);
- pFS->startElement( XML_v, FSEND );
+ pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(aAdr), XML_t, "e");
+ pFS->startElement(XML_v);
pFS->write( "#VALUE!" ); // OOXTODO: support other error values
}
}
else if( rValue.has< OUString >() )
{
- pFS->startElement( XML_cell,
- XML_r, XclXmlUtils::ToOString( aAdr),
- XML_t, "str",
- FSEND);
- pFS->startElement( XML_v, FSEND );
+ pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(aAdr), XML_t, "str");
+ pFS->startElement(XML_v);
pFS->write( rValue.get< OUString >() );
}
else if( rValue.has< bool >() )
{
- pFS->startElement( XML_cell,
- XML_r, XclXmlUtils::ToOString( aAdr),
- XML_t, "b",
- FSEND);
- pFS->startElement( XML_v, FSEND );
+ pFS->startElement(XML_cell, XML_r, XclXmlUtils::ToOString(aAdr), XML_t, "b");
+ pFS->startElement(XML_v);
pFS->write( rValue.get< bool >() ? "1" : "0" );
}
// OOXTODO: error type cell t='e'
@@ -1423,9 +1409,7 @@ void XclExpXct::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr pFS = rStrm.GetCurrentStream();
bool bValid = BuildCrnList( aCrnRecs);
- pFS->startElement( XML_sheetData,
- XML_sheetId, OString::number( mnSBTab).getStr(),
- FSEND);
+ pFS->startElement(XML_sheetData, XML_sheetId, OString::number(mnSBTab));
if (bValid)
{
// row elements
@@ -1695,22 +1679,19 @@ void XclExpSupbook::SaveXml( XclExpXmlStream& rStrm )
true );
pExternalLink->startElement( XML_externalLink,
- XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
- FSEND);
+ XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8());
pExternalLink->startElement( XML_externalBook,
FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
- FSNS(XML_r, XML_id), sId.toUtf8(),
- FSEND);
+ FSNS(XML_r, XML_id), sId.toUtf8());
if (!maXctList.IsEmpty())
{
- pExternalLink->startElement( XML_sheetNames, FSEND);
+ pExternalLink->startElement(XML_sheetNames);
for (size_t nPos = 0, nSize = maXctList.GetSize(); nPos < nSize; ++nPos)
{
- pExternalLink->singleElement( XML_sheetName,
- XML_val, XclXmlUtils::ToOString( maXctList.GetRecord( nPos )->GetTabName()).getStr(),
- FSEND);
+ pExternalLink->singleElement(XML_sheetName,
+ XML_val, XclXmlUtils::ToOString(maXctList.GetRecord(nPos)->GetTabName()));
}
pExternalLink->endElement( XML_sheetNames);
@@ -1718,7 +1699,7 @@ void XclExpSupbook::SaveXml( XclExpXmlStream& rStrm )
if (mxExtNameBfr)
{
- pExternalLink->startElement(XML_definedNames, FSEND);
+ pExternalLink->startElement(XML_definedNames);
// externalName elements
WriteExtNameBufferXml( rStrm );
pExternalLink->endElement(XML_definedNames);
@@ -1726,7 +1707,7 @@ void XclExpSupbook::SaveXml( XclExpXmlStream& rStrm )
if (!maXctList.IsEmpty())
{
- pExternalLink->startElement( XML_sheetDataSet, FSEND);
+ pExternalLink->startElement(XML_sheetDataSet);
// sheetData elements
maXctList.SaveXml( rStrm );
@@ -2119,8 +2100,7 @@ void XclExpSupbookBuffer::SaveXml( XclExpXmlStream& rStrm )
// externalReference entry in workbook externalReferences
rStrm.GetCurrentStream()->singleElement( XML_externalReference,
- FSNS(XML_r, XML_id), sId.toUtf8(),
- FSEND );
+ FSNS(XML_r, XML_id), sId.toUtf8() );
// Each externalBook in a separate stream.
rStrm.PushStream( pExternalLink );
@@ -2506,7 +2486,7 @@ void XclExpLinkManagerImpl8::SaveXml( XclExpXmlStream& rStrm )
if (maSBBuffer.HasExternalReferences())
{
sax_fastparser::FSHelperPtr pWorkbook = rStrm.GetCurrentStream();
- pWorkbook->startElement( XML_externalReferences, FSEND);
+ pWorkbook->startElement(XML_externalReferences);
// externalLink, externalBook, sheetNames, sheetDataSet, externalName
maSBBuffer.SaveXml( rStrm );
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index c0db80cbafba..ee3bfa2c10f3 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -310,10 +310,10 @@ void XclExpName::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_publishToServer, "",
// OOXTODO: XML_shortcutKey, "",
// OOXTODO: XML_statusBar, "",
- XML_vbProcedure, ToPsz( ::get_flag( mnFlags, EXC_NAME_VB ) ),
+ XML_vbProcedure, ToPsz( ::get_flag( mnFlags, EXC_NAME_VB ) )
// OOXTODO: XML_workbookParameter, "",
- // OOXTODO: XML_xlm, "",
- FSEND );
+ // OOXTODO: XML_xlm, ""
+ );
rWorkbook->writeEscaped( msSymbol );
rWorkbook->endElement( XML_definedName );
}
@@ -510,7 +510,7 @@ void XclExpNameManagerImpl::SaveXml( XclExpXmlStream& rStrm )
if( maNameList.IsEmpty() )
return;
sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
- rWorkbook->startElement( XML_definedNames, FSEND );
+ rWorkbook->startElement(XML_definedNames);
maNameList.SaveXml( rStrm );
rWorkbook->endElement( XML_definedNames );
}
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 9ad3b873321f..3e32ab1f3251 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -59,7 +59,7 @@ void XclExpHeaderFooter::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
sal_Int32 nElement = GetRecId() == EXC_ID_HEADER ? XML_oddHeader : XML_oddFooter;
- rWorksheet->startElement( nElement, FSEND );
+ rWorksheet->startElement(nElement);
rWorksheet->writeEscaped( maHdrString );
rWorksheet->endElement( nElement );
}
@@ -192,18 +192,17 @@ void XclExpPageBreaks::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& pWorksheet = rStrm.GetCurrentStream();
OString sNumPageBreaks = OString::number( mrPageBreaks.size() );
pWorksheet->startElement( nElement,
- XML_count, sNumPageBreaks.getStr(),
- XML_manualBreakCount, sNumPageBreaks.getStr(),
- FSEND );
+ XML_count, sNumPageBreaks,
+ XML_manualBreakCount, sNumPageBreaks );
for( const auto& rPageBreak : mrPageBreaks )
{
pWorksheet->singleElement( XML_brk,
- XML_id, OString::number( rPageBreak ).getStr(),
+ XML_id, OString::number(rPageBreak),
XML_man, "true",
- XML_max, OString::number( mnMaxPos ).getStr(),
- XML_min, "0",
- // OOXTODO: XML_pt, "",
- FSEND );
+ XML_max, OString::number(mnMaxPos),
+ XML_min, "0"
+ // OOXTODO: XML_pt, ""
+ );
}
pWorksheet->endElement( nElement );
}
@@ -353,9 +352,9 @@ void XclExpXmlStartHeaderFooterElementRecord::SaveXml(XclExpXmlStream& rStrm)
rStream->startElement( mnElement,
// OOXTODO: XML_alignWithMargins,
XML_differentFirst, "false", // OOXTODO
- XML_differentOddEven, "false", // OOXTODO
+ XML_differentOddEven, "false" // OOXTODO
// OOXTODO: XML_scaleWithDoc
- FSEND );
+ );
}
void XclExpPageSettings::Save( XclExpStream& rStrm )
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index e2d7b03c7884..1d0371b25270 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -49,12 +49,11 @@ void savePivotCacheRecordsXml( XclExpXmlStream& rStrm, const ScDPCache& rCache )
pRecStrm->startElement(XML_pivotCacheRecords,
XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
- XML_count, OString::number(static_cast<long>(nCount)).getStr(),
- FSEND);
+ XML_count, OString::number(static_cast<long>(nCount)));
for (SCROW i = 0; i < nCount; ++i)
{
- pRecStrm->startElement(XML_r, FSEND);
+ pRecStrm->startElement(XML_r);
for (size_t nField = 0; nField < nFieldCount; ++nField)
{
const ScDPCache::IndexArrayType* pArray = rCache.GetFieldIndexArray(nField);
@@ -63,7 +62,7 @@ void savePivotCacheRecordsXml( XclExpXmlStream& rStrm, const ScDPCache& rCache )
// We are using XML_x reference (like: <x v="0"/>), instead of values here (eg: <s v="No Discount"/>).
// That's why in SavePivotCacheXml method, we need to list all items.
- pRecStrm->singleElement(XML_x, XML_v, OString::number((*pArray)[i]), FSEND);
+ pRecStrm->singleElement(XML_x, XML_v, OString::number((*pArray)[i]));
}
pRecStrm->endElement(XML_r);
}
@@ -131,7 +130,7 @@ XclExpXmlPivotCaches::XclExpXmlPivotCaches( const XclExpRoot& rRoot ) :
void XclExpXmlPivotCaches::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& pWorkbookStrm = rStrm.GetCurrentStream();
- pWorkbookStrm->startElement(XML_pivotCaches, FSEND);
+ pWorkbookStrm->startElement(XML_pivotCaches);
for (size_t i = 0, n = maCaches.size(); i < n; ++i)
{
@@ -148,9 +147,8 @@ void XclExpXmlPivotCaches::SaveXml( XclExpXmlStream& rStrm )
&aRelId);
pWorkbookStrm->singleElement(XML_pivotCache,
- XML_cacheId, OString::number(nCacheId).getStr(),
- FSNS(XML_r, XML_id), aRelId.toUtf8(),
- FSEND);
+ XML_cacheId, OString::number(nCacheId),
+ FSNS(XML_r, XML_id), aRelId.toUtf8());
rStrm.PushStream(pPCStrm);
SavePivotCacheXml(rStrm, rEntry, nCacheId);
@@ -263,28 +261,23 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
FSNS(XML_r, XML_id), aRelId.toUtf8(),
- XML_recordCount, OString::number(rEntry.mpCache->GetDataSize()).getStr(),
- XML_createdVersion, "3", // MS Excel 2007, tdf#112936: setting version number makes MSO to handle the pivot table differently
- FSEND);
+ XML_recordCount, OString::number(rEntry.mpCache->GetDataSize()),
+ XML_createdVersion, "3"); // MS Excel 2007, tdf#112936: setting version number makes MSO to handle the pivot table differently
- pDefStrm->startElement(XML_cacheSource,
- XML_type, "worksheet",
- FSEND);
+ pDefStrm->startElement(XML_cacheSource, XML_type, "worksheet");
OUString aSheetName;
GetDoc().GetName(rEntry.maSrcRange.aStart.Tab(), aSheetName);
pDefStrm->singleElement(XML_worksheetSource,
- XML_ref, XclXmlUtils::ToOString(rEntry.maSrcRange).getStr(),
- XML_sheet, aSheetName.toUtf8(),
- FSEND);
+ XML_ref, XclXmlUtils::ToOString(rEntry.maSrcRange),
+ XML_sheet, aSheetName.toUtf8());
pDefStrm->endElement(XML_cacheSource);
size_t nCount = rCache.GetFieldCount();
const size_t nGroupFieldCount = rCache.GetGroupFieldCount();
pDefStrm->startElement(XML_cacheFields,
- XML_count, OString::number(static_cast<long>(nCount + nGroupFieldCount)).getStr(),
- FSEND);
+ XML_count, OString::number(static_cast<long>(nCount + nGroupFieldCount)));
auto WriteFieldGroup = [this, &rCache, pDefStrm](size_t i, size_t base) {
const sal_Int32 nDatePart = rCache.GetGroupType(i);
@@ -317,7 +310,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
}
// fieldGroup element
- pDefStrm->startElement(XML_fieldGroup, XML_base, OString::number(base), FSEND);
+ pDefStrm->startElement(XML_fieldGroup, XML_base, OString::number(base));
SvNumberFormatter& rFormatter = GetFormatter();
@@ -334,10 +327,10 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
// groupItems element
auto aElemVec = SortGroupItems(rCache, i);
- pDefStrm->startElement(XML_groupItems, XML_count, OString::number(aElemVec.size()), FSEND);
+ pDefStrm->startElement(XML_groupItems, XML_count, OString::number(aElemVec.size()));
for (const auto& sElem : aElemVec)
{
- pDefStrm->singleElement(XML_s, XML_v, sElem.toUtf8(), FSEND);
+ pDefStrm->singleElement(XML_s, XML_v, sElem.toUtf8());
}
pDefStrm->endElement(XML_groupItems);
pDefStrm->endElement(XML_fieldGroup);
@@ -349,8 +342,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
pDefStrm->startElement(XML_cacheField,
XML_name, aName.toUtf8(),
- XML_numFmtId, OString::number(0).getStr(),
- FSEND);
+ XML_numFmtId, OString::number(0));
const ScDPCache::ScDPItemDataVec& rFieldItems = rCache.GetDimMemberValues(i);
@@ -463,34 +455,29 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
switch (rItem.GetType())
{
case ScDPItemData::String:
- pDefStrm->singleElement(XML_s,
- XML_v, rItem.GetString().toUtf8(),
- FSEND);
+ pDefStrm->singleElement(XML_s, XML_v, rItem.GetString().toUtf8());
break;
case ScDPItemData::Value:
if (isContainsDate)
{
pDefStrm->singleElement(XML_d,
- XML_v, GetExcelFormattedDate(rItem.GetValue(), GetFormatter()).toUtf8(),
- FSEND);
+ XML_v, GetExcelFormattedDate(rItem.GetValue(), GetFormatter()).toUtf8());
}
else
pDefStrm->singleElement(XML_n,
- XML_v, OString::number(rItem.GetValue()),
- FSEND);
+ XML_v, OString::number(rItem.GetValue()));
break;
case ScDPItemData::Empty:
- pDefStrm->singleElement(XML_m, FSEND);
+ pDefStrm->singleElement(XML_m);
break;
case ScDPItemData::Error:
pDefStrm->singleElement(XML_e,
- XML_v, rItem.GetString().toUtf8(),
- FSEND);
+ XML_v, rItem.GetString().toUtf8());
break;
case ScDPItemData::GroupValue: // Should not happen here!
case ScDPItemData::RangeStart:
// TODO : What do we do with these types?
- pDefStrm->singleElement(XML_m, FSEND);
+ pDefStrm->singleElement(XML_m);
break;
default:
;
@@ -518,8 +505,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
const size_t nBase = rCache.GetDimensionIndex(pDim->GetSourceDimName());
pDefStrm->startElement(XML_cacheField, XML_name, aName.toUtf8(), XML_numFmtId,
- OString::number(0).getStr(), XML_databaseField, ToPsz10(false),
- FSEND);
+ OString::number(0), XML_databaseField, ToPsz10(false));
WriteFieldGroup(i, nBase);
pDefStrm->endElement(XML_cacheField);
}
@@ -786,7 +772,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
pPivotStrm->startElement(XML_pivotTableDefinition,
XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
XML_name, rDPObj.GetName().toUtf8(),
- XML_cacheId, OString::number(nCacheId).getStr(),
+ XML_cacheId, OString::number(nCacheId),
XML_applyNumberFormats, ToPsz10(false),
XML_applyBorderFormats, ToPsz10(false),
XML_applyFontFormats, ToPsz10(false),
@@ -800,8 +786,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
XML_outline, ToPsz10(!bTabularMode),
XML_outlineData, ToPsz10(!bTabularMode),
XML_compact, ToPsz10(false),
- XML_compactData, ToPsz10(false),
- FSEND);
+ XML_compactData, ToPsz10(false));
// NB: Excel's range does not include page field area (if any).
ScRange aOutRange = rDPObj.GetOutputRangeByType(sheet::DataPilotOutputRangeType::TABLE);
@@ -840,8 +825,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
// they appear in the cache.
pPivotStrm->startElement(XML_pivotFields,
- XML_count, OString::number(static_cast<long>(aCachedDims.size())).getStr(),
- FSEND);
+ XML_count, OString::number(static_cast<long>(aCachedDims.size())));
for (size_t i = 0; i < nFieldCount; ++i)
{
@@ -850,8 +834,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
{
pPivotStrm->singleElement(XML_pivotField,
XML_showAll, ToPsz10(false),
- XML_compact, ToPsz10(false),
- FSEND);
+ XML_compact, ToPsz10(false));
continue;
}
@@ -868,15 +851,13 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
pPivotStrm->singleElement(XML_pivotField,
XML_showAll, ToPsz10(false),
XML_compact, ToPsz10(false),
- XML_outline, ToPsz10(false),
- FSEND);
+ XML_outline, ToPsz10(false));
}
else
{
pPivotStrm->singleElement(XML_pivotField,
XML_showAll, ToPsz10(false),
- XML_compact, ToPsz10(false),
- FSEND);
+ XML_compact, ToPsz10(false));
}
continue;
}
@@ -889,16 +870,14 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
XML_dataField, ToPsz10(true),
XML_showAll, ToPsz10(false),
XML_compact, ToPsz10(false),
- XML_outline, ToPsz10(false),
- FSEND);
+ XML_outline, ToPsz10(false));
}
else
{
pPivotStrm->singleElement(XML_pivotField,
XML_dataField, ToPsz10(true),
XML_showAll, ToPsz10(false),
- XML_compact, ToPsz10(false),
- FSEND);
+ XML_compact, ToPsz10(false));
}
continue;
}
@@ -978,8 +957,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
pPivotStrm->startElement(XML_pivotField, xAttributeList);
pPivotStrm->startElement(XML_items,
- XML_count, OString::number(static_cast<long>(aMemberSequence.size() + aSubtotalSequence.size())),
- FSEND);
+ XML_count, OString::number(static_cast<long>(aMemberSequence.size() + aSubtotalSequence.size())));
for (const auto & nMember : aMemberSequence)
{
@@ -993,9 +971,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
for (const OString& sSubtotal : aSubtotalSequence)
{
- pPivotStrm->singleElement(XML_item,
- XML_t, sSubtotal,
- FSEND);
+ pPivotStrm->singleElement(XML_item, XML_t, sSubtotal);
}
pPivotStrm->endElement(XML_items);
@@ -1009,14 +985,11 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
if (!aRowFields.empty())
{
pPivotStrm->startElement(XML_rowFields,
- XML_count, OString::number(static_cast<long>(aRowFields.size())),
- FSEND);
+ XML_count, OString::number(static_cast<long>(aRowFields.size())));
for (const auto& rRowField : aRowFields)
{
- pPivotStrm->singleElement(XML_field,
- XML_x, OString::number(rRowField),
- FSEND);
+ pPivotStrm->singleElement(XML_field, XML_x, OString::number(rRowField));
}
pPivotStrm->endElement(XML_rowFields);
@@ -1029,14 +1002,11 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
if (!aColFields.empty())
{
pPivotStrm->startElement(XML_colFields,
- XML_count, OString::number(static_cast<long>(aColFields.size())),
- FSEND);
+ XML_count, OString::number(static_cast<long>(aColFields.size())));
for (const auto& rColField : aColFields)
{
- pPivotStrm->singleElement(XML_field,
- XML_x, OString::number(rColField),
- FSEND);
+ pPivotStrm->singleElement(XML_field, XML_x, OString::number(rColField));
}
pPivotStrm->endElement(XML_colFields);
@@ -1049,15 +1019,13 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
if (!aPageFields.empty())
{
pPivotStrm->startElement(XML_pageFields,
- XML_count, OString::number(static_cast<long>(aPageFields.size())),
- FSEND);
+ XML_count, OString::number(static_cast<long>(aPageFields.size())));
for (const auto& rPageField : aPageFields)
{
pPivotStrm->singleElement(XML_pageField,
XML_fld, OString::number(rPageField),
- XML_hier, OString::number(-1), // TODO : handle this correctly.
- FSEND);
+ XML_hier, OString::number(-1)); // TODO : handle this correctly.
}
pPivotStrm->endElement(XML_pageFields);
@@ -1072,8 +1040,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
xDimsByName = xDimSupplier->getDimensions();
pPivotStrm->startElement(XML_dataFields,
- XML_count, OString::number(static_cast<long>(aDataFields.size())),
- FSEND);
+ XML_count, OString::number(static_cast<long>(aDataFields.size())));
for (const auto& rDataField : aDataFields)
{
diff --git a/sc/source/filter/excel/xerecord.cxx b/sc/source/filter/excel/xerecord.cxx
index ff4d7cefce38..8778d75b5c14 100644
--- a/sc/source/filter/excel/xerecord.cxx
+++ b/sc/source/filter/excel/xerecord.cxx
@@ -81,7 +81,7 @@ void XclExpXmlStartElementRecord::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rStream = rStrm.GetCurrentStream();
// TODO: no generic way to add attributes here, but it appears to
// not be needed yet
- rStream->startElement( mnElement, FSEND );
+ rStream->startElement(mnElement);
}
XclExpXmlEndElementRecord::XclExpXmlEndElementRecord( sal_Int32 nElement )
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 3f815e71358c..417d35c3f0f9 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -815,7 +815,7 @@ OUString XclXmlUtils::ToOUString( const XclExpString& s )
sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int32 nValue )
{
- pStream->startElement( nElement, FSEND );
+ pStream->startElement(nElement);
pStream->write( nValue );
pStream->endElement( nElement );
@@ -824,7 +824,7 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperP
sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int64 nValue )
{
- pStream->startElement( nElement, FSEND );
+ pStream->startElement(nElement);
pStream->write( nValue );
pStream->endElement( nElement );
@@ -833,7 +833,7 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperP
sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, const char* sValue )
{
- pStream->startElement( nElement, FSEND );
+ pStream->startElement(nElement);
pStream->write( sValue );
pStream->endElement( nElement );
@@ -844,9 +844,7 @@ static void lcl_WriteValue( const sax_fastparser::FSHelperPtr& rStream, sal_Int3
{
if( !pValue )
return;
- rStream->singleElement( nElement,
- XML_val, pValue,
- FSEND );
+ rStream->singleElement(nElement, XML_val, pValue);
}
static const char* lcl_GetUnderlineStyle( FontLineStyle eUnderline, bool& bHaveUnderline )
@@ -895,10 +893,10 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelper
pStream->singleElement( XML_color,
// OOXTODO: XML_auto, bool
// OOXTODO: XML_indexed, uint
- XML_rgb, XclXmlUtils::ToOString( rFontData.maColor ).getStr(),
+ XML_rgb, XclXmlUtils::ToOString(rFontData.maColor)
// OOXTODO: XML_theme, index into <clrScheme/>
// OOXTODO: XML_tint, double
- FSEND );
+ );
lcl_WriteValue( pStream, nFontId, rFontData.maName.toUtf8().getStr() );
lcl_WriteValue( pStream, XML_family, OString::number( rFontData.mnFamily ).getStr() );
lcl_WriteValue( pStream, XML_charset, rFontData.mnCharSet != 0 ? OString::number( rFontData.mnCharSet ).getStr() : nullptr );
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index 597c9174132f..22dfd5646394 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -398,16 +398,15 @@ static sal_uInt16 lcl_WriteRun( XclExpXmlStream& rStrm, const ScfUInt16Vec& rBuf
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_r, FSEND );
+ rWorksheet->startElement(XML_r);
if( pFont )
{
const XclFontData& rFontData = pFont->GetFontData();
- rWorksheet->startElement( XML_rPr, FSEND );
+ rWorksheet->startElement(XML_rPr);
XclXmlUtils::WriteFontData( rWorksheet, rFontData, XML_rFont );
rWorksheet->endElement( XML_rPr );
}
- rWorksheet->startElement( XML_t,
- FSNS(XML_xml, XML_space), "preserve", FSEND );
+ rWorksheet->startElement(XML_t, FSNS(XML_xml, XML_space), "preserve");
rWorksheet->writeEscaped( XclXmlUtils::ToOUString( rBuffer, nStart, nLength ) );
rWorksheet->endElement( XML_t );
rWorksheet->endElement( XML_r );
@@ -420,8 +419,7 @@ void XclExpString::WriteXml( XclExpXmlStream& rStrm ) const
if( !IsWriteFormats() )
{
- rWorksheet->startElement( XML_t,
- FSNS(XML_xml, XML_space), "preserve", FSEND );
+ rWorksheet->startElement(XML_t, FSNS(XML_xml, XML_space), "preserve");
rWorksheet->writeEscaped( XclXmlUtils::ToOUString( *this ) );
rWorksheet->endElement( XML_t );
}
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 9e48fd5fc7b2..60edeabfc4e6 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -483,12 +483,10 @@ void XclExpPaletteImpl::SaveXml( XclExpXmlStream& rStrm )
return;
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement( XML_colors, FSEND );
- rStyleSheet->startElement( XML_indexedColors, FSEND );
+ rStyleSheet->startElement(XML_colors);
+ rStyleSheet->startElement(XML_indexedColors);
for( const auto& rColor : maPalette )
- rStyleSheet->singleElement( XML_rgbColor,
- XML_rgb, XclXmlUtils::ToOString( rColor.maColor ).getStr(),
- FSEND );
+ rStyleSheet->singleElement(XML_rgbColor, XML_rgb, XclXmlUtils::ToOString(rColor.maColor));
rStyleSheet->endElement( XML_indexedColors );
rStyleSheet->endElement( XML_colors );
}
@@ -977,7 +975,7 @@ bool XclExpFont::Equals( const XclFontData& rFontData, sal_uInt32 nHash ) const
void XclExpFont::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement( XML_font, FSEND );
+ rStyleSheet->startElement(XML_font);
XclXmlUtils::WriteFontData( rStyleSheet, maData, XML_name );
// OOXTODO: XML_scheme; //scheme/@val values: "major", "minor", "none"
rStyleSheet->endElement( XML_font );
@@ -1069,7 +1067,7 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm)
return;
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement(XML_font, FSEND);
+ rStyleSheet->startElement(XML_font);
if (maDxfData.pFontAttr)
{
@@ -1078,43 +1076,34 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm)
aFontName = XclTools::GetXclFontName(aFontName);
if (!aFontName.isEmpty())
{
- rStyleSheet->singleElement(XML_name,
- XML_val, aFontName.toUtf8(),
- FSEND);
+ rStyleSheet->singleElement(XML_name, XML_val, aFontName.toUtf8());
}
rtl_TextEncoding eTextEnc = (*maDxfData.pFontAttr)->GetCharSet();
sal_uInt8 nExcelCharSet = rtl_getBestWindowsCharsetFromTextEncoding(eTextEnc);
if (nExcelCharSet)
{
- rStyleSheet->singleElement(XML_charset,
- XML_val, OString::number(nExcelCharSet).getStr(),
- FSEND);
+ rStyleSheet->singleElement(XML_charset, XML_val, OString::number(nExcelCharSet));
}
FontFamily eFamily = (*maDxfData.pFontAttr)->GetFamily();
const char* pVal = getFontFamilyOOXValue(eFamily);
if (pVal)
{
- rStyleSheet->singleElement(XML_family,
- XML_val, pVal,
- FSEND);
+ rStyleSheet->singleElement(XML_family, XML_val, pVal);
}
}
if (maDxfData.eWeight)
{
rStyleSheet->singleElement(XML_b,
- XML_val, ToPsz10(maDxfData.eWeight.get() != WEIGHT_NORMAL),
- FSEND);
+ XML_val, ToPsz10(maDxfData.eWeight.get() != WEIGHT_NORMAL));
}
if (maDxfData.eItalic)
{
bool bItalic = (maDxfData.eItalic.get() == ITALIC_OBLIQUE) || (maDxfData.eItalic.get() == ITALIC_NORMAL);
- rStyleSheet->singleElement(XML_i,
- XML_val, ToPsz10(bItalic),
- FSEND);
+ rStyleSheet->singleElement(XML_i, XML_val, ToPsz10(bItalic));
}
if (maDxfData.eStrike)
@@ -1124,45 +1113,35 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm)
(maDxfData.eStrike.get() == STRIKEOUT_BOLD) || (maDxfData.eStrike.get() == STRIKEOUT_SLASH) ||
(maDxfData.eStrike.get() == STRIKEOUT_X);
- rStyleSheet->singleElement(XML_strike,
- XML_val, ToPsz10(bStrikeout),
- FSEND);
+ rStyleSheet->singleElement(XML_strike, XML_val, ToPsz10(bStrikeout));
}
if (maDxfData.bOutline)
{
- rStyleSheet->singleElement(XML_outline,
- XML_val, ToPsz10(maDxfData.bOutline.get()),
- FSEND);
+ rStyleSheet->singleElement(XML_outline, XML_val, ToPsz10(maDxfData.bOutline.get()));
}
if (maDxfData.bShadow)
{
- rStyleSheet->singleElement(XML_shadow,
- XML_val, ToPsz10(maDxfData.bShadow.get()),
- FSEND);
+ rStyleSheet->singleElement(XML_shadow, XML_val, ToPsz10(maDxfData.bShadow.get()));
}
if (maDxfData.aColor)
{
rStyleSheet->singleElement(XML_color,
- XML_rgb, XclXmlUtils::ToOString(maDxfData.aColor.get()).getStr(),
- FSEND);
+ XML_rgb, XclXmlUtils::ToOString(maDxfData.aColor.get()));
}
if (maDxfData.nFontHeight)
{
rStyleSheet->singleElement(XML_sz,
- XML_val, OString::number(*maDxfData.nFontHeight/20).getStr(),
- FSEND);
+ XML_val, OString::number(*maDxfData.nFontHeight/20));
}
if (maDxfData.eUnder)
{
const char* pVal = getUnderlineOOXValue(maDxfData.eUnder.get());
- rStyleSheet->singleElement(XML_u,
- XML_val, pVal,
- FSEND);
+ rStyleSheet->singleElement(XML_u, XML_val, pVal);
}
rStyleSheet->endElement(XML_font);
@@ -1264,9 +1243,7 @@ void XclExpFontBuffer::SaveXml( XclExpXmlStream& rStrm )
return;
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement( XML_fonts,
- XML_count, OString::number( maFontList.GetSize() ).getStr(),
- FSEND );
+ rStyleSheet->startElement(XML_fonts, XML_count, OString::number(maFontList.GetSize()));
maFontList.SaveXml( rStrm );
@@ -1345,9 +1322,8 @@ void XclExpNumFmt::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
rStyleSheet->singleElement( XML_numFmt,
- XML_numFmtId, OString::number( mnXclNumFmt ).getStr(),
- XML_formatCode, OUStringToOString(maNumFmtString, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ XML_numFmtId, OString::number(mnXclNumFmt),
+ XML_formatCode, maNumFmtString.toUtf8() );
}
XclExpNumFmtBuffer::XclExpNumFmtBuffer( const XclExpRoot& rRoot ) :
@@ -1400,9 +1376,7 @@ void XclExpNumFmtBuffer::SaveXml( XclExpXmlStream& rStrm )
return;
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement( XML_numFmts,
- XML_count, OString::number( maFormatMap.size() ).getStr(),
- FSEND );
+ rStyleSheet->startElement(XML_numFmts, XML_count, OString::number(maFormatMap.size()));
for( auto& rEntry : maFormatMap )
{
rEntry.SaveXml( rStrm );
@@ -1462,8 +1436,7 @@ void XclExpCellProt::SaveXml( XclExpXmlStream& rStrm ) const
{
rStrm.GetCurrentStream()->singleElement( XML_protection,
XML_locked, ToPsz( mbLocked ),
- XML_hidden, ToPsz( mbHidden ),
- FSEND );
+ XML_hidden, ToPsz( mbHidden ) );
}
bool XclExpCellAlign::FillFromItemSet(
@@ -1616,14 +1589,13 @@ void XclExpCellAlign::SaveXml( XclExpXmlStream& rStrm ) const
rStrm.GetCurrentStream()->singleElement( XML_alignment,
XML_horizontal, ToHorizontalAlignment( mnHorAlign ),
XML_vertical, ToVerticalAlignment( mnVerAlign ),
- XML_textRotation, OString::number( mnRotation ).getStr(),
+ XML_textRotation, OString::number(mnRotation),
XML_wrapText, ToPsz( mbLineBreak ),
- XML_indent, OString::number( mnIndent ).getStr(),
+ XML_indent, OString::number(mnIndent),
// OOXTODO: XML_relativeIndent, mnIndent?
// OOXTODO: XML_justifyLastLine,
XML_shrinkToFit, ToPsz( mbShrink ),
- XML_readingOrder, mnTextDir == EXC_XF_TEXTDIR_CONTEXT ? nullptr : OString::number( mnTextDir ).getStr(),
- FSEND );
+ XML_readingOrder, mnTextDir == EXC_XF_TEXTDIR_CONTEXT ? nullptr : OString::number(mnTextDir).getStr() );
}
namespace {
@@ -1856,19 +1828,13 @@ static void lcl_WriteBorder( XclExpXmlStream& rStrm, sal_Int32 nElement, sal_uIn
{
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
if( nLineStyle == EXC_LINE_NONE )
- rStyleSheet->singleElement( nElement, FSEND );
+ rStyleSheet->singleElement(nElement);
else if( rColor == Color( 0, 0, 0, 0 ) )
- rStyleSheet->singleElement( nElement,
- XML_style, ToLineStyle( nLineStyle ),
- FSEND );
+ rStyleSheet->singleElement(nElement, XML_style, ToLineStyle(nLineStyle));
else
{
- rStyleSheet->startElement( nElement,
- XML_style, ToLineStyle( nLineStyle ),
- FSEND );
- rStyleSheet->singleElement( XML_color,
- XML_rgb, XclXmlUtils::ToOString( rColor ).getStr(),
- FSEND );
+ rStyleSheet->startElement(nElement, XML_style, ToLineStyle(nLineStyle));
+ rStyleSheet->singleElement(XML_color, XML_rgb, XclXmlUtils::ToOString(rColor));
rStyleSheet->endElement( nElement );
}
}
@@ -1881,9 +1847,9 @@ void XclExpCellBorder::SaveXml( XclExpXmlStream& rStrm ) const
rStyleSheet->startElement( XML_border,
XML_diagonalUp, ToPsz( mbDiagBLtoTR ),
- XML_diagonalDown, ToPsz( mbDiagTLtoBR ),
- // OOXTODO: XML_outline,
- FSEND );
+ XML_diagonalDown, ToPsz( mbDiagTLtoBR )
+ // OOXTODO: XML_outline
+ );
lcl_WriteBorder( rStrm, XML_left, mnLeftLine, rPalette.GetColor( mnLeftColor ) );
lcl_WriteBorder( rStrm, XML_right, mnRightLine, rPalette.GetColor( mnRightColor ) );
lcl_WriteBorder( rStrm, XML_top, mnTopLine, rPalette.GetColor( mnTopColor ) );
@@ -1966,28 +1932,21 @@ static const char* ToPatternType( sal_uInt8 nPattern )
void XclExpCellArea::SaveXml( XclExpXmlStream& rStrm ) const
{
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement( XML_fill,
- FSEND );
+ rStyleSheet->startElement(XML_fill);
// OOXTODO: XML_gradientFill
XclExpPalette& rPalette = rStrm.GetRoot().GetPalette();
if( mnPattern == EXC_PATT_NONE || ( mnForeColor == 0 && mnBackColor == 0 ) )
- rStyleSheet->singleElement( XML_patternFill,
- XML_patternType, ToPatternType( mnPattern ),
- FSEND );
+ rStyleSheet->singleElement(XML_patternFill, XML_patternType, ToPatternType(mnPattern));
else
{
- rStyleSheet->startElement( XML_patternFill,
- XML_patternType, ToPatternType( mnPattern ),
- FSEND );
+ rStyleSheet->startElement(XML_patternFill, XML_patternType, ToPatternType(mnPattern));
rStyleSheet->singleElement( XML_fgColor,
- XML_rgb, XclXmlUtils::ToOString( rPalette.GetColor( mnForeColor ) ).getStr(),
- FSEND );
+ XML_rgb, XclXmlUtils::ToOString(rPalette.GetColor(mnForeColor)) );
rStyleSheet->singleElement( XML_bgColor,
- XML_rgb, XclXmlUtils::ToOString( rPalette.GetColor( mnBackColor ) ).getStr(),
- FSEND );
+ XML_rgb, XclXmlUtils::ToOString(rPalette.GetColor(mnBackColor)) );
rStyleSheet->endElement( XML_patternFill );
}
@@ -2008,13 +1967,9 @@ bool XclExpColor::FillFromItemSet( const SfxItemSet& rItemSet )
void XclExpColor::SaveXml( XclExpXmlStream& rStrm ) const
{
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement( XML_fill,
- FSEND );
- rStyleSheet->startElement( XML_patternFill,
- FSEND );
- rStyleSheet->singleElement( XML_bgColor,
- XML_rgb, XclXmlUtils::ToOString(maColor).getStr(),
- FSEND );
+ rStyleSheet->startElement(XML_fill);
+ rStyleSheet->startElement(XML_patternFill);
+ rStyleSheet->singleElement(XML_bgColor, XML_rgb, XclXmlUtils::ToOString(maColor));
rStyleSheet->endElement( XML_patternFill );
rStyleSheet->endElement( XML_fill );
@@ -2236,10 +2191,10 @@ void XclExpXF::SaveXml( XclExpXmlStream& rStrm )
}
rStyleSheet->startElement( XML_xf,
- XML_numFmtId, OString::number( mnXclNumFmt ).getStr(),
- XML_fontId, OString::number( mnXclFont ).getStr(),
- XML_fillId, OString::number( mnFillId ).getStr(),
- XML_borderId, OString::number( mnBorderId ).getStr(),
+ XML_numFmtId, OString::number(mnXclNumFmt),
+ XML_fontId, OString::number(mnXclFont),
+ XML_fillId, OString::number(mnFillId),
+ XML_borderId, OString::number(mnBorderId),
XML_xfId, IsStyleXF() ? nullptr : OString::number( nXfId ).getStr(),
// OOXTODO: XML_quotePrefix,
// OOXTODO: XML_pivotButton,
@@ -2248,8 +2203,7 @@ void XclExpXF::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_applyFill,
XML_applyBorder, ToPsz( mbBorderUsed ),
XML_applyAlignment, ToPsz( mbAlignUsed ),
- XML_applyProtection, ToPsz( mbProtUsed ),
- FSEND );
+ XML_applyProtection, ToPsz( mbProtUsed ) );
if( mbAlignUsed )
maAlignment.SaveXml( rStrm );
else if ( pStyleXF )
@@ -2358,14 +2312,14 @@ void XclExpStyle::SaveXml( XclExpXmlStream& rStrm )
// get the style index associated with index into sortedlist
nXFId = rStrm.GetRoot().GetXFBuffer().GetXmlStyleIndex( nXFId );
rStrm.GetCurrentStream()->singleElement( XML_cellStyle,
- XML_name, sName.getStr(),
- XML_xfId, OString::number( nXFId ).getStr(),
+ XML_name, sName,
+ XML_xfId, OString::number(nXFId),
// builtinId of 54 or above is invalid according to OpenXML SDK validator.
- XML_builtinId, pBuiltinId,
+ XML_builtinId, pBuiltinId
// OOXTODO: XML_iLevel,
// OOXTODO: XML_hidden,
- // XML_customBuiltin, ToPsz( ! IsBuiltIn() ),
- FSEND );
+ // XML_customBuiltin, ToPsz( ! IsBuiltIn() )
+ );
// OOXTODO: XML_extLst
}
@@ -2638,18 +2592,14 @@ void XclExpXFBuffer::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement( XML_fills,
- XML_count, OString::number( maFills.size() ).getStr(),
- FSEND );
+ rStyleSheet->startElement(XML_fills, XML_count, OString::number(maFills.size()));
for( auto& rFill : maFills )
{
rFill.SaveXml( rStrm );
}
rStyleSheet->endElement( XML_fills );
- rStyleSheet->startElement( XML_borders,
- XML_count, OString::number( maBorders.size() ).getStr(),
- FSEND );
+ rStyleSheet->startElement(XML_borders, XML_count, OString::number(maBorders.size()));
for( auto& rBorder : maBorders )
{
rBorder.SaveXml( rStrm );
@@ -2662,9 +2612,7 @@ void XclExpXFBuffer::SaveXml( XclExpXmlStream& rStrm )
if( nStyles > 0 )
{
- rStyleSheet->startElement( XML_cellStyleXfs,
- XML_count, OString::number( nStyles ).getStr(),
- FSEND );
+ rStyleSheet->startElement(XML_cellStyleXfs, XML_count, OString::number(nStyles));
size_t nXFCount = maSortedXFList.GetSize();
for( size_t i = 0; i < nXFCount; ++i )
{
@@ -2678,9 +2626,7 @@ void XclExpXFBuffer::SaveXml( XclExpXmlStream& rStrm )
if( nCells > 0 )
{
- rStyleSheet->startElement( XML_cellXfs,
- XML_count, OString::number( nCells ).getStr(),
- FSEND );
+ rStyleSheet->startElement(XML_cellXfs, XML_count, OString::number(nCells));
size_t nXFCount = maSortedXFList.GetSize();
for( size_t i = 0; i < nXFCount; ++i )
{
@@ -2693,9 +2639,7 @@ void XclExpXFBuffer::SaveXml( XclExpXmlStream& rStrm )
}
// save all STYLE records
- rStyleSheet->startElement( XML_cellStyles,
- XML_count, OString::number( maStyleList.GetSize() ).getStr(),
- FSEND );
+ rStyleSheet->startElement(XML_cellStyles, XML_count, OString::number(maStyleList.GetSize()));
maStyleList.SaveXml( rStrm );
rStyleSheet->endElement( XML_cellStyles );
}
@@ -3088,9 +3032,7 @@ void XclExpDxfs::SaveXml( XclExpXmlStream& rStrm )
return;
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement( XML_dxfs,
- XML_count, OString::number(maDxf.size()).getStr(),
- FSEND );
+ rStyleSheet->startElement(XML_dxfs, XML_count, OString::number(maDxf.size()));
for ( auto& rxDxf : maDxf )
{
@@ -3120,7 +3062,7 @@ XclExpDxf::~XclExpDxf()
void XclExpDxf::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
- rStyleSheet->startElement( XML_dxf, FSEND );
+ rStyleSheet->startElement(XML_dxf);
if (mpFont)
mpFont->SaveXml(rStrm);
@@ -3153,8 +3095,7 @@ void XclExpXmlStyleSheet::SaveXml( XclExpXmlStream& rStrm )
rStrm.PushStream( aStyleSheet );
aStyleSheet->startElement( XML_styleSheet,
- XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
- FSEND );
+ XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8() );
CreateRecord( EXC_ID_FORMATLIST )->SaveXml( rStrm );
CreateRecord( EXC_ID_FONTLIST )->SaveXml( rStrm );
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index d0038dd32379..f3cd211ff71e 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -636,12 +636,12 @@ void XclExpNumberCell::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_c,
- XML_r, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), GetXclPos() ).getStr(),
- XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
- XML_t, "n",
+ XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetStringBuf(), GetXclPos()).getStr(),
+ XML_s, lcl_GetStyleId(rStrm, *this),
+ XML_t, "n"
// OOXTODO: XML_cm, XML_vm, XML_ph
- FSEND );
- rWorksheet->startElement( XML_v, FSEND );
+ );
+ rWorksheet->startElement(XML_v);
rWorksheet->write( mfValue );
rWorksheet->endElement( XML_v );
rWorksheet->endElement( XML_c );
@@ -665,12 +665,12 @@ void XclExpBooleanCell::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_c,
- XML_r, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), GetXclPos() ).getStr(),
- XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
- XML_t, "b",
+ XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetStringBuf(), GetXclPos()).getStr(),
+ XML_s, lcl_GetStyleId(rStrm, *this),
+ XML_t, "b"
// OOXTODO: XML_cm, XML_vm, XML_ph
- FSEND );
- rWorksheet->startElement( XML_v, FSEND );
+ );
+ rWorksheet->startElement( XML_v );
rWorksheet->write( mbValue ? "1" : "0" );
rWorksheet->endElement( XML_v );
rWorksheet->endElement( XML_c );
@@ -774,12 +774,12 @@ void XclExpLabelCell::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_c,
- XML_r, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), GetXclPos() ).getStr(),
- XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
- XML_t, "s",
+ XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetStringBuf(), GetXclPos()).getStr(),
+ XML_s, lcl_GetStyleId(rStrm, *this),
+ XML_t, "s"
// OOXTODO: XML_cm, XML_vm, XML_ph
- FSEND );
- rWorksheet->startElement( XML_v, FSEND );
+ );
+ rWorksheet->startElement( XML_v );
rWorksheet->write( static_cast<sal_Int32>(mnSstIndex) );
rWorksheet->endElement( XML_v );
rWorksheet->endElement( XML_c );
@@ -933,11 +933,11 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
XclXmlUtils::GetFormulaTypeAndValue( mrScFmlaCell, sType, sValue );
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_c,
- XML_r, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), GetXclPos() ).getStr(),
- XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
- XML_t, sType,
+ XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetStringBuf(), GetXclPos()).getStr(),
+ XML_s, lcl_GetStyleId(rStrm, *this),
+ XML_t, sType
// OOXTODO: XML_cm, XML_vm, XML_ph
- FSEND );
+ );
bool bWriteFormula = true;
bool bTagStarted = false;
@@ -983,7 +983,7 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
XML_aca, ToPsz( (mxTokArr && mxTokArr->IsVolatile()) ||
(mxAddRec && mxAddRec->IsVolatile())),
XML_t, mxAddRec ? "array" : nullptr,
- XML_ref, !sFmlaCellRange.isEmpty()? sFmlaCellRange.getStr() : nullptr,
+ XML_ref, !sFmlaCellRange.isEmpty()? sFmlaCellRange.getStr() : nullptr
// OOXTODO: XML_dt2D, bool
// OOXTODO: XML_dtr, bool
// OOXTODO: XML_del1, bool
@@ -993,7 +993,7 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_ca, bool
// OOXTODO: XML_si, uint
// OOXTODO: XML_bx bool
- FSEND );
+ );
bTagStarted = true;
}
}
@@ -1006,8 +1006,7 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
{
rWorksheet->startElement( XML_f,
XML_aca, ToPsz( (mxTokArr && mxTokArr->IsVolatile()) ||
- (mxAddRec && mxAddRec->IsVolatile()) ),
- FSEND );
+ (mxAddRec && mxAddRec->IsVolatile()) ) );
}
rWorksheet->writeEscaped( XclXmlUtils::ToOUString(
rStrm.GetRoot().GetCompileFormulaContext(), mrScFmlaCell.aPos, mrScFmlaCell.GetCode()));
@@ -1016,15 +1015,15 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
if( strcmp( sType, "inlineStr" ) == 0 )
{
- rWorksheet->startElement( XML_is, FSEND );
- rWorksheet->startElement( XML_t, FSEND );
+ rWorksheet->startElement(XML_is);
+ rWorksheet->startElement(XML_t);
rWorksheet->writeEscaped( sValue );
rWorksheet->endElement( XML_t );
rWorksheet->endElement( XML_is );
}
else
{
- rWorksheet->startElement( XML_v, FSEND );
+ rWorksheet->startElement(XML_v);
rWorksheet->writeEscaped( sValue );
rWorksheet->endElement( XML_v );
}
@@ -1337,9 +1336,8 @@ void XclExpBlankCell::WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->singleElement( XML_c,
- XML_r, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), rAddress ).getStr(),
- XML_s, lcl_GetStyleId( rStrm, nXFId ).getStr(),
- FSEND );
+ XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetStringBuf(), rAddress).getStr(),
+ XML_s, lcl_GetStyleId(rStrm, nXFId) );
}
XclExpRkCell::XclExpRkCell(
@@ -1367,12 +1365,12 @@ void XclExpRkCell::WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& r
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_c,
- XML_r, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), rAddress ).getStr(),
- XML_s, lcl_GetStyleId( rStrm, nXFId ).getStr(),
- XML_t, "n",
+ XML_r, XclXmlUtils::ToOString(rStrm.GetRoot().GetStringBuf(), rAddress).getStr(),
+ XML_s, lcl_GetStyleId(rStrm, nXFId),
+ XML_t, "n"
// OOXTODO: XML_cm, XML_vm, XML_ph
- FSEND );
- rWorksheet->startElement( XML_v, FSEND );
+ );
+ rWorksheet->startElement( XML_v );
rWorksheet->write( XclTools::GetDoubleFromRK( maRkValues[ nRelCol ] ) );
rWorksheet->endElement( XML_v );
rWorksheet->endElement( XML_c );
@@ -1523,8 +1521,7 @@ void XclExpDimensions::SaveXml( XclExpXmlStream& rStrm )
// To be compatible with MS Office 2007,
// we need full address notation format
// e.g. "A1:AMJ177" and not partial like: "1:177".
- XML_ref, XclXmlUtils::ToOString( aRange, true ).getStr(),
- FSEND );
+ XML_ref, XclXmlUtils::ToOString(aRange, true) );
}
void XclExpDimensions::WriteBody( XclExpStream& rStrm )
@@ -1678,13 +1675,12 @@ void XclExpColinfo::SaveXml( XclExpXmlStream& rStrm )
XML_collapsed, ToPsz( ::get_flag( mnFlags, EXC_COLINFO_COLLAPSED ) ),
XML_customWidth, ToPsz( mbCustomWidth ),
XML_hidden, ToPsz( ::get_flag( mnFlags, EXC_COLINFO_HIDDEN ) ),
- XML_outlineLevel, OString::number( mnOutlineLevel ).getStr(),
- XML_max, OString::number( nLastXclCol + 1 ).getStr(),
- XML_min, OString::number( mnFirstXclCol + 1 ).getStr(),
+ XML_outlineLevel, OString::number(mnOutlineLevel),
+ XML_max, OString::number(nLastXclCol + 1),
+ XML_min, OString::number(mnFirstXclCol + 1),
// OOXTODO: XML_phonetic,
- XML_style, lcl_GetStyleId( rStrm, maXFId.mnXFIndex ).getStr(),
- XML_width, OString::number( nTruncatedExcelColumnWidth ).getStr(),
- FSEND );
+ XML_style, lcl_GetStyleId(rStrm, maXFId.mnXFIndex),
+ XML_width, OString::number(nTruncatedExcelColumnWidth) );
}
XclExpColinfoBuffer::XclExpColinfoBuffer( const XclExpRoot& rRoot ) :
@@ -1782,8 +1778,7 @@ void XclExpColinfoBuffer::SaveXml( XclExpXmlStream& rStrm )
return;
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_cols,
- FSEND );
+ rWorksheet->startElement(XML_cols);
maColInfos.SaveXml( rStrm );
rWorksheet->endElement( XML_cols );
}
@@ -2105,19 +2100,19 @@ void XclExpRow::SaveXml( XclExpXmlStream& rStrm )
for ( sal_uInt32 i=0; i<mnXclRowRpt; ++i )
{
rWorksheet->startElement( XML_row,
- XML_r, OString::number( (mnCurrentRow++) ).getStr(),
+ XML_r, OString::number(mnCurrentRow++),
// OOXTODO: XML_spans, optional
XML_s, haveFormat ? lcl_GetStyleId( rStrm, mnXFIndex ).getStr() : nullptr,
XML_customFormat, ToPsz( haveFormat ),
- XML_ht, OString::number( static_cast<double>(mnHeight) / 20.0 ).getStr(),
+ XML_ht, OString::number(static_cast<double>(mnHeight) / 20.0),
XML_hidden, ToPsz( ::get_flag( mnFlags, EXC_ROW_HIDDEN ) ),
XML_customHeight, ToPsz( ::get_flag( mnFlags, EXC_ROW_UNSYNCED ) ),
- XML_outlineLevel, OString::number( mnOutlineLevel ).getStr(),
- XML_collapsed, ToPsz( ::get_flag( mnFlags, EXC_ROW_COLLAPSED ) ),
+ XML_outlineLevel, OString::number(mnOutlineLevel),
+ XML_collapsed, ToPsz( ::get_flag( mnFlags, EXC_ROW_COLLAPSED ) )
// OOXTODO: XML_thickTop, bool
// OOXTODO: XML_thickBot, bool
// OOXTODO: XML_ph, bool
- FSEND );
+ );
// OOXTODO: XML_extLst
maCellList.SaveXml( rStrm );
rWorksheet->endElement( XML_row );
@@ -2341,12 +2336,12 @@ void XclExpRowBuffer::SaveXml( XclExpXmlStream& rStrm )
{
if (std::none_of(maRowMap.begin(), maRowMap.end(), [](const RowMap::value_type& rRow) { return rRow.second->IsEnabled(); }))
{
- rStrm.GetCurrentStream()->singleElement( XML_sheetData, FSEND );
+ rStrm.GetCurrentStream()->singleElement(XML_sheetData);
return;
}
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_sheetData, FSEND );
+ rWorksheet->startElement(XML_sheetData);
for (const auto& rEntry : maRowMap)
rEntry.second->SaveXml(rStrm);
rWorksheet->endElement( XML_sheetData );
@@ -2689,11 +2684,10 @@ void XclExpCellTable::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_customHeight
// OOXTODO: XML_thickTop
// OOXTODO: XML_thickBottom
- XML_defaultRowHeight, OString::number( static_cast< double> ( rDefData.mnHeight ) / 20.0 ).getStr(),
+ XML_defaultRowHeight, OString::number(static_cast<double> (rDefData.mnHeight) / 20.0),
XML_zeroHeight, ToPsz( rDefData.IsHidden() ),
- XML_outlineLevelRow, OString::number( maRowBfr.GetHighestOutlineLevel() ).getStr(),
- XML_outlineLevelCol, OString::number( maColInfoBfr.GetHighestOutlineLevel() ).getStr(),
- FSEND );
+ XML_outlineLevelRow, OString::number(maRowBfr.GetHighestOutlineLevel()),
+ XML_outlineLevelCol, OString::number(maColInfoBfr.GetHighestOutlineLevel()) );
rWorksheet->endElement( XML_sheetFormatPr );
maColInfoBfr.SaveXml( rStrm );
diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index d4f9f19b08fb..634dab3819d6 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -59,13 +59,13 @@ void XclExpWindow1::SaveXml( XclExpXmlStream& rStrm )
XML_showSheetTabs, ToPsz( ::get_flag( mnFlags, EXC_WIN1_TABBAR ) ),
XML_xWindow, "0",
XML_yWindow, "0",
- XML_windowWidth, OString::number( 0x4000 ).getStr(),
- XML_windowHeight, OString::number( 0x2000 ).getStr(),
- XML_tabRatio, OString::number( mnTabBarSize ).getStr(),
- XML_firstSheet, OString::number( rTabInfo.GetFirstVisXclTab() ).getStr(),
- XML_activeTab, OString::number( rTabInfo.GetDisplayedXclTab() ).getStr(),
+ XML_windowWidth, OString::number(0x4000),
+ XML_windowHeight, OString::number(0x2000),
+ XML_tabRatio, OString::number(mnTabBarSize),
+ XML_firstSheet, OString::number(rTabInfo.GetFirstVisXclTab()),
+ XML_activeTab, OString::number(rTabInfo.GetDisplayedXclTab())
// OOXTODO: XML_autoFilterDateGrouping, // bool; AUTOFILTER12? 87Eh
- FSEND );
+ );
}
void XclExpWindow1::WriteBody( XclExpStream& rStrm )
@@ -184,12 +184,11 @@ static const char* lcl_GetActivePane( sal_uInt8 nActivePane )
void XclExpPane::SaveXml( XclExpXmlStream& rStrm )
{
rStrm.GetCurrentStream()->singleElement( XML_pane,
- XML_xSplit, OString::number( mnSplitX ).getStr(),
- XML_ySplit, OString::number( mnSplitY ).getStr(),
+ XML_xSplit, OString::number(mnSplitX),
+ XML_ySplit, OString::number(mnSplitY),
XML_topLeftCell, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), maSecondXclPos ).getStr(),
XML_activePane, lcl_GetActivePane( mnActivePane ),
- XML_state, mbFrozenPanes ? "frozen" : "split",
- FSEND );
+ XML_state, mbFrozenPanes ? "frozen" : "split" );
}
void XclExpPane::WriteBody( XclExpStream& rStrm )
@@ -232,9 +231,8 @@ void XclExpSelection::SaveXml( XclExpXmlStream& rStrm )
rStrm.GetCurrentStream()->singleElement( XML_selection,
XML_pane, lcl_GetActivePane( mnPane ),
XML_activeCell, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), maSelData.maXclCursor ).getStr(),
- XML_activeCellId, OString::number( maSelData.mnCursorIdx ).getStr(),
- XML_sqref, XclXmlUtils::ToOString( maSelData.maXclSelection ).getStr(),
- FSEND );
+ XML_activeCellId, OString::number(maSelData.mnCursorIdx),
+ XML_sqref, XclXmlUtils::ToOString(maSelData.maXclSelection) );
}
void XclExpSelection::WriteBody( XclExpStream& rStrm )
@@ -418,7 +416,7 @@ static OString lcl_GetZoom( sal_uInt16 nZoom )
void XclExpTabViewSettings::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_sheetViews, FSEND );
+ rWorksheet->startElement(XML_sheetViews);
// handle missing viewdata at embedded XLSX OLE objects
if (maData.mbSelected)
@@ -447,14 +445,14 @@ void XclExpTabViewSettings::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_showWhiteSpace,
XML_view, maData.mbPageMode ? "pageBreakPreview" : "normal", // OOXTODO: pageLayout
XML_topLeftCell, XclXmlUtils::ToOString( rStrm.GetRoot().GetStringBuf(), maData.maFirstXclPos ).getStr(),
- XML_colorId, OString::number( rStrm.GetRoot().GetPalette().GetColorIndex( mnGridColorId ) ).getStr(),
- XML_zoomScale, lcl_GetZoom( maData.mnCurrentZoom ).getStr(),
- XML_zoomScaleNormal, lcl_GetZoom( maData.mnNormalZoom ).getStr(),
+ XML_colorId, OString::number(rStrm.GetRoot().GetPalette().GetColorIndex(mnGridColorId)),
+ XML_zoomScale, lcl_GetZoom(maData.mnCurrentZoom),
+ XML_zoomScaleNormal, lcl_GetZoom(maData.mnNormalZoom),
// OOXTODO: XML_zoomScaleSheetLayoutView,
- XML_zoomScalePageLayoutView, lcl_GetZoom( maData.mnPageZoom ).getStr(),
- XML_workbookViewId, "0", // OOXTODO? 0-based index of document(xl/workbook.xml)/workbook/bookviews/workbookView
+ XML_zoomScalePageLayoutView, lcl_GetZoom(maData.mnPageZoom),
+ XML_workbookViewId, "0" // OOXTODO? 0-based index of document(xl/workbook.xml)/workbook/bookviews/workbookView
// should always be 0, as we only generate 1 such element.
- FSEND );
+ );
if( maData.IsSplit() )
{
XclExpPane aPane( maData );
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index e3e48b2dac0b..24f176b78dc3 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -448,17 +448,11 @@ void XclExpXmlChTrHeader::SaveXml( XclExpXmlStream& rStrm )
{
// Write sheet index map.
size_t n = maTabBuffer.size();
- pHeader->startElement(
- XML_sheetIdMap,
- XML_count, OString::number(n).getStr(),
- FSEND);
+ pHeader->startElement(XML_sheetIdMap, XML_count, OString::number(n));
for (size_t i = 0; i < n; ++i)
{
- pHeader->singleElement(
- XML_sheetId,
- XML_val, OString::number(maTabBuffer[i]).getStr(),
- FSEND);
+ pHeader->singleElement(XML_sheetId, XML_val, OString::number(maTabBuffer[i]));
}
pHeader->endElement(XML_sheetIdMap);
}
@@ -997,33 +991,32 @@ static void lcl_WriteCell( XclExpXmlStream& rStrm, sal_Int32 nElement, const ScA
{
sax_fastparser::FSHelperPtr pStream = rStrm.GetCurrentStream();
- pStream->startElement( nElement,
- XML_r, XclXmlUtils::ToOString( rPosition ).getStr(),
- XML_s, nullptr, // OOXTODO: not supported
- XML_t, lcl_GetType( pData ),
- XML_cm, nullptr, // OOXTODO: not supported
- XML_vm, nullptr, // OOXTODO: not supported
- XML_ph, nullptr, // OOXTODO: not supported
- FSEND );
+ pStream->startElement(nElement,
+ XML_r, XclXmlUtils::ToOString(rPosition),
+ XML_s, nullptr, // OOXTODO: not supported
+ XML_t, lcl_GetType(pData),
+ XML_cm, nullptr, // OOXTODO: not supported
+ XML_vm, nullptr, // OOXTODO: not supported
+ XML_ph, nullptr); // OOXTODO: not supported
switch( pData->nType )
{
case EXC_CHTR_TYPE_RK:
case EXC_CHTR_TYPE_DOUBLE:
- pStream->startElement( XML_v, FSEND );
+ pStream->startElement(XML_v);
pStream->write( pData->fValue );
pStream->endElement( XML_v );
break;
case EXC_CHTR_TYPE_FORMULA:
- pStream->startElement( XML_f,
+ pStream->startElement( XML_f
// OOXTODO: other attributes? see XclExpFormulaCell::SaveXml()
- FSEND );
+ );
pStream->writeEscaped( XclXmlUtils::ToOUString(
rStrm.GetRoot().GetCompileFormulaContext(),
pData->mpFormulaCell->aPos, pData->mpFormulaCell->GetCode()));
pStream->endElement( XML_f );
break;
case EXC_CHTR_TYPE_STRING:
- pStream->startElement( XML_is, FSEND );
+ pStream->startElement(XML_is);
if( pData->mpFormattedString )
pData->mpFormattedString->WriteXml( rStrm );
else
@@ -1041,10 +1034,10 @@ void XclExpChTrCellContent::SaveXml( XclExpXmlStream& rRevisionLogStrm )
{
sax_fastparser::FSHelperPtr pStream = rRevisionLogStrm.GetCurrentStream();
pStream->startElement( XML_rcc,
- XML_rId, OString::number( GetActionNumber() ).getStr(),
+ XML_rId, OString::number(GetActionNumber()),
XML_ua, ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
- XML_sId, OString::number( GetTabId( aPosition.Tab() ) ).getStr(),
+ XML_sId, OString::number(GetTabId(aPosition.Tab())),
XML_odxf, nullptr, // OOXTODO: not supported
XML_xfDxf, nullptr, // OOXTODO: not supported
XML_s, nullptr, // OOXTODO: not supported
@@ -1054,16 +1047,13 @@ void XclExpChTrCellContent::SaveXml( XclExpXmlStream& rRevisionLogStrm )
XML_oldQuotePrefix, nullptr, // OOXTODO: not supported
XML_ph, nullptr, // OOXTODO: not supported
XML_oldPh, nullptr, // OOXTODO: not supported
- XML_endOfListFormulaUpdate, nullptr, // OOXTODO: not supported
- FSEND );
+ XML_endOfListFormulaUpdate, nullptr); // OOXTODO: not supported
if( pOldData )
{
lcl_WriteCell( rRevisionLogStrm, XML_oc, aPosition, pOldData.get() );
if (!pNewData)
{
- pStream->singleElement(XML_nc,
- XML_r, XclXmlUtils::ToOString( aPosition ).getStr(),
- FSEND);
+ pStream->singleElement(XML_nc, XML_r, XclXmlUtils::ToOString(aPosition));
}
}
if( pNewData )
@@ -1174,15 +1164,14 @@ void XclExpChTrInsert::SaveXml( XclExpXmlStream& rRevisionLogStrm )
{
sax_fastparser::FSHelperPtr pStream = rRevisionLogStrm.GetCurrentStream();
pStream->startElement( XML_rrc,
- XML_rId, OString::number( GetActionNumber() ).getStr(),
+ XML_rId, OString::number(GetActionNumber()),
XML_ua, ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
- XML_sId, OString::number( GetTabId( aRange.aStart.Tab() ) ).getStr(),
+ XML_sId, OString::number(GetTabId(aRange.aStart.Tab())),
XML_eol, ToPsz10(mbEndOfList),
- XML_ref, XclXmlUtils::ToOString( aRange ).getStr(),
+ XML_ref, XclXmlUtils::ToOString(aRange),
XML_action, lcl_GetAction( nOpCode ),
- XML_edge, nullptr, // OOXTODO: ???
- FSEND );
+ XML_edge, nullptr); // OOXTODO: ???
// OOXTODO: does this handle XML_rfmt, XML_undo?
XclExpChTrAction* pAction = GetAddAction();
@@ -1233,13 +1222,12 @@ void XclExpChTrInsertTab::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr pStream = rStrm.GetCurrentStream();
pStream->singleElement( XML_ris,
- XML_rId, OString::number( GetActionNumber() ).getStr(),
+ XML_rId, OString::number(GetActionNumber()),
XML_ua, ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
- XML_sheetId, OString::number( GetTabId( nTab ) ).getStr(),
+ XML_sheetId, OString::number(GetTabId(nTab)),
XML_name, GetTabInfo().GetScTabName(nTab).toUtf8(),
- XML_sheetPosition, OString::number( nTab ).getStr(),
- FSEND );
+ XML_sheetPosition, OString::number(nTab) );
}
XclExpChTrMoveRange::XclExpChTrMoveRange(
@@ -1301,14 +1289,13 @@ void XclExpChTrMoveRange::SaveXml( XclExpXmlStream& rRevisionLogStrm )
sax_fastparser::FSHelperPtr pStream = rRevisionLogStrm.GetCurrentStream();
pStream->startElement( XML_rm,
- XML_rId, OString::number( GetActionNumber() ).getStr(),
+ XML_rId, OString::number(GetActionNumber()),
XML_ua, ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
XML_ra, nullptr, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
- XML_sheetId, OString::number( GetTabId( aDestRange.aStart.Tab() ) ).getStr(),
- XML_source, XclXmlUtils::ToOString( aSourceRange ).getStr(),
- XML_destination, XclXmlUtils::ToOString( aDestRange ).getStr(),
- XML_sourceSheetId, OString::number( GetTabId( aSourceRange.aStart.Tab() ) ).getStr(),
- FSEND );
+ XML_sheetId, OString::number(GetTabId(aDestRange.aStart.Tab())),
+ XML_source, XclXmlUtils::ToOString(aSourceRange),
+ XML_destination, XclXmlUtils::ToOString(aDestRange),
+ XML_sourceSheetId, OString::number(GetTabId(aSourceRange.aStart.Tab())) );
// OOXTODO: does this handle XML_rfmt, XML_undo?
XclExpChTrAction* pAction = GetAddAction();
while( pAction != nullptr )
@@ -1353,13 +1340,12 @@ void XclExpChTr0x014A::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr pStream = rStrm.GetCurrentStream();
pStream->startElement( XML_rfmt,
- XML_sheetId, OString::number( GetTabId( aRange.aStart.Tab() ) ).getStr(),
+ XML_sheetId, OString::number(GetTabId(aRange.aStart.Tab())),
XML_xfDxf, nullptr, // OOXTODO: not supported
XML_s, nullptr, // OOXTODO: style
- XML_sqref, XclXmlUtils::ToOString( aRange ).getStr(),
+ XML_sqref, XclXmlUtils::ToOString(aRange),
XML_start, nullptr, // OOXTODO: for string changes
- XML_length, nullptr, // OOXTODO: for string changes
- FSEND );
+ XML_length, nullptr); // OOXTODO: for string changes
// OOXTODO: XML_dxf, XML_extLst
pStream->endElement( XML_rfmt );
@@ -1634,8 +1620,7 @@ static void lcl_WriteUserNamesXml( XclExpXmlStream& rWorkbookStrm )
pUserNames->startElement( XML_users,
XML_xmlns, rWorkbookStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
FSNS( XML_xmlns, XML_r ), rWorkbookStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
- XML_count, "0",
- FSEND );
+ XML_count, "0" );
// OOXTODO: XML_userinfo elements for each user editing the file
// Doesn't seem to be supported by .xls output either (based on
// contents of XclExpChangeTrack::WriteUserNamesStream()).
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 2b6cb7fb4300..b605042e6259 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -235,16 +235,13 @@ void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int
OUStringToOString(oox::getRelationship(Relationship::DRAWING), RTL_TEXTENCODING_UTF8).getStr(),
&sId );
- rStrm.GetCurrentStream()->singleElement( XML_drawing,
- FSNS(XML_r, XML_id), sId.toUtf8(),
- FSEND );
+ rStrm.GetCurrentStream()->singleElement(XML_drawing, FSNS(XML_r, XML_id), sId.toUtf8());
rStrm.PushStream( pDrawing );
pDrawing->startElement( FSNS( XML_xdr, XML_wsDr ),
FSNS(XML_xmlns, XML_xdr), rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)).toUtf8(),
FSNS(XML_xmlns, XML_a), rStrm.getNamespaceURL(OOX_NS(dml)).toUtf8(),
- FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
- FSEND );
+ FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8() );
for (const auto& rpObj : aList)
rpObj->SaveXml(rStrm);
@@ -269,17 +266,14 @@ void SaveVmlObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int32& nV
OUStringToOString(oox::getRelationship(Relationship::VMLDRAWING), RTL_TEXTENCODING_UTF8).getStr(),
&sId );
- rStrm.GetCurrentStream()->singleElement( XML_legacyDrawing,
- FSNS(XML_r, XML_id), sId.toUtf8(),
- FSEND );
+ rStrm.GetCurrentStream()->singleElement(XML_legacyDrawing, FSNS(XML_r, XML_id), sId.toUtf8());
rStrm.PushStream( pVmlDrawing );
pVmlDrawing->startElement( XML_xml,
FSNS(XML_xmlns, XML_v), rStrm.getNamespaceURL(OOX_NS(vml)).toUtf8(),
FSNS(XML_xmlns, XML_o), rStrm.getNamespaceURL(OOX_NS(vmlOffice)).toUtf8(),
FSNS(XML_xmlns, XML_x), rStrm.getNamespaceURL(OOX_NS(vmlExcel)).toUtf8(),
- FSNS(XML_xmlns, XML_w10), rStrm.getNamespaceURL(OOX_NS(vmlWord)).toUtf8(),
- FSEND );
+ FSNS(XML_xmlns, XML_w10), rStrm.getNamespaceURL(OOX_NS(vmlWord)).toUtf8() );
for ( const auto& rxObj : rList )
{
@@ -638,20 +632,15 @@ void VmlCommentExporter::EndShape( sal_Int32 nShapeElement )
maFrom.Left(), maFrom.Top(), maFrom.Right(), maFrom.Bottom(),
maTo.Left(), maTo.Top(), maTo.Right(), maTo.Bottom() );
- pVmlDrawing->startElement( FSNS( XML_x, XML_ClientData ),
- XML_ObjectType, "Note",
- FSEND );
- pVmlDrawing->singleElement( FSNS( XML_x, XML_MoveWithCells ),
- FSEND );
- pVmlDrawing->singleElement( FSNS( XML_x, XML_SizeWithCells ),
- FSEND );
+ pVmlDrawing->startElement(FSNS(XML_x, XML_ClientData), XML_ObjectType, "Note");
+ pVmlDrawing->singleElement(FSNS(XML_x, XML_MoveWithCells));
+ pVmlDrawing->singleElement(FSNS(XML_x, XML_SizeWithCells));
XclXmlUtils::WriteElement( pVmlDrawing, FSNS( XML_x, XML_Anchor ), pAnchor );
XclXmlUtils::WriteElement( pVmlDrawing, FSNS( XML_x, XML_AutoFill ), "False" );
XclXmlUtils::WriteElement( pVmlDrawing, FSNS( XML_x, XML_Row ), maScPos.Row() );
XclXmlUtils::WriteElement( pVmlDrawing, FSNS(XML_x, XML_Column), sal_Int32(maScPos.Col()));
if(mbVisible)
- pVmlDrawing->singleElement( FSNS(XML_x, XML_Visible),
- FSEND);
+ pVmlDrawing->singleElement(FSNS(XML_x, XML_Visible));
pVmlDrawing->endElement( FSNS( XML_x, XML_ClientData ) );
VMLExport::EndShape( nShapeElement );
@@ -1005,8 +994,7 @@ void XclObjAny::WriteFromTo( XclExpXmlStream& rStrm, const Reference< XShape >&
aRange.aEnd.Col()-1, aRange.aEnd.Row()-1,
nTab );
- pDrawing->startElement( FSNS( XML_xdr, XML_from ),
- FSEND );
+ pDrawing->startElement(FSNS(XML_xdr, XML_from));
XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_col ), static_cast<sal_Int32>(aRange.aStart.Col()) );
XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_colOff ),
oox::drawingml::convertHmmToEmu( aLocation.Left() - aRangeRect.Left() ) );
@@ -1015,8 +1003,7 @@ void XclObjAny::WriteFromTo( XclExpXmlStream& rStrm, const Reference< XShape >&
oox::drawingml::convertHmmToEmu( aLocation.Top() - aRangeRect.Top() ) );
pDrawing->endElement( FSNS( XML_xdr, XML_from ) );
- pDrawing->startElement( FSNS( XML_xdr, XML_to ),
- FSEND );
+ pDrawing->startElement(FSNS(XML_xdr, XML_to));
XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_col ), static_cast<sal_Int32>(aRange.aEnd.Col()) );
XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_colOff ),
oox::drawingml::convertHmmToEmu( aLocation.Right() - aRangeRect.Right() ) );
@@ -1162,8 +1149,7 @@ void XclObjAny::SaveXml( XclExpXmlStream& rStrm )
aDML.SetURLTranslator(pURLTransformer);
pDrawing->startElement( FSNS( XML_xdr, XML_twoCellAnchor ), // OOXTODO: oneCellAnchor, absoluteAnchor
- XML_editAs, GetEditAs( *this ),
- FSEND );
+ XML_editAs, GetEditAs( *this ) );
Reference< XPropertySet > xPropSet( mxShape, UNO_QUERY );
if (xPropSet.is())
{
@@ -1171,10 +1157,10 @@ void XclObjAny::SaveXml( XclExpXmlStream& rStrm )
aDML.WriteShape( mxShape );
}
- pDrawing->singleElement( FSNS( XML_xdr, XML_clientData),
+ pDrawing->singleElement( FSNS( XML_xdr, XML_clientData)
// OOXTODO: XML_fLocksWithSheet
// OOXTODO: XML_fPrintsWithSheet
- FSEND );
+ );
pDrawing->endElement( FSNS( XML_xdr, XML_twoCellAnchor ) );
}
@@ -1252,10 +1238,9 @@ void ExcBundlesheet8::SaveXml( XclExpXmlStream& rStrm )
rStrm.GetCurrentStream()->singleElement( XML_sheet,
XML_name, sUnicodeName.toUtf8(),
- XML_sheetId, OString::number( ( nTab+1 ) ).getStr(),
+ XML_sheetId, OString::number( ( nTab+1 ) ),
XML_state, nGrbit == 0x0000 ? "visible" : "hidden",
- FSNS( XML_r, XML_id ), sId.toUtf8(),
- FSEND );
+ FSNS( XML_r, XML_id ), sId.toUtf8() );
}
// --- class XclObproj -----------------------------------------------
@@ -1315,10 +1300,9 @@ void ExcEScenarioCell::SaveXml( XclExpXmlStream& rStrm ) const
rStrm.GetCurrentStream()->singleElement( XML_inputCells,
// OOXTODO: XML_deleted,
// OOXTODO: XML_numFmtId,
- XML_r, XclXmlUtils::ToOString( ScAddress( nCol, nRow, 0 ) ).getStr(),
+ XML_r, XclXmlUtils::ToOString( ScAddress( nCol, nRow, 0 ) ),
// OOXTODO: XML_undone,
- XML_val, XclXmlUtils::ToOString( sText ).getStr(),
- FSEND );
+ XML_val, XclXmlUtils::ToOString( sText ) );
}
ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
@@ -1438,8 +1422,7 @@ void ExcEScenario::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_hidden,
XML_count, OString::number( aCells.size() ).getStr(),
XML_user, XESTRING_TO_PSZ( sUserName ),
- XML_comment, XESTRING_TO_PSZ( sComment ),
- FSEND );
+ XML_comment, XESTRING_TO_PSZ( sComment ) );
for( const auto& rCell : aCells )
rCell.SaveXml( rStrm );
@@ -1495,10 +1478,10 @@ void ExcEScenarioManager::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
rWorkbook->startElement( XML_scenarios,
- XML_current, OString::number( nActive ).getStr(),
- XML_show, OString::number( nActive ).getStr(),
- // OOXTODO: XML_sqref,
- FSEND );
+ XML_current, OString::number( nActive ),
+ XML_show, OString::number( nActive )
+ // OOXTODO: XML_sqref
+ );
for( ExcEScenario& rScenario : aScenes )
rScenario.SaveXml( rStrm );
diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx
index d62b6214e898..a8c062b5c7df 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -95,8 +95,8 @@ void WriteAnimationProperty(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
x += 1.0;
y += 1.0;
}
- pFS->singleElementNS(XML_p, nToken, XML_x, OString::number(x * 100000).getStr(), XML_y,
- OString::number(y * 100000).getStr(), FSEND);
+ pFS->singleElementNS(XML_p, nToken, XML_x, OString::number(x * 100000), XML_y,
+ OString::number(y * 100000));
}
return;
}
@@ -110,21 +110,21 @@ void WriteAnimationProperty(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
&& (aClass == TypeClass_LONG || aClass == TypeClass_DOUBLE || aClass == TypeClass_STRING);
if (bWriteToken)
- pFS->startElementNS(XML_p, nToken, FSEND);
+ pFS->startElementNS(XML_p, nToken);
switch (rAny.getValueType().getTypeClass())
{
case TypeClass_LONG:
rAny >>= nRgb;
- pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nRgb), FSEND);
+ pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nRgb));
break;
case TypeClass_DOUBLE:
rAny >>= fDouble;
- pFS->singleElementNS(XML_p, XML_fltVal, XML_val, DS(fDouble), FSEND);
+ 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(), FSEND);
+ (*o3tl::doAccess<OUString>(rAny)).toUtf8());
break;
default:
break;
@@ -142,7 +142,7 @@ void WriteAnimateColorColor(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
sal_Int32 nColor = 0;
if (rAny >>= nColor)
{
- pFS->startElementNS(XML_p, nToken, FSEND);
+ pFS->startElementNS(XML_p, nToken);
if (nToken == XML_by)
{
@@ -152,7 +152,7 @@ void WriteAnimateColorColor(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
else
{
// CT_Color
- pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nColor), FSEND);
+ pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nColor));
}
pFS->endElementNS(XML_p, nToken);
@@ -162,13 +162,14 @@ void WriteAnimateColorColor(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
if (!(rAny >>= aHSL))
return;
- pFS->startElementNS(XML_p, nToken, FSEND);
+ pFS->startElementNS(XML_p, nToken);
if (nToken == XML_by)
{
// CT_TLByHslColorTransform
- pFS->singleElementNS(XML_p, XML_hsl, XML_h, I32S(aHSL[0] * 60000), // ST_Angel
- XML_s, I32S(aHSL[1] * 100000), XML_l, I32S(aHSL[2] * 100000), FSEND);
+ pFS->singleElementNS(XML_p, XML_hsl, XML_h, OString::number(aHSL[0] * 60000), // ST_Angel
+ XML_s, OString::number(aHSL[1] * 100000), XML_l,
+ OString::number(aHSL[2] * 100000));
}
else
{
@@ -201,7 +202,7 @@ void WriteAnimateValues(const FSHelperPtr& pFS, const Reference<XAnimate>& rXAni
SAL_INFO("sd.eppt", "animate values, formula: " << sFormula.toUtf8());
- pFS->startElementNS(XML_p, XML_tavLst, FSEND);
+ pFS->startElementNS(XML_p, XML_tavLst);
for (int i = 0; i < aKeyTimes.getLength(); i++)
{
@@ -210,8 +211,8 @@ void WriteAnimateValues(const FSHelperPtr& pFS, const Reference<XAnimate>& rXAni
{
pFS->startElementNS(XML_p, XML_tav, XML_fmla,
sFormula.isEmpty() ? nullptr : sFormula.toUtf8().getStr(), XML_tm,
- I32S(static_cast<sal_Int32>(aKeyTimes[i] * 100000.0)), FSEND);
- pFS->startElementNS(XML_p, XML_val, FSEND);
+ OString::number(static_cast<sal_Int32>(aKeyTimes[i] * 100000.0)));
+ pFS->startElementNS(XML_p, XML_val);
ValuePair aPair;
if (aValues[i] >>= aPair)
{
@@ -237,10 +238,10 @@ void WriteAnimationCondListForSeq(const FSHelperPtr& pFS, sal_Int32 nToken)
{
const char* pEvent = (nToken == XML_prevCondLst) ? "onPrev" : "onNext";
- pFS->startElementNS(XML_p, nToken, FSEND);
- pFS->startElementNS(XML_p, XML_cond, XML_evt, pEvent, FSEND);
- pFS->startElementNS(XML_p, XML_tgtEl, FSEND);
- pFS->singleElementNS(XML_p, XML_sldTgt, FSEND);
+ pFS->startElementNS(XML_p, nToken);
+ pFS->startElementNS(XML_p, XML_cond, XML_evt, pEvent);
+ pFS->startElementNS(XML_p, XML_tgtEl);
+ pFS->singleElementNS(XML_p, XML_sldTgt);
pFS->endElementNS(XML_p, XML_tgtEl);
pFS->endElementNS(XML_p, XML_cond);
pFS->endElementNS(XML_p, nToken);
@@ -293,17 +294,17 @@ void WriteAnimationAttributeName(const FSHelperPtr& pFS, const OUString& rAttrib
if (rAttributeName.isEmpty())
return;
- pFS->startElementNS(XML_p, XML_attrNameLst, FSEND);
+ pFS->startElementNS(XML_p, XML_attrNameLst);
SAL_INFO("sd.eppt", "write attribute name: " << rAttributeName.toUtf8());
if (rAttributeName == "X;Y")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
+ pFS->startElementNS(XML_p, XML_attrName);
pFS->writeEscaped("ppt_x");
pFS->endElementNS(XML_p, XML_attrName);
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
+ pFS->startElementNS(XML_p, XML_attrName);
pFS->writeEscaped("ppt_y");
pFS->endElementNS(XML_p, XML_attrName);
}
@@ -325,7 +326,7 @@ void WriteAnimationAttributeName(const FSHelperPtr& pFS, const OUString& rAttrib
if (pAttribute)
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
+ pFS->startElementNS(XML_p, XML_attrName);
pFS->writeEscaped(pAttribute);
pFS->endElementNS(XML_p, XML_attrName);
}
@@ -698,13 +699,13 @@ void PPTXAnimationExport::WriteAnimationTarget(const Any& rTarget)
sal_Int32 nShapeID = mrPowerPointExport.GetShapeID(rXShape);
- mpFS->startElementNS(XML_p, XML_tgtEl, FSEND);
- mpFS->startElementNS(XML_p, XML_spTgt, XML_spid, I32S(nShapeID), FSEND);
+ mpFS->startElementNS(XML_p, XML_tgtEl);
+ mpFS->startElementNS(XML_p, XML_spTgt, XML_spid, OString::number(nShapeID));
if (bParagraphTarget)
{
- mpFS->startElementNS(XML_p, XML_txEl, FSEND);
- mpFS->singleElementNS(XML_p, XML_pRg, XML_st, I32S(nParagraph), XML_end, I32S(nParagraph),
- FSEND);
+ mpFS->startElementNS(XML_p, XML_txEl);
+ mpFS->singleElementNS(XML_p, XML_pRg, XML_st, OString::number(nParagraph), XML_end,
+ OString::number(nParagraph));
mpFS->endElementNS(XML_p, XML_txEl);
}
mpFS->endElementNS(XML_p, XML_spTgt);
@@ -739,7 +740,7 @@ void PPTXAnimationExport::WriteAnimationCondList(const Any& rAny, sal_Int32 nTok
if (aList.size() > 0)
{
- mpFS->startElementNS(XML_p, nToken, FSEND);
+ mpFS->startElementNS(XML_p, nToken);
for (const Cond& rCond : aList)
WriteAnimationCond(rCond);
@@ -755,18 +756,18 @@ void PPTXAnimationExport::WriteAnimationCond(const Cond& rCond)
if (rCond.mxShape.is())
{
mpFS->startElementNS(XML_p, XML_cond, XML_delay, rCond.getDelay(), XML_evt,
- rCond.mpEvent, FSEND);
+ rCond.mpEvent);
WriteAnimationTarget(makeAny(rCond.mxShape));
mpFS->endElementNS(XML_p, XML_cond);
}
else
{
mpFS->singleElementNS(XML_p, XML_cond, XML_delay, rCond.getDelay(), XML_evt,
- rCond.mpEvent, FSEND);
+ rCond.mpEvent);
}
}
else
- mpFS->singleElementNS(XML_p, XML_cond, XML_delay, rCond.getDelay(), FSEND);
+ mpFS->singleElementNS(XML_p, XML_cond, XML_delay, rCond.getDelay());
}
void PPTXAnimationExport::WriteAnimationNodeAnimate(sal_Int32 nXmlNodeType)
@@ -819,8 +820,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,
- OUStringToOString(aPath, RTL_TEXTENCODING_UTF8), FSEND);
+ mpFS->startElementNS(XML_p, nXmlNodeType, XML_origin, "layout", XML_path, aPath.toUtf8());
}
else if (nXmlNodeType == XML_animRot)
{
@@ -853,7 +853,7 @@ void PPTXAnimationExport::WriteAnimationNodeAnimate(sal_Int32 nXmlNodeType)
}
}
- mpFS->startElementNS(XML_p, nXmlNodeType, XML_by, pBy, XML_from, pFrom, XML_to, pTo, FSEND);
+ mpFS->startElementNS(XML_p, nXmlNodeType, XML_by, pBy, XML_from, pFrom, XML_to, pTo);
}
else if (nXmlNodeType == XML_animClr)
{
@@ -867,7 +867,7 @@ void PPTXAnimationExport::WriteAnimationNodeAnimate(sal_Int32 nXmlNodeType)
pDirection = xColor->getDirection() ? "cw" : "ccw";
}
mpFS->startElementNS(XML_p, nXmlNodeType, XML_clrSpc, pColorSpace, XML_dir, pDirection,
- XML_calcmode, pCalcMode, XML_valueType, pValueType, FSEND);
+ XML_calcmode, pCalcMode, XML_valueType, pValueType);
}
else
{
@@ -888,7 +888,7 @@ void PPTXAnimationExport::WriteAnimationNodeAnimate(sal_Int32 nXmlNodeType)
pValueType, XML_from,
sFrom.isEmpty() ? nullptr : sFrom.toUtf8().getStr(), XML_to,
sTo.isEmpty() ? nullptr : sTo.toUtf8().getStr(), XML_by,
- sBy.isEmpty() ? nullptr : sBy.toUtf8().getStr(), FSEND);
+ sBy.isEmpty() ? nullptr : sBy.toUtf8().getStr());
bTo = sTo.isEmpty() && sFrom.isEmpty() && sBy.isEmpty();
}
@@ -927,7 +927,7 @@ void PPTXAnimationExport::WriteAnimationNodeAnimateInside(bool bSimple, bool bWr
}
}
- mpFS->startElementNS(XML_p, XML_cBhvr, XML_additive, pAdditive, FSEND);
+ mpFS->startElementNS(XML_p, XML_cBhvr, XML_additive, pAdditive);
WriteAnimationNodeCommonPropsStart();
Reference<XIterateContainer> xIterate(rXNode->getParent(), UNO_QUERY);
@@ -1041,11 +1041,14 @@ void PPTXAnimationExport::WriteAnimationNodeCommonPropsStart()
bool bAutoReverse = rXNode->getAutoReverse();
mpFS->startElementNS(
- XML_p, XML_cTn, XML_id, I64S(mrPowerPointExport.GetNextAnimationNodeID()), XML_dur,
- fDuration != 0 ? I32S(static_cast<sal_Int32>(fDuration * 1000.0)) : pDuration, XML_autoRev,
- bAutoReverse ? "1" : nullptr, XML_restart, pRestart, XML_nodeType, pNodeType, XML_fill,
- pFill, XML_presetClass, pPresetClass, XML_presetID, bPresetId ? I64S(nPresetId) : nullptr,
- XML_presetSubtype, bPresetSubType ? I64S(nPresetSubType) : nullptr, FSEND);
+ XML_p, XML_cTn, XML_id, OString::number(mrPowerPointExport.GetNextAnimationNodeID()),
+ XML_dur,
+ fDuration != 0 ? OString::number(static_cast<sal_Int32>(fDuration * 1000.0)).getStr()
+ : pDuration,
+ XML_autoRev, bAutoReverse ? "1" : nullptr, XML_restart, pRestart, XML_nodeType, pNodeType,
+ XML_fill, pFill, XML_presetClass, pPresetClass, XML_presetID,
+ bPresetId ? OString::number(nPresetId).getStr() : nullptr, XML_presetSubtype,
+ bPresetSubType ? OString::number(nPresetSubType).getStr() : nullptr);
WriteAnimationCondList(mpContext->getCondition(true), XML_stCondLst);
WriteAnimationCondList(mpContext->getCondition(false), XML_endCondLst);
@@ -1057,9 +1060,9 @@ void PPTXAnimationExport::WriteAnimationNodeCommonPropsStart()
{
const char* sType = convertTextAnimationType(xIterate->getIterateType());
- mpFS->startElementNS(XML_p, XML_iterate, XML_type, sType, FSEND);
+ mpFS->startElementNS(XML_p, XML_iterate, XML_type, sType);
mpFS->singleElementNS(XML_p, XML_tmAbs, XML_val,
- I32S(xIterate->getIterateInterval() * 1000), FSEND);
+ OString::number(xIterate->getIterateInterval() * 1000));
mpFS->endElementNS(XML_p, XML_iterate);
}
}
@@ -1067,7 +1070,7 @@ void PPTXAnimationExport::WriteAnimationNodeCommonPropsStart()
const std::vector<NodeContextPtr>& aChildNodes = mpContext->getChildNodes();
if (!aChildNodes.empty())
{
- mpFS->startElementNS(XML_p, XML_childTnLst, FSEND);
+ mpFS->startElementNS(XML_p, XML_childTnLst);
for (const NodeContextPtr& pChildContext : aChildNodes)
{
if (pChildContext->isValid())
@@ -1082,7 +1085,7 @@ void PPTXAnimationExport::WriteAnimationNodeSeq()
{
SAL_INFO("sd.eppt", "write animation node SEQ");
- mpFS->startElementNS(XML_p, XML_seq, FSEND);
+ mpFS->startElementNS(XML_p, XML_seq);
WriteAnimationNodeCommonPropsStart();
@@ -1101,8 +1104,7 @@ void PPTXAnimationExport::WriteAnimationNodeEffect()
const char* pFilter = ::ppt::AnimationExporter::FindTransitionName(
xFilter->getTransition(), xFilter->getSubtype(), xFilter->getDirection());
const char* pMode = xFilter->getMode() ? "in" : "out";
- mpFS->startElementNS(XML_p, XML_animEffect, XML_filter, pFilter, XML_transition, pMode,
- FSEND);
+ mpFS->startElementNS(XML_p, XML_animEffect, XML_filter, pFilter, XML_transition, pMode);
WriteAnimationNodeAnimateInside(false);
@@ -1139,10 +1141,10 @@ void PPTXAnimationExport::WriteAnimationNodeCommand()
break;
}
- mpFS->startElementNS(XML_p, XML_cmd, XML_type, pType, XML_cmd, pCommand, FSEND);
+ mpFS->startElementNS(XML_p, XML_cmd, XML_type, pType, XML_cmd, pCommand);
WriteAnimationNodeAnimateInside(false);
- mpFS->startElementNS(XML_p, XML_cBhvr, FSEND);
+ mpFS->startElementNS(XML_p, XML_cBhvr);
WriteAnimationNodeCommonPropsStart();
WriteAnimationTarget(xCommand->getTarget());
mpFS->endElementNS(XML_p, XML_cBhvr);
@@ -1165,18 +1167,18 @@ void PPTXAnimationExport::WriteAnimationNodeAudio()
mrPowerPointExport.embedEffectAudio(mpFS, sUrl, sRelId, sName);
- mpFS->startElementNS(XML_p, XML_audio, FSEND);
- mpFS->startElementNS(XML_p, XML_cMediaNode, FSEND);
+ mpFS->startElementNS(XML_p, XML_audio);
+ mpFS->startElementNS(XML_p, XML_cMediaNode);
- mpFS->startElementNS(XML_p, XML_cTn, FSEND);
+ mpFS->startElementNS(XML_p, XML_cTn);
WriteAnimationCondList(mpContext->getCondition(true), XML_stCondLst);
WriteAnimationCondList(mpContext->getCondition(false), XML_endCondLst);
mpFS->endElementNS(XML_p, XML_cTn);
- mpFS->startElementNS(XML_p, XML_tgtEl, FSEND);
+ mpFS->startElementNS(XML_p, XML_tgtEl);
mpFS->singleElementNS(XML_p, XML_sndTgt, FSNS(XML_r, XML_embed),
sRelId.isEmpty() ? nullptr : sRelId.toUtf8().getStr(), XML_name,
- sUrl.isEmpty() ? nullptr : sName.toUtf8().getStr(), FSEND);
+ sUrl.isEmpty() ? nullptr : sName.toUtf8().getStr());
mpFS->endElementNS(XML_p, XML_tgtEl);
mpFS->endElementNS(XML_p, XML_cMediaNode);
@@ -1196,7 +1198,7 @@ void PPTXAnimationExport::WriteAnimationNode(const NodeContextPtr& pContext)
switch (xmlNodeType)
{
case XML_par:
- mpFS->startElementNS(XML_p, xmlNodeType, FSEND);
+ mpFS->startElementNS(XML_p, xmlNodeType);
WriteAnimationNodeCommonPropsStart();
mpFS->endElementNS(XML_p, xmlNodeType);
break;
@@ -1249,8 +1251,8 @@ void PPTXAnimationExport::WriteAnimations(const Reference<XDrawPage>& rXDrawPage
auto pNodeContext = std::make_unique<NodeContext>(xNode, false, false);
if (pNodeContext->isValid())
{
- mpFS->startElementNS(XML_p, XML_timing, FSEND);
- mpFS->startElementNS(XML_p, XML_tnLst, FSEND);
+ mpFS->startElementNS(XML_p, XML_timing);
+ mpFS->startElementNS(XML_p, XML_tnLst);
WriteAnimationNode(pNodeContext);
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index cdc452b7c31d..abe09c4a8964 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -120,11 +120,11 @@ namespace
{
void WriteSndAc(const FSHelperPtr& pFS, const OUString& sSoundRelId, const OUString& sSoundName)
{
- pFS->startElementNS(XML_p, XML_sndAc, FSEND);
- pFS->startElementNS(XML_p, XML_stSnd, FSEND);
+ pFS->startElementNS(XML_p, XML_sndAc);
+ pFS->startElementNS(XML_p, XML_stSnd);
pFS->singleElementNS(XML_p, XML_snd,
FSNS(XML_r, XML_embed), sSoundRelId.isEmpty() ? nullptr : sSoundRelId.toUtf8().getStr(),
- XML_name, sSoundName.isEmpty() ? nullptr : sSoundName.toUtf8().getStr(), FSEND);
+ XML_name, sSoundName.isEmpty() ? nullptr : sSoundName.toUtf8().getStr());
pFS->endElement(FSNS(XML_p, XML_stSnd));
pFS->endElement(FSNS(XML_p, XML_sndAc));
}
@@ -244,7 +244,7 @@ void PowerPointShapeExport::SetPageType(PageType ePageType)
ShapeExport& PowerPointShapeExport::WriteNonVisualProperties(const Reference< XShape >&)
{
- GetFS()->singleElementNS(XML_p, XML_nvPr, FSEND);
+ GetFS()->singleElementNS(XML_p, XML_nvPr);
return *this;
}
@@ -415,7 +415,7 @@ bool PowerPointExport::exportDocument()
oox::getRelationship(Relationship::THEME),
"theme/theme1.xml");
- mPresentationFS->startElementNS(XML_p, XML_presentation, PNMSS, FSEND);
+ mPresentationFS->startElementNS(XML_p, XML_presentation, PNMSS);
mXStatusIndicator.set(getStatusIndicator(), UNO_QUERY);
@@ -428,14 +428,12 @@ bool PowerPointExport::exportDocument()
exportPPT(aProperties);
mPresentationFS->singleElementNS(XML_p, XML_sldSz,
- XML_cx, IS(PPTtoEMU(maDestPageSize.Width)),
- XML_cy, IS(PPTtoEMU(maDestPageSize.Height)),
- FSEND);
+ XML_cx, OString::number(PPTtoEMU(maDestPageSize.Width)),
+ XML_cy, OString::number(PPTtoEMU(maDestPageSize.Height)));
// for some reason if added before slides list it will not load the slides (alas with error reports) in mso
mPresentationFS->singleElementNS(XML_p, XML_notesSz,
- XML_cx, IS(PPTtoEMU(maNotesPageSize.Width)),
- XML_cy, IS(PPTtoEMU(maNotesPageSize.Height)),
- FSEND);
+ XML_cx, OString::number(PPTtoEMU(maNotesPageSize.Width)),
+ XML_cy, OString::number(PPTtoEMU(maNotesPageSize.Height)));
WriteAuthors();
@@ -470,8 +468,8 @@ void PowerPointExport::ImplWriteBackground(const FSHelperPtr& pFS, const Referen
aFillStyle == FillStyle_HATCH)
return;
- pFS->startElementNS(XML_p, XML_bg, FSEND);
- pFS->startElementNS(XML_p, XML_bgPr, FSEND);
+ pFS->startElementNS(XML_p, XML_bg);
+ pFS->startElementNS(XML_p, XML_bgPr);
PowerPointShapeExport aDML(pFS, &maShapeMap, this);
aDML.SetBackgroundDark(mbIsBackgroundDark);
@@ -833,36 +831,31 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
{
const char* pRequiresNS = (nTransition14 || isTransitionDurationSet) ? "p14" : "p15";
- pFS->startElement(FSNS(XML_mc, XML_AlternateContent), FSEND);
- pFS->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, pRequiresNS, FSEND);
+ pFS->startElement(FSNS(XML_mc, XML_AlternateContent));
+ pFS->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, pRequiresNS);
if(isTransitionDurationSet && isAdvanceTimingSet)
{
pFS->startElementNS(XML_p, XML_transition,
XML_spd, speed,
- XML_advTm, I32S(advanceTiming * 1000),
- FSNS(XML_p14, XML_dur), I32S(nTransitionDuration),
- FSEND);
+ XML_advTm, OString::number(advanceTiming * 1000),
+ FSNS(XML_p14, XML_dur), OString::number(nTransitionDuration));
}
else if(isTransitionDurationSet)
{
pFS->startElementNS(XML_p, XML_transition,
XML_spd, speed,
- FSNS(XML_p14, XML_dur), I32S(nTransitionDuration),
- FSEND);
+ FSNS(XML_p14, XML_dur), OString::number(nTransitionDuration));
}
else if(isAdvanceTimingSet)
{
pFS->startElementNS(XML_p, XML_transition,
XML_spd, speed,
- XML_advTm, I32S(advanceTiming * 1000),
- FSEND);
+ XML_advTm, OString::number(advanceTiming * 1000));
}
else
{
- pFS->startElementNS(XML_p, XML_transition,
- XML_spd, speed,
- FSEND);
+ pFS->startElementNS(XML_p, XML_transition, XML_spd, speed);
}
if (nTransition14)
@@ -870,14 +863,12 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
pFS->singleElementNS(XML_p14, nTransition14,
XML_isInverted, pInverted,
XML_dir, pDirection14,
- XML_pattern, pPattern,
- FSEND);
+ XML_pattern, pPattern);
}
else if (pPresetTransition)
{
pFS->singleElementNS(XML_p15, XML_prstTrans,
- XML_prst, pPresetTransition,
- FSEND);
+ XML_prst, pPresetTransition);
}
else if (isTransitionDurationSet && nTransition)
{
@@ -885,8 +876,7 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
XML_dir, pDirection,
XML_orient, pOrientation,
XML_spokes, pSpokes,
- XML_thruBlk, pThruBlk,
- FSEND);
+ XML_thruBlk, pThruBlk);
}
if (!sSoundRelId.isEmpty())
@@ -895,13 +885,12 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
pFS->endElement(FSNS(XML_p, XML_transition));
pFS->endElement(FSNS(XML_mc, XML_Choice));
- pFS->startElement(FSNS(XML_mc, XML_Fallback), FSEND);
+ pFS->startElement(FSNS(XML_mc, XML_Fallback));
}
pFS->startElementNS(XML_p, XML_transition,
XML_spd, speed,
- XML_advTm, isAdvanceTimingSet ? I32S(advanceTiming * 1000) : nullptr,
- FSEND);
+ XML_advTm, isAdvanceTimingSet ? OString::number(advanceTiming * 1000).getStr() : nullptr);
if (nTransition)
{
@@ -909,8 +898,7 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
XML_dir, pDirection,
XML_orient, pOrientation,
XML_spokes, pSpokes,
- XML_thruBlk, pThruBlk,
- FSEND);
+ XML_thruBlk, pThruBlk);
}
if (!sSoundRelId.isEmpty())
@@ -957,18 +945,16 @@ void PowerPointExport::WriteAuthors()
"commentAuthors.xml");
pFS->startElementNS(XML_p, XML_cmAuthorLst,
- FSNS(XML_xmlns, XML_p), OUStringToOString(this->getNamespaceURL(OOX_NS(ppt)), RTL_TEXTENCODING_UTF8),
- FSEND);
+ FSNS(XML_xmlns, XML_p), this->getNamespaceURL(OOX_NS(ppt)).toUtf8());
for (const AuthorsMap::value_type& i : maAuthors)
{
pFS->singleElementNS(XML_p, XML_cmAuthor,
- XML_id, I32S(i.second.nId),
+ XML_id, OString::number(i.second.nId),
XML_name, i.first.toUtf8(),
XML_initials, lcl_GetInitials(i.first).toUtf8(),
- XML_lastIdx, I32S(i.second.nLastIndex),
- XML_clrIdx, I32S(i.second.nId),
- FSEND);
+ XML_lastIdx, OString::number(i.second.nLastIndex),
+ XML_clrIdx, OString::number(i.second.nId));
}
pFS->endElementNS(XML_p, XML_cmAuthorLst);
@@ -1008,8 +994,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), OUStringToOString(this->getNamespaceURL(OOX_NS(ppt)), RTL_TEXTENCODING_UTF8),
- FSEND);
+ FSNS(XML_xmlns, XML_p), this->getNamespaceURL(OOX_NS(ppt)).toUtf8());
do
{
@@ -1025,18 +1010,15 @@ bool PowerPointExport::WriteComments(sal_uInt32 nPageNum)
snprintf(cDateTime, sizeof cDateTime, "%02" SAL_PRIdINT32 "-%02" SAL_PRIuUINT32 "-%02" SAL_PRIuUINT32 "T%02" SAL_PRIuUINT32 ":%02" SAL_PRIuUINT32 ":%02" SAL_PRIuUINT32 ".%09" SAL_PRIuUINT32, sal_Int32(aDateTime.Year), sal_uInt32(aDateTime.Month), sal_uInt32(aDateTime.Day), sal_uInt32(aDateTime.Hours), sal_uInt32(aDateTime.Minutes), sal_uInt32(aDateTime.Seconds), aDateTime.NanoSeconds);
pFS->startElementNS(XML_p, XML_cm,
- XML_authorId, I32S(nId),
+ XML_authorId, OString::number(nId),
XML_dt, cDateTime,
- XML_idx, I32S(nLastIndex),
- FSEND);
+ XML_idx, OString::number(nLastIndex));
pFS->singleElementNS(XML_p, XML_pos,
- XML_x, I64S(static_cast<sal_Int64>((57600*aRealPoint2D.X + 1270)/2540.0)),
- XML_y, I64S(static_cast<sal_Int64>((57600*aRealPoint2D.Y + 1270)/2540.0)),
- FSEND);
+ XML_x, OString::number(static_cast<sal_Int64>((57600*aRealPoint2D.X + 1270)/2540.0)),
+ XML_y, OString::number(static_cast<sal_Int64>((57600*aRealPoint2D.Y + 1270)/2540.0)));
- pFS->startElementNS(XML_p, XML_text,
- FSEND);
+ pFS->startElementNS(XML_p, XML_text);
pFS->write(xText->getString());
pFS->endElementNS(XML_p, XML_text);
@@ -1087,7 +1069,7 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
// slides list
if (nPageNum == 0)
- mPresentationFS->startElementNS(XML_p, XML_sldIdLst, FSEND);
+ mPresentationFS->startElementNS(XML_p, XML_sldIdLst);
// add explicit relation of presentation to this slide
OUString sRelId = addRelation(mPresentationFS->getOutputStream(),
@@ -1099,9 +1081,8 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
.makeStringAndClear());
mPresentationFS->singleElementNS(XML_p, XML_sldId,
- XML_id, I32S(GetNewSlideId()),
- FSNS(XML_r, XML_id), sRelId.toUtf8(),
- FSEND);
+ XML_id, OString::number(GetNewSlideId()),
+ FSNS(XML_r, XML_id), sRelId.toUtf8());
if (nPageNum == mnPages - 1)
mPresentationFS->endElementNS(XML_p, XML_sldIdLst);
@@ -1126,11 +1107,9 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
pShow = "0";
}
- pFS->startElementNS(XML_p, XML_sld, PNMSS,
- XML_show, pShow,
- FSEND);
+ pFS->startElementNS(XML_p, XML_sld, PNMSS, XML_show, pShow);
- pFS->startElementNS(XML_p, XML_cSld, FSEND);
+ pFS->startElementNS(XML_p, XML_cSld);
// background
if (bHasBackground)
@@ -1183,9 +1162,9 @@ void PowerPointExport::ImplWriteNotes(sal_uInt32 nPageNum)
.makeStringAndClear(),
"application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml");
- pFS->startElementNS(XML_p, XML_notes, PNMSS, FSEND);
+ pFS->startElementNS(XML_p, XML_notes, PNMSS);
- pFS->startElementNS(XML_p, XML_cSld, FSEND);
+ pFS->startElementNS(XML_p, XML_cSld);
WriteShapeTree(pFS, NOTICE, false);
@@ -1232,9 +1211,8 @@ void PowerPointExport::AddLayoutIdAndRelation(const FSHelperPtr& pFS, sal_Int32
.makeStringAndClear());
pFS->singleElementNS(XML_p, XML_sldLayoutId,
- XML_id, I64S(GetNewSlideMasterId()),
- FSNS(XML_r, XML_id), sRelId.toUtf8(),
- FSEND);
+ XML_id, OString::number(GetNewSlideMasterId()),
+ FSNS(XML_r, XML_id), sRelId.toUtf8());
}
void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPropertySet > const& aXBackgroundPropSet)
@@ -1243,7 +1221,7 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro
// slides list
if (nPageNum == 0)
- mPresentationFS->startElementNS(XML_p, XML_sldMasterIdLst, FSEND);
+ mPresentationFS->startElementNS(XML_p, XML_sldMasterIdLst);
OUString sRelId = addRelation(mPresentationFS->getOutputStream(),
oox::getRelationship(Relationship::SLIDEMASTER),
@@ -1254,9 +1232,8 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro
.makeStringAndClear());
mPresentationFS->singleElementNS(XML_p, XML_sldMasterId,
- XML_id, OString::number(GetNewSlideMasterId()).getStr(),
- FSNS(XML_r, XML_id), sRelId.toUtf8(),
- FSEND);
+ XML_id, OString::number(GetNewSlideMasterId()),
+ FSNS(XML_r, XML_id), sRelId.toUtf8());
if (nPageNum == mnMasterPages - 1)
mPresentationFS->endElementNS(XML_p, XML_sldMasterIdLst);
@@ -1281,9 +1258,9 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro
.append(".xml")
.makeStringAndClear());
- pFS->startElementNS(XML_p, XML_sldMaster, PNMSS, FSEND);
+ pFS->startElementNS(XML_p, XML_sldMaster, PNMSS);
- pFS->startElementNS(XML_p, XML_cSld, FSEND);
+ pFS->startElementNS(XML_p, XML_cSld);
ImplWriteBackground(pFS, aXBackgroundPropSet);
WriteShapeTree(pFS, MASTER, true);
@@ -1303,11 +1280,10 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro
XML_accent5, "accent5",
XML_accent6, "accent6",
XML_hlink, "hlink",
- XML_folHlink, "folHlink",
- FSEND);
+ XML_folHlink, "folHlink");
// use master's id type as they have same range, mso does that as well
- pFS->startElementNS(XML_p, XML_sldLayoutIdLst, FSEND);
+ pFS->startElementNS(XML_p, XML_sldLayoutIdLst);
for (int i = 0; i < LAYOUT_SIZE; i++)
{
@@ -1391,12 +1367,10 @@ void PowerPointExport::ImplWritePPTXLayout(sal_Int32 nOffset, sal_uInt32 nMaster
pFS->startElementNS(XML_p, XML_sldLayout,
PNMSS,
XML_type, aLayoutInfo[ nOffset ].sType,
- XML_preserve, "1",
- FSEND);
+ XML_preserve, "1");
pFS->startElementNS(XML_p, XML_cSld,
- XML_name, aLayoutInfo[ nOffset ].sName,
- FSEND);
+ XML_name, aLayoutInfo[ nOffset ].sName);
//pFS->write( MINIMAL_SPTREE ); // TODO: write actual shape tree
WriteShapeTree(pFS, LAYOUT, true);
@@ -1418,7 +1392,7 @@ void PowerPointExport::WriteShapeTree(const FSHelperPtr& pFS, PageType ePageType
aDML.SetPageType(ePageType);
aDML.SetBackgroundDark(mbIsBackgroundDark);
- pFS->startElementNS(XML_p, XML_spTree, FSEND);
+ pFS->startElementNS(XML_p, XML_spTree);
pFS->write(MAIN_GROUP);
ResetGroupTable(mXShapes->getCount());
@@ -1468,16 +1442,16 @@ bool PowerPointShapeExport::WritePlaceholder(const Reference< XShape >& xShape,
ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShape >& xShape, PlaceholderType ePlaceholder)
{
- mpFS->startElementNS(XML_p, XML_sp, FSEND);
+ mpFS->startElementNS(XML_p, XML_sp);
// non visual shape properties
- mpFS->startElementNS(XML_p, XML_nvSpPr, FSEND);
+ mpFS->startElementNS(XML_p, XML_nvSpPr);
const OString aPlaceholderID("PlaceHolder " + OString::number(mnShapeIdMax++));
WriteNonVisualDrawingProperties(xShape, aPlaceholderID.getStr());
- mpFS->startElementNS(XML_p, XML_cNvSpPr, FSEND);
- mpFS->singleElementNS(XML_a, XML_spLocks, XML_noGrp, "1", FSEND);
+ mpFS->startElementNS(XML_p, XML_cNvSpPr);
+ mpFS->singleElementNS(XML_a, XML_spLocks, XML_noGrp, "1");
mpFS->endElementNS(XML_p, XML_cNvSpPr);
- mpFS->startElementNS(XML_p, XML_nvPr, FSEND);
+ mpFS->startElementNS(XML_p, XML_nvPr);
const char* pType = nullptr;
switch (ePlaceholder)
@@ -1513,12 +1487,12 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap
SAL_INFO("sd.eppt", "warning: unhandled placeholder type: " << ePlaceholder);
}
SAL_INFO("sd.eppt", "write placeholder " << pType);
- mpFS->singleElementNS(XML_p, XML_ph, XML_type, pType, FSEND);
+ mpFS->singleElementNS(XML_p, XML_ph, XML_type, pType);
mpFS->endElementNS(XML_p, XML_nvPr);
mpFS->endElementNS(XML_p, XML_nvSpPr);
// visual shape properties
- mpFS->startElementNS(XML_p, XML_spPr, FSEND);
+ mpFS->startElementNS(XML_p, XML_spPr);
WriteShapeTransformation(xShape, XML_a);
WritePresetShape("rect");
Reference< XPropertySet > xProps(xShape, UNO_QUERY);
@@ -1767,7 +1741,7 @@ void PowerPointExport::WriteDefaultColorSchemes(const FSHelperPtr& pFS)
.makeStringAndClear();
pFS->write(sOpenColorScheme);
- pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nColor), FSEND);
+ pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nColor));
OUString sCloseColorScheme = OUStringBuffer()
.append("</a:")
@@ -1820,7 +1794,7 @@ bool PowerPointExport::WriteColorSchemes(const FSHelperPtr& pFS, const OUString&
.makeStringAndClear();
pFS->write(sOpenColorScheme);
- pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nColor), FSEND);
+ pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nColor));
OUString sCloseColorScheme = OUStringBuffer()
.append("</a:")
@@ -1855,12 +1829,11 @@ void PowerPointExport::WriteTheme(sal_Int32 nThemeNum)
"application/vnd.openxmlformats-officedocument.theme+xml");
pFS->startElementNS(XML_a, XML_theme,
- FSNS(XML_xmlns, XML_a), OUStringToOString(this->getNamespaceURL(OOX_NS(dml)), RTL_TEXTENCODING_UTF8),
- XML_name, "Office Theme",
- FSEND);
+ FSNS(XML_xmlns, XML_a), this->getNamespaceURL(OOX_NS(dml)).toUtf8(),
+ XML_name, "Office Theme");
- pFS->startElementNS(XML_a, XML_themeElements, FSEND);
- pFS->startElementNS(XML_a, XML_clrScheme, XML_name, "Office", FSEND);
+ pFS->startElementNS(XML_a, XML_themeElements);
+ pFS->startElementNS(XML_a, XML_clrScheme, XML_name, "Office");
pFS->write(SYS_COLOR_SCHEMES);
@@ -1906,15 +1879,14 @@ void PowerPointExport::WriteNotesMaster()
{
SAL_INFO("sd.eppt", "write Notes master\n---------------");
- mPresentationFS->startElementNS(XML_p, XML_notesMasterIdLst, FSEND);
+ mPresentationFS->startElementNS(XML_p, XML_notesMasterIdLst);
OUString sRelId = addRelation(mPresentationFS->getOutputStream(),
oox::getRelationship(Relationship::NOTESMASTER),
"notesMasters/notesMaster1.xml");
mPresentationFS->singleElementNS(XML_p, XML_notesMasterId,
- FSNS(XML_r, XML_id), sRelId.toUtf8(),
- FSEND);
+ FSNS(XML_r, XML_id), sRelId.toUtf8());
mPresentationFS->endElementNS(XML_p, XML_notesMasterIdLst);
@@ -1933,9 +1905,9 @@ void PowerPointExport::WriteNotesMaster()
.append(".xml")
.makeStringAndClear());
- pFS->startElementNS(XML_p, XML_notesMaster, PNMSS, FSEND);
+ pFS->startElementNS(XML_p, XML_notesMaster, PNMSS);
- pFS->startElementNS(XML_p, XML_cSld, FSEND);
+ pFS->startElementNS(XML_p, XML_cSld);
Reference< XPropertySet > aXBackgroundPropSet;
if (ImplGetPropertyValue(mXPagePropSet, "Background") &&
@@ -1959,8 +1931,7 @@ void PowerPointExport::WriteNotesMaster()
XML_accent5, "accent5",
XML_accent6, "accent6",
XML_hlink, "hlink",
- XML_folHlink, "folHlink",
- FSEND);
+ XML_folHlink, "folHlink");
pFS->endElementNS(XML_p, XML_notesMaster);
@@ -2038,7 +2009,7 @@ OUString PowerPointExport::getImplementationName()
void PowerPointExport::WriteDiagram(const FSHelperPtr& pFS, PowerPointShapeExport& rDML, const css::uno::Reference<css::drawing::XShape>& rXShape, int nDiagramId)
{
SAL_INFO("sd.eppt", "writing Diagram " + OUString::number(nDiagramId));
- pFS->startElementNS(XML_p, XML_graphicFrame, FSEND);
+ pFS->startElementNS(XML_p, XML_graphicFrame);
rDML.WriteDiagram(rXShape, nDiagramId);
pFS->endElementNS(XML_p, XML_graphicFrame);
}
diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index b73068ee8ccf..2d5a8e6253ca 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -31,7 +31,7 @@ void SmOoxmlExport::ConvertFromStarMath( const ::sax_fastparser::FSHelperPtr& se
return;
m_pSerializer = serializer;
m_pSerializer->startElementNS( XML_m, XML_oMath,
- FSNS( XML_xmlns, XML_m ), "http://schemas.openxmlformats.org/officeDocument/2006/math", FSEND );
+ FSNS( XML_xmlns, XML_m ), "http://schemas.openxmlformats.org/officeDocument/2006/math" );
HandleNode( m_pTree, 0 );
m_pSerializer->endElementNS( XML_m, XML_oMath );
}
@@ -41,13 +41,13 @@ void SmOoxmlExport::ConvertFromStarMath( const ::sax_fastparser::FSHelperPtr& se
void SmOoxmlExport::HandleVerticalStack( const SmNode* pNode, int nLevel )
{
- m_pSerializer->startElementNS( XML_m, XML_eqArr, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_eqArr);
int size = pNode->GetNumSubNodes();
for( int i = 0;
i < size;
++i )
{
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( pNode->GetSubNode( i ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_e );
}
@@ -56,23 +56,23 @@ void SmOoxmlExport::HandleVerticalStack( const SmNode* pNode, int nLevel )
void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/)
{
- m_pSerializer->startElementNS( XML_m, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_r);
if( pNode->GetToken().eType == TTEXT ) // literal text (in quotes)
{
- m_pSerializer->startElementNS( XML_m, XML_rPr, FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_lit, FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_nor, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_rPr);
+ m_pSerializer->singleElementNS(XML_m, XML_lit);
+ m_pSerializer->singleElementNS(XML_m, XML_nor);
m_pSerializer->endElementNS( XML_m, XML_rPr );
}
if (drawingml::DOCUMENT_DOCX == m_DocumentType && ECMA_DIALECT == version)
{ // HACK: MSOffice2007 does not import characters properly unless this font is explicitly given
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
m_pSerializer->singleElementNS( XML_w, XML_rFonts, FSNS( XML_w, XML_ascii ), "Cambria Math",
- FSNS( XML_w, XML_hAnsi ), "Cambria Math", FSEND );
+ FSNS( XML_w, XML_hAnsi ), "Cambria Math" );
m_pSerializer->endElementNS( XML_w, XML_rPr );
}
- m_pSerializer->startElementNS( XML_m, XML_t, FSNS( XML_xml, XML_space ), "preserve", FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_t, FSNS(XML_xml, XML_space), "preserve");
const SmTextNode* pTemp = static_cast<const SmTextNode* >(pNode);
SAL_INFO( "starmath.ooxml", "Text:" << pTemp->GetText());
OUStringBuffer buf(pTemp->GetText());
@@ -133,18 +133,18 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/)
void SmOoxmlExport::HandleFractions( const SmNode* pNode, int nLevel, const char* type )
{
- m_pSerializer->startElementNS( XML_m, XML_f, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_f);
if( type != nullptr )
{
- m_pSerializer->startElementNS( XML_m, XML_fPr, FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_type, FSNS( XML_m, XML_val ), type, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_fPr);
+ m_pSerializer->singleElementNS(XML_m, XML_type, FSNS(XML_m, XML_val), type);
m_pSerializer->endElementNS( XML_m, XML_fPr );
}
assert( pNode->GetNumSubNodes() == 3 );
- m_pSerializer->startElementNS( XML_m, XML_num, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_num);
HandleNode( pNode->GetSubNode( 0 ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_num );
- m_pSerializer->startElementNS( XML_m, XML_den, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_den);
HandleNode( pNode->GetSubNode( 2 ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_den );
m_pSerializer->endElementNS( XML_m, XML_f );
@@ -170,13 +170,13 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* pNode, int nLevel )
case TWIDEVEC:
case TBAR:
{
- m_pSerializer->startElementNS( XML_m, XML_acc, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_accPr, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_acc);
+ m_pSerializer->startElementNS(XML_m, XML_accPr);
OString value = OUStringToOString(
OUString( pNode->Attribute()->GetToken().cMathChar ), RTL_TEXTENCODING_UTF8 );
- m_pSerializer->singleElementNS( XML_m, XML_chr, FSNS( XML_m, XML_val ), value.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_m, XML_chr, FSNS(XML_m, XML_val), value);
m_pSerializer->endElementNS( XML_m, XML_accPr );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( pNode->Body(), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_e );
m_pSerializer->endElementNS( XML_m, XML_acc );
@@ -184,26 +184,26 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* pNode, int nLevel )
}
case TOVERLINE:
case TUNDERLINE:
- m_pSerializer->startElementNS( XML_m, XML_bar, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_barPr, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_bar);
+ m_pSerializer->startElementNS(XML_m, XML_barPr);
m_pSerializer->singleElementNS( XML_m, XML_pos, FSNS( XML_m, XML_val ),
- ( pNode->Attribute()->GetToken().eType == TUNDERLINE ) ? "bot" : "top", FSEND );
+ ( pNode->Attribute()->GetToken().eType == TUNDERLINE ) ? "bot" : "top" );
m_pSerializer->endElementNS( XML_m, XML_barPr );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( pNode->Body(), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_e );
m_pSerializer->endElementNS( XML_m, XML_bar );
break;
case TOVERSTRIKE:
- m_pSerializer->startElementNS( XML_m, XML_borderBox, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_borderBoxPr, FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_hideTop, FSNS( XML_m, XML_val ), "1", FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_hideBot, FSNS( XML_m, XML_val ), "1", FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_hideLeft, FSNS( XML_m, XML_val ), "1", FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_hideRight, FSNS( XML_m, XML_val ), "1", FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_strikeH, FSNS( XML_m, XML_val ), "1", FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_borderBox);
+ m_pSerializer->startElementNS(XML_m, XML_borderBoxPr);
+ m_pSerializer->singleElementNS(XML_m, XML_hideTop, FSNS(XML_m, XML_val), "1");
+ m_pSerializer->singleElementNS(XML_m, XML_hideBot, FSNS(XML_m, XML_val), "1");
+ m_pSerializer->singleElementNS(XML_m, XML_hideLeft, FSNS(XML_m, XML_val), "1");
+ m_pSerializer->singleElementNS(XML_m, XML_hideRight, FSNS(XML_m, XML_val), "1");
+ m_pSerializer->singleElementNS(XML_m, XML_strikeH, FSNS(XML_m, XML_val), "1");
m_pSerializer->endElementNS( XML_m, XML_borderBoxPr );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( pNode->Body(), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_e );
m_pSerializer->endElementNS( XML_m, XML_borderBox );
@@ -216,21 +216,21 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* pNode, int nLevel )
void SmOoxmlExport::HandleRoot( const SmRootNode* pNode, int nLevel )
{
- m_pSerializer->startElementNS( XML_m, XML_rad, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_rad);
if( const SmNode* argument = pNode->Argument())
{
- m_pSerializer->startElementNS( XML_m, XML_deg, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_deg);
HandleNode( argument, nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_deg );
}
else
{
- m_pSerializer->startElementNS( XML_m, XML_radPr, FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_degHide, FSNS( XML_m, XML_val ), "1", FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_radPr);
+ m_pSerializer->singleElementNS(XML_m, XML_degHide, FSNS(XML_m, XML_val), "1");
m_pSerializer->endElementNS( XML_m, XML_radPr );
- m_pSerializer->singleElementNS( XML_m, XML_deg, FSEND ); // empty but present
+ m_pSerializer->singleElementNS(XML_m, XML_deg); // empty but present
}
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( pNode->Body(), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_e );
m_pSerializer->endElementNS( XML_m, XML_rad );
@@ -264,45 +264,45 @@ void SmOoxmlExport::HandleOperator( const SmOperNode* pNode, int nLevel )
const SmSubSupNode* subsup = pNode->GetSubNode( 0 )->GetType() == SmNodeType::SubSup
? static_cast< const SmSubSupNode* >( pNode->GetSubNode( 0 )) : nullptr;
const SmNode* operation = subsup != nullptr ? subsup->GetBody() : pNode->GetSubNode( 0 );
- m_pSerializer->startElementNS( XML_m, XML_nary, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_naryPr, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_nary);
+ m_pSerializer->startElementNS(XML_m, XML_naryPr);
m_pSerializer->singleElementNS( XML_m, XML_chr,
- FSNS( XML_m, XML_val ), mathSymbolToString( operation ).getStr(), FSEND );
+ FSNS( XML_m, XML_val ), mathSymbolToString(operation) );
if( subsup == nullptr || subsup->GetSubSup( CSUB ) == nullptr )
- m_pSerializer->singleElementNS( XML_m, XML_subHide, FSNS( XML_m, XML_val ), "1", FSEND );
+ m_pSerializer->singleElementNS(XML_m, XML_subHide, FSNS(XML_m, XML_val), "1");
if( subsup == nullptr || subsup->GetSubSup( CSUP ) == nullptr )
- m_pSerializer->singleElementNS( XML_m, XML_supHide, FSNS( XML_m, XML_val ), "1", FSEND );
+ m_pSerializer->singleElementNS(XML_m, XML_supHide, FSNS(XML_m, XML_val), "1");
m_pSerializer->endElementNS( XML_m, XML_naryPr );
if( subsup == nullptr || subsup->GetSubSup( CSUB ) == nullptr )
- m_pSerializer->singleElementNS( XML_m, XML_sub, FSEND );
+ m_pSerializer->singleElementNS(XML_m, XML_sub);
else
{
- m_pSerializer->startElementNS( XML_m, XML_sub, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sub);
HandleNode( subsup->GetSubSup( CSUB ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_sub );
}
if( subsup == nullptr || subsup->GetSubSup( CSUP ) == nullptr )
- m_pSerializer->singleElementNS( XML_m, XML_sup, FSEND );
+ m_pSerializer->singleElementNS(XML_m, XML_sup);
else
{
- m_pSerializer->startElementNS( XML_m, XML_sup, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sup);
HandleNode( subsup->GetSubSup( CSUP ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_sup );
}
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( pNode->GetSubNode( 1 ), nLevel + 1 ); // body
m_pSerializer->endElementNS( XML_m, XML_e );
m_pSerializer->endElementNS( XML_m, XML_nary );
break;
}
case TLIM:
- m_pSerializer->startElementNS( XML_m, XML_func, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_fName, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_limLow, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_func);
+ m_pSerializer->startElementNS(XML_m, XML_fName);
+ m_pSerializer->startElementNS(XML_m, XML_limLow);
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( pNode->GetSymbol(), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_e );
- m_pSerializer->startElementNS( XML_m, XML_lim, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_lim);
if( const SmSubSupNode* subsup = pNode->GetSubNode( 0 )->GetType() == SmNodeType::SubSup
? static_cast< const SmSubSupNode* >( pNode->GetSubNode( 0 )) : nullptr )
{
@@ -312,7 +312,7 @@ void SmOoxmlExport::HandleOperator( const SmOperNode* pNode, int nLevel )
m_pSerializer->endElementNS( XML_m, XML_lim );
m_pSerializer->endElementNS( XML_m, XML_limLow );
m_pSerializer->endElementNS( XML_m, XML_fName );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( pNode->GetSubNode( 1 ), nLevel + 1 ); // body
m_pSerializer->endElementNS( XML_m, XML_e );
m_pSerializer->endElementNS( XML_m, XML_func );
@@ -332,62 +332,62 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n
return;
if(( flags & ( 1 << RSUP | 1 << RSUB )) == ( 1 << RSUP | 1 << RSUB ))
{ // m:sSubSup
- m_pSerializer->startElementNS( XML_m, XML_sSubSup, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sSubSup);
+ m_pSerializer->startElementNS(XML_m, XML_e);
flags &= ~( 1 << RSUP | 1 << RSUB );
if( flags == 0 )
HandleNode( pNode->GetBody(), nLevel + 1 );
else
HandleSubSupScriptInternal( pNode, nLevel, flags );
m_pSerializer->endElementNS( XML_m, XML_e );
- m_pSerializer->startElementNS( XML_m, XML_sub, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sub);
HandleNode( pNode->GetSubSup( RSUB ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_sub );
- m_pSerializer->startElementNS( XML_m, XML_sup, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sup);
HandleNode( pNode->GetSubSup( RSUP ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_sup );
m_pSerializer->endElementNS( XML_m, XML_sSubSup );
}
else if(( flags & ( 1 << RSUB )) == 1 << RSUB )
{ // m:sSub
- m_pSerializer->startElementNS( XML_m, XML_sSub, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sSub);
+ m_pSerializer->startElementNS(XML_m, XML_e);
flags &= ~( 1 << RSUB );
if( flags == 0 )
HandleNode( pNode->GetBody(), nLevel + 1 );
else
HandleSubSupScriptInternal( pNode, nLevel, flags );
m_pSerializer->endElementNS( XML_m, XML_e );
- m_pSerializer->startElementNS( XML_m, XML_sub, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sub);
HandleNode( pNode->GetSubSup( RSUB ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_sub );
m_pSerializer->endElementNS( XML_m, XML_sSub );
}
else if(( flags & ( 1 << RSUP )) == 1 << RSUP )
{ // m:sSup
- m_pSerializer->startElementNS( XML_m, XML_sSup, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sSup);
+ m_pSerializer->startElementNS(XML_m, XML_e);
flags &= ~( 1 << RSUP );
if( flags == 0 )
HandleNode( pNode->GetBody(), nLevel + 1 );
else
HandleSubSupScriptInternal( pNode, nLevel, flags );
m_pSerializer->endElementNS( XML_m, XML_e );
- m_pSerializer->startElementNS( XML_m, XML_sup, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sup);
HandleNode( pNode->GetSubSup( RSUP ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_sup );
m_pSerializer->endElementNS( XML_m, XML_sSup );
}
else if(( flags & ( 1 << LSUP | 1 << LSUB )) == ( 1 << LSUP | 1 << LSUB ))
{ // m:sPre
- m_pSerializer->startElementNS( XML_m, XML_sPre, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_sub, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sPre);
+ m_pSerializer->startElementNS(XML_m, XML_sub);
HandleNode( pNode->GetSubSup( LSUB ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_sub );
- m_pSerializer->startElementNS( XML_m, XML_sup, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_sup);
HandleNode( pNode->GetSubSup( LSUP ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_sup );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
flags &= ~( 1 << LSUP | 1 << LSUB );
if( flags == 0 )
HandleNode( pNode->GetBody(), nLevel + 1 );
@@ -398,30 +398,30 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n
}
else if(( flags & ( 1 << CSUB )) == ( 1 << CSUB ))
{ // m:limLow looks like a good element for central superscript
- m_pSerializer->startElementNS( XML_m, XML_limLow, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_limLow);
+ m_pSerializer->startElementNS(XML_m, XML_e);
flags &= ~( 1 << CSUB );
if( flags == 0 )
HandleNode( pNode->GetBody(), nLevel + 1 );
else
HandleSubSupScriptInternal( pNode, nLevel, flags );
m_pSerializer->endElementNS( XML_m, XML_e );
- m_pSerializer->startElementNS( XML_m, XML_lim, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_lim);
HandleNode( pNode->GetSubSup( CSUB ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_lim );
m_pSerializer->endElementNS( XML_m, XML_limLow );
}
else if(( flags & ( 1 << CSUP )) == ( 1 << CSUP ))
{ // m:limUpp looks like a good element for central superscript
- m_pSerializer->startElementNS( XML_m, XML_limUpp, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_limUpp);
+ m_pSerializer->startElementNS(XML_m, XML_e);
flags &= ~( 1 << CSUP );
if( flags == 0 )
HandleNode( pNode->GetBody(), nLevel + 1 );
else
HandleSubSupScriptInternal( pNode, nLevel, flags );
m_pSerializer->endElementNS( XML_m, XML_e );
- m_pSerializer->startElementNS( XML_m, XML_lim, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_lim);
HandleNode( pNode->GetSubSup( CSUP ), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_lim );
m_pSerializer->endElementNS( XML_m, XML_limUpp );
@@ -436,13 +436,13 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n
void SmOoxmlExport::HandleMatrix( const SmMatrixNode* pNode, int nLevel )
{
- m_pSerializer->startElementNS( XML_m, XML_m, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_m);
for (size_t row = 0; row < pNode->GetNumRows(); ++row)
{
- m_pSerializer->startElementNS( XML_m, XML_mr, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_mr);
for (size_t col = 0; col < pNode->GetNumCols(); ++col)
{
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
if( const SmNode* node = pNode->GetSubNode( row * pNode->GetNumCols() + col ))
HandleNode( node, nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_e );
@@ -454,16 +454,15 @@ void SmOoxmlExport::HandleMatrix( const SmMatrixNode* pNode, int nLevel )
void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, int nLevel )
{
- m_pSerializer->startElementNS( XML_m, XML_d, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_dPr, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_d);
+ m_pSerializer->startElementNS(XML_m, XML_dPr);
//check if the node has an opening brace
if( TNONE == pNode->OpeningBrace()->GetToken().eType )
- m_pSerializer->singleElementNS( XML_m, XML_begChr,
- FSNS( XML_m, XML_val ), "", FSEND );
+ m_pSerializer->singleElementNS(XML_m, XML_begChr, FSNS(XML_m, XML_val), "");
else
m_pSerializer->singleElementNS( XML_m, XML_begChr,
- FSNS( XML_m, XML_val ), mathSymbolToString( pNode->OpeningBrace()).getStr(), FSEND );
+ FSNS( XML_m, XML_val ), mathSymbolToString( pNode->OpeningBrace()) );
std::vector< const SmNode* > subnodes;
if( pNode->Body()->GetType() == SmNodeType::Bracebody )
@@ -479,7 +478,7 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, int nLevel )
if( !separatorWritten )
{
m_pSerializer->singleElementNS( XML_m, XML_sepChr,
- FSNS( XML_m, XML_val ), mathSymbolToString( math ).getStr(), FSEND );
+ FSNS( XML_m, XML_val ), mathSymbolToString(math) );
separatorWritten = true;
}
}
@@ -491,16 +490,15 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, int nLevel )
subnodes.push_back( pNode->Body());
if( TNONE == pNode->ClosingBrace()->GetToken().eType )
- m_pSerializer->singleElementNS( XML_m, XML_endChr,
- FSNS( XML_m, XML_val ), "", FSEND );
+ m_pSerializer->singleElementNS(XML_m, XML_endChr, FSNS(XML_m, XML_val), "");
else
m_pSerializer->singleElementNS( XML_m, XML_endChr,
- FSNS( XML_m, XML_val ), mathSymbolToString( pNode->ClosingBrace()).getStr(), FSEND );
+ FSNS( XML_m, XML_val ), mathSymbolToString(pNode->ClosingBrace()) );
m_pSerializer->endElementNS( XML_m, XML_dPr );
for(const SmNode* subnode : subnodes)
{
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( subnode, nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_e );
}
@@ -516,23 +514,24 @@ void SmOoxmlExport::HandleVerticalBrace( const SmVerticalBraceNode* pNode, int n
case TUNDERBRACE:
{
bool top = ( pNode->GetToken().eType == TOVERBRACE );
- m_pSerializer->startElementNS( XML_m, top ? XML_limUpp : XML_limLow, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_groupChr, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_groupChrPr, FSEND );
+ m_pSerializer->startElementNS(XML_m, top ? XML_limUpp : XML_limLow);
+ m_pSerializer->startElementNS(XML_m, XML_e);
+ m_pSerializer->startElementNS(XML_m, XML_groupChr);
+ m_pSerializer->startElementNS(XML_m, XML_groupChrPr);
m_pSerializer->singleElementNS( XML_m, XML_chr,
- FSNS( XML_m, XML_val ), mathSymbolToString( pNode->Brace()).getStr(), FSEND );
+ FSNS( XML_m, XML_val ), mathSymbolToString(pNode->Brace()) );
// TODO not sure if pos and vertJc are correct
m_pSerializer->singleElementNS( XML_m, XML_pos,
- FSNS( XML_m, XML_val ), top ? "top" : "bot", FSEND );
- m_pSerializer->singleElementNS( XML_m, XML_vertJc, FSNS( XML_m, XML_val ), top ? "bot" : "top", FSEND );
+ FSNS( XML_m, XML_val ), top ? "top" : "bot" );
+ m_pSerializer->singleElementNS(XML_m, XML_vertJc, FSNS(XML_m, XML_val),
+ top ? "bot" : "top");
m_pSerializer->endElementNS( XML_m, XML_groupChrPr );
- m_pSerializer->startElementNS( XML_m, XML_e, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_e);
HandleNode( pNode->Body(), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_e );
m_pSerializer->endElementNS( XML_m, XML_groupChr );
m_pSerializer->endElementNS( XML_m, XML_e );
- m_pSerializer->startElementNS( XML_m, XML_lim, FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_lim);
HandleNode( pNode->Script(), nLevel + 1 );
m_pSerializer->endElementNS( XML_m, XML_lim );
m_pSerializer->endElementNS( XML_m, top ? XML_limUpp : XML_limLow );
@@ -547,8 +546,8 @@ void SmOoxmlExport::HandleVerticalBrace( const SmVerticalBraceNode* pNode, int n
void SmOoxmlExport::HandleBlank()
{
- m_pSerializer->startElementNS( XML_m, XML_r, FSEND );
- m_pSerializer->startElementNS( XML_m, XML_t, FSNS( XML_xml, XML_space ), "preserve", FSEND );
+ m_pSerializer->startElementNS(XML_m, XML_r);
+ m_pSerializer->startElementNS(XML_m, XML_t, FSNS(XML_xml, XML_space), "preserve");
m_pSerializer->write( " " );
m_pSerializer->endElementNS( XML_m, XML_t );
m_pSerializer->endElementNS( XML_m, XML_r );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index e7c2f3510da3..509fe1071669 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -188,40 +188,28 @@ class FFDataWriterHelper
const OUString& rHelp,
const OUString& rHint )
{
- m_pSerializer->startElementNS( XML_w, XML_ffData, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_name,
- FSNS( XML_w, XML_val ), OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_enabled, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_calcOnExit,
- FSNS( XML_w, XML_val ),
- "0", FSEND );
+ 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_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),
- OUStringToOString( rEntryMacro, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS(XML_w, XML_val), rEntryMacro.toUtf8() );
if ( !rExitMacro.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_exitMacro,
- FSNS(XML_w, XML_val),
- OUStringToOString( rExitMacro, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS(XML_w, XML_val), rExitMacro.toUtf8() );
if ( !rHelp.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_helpText,
FSNS(XML_w, XML_type), "text",
- FSNS(XML_w, XML_val),
- OUStringToOString( rHelp, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS(XML_w, XML_val), rHelp.toUtf8() );
if ( !rHint.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_statusText,
FSNS(XML_w, XML_type), "text",
- FSNS(XML_w, XML_val),
- OUStringToOString( rHint, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS(XML_w, XML_val), rHint.toUtf8() );
}
void writeFinish()
@@ -239,13 +227,13 @@ public:
{
writeCommonStart( rName, rEntryMacro, rExitMacro, rHelp, rHint );
// Checkbox specific bits
- m_pSerializer->startElementNS( XML_w, XML_checkBox, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_checkBox);
// currently hardcoding autosize
// #TODO check if this defaulted
- m_pSerializer->startElementNS( XML_w, XML_sizeAuto, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_sizeAuto);
m_pSerializer->endElementNS( XML_w, XML_sizeAuto );
if ( bChecked )
- m_pSerializer->singleElementNS( XML_w, XML_checked, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_checked);
m_pSerializer->endElementNS( XML_w, XML_checkBox );
writeFinish();
}
@@ -261,25 +249,19 @@ public:
{
writeCommonStart( rName, rEntryMacro, rExitMacro, rHelp, rHint );
- m_pSerializer->startElementNS( XML_w, XML_textInput, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_textInput);
if ( !rType.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_type,
- FSNS(XML_w, XML_val),
- OUStringToOString( rType, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS(XML_w, XML_val), rType.toUtf8() );
if ( !rDefaultText.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_default,
- FSNS(XML_w, XML_val),
- OUStringToOString( rDefaultText, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS(XML_w, XML_val), rDefaultText.toUtf8() );
if ( nMaxLength )
m_pSerializer->singleElementNS( XML_w, XML_maxLength,
- FSNS(XML_w, XML_val), OString::number(nMaxLength), FSEND );
+ FSNS(XML_w, XML_val), OString::number(nMaxLength) );
if ( !rFormat.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_format,
- FSNS(XML_w, XML_val),
- OUStringToOString( rFormat, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS(XML_w, XML_val), rFormat.toUtf8() );
m_pSerializer->endElementNS( XML_w, XML_textInput );
writeFinish();
@@ -308,7 +290,7 @@ class FieldMarkParamsHelper
void DocxAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 /*nScript*/ )
{
if (bIsRTL)
- m_pSerializer->singleElementNS( XML_w, XML_rtl, FSNS( XML_w, XML_val ), "true", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_rtl, FSNS(XML_w, XML_val), "true");
}
/// Are multiple paragraphs disallowed inside this type of SDT?
@@ -483,7 +465,7 @@ void DocxAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pText
// We will only know if we have to do that later.
m_pSerializer->mark(Tag_StartParagraph_1);
- m_pSerializer->startElementNS( XML_w, XML_p, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_p);
// postpone the output of the run (we get it before the paragraph
// properties, but must write it after them)
@@ -675,11 +657,9 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
EndSdtBlock();
m_bStartedCharSdt = false;
}
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->startElementNS(XML_mc, XML_AlternateContent, FSEND);
- m_pSerializer->startElementNS(XML_mc, XML_Choice,
- XML_Requires, "wps",
- FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->startElementNS(XML_mc, XML_AlternateContent);
+ m_pSerializer->startElementNS(XML_mc, XML_Choice, XML_Requires, "wps");
/**
This is to avoid AlternateContent within another AlternateContent.
So when Choice is Open, only write the DML Drawing instead of both DML
@@ -713,7 +693,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
m_rExport.m_pTableInfo = std::make_shared<ww8::WW8TableInfo>();
//reset the tableReference.
- m_pSerializer->startElementNS(XML_mc, XML_Fallback, FSEND);
+ m_pSerializer->startElementNS(XML_mc, XML_Fallback);
{
DocxTableExportContext aVMLTableExportContext(*this);
m_rExport.SdrExporter().writeVMLTextFrame(&aFrame);
@@ -734,7 +714,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
}
if (!m_pPostponedCustomShape->empty())
{
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
WritePostponedCustomShape();
m_pSerializer->endElementNS( XML_w, XML_r );
}
@@ -819,15 +799,15 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
// sdt start mark
m_pSerializer->mark(Tag_WriteSdtBlock);
- m_pSerializer->startElementNS( XML_w, XML_sdt, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_sdt);
// output sdt properties
- m_pSerializer->startElementNS( XML_w, XML_sdtPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_sdtPr);
if( nSdtPrToken > 0 && pSdtPrTokenChildren.is() )
{
if (!pSdtPrTokenAttributes.is())
- m_pSerializer->startElement( nSdtPrToken, FSEND );
+ m_pSerializer->startElement(nSdtPrToken);
else
{
XFastAttributeListRef xAttrList(pSdtPrTokenAttributes.get());
@@ -839,9 +819,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
uno::Sequence<xml::FastAttribute> aChildren = pSdtPrTokenChildren->getFastAttributes();
for( sal_Int32 i=0; i < aChildren.getLength(); ++i )
m_pSerializer->singleElement( aChildren[i].Token,
- FSNS(XML_w, XML_val),
- OUStringToOString( aChildren[i].Value, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS(XML_w, XML_val), aChildren[i].Value.toUtf8() );
}
m_pSerializer->endElement( nSdtPrToken );
@@ -849,7 +827,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
else if( (nSdtPrToken > 0) && nSdtPrToken != FSNS( XML_w, XML_id ) && !(m_bRunTextIsOn && m_rExport.SdrExporter().IsParagraphHasDrawing()))
{
if (!pSdtPrTokenAttributes.is())
- m_pSerializer->singleElement( nSdtPrToken, FSEND );
+ m_pSerializer->singleElement(nSdtPrToken);
else
{
XFastAttributeListRef xAttrList(pSdtPrTokenAttributes.get());
@@ -861,25 +839,23 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
if( nSdtPrToken == FSNS( XML_w, XML_id ) || ( bPara && m_bParagraphSdtHasId ) )
//Word won't open a document with an empty id tag, we fill it with a random number
m_pSerializer->singleElementNS(XML_w, XML_id, FSNS(XML_w, XML_val),
- OString::number(comphelper::rng::uniform_int_distribution(0, std::numeric_limits<int>::max())),
- FSEND);
+ OString::number(comphelper::rng::uniform_int_distribution(0, std::numeric_limits<int>::max())));
if( pSdtPrDataBindingAttrs.is() && !m_rExport.SdrExporter().IsParagraphHasDrawing())
{
XFastAttributeListRef xAttrList( pSdtPrDataBindingAttrs.get() );
pSdtPrDataBindingAttrs.clear();
- m_pSerializer->singleElementNS( XML_w, XML_dataBinding, xAttrList );
+ m_pSerializer->singleElementNS(XML_w, XML_dataBinding, xAttrList);
}
if (!rSdtPrAlias.isEmpty())
m_pSerializer->singleElementNS(XML_w, XML_alias, FSNS(XML_w, XML_val),
- OUStringToOString(rSdtPrAlias, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
+ rSdtPrAlias.toUtf8());
m_pSerializer->endElementNS( XML_w, XML_sdtPr );
// sdt contents start tag
- m_pSerializer->startElementNS( XML_w, XML_sdtContent, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_sdtContent);
// prepend the tags since the sdt start mark before the paragraph
m_pSerializer->mergeTopMarks(Tag_WriteSdtBlock, sax_fastparser::MergeMarks::PREPEND);
@@ -929,7 +905,7 @@ void DocxAttributeOutput::SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_
StartTableRow(pInner);
StartTableCell(pInner, i, nRow);
- m_pSerializer->singleElementNS( XML_w, XML_p, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_p);
EndTableCell(i);
}
}
@@ -976,7 +952,7 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe
if (bForceEmptyParagraph)
{
- m_pSerializer->singleElementNS( XML_w, XML_p, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_p);
}
EndTableCell(nCell);
@@ -994,7 +970,7 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe
void DocxAttributeOutput::EmptyParagraph()
{
- m_pSerializer->singleElementNS( XML_w, XML_p, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_p);
}
void DocxAttributeOutput::SectionBreaks(const SwNode& rNode)
@@ -1037,7 +1013,7 @@ void DocxAttributeOutput::StartParagraphProperties()
{
m_pSerializer->mark(Tag_StartParagraphProperties);
- m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_pPr);
// and output the section break now (if it appeared)
if ( m_pSectionInfo && (!m_setFootnote))
@@ -1198,7 +1174,7 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar
m_pSerializer->mergeTopMarks(Tag_InitCollectedParagraphProperties);
// Write 'Paragraph Mark' properties
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
// mark() before paragraph mark properties child elements.
InitCollectedRunProperties();
@@ -1258,23 +1234,20 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar
{
m_pSerializer->startElementNS(XML_w, XML_smartTag,
FSNS(XML_w, XML_uri), "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
- FSNS(XML_w, XML_element), "RDF",
- FSEND);
- m_pSerializer->startElementNS(XML_w, XML_smartTagPr, FSEND);
+ FSNS(XML_w, XML_element), "RDF");
+ 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(),
- FSEND);
+ FSNS(XML_w, XML_val), rStatement.second.toUtf8());
m_pSerializer->endElementNS(XML_w, XML_smartTagPr);
m_pSerializer->endElementNS(XML_w, XML_smartTag);
}
if ( m_nColBreakStatus == COLBRK_WRITE || m_nColBreakStatus == COLBRK_WRITEANDPOSTPONE )
{
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_br,
- FSNS( XML_w, XML_type ), "column", FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->singleElementNS(XML_w, XML_br, FSNS(XML_w, XML_type), "column");
m_pSerializer->endElementNS( XML_w, XML_r );
if ( m_nColBreakStatus == COLBRK_WRITEANDPOSTPONE )
@@ -1285,9 +1258,8 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar
if ( m_bPostponedPageBreak && !m_bWritingHeaderFooter )
{
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_br,
- FSNS( XML_w, XML_type ), "page", FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->singleElementNS(XML_w, XML_br, FSNS(XML_w, XML_type), "page");
m_pSerializer->endElementNS( XML_w, XML_r );
m_bPostponedPageBreak = false;
@@ -1479,33 +1451,30 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
if( m_closeHyperlinkInThisRun && m_startedHyperlink && !m_hyperLinkAnchor.isEmpty() && m_hyperLinkAnchor.startsWith("_Toc"))
{
OUString sToken;
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_webHidden, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
+ m_pSerializer->singleElementNS(XML_w, XML_webHidden);
m_pSerializer->endElementNS( XML_w, XML_rPr );
- m_pSerializer->startElementNS( XML_w, XML_fldChar,
- FSNS( XML_w, XML_fldCharType ), "begin",
- FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_fldChar, FSNS(XML_w, XML_fldCharType), "begin");
m_pSerializer->endElementNS( XML_w, XML_fldChar );
m_pSerializer->endElementNS( XML_w, XML_r );
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_webHidden, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
+ m_pSerializer->singleElementNS(XML_w, XML_webHidden);
m_pSerializer->endElementNS( XML_w, XML_rPr );
sToken = "PAGEREF " + m_hyperLinkAnchor + " \\h"; // '\h' Creates a hyperlink to the bookmarked paragraph.
DoWriteCmd( sToken );
m_pSerializer->endElementNS( XML_w, XML_r );
// Write the Field separator
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_webHidden, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
+ m_pSerializer->singleElementNS(XML_w, XML_webHidden);
m_pSerializer->endElementNS( XML_w, XML_rPr );
m_pSerializer->singleElementNS( XML_w, XML_fldChar,
- FSNS( XML_w, XML_fldCharType ), "separate",
- FSEND );
+ FSNS( XML_w, XML_fldCharType ), "separate" );
m_pSerializer->endElementNS( XML_w, XML_r );
// At start of every "PAGEREF" field m_endPageRef value should be true.
m_endPageRef = true;
@@ -1513,7 +1482,7 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
DoWriteBookmarkStartIfExist(nPos);
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
if(GetExport().m_bTabInTOC && m_pHyperlinkAttrList.is())
{
RunText("\t") ;
@@ -1582,13 +1551,12 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
if( m_endPageRef )
{
// Hyperlink is started and fldchar "end" needs to be written for PAGEREF
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_webHidden, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
+ m_pSerializer->singleElementNS(XML_w, XML_webHidden);
m_pSerializer->endElementNS( XML_w, XML_rPr );
m_pSerializer->singleElementNS( XML_w, XML_fldChar,
- FSNS( XML_w, XML_fldCharType ), "end",
- FSEND );
+ FSNS( XML_w, XML_fldCharType ), "end" );
m_pSerializer->endElementNS( XML_w, XML_r );
m_endPageRef = false;
m_hyperLinkAnchor.clear();
@@ -1641,13 +1609,9 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
void DocxAttributeOutput::DoWriteBookmarkTagStart(const OUString & bookmarkName)
{
- const OString rId = OString::number(m_nNextBookmarkId);
- const OString rName = OUStringToOString(BookmarkToWord(bookmarkName), RTL_TEXTENCODING_UTF8).getStr();
-
m_pSerializer->singleElementNS(XML_w, XML_bookmarkStart,
- FSNS(XML_w, XML_id), rId.getStr(),
- FSNS(XML_w, XML_name), rName.getStr(),
- FSEND);
+ FSNS(XML_w, XML_id), OString::number(m_nNextBookmarkId),
+ FSNS(XML_w, XML_name), BookmarkToWord(bookmarkName).toUtf8());
}
void DocxAttributeOutput::DoWriteBookmarkTagEnd(const OUString & bookmarkName)
@@ -1656,11 +1620,9 @@ void DocxAttributeOutput::DoWriteBookmarkTagEnd(const OUString & bookmarkName)
if (nameToIdIter != m_rOpenedBookmarksIds.end())
{
const sal_Int32 nId = nameToIdIter->second;
- const OString rId = OString::number(nId);
m_pSerializer->singleElementNS(XML_w, XML_bookmarkEnd,
- FSNS(XML_w, XML_id), rId.getStr(),
- FSEND);
+ FSNS(XML_w, XML_id), OString::number(nId));
}
}
@@ -1671,7 +1633,7 @@ void DocxAttributeOutput::DoWriteBookmarkStartIfExist(sal_Int32 nRunPos)
{
DoWriteBookmarkTagStart(aIter->second);
m_rOpenedBookmarksIds[aIter->second] = m_nNextBookmarkId;
- m_sLastOpenedBookmark = OUStringToOString(BookmarkToWord(aIter->second), RTL_TEXTENCODING_UTF8).getStr();
+ m_sLastOpenedBookmark = OUStringToOString(BookmarkToWord(aIter->second), RTL_TEXTENCODING_UTF8);
m_nNextBookmarkId++;
}
}
@@ -1701,7 +1663,7 @@ void DocxAttributeOutput::DoWriteBookmarksStart(std::vector<OUString>& rStarts)
DoWriteBookmarkTagStart(bookmarkName);
m_rOpenedBookmarksIds[bookmarkName] = m_nNextBookmarkId;
- m_sLastOpenedBookmark = OUStringToOString(BookmarkToWord(bookmarkName), RTL_TEXTENCODING_UTF8).getStr();
+ m_sLastOpenedBookmark = OUStringToOString(BookmarkToWord(bookmarkName), RTL_TEXTENCODING_UTF8);
m_nNextBookmarkId++;
}
rStarts.clear();
@@ -1742,13 +1704,9 @@ void DocxAttributeOutput::DoWritePermissionTagStart(const OUString & permission)
const OUString permissionId = permissionIdAndName.copy(0, sparatorIndex);
const OUString permissionName = permissionIdAndName.copy(sparatorIndex + 1);
- const OString rId = OUStringToOString(BookmarkToWord(permissionId), RTL_TEXTENCODING_UTF8).getStr();
- const OString rName = OUStringToOString(BookmarkToWord(permissionName), RTL_TEXTENCODING_UTF8).getStr();
-
m_pSerializer->singleElementNS(XML_w, XML_permStart,
- FSNS(XML_w, XML_id), rId.getStr(),
- FSNS(XML_w, XML_edGrp), rName.getStr(),
- FSEND);
+ FSNS(XML_w, XML_id), BookmarkToWord(permissionId).toUtf8(),
+ FSNS(XML_w, XML_edGrp), BookmarkToWord(permissionName).toUtf8());
}
else // if (permission.startsWith("permission-for-user:", &permissionIdAndName))
{
@@ -1756,13 +1714,9 @@ void DocxAttributeOutput::DoWritePermissionTagStart(const OUString & permission)
const OUString permissionId = permissionIdAndName.copy(0, sparatorIndex);
const OUString permissionName = permissionIdAndName.copy(sparatorIndex + 1);
- const OString rId = OUStringToOString(BookmarkToWord(permissionId), RTL_TEXTENCODING_UTF8).getStr();
- const OString rName = OUStringToOString(BookmarkToWord(permissionName), RTL_TEXTENCODING_UTF8).getStr();
-
m_pSerializer->singleElementNS(XML_w, XML_permStart,
- FSNS(XML_w, XML_id), rId.getStr(),
- FSNS(XML_w, XML_ed), rName.getStr(),
- FSEND);
+ FSNS(XML_w, XML_id), BookmarkToWord(permissionId).toUtf8(),
+ FSNS(XML_w, XML_ed), BookmarkToWord(permissionName).toUtf8());
}
}
@@ -1783,11 +1737,9 @@ void DocxAttributeOutput::DoWritePermissionTagEnd(const OUString & permission)
{
const sal_Int32 sparatorIndex = permissionIdAndName.indexOf(':');
const OUString permissionId = permissionIdAndName.copy(0, sparatorIndex);
- const OString rId = OUStringToOString(BookmarkToWord(permissionId), RTL_TEXTENCODING_UTF8).getStr();
m_pSerializer->singleElementNS(XML_w, XML_permEnd,
- FSNS(XML_w, XML_id), rId.getStr(),
- FSEND);
+ FSNS(XML_w, XML_id), BookmarkToWord(permissionId).toUtf8());
}
}
@@ -1827,8 +1779,7 @@ void DocxAttributeOutput::DoWriteAnnotationMarks()
const sal_Int32 nId = m_nNextAnnotationMarkId++;
m_rOpenedAnnotationMarksIds[rName] = nId;
m_pSerializer->singleElementNS( XML_w, XML_commentRangeStart,
- FSNS( XML_w, XML_id ), OString::number( nId ).getStr( ),
- FSEND );
+ FSNS( XML_w, XML_id ), OString::number(nId) );
m_sLastOpenedAnnotationMark = rName;
}
}
@@ -1843,14 +1794,12 @@ void DocxAttributeOutput::DoWriteAnnotationMarks()
{
const sal_Int32 nId = ( *pPos ).second;
m_pSerializer->singleElementNS( XML_w, XML_commentRangeEnd,
- FSNS( XML_w, XML_id ), OString::number( nId ).getStr( ),
- FSEND );
+ FSNS( XML_w, XML_id ), OString::number(nId) );
m_rOpenedAnnotationMarksIds.erase( rName );
- m_pSerializer->startElementNS(XML_w, XML_r, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_r);
m_pSerializer->singleElementNS( XML_w, XML_commentReference, FSNS( XML_w, XML_id ),
- OString::number( nId ).getStr(),
- FSEND );
+ OString::number(nId) );
m_pSerializer->endElementNS(XML_w, XML_r);
}
}
@@ -1930,13 +1879,12 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP
else if ( rInfos.eType != ww::eNONE ) // HYPERLINK fields are just commands
{
if ( bWriteRun )
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
if ( rInfos.eType == ww::eFORMDROPDOWN )
{
m_pSerializer->startElementNS( XML_w, XML_fldChar,
- FSNS( XML_w, XML_fldCharType ), "begin",
- FSEND );
+ FSNS( XML_w, XML_fldCharType ), "begin" );
if ( rInfos.pFieldmark && !rInfos.pField )
WriteFFData( rInfos );
if ( rInfos.pField )
@@ -1964,14 +1912,12 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP
{
m_pSerializer->startElementNS( XML_w, XML_fldChar,
FSNS( XML_w, XML_fldCharType ), "begin",
- FSNS( XML_w, XML_fldLock ), "true",
- FSEND );
+ FSNS( XML_w, XML_fldLock ), "true" );
}
else
{
m_pSerializer->startElementNS( XML_w, XML_fldChar,
- FSNS( XML_w, XML_fldCharType ), "begin",
- FSEND );
+ FSNS( XML_w, XML_fldCharType ), "begin" );
}
if ( rInfos.pFieldmark )
@@ -1999,7 +1945,7 @@ void DocxAttributeOutput::DoWriteCmd( const OUString& rCmd )
m_aSeqBookmarksNames[sSeqName].push_back(m_sLastOpenedBookmark);
}
// Write the Field command
- m_pSerializer->startElementNS( XML_w, XML_instrText, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_instrText);
m_pSerializer->writeEscaped( rCmd );
m_pSerializer->endElementNS( XML_w, XML_instrText );
@@ -2013,7 +1959,7 @@ void DocxAttributeOutput::CmdField_Impl( const SwTextNode* pNode, sal_Int32 nPos
{
if ( bWriteRun )
{
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
if (rInfos.eType == ww::eEQ)
bWriteCombChars = true;
@@ -2053,13 +1999,12 @@ void DocxAttributeOutput::CmdField_Impl( const SwTextNode* pNode, sal_Int32 nPos
{
if ( bWriteRun )
{
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
DoWriteFieldRunProperties( pNode, nPos );
}
m_pSerializer->singleElementNS( XML_w, XML_fldChar,
- FSNS( XML_w, XML_fldCharType ), "separate",
- FSEND );
+ FSNS( XML_w, XML_fldCharType ), "separate" );
if ( bWriteRun )
{
@@ -2112,12 +2057,12 @@ void DocxAttributeOutput::DoWriteFieldRunProperties( const SwTextNode * pNode, s
m_bPreventDoubleFieldsHandling = true;
{
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
// 1. output webHidden flag
if(GetExport().m_bHideTabLeaderAndPageNumbers && m_pHyperlinkAttrList.is() )
{
- m_pSerializer->singleElementNS( XML_w, XML_webHidden, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_webHidden);
}
// 2. output color
@@ -2171,7 +2116,7 @@ void DocxAttributeOutput::EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos
if (rInfos.pField ) // For hyperlinks and TOX
{
// Write the Field latest value
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
DoWriteFieldRunProperties( pNode, nPos );
OUString sExpand;
@@ -2201,11 +2146,9 @@ void DocxAttributeOutput::EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos
// Write the Field end
if ( rInfos.bClose )
{
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
DoWriteFieldRunProperties( pNode, nPos );
- m_pSerializer->singleElementNS( XML_w, XML_fldChar,
- FSNS( XML_w, XML_fldCharType ), "end",
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_fldChar, FSNS(XML_w, XML_fldCharType), "end");
m_pSerializer->endElementNS( XML_w, XML_r );
}
// Write the ref field if a bookmark had to be set and the field
@@ -2219,10 +2162,9 @@ void DocxAttributeOutput::EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos
if ( ( !m_sFieldBkm.isEmpty() ) && bShowRef )
{
// Write the field beginning
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
m_pSerializer->singleElementNS( XML_w, XML_fldChar,
- FSNS( XML_w, XML_fldCharType ), "begin",
- FSEND );
+ FSNS( XML_w, XML_fldCharType ), "begin" );
m_pSerializer->endElementNS( XML_w, XML_r );
rInfos.sCmd = FieldString( ww::eREF );
@@ -2245,11 +2187,11 @@ void DocxAttributeOutput::StartRunProperties()
// prepend the properties before the text
m_pSerializer->mark(Tag_StartRunProperties);
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
if(GetExport().m_bHideTabLeaderAndPageNumbers && m_pHyperlinkAttrList.is() )
{
- m_pSerializer->singleElementNS( XML_w, XML_webHidden, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_webHidden);
}
InitCollectedRunProperties();
@@ -2636,12 +2578,12 @@ bool DocxAttributeOutput::FootnoteEndnoteRefTag()
if ( pCharFormat )
{
const OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(pCharFormat)));
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
+ m_pSerializer->singleElementNS(XML_w, XML_rStyle, FSNS(XML_w, XML_val), aStyleId);
m_pSerializer->endElementNS( XML_w, XML_rPr );
}
- m_pSerializer->singleElementNS( XML_w, m_footnoteEndnoteRefTag, FSEND );
+ m_pSerializer->singleElementNS(XML_w, m_footnoteEndnoteRefTag);
m_footnoteEndnoteRefTag = 0;
return true;
}
@@ -2667,10 +2609,10 @@ static bool impl_WriteRunText( FSHelperPtr const & pSerializer, sal_Int32 nTextT
// we have to add 'preserve' when starting/ending with space
if ( *pBegin == ' ' || *( pEnd - 1 ) == ' ' )
{
- pSerializer->startElementNS( XML_w, nTextToken, FSNS( XML_xml, XML_space ), "preserve", FSEND );
+ pSerializer->startElementNS(XML_w, nTextToken, FSNS(XML_xml, XML_space), "preserve");
}
else
- pSerializer->startElementNS( XML_w, nTextToken, FSEND );
+ pSerializer->startElementNS(XML_w, nTextToken);
pSerializer->writeEscaped( OUString( pBegin, pEnd - pBegin ) );
@@ -2703,26 +2645,26 @@ void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCh
{
case 0x09: // tab
impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
- m_pSerializer->singleElementNS( XML_w, XML_tab, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_tab);
prevUnicode = *pIt;
break;
case 0x0b: // line break
{
if (impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt ) || prevUnicode < 0x0020)
{
- m_pSerializer->singleElementNS( XML_w, XML_br, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_br);
prevUnicode = *pIt;
}
}
break;
case 0x1E: //non-breaking hyphen
impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
- m_pSerializer->singleElementNS( XML_w, XML_noBreakHyphen, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_noBreakHyphen);
prevUnicode = *pIt;
break;
case 0x1F: //soft (on demand) hyphen
impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
- m_pSerializer->singleElementNS( XML_w, XML_softHyphen, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_softHyphen);
prevUnicode = *pIt;
break;
default:
@@ -2751,33 +2693,30 @@ void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, co
EndRun( &rNode, nPos ); // end run before starting ruby to avoid nested runs, and overlap
assert(!m_closeHyperlinkInThisRun); // check that no hyperlink overlaps ruby
assert(!m_closeHyperlinkInPreviousRun);
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_ruby, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_rubyPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->startElementNS(XML_w, XML_ruby);
+ m_pSerializer->startElementNS(XML_w, XML_rubyPr);
m_pSerializer->singleElementNS( XML_w, XML_rubyAlign,
- FSNS( XML_w, XML_val ), lclConvertWW8JCToOOXMLRubyAlign(aWW8Ruby.GetJC()), FSEND );
+ FSNS( XML_w, XML_val ), lclConvertWW8JCToOOXMLRubyAlign(aWW8Ruby.GetJC()) );
sal_uInt32 nHps = (aWW8Ruby.GetRubyHeight() + 5) / 10;
sal_uInt32 nHpsBaseText = (aWW8Ruby.GetBaseHeight() + 5) / 10;
- m_pSerializer->singleElementNS( XML_w, XML_hps,
- FSNS( XML_w, XML_val ), OString::number(nHps).getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_hps, FSNS(XML_w, XML_val), OString::number(nHps));
m_pSerializer->singleElementNS( XML_w, XML_hpsRaise,
- FSNS( XML_w, XML_val ), OString::number(nHpsBaseText).getStr(), FSEND );
+ FSNS( XML_w, XML_val ), OString::number(nHpsBaseText) );
m_pSerializer->singleElementNS( XML_w, XML_hpsBaseText,
- FSNS( XML_w, XML_val ), OString::number(nHpsBaseText).getStr(), FSEND );
+ FSNS( XML_w, XML_val ), OString::number(nHpsBaseText) );
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 ),
- OUStringToOString( sLang, RTL_TEXTENCODING_UTF8 ).getStr( ), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_lid, FSNS(XML_w, XML_val), sLang.toUtf8());
m_pSerializer->endElementNS( XML_w, XML_rubyPr );
- m_pSerializer->startElementNS( XML_w, XML_rt, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rt);
StartRun( nullptr, nPos );
StartRunProperties( );
@@ -2798,7 +2737,7 @@ void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, co
EndRun( &rNode, nPos );
m_pSerializer->endElementNS( XML_w, XML_rt );
- m_pSerializer->startElementNS( XML_w, XML_rubyBase, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rubyBase);
StartRun( nullptr, nPos );
}
@@ -2944,10 +2883,9 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
case nsRedlineType_t::REDLINE_FORMAT:
m_pSerializer->startElementNS( XML_w, XML_rPrChange,
- FSNS( XML_w, XML_id ), aId.getStr(),
- FSNS( XML_w, XML_author ), aAuthor.getStr(),
- FSNS( XML_w, XML_date ), aDate.getStr(),
- FSEND );
+ FSNS( XML_w, XML_id ), aId,
+ FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_date ), aDate );
// Check if there is any extra data stored in the redline object
if (pRedlineData->GetExtraData())
@@ -2964,7 +2902,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
{
m_pSerializer->mark(Tag_Redline_1);
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
// The 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' are used to hold information
// that should be collected by different properties in the core, and are all flushed together
@@ -3003,10 +2941,9 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT:
m_pSerializer->startElementNS( XML_w, XML_pPrChange,
- FSNS( XML_w, XML_id ), aId.getStr(),
- FSNS( XML_w, XML_author ), aAuthor.getStr(),
- FSNS( XML_w, XML_date ), aDate.getStr(),
- FSEND );
+ FSNS( XML_w, XML_id ), aId,
+ FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_date ), aDate );
// Check if there is any extra data stored in the redline object
if (pRedlineData->GetExtraData())
@@ -3023,7 +2960,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
{
m_pSerializer->mark(Tag_Redline_2);
- m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_pPr);
// The 'm_rExport.SdrExporter().getFlyAttrList()', 'm_pParagraphSpacingAttrList' are used to hold information
// that should be collected by different properties in the core, and are all flushed together
@@ -3081,18 +3018,16 @@ void DocxAttributeOutput::StartRedline( const SwRedlineData * pRedlineData )
{
case nsRedlineType_t::REDLINE_INSERT:
m_pSerializer->startElementNS( XML_w, XML_ins,
- FSNS( XML_w, XML_id ), aId.getStr(),
- FSNS( XML_w, XML_author ), aAuthor.getStr(),
- FSNS( XML_w, XML_date ), aDate.getStr(),
- FSEND );
+ FSNS( XML_w, XML_id ), aId,
+ FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_date ), aDate );
break;
case nsRedlineType_t::REDLINE_DELETE:
m_pSerializer->startElementNS( XML_w, XML_del,
- FSNS( XML_w, XML_id ), aId.getStr(),
- FSNS( XML_w, XML_author ), aAuthor.getStr(),
- FSNS( XML_w, XML_date ), aDate.getStr(),
- FSEND );
+ FSNS( XML_w, XML_id ), aId,
+ FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_date ), aDate );
break;
case nsRedlineType_t::REDLINE_FORMAT:
@@ -3135,7 +3070,7 @@ void DocxAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OString aStyleId(m_rExport.m_pStyles->GetStyleId(nStyle));
- m_pSerializer->singleElementNS( XML_w, XML_pStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_pStyle, FSNS(XML_w, XML_val), aStyleId);
}
static void impl_borderLine( FSHelperPtr const & pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, sal_uInt16 nDist,
@@ -3317,7 +3252,7 @@ static void impl_borders( FSHelperPtr const & pSerializer,
if (!tagWritten && rOptions.bWriteTag)
{
- pSerializer->startElementNS( XML_w, rOptions.tag, FSEND );
+ pSerializer->startElementNS(XML_w, rOptions.tag);
tagWritten = true;
}
@@ -3406,13 +3341,12 @@ static void impl_cellMargins( FSHelperPtr const & pSerializer, const SvxBoxItem&
}
if (!tagWritten) {
- pSerializer->startElementNS( XML_w, tag, FSEND );
+ pSerializer->startElementNS(XML_w, tag);
tagWritten = true;
}
pSerializer->singleElementNS( XML_w, aXmlElements[i],
- FSNS( XML_w, XML_w ), OString::number( nDist ).getStr( ),
- FSNS( XML_w, XML_type ), "dxa",
- FSEND );
+ FSNS( XML_w, XML_w ), OString::number(nDist),
+ FSNS( XML_w, XML_type ), "dxa" );
}
if (tagWritten) {
pSerializer->endElementNS( XML_w, tag );
@@ -3421,7 +3355,7 @@ static void impl_cellMargins( FSHelperPtr const & pSerializer, const SvxBoxItem&
void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow )
{
- m_pSerializer->startElementNS( XML_w, XML_tcPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_tcPr);
const SwTableBox *pTableBox = pTableTextNodeInfoInner->getTableBox( );
@@ -3435,9 +3369,8 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
if ( nCell )
nWidth = nWidth - GetGridCols( pTableTextNodeInfoInner )->at( nCell - 1 );
m_pSerializer->singleElementNS( XML_w, XML_tcW,
- FSNS( XML_w, XML_w ), OString::number( nWidth ).getStr( ),
- FSNS( XML_w, XML_type ), "dxa",
- FSEND );
+ FSNS( XML_w, XML_w ), OString::number(nWidth),
+ FSNS( XML_w, XML_type ), "dxa" );
// Horizontal spans
const SwWriteTableRows& rRows = m_xTableWrt->GetRows( );
@@ -3449,8 +3382,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
const sal_uInt16 nColSpan = rCell.GetColSpan();
if ( nColSpan > 1 )
m_pSerializer->singleElementNS( XML_w, XML_gridSpan,
- FSNS( XML_w, XML_val ), OString::number( nColSpan ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_val ), OString::number(nColSpan) );
}
// Vertical merges
@@ -3458,15 +3390,11 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
sal_Int32 vSpan = (*xRowSpans)[nCell];
if ( vSpan > 1 )
{
- m_pSerializer->singleElementNS( XML_w, XML_vMerge,
- FSNS( XML_w, XML_val ), "restart",
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vMerge, FSNS(XML_w, XML_val), "restart");
}
else if ( vSpan < 0 )
{
- m_pSerializer->singleElementNS( XML_w, XML_vMerge,
- FSNS( XML_w, XML_val ), "continue",
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vMerge, FSNS(XML_w, XML_val), "continue");
}
if (const SfxGrabBagItem* pItem = pTableBox->GetFrameFormat()->GetAttrSet().GetItem<SfxGrabBagItem>(RES_FRMATR_GRABBAG))
@@ -3527,7 +3455,7 @@ void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t cons
// In case any paragraph SDT's are open, close them here.
EndParaSdtBlock();
- m_pSerializer->startElementNS( XML_w, XML_tbl, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_tbl);
tableFirstCells.push_back(pTableTextNodeInfoInner);
lastOpenCell.push_back(-1);
@@ -3562,17 +3490,15 @@ void DocxAttributeOutput::EndTable()
void DocxAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner )
{
- m_pSerializer->startElementNS( XML_w, XML_tr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_tr);
// Output the row properties
- m_pSerializer->startElementNS( XML_w, XML_trPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_trPr);
// Header row: tblHeader
const SwTable *pTable = pTableTextNodeInfoInner->getTable( );
if ( pTable->GetRowsToRepeat( ) > pTableTextNodeInfoInner->getRow( ) )
- m_pSerializer->singleElementNS( XML_w, XML_tblHeader,
- FSNS( XML_w, XML_val ), "true",
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_tblHeader, FSNS(XML_w, XML_val), "true");
TableRowRedline( pTableTextNodeInfoInner );
TableHeight( pTableTextNodeInfoInner );
@@ -3608,7 +3534,7 @@ void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t
InitTableHelper( pTableTextNodeInfoInner );
- m_pSerializer->startElementNS( XML_w, XML_tc, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_tc);
// Write the cell properties here
TableCellProperties( pTableTextNodeInfoInner, nCell, nRow );
@@ -3708,7 +3634,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
bool bEcma = GetExport().GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
// Write the table properties
- m_pSerializer->startElementNS( XML_w, XML_tblPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_tblPr);
static const sal_Int32 aOrder[] =
{
@@ -3780,9 +3706,8 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
// Output the table preferred width
m_pSerializer->singleElementNS( XML_w, XML_tblW,
- FSNS( XML_w, XML_w ), OString::number( nPageSize ).getStr( ),
- FSNS( XML_w, XML_type ), widthType,
- FSEND );
+ FSNS( XML_w, XML_w ), OString::number(nPageSize),
+ FSNS( XML_w, XML_type ), widthType );
// Look for the table style property in the table grab bag
std::map<OUString, css::uno::Any> aGrabBag =
@@ -3798,9 +3723,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
if( rGrabBagElement.first == "TableStyleName")
{
OString sStyleName = OUStringToOString( rGrabBagElement.second.get<OUString>(), RTL_TEXTENCODING_UTF8 );
- m_pSerializer->singleElementNS( XML_w, XML_tblStyle,
- FSNS( XML_w, XML_val ), sStyleName.getStr(),
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_tblStyle, FSNS(XML_w, XML_val), sStyleName);
}
else if( rGrabBagElement.first == "TableStyleTopBorder" )
m_aTableStyleConf[ SvxBoxItemLine::TOP ] = rGrabBagElement.second.get<table::BorderLine2>();
@@ -4025,9 +3948,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
break;
}
}
- m_pSerializer->singleElementNS( XML_w, XML_jc,
- FSNS( XML_w, XML_val ), pJcVal,
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_jc, FSNS(XML_w, XML_val), pJcVal);
// Output the table background color (although cell value still needs to be specified)
const SvxBrushItem *pColorProp = pTableFormat->GetAttrSet().GetItem<SvxBrushItem>(RES_BACKGROUND);
@@ -4036,9 +3957,8 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
{
OString sColor = msfilter::util::ConvertColor( aColor );
m_pSerializer->singleElementNS( XML_w, XML_shd,
- FSNS( XML_w, XML_fill ), sColor.getStr( ),
- FSNS( XML_w, XML_val ), "clear",
- FSEND );
+ FSNS( XML_w, XML_fill ), sColor,
+ FSNS( XML_w, XML_val ), "clear" );
}
// Output the table borders
@@ -4051,9 +3971,8 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
// Table indent (need to get written even if == 0)
m_pSerializer->singleElementNS( XML_w, XML_tblInd,
- FSNS( XML_w, XML_w ), OString::number( nIndent ).getStr( ),
- FSNS( XML_w, XML_type ), "dxa",
- FSEND );
+ FSNS( XML_w, XML_w ), OString::number(nIndent),
+ FSNS( XML_w, XML_type ), "dxa" );
// Merge the marks for the ordered elements
m_pSerializer->mergeTopMarks(Tag_TableDefinition);
@@ -4061,15 +3980,14 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_pSerializer->endElementNS( XML_w, XML_tblPr );
// Write the table grid infos
- m_pSerializer->startElementNS( XML_w, XML_tblGrid, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_tblGrid);
sal_Int32 nPrv = 0;
ww8::WidthsPtr pColumnWidths = GetColumnWidths( pTableTextNodeInfoInner );
for ( auto aColumnWidth : *pColumnWidths )
{
sal_Int32 nWidth = sal_Int32( aColumnWidth ) - nPrv;
m_pSerializer->singleElementNS( XML_w, XML_gridCol,
- FSNS( XML_w, XML_w ), OString::number( nWidth ).getStr( ),
- FSEND );
+ FSNS( XML_w, XML_w ), OString::number(nWidth) );
nPrv = sal_Int32( aColumnWidth );
}
@@ -4126,9 +4044,8 @@ void DocxAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_
{
// color changed by the user, or no grab bag: write sColor
m_pSerializer->singleElementNS( XML_w, XML_shd,
- FSNS( XML_w, XML_fill ), sColor.getStr( ),
- FSNS( XML_w, XML_val ), "clear",
- FSEND );
+ FSNS( XML_w, XML_fill ), sColor,
+ FSNS( XML_w, XML_val ), "clear" );
}
else
{
@@ -4192,16 +4109,14 @@ void DocxAttributeOutput::TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t
if (nRedlineType == nsRedlineType_t::REDLINE_TABLE_ROW_INSERT)
m_pSerializer->singleElementNS( XML_w, XML_ins,
- FSNS( XML_w, XML_id ), aId.getStr(),
- FSNS( XML_w, XML_author ), aAuthor.getStr(),
- FSNS( XML_w, XML_date ), aDate.getStr(),
- FSEND );
+ FSNS( XML_w, XML_id ), aId,
+ FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_date ), aDate );
else if (nRedlineType == nsRedlineType_t::REDLINE_TABLE_ROW_DELETE)
m_pSerializer->singleElementNS( XML_w, XML_del,
- FSNS( XML_w, XML_id ), aId.getStr(),
- FSNS( XML_w, XML_author ), aAuthor.getStr(),
- FSNS( XML_w, XML_date ), aDate.getStr(),
- FSEND );
+ FSNS( XML_w, XML_id ), aId,
+ FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_date ), aDate );
}
break;
}
@@ -4237,16 +4152,14 @@ void DocxAttributeOutput::TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_
if (nRedlineType == nsRedlineType_t::REDLINE_TABLE_CELL_INSERT)
m_pSerializer->singleElementNS( XML_w, XML_cellIns,
- FSNS( XML_w, XML_id ), aId.getStr(),
- FSNS( XML_w, XML_author ), aAuthor.getStr(),
- FSNS( XML_w, XML_date ), aDate.getStr(),
- FSEND );
+ FSNS( XML_w, XML_id ), aId,
+ FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_date ), aDate );
else if (nRedlineType == nsRedlineType_t::REDLINE_TABLE_CELL_DELETE)
m_pSerializer->singleElementNS( XML_w, XML_cellDel,
- FSNS( XML_w, XML_id ), aId.getStr(),
- FSNS( XML_w, XML_author ), aAuthor.getStr(),
- FSNS( XML_w, XML_date ), aDate.getStr(),
- FSEND );
+ FSNS( XML_w, XML_id ), aId,
+ FSNS( XML_w, XML_author ), aAuthor,
+ FSNS( XML_w, XML_date ), aDate );
}
break;
}
@@ -4275,9 +4188,8 @@ void DocxAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( pRule )
m_pSerializer->singleElementNS( XML_w, XML_trHeight,
- FSNS( XML_w, XML_val ), OString::number( nHeight ).getStr( ),
- FSNS( XML_w, XML_hRule ), pRule,
- FSEND );
+ FSNS( XML_w, XML_val ), OString::number(nHeight),
+ FSNS( XML_w, XML_hRule ), pRule );
}
}
@@ -4291,9 +4203,7 @@ void DocxAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t p
// if rSplittable is true then no need to write <w:cantSplit w:val="false"/>
// as default row prop is allow row to break across page.
if( !rSplittable.GetValue( ) )
- m_pSerializer->singleElementNS( XML_w, XML_cantSplit,
- FSNS( XML_w, XML_val ), "true",
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_cantSplit, FSNS(XML_w, XML_val), "true");
}
void DocxAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
@@ -4303,9 +4213,7 @@ void DocxAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTabl
if ( m_rExport.TrueFrameDirection( *pFrameFormat ) == SvxFrameDirection::Horizontal_RL_TB )
{
- m_pSerializer->singleElementNS( XML_w, XML_bidiVisual,
- FSNS( XML_w, XML_val ), "true",
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_bidiVisual, FSNS(XML_w, XML_val), "true");
}
}
@@ -4315,14 +4223,10 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer
const SwFrameFormat *pFrameFormat = pTabBox->GetFrameFormat( );
if ( SvxFrameDirection::Vertical_RL_TB == m_rExport.TrueFrameDirection( *pFrameFormat ) )
- m_pSerializer->singleElementNS( XML_w, XML_textDirection,
- FSNS( XML_w, XML_val ), "tbRl",
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_textDirection, FSNS(XML_w, XML_val), "tbRl");
else if ( SvxFrameDirection::Vertical_LR_BT == m_rExport.TrueFrameDirection( *pFrameFormat ) )
{
- m_pSerializer->singleElementNS( XML_w, XML_textDirection,
- FSNS( XML_w, XML_val ), "btLr",
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_textDirection, FSNS(XML_w, XML_val), "btLr");
}
const SwWriteTableRows& rRows = m_xTableWrt->GetRows( );
@@ -4337,12 +4241,10 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer
case text::VertOrientation::TOP:
break;
case text::VertOrientation::CENTER:
- m_pSerializer->singleElementNS( XML_w, XML_vAlign,
- FSNS( XML_w, XML_val ), "center", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vAlign, FSNS(XML_w, XML_val), "center");
break;
case text::VertOrientation::BOTTOM:
- m_pSerializer->singleElementNS( XML_w, XML_vAlign,
- FSNS( XML_w, XML_val ), "bottom", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vAlign, FSNS(XML_w, XML_val), "bottom");
break;
}
}
@@ -4375,11 +4277,10 @@ void DocxAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ )
void DocxAttributeOutput::StartStyles()
{
m_pSerializer->startElementNS( XML_w, XML_styles,
- FSNS( XML_xmlns, XML_w ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(doc)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_w14 ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(w14)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_mc ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(mce)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_mc, XML_Ignorable ), "w14",
- FSEND );
+ 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_mc, XML_Ignorable ), "w14" );
DocDefaults();
LatentStyles();
@@ -4674,10 +4575,10 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt)
void DocxAttributeOutput::DocDefaults( )
{
// Write the '<w:docDefaults>' section here
- m_pSerializer->startElementNS(XML_w, XML_docDefaults, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_docDefaults);
// Output the default run properties
- m_pSerializer->startElementNS(XML_w, XML_rPrDefault, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_rPrDefault);
StartStyleProperties(false, 0);
@@ -4689,7 +4590,7 @@ void DocxAttributeOutput::DocDefaults( )
m_pSerializer->endElementNS(XML_w, XML_rPrDefault);
// Output the default paragraph properties
- m_pSerializer->startElementNS(XML_w, XML_pPrDefault, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_pPrDefault);
StartStyleProperties(true, 0);
@@ -4770,11 +4671,10 @@ void DocxAttributeOutput::WriteSrcRect(const SdrObject* pSdrObj, const SwFrameFo
double bottom = nCropB * heightMultiplier;
m_pSerializer->singleElementNS( XML_a, XML_srcRect,
- XML_l, I32S(left),
- XML_t, I32S(top),
- XML_r, I32S(right),
- XML_b, I32S(bottom),
- FSEND );
+ XML_l, OString::number(left),
+ XML_t, OString::number(top),
+ XML_r, OString::number(right),
+ XML_b, OString::number(bottom) );
}
}
@@ -4904,53 +4804,42 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
// TODO hyperlink
// m_pSerializer->singleElementNS( XML_a, XML_hlinkClick,
// FSNS( XML_xmlns, XML_a ), "http://schemas.openxmlformats.org/drawingml/2006/main",
- // FSNS( XML_r, XML_id ), "rId4",
- // FSEND );
+ // FSNS( XML_r, XML_id ), "rId4");
m_pSerializer->endElementNS( XML_wp, XML_docPr );
- m_pSerializer->startElementNS( XML_wp, XML_cNvGraphicFramePr,
- FSEND );
+ m_pSerializer->startElementNS(XML_wp, XML_cNvGraphicFramePr);
// TODO change aspect?
m_pSerializer->singleElementNS( XML_a, XML_graphicFrameLocks,
- FSNS( XML_xmlns, XML_a ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)), RTL_TEXTENCODING_UTF8).getStr(),
- XML_noChangeAspect, "1",
- FSEND );
+ FSNS( XML_xmlns, XML_a ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8(),
+ XML_noChangeAspect, "1" );
m_pSerializer->endElementNS( XML_wp, XML_cNvGraphicFramePr );
m_pSerializer->startElementNS( XML_a, XML_graphic,
- FSNS( XML_xmlns, XML_a ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ FSNS( XML_xmlns, XML_a ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8() );
m_pSerializer->startElementNS( XML_a, XML_graphicData,
- XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/picture",
- FSEND );
+ XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/picture" );
m_pSerializer->startElementNS( XML_pic, XML_pic,
- FSNS( XML_xmlns, XML_pic ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlPicture)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ FSNS( XML_xmlns, XML_pic ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlPicture)).toUtf8() );
- m_pSerializer->startElementNS( XML_pic, XML_nvPicPr,
- FSEND );
+ 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 );
+ m_pSerializer->startElementNS(XML_pic, XML_cNvPr, docPrAttrListRef);
// TODO hyperlink
// m_pSerializer->singleElementNS( XML_a, XML_hlinkClick,
- // FSNS( XML_r, XML_id ), "rId4",
- // FSEND );
+ // FSNS( XML_r, XML_id ), "rId4");
m_pSerializer->endElementNS( XML_pic, XML_cNvPr );
- m_pSerializer->startElementNS( XML_pic, XML_cNvPicPr,
- FSEND );
+ m_pSerializer->startElementNS(XML_pic, XML_cNvPicPr);
// TODO change aspect?
m_pSerializer->singleElementNS( XML_a, XML_picLocks,
- XML_noChangeAspect, "1", XML_noChangeArrowheads, "1",
- FSEND );
+ XML_noChangeAspect, "1", XML_noChangeArrowheads, "1" );
m_pSerializer->endElementNS( XML_pic, XML_cNvPicPr );
m_pSerializer->endElementNS( XML_pic, XML_nvPicPr );
// the actual picture
- m_pSerializer->startElementNS( XML_pic, XML_blipFill,
- FSEND );
+ m_pSerializer->startElementNS(XML_pic, XML_blipFill);
/* At this point we are certain that, WriteImage returns empty RelId
for unhandled graphic type. Therefore we write the picture description
@@ -4959,12 +4848,9 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
completely discarding it.
*/
if ( aRelId.isEmpty() )
- m_pSerializer->startElementNS( XML_a, XML_blip,
- FSEND );
+ m_pSerializer->startElementNS(XML_a, XML_blip);
else
- m_pSerializer->startElementNS( XML_a, XML_blip,
- FSNS( XML_r, nImageType ), aRelId.getStr(),
- FSEND );
+ m_pSerializer->startElementNS(XML_a, XML_blip, FSNS(XML_r, nImageType), aRelId);
pItem = nullptr;
GraphicDrawMode nMode = GraphicDrawMode::Standard;
@@ -4973,11 +4859,11 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
{
nMode = static_cast<GraphicDrawMode>(static_cast<const SfxEnumItemInterface*>(pItem)->GetEnumValue());
if (nMode == GraphicDrawMode::Greys)
- m_pSerializer->singleElementNS (XML_a, XML_grayscl, FSEND);
+ m_pSerializer->singleElementNS (XML_a, XML_grayscl);
else if (nMode == GraphicDrawMode::Mono) //black/white has a 0,5 threshold in LibreOffice
- m_pSerializer->singleElementNS (XML_a, XML_biLevel, XML_thresh, OString::number(50000), FSEND);
+ m_pSerializer->singleElementNS (XML_a, XML_biLevel, XML_thresh, OString::number(50000));
else if (nMode == GraphicDrawMode::Watermark) //watermark has a brightness/luminance of 0,5 and contrast of -0.7 in LibreOffice
- m_pSerializer->singleElementNS( XML_a, XML_lum, XML_bright, OString::number(70000), XML_contrast, OString::number(-70000), FSEND );
+ m_pSerializer->singleElementNS( XML_a, XML_lum, XML_bright, OString::number(70000), XML_contrast, OString::number(-70000) );
}
m_pSerializer->endElementNS( XML_a, XML_blip );
@@ -4985,36 +4871,24 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
WriteSrcRect(pSdrObj, pFrameFormat);
}
- m_pSerializer->startElementNS( XML_a, XML_stretch,
- FSEND );
- m_pSerializer->singleElementNS( XML_a, XML_fillRect,
- FSEND );
+ m_pSerializer->startElementNS(XML_a, XML_stretch);
+ m_pSerializer->singleElementNS(XML_a, XML_fillRect);
m_pSerializer->endElementNS( XML_a, XML_stretch );
m_pSerializer->endElementNS( XML_pic, XML_blipFill );
// TODO setup the right values below
- m_pSerializer->startElementNS( XML_pic, XML_spPr,
- XML_bwMode, "auto",
- FSEND );
+ m_pSerializer->startElementNS(XML_pic, XML_spPr, XML_bwMode, "auto");
m_pSerializer->startElementNS(
XML_a, XML_xfrm, uno::Reference<xml::sax::XFastAttributeList>(xFrameAttributes.get()));
- m_pSerializer->singleElementNS( XML_a, XML_off,
- XML_x, "0", XML_y, "0",
- FSEND );
+ m_pSerializer->singleElementNS(XML_a, XML_off, XML_x, "0", XML_y, "0");
OString aWidth( OString::number( TwipsToEMU( aSize.Width() ) ) );
OString aHeight( OString::number( TwipsToEMU( aSize.Height() ) ) );
- m_pSerializer->singleElementNS( XML_a, XML_ext,
- XML_cx, aWidth.getStr(),
- XML_cy, aHeight.getStr(),
- FSEND );
+ m_pSerializer->singleElementNS(XML_a, XML_ext, XML_cx, aWidth, XML_cy, aHeight);
m_pSerializer->endElementNS( XML_a, XML_xfrm );
- m_pSerializer->startElementNS( XML_a, XML_prstGeom,
- XML_prst, "rect",
- FSEND );
- m_pSerializer->singleElementNS( XML_a, XML_avLst,
- FSEND );
+ m_pSerializer->startElementNS(XML_a, XML_prstGeom, XML_prst, "rect");
+ m_pSerializer->singleElementNS(XML_a, XML_avLst);
m_pSerializer->endElementNS( XML_a, XML_prstGeom );
const SvxBoxItem& rBoxItem = pFrameFormat->GetBox();
@@ -5091,22 +4965,16 @@ void DocxAttributeOutput::WritePostponedChart()
if( xChartDoc.is() )
{
SAL_INFO("sw.ww8", "DocxAttributeOutput::WriteOLE2Obj: export chart ");
- m_pSerializer->startElementNS( XML_w, XML_drawing,
- FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_drawing);
m_pSerializer->startElementNS( XML_wp, XML_inline,
- XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0",
- FSEND );
+ XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0" );
OString aWidth( OString::number( TwipsToEMU( itr.second.Width() ) ) );
OString aHeight( OString::number( TwipsToEMU( itr.second.Height() ) ) );
- m_pSerializer->singleElementNS( XML_wp, XML_extent,
- XML_cx, aWidth.getStr(),
- XML_cy, aHeight.getStr(),
- FSEND );
+ m_pSerializer->singleElementNS(XML_wp, XML_extent, XML_cx, aWidth, XML_cy, aHeight);
// TODO - the right effectExtent, extent including the effect
m_pSerializer->singleElementNS( XML_wp, XML_effectExtent,
- XML_l, "0", XML_t, "0", XML_r, "0", XML_b, "0",
- FSEND );
+ XML_l, "0", XML_t, "0", XML_r, "0", XML_b, "0" );
OUString sName("Object 1");
uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY );
@@ -5119,20 +4987,16 @@ void DocxAttributeOutput::WritePostponedChart()
docPr Id should be unique, ensuring the same here.
*/
m_pSerializer->singleElementNS( XML_wp, XML_docPr,
- XML_id, I32S( m_anchorId++ ),
- XML_name, sName.toUtf8(),
- FSEND );
+ XML_id, OString::number(m_anchorId++),
+ XML_name, sName.toUtf8() );
- m_pSerializer->singleElementNS( XML_wp, XML_cNvGraphicFramePr,
- FSEND );
+ m_pSerializer->singleElementNS(XML_wp, XML_cNvGraphicFramePr);
m_pSerializer->startElementNS( XML_a, XML_graphic,
- FSNS( XML_xmlns, XML_a ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ FSNS( XML_xmlns, XML_a ), GetExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8() );
m_pSerializer->startElementNS( XML_a, XML_graphicData,
- XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart",
- FSEND );
+ XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart" );
OString aRelId;
m_nChartCount++;
@@ -5140,10 +5004,9 @@ void DocxAttributeOutput::WritePostponedChart()
aRelId = m_rExport.OutputChart( xModel, m_nChartCount, m_pSerializer );
m_pSerializer->singleElementNS( XML_c, XML_chart,
- FSNS( XML_xmlns, XML_c ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(dmlChart)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_r ), OUStringToOString(GetExport().GetFilter().getNamespaceURL(OOX_NS(officeRel)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_r, XML_id ), aRelId.getStr(),
- FSEND );
+ 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_r, XML_id ), aRelId );
m_pSerializer->endElementNS( XML_a, XML_graphicData );
m_pSerializer->endElementNS( XML_a, XML_graphic );
@@ -5277,41 +5140,32 @@ void DocxAttributeOutput::WritePostponedFormControl(const SdrObject* pObject)
// output component
- m_pSerializer->startElementNS(XML_w, XML_sdt, FSEND);
- m_pSerializer->startElementNS(XML_w, XML_sdtPr, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_sdt);
+ m_pSerializer->startElementNS(XML_w, XML_sdtPr);
if (!sAlias.isEmpty())
m_pSerializer->singleElementNS(XML_w, XML_alias,
- FSNS(XML_w, XML_val), OUStringToOString(sAlias, RTL_TEXTENCODING_UTF8),
- FSEND);
+ FSNS(XML_w, XML_val), OUStringToOString(sAlias, RTL_TEXTENCODING_UTF8));
if (bHasDate)
- m_pSerializer->startElementNS(XML_w, XML_date,
- FSNS( XML_w, XML_fullDate ), sDate.getStr(),
- FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_date, FSNS(XML_w, XML_fullDate), sDate);
else
- m_pSerializer->startElementNS(XML_w, XML_date, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_date);
m_pSerializer->singleElementNS(XML_w, XML_dateFormat,
- FSNS(XML_w, XML_val),
- OUStringToOString( sDateFormat, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND);
+ FSNS(XML_w, XML_val), sDateFormat.toUtf8());
m_pSerializer->singleElementNS(XML_w, XML_lid,
- FSNS(XML_w, XML_val),
- OUStringToOString( sLocale, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND);
+ FSNS(XML_w, XML_val), sLocale.toUtf8());
m_pSerializer->singleElementNS(XML_w, XML_storeMappedDataAs,
- FSNS(XML_w, XML_val), "dateTime",
- FSEND);
+ FSNS(XML_w, XML_val), "dateTime");
m_pSerializer->singleElementNS(XML_w, XML_calendar,
- FSNS(XML_w, XML_val), "gregorian",
- FSEND);
+ FSNS(XML_w, XML_val), "gregorian");
m_pSerializer->endElementNS(XML_w, XML_date);
m_pSerializer->endElementNS(XML_w, XML_sdtPr);
- m_pSerializer->startElementNS(XML_w, XML_sdtContent, FSEND);
- m_pSerializer->startElementNS(XML_w, XML_r, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_sdtContent);
+ m_pSerializer->startElementNS(XML_w, XML_r);
if (aCharFormat.hasElements())
{
@@ -5335,26 +5189,23 @@ void DocxAttributeOutput::WritePostponedFormControl(const SdrObject* pObject)
// output component
- m_pSerializer->startElementNS(XML_w, XML_sdt, FSEND);
- m_pSerializer->startElementNS(XML_w, XML_sdtPr, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_sdt);
+ m_pSerializer->startElementNS(XML_w, XML_sdtPr);
- m_pSerializer->startElementNS(XML_w, XML_dropDownList, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_dropDownList);
for (sal_Int32 i=0; i < aItems.getLength(); ++i)
{
m_pSerializer->singleElementNS(XML_w, XML_listItem,
- FSNS(XML_w, XML_displayText),
- OUStringToOString( aItems[i], RTL_TEXTENCODING_UTF8 ).getStr(),
- FSNS(XML_w, XML_value),
- OUStringToOString( aItems[i], RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND);
+ FSNS(XML_w, XML_displayText), aItems[i].toUtf8(),
+ FSNS(XML_w, XML_value), aItems[i].toUtf8());
}
m_pSerializer->endElementNS(XML_w, XML_dropDownList);
m_pSerializer->endElementNS(XML_w, XML_sdtPr);
- m_pSerializer->startElementNS(XML_w, XML_sdtContent, FSEND);
- m_pSerializer->startElementNS(XML_w, XML_r, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_sdtContent);
+ m_pSerializer->startElementNS(XML_w, XML_r);
RunText(sText);
m_pSerializer->endElementNS(XML_w, XML_r);
m_pSerializer->endElementNS(XML_w, XML_sdtContent);
@@ -5387,14 +5238,14 @@ void DocxAttributeOutput::WriteActiveXControl(const SdrObject* pObject, const Sw
if(!bInsideRun)
{
- m_pSerializer->startElementNS(XML_w, XML_r, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_r);
}
// w:pict for floating embedded control and w:object for inline embedded control
if(bAnchoredInline)
- m_pSerializer->startElementNS(XML_w, XML_object, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_object);
else
- m_pSerializer->startElementNS(XML_w, XML_pict, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_pict);
// write ActiveX fragment and ActiveX binary
uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(pObject)->getUnoShape(), uno::UNO_QUERY);
@@ -5425,10 +5276,9 @@ void DocxAttributeOutput::WriteActiveXControl(const SdrObject* pObject, const Sw
// control
m_pSerializer->singleElementNS(XML_w, XML_control,
- FSNS(XML_r, XML_id), sRelIdAndName.first.getStr(),
- FSNS(XML_w, XML_name), sRelIdAndName.second.getStr(),
- FSNS(XML_w, XML_shapeid), sShapeId.getStr(),
- FSEND);
+ FSNS(XML_r, XML_id), sRelIdAndName.first,
+ FSNS(XML_w, XML_name), sRelIdAndName.second,
+ FSNS(XML_w, XML_shapeid), sShapeId);
if(bAnchoredInline)
m_pSerializer->endElementNS(XML_w, XML_object);
@@ -5563,17 +5413,16 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
m_pSerializer->startElementNS( XML_w, XML_object,
FSNS(XML_w, XML_dxaOrig), OString::number(aOriginalSize.Width()),
- FSNS(XML_w, XML_dyaOrig), OString::number(aOriginalSize.Height()),
- FSEND );
+ FSNS(XML_w, XML_dyaOrig), OString::number(aOriginalSize.Height()) );
}
catch ( uno::Exception& )
{
- m_pSerializer->startElementNS( XML_w, XML_object, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_object);
}
}
else
{
- m_pSerializer->startElementNS( XML_w, XML_object, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_object);
}
OStringBuffer sShapeStyle, sShapeId;
@@ -5586,26 +5435,23 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
m_pSerializer->startElementNS( XML_v, XML_shape,
XML_id, sShapeId.getStr(),
XML_style, sShapeStyle.getStr(),
- FSNS( XML_o, XML_ole ), "", //compulsory, even if it's empty
- FSEND );
+ FSNS( XML_o, XML_ole ), ""); //compulsory, even if it's empty
// shape filled with the preview image
m_pSerializer->singleElementNS( XML_v, XML_imagedata,
- FSNS( XML_r, XML_id ), OUStringToOString( sImageId, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSNS( XML_o, XML_title ), "",
- FSEND );
+ FSNS( XML_r, XML_id ), sImageId.toUtf8(),
+ FSNS( XML_o, XML_title ), "" );
m_pSerializer->endElementNS( XML_v, XML_shape );
// OLE object definition
m_pSerializer->singleElementNS( XML_o, XML_OLEObject,
XML_Type, "Embed",
- XML_ProgID, OUStringToOString( sProgID, RTL_TEXTENCODING_UTF8 ).getStr(),
+ XML_ProgID, sProgID.toUtf8(),
XML_ShapeID, sShapeId.getStr(),
- XML_DrawAspect, OUStringToOString( sDrawAspect, RTL_TEXTENCODING_UTF8 ).getStr(),
+ XML_DrawAspect, sDrawAspect.toUtf8(),
XML_ObjectID, "_" + OString::number(comphelper::rng::uniform_int_distribution(0, std::numeric_limits<int>::max())),
- FSNS( XML_r, XML_id ), sId.getStr(),
- FSEND );
+ FSNS( XML_r, XML_id ), sId );
m_pSerializer->endElementNS( XML_w, XML_object );
}
@@ -5796,7 +5642,7 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj)
sal_Int32 nPara = rEditObj.GetParagraphCount();
- m_pSerializer->startElementNS( XML_w, XML_txbxContent, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_txbxContent);
for (sal_Int32 n = 0; n < nPara; ++n)
{
if( n )
@@ -5817,10 +5663,10 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj)
do {
const sal_Int32 nNextAttr = std::min(aAttrIter.WhereNext(), nEnd);
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
// Write run properties.
- m_pSerializer->startElementNS(XML_w, XML_rPr, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
aAttrIter.OutAttr(nCurrentPos);
WriteCollectedRunProperties();
m_pSerializer->endElementNS(XML_w, XML_rPr);
@@ -6006,48 +5852,42 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
XFastAttributeListRef xStyleAttributeList(pStyleAttributeList);
m_pSerializer->startElementNS( XML_w, XML_style, xStyleAttributeList);
m_pSerializer->singleElementNS( XML_w, XML_name,
- FSNS( XML_w, XML_val ), pEnglishName ? pEnglishName : OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_val ), pEnglishName ? pEnglishName : rName.toUtf8() );
if ( nBase != 0x0FFF && eType != STYLE_TYPE_LIST)
{
m_pSerializer->singleElementNS( XML_w, XML_basedOn,
- FSNS( XML_w, XML_val ), m_rExport.m_pStyles->GetStyleId(nBase).getStr(),
- FSEND );
+ FSNS( XML_w, XML_val ), m_rExport.m_pStyles->GetStyleId(nBase) );
}
if ( nNext != nId && eType != STYLE_TYPE_LIST)
{
m_pSerializer->singleElementNS( XML_w, XML_next,
- FSNS( XML_w, XML_val ), m_rExport.m_pStyles->GetStyleId(nNext).getStr(),
- FSEND );
+ FSNS( XML_w, XML_val ), m_rExport.m_pStyles->GetStyleId(nNext) );
}
if (!aLink.isEmpty())
m_pSerializer->singleElementNS(XML_w, XML_link,
- FSNS(XML_w, XML_val), OUStringToOString(aLink, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
+ FSNS(XML_w, XML_val), aLink.toUtf8());
if ( bAutoUpdate )
- m_pSerializer->singleElementNS( XML_w, XML_autoRedefine, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_autoRedefine);
if (!aUiPriority.isEmpty())
m_pSerializer->singleElementNS(XML_w, XML_uiPriority,
- FSNS(XML_w, XML_val), OUStringToOString(aUiPriority, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
+ FSNS(XML_w, XML_val), aUiPriority.toUtf8());
if (bSemiHidden)
- m_pSerializer->singleElementNS(XML_w, XML_semiHidden, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_semiHidden);
if (bUnhideWhenUsed)
- m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed);
if (bQFormat || lcl_guessQFormat(rName, nWwId))
- m_pSerializer->singleElementNS(XML_w, XML_qFormat, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_qFormat);
if (bLocked)
- m_pSerializer->singleElementNS(XML_w, XML_locked, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_locked);
if (!aRsid.isEmpty())
m_pSerializer->singleElementNS(XML_w, XML_rsid,
- FSNS(XML_w, XML_val), OUStringToOString(aRsid, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
+ FSNS(XML_w, XML_val), aRsid.toUtf8());
}
void DocxAttributeOutput::EndStyle()
@@ -6059,12 +5899,12 @@ void DocxAttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 /*nSty
{
if ( bParProp )
{
- m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_pPr);
InitCollectedParagraphProperties();
}
else
{
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
InitCollectedRunProperties();
}
}
@@ -6100,8 +5940,7 @@ void lcl_OutlineLevel(sax_fastparser::FSHelperPtr const & pSerializer, sal_uInt1
nLevel = WW8ListManager::nMaxLevel - 1;
pSerializer->singleElementNS(XML_w, XML_outlineLvl,
- FSNS(XML_w, XML_val), OString::number(nLevel).getStr(),
- FSEND);
+ FSNS(XML_w, XML_val), OString::number(nLevel));
}
}
@@ -6120,11 +5959,10 @@ void DocxAttributeOutput::ParaOutlineLevel(const SfxUInt16Item& rItem)
void DocxAttributeOutput::PageBreakBefore( bool bBreak )
{
if ( bBreak )
- m_pSerializer->singleElementNS( XML_w, XML_pageBreakBefore, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_pageBreakBefore);
else
m_pSerializer->singleElementNS( XML_w, XML_pageBreakBefore,
- FSNS( XML_w, XML_val ), "false",
- FSEND );
+ FSNS( XML_w, XML_val ), "false" );
}
void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo )
@@ -6172,8 +6010,8 @@ void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectio
if ( !m_bParagraphOpened && !m_bIsFirstParagraph && bEmit )
{
// Create a dummy paragraph if needed
- m_pSerializer->startElementNS( XML_w, XML_p, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_p);
+ m_pSerializer->startElementNS(XML_w, XML_pPr);
m_rExport.SectionProperties( *pSectionInfo );
@@ -6189,9 +6027,8 @@ void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectio
}
else if ( m_bParagraphOpened )
{
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_br,
- FSNS( XML_w, XML_type ), "page", FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->singleElementNS(XML_w, XML_br, FSNS(XML_w, XML_type), "page");
m_pSerializer->endElementNS( XML_w, XML_r );
}
else
@@ -6216,7 +6053,7 @@ void DocxAttributeOutput::EndParaSdtBlock()
void DocxAttributeOutput::StartSection()
{
- m_pSerializer->startElementNS( XML_w, XML_sectPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_sectPr);
m_bOpenedSectPr = true;
// Write the elements in the spec order
@@ -6273,11 +6110,9 @@ void DocxAttributeOutput::EndSection()
void DocxAttributeOutput::SectionFormProtection( bool bProtected )
{
if ( bProtected )
- m_pSerializer->singleElementNS( XML_w, XML_formProt,
- FSNS( XML_w, XML_val ), "true", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_formProt, FSNS(XML_w, XML_val), "true");
else
- m_pSerializer->singleElementNS( XML_w, XML_formProt,
- FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_formProt, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo )
@@ -6296,7 +6131,7 @@ void DocxAttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLi
void DocxAttributeOutput::SectionTitlePage()
{
- m_pSerializer->singleElementNS( XML_w, XML_titlePg, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_titlePg);
}
void DocxAttributeOutput::SectionPageBorders( const SwFrameFormat* pFormat, const SwFrameFormat* /*pFirstPageFormat*/ )
@@ -6338,8 +6173,7 @@ void DocxAttributeOutput::SectionPageBorders( const SwFrameFormat* pFormat, cons
// All distances are relative to the text margins
m_pSerializer->startElementNS(XML_w, XML_pgBorders,
FSNS(XML_w, XML_display), "allPages",
- FSNS(XML_w, XML_offsetFrom), aOutputBorderOptions.pDistances->bFromEdge ? "page" : "text",
- FSEND);
+ FSNS(XML_w, XML_offsetFrom), aOutputBorderOptions.pDistances->bFromEdge ? "page" : "text");
std::map<SvxBoxItemLine, css::table::BorderLine2> aEmptyMap; // empty styles map
impl_borders( m_pSerializer, rBox, aOutputBorderOptions, aEmptyMap );
@@ -6351,7 +6185,7 @@ void DocxAttributeOutput::SectionPageBorders( const SwFrameFormat* pFormat, cons
void DocxAttributeOutput::SectionBiDi( bool bBiDi )
{
if ( bBiDi )
- m_pSerializer->singleElementNS( XML_w, XML_bidi, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_bidi);
}
static OString impl_NumberingType( sal_uInt16 nNumberingType )
@@ -6504,7 +6338,7 @@ void DocxAttributeOutput::SectionType( sal_uInt8 nBreakCode )
default: pType = "continuous"; break;
}
- m_pSerializer->singleElementNS(XML_w, XML_type, FSNS(XML_w, XML_val), pType, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_type, FSNS(XML_w, XML_val), pType);
}
void DocxAttributeOutput::TextVerticalAdjustment( const drawing::TextVerticalAdjust nVA )
@@ -6512,16 +6346,13 @@ void DocxAttributeOutput::TextVerticalAdjustment( const drawing::TextVerticalAdj
switch( nVA )
{
case drawing::TextVerticalAdjust_CENTER:
- m_pSerializer->singleElementNS( XML_w, XML_vAlign,
- FSNS( XML_w, XML_val ), "center", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vAlign, FSNS(XML_w, XML_val), "center");
break;
case drawing::TextVerticalAdjust_BOTTOM:
- m_pSerializer->singleElementNS( XML_w, XML_vAlign,
- FSNS( XML_w, XML_val ), "bottom", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vAlign, FSNS(XML_w, XML_val), "bottom");
break;
case drawing::TextVerticalAdjust_BLOCK: //justify
- m_pSerializer->singleElementNS( XML_w, XML_vAlign,
- FSNS( XML_w, XML_val ), "both", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vAlign, FSNS(XML_w, XML_val), "both");
break;
default:
break;
@@ -6530,9 +6361,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 ), OUStringToOString( rFamilyName, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_font, FSNS(XML_w, XML_name), rFamilyName.toUtf8());
}
void DocxAttributeOutput::EndFont() const
@@ -6542,9 +6371,7 @@ void DocxAttributeOutput::EndFont() const
void DocxAttributeOutput::FontAlternateName( const OUString& rName ) const
{
- m_pSerializer->singleElementNS( XML_w, XML_altName,
- FSNS( XML_w, XML_val ), OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_altName, FSNS(XML_w, XML_val), rName.toUtf8());
}
void DocxAttributeOutput::FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const
@@ -6578,7 +6405,7 @@ void DocxAttributeOutput::FontFamilyType( FontFamily eFamily ) const
default: pFamily = "auto"; break; // no font family
}
- m_pSerializer->singleElementNS(XML_w, XML_family, FSNS(XML_w, XML_val), pFamily, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_family, FSNS(XML_w, XML_val), pFamily);
}
void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
@@ -6591,7 +6418,7 @@ void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
default: pPitch = "default"; break; // no info about the pitch
}
- m_pSerializer->singleElementNS(XML_w, XML_pitch, FSNS(XML_w, XML_val), pPitch, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_pitch, FSNS(XML_w, XML_val), pPitch);
}
void DocxAttributeOutput::EmbedFont( const OUString& name, FontFamily family, FontPitch pitch )
@@ -6685,8 +6512,7 @@ void DocxAttributeOutput::EmbedFontStyle( const OUString& name, int tag, FontFam
}
m_pSerializer->singleElementNS( XML_w, tag,
FSNS( XML_r, XML_id ), fontFilesMap[ fontUrl ].relId,
- FSNS( XML_w, XML_fontKey ), fontFilesMap[ fontUrl ].fontKey,
- FSEND );
+ FSNS( XML_w, XML_fontKey ), fontFilesMap[ fontUrl ].fontKey );
}
OString DocxAttributeOutput::TransHighlightColor( sal_uInt8 nIco )
@@ -6720,13 +6546,9 @@ void DocxAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &
// TODO check that this is actually true & fix if not ;-)
OString aId( OString::number( nId ) );
- m_pSerializer->startElementNS( XML_w, XML_num,
- FSNS( XML_w, XML_numId ), aId.getStr(),
- FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_num, FSNS(XML_w, XML_numId), aId);
- m_pSerializer->singleElementNS( XML_w, XML_abstractNumId,
- FSNS( XML_w, XML_val ), aId.getStr(),
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_abstractNumId, FSNS(XML_w, XML_val), aId);
#if OSL_DEBUG_LEVEL > 1
// TODO ww8 version writes this, anything to do about it here?
@@ -6744,8 +6566,7 @@ void DocxAttributeOutput::StartAbstractNumbering( sal_uInt16 nId )
const SwNumRule* pRule = (*m_rExport.m_pUsedNumTable)[nId - 1];
m_bExportingOutline = pRule && pRule->IsOutlineRule();
m_pSerializer->startElementNS( XML_w, XML_abstractNum,
- FSNS( XML_w, XML_abstractNumId ), OString::number( nId ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_abstractNumId ), OString::number(nId) );
}
void DocxAttributeOutput::EndAbstractNumbering()
@@ -6767,9 +6588,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
const OUString &rNumberingString,
const SvxBrushItem* pBrush)
{
- m_pSerializer->startElementNS( XML_w, XML_lvl,
- FSNS( XML_w, XML_ilvl ), OString::number( nLevel ).getStr(),
- FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_lvl, FSNS(XML_w, XML_ilvl), OString::number(nLevel));
// start with the nStart value. Do not write w:start if Numbered Lists
// starts from zero.As it's an optional parameter.
@@ -6777,8 +6596,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
if(!(0 == nLevel && 0 == nStart))
{
m_pSerializer->singleElementNS( XML_w, XML_start,
- FSNS( XML_w, XML_val ), OString::number( nStart ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_val ), OString::number(nStart) );
}
if (m_bExportingOutline)
@@ -6786,16 +6604,13 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
sal_uInt16 nId = m_rExport.m_pStyles->GetHeadingParagraphStyleId( nLevel );
if ( nId != SAL_MAX_UINT16 )
m_pSerializer->singleElementNS( XML_w, XML_pStyle ,
- FSNS( XML_w, XML_val ), m_rExport.m_pStyles->GetStyleId(nId).getStr(),
- FSEND );
+ FSNS( XML_w, XML_val ), m_rExport.m_pStyles->GetStyleId(nId) );
}
// format
OString aFormat( impl_LevelNFC( nNumberingType ,pOutSet) );
if ( !aFormat.isEmpty() )
- m_pSerializer->singleElementNS( XML_w, XML_numFmt,
- FSNS( XML_w, XML_val ), aFormat.getStr(),
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_numFmt, FSNS(XML_w, XML_val), aFormat);
// suffix
const char *pSuffix = nullptr;
@@ -6806,9 +6621,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
default: /*pSuffix = "tab";*/ break;
}
if ( pSuffix )
- m_pSerializer->singleElementNS( XML_w, XML_suff,
- FSNS( XML_w, XML_val ), pSuffix,
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_suff, FSNS(XML_w, XML_val), pSuffix);
// text
OUStringBuffer aBuffer( rNumberingString.getLength() + WW8ListManager::nMaxLevel );
@@ -6836,7 +6649,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
// If bullet char is empty, set lvlText as empty
if ( rNumberingString == OUStringLiteral1(0) && nNumberingType == SVX_NUM_CHAR_SPECIAL )
{
- m_pSerializer->singleElementNS( XML_w, XML_lvlText, FSNS( XML_w, XML_val ), "", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_lvlText, FSNS(XML_w, XML_val), "");
}
else
{
@@ -6845,7 +6658,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(), FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_lvlText, FSNS(XML_w, XML_val), aLevelText.toUtf8());
}
// bullet
@@ -6855,8 +6668,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
if (nIndex != -1)
{
m_pSerializer->singleElementNS(XML_w, XML_lvlPicBulletId,
- FSNS(XML_w, XML_val), OString::number(nIndex).getStr(),
- FSEND);
+ FSNS(XML_w, XML_val), OString::number(nIndex));
}
}
@@ -6869,45 +6681,40 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
case SvxAdjust::Right: pJc = !ecmaDialect ? "end" : "right"; break;
default: pJc = !ecmaDialect ? "start" : "left"; break;
}
- m_pSerializer->singleElementNS( XML_w, XML_lvlJc,
- FSNS( XML_w, XML_val ), pJc,
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_lvlJc, FSNS(XML_w, XML_val), pJc);
// indentation
- m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_pPr);
if( nListTabPos != 0 )
{
- m_pSerializer->startElementNS( XML_w, XML_tabs, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_tabs);
m_pSerializer->singleElementNS( XML_w, XML_tab,
FSNS( XML_w, XML_val ), "num",
- FSNS( XML_w, XML_pos ), OString::number( nListTabPos ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_pos ), OString::number(nListTabPos) );
m_pSerializer->endElementNS( XML_w, XML_tabs );
}
sal_Int32 nToken = ecmaDialect ? XML_left : XML_start;
sal_Int32 nIndentToken = nFirstLineIndex > 0 ? XML_firstLine : XML_hanging;
m_pSerializer->singleElementNS( XML_w, XML_ind,
- FSNS( XML_w, nToken ), OString::number( nIndentAt ).getStr(),
- FSNS( XML_w, nIndentToken ), OString::number( abs(nFirstLineIndex) ).getStr(),
- FSEND );
+ FSNS( XML_w, nToken ), OString::number(nIndentAt),
+ FSNS( XML_w, nIndentToken ), OString::number(abs(nFirstLineIndex)) );
m_pSerializer->endElementNS( XML_w, XML_pPr );
// font
if ( pOutSet )
{
- m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
if ( pFont )
{
GetExport().GetId( *pFont ); // ensure font info is written to fontTable.xml
OString aFamilyName( OUStringToOString( pFont->GetFamilyName(), RTL_TEXTENCODING_UTF8 ) );
m_pSerializer->singleElementNS( XML_w, XML_rFonts,
- FSNS( XML_w, XML_ascii ), aFamilyName.getStr(),
- FSNS( XML_w, XML_hAnsi ), aFamilyName.getStr(),
- FSNS( XML_w, XML_cs ), aFamilyName.getStr(),
- FSNS( XML_w, XML_hint ), "default",
- FSEND );
+ FSNS( XML_w, XML_ascii ), aFamilyName,
+ FSNS( XML_w, XML_hAnsi ), aFamilyName,
+ FSNS( XML_w, XML_cs ), aFamilyName,
+ FSNS( XML_w, XML_hint ), "default" );
}
m_rExport.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rExport.m_bExportModeRTF );
@@ -6926,14 +6733,14 @@ void DocxAttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap )
switch ( rCaseMap.GetValue() )
{
case SvxCaseMap::SmallCaps:
- m_pSerializer->singleElementNS( XML_w, XML_smallCaps, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_smallCaps);
break;
case SvxCaseMap::Uppercase:
- m_pSerializer->singleElementNS( XML_w, XML_caps, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_caps);
break;
default: // Something that ooxml does not support
- m_pSerializer->singleElementNS( XML_w, XML_smallCaps, FSNS( XML_w, XML_val ), "false", FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_caps, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_smallCaps, FSNS(XML_w, XML_val), "false");
+ m_pSerializer->singleElementNS(XML_w, XML_caps, FSNS(XML_w, XML_val), "false");
break;
}
}
@@ -6956,9 +6763,9 @@ void DocxAttributeOutput::CharColor( const SvxColorItem& rColor )
void DocxAttributeOutput::CharContour( const SvxContourItem& rContour )
{
if ( rContour.GetValue() )
- m_pSerializer->singleElementNS( XML_w, XML_outline, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_outline);
else
- m_pSerializer->singleElementNS( XML_w, XML_outline, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_outline, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
@@ -6966,14 +6773,14 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
switch ( rCrossedOut.GetStrikeout() )
{
case STRIKEOUT_DOUBLE:
- m_pSerializer->singleElementNS( XML_w, XML_dstrike, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_dstrike);
break;
case STRIKEOUT_NONE:
- m_pSerializer->singleElementNS( XML_w, XML_dstrike, FSNS( XML_w, XML_val ), "false", FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_strike, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_dstrike, FSNS(XML_w, XML_val), "false");
+ m_pSerializer->singleElementNS(XML_w, XML_strike, FSNS(XML_w, XML_val), "false");
break;
default:
- m_pSerializer->singleElementNS( XML_w, XML_strike, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_strike);
break;
}
}
@@ -6997,22 +6804,19 @@ void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
}
if ( !sIss.isEmpty() )
- m_pSerializer->singleElementNS( XML_w, XML_vertAlign,
- FSNS( XML_w, XML_val ), sIss.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vertAlign, FSNS(XML_w, XML_val), sIss);
const SvxFontHeightItem& rItem = m_rExport.GetItem(RES_CHRATR_FONTSIZE);
if (sIss.isEmpty() || sIss.match("baseline"))
{
long nHeight = rItem.GetHeight();
OString sPos = OString::number( ( nHeight * nEsc + 500 ) / 1000 );
- m_pSerializer->singleElementNS( XML_w, XML_position,
- FSNS( XML_w, XML_val ), sPos.getStr( ), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_position, FSNS(XML_w, XML_val), sPos);
if( ( 100 != nProp || sIss.match( "baseline" ) ) && !m_rExport.m_bFontSizeWritten )
{
OString sSize = OString::number( ( nHeight * nProp + 500 ) / 1000 );
- m_pSerializer->singleElementNS( XML_w, XML_sz,
- FSNS( XML_w, XML_val ), sSize.getStr( ), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_sz, FSNS(XML_w, XML_val), sSize);
}
}
}
@@ -7049,10 +6853,10 @@ void DocxAttributeOutput::CharFontSize( const SvxFontHeightItem& rFontSize)
{
case RES_CHRATR_FONTSIZE:
case RES_CHRATR_CJK_FONTSIZE:
- m_pSerializer->singleElementNS( XML_w, XML_sz, FSNS( XML_w, XML_val ), fontSize.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_sz, FSNS(XML_w, XML_val), fontSize);
break;
case RES_CHRATR_CTL_FONTSIZE:
- m_pSerializer->singleElementNS( XML_w, XML_szCs, FSNS( XML_w, XML_val ), fontSize.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_szCs, FSNS(XML_w, XML_val), fontSize);
break;
}
}
@@ -7060,7 +6864,7 @@ void DocxAttributeOutput::CharFontSize( const SvxFontHeightItem& rFontSize)
void DocxAttributeOutput::CharKerning( const SvxKerningItem& rKerning )
{
OString aKerning = OString::number( rKerning.GetValue() );
- m_pSerializer->singleElementNS( XML_w, XML_spacing, FSNS(XML_w, XML_val), aKerning.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_spacing, FSNS(XML_w, XML_val), aKerning);
}
void DocxAttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
@@ -7086,17 +6890,17 @@ void DocxAttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
void DocxAttributeOutput::CharPosture( const SvxPostureItem& rPosture )
{
if ( rPosture.GetPosture() != ITALIC_NONE )
- m_pSerializer->singleElementNS( XML_w, XML_i, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_i);
else
- m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_i, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::CharShadow( const SvxShadowedItem& rShadow )
{
if ( rShadow.GetValue() )
- m_pSerializer->singleElementNS( XML_w, XML_shadow, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_shadow);
else
- m_pSerializer->singleElementNS( XML_w, XML_shadow, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_shadow, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
@@ -7132,22 +6936,21 @@ void DocxAttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
// Underline has a color
m_pSerializer->singleElementNS( XML_w, XML_u,
FSNS( XML_w, XML_val ), pUnderlineValue,
- FSNS( XML_w, XML_color ), msfilter::util::ConvertColor( aUnderlineColor ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_color ), msfilter::util::ConvertColor(aUnderlineColor) );
}
else
{
// Underline has no color
- m_pSerializer->singleElementNS( XML_w, XML_u, FSNS( XML_w, XML_val ), pUnderlineValue, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_u, FSNS(XML_w, XML_val), pUnderlineValue);
}
}
void DocxAttributeOutput::CharWeight( const SvxWeightItem& rWeight )
{
if ( rWeight.GetWeight() == WEIGHT_BOLD )
- m_pSerializer->singleElementNS( XML_w, XML_b, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_b);
else
- m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_b, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& rAutoKern )
@@ -7155,15 +6958,15 @@ void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& rAutoKern )
// auto kerning is bound to a minimum font size in Word - but is just a boolean in Writer :-(
// kerning is based on half-point sizes, so 2 enables kerning for fontsize 1pt or higher. (1 is treated as size 12, and 0 is treated as disabled.)
const OString sFontSize = OString::number( static_cast<sal_uInt32>(rAutoKern.GetValue()) * 2 );
- m_pSerializer->singleElementNS(XML_w, XML_kern, FSNS( XML_w, XML_val ), sFontSize.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_kern, FSNS(XML_w, XML_val), sFontSize);
}
void DocxAttributeOutput::CharAnimatedText( const SvxBlinkItem& rBlink )
{
if ( rBlink.GetValue() )
- m_pSerializer->singleElementNS(XML_w, XML_effect, FSNS( XML_w, XML_val ), "blinkBackground", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_effect, FSNS(XML_w, XML_val), "blinkBackground");
else
- m_pSerializer->singleElementNS(XML_w, XML_effect, FSNS( XML_w, XML_val ), "none", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_effect, FSNS(XML_w, XML_val), "none");
}
#define MSWORD_CH_SHADING_FILL "FFFFFF" // The attribute w:fill of w:shd, for MS-Word's character shading,
@@ -7178,15 +6981,13 @@ void DocxAttributeOutput::CharBackground( const SvxBrushItem& rBrush )
m_pSerializer->singleElementNS( XML_w, XML_shd,
FSNS( XML_w, XML_val ), MSWORD_CH_SHADING_VAL,
FSNS( XML_w, XML_color ), MSWORD_CH_SHADING_COLOR,
- FSNS( XML_w, XML_fill ), MSWORD_CH_SHADING_FILL,
- FSEND );
+ FSNS( XML_w, XML_fill ), MSWORD_CH_SHADING_FILL );
}
else
{
m_pSerializer->singleElementNS( XML_w, XML_shd,
- FSNS( XML_w, XML_fill ), msfilter::util::ConvertColor( rBrush.GetColor() ).getStr(),
- FSNS( XML_w, XML_val ), "clear",
- FSEND );
+ FSNS( XML_w, XML_fill ), msfilter::util::ConvertColor(rBrush.GetColor()),
+ FSNS( XML_w, XML_val ), "clear" );
}
}
@@ -7208,17 +7009,17 @@ void DocxAttributeOutput::CharFontCJK( const SvxFontItem& rFont )
void DocxAttributeOutput::CharPostureCJK( const SvxPostureItem& rPosture )
{
if ( rPosture.GetPosture() != ITALIC_NONE )
- m_pSerializer->singleElementNS( XML_w, XML_i, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_i);
else
- m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_i, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::CharWeightCJK( const SvxWeightItem& rWeight )
{
if ( rWeight.GetWeight() == WEIGHT_BOLD )
- m_pSerializer->singleElementNS( XML_w, XML_b, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_b);
else
- m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_b, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::CharFontCTL( const SvxFontItem& rFont )
@@ -7239,17 +7040,17 @@ void DocxAttributeOutput::CharFontCTL( const SvxFontItem& rFont )
void DocxAttributeOutput::CharPostureCTL( const SvxPostureItem& rPosture)
{
if ( rPosture.GetPosture() != ITALIC_NONE )
- m_pSerializer->singleElementNS( XML_w, XML_iCs, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_iCs);
else
- m_pSerializer->singleElementNS( XML_w, XML_iCs, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_iCs, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::CharWeightCTL( const SvxWeightItem& rWeight )
{
if ( rWeight.GetWeight() == WEIGHT_BOLD )
- m_pSerializer->singleElementNS( XML_w, XML_bCs, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_bCs);
else
- m_pSerializer->singleElementNS( XML_w, XML_bCs, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_bCs, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::CharBidiRTL( const SfxPoolItem& )
@@ -7288,7 +7089,7 @@ void DocxAttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasis
else
pEmphasis = "none";
- m_pSerializer->singleElementNS( XML_w, XML_em, FSNS( XML_w, XML_val ), pEmphasis, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_em, FSNS(XML_w, XML_val), pEmphasis);
}
void DocxAttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
@@ -7322,7 +7123,7 @@ void DocxAttributeOutput::CharScaleWidth( const SvxCharScaleWidthItem& rScaleWid
const sal_Int16 nScaleWidth( std::max<sal_Int16>( 1,
std::min<sal_Int16>( rScaleWidth.GetValue(), 600 ) ) );
m_pSerializer->singleElementNS( XML_w, XML_w,
- FSNS( XML_w, XML_val ), OString::number( nScaleWidth ).getStr(), FSEND );
+ FSNS( XML_w, XML_val ), OString::number(nScaleWidth) );
}
void DocxAttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
@@ -7330,14 +7131,14 @@ void DocxAttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
switch ( rRelief.GetValue() )
{
case FontRelief::Embossed:
- m_pSerializer->singleElementNS( XML_w, XML_emboss, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_emboss);
break;
case FontRelief::Engraved:
- m_pSerializer->singleElementNS( XML_w, XML_imprint, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_imprint);
break;
default:
- m_pSerializer->singleElementNS( XML_w, XML_emboss, FSNS( XML_w, XML_val ), "false", FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_imprint, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_emboss, FSNS(XML_w, XML_val), "false");
+ m_pSerializer->singleElementNS(XML_w, XML_imprint, FSNS(XML_w, XML_val), "false");
break;
}
}
@@ -7345,9 +7146,9 @@ void DocxAttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
void DocxAttributeOutput::CharHidden( const SvxCharHiddenItem& rHidden )
{
if ( rHidden.GetValue() )
- m_pSerializer->singleElementNS( XML_w, XML_vanish, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vanish);
else
- m_pSerializer->singleElementNS( XML_w, XML_vanish, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_vanish, FSNS(XML_w, XML_val), "false");
}
void DocxAttributeOutput::CharBorder(
@@ -7361,8 +7162,7 @@ void DocxAttributeOutput::CharHighlight( const SvxBrushItem& rHighlight )
const OString sColor = TransHighlightColor( msfilter::util::TransColToIco(rHighlight.GetColor()) );
if ( !sColor.isEmpty() )
{
- m_pSerializer->singleElementNS( XML_w, XML_highlight,
- FSNS( XML_w, XML_val ), sColor.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_highlight, FSNS(XML_w, XML_val), sColor);
}
}
@@ -7373,14 +7173,14 @@ void DocxAttributeOutput::TextINetFormat( const SwFormatINetFormat& rLink )
OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(pCharFormat)));
- m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_rStyle, FSNS(XML_w, XML_val), aStyleId);
}
void DocxAttributeOutput::TextCharFormat( const SwFormatCharFormat& rCharFormat )
{
OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(rCharFormat.GetCharFormat())));
- m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_rStyle, FSNS(XML_w, XML_val), aStyleId);
}
void DocxAttributeOutput::RefField( const SwField& rField, const OUString& rRef )
@@ -7429,7 +7229,7 @@ void DocxAttributeOutput::WritePostitFieldReference()
OString idname = OUStringToOString(m_postitFields[m_postitFieldsMaxId].first->GetName(), RTL_TEXTENCODING_UTF8);
std::map< OString, sal_Int32 >::iterator it = m_rOpenedAnnotationMarksIds.find( idname );
if ( it == m_rOpenedAnnotationMarksIds.end( ) )
- m_pSerializer->singleElementNS( XML_w, XML_commentReference, FSNS( XML_w, XML_id ), idstr.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_commentReference, FSNS(XML_w, XML_id), idstr);
++m_postitFieldsMaxId;
}
}
@@ -7440,10 +7240,10 @@ 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.getStr(),
- FSNS( XML_w, XML_author ), OUStringToOString( f->GetPar1(), RTL_TEXTENCODING_UTF8 ).getStr(),
- FSNS( XML_w, XML_date ), DateTimeToOString(f->GetDateTime()).getStr(),
- FSNS( XML_w, XML_initials ), OUStringToOString( f->GetInitials(), RTL_TEXTENCODING_UTF8 ).getStr(), FSEND );
+ 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_date ), DateTimeToOString(f->GetDateTime()),
+ FSNS( XML_w, XML_initials ), f->GetInitials().toUtf8() );
if (f->GetTextObject() != nullptr)
{
@@ -7454,8 +7254,8 @@ void DocxAttributeOutput::WritePostitFields()
{
// just plain text - eg. when the field was created via the
// .uno:InsertAnnotation API
- m_pSerializer->startElementNS(XML_w, XML_p, FSEND);
- m_pSerializer->startElementNS(XML_w, XML_r, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_p);
+ m_pSerializer->startElementNS(XML_w, XML_r);
RunText(f->GetText());
m_pSerializer->endElementNS(XML_w, XML_r);
m_pSerializer->endElementNS(XML_w, XML_p);
@@ -7487,17 +7287,17 @@ void DocxAttributeOutput::WritePendingPlaceholder()
return;
const SwField* pField = pendingPlaceholder;
pendingPlaceholder = nullptr;
- m_pSerializer->startElementNS( XML_w, XML_sdt, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_sdtPr, FSEND );
+ 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 ), OUStringToOString( pField->GetPar2(), RTL_TEXTENCODING_UTF8 ), FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_temporary, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_showingPlcHdr, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_text, FSEND );
+ FSNS( XML_w, XML_val ), pField->GetPar2().toUtf8() );
+ m_pSerializer->singleElementNS(XML_w, XML_temporary);
+ m_pSerializer->singleElementNS(XML_w, XML_showingPlcHdr);
+ m_pSerializer->singleElementNS(XML_w, XML_text);
m_pSerializer->endElementNS( XML_w, XML_sdtPr );
- m_pSerializer->startElementNS( XML_w, XML_sdtContent, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_sdtContent);
+ m_pSerializer->startElementNS(XML_w, XML_r);
RunText( pField->GetPar1());
m_pSerializer->endElementNS( XML_w, XML_r );
m_pSerializer->endElementNS( XML_w, XML_sdtContent );
@@ -7645,7 +7445,7 @@ void DocxAttributeOutput::TextFootnote_Impl( const SwFormatFootnote& rFootnote )
OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(pCharFormat)));
- m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_rStyle, FSNS(XML_w, XML_val), aStyleId);
// remember the footnote/endnote to
// 1) write the footnoteReference/endnoteReference in EndRunProperties()
@@ -7676,17 +7476,14 @@ void DocxAttributeOutput::FootnoteEndnoteReference()
if ( pFootnote->GetNumStr().isEmpty() )
{
// autonumbered
- m_pSerializer->singleElementNS( XML_w, nToken,
- FSNS( XML_w, XML_id ), OString::number( nId ).getStr(),
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, nToken, FSNS(XML_w, XML_id), OString::number(nId));
}
else
{
// not autonumbered
m_pSerializer->singleElementNS( XML_w, nToken,
FSNS( XML_w, XML_customMarkFollows ), "1",
- FSNS( XML_w, XML_id ), OString::number( nId ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_id ), OString::number(nId) );
RunText( pFootnote->GetNumStr() );
}
@@ -7706,11 +7503,10 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes )
// separator
m_pSerializer->startElementNS( XML_w, nItem,
- FSNS( XML_w, XML_id ), OString::number( nIndex++ ).getStr(),
- FSNS( XML_w, XML_type ), "separator",
- FSEND );
- m_pSerializer->startElementNS( XML_w, XML_p, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ FSNS( XML_w, XML_id ), OString::number(nIndex++),
+ FSNS( XML_w, XML_type ), "separator" );
+ m_pSerializer->startElementNS(XML_w, XML_p);
+ m_pSerializer->startElementNS(XML_w, XML_r);
bool bSeparator = true;
if (bFootnotes)
@@ -7721,19 +7517,18 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes )
}
if (bSeparator)
- m_pSerializer->singleElementNS( XML_w, XML_separator, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_separator);
m_pSerializer->endElementNS( XML_w, XML_r );
m_pSerializer->endElementNS( XML_w, XML_p );
m_pSerializer->endElementNS( XML_w, nItem );
// separator
m_pSerializer->startElementNS( XML_w, nItem,
- FSNS( XML_w, XML_id ), OString::number( nIndex++ ).getStr(),
- FSNS( XML_w, XML_type ), "continuationSeparator",
- FSEND );
- m_pSerializer->startElementNS( XML_w, XML_p, FSEND );
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_continuationSeparator, FSEND );
+ FSNS( XML_w, XML_id ), OString::number(nIndex++),
+ FSNS( XML_w, XML_type ), "continuationSeparator" );
+ m_pSerializer->startElementNS(XML_w, XML_p);
+ m_pSerializer->startElementNS(XML_w, XML_r);
+ m_pSerializer->singleElementNS(XML_w, XML_continuationSeparator);
m_pSerializer->endElementNS( XML_w, XML_r );
m_pSerializer->endElementNS( XML_w, XML_p );
m_pSerializer->endElementNS( XML_w, nItem );
@@ -7743,9 +7538,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes )
// footnotes/endnotes themselves
for ( const auto& rpItem : rVector )
{
- m_pSerializer->startElementNS( XML_w, nItem,
- FSNS( XML_w, XML_id ), OString::number( nIndex ).getStr(),
- FSEND );
+ m_pSerializer->startElementNS(XML_w, nItem, FSNS(XML_w, XML_id), OString::number(nIndex));
const SwNodeIndex* pIndex = rpItem->GetTextFootnote()->GetStartNode();
// tag required at the start of each footnote/endnote
@@ -7766,7 +7559,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes )
void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr const & fs, int tag,
const SwEndNoteInfo& info, int listtag )
{
- fs->startElementNS( XML_w, tag, FSEND );
+ fs->startElementNS(XML_w, tag);
const char* fmt = nullptr;
switch( info.aFormat.GetNumberingType())
{
@@ -7799,10 +7592,10 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr
break; // no format
}
if( fmt != nullptr )
- fs->singleElementNS( XML_w, XML_numFmt, FSNS( XML_w, XML_val ), fmt, FSEND );
+ fs->singleElementNS(XML_w, XML_numFmt, FSNS(XML_w, XML_val), fmt);
if( info.nFootnoteOffset != 0 )
fs->singleElementNS( XML_w, XML_numStart, FSNS( XML_w, XML_val ),
- OString::number( info.nFootnoteOffset + 1).getStr(), FSEND );
+ OString::number(info.nFootnoteOffset + 1) );
const SwFootnoteInfo* pFootnoteInfo = dynamic_cast<const SwFootnoteInfo*>(&info);
if( pFootnoteInfo )
@@ -7814,13 +7607,13 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr
default: fmt = nullptr; break;
}
if( fmt != nullptr )
- fs->singleElementNS( XML_w, XML_numRestart, FSNS( XML_w, XML_val ), fmt, FSEND );
+ fs->singleElementNS(XML_w, XML_numRestart, FSNS(XML_w, XML_val), fmt);
}
if( listtag != 0 ) // we are writing to settings.xml, write also special footnote/endnote list
{ // there are currently only two hardcoded ones ( see FootnotesEndnotes())
- fs->singleElementNS( XML_w, listtag, FSNS( XML_w, XML_id ), "0", FSEND );
- fs->singleElementNS( XML_w, listtag, FSNS( XML_w, XML_id ), "1", FSEND );
+ fs->singleElementNS(XML_w, listtag, FSNS(XML_w, XML_id), "0");
+ fs->singleElementNS(XML_w, listtag, FSNS(XML_w, XML_id), "1");
}
fs->endElementNS( XML_w, tag );
}
@@ -7915,23 +7708,23 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
default:
return; // not supported attribute
}
- m_pSerializer->singleElementNS( XML_w, XML_jc, FSNS( XML_w, XML_val ), pAdjustString, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_jc, FSNS(XML_w, XML_val), pAdjustString);
}
void DocxAttributeOutput::ParaSplit( const SvxFormatSplitItem& rSplit )
{
if (rSplit.GetValue())
- m_pSerializer->singleElementNS( XML_w, XML_keepLines, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_keepLines, FSNS(XML_w, XML_val), "false");
else
- m_pSerializer->singleElementNS( XML_w, XML_keepLines, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_keepLines);
}
void DocxAttributeOutput::ParaWidows( const SvxWidowsItem& rWidows )
{
if (rWidows.GetValue())
- m_pSerializer->singleElementNS( XML_w, XML_widowControl, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_widowControl);
else
- m_pSerializer->singleElementNS( XML_w, XML_widowControl, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_widowControl, FSNS(XML_w, XML_val), "false");
}
static void impl_WriteTabElement( FSHelperPtr const & pSerializer,
@@ -7976,7 +7769,7 @@ static void impl_WriteTabElement( FSHelperPtr const & pSerializer,
else
pTabElementAttrList->add( FSNS( XML_w, XML_leader ), OString( "none" ) );
- pSerializer->singleElementNS( XML_w, XML_tab, pTabElementAttrList );
+ pSerializer->singleElementNS(XML_w, XML_tab, pTabElementAttrList);
}
void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
@@ -7998,7 +7791,7 @@ void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
return;
}
- m_pSerializer->startElementNS( XML_w, XML_tabs, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_tabs);
// Get offset for tabs
// In DOCX, w:pos specifies the position of the current custom tab stop with respect to the current page margins.
@@ -8018,8 +7811,7 @@ void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
{
m_pSerializer->singleElementNS( XML_w, XML_tab,
FSNS( XML_w, XML_val ), "clear",
- FSNS( XML_w, XML_pos ), OString::number(pInheritedTabs->At(i).GetTabPos()),
- FSEND );
+ FSNS( XML_w, XML_pos ), OString::number(pInheritedTabs->At(i).GetTabPos()) );
}
}
@@ -8037,8 +7829,7 @@ void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
void DocxAttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone )
{
m_pSerializer->singleElementNS( XML_w, XML_suppressAutoHyphens,
- FSNS( XML_w, XML_val ), OString::boolean( !rHyphenZone.IsHyphen() ),
- FSEND );
+ FSNS( XML_w, XML_val ), OString::boolean( !rHyphenZone.IsHyphen() ) );
}
void DocxAttributeOutput::ParaNumRule_Impl( const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId )
@@ -8052,9 +7843,11 @@ void DocxAttributeOutput::ParaNumRule_Impl( const SwTextNode* pTextNd, sal_Int32
// Do not export outline rules (Chapter Numbering) as paragraph properties, only as style properties.
if ( !pTextNd || !bOutlineRule )
{
- m_pSerializer->startElementNS( XML_w, XML_numPr, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_ilvl, FSNS( XML_w, XML_val ), OString::number( nLvl).getStr(), FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_numId, FSNS( XML_w, XML_val ), OString::number( nNumId).getStr(), FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_numPr);
+ m_pSerializer->singleElementNS(XML_w, XML_ilvl,
+ FSNS(XML_w, XML_val), OString::number(nLvl));
+ m_pSerializer->singleElementNS(XML_w, XML_numId,
+ FSNS(XML_w, XML_val), OString::number(nNumId));
m_pSerializer->endElementNS( XML_w, XML_numPr );
}
}
@@ -8063,22 +7856,19 @@ void DocxAttributeOutput::ParaNumRule_Impl( const SwTextNode* pTextNd, sal_Int32
void DocxAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
m_pSerializer->singleElementNS( XML_w, XML_autoSpaceDE,
- FSNS( XML_w, XML_val ), OString::boolean( rScriptSpace.GetValue() ),
- FSEND );
+ FSNS( XML_w, XML_val ), OString::boolean( rScriptSpace.GetValue() ) );
}
void DocxAttributeOutput::ParaHangingPunctuation( const SfxBoolItem& rItem )
{
m_pSerializer->singleElementNS( XML_w, XML_overflowPunct,
- FSNS( XML_w, XML_val ), OString::boolean( rItem.GetValue() ),
- FSEND );
+ FSNS( XML_w, XML_val ), OString::boolean( rItem.GetValue() ) );
}
void DocxAttributeOutput::ParaForbiddenRules( const SfxBoolItem& rItem )
{
m_pSerializer->singleElementNS( XML_w, XML_kinsoku,
- FSNS( XML_w, XML_val ), OString::boolean( rItem.GetValue() ),
- FSEND );
+ FSNS( XML_w, XML_val ), OString::boolean( rItem.GetValue() ) );
}
void DocxAttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign )
@@ -8105,14 +7895,13 @@ void DocxAttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign
default:
return; // not supported attribute
}
- m_pSerializer->singleElementNS( XML_w, XML_textAlignment, FSNS( XML_w, XML_val ), pAlignString, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_textAlignment, FSNS(XML_w, XML_val), pAlignString);
}
void DocxAttributeOutput::ParaSnapToGrid( const SvxParaGridItem& rGrid )
{
m_pSerializer->singleElementNS( XML_w, XML_snapToGrid,
- FSNS( XML_w, XML_val ), OString::boolean( rGrid.GetValue() ),
- FSEND );
+ FSNS( XML_w, XML_val ), OString::boolean( rGrid.GetValue() ) );
}
void DocxAttributeOutput::FormatFrameSize( const SwFormatFrameSize& rSize )
@@ -8311,7 +8100,7 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
m_bParaAfterAutoSpacing = false;
if (rULSpace.GetContext())
- m_pSerializer->singleElementNS( XML_w, XML_contextualSpacing, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_contextualSpacing);
}
}
@@ -8489,14 +8278,11 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
}
if (!bImageBackground)
{
- m_pSerializer->startElementNS(XML_a, XML_solidFill, FSEND);
- m_pSerializer->startElementNS(XML_a, XML_srgbClr,
- XML_val, sColor,
- FSEND);
+ m_pSerializer->startElementNS(XML_a, XML_solidFill);
+ m_pSerializer->startElementNS(XML_a, XML_srgbClr, XML_val, sColor);
if (oAlpha)
m_pSerializer->singleElementNS(XML_a, XML_alpha,
- XML_val, OString::number(*oAlpha),
- FSEND);
+ XML_val, OString::number(*oAlpha));
m_pSerializer->endElementNS(XML_a, XML_srgbClr);
m_pSerializer->endElementNS(XML_a, XML_solidFill);
}
@@ -8731,7 +8517,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
// Not inside a section
// Open the paragraph's borders tag
- m_pSerializer->startElementNS( XML_w, XML_pBdr, FSEND );
+ m_pSerializer->startElementNS(XML_w, XML_pBdr);
std::map<SvxBoxItemLine, css::table::BorderLine2> aStyleBorders;
const SvxBoxItem* pInherited = nullptr;
@@ -8810,8 +8596,7 @@ void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCo
void DocxAttributeOutput::FormatKeep( const SvxFormatKeepItem& rItem )
{
m_pSerializer->singleElementNS( XML_w, XML_keepNext,
- FSNS( XML_w, XML_val ), OString::boolean( rItem.GetValue() ),
- FSEND );
+ FSNS( XML_w, XML_val ), OString::boolean( rItem.GetValue() ) );
}
void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
@@ -8850,7 +8635,7 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
void DocxAttributeOutput::FormatLineNumbering( const SwFormatLineNumber& rNumbering )
{
if ( !rNumbering.IsCount( ) )
- m_pSerializer->singleElementNS( XML_w, XML_suppressLineNumbers, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_suppressLineNumbers);
}
void DocxAttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDirection )
@@ -8880,18 +8665,16 @@ void DocxAttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDi
if ( m_rExport.m_bOutPageDescs )
{
- m_pSerializer->singleElementNS( XML_w, XML_textDirection,
- FSNS( XML_w, XML_val ), sTextFlow.getStr( ),
- FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_textDirection, FSNS(XML_w, XML_val), sTextFlow);
if ( bBiDi )
- m_pSerializer->singleElementNS( XML_w, XML_bidi, FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_bidi);
}
else if ( !m_rExport.m_bOutFlyFrameAttrs )
{
if ( bBiDi )
- m_pSerializer->singleElementNS( XML_w, XML_bidi, FSNS( XML_w, XML_val ), "1", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_bidi, FSNS(XML_w, XML_val), "1");
else
- m_pSerializer->singleElementNS( XML_w, XML_bidi, FSNS( XML_w, XML_val ), "0", FSEND );
+ m_pSerializer->singleElementNS(XML_w, XML_bidi, FSNS(XML_w, XML_val), "0");
}
}
@@ -8901,7 +8684,7 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem)
for ( const auto & rGrabBagElement : rMap )
{
if (rGrabBagElement.first == "MirrorIndents")
- m_pSerializer->singleElementNS(XML_w, XML_mirrorIndents, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_mirrorIndents);
else if (rGrabBagElement.first == "ParaTopMarginBeforeAutoSpacing")
{
m_bParaBeforeAutoSpacing = true;
@@ -9372,24 +9155,21 @@ bool DocxAttributeOutput::HasPostitFields() const
void DocxAttributeOutput::BulletDefinition(int nId, const Graphic& rGraphic, Size aSize)
{
m_pSerializer->startElementNS(XML_w, XML_numPicBullet,
- FSNS(XML_w, XML_numPicBulletId), OString::number(nId).getStr(),
- FSEND);
+ FSNS(XML_w, XML_numPicBulletId), OString::number(nId));
OStringBuffer aStyle;
// Size is in twips, we need it in points.
aStyle.append("width:").append(double(aSize.Width()) / 20);
aStyle.append("pt;height:").append(double(aSize.Height()) / 20).append("pt");
- m_pSerializer->startElementNS( XML_w, XML_pict, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_pict);
m_pSerializer->startElementNS( XML_v, XML_shape,
XML_style, aStyle.getStr(),
- FSNS(XML_o, XML_bullet), "t",
- FSEND);
+ FSNS(XML_o, XML_bullet), "t");
OUString aRelId = m_rDrawingML.WriteImage(rGraphic);
m_pSerializer->singleElementNS( XML_v, XML_imagedata,
FSNS(XML_r, XML_id), OUStringToOString(aRelId, RTL_TEXTENCODING_UTF8),
- FSNS(XML_o, XML_title), "",
- FSEND);
+ FSNS(XML_o, XML_title), "");
m_pSerializer->endElementNS(XML_v, XML_shape);
m_pSerializer->endElementNS(XML_w, XML_pict);
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 33eb71468d52..7d4d4df1fb3d 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -236,9 +236,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFormat& rFormat )
{
::sax_fastparser::FSHelperPtr pSerializer = m_pAttrOutput->GetSerializer( );
// Level 9 disables the outline
- pSerializer->singleElementNS( XML_w, XML_outlineLvl,
- FSNS( XML_w, XML_val ), "9" ,
- FSEND );
+ pSerializer->singleElementNS(XML_w, XML_outlineLvl, FSNS(XML_w, XML_val), "9");
bRet = true;
}
@@ -334,25 +332,20 @@ void DocxExport::DoComboBox(const OUString& rName,
const OUString& rSelected,
uno::Sequence<OUString>& rListItems)
{
- m_pDocumentFS->startElementNS( XML_w, XML_ffData, FSEND );
+ m_pDocumentFS->startElementNS(XML_w, XML_ffData);
- m_pDocumentFS->singleElementNS( XML_w, XML_name,
- FSNS( XML_w, XML_val ), OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ m_pDocumentFS->singleElementNS(XML_w, XML_name, FSNS(XML_w, XML_val), rName.toUtf8());
- m_pDocumentFS->singleElementNS( XML_w, XML_enabled, FSEND );
+ m_pDocumentFS->singleElementNS(XML_w, XML_enabled);
if ( !rHelp.isEmpty() )
- m_pDocumentFS->singleElementNS( XML_w, XML_helpText,
- FSNS( XML_w, XML_val ), OUStringToOString( rHelp, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ m_pDocumentFS->singleElementNS(XML_w, XML_helpText, FSNS(XML_w, XML_val), rHelp.toUtf8());
if ( !rToolTip.isEmpty() )
m_pDocumentFS->singleElementNS( XML_w, XML_statusText,
- FSNS( XML_w, XML_val ), OUStringToOString( rToolTip, RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_val ), rToolTip.toUtf8() );
- m_pDocumentFS->startElementNS( XML_w, XML_ddList, FSEND );
+ m_pDocumentFS->startElementNS(XML_w, XML_ddList);
// Output the 0-based index of the selected value
sal_uInt32 nListItems = rListItems.getLength();
@@ -365,17 +358,14 @@ void DocxExport::DoComboBox(const OUString& rName,
nI++;
}
- m_pDocumentFS->singleElementNS( XML_w, XML_result,
- FSNS( XML_w, XML_val ), OString::number( nId ).getStr( ),
- FSEND );
+ m_pDocumentFS->singleElementNS(XML_w, XML_result, FSNS(XML_w, XML_val), OString::number(nId));
// Loop over the entries
for (sal_uInt32 i = 0; i < nListItems; i++)
{
m_pDocumentFS->singleElementNS( XML_w, XML_listEntry,
- FSNS( XML_w, XML_val ), OUStringToOString( rListItems[i], RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_val ), rListItems[i].toUtf8() );
}
m_pDocumentFS->endElementNS( XML_w, XML_ddList );
@@ -486,11 +476,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), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(ax)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS(XML_xmlns, XML_r), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(officeRel)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS(XML_ax, XML_classid), OString("{" + sGUID + "}").getStr(),
+ 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_ax, XML_classid), "{" + sGUID + "}",
FSNS(XML_ax, XML_persistence), "persistStorage",
- FSNS(XML_r, XML_id), OUStringToOString(sBinaryId, RTL_TEXTENCODING_UTF8).getStr(), FSEND);
+ FSNS(XML_r, XML_id), sBinaryId.toUtf8());
OString sXMLId = OUStringToOString(m_pFilter->addRelation(m_pDocumentFS->getOutputStream(),
oox::getRelationship(Relationship::CONTROL),
@@ -766,11 +756,10 @@ void DocxExport::WriteNumbering()
m_pDrawingML->SetFS( pNumberingFS );
pNumberingFS->startElementNS( XML_w, XML_numbering,
- FSNS( XML_xmlns, XML_w ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(doc)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_o ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(vmlOffice)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_r ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(officeRel)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_v ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(vml)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ 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() );
BulletDefinitions();
@@ -858,8 +847,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().getStr(),
- FSEND );
+ FSNS( XML_r, XML_id ), aRelId.toUtf8() );
}
void DocxExport::WriteFonts()
@@ -873,9 +861,8 @@ void DocxExport::WriteFonts()
"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml" );
pFS->startElementNS( XML_w, XML_fonts,
- FSNS( XML_xmlns, XML_w ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(doc)), RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_xmlns, XML_r ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(officeRel)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ FSNS( XML_xmlns, XML_w ), m_pFilter->getNamespaceURL(OOX_NS(doc)).toUtf8(),
+ FSNS( XML_xmlns, XML_r ), m_pFilter->getNamespaceURL(OOX_NS(officeRel)).toUtf8() );
// switch the serializer to redirect the output to word/styles.xml
m_pAttrOutput->SetSerializer( pFS );
@@ -921,13 +908,12 @@ void DocxExport::WriteSettings()
"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml" );
pFS->startElementNS( XML_w, XML_settings,
- FSNS( XML_xmlns, XML_w ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(doc)), RTL_TEXTENCODING_UTF8).getStr(),
- FSEND );
+ FSNS( XML_xmlns, XML_w ), m_pFilter->getNamespaceURL(OOX_NS(doc)).toUtf8() );
// View
if (pViewShell && pViewShell->GetViewOptions()->getBrowseMode())
{
- pFS->singleElementNS(XML_w, XML_view, FSNS(XML_w, XML_val), "web", FSEND);
+ pFS->singleElementNS(XML_w, XML_view, FSNS(XML_w, XML_val), "web");
}
// Zoom
@@ -961,35 +947,35 @@ void DocxExport::WriteSettings()
if (boost::optional<SvxBrushItem> oBrush = getBackground())
{
// Turn on the 'displayBackgroundShape'
- pFS->singleElementNS( XML_w, XML_displayBackgroundShape, FSEND );
+ pFS->singleElementNS(XML_w, XML_displayBackgroundShape);
}
// Track Changes
if ( m_aSettings.trackRevisions )
- pFS->singleElementNS( XML_w, XML_trackRevisions, FSEND );
+ pFS->singleElementNS(XML_w, XML_trackRevisions);
// Mirror Margins
if(isMirroredMargin())
- pFS->singleElementNS( XML_w, XML_mirrorMargins, FSEND );
+ pFS->singleElementNS(XML_w, XML_mirrorMargins);
// Embed Fonts
if( m_pDoc->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_FONTS ))
- pFS->singleElementNS( XML_w, XML_embedTrueTypeFonts, FSEND );
+ pFS->singleElementNS(XML_w, XML_embedTrueTypeFonts);
// Embed System Fonts
if( m_pDoc->getIDocumentSettingAccess().get( DocumentSettingId::EMBED_SYSTEM_FONTS ))
- pFS->singleElementNS( XML_w, XML_embedSystemFonts, FSEND );
+ pFS->singleElementNS(XML_w, XML_embedSystemFonts);
// Default Tab Stop
if( m_aSettings.defaultTabStop != 0 )
pFS->singleElementNS( XML_w, XML_defaultTabStop, FSNS( XML_w, XML_val ),
- OString::number( m_aSettings.defaultTabStop).getStr(), FSEND );
+ OString::number(m_aSettings.defaultTabStop) );
// Do not justify lines with manual break
if( m_pDoc->getIDocumentSettingAccess().get( DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK ))
{
- pFS->startElementNS( XML_w, XML_compat, FSEND );
- pFS->singleElementNS( XML_w, XML_doNotExpandShiftReturn, FSEND );
+ pFS->startElementNS(XML_w, XML_compat);
+ pFS->singleElementNS(XML_w, XML_doNotExpandShiftReturn);
pFS->endElementNS( XML_w, XML_compat );
}
@@ -1000,13 +986,12 @@ void DocxExport::WriteSettings()
if (pColl && SfxItemState::SET == pColl->GetItemState(RES_PARATR_HYPHENZONE, false, &pItem))
{
pFS->singleElementNS(XML_w, XML_autoHyphenation,
- FSNS(XML_w, XML_val), OString::boolean(static_cast<const SvxHyphenZoneItem*>(pItem)->IsHyphen()),
- FSEND);
+ FSNS(XML_w, XML_val), OString::boolean(static_cast<const SvxHyphenZoneItem*>(pItem)->IsHyphen()));
}
// Even and Odd Headers
if( m_aSettings.evenAndOddHeaders )
- pFS->singleElementNS( XML_w, XML_evenAndOddHeaders, FSEND );
+ pFS->singleElementNS(XML_w, XML_evenAndOddHeaders);
// Has Footnotes
if( m_pAttrOutput->HasFootnotes())
@@ -1044,14 +1029,13 @@ void DocxExport::WriteSettings()
themeFontLangProps[j].Value >>= aValues[2];
}
pFS->singleElementNS( XML_w, XML_themeFontLang,
- FSNS( XML_w, XML_val ), OUStringToOString( aValues[0], RTL_TEXTENCODING_UTF8 ).getStr(),
- FSNS( XML_w, XML_eastAsia ), OUStringToOString( aValues[1], RTL_TEXTENCODING_UTF8 ).getStr(),
- FSNS( XML_w, XML_bidi ), OUStringToOString( aValues[2], RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
+ FSNS( XML_w, XML_val ), aValues[0].toUtf8(),
+ FSNS( XML_w, XML_eastAsia ), aValues[1].toUtf8(),
+ FSNS( XML_w, XML_bidi ), aValues[2].toUtf8() );
}
else if ( propList[i].Name == "CompatSettings" )
{
- pFS->startElementNS( XML_w, XML_compat, FSEND );
+ pFS->startElementNS(XML_w, XML_compat);
uno::Sequence< beans::PropertyValue > aCompatSettingsSequence;
propList[i].Value >>= aCompatSettingsSequence;
@@ -1074,10 +1058,9 @@ void DocxExport::WriteSettings()
aCompatSetting[k].Value >>= aValue;
}
pFS->singleElementNS( XML_w, XML_compatSetting,
- FSNS( XML_w, XML_name ), OUStringToOString(aName, RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_w, XML_uri ), OUStringToOString(aUri, RTL_TEXTENCODING_UTF8).getStr(),
- FSNS( XML_w, XML_val ), OUStringToOString(aValue, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
+ FSNS( XML_w, XML_name ), aName.toUtf8(),
+ FSNS( XML_w, XML_uri ), aUri.toUtf8(),
+ FSNS( XML_w, XML_val ), aValue.toUtf8());
}
pFS->endElementNS( XML_w, XML_compat );
@@ -1134,8 +1117,7 @@ void DocxExport::WriteSettings()
pFS->singleElementNS(XML_w, XML_documentProtection,
FSNS(XML_w, XML_edit), "forms",
- FSNS(XML_w, XML_enforcement), "true",
- FSEND);
+ FSNS(XML_w, XML_enforcement), "true");
}
}
@@ -1479,11 +1461,12 @@ void DocxExport::WriteMainText()
Color backgroundColor = oBrush->GetColor();
OString aBackgroundColorStr = msfilter::util::ConvertColor(backgroundColor);
- m_pDocumentFS->singleElementNS( XML_w, XML_background, FSNS( XML_w, XML_color ), aBackgroundColorStr, FSEND );
+ m_pDocumentFS->singleElementNS(XML_w, XML_background, FSNS(XML_w, XML_color),
+ aBackgroundColorStr);
}
// body
- m_pDocumentFS->startElementNS( XML_w, XML_body, FSEND );
+ m_pDocumentFS->startElementNS(XML_w, XML_body);
m_pCurPam->GetPoint()->nNode = m_pDoc->GetNodes().GetEndOfContent().StartOfSectionNode()->GetIndex();
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index e8024024dd9a..f04d6e268de7 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -378,7 +378,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
{
m_pImpl->setDrawingOpen(true);
m_pImpl->setParagraphHasDrawing(true);
- m_pImpl->getSerializer()->startElementNS(XML_w, XML_drawing, FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_w, XML_drawing);
const SvxLRSpaceItem aLRSpaceItem = pFrameFormat->GetLRSpace(false);
const SvxULSpaceItem aULSpaceItem = pFrameFormat->GetULSpace(false);
@@ -499,8 +499,8 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
}
sax_fastparser::XFastAttributeListRef xAttrList(attrList);
m_pImpl->getSerializer()->startElementNS(XML_wp, XML_anchor, xAttrList);
- m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_simplePos, XML_x, "0", XML_y, "0",
- FSEND); // required, unused
+ m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_simplePos, XML_x, "0", XML_y,
+ "0"); // required, unused
const char* relativeFromH;
const char* relativeFromV;
const char* alignH = nullptr;
@@ -592,7 +592,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
break;
}
m_pImpl->getSerializer()->startElementNS(XML_wp, XML_positionH, XML_relativeFrom,
- relativeFromH, FSEND);
+ relativeFromH);
/**
* Sizes of integral types
* climits header defines constants with the limits of integral types for the specific system and compiler implementation used.
@@ -602,13 +602,13 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
const sal_Int64 MIN_INTEGER_VALUE = SAL_MIN_INT32;
if (alignH != nullptr)
{
- m_pImpl->getSerializer()->startElementNS(XML_wp, XML_align, FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_wp, XML_align);
m_pImpl->getSerializer()->write(alignH);
m_pImpl->getSerializer()->endElementNS(XML_wp, XML_align);
}
else
{
- m_pImpl->getSerializer()->startElementNS(XML_wp, XML_posOffset, FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_wp, XML_posOffset);
sal_Int64 nPosXEMU = TwipsToEMU(aPos.X);
/* Absolute Position Offset Value is of type Int. Hence it should not be greater than
@@ -635,7 +635,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
}
m_pImpl->getSerializer()->endElementNS(XML_wp, XML_positionH);
m_pImpl->getSerializer()->startElementNS(XML_wp, XML_positionV, XML_relativeFrom,
- relativeFromV, FSEND);
+ relativeFromV);
sal_Int64 nPosYEMU = TwipsToEMU(aPos.Y);
@@ -653,13 +653,13 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
if (alignV != nullptr)
{
- m_pImpl->getSerializer()->startElementNS(XML_wp, XML_align, FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_wp, XML_align);
m_pImpl->getSerializer()->write(alignV);
m_pImpl->getSerializer()->endElementNS(XML_wp, XML_align);
}
else
{
- m_pImpl->getSerializer()->startElementNS(XML_wp, XML_posOffset, FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_wp, XML_posOffset);
if (nPosYEMU > MAX_INTEGER_VALUE)
{
nPosYEMU = MAX_INTEGER_VALUE;
@@ -716,13 +716,12 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
sal_uInt64 cy = TwipsToEMU(std::clamp(rSize.Height(), 0L, long(SAL_MAX_INT32)));
OString aHeight(OString::number(std::min(cy, sal_uInt64(SAL_MAX_INT32))));
- m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_extent, XML_cx, aWidth, XML_cy, aHeight,
- FSEND);
+ m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_extent, XML_cx, aWidth, XML_cy, aHeight);
// effectExtent, extent including the effect (shadow only for now)
m_pImpl->getSerializer()->singleElementNS(
XML_wp, XML_effectExtent, XML_l, OString::number(nLeftExt), XML_t, OString::number(nTopExt),
- XML_r, OString::number(nRightExt), XML_b, OString::number(nBottomExt), FSEND);
+ XML_r, OString::number(nRightExt), XML_b, OString::number(nBottomExt));
// See if we know the exact wrap type from grab-bag.
sal_Int32 nWrapToken = 0;
@@ -743,14 +742,12 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
SAL_WARN("sw.ww8",
"DocxSdrExport::startDMLAnchorInline: unexpected EG_WrapType value");
- m_pImpl->getSerializer()->startElementNS(XML_wp, nWrapToken, XML_wrapText, "bothSides",
- FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_wp, nWrapToken, XML_wrapText, "bothSides");
it = aGrabBag.find("CT_WrapPath");
if (it != aGrabBag.end())
{
- m_pImpl->getSerializer()->startElementNS(XML_wp, XML_wrapPolygon, XML_edited, "0",
- FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_wp, XML_wrapPolygon, XML_edited, "0");
auto aSeqSeq = it->second.get<drawing::PointSequenceSequence>();
auto aPoints(comphelper::sequenceToContainer<std::vector<awt::Point>>(aSeqSeq[0]));
for (auto i = aPoints.begin(); i != aPoints.end(); ++i)
@@ -758,7 +755,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
awt::Point& rPoint = *i;
m_pImpl->getSerializer()->singleElementNS(
XML_wp, (i == aPoints.begin() ? XML_start : XML_lineTo), XML_x,
- OString::number(rPoint.X), XML_y, OString::number(rPoint.Y), FSEND);
+ OString::number(rPoint.X), XML_y, OString::number(rPoint.Y));
}
m_pImpl->getSerializer()->endElementNS(XML_wp, XML_wrapPolygon);
}
@@ -777,15 +774,14 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
{
nWrapToken = XML_wrapTight;
m_pImpl->getSerializer()->startElementNS(XML_wp, nWrapToken, XML_wrapText,
- "bothSides", FSEND);
+ "bothSides");
- m_pImpl->getSerializer()->startElementNS(XML_wp, XML_wrapPolygon, XML_edited, "0",
- FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_wp, XML_wrapPolygon, XML_edited, "0");
tools::Polygon aPoly = sw::util::CorrectWordWrapPolygonForExport(*pPolyPoly, pNd);
for (sal_uInt16 i = 0; i < aPoly.GetSize(); ++i)
m_pImpl->getSerializer()->singleElementNS(
XML_wp, (i == 0 ? XML_start : XML_lineTo), XML_x,
- OString::number(aPoly[i].X()), XML_y, OString::number(aPoly[i].Y()), FSEND);
+ OString::number(aPoly[i].X()), XML_y, OString::number(aPoly[i].Y()));
m_pImpl->getSerializer()->endElementNS(XML_wp, XML_wrapPolygon);
m_pImpl->getSerializer()->endElementNS(XML_wp, nWrapToken);
@@ -799,19 +795,19 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
switch (pFrameFormat->GetSurround().GetValue())
{
case css::text::WrapTextMode_NONE:
- m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapTopAndBottom, FSEND);
+ m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapTopAndBottom);
break;
case css::text::WrapTextMode_THROUGH:
- m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapNone, FSEND);
+ m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapNone);
break;
case css::text::WrapTextMode_PARALLEL:
m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapSquare, XML_wrapText,
- "bothSides", FSEND);
+ "bothSides");
break;
case css::text::WrapTextMode_DYNAMIC:
default:
m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapSquare, XML_wrapText,
- "largest", FSEND);
+ "largest");
break;
}
}
@@ -836,7 +832,7 @@ void DocxSdrExport::endDMLAnchorInline(const SwFrameFormat* pFrameFormat)
void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat)
{
- m_pImpl->getSerializer()->startElementNS(XML_w, XML_pict, FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_w, XML_pict);
m_pImpl->getDrawingML()->SetFS(m_pImpl->getSerializer());
// See WinwordAnchoring::SetAnchoring(), these are not part of the SdrObject, have to be passed around manually.
@@ -906,22 +902,15 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFo
pNamespace = "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup";
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),
- OUStringToOString(m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)),
- RTL_TEXTENCODING_UTF8)
- .getStr(),
- FSEND);
- pFS->startElementNS(XML_a, XML_graphicData, XML_uri, pNamespace, FSEND);
+ pFS->startElementNS(XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
+ m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8());
+ 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),
- OUStringToOString(m_pImpl->getExport().GetFilter().getNamespaceURL(
- OOX_NS(dmlLockedCanvas)),
- RTL_TEXTENCODING_UTF8)
- .getStr(),
- FSEND);
+ pFS->startElementNS(
+ XML_lc, XML_lockedCanvas, FSNS(XML_xmlns, XML_lc),
+ m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dmlLockedCanvas)).toUtf8());
m_pImpl->getExport().OutputDML(xShape);
@@ -937,9 +926,8 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFo
pFS->startElementNS(XML_wp14, XML_sizeRelH, XML_relativeFrom,
(pSdrObject->GetRelativeWidthRelation() == text::RelOrientation::FRAME
? "margin"
- : "page"),
- FSEND);
- pFS->startElementNS(XML_wp14, XML_pctWidth, FSEND);
+ : "page"));
+ pFS->startElementNS(XML_wp14, XML_pctWidth);
pFS->writeEscaped(
OUString::number(*pSdrObject->GetRelativeWidth() * 100 * oox::drawingml::PER_PERCENT));
pFS->endElementNS(XML_wp14, XML_pctWidth);
@@ -950,9 +938,8 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFo
pFS->startElementNS(XML_wp14, XML_sizeRelV, XML_relativeFrom,
(pSdrObject->GetRelativeHeightRelation() == text::RelOrientation::FRAME
? "margin"
- : "page"),
- FSEND);
- pFS->startElementNS(XML_wp14, XML_pctHeight, FSEND);
+ : "page"));
+ pFS->startElementNS(XML_wp14, XML_pctHeight);
pFS->writeEscaped(
OUString::number(*pSdrObject->GetRelativeHeight() * 100 * oox::drawingml::PER_PERCENT));
pFS->endElementNS(XML_wp14, XML_pctHeight);
@@ -993,7 +980,7 @@ void DocxSdrExport::Impl::textFrameShadow(const SwFrameFormat& rFrameFormat)
OString aShadowColor = msfilter::util::ConvertColor(aShadowItem.GetColor());
m_pSerializer->singleElementNS(XML_v, XML_shadow, XML_on, "t", XML_color, "#" + aShadowColor,
- XML_offset, aOffset, FSEND);
+ XML_offset, aOffset);
}
bool DocxSdrExport::Impl::isSupportedDMLShape(const uno::Reference<drawing::XShape>& xShape)
@@ -1040,15 +1027,15 @@ void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj,
if ((msfilter::util::HasTextBoxContent(eShapeType)) && Impl::isSupportedDMLShape(xShape)
&& !bDMLAndVMLDrawingOpen)
{
- m_pImpl->getSerializer()->startElementNS(XML_mc, XML_AlternateContent, FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_mc, XML_AlternateContent);
auto pObjGroup = dynamic_cast<const SdrObjGroup*>(sdrObj);
m_pImpl->getSerializer()->startElementNS(XML_mc, XML_Choice, XML_Requires,
- (pObjGroup ? "wpg" : "wps"), FSEND);
+ (pObjGroup ? "wpg" : "wps"));
writeDMLDrawing(sdrObj, &rFrameFormat, nAnchorId);
m_pImpl->getSerializer()->endElementNS(XML_mc, XML_Choice);
- m_pImpl->getSerializer()->startElementNS(XML_mc, XML_Fallback, FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_mc, XML_Fallback);
writeVMLDrawing(sdrObj, rFrameFormat);
m_pImpl->getSerializer()->endElementNS(XML_mc, XML_Fallback);
@@ -1107,18 +1094,15 @@ void DocxSdrExport::writeDMLEffectLst(const SwFrameFormat& rFrameFormat)
}
OString aShadowDir(OString::number(nShadowDir));
- m_pImpl->getSerializer()->startElementNS(XML_a, XML_effectLst, FSEND);
- m_pImpl->getSerializer()->startElementNS(XML_a, XML_outerShdw, XML_dist, aShadowDist.getStr(),
- XML_dir, aShadowDir.getStr(), FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_a, XML_effectLst);
+ m_pImpl->getSerializer()->startElementNS(XML_a, XML_outerShdw, XML_dist, aShadowDist, XML_dir,
+ aShadowDir);
if (aShadowAlpha.isEmpty())
- m_pImpl->getSerializer()->singleElementNS(XML_a, XML_srgbClr, XML_val,
- aShadowColor.getStr(), FSEND);
+ m_pImpl->getSerializer()->singleElementNS(XML_a, XML_srgbClr, XML_val, aShadowColor);
else
{
- m_pImpl->getSerializer()->startElementNS(XML_a, XML_srgbClr, XML_val, aShadowColor.getStr(),
- FSEND);
- m_pImpl->getSerializer()->singleElementNS(XML_a, XML_alpha, XML_val, aShadowAlpha.getStr(),
- FSEND);
+ m_pImpl->getSerializer()->startElementNS(XML_a, XML_srgbClr, XML_val, aShadowColor);
+ m_pImpl->getSerializer()->singleElementNS(XML_a, XML_alpha, XML_val, aShadowAlpha);
m_pImpl->getSerializer()->endElementNS(XML_a, XML_srgbClr);
}
m_pImpl->getSerializer()->endElementNS(XML_a, XML_outerShdw);
@@ -1191,15 +1175,15 @@ void DocxSdrExport::writeBoxItemLine(const SvxBoxItem& rBox)
double fConverted(editeng::ConvertBorderWidthToWord(pBorderLine->GetBorderLineStyle(),
pBorderLine->GetWidth()));
OString sWidth(OString::number(TwipsToEMU(fConverted)));
- pFS->startElementNS(XML_a, XML_ln, XML_w, sWidth.getStr(), FSEND);
+ pFS->startElementNS(XML_a, XML_ln, XML_w, sWidth);
- pFS->startElementNS(XML_a, XML_solidFill, FSEND);
+ pFS->startElementNS(XML_a, XML_solidFill);
OString sColor(msfilter::util::ConvertColor(pBorderLine->GetColor()));
- pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, sColor, FSEND);
+ pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, sColor);
pFS->endElementNS(XML_a, XML_solidFill);
if (SvxBorderLineStyle::DASHED == pBorderLine->GetBorderLineStyle()) // Line Style is Dash type
- pFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash", FSEND);
+ pFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash");
pFS->endElementNS(XML_a, XML_ln);
}
@@ -1254,17 +1238,12 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
sax_fastparser::XFastAttributeListRef xDocPrAttrListRef(pDocPrAttrList);
pFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef);
- pFS->startElementNS(
- XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
- OUStringToOString(m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)),
- RTL_TEXTENCODING_UTF8)
- .getStr(),
- FSEND);
+ pFS->startElementNS(XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
+ m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8());
pFS->startElementNS(XML_a, XML_graphicData, XML_uri,
- "http://schemas.microsoft.com/office/word/2010/wordprocessingShape",
- FSEND);
- pFS->startElementNS(XML_wps, XML_wsp, FSEND);
- pFS->singleElementNS(XML_wps, XML_cNvSpPr, XML_txBox, "1", FSEND);
+ "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
+ pFS->startElementNS(XML_wps, XML_wsp);
+ pFS->singleElementNS(XML_wps, XML_cNvSpPr, XML_txBox, "1");
uno::Any aRotation;
m_pImpl->setDMLandVMLTextFrameRotation(0);
@@ -1286,20 +1265,19 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
OString sRotation(OString::number(
oox::drawingml::ExportRotateClockwisify(m_pImpl->getDMLandVMLTextFrameRotation())));
// Shape properties
- pFS->startElementNS(XML_wps, XML_spPr, FSEND);
+ pFS->startElementNS(XML_wps, XML_spPr);
if (m_pImpl->getDMLandVMLTextFrameRotation())
{
- pFS->startElementNS(XML_a, XML_xfrm, XML_rot, sRotation.getStr(), FSEND);
+ pFS->startElementNS(XML_a, XML_xfrm, XML_rot, sRotation);
}
else
{
- pFS->startElementNS(XML_a, XML_xfrm, FSEND);
+ pFS->startElementNS(XML_a, XML_xfrm);
}
- pFS->singleElementNS(XML_a, XML_off, XML_x, "0", XML_y, "0", FSEND);
+ pFS->singleElementNS(XML_a, XML_off, XML_x, "0", XML_y, "0");
OString aWidth(OString::number(TwipsToEMU(aSize.Width())));
OString aHeight(OString::number(TwipsToEMU(aSize.Height())));
- pFS->singleElementNS(XML_a, XML_ext, XML_cx, aWidth.getStr(), XML_cy, aHeight.getStr(),
- FSEND);
+ pFS->singleElementNS(XML_a, XML_ext, XML_cx, aWidth, XML_cy, aHeight);
pFS->endElementNS(XML_a, XML_xfrm);
OUString shapeType = "rect";
if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("FrameInteropGrabBag"))
@@ -1320,8 +1298,7 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
if (shapeType.isEmpty())
shapeType = "rect";
- pFS->singleElementNS(XML_a, XML_prstGeom, XML_prst,
- OUStringToOString(shapeType, RTL_TEXTENCODING_UTF8).getStr(), FSEND);
+ pFS->singleElementNS(XML_a, XML_prstGeom, XML_prst, shapeType.toUtf8());
m_pImpl->setDMLTextFrameSyntax(true);
m_pImpl->getExport().OutputFormat(pParentFrame->GetFrameFormat(), false, false, true);
m_pImpl->setDMLTextFrameSyntax(false);
@@ -1392,8 +1369,8 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
{
//not the first in the chain, so write the tag as linkedTxbx
pFS->singleElementNS(XML_wps, XML_linkedTxbx, XML_id,
- I32S(linkedTextboxesIter->second.nId), XML_seq,
- I32S(linkedTextboxesIter->second.nSeq), FSEND);
+ OString::number(linkedTextboxesIter->second.nId), XML_seq,
+ OString::number(linkedTextboxesIter->second.nSeq));
/* no text content should be added to this tag,
since the textbox is linked, the entire content
is written in txbx block
@@ -1405,8 +1382,8 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
/* this is the first textbox in the chaining, we add the text content
to this block*/
//since the text box is linked, it needs an id.
- pFS->startElementNS(XML_wps, XML_txbx, XML_id, I32S(linkedTextboxesIter->second.nId),
- FSEND);
+ pFS->startElementNS(XML_wps, XML_txbx, XML_id,
+ OString::number(linkedTextboxesIter->second.nId));
isTxbxLinked = true;
}
}
@@ -1414,10 +1391,9 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
if (!skipTxBxContent)
{
if (!isTxbxLinked)
- pFS->startElementNS(XML_wps, XML_txbx,
- FSEND); //text box is not linked, therefore no id.
+ pFS->startElementNS(XML_wps, XML_txbx); //text box is not linked, therefore no id.
- pFS->startElementNS(XML_w, XML_txbxContent, FSEND);
+ pFS->startElementNS(XML_w, XML_txbxContent);
m_pImpl->setFrameBtLr(
m_pImpl->checkFrameBtlr(m_pImpl->getExport().m_pDoc->GetNodes()[nStt], /*bDML=*/true));
@@ -1455,8 +1431,7 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
// AutoSize of the Text Frame.
const SwFormatFrameSize& rSize = rFrameFormat.GetFrameSize();
pFS->singleElementNS(
- XML_a, (rSize.GetHeightSizeType() == ATT_VAR_SIZE ? XML_spAutoFit : XML_noAutofit),
- FSEND);
+ XML_a, (rSize.GetHeightSizeType() == ATT_VAR_SIZE ? XML_spAutoFit : XML_noAutofit));
pFS->endElementNS(XML_wps, XML_bodyPr);
pFS->endElementNS(XML_wps, XML_wsp);
@@ -1470,9 +1445,8 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
pFS->startElementNS(XML_wp14, XML_sizeRelH, XML_relativeFrom,
(rSize.GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME
? "page"
- : "margin"),
- FSEND);
- pFS->startElementNS(XML_wp14, XML_pctWidth, FSEND);
+ : "margin"));
+ pFS->startElementNS(XML_wp14, XML_pctWidth);
pFS->writeEscaped(OUString::number(nWidthPercent * oox::drawingml::PER_PERCENT));
pFS->endElementNS(XML_wp14, XML_pctWidth);
pFS->endElementNS(XML_wp14, XML_sizeRelH);
@@ -1483,9 +1457,8 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
pFS->startElementNS(
XML_wp14, XML_sizeRelV, XML_relativeFrom,
(rSize.GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME ? "page"
- : "margin"),
- FSEND);
- pFS->startElementNS(XML_wp14, XML_pctHeight, FSEND);
+ : "margin"));
+ pFS->startElementNS(XML_wp14, XML_pctHeight);
pFS->writeEscaped(OUString::number(nHeightPercent * oox::drawingml::PER_PERCENT));
pFS->endElementNS(XML_wp14, XML_pctHeight);
pFS->endElementNS(XML_wp14, XML_sizeRelV);
@@ -1552,7 +1525,7 @@ void DocxSdrExport::writeVMLTextFrame(ww8::Frame const* pParentFrame, bool bText
if (!bTextBoxOnly)
{
- pFS->startElementNS(XML_w, XML_pict, FSEND);
+ pFS->startElementNS(XML_w, XML_pict);
pFS->startElementNS(XML_v, XML_rect, xFlyAttrList);
m_pImpl->textFrameShadow(rFrameFormat);
if (m_pImpl->getFlyFillAttrList().is())
@@ -1571,7 +1544,7 @@ void DocxSdrExport::writeVMLTextFrame(ww8::Frame const* pParentFrame, bool bText
}
pFS->startElementNS(XML_v, XML_textbox, xTextboxAttrList);
}
- pFS->startElementNS(XML_w, XML_txbxContent, FSEND);
+ pFS->startElementNS(XML_w, XML_txbxContent);
m_pImpl->setFlyFrameGraphic(true);
m_pImpl->getExport().WriteText();
if (m_pImpl->getParagraphSdtOpen())
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index 2e3aa4892cdd..cf6ee28cef43 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -167,7 +167,7 @@ void DocxTableStyleExport::Impl::tableStyleTableCellMar(
if (!rTableCellMar.hasElements())
return;
- m_pSerializer->startElementNS(XML_w, nType, FSEND);
+ m_pSerializer->startElementNS(XML_w, nType);
for (sal_Int32 i = 0; i < rTableCellMar.getLength(); ++i)
{
if (sal_Int32 nToken = DocxStringGetToken(aTableCellMarTokens, rTableCellMar[i].Name))
@@ -176,7 +176,7 @@ void DocxTableStyleExport::Impl::tableStyleTableCellMar(
rTableCellMar[i].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(), FSEND);
+ FSNS(XML_w, XML_type), aMap["type"].get<OUString>().toUtf8());
}
}
m_pSerializer->endElementNS(XML_w, nType);
@@ -225,7 +225,7 @@ void DocxTableStyleExport::Impl::tableStyleTcBorders(
if (!rTcBorders.hasElements())
return;
- m_pSerializer->startElementNS(XML_w, nToken, FSEND);
+ m_pSerializer->startElementNS(XML_w, nToken);
for (sal_Int32 i = 0; i < rTcBorders.getLength(); ++i)
if (sal_Int32 nSubToken = DocxStringGetToken(aTcBordersTokens, rTcBorders[i].Name))
tableStyleTcBorder(nSubToken,
@@ -423,7 +423,7 @@ void DocxTableStyleExport::Impl::tableStyleRPr(uno::Sequence<beans::PropertyValu
if (!rRPr.hasElements())
return;
- m_pSerializer->startElementNS(XML_w, XML_rPr, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_rPr);
uno::Sequence<beans::PropertyValue> aRFonts;
uno::Sequence<beans::PropertyValue> aLang;
@@ -484,16 +484,14 @@ void DocxTableStyleExport::Impl::tableStyleRPr(uno::Sequence<beans::PropertyValu
if (bSequenceFlag)
{
m_pSerializer->singleElementNS(XML_w, XML_spacing, FSNS(XML_w, XML_val),
- aSpacingSequence[0].Value.get<OUString>().toUtf8(), FSEND);
+ aSpacingSequence[0].Value.get<OUString>().toUtf8());
}
if (!aSpacing.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_spacing, FSNS(XML_w, XML_val), aSpacing.toUtf8(),
- FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_spacing, FSNS(XML_w, XML_val), aSpacing.toUtf8());
if (!aSz.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_sz, FSNS(XML_w, XML_val), aSz.toUtf8(), FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_sz, FSNS(XML_w, XML_val), aSz.toUtf8());
if (!aSzCs.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_szCs, FSNS(XML_w, XML_val), aSzCs.toUtf8(),
- FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_szCs, FSNS(XML_w, XML_val), aSzCs.toUtf8());
m_pSerializer->endElementNS(XML_w, XML_rPr);
}
@@ -503,7 +501,7 @@ void DocxTableStyleExport::Impl::tableStylePPr(uno::Sequence<beans::PropertyValu
if (!rPPr.hasElements())
return;
- m_pSerializer->startElementNS(XML_w, XML_pPr, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_pPr);
uno::Sequence<beans::PropertyValue> aSpacing;
uno::Sequence<beans::PropertyValue> aInd;
@@ -524,12 +522,12 @@ void DocxTableStyleExport::Impl::tableStylePPr(uno::Sequence<beans::PropertyValu
aSnapToGrid = rPPr[i].Value.get<OUString>();
}
if (bWordWrap)
- m_pSerializer->singleElementNS(XML_w, XML_wordWrap, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_wordWrap);
tableStylePInd(aInd);
handleBoolean(aSnapToGrid, XML_snapToGrid);
tableStylePSpacing(aSpacing);
if (!aJc.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_jc, FSNS(XML_w, XML_val), aJc.toUtf8(), FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_jc, FSNS(XML_w, XML_val), aJc.toUtf8());
m_pSerializer->endElementNS(XML_w, XML_pPr);
}
@@ -539,7 +537,7 @@ void DocxTableStyleExport::Impl::tableStyleTablePr(uno::Sequence<beans::Property
if (!rTablePr.hasElements())
return;
- m_pSerializer->startElementNS(XML_w, XML_tblPr, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_tblPr);
uno::Sequence<beans::PropertyValue> aTableInd;
uno::Sequence<beans::PropertyValue> aTableBorders;
@@ -561,10 +559,10 @@ void DocxTableStyleExport::Impl::tableStyleTablePr(uno::Sequence<beans::Property
}
if (oTableStyleRowBandSize)
m_pSerializer->singleElementNS(XML_w, XML_tblStyleRowBandSize, FSNS(XML_w, XML_val),
- OString::number(oTableStyleRowBandSize.get()), FSEND);
+ OString::number(oTableStyleRowBandSize.get()));
if (oTableStyleColBandSize)
m_pSerializer->singleElementNS(XML_w, XML_tblStyleColBandSize, FSNS(XML_w, XML_val),
- OString::number(oTableStyleColBandSize.get()), FSEND);
+ OString::number(oTableStyleColBandSize.get()));
tableStyleTableInd(aTableInd);
tableStyleTcBorders(aTableBorders, XML_tblBorders);
tableStyleTableCellMar(aTableCellMar);
@@ -577,7 +575,7 @@ void DocxTableStyleExport::Impl::tableStyleTcPr(uno::Sequence<beans::PropertyVal
if (!rTcPr.hasElements())
return;
- m_pSerializer->startElementNS(XML_w, XML_tcPr, FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_tcPr);
uno::Sequence<beans::PropertyValue> aShd;
uno::Sequence<beans::PropertyValue> aTcBorders;
@@ -598,8 +596,7 @@ void DocxTableStyleExport::Impl::tableStyleTcPr(uno::Sequence<beans::PropertyVal
tableStyleTableCellMar(aTcMar, XML_tcMar);
tableStyleShd(aShd);
if (!aVAlign.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_vAlign, FSNS(XML_w, XML_val), aVAlign.toUtf8(),
- FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_vAlign, FSNS(XML_w, XML_val), aVAlign.toUtf8());
m_pSerializer->endElementNS(XML_w, XML_tcPr);
}
@@ -629,8 +626,7 @@ void DocxTableStyleExport::Impl::tableStyleTableStylePr(
aTcPr = rTableStylePr[i].Value.get<uno::Sequence<beans::PropertyValue>>();
}
- m_pSerializer->startElementNS(XML_w, XML_tblStylePr, FSNS(XML_w, XML_type), aType.toUtf8(),
- FSEND);
+ m_pSerializer->startElementNS(XML_w, XML_tblStylePr, FSNS(XML_w, XML_type), aType.toUtf8());
tableStylePPr(aPPr);
tableStyleRPr(aRPr);
@@ -639,7 +635,7 @@ void DocxTableStyleExport::Impl::tableStyleTableStylePr(
else
{
// Even if we have an empty container, write it out, as Word does.
- m_pSerializer->singleElementNS(XML_w, XML_tblPr, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_tblPr);
}
tableStyleTcPr(aTcPr);
@@ -709,22 +705,20 @@ void DocxTableStyleExport::Impl::TableStyle(uno::Sequence<beans::PropertyValue>&
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(), FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_name, FSNS(XML_w, XML_val), aName.toUtf8());
if (!aBasedOn.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_basedOn, FSNS(XML_w, XML_val), aBasedOn.toUtf8(),
- FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_basedOn, FSNS(XML_w, XML_val), aBasedOn.toUtf8());
if (!aUiPriority.isEmpty())
m_pSerializer->singleElementNS(XML_w, XML_uiPriority, FSNS(XML_w, XML_val),
- aUiPriority.toUtf8(), FSEND);
+ aUiPriority.toUtf8());
if (bSemiHidden)
- m_pSerializer->singleElementNS(XML_w, XML_semiHidden, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_semiHidden);
if (bUnhideWhenUsed)
- m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed);
if (bQFormat)
- m_pSerializer->singleElementNS(XML_w, XML_qFormat, FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_qFormat);
if (!aRsid.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_rsid, FSNS(XML_w, XML_val), aRsid.toUtf8(),
- FSEND);
+ m_pSerializer->singleElementNS(XML_w, XML_rsid, FSNS(XML_w, XML_val), aRsid.toUtf8());
tableStylePPr(aPPr);
tableStyleRPr(aRPr);