summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-11-26 17:44:24 +0100
committerBalazs Varga <varga.balazs3@nisz.hu>2020-11-30 10:23:29 +0100
commitf1a5bb0b79c212a0459b1a17dd15f1159e663dbd (patch)
tree1b2935893234a26b1669cc2279e0e7ae416749e0 /oox
parent79ec66700266a22966d9e308a716be56c9c3a4a7 (diff)
tdf#138561 OOXML Chart import: fix custom shape position
and size within charts. Use default page size for custom shapes, too, like in the case of other shapes (legend, titles, etc.), until we get the actual size of the embedded chart. Follow up commit: a01ccdfa5fd5a0260b7aedf955e1e5aa0df072c3 (tdf#138307 Chart import: fix disappeared text from custom shape) Change-Id: Id6da7322326fbe8dfa570264107db59cc45dff31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106704 Reviewed-by: Balazs Varga <varga.balazs3@nisz.hu> Tested-by: Balazs Varga <varga.balazs3@nisz.hu>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/chartspaceconverter.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx
index 1f90c2e092eb..d33e0086cc08 100644
--- a/oox/source/drawingml/chart/chartspaceconverter.cxx
+++ b/oox/source/drawingml/chart/chartspaceconverter.cxx
@@ -275,9 +275,13 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern
drawing page instead, it is not possible to embed OLE objects. */
bool bOleSupport = rxExternalPage.is();
+ awt::Size aChartSize = getChartSize();
+ if( aChartSize.Width <= 0 || aChartSize.Height <= 0 )
+ aChartSize = getDefaultPageSize();
+
// now, xShapes is not null anymore
getFilter().importFragment( new ChartDrawingFragment(
- getFilter(), mrModel.maDrawingPath, xShapes, getChartSize(), aShapesOffset, bOleSupport ) );
+ getFilter(), mrModel.maDrawingPath, xShapes, aChartSize, aShapesOffset, bOleSupport ) );
}
catch( Exception& )
{