summaryrefslogtreecommitdiff
path: root/svgio/source/svgreader/svgstyleattributes.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-01-23 09:27:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-13 21:00:33 +0100
commit0061af795047deb92c4b43ec191ad6ffd97d0b64 (patch)
tree6cf5df0880e4dc5b2699926d57dfe6214bb7f746 /svgio/source/svgreader/svgstyleattributes.cxx
parentf321d9519fc067977b003109373ad36a2fc4c97e (diff)
Resolves: #i121656# Some more cleanups for SVG import
also const as const can (cherry picked from commit bb9ad24b16add4888c4b1fadac5252b95a72f04f) Conflicts: svgio/inc/svgio/svgreader/svgstyleattributes.hxx svgio/source/svgreader/svgstyleattributes.cxx svgio/source/svgreader/svgtoken.cxx Change-Id: If236eb8b1e0193c43229ea6dc496eb3a8fd20c42 Related: #i121656# removed const for return-by-value (cherry picked from commit aa85e31b3162cd4b18c818bf0af1a854cb05c57d) Conflicts: svgio/inc/svgio/svgreader/svgstyleattributes.hxx svgio/source/svgreader/svgstyleattributes.cxx Change-Id: Ief43c478ea3000d114487918875e9a201dd827bc
Diffstat (limited to 'svgio/source/svgreader/svgstyleattributes.cxx')
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx43
1 files changed, 22 insertions, 21 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 140107f5d604..7b8a8a59cc1a 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1070,6 +1070,18 @@ namespace svgio
aSource = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
}
+ if(pTransform)
+ {
+ // create embedding group element with transformation. This applies the given
+ // transformation to the graphical content, but *not* to mask and/or clip (as needed)
+ const drawinglayer::primitive2d::Primitive2DReference xRef(
+ new drawinglayer::primitive2d::TransformPrimitive2D(
+ *pTransform,
+ aSource));
+
+ aSource = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
+ }
+
if(getClipPathXLink().getLength())
{
// try to access linked ClipPath
@@ -1096,17 +1108,6 @@ namespace svgio
if(aSource.hasElements()) // test again, applied mask may have lead to empty geometry
{
- if(pTransform)
- {
- // create embedding group element with transformation
- const drawinglayer::primitive2d::Primitive2DReference xRef(
- new drawinglayer::primitive2d::TransformPrimitive2D(
- *pTransform,
- aSource));
-
- aSource = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
- }
-
// append to current target
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aSource);
}
@@ -1951,7 +1952,7 @@ namespace svgio
return 0;
}
- const SvgNumber SvgStyleAttributes::getStrokeWidth() const
+ SvgNumber SvgStyleAttributes::getStrokeWidth() const
{
if(mbIsClipPathContent)
{
@@ -1973,7 +1974,7 @@ namespace svgio
return SvgNumber(1.0);
}
- const SvgNumber SvgStyleAttributes::getStopOpacity() const
+ SvgNumber SvgStyleAttributes::getStopOpacity() const
{
if(maStopOpacity.isSet())
{
@@ -1984,7 +1985,7 @@ namespace svgio
return SvgNumber(1.0);
}
- const SvgNumber SvgStyleAttributes::getFillOpacity() const
+ SvgNumber SvgStyleAttributes::getFillOpacity() const
{
if(mbIsClipPathContent)
{
@@ -2047,7 +2048,7 @@ namespace svgio
return maStrokeDasharray;
}
- const SvgNumber SvgStyleAttributes::getStrokeDashOffset() const
+ SvgNumber SvgStyleAttributes::getStrokeDashOffset() const
{
if(maStrokeDashOffset.isSet())
{
@@ -2101,7 +2102,7 @@ namespace svgio
return StrokeLinejoin_miter;
}
- const SvgNumber SvgStyleAttributes::getStrokeMiterLimit() const
+ SvgNumber SvgStyleAttributes::getStrokeMiterLimit() const
{
if(maStrokeMiterLimit.isSet())
{
@@ -2119,7 +2120,7 @@ namespace svgio
return SvgNumber(4.0);
}
- const SvgNumber SvgStyleAttributes::getStrokeOpacity() const
+ SvgNumber SvgStyleAttributes::getStrokeOpacity() const
{
if(maStrokeOpacity.isSet())
{
@@ -2155,7 +2156,7 @@ namespace svgio
return maFontFamily;
}
- const SvgNumber SvgStyleAttributes::getFontSize() const
+ SvgNumber SvgStyleAttributes::getFontSize() const
{
if(maFontSize.isSet())
{
@@ -2351,7 +2352,7 @@ namespace svgio
return 0;
}
- const OUString SvgStyleAttributes::getMarkerStartXLink() const
+ OUString SvgStyleAttributes::getMarkerStartXLink() const
{
if(maMarkerStartXLink.getLength())
{
@@ -2383,7 +2384,7 @@ namespace svgio
return mpMarkerStartXLink;
}
- const OUString SvgStyleAttributes::getMarkerMidXLink() const
+ OUString SvgStyleAttributes::getMarkerMidXLink() const
{
if(maMarkerMidXLink.getLength())
{
@@ -2415,7 +2416,7 @@ namespace svgio
return mpMarkerMidXLink;
}
- const OUString SvgStyleAttributes::getMarkerEndXLink() const
+ OUString SvgStyleAttributes::getMarkerEndXLink() const
{
if(maMarkerEndXLink.getLength())
{