diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2022-10-11 14:46:37 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-10-13 08:56:22 +0200 |
commit | e4515c1305e4b7bf6e7f105636e9cf6eb50b382d (patch) | |
tree | ecf403a925df14f32fef926a12f051e11a72d57f /oox | |
parent | 9e0dcfbaf0039d07609ed4e4a9ef9f1e2e1e6b55 (diff) |
tdf#149840 Use actual outer size for SmartArt in Writer
SmartArt import needs the outer size of the diagram for to define a
background shape in the correct size and calculate the size of the
diagram shapes relative to the outer size. The patch passes the values
read from wp:extent in writerfilter to DiagramGraphicDataContext in oox.
Change-Id: Ib39227bc645ac353336bab2c558d041974188f6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141223
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/shape/ShapeContextHandler.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 2e4018e4703c..54a455452365 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -215,6 +215,7 @@ ShapeContextHandler::getDiagramShapeContext() { auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, msRelationFragmentPath); mpShape = std::make_shared<Shape>(); + mpShape->setSize(maSize); mxDiagramShapeContext.set(new DiagramGraphicDataContext(*pFragmentHandler, mpShape)); } @@ -564,6 +565,11 @@ void ShapeContextHandler::setPosition(const awt::Point& rPosition) maPosition = rPosition; } +void ShapeContextHandler::setSize(const awt::Size& rSize) +{ + maSize = rSize; +} + void ShapeContextHandler::setDocumentProperties(const uno::Reference<document::XDocumentProperties>& xDocProps) { mxDocumentProperties = xDocProps; |