[Libreoffice-commits] core.git: svgio/inc svgio/source
Xisco Fauli
anistenis at gmail.com
Wed Jan 27 22:48:24 PST 2016
svgio/inc/svgio/svgreader/svgnode.hxx | 2 +-
svgio/inc/svgio/svgreader/svgtextnode.hxx | 2 ++
svgio/source/svgreader/svgtextnode.cxx | 5 +++++
3 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 701324a1e1f7e0c181ff1a50956ced686785ea53
Author: Xisco Fauli <anistenis at gmail.com>
Date: Tue Jan 26 01:29:22 2016 +0100
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 at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/svgio/inc/svgio/svgreader/svgnode.hxx b/svgio/inc/svgio/svgreader/svgnode.hxx
index ab7f28a..d72cde3 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 7922f13..86c1321 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::Primitive2DContainer& 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 4637bce..ae7d0e1 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
More information about the Libreoffice-commits
mailing list