summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-01-26 01:29:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-02-02 12:21:38 +0000
commitf9f51e90196101ba0e545fc2631c7414760fa6b5 (patch)
tree6f6b5069a2c4debdb19f68b035dcd8f34f734e16 /svgio
parentc39e78c7680457c1e276569409b6a2c279758496 (diff)
SVGIO: tdf#45771: Fix issue when text size is twice its size...
... when using relative units (em, ex) This is because for nodes of type textnode, getFontSizeNumber is called from SvgCharacterNode::createSimpleTextPrimitive and from SvgNode::getCurrentFontSize(), so avoid the second call. Change-Id: Ibd418708a572e3c1643164a900fac7e7481afe81 Reviewed-on: https://gerrit.libreoffice.org/21801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 701324a1e1f7e0c181ff1a50956ced686785ea53) Reviewed-on: https://gerrit.libreoffice.org/21871 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/inc/svgio/svgreader/svgnode.hxx2
-rw-r--r--svgio/inc/svgio/svgreader/svgtextnode.hxx2
-rw-r--r--svgio/source/svgreader/svgtextnode.cxx5
3 files changed, 8 insertions, 1 deletions
diff --git a/svgio/inc/svgio/svgreader/svgnode.hxx b/svgio/inc/svgio/svgreader/svgnode.hxx
index d951a284b20c..3d0dbf5cd999 100644
--- a/svgio/inc/svgio/svgreader/svgnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgnode.hxx
@@ -160,7 +160,7 @@ namespace svgio
virtual double getCurrentFontSizeInherited() const override;
virtual double getCurrentXHeightInherited() const override;
- double getCurrentFontSize() const;
+ virtual double getCurrentFontSize() const;
double getCurrentXHeight() const;
/// Id access
diff --git a/svgio/inc/svgio/svgreader/svgtextnode.hxx b/svgio/inc/svgio/svgreader/svgtextnode.hxx
index 6d0d5c558d00..54b960c89d49 100644
--- a/svgio/inc/svgio/svgreader/svgtextnode.hxx
+++ b/svgio/inc/svgio/svgreader/svgtextnode.hxx
@@ -58,6 +58,8 @@ namespace svgio
virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) override;
virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DSequence& rTarget, bool bReferenced) const override;
+ virtual double getCurrentFontSize() const override;
+
/// transform content, set if found in current context
const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform; }
void setTransform(const basegfx::B2DHomMatrix* pMatrix = nullptr) { if(mpaTransform) delete mpaTransform; mpaTransform = nullptr; if(pMatrix) mpaTransform = new basegfx::B2DHomMatrix(*pMatrix); }
diff --git a/svgio/source/svgreader/svgtextnode.cxx b/svgio/source/svgreader/svgtextnode.cxx
index 5f3e0ceac1f5..b39f078dba40 100644
--- a/svgio/source/svgreader/svgtextnode.cxx
+++ b/svgio/source/svgreader/svgtextnode.cxx
@@ -260,6 +260,11 @@ namespace svgio
}
}
}
+
+ double SvgTextNode::getCurrentFontSize() const
+ {
+ return getCurrentFontSizeInherited();
+ }
} // end of namespace svgreader
} // end of namespace svgio