summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2020-12-10 21:05:49 +0100
committerAndras Timar <andras.timar@collabora.com>2020-12-14 16:28:53 +0100
commit80d37706ac65dc3438398bdb543e3a5e5e866c63 (patch)
treec969aa6cd5b604cd4d82d613c4bc3ad8aa79932d
parent1663c19834fbff0b9bddfaa7f353c9a1e0589739 (diff)
impress: <count> variable not substituted in presentation on slideshowco-6.2-27
Change-Id: Ifa93c112dae217b65a874b37de7727e671da8b60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107633 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--filter/source/svg/svgwriter.cxx11
-rw-r--r--filter/source/svg/svgwriter.hxx1
2 files changed, 12 insertions, 0 deletions
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 1558836a21e9..e4a7c4bac7a7 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1110,6 +1110,7 @@ bool SVGTextWriter::nextTextPortion()
sInfo = "type: " + sPortionType + "; ";
}
#endif
+ msPageCount = "";
if( xPortionTextRange.is() )
{
#if OSL_DEBUG_LEVEL > 0
@@ -1161,6 +1162,10 @@ bool SVGTextWriter::nextTextPortion()
{
mbIsPlaceholderShape = true;
}
+ else if (sFieldName == "PageCount")
+ {
+ msPageCount = xTextField->getPresentation( /* show command: */ false );
+ }
else
{
mbIsURLField = sFieldName == "URL";
@@ -1673,6 +1678,12 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
mrExport.GetDocHandler()->characters( rText );
}
}
+ else if ( !msPageCount.isEmpty() )
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "PageCount" );
+ SvXMLElementExport aSVGTspanElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS );
+ mrExport.GetDocHandler()->characters( msPageCount );
+ }
else
{
SvXMLElementExport aSVGTspanElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS );
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 687f6cae5676..e8396f16b886 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -248,6 +248,7 @@ class SVGTextWriter final
bool mbIsURLField;
OUString msUrl;
OUString msHyperlinkIdList;
+ OUString msPageCount;
bool mbIsPlaceholderShape;
static const bool mbIWS = false;
vcl::Font maCurrentFont;