diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-06-28 19:48:59 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-07-02 18:03:44 +0200 |
commit | 36bade04d3780bc54c51b46bb0b63e69789658a5 (patch) | |
tree | c4465bf33aa2cda65511a2c094688522e9c9b43a /svx/source/xoutdev | |
parent | 942f1056b51e53358d42ff8da8a1bbdce9ba5303 (diff) |
tdf106792 Get rid of SvxShapePolyPolygonBezier
SvxShapePolyPolygonBezier was an implementation for the UNO
Shape group of polygons with bezier parts (filled/unfilled/
closed/open), e.g. com.sun.star.drawing.OpenBezierShape.
It was differing from SvxShapePolyPolygon just by supporting
drawing::PolyPolygonBezierCoords instead of the simple
drawing::PointSequenceSequence and some details.
This leads to problems - the ShapeType *does change* e.g.
when you edit a non-bezier Shape in Draw/Impress and change
parts to curve (also when closing, see ShapeTypes above).
This is why SvxShape::getShapeType() already detects this
identifier by using thze internal ShapePolyType (e.g.
OBJ_PATHLINE).
So there is no reason to have two separate UNO API imple-
mentations for sthe same type of SvxShape at all. Get rid
of the extra one and unify this implementation detail.
Also cleaned up double basegfx tooling for conversions of
UNO API Poly/bezier data and B2DPolygon.
Adapted test for "tdf113946.docx", see comment there.
Adapted test for "tdf90097.rtf", see comment there. Also
needed to use the Linux values, also check comment there.
Adapted test for "tdf105127.docx", see comment there.
Adapted test for "tdf85232.docx", see comment there.
Had to fic a problem with test for "tdf96674.docx"- the
adaption of the RotateAngle for line objects goes havoc
together with the UNO API when scaling is involved. That
old aGeo rotate stuff just kills the existing rotation due
to numerical inprecise stuff. The UNP API - in trying not
just to apply a rptation, but manipulate the existing one
then goes wrong in not re-getting the current rotation
value anymore. ARGH! This is the original reason for the
ols tdf#96674 task - i doubt that the additional code to
make a line not exactly hor/ver is needed.
Checked and it is not needed, thus removed the change from
tdf#96674 in shape.cxx.
Change-Id: I2bb8d4cfe33fee3671f3dad60e5c18609a394f9d
Reviewed-on: https://gerrit.libreoffice.org/56614
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r-- | svx/source/xoutdev/xattr.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 8e48a60b47c7..305c9fe410fd 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -57,7 +57,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dvector.hxx> -#include <basegfx/utils/unotools.hxx> +#include <basegfx/polygon/b2dpolypolygontools.hxx> #include <unotools/intlwrapper.hxx> #include <vcl/gradient.hxx> @@ -1020,7 +1020,7 @@ bool XLineStartItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) cons else { css::drawing::PolyPolygonBezierCoords aBezier; - basegfx::unotools::b2DPolyPolygonToPolyPolygonBezier( maPolyPolygon, aBezier ); + basegfx::utils::B2DPolyPolygonToUnoPolyPolygonBezierCoords( maPolyPolygon, aBezier ); rVal <<= aBezier; } @@ -1047,7 +1047,7 @@ bool XLineStartItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) if( pCoords->Coordinates.getLength() > 0 ) { - maPolyPolygon = basegfx::unotools::polyPolygonBezierToB2DPolyPolygon( *pCoords ); + maPolyPolygon = basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( *pCoords ); // #i72807# close line start/end polygons hard // maPolyPolygon.setClosed(true); } @@ -1551,7 +1551,7 @@ bool XLineEndItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) const else { css::drawing::PolyPolygonBezierCoords aBezier; - basegfx::unotools::b2DPolyPolygonToPolyPolygonBezier( maPolyPolygon, aBezier ); + basegfx::utils::B2DPolyPolygonToUnoPolyPolygonBezierCoords( maPolyPolygon, aBezier ); rVal <<= aBezier; } return true; @@ -1577,7 +1577,7 @@ bool XLineEndItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) if( pCoords->Coordinates.getLength() > 0 ) { - maPolyPolygon = basegfx::unotools::polyPolygonBezierToB2DPolyPolygon( *pCoords ); + maPolyPolygon = basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( *pCoords ); // #i72807# close line start/end polygons hard // maPolyPolygon.setClosed(true); } |