summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-11-21 11:44:22 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-11-21 12:37:15 +0100
commit6c4f737ec88a4f4dc5da8b2295ca5e7de2d4c24f (patch)
tree2c378201a71937f9e80deb795d8e4079e3087fdb /include
parent6eac9deadd9fb6d0c547791e3a8ae4f9a4d33de4 (diff)
DOCX drawingML shape import: fix position when CustomShapeGeometry is set
DOCX drawingML shapes had wrong position if they had their CustomShapeGeometry set (e.g. flipped). This wasn't a problem for VML shapes, as there the shape knows its position, and position was always set in oox as well, not in writerfilter. However, in case of WPS shapes, oox created the shape, and previously writerfilter set the position after-the-fact. This leads to incorrect results if CustomShapeGeometry is involved. Fix this by passing the position from writerfilter to oox, and call setPosition() after creation, but before CustomShapeGeometry is set. The other problem was that normally writerfilter learns the position of the shape when relevant token in GraphicImport::lcl_sprm() arrives, but this happens after OOXMLFastContextHandlerShape::sendShape() needs that information. Work around this by accessing the PositionHandler directly. Change-Id: Iced35dc9467ef77c41f1897f124729f686bd045e
Diffstat (limited to 'include')
-rw-r--r--include/oox/drawingml/shape.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 9c8faa9c95db..5fcb91c1d5a4 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -173,6 +173,8 @@ public:
void addExtDrawingRelId( const OUString &rRelId ) { maExtDrawings.push_back( rRelId ); }
void setLockedCanvas(bool bLockedCanvas);
bool getLockedCanvas();
+ void setWps(bool bWps);
+ bool getWps();
const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &
getDiagramDoms() { return maDiagramDoms; }
void setDiagramDoms(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rDiagramDoms) { maDiagramDoms = rDiagramDoms; }
@@ -272,6 +274,7 @@ private:
// we need separate flag because we don't want
// to propagate it when applying reference shape
bool mbLockedCanvas; ///< Is this shape part of a locked canvas?
+ bool mbWps; ///< Is this a wps shape?
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> maDiagramDoms;
};