diff options
author | Regényi Balázs <regenyi.balazs@nisz.hu> | 2020-12-01 12:16:12 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-12-10 10:27:33 +0100 |
commit | bda05ba17362222b74727872579b65b3fa14e3d8 (patch) | |
tree | 60d9448754f1a992e7e9695c8f458b55cfb62d69 /include/oox | |
parent | 7720f8cf22718415adb3db2304916581f864f884 (diff) |
tdf#41466 DOCX import: fix VML v:shape/v:textbox
VML v:shape/v:textbox element was imported only as
a text frame, losing (otherwise recognized) preset
shape geometry, i.e. replacing a callout bubble
(wedgeRectCallout) and other special shapes with a
plain rectangle.
Thanks to Attila Bakos for the initial help.
Change-Id: I03a608822ed54a20ed07406a08c3539e72958f5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105299
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'include/oox')
-rw-r--r-- | include/oox/export/drawingml.hxx | 4 | ||||
-rw-r--r-- | include/oox/vml/vmlshape.hxx | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 31eeb727760f..9f87e54c1361 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -70,6 +70,7 @@ namespace style { namespace text { class XTextContent; class XTextRange; + class XTextFrame; } namespace io { class XOutputStream; @@ -125,6 +126,9 @@ public: virtual OUString FindRelId(BitmapChecksum nChecksum) = 0; /// Store the RelId of a graphic based on its checksum. virtual void CacheRelId(BitmapChecksum nChecksum, const OUString& rRelId) = 0; + /// Get textbox which belongs to the shape. + virtual css::uno::Reference<css::text::XTextFrame> GetUnoTextFrame( + css::uno::Reference<css::drawing::XShape> xShape) = 0; protected: DMLTextExport() {} virtual ~DMLTextExport() {} diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx index 7703b311c757..0e50e5b6ee1f 100644 --- a/include/oox/vml/vmlshape.hxx +++ b/include/oox/vml/vmlshape.hxx @@ -216,6 +216,7 @@ struct ShapeModel OUString maSignatureLineSigningInstructions; bool mbSignatureLineShowSignDate; bool mbSignatureLineCanAddComment; + bool mbInGroup; explicit ShapeModel(); ~ShapeModel(); @@ -275,6 +276,13 @@ protected: const css::uno::Reference< css::drawing::XShapes >& rxShapes, const css::awt::Rectangle& rShapeRect ) const = 0; + /** Always called after implConvertAndInsert for the same task.*/ + virtual css::uno::Reference<css::drawing::XShape> finalImplConvertAndInsert( + const css::uno::Reference<css::drawing::XShape>& rxShape) const + { + return rxShape; + }; + /** Calculates the final shape rectangle according to the passed anchor, if present, otherwise according to the own anchor settings. */ css::awt::Rectangle calcShapeRectangle( @@ -304,6 +312,8 @@ protected: implConvertAndInsert( const css::uno::Reference< css::drawing::XShapes >& rxShapes, const css::awt::Rectangle& rShapeRect ) const override; + virtual css::uno::Reference<css::drawing::XShape> finalImplConvertAndInsert( + const css::uno::Reference<css::drawing::XShape>& rxShape) const override; /** Used by both RectangleShape and ComplexShape. */ css::uno::Reference<css::drawing::XShape>createEmbeddedPictureObject( const css::uno::Reference< css::drawing::XShapes >& rxShapes, |