summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRegényi Balázs <regenyi.balazs@nisz.hu>2020-12-01 12:16:12 +0100
committerLászló Németh <nemeth@numbertext.org>2020-12-10 12:03:39 +0100
commitaefb6aaf6475b71668bab7e11ce51b0fdc34f299 (patch)
tree38353099670125a3cb96189e0dc1fb155b73d2e1 /include
parent172b81479451f0af2978dfa2eba1f9d105b946c9 (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> (cherry picked from commit bda05ba17362222b74727872579b65b3fa14e3d8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107486
Diffstat (limited to 'include')
-rw-r--r--include/oox/export/drawingml.hxx4
-rw-r--r--include/oox/vml/vmlshape.hxx10
2 files changed, 14 insertions, 0 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index a4ef6af0530f..0a42eb84f001 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,