summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-11-26 17:44:24 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2020-11-30 12:33:56 +0100
commit48ad658a7aacf849e773aa5d3400540d81f988f2 (patch)
treeedb0c7f747997bdc1c57ad1a3a3615f5676f68d1 /oox
parent1aacd856ab0cf7217e2435c2e8c84d2e00963cb2 (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> (cherry picked from commit f1a5bb0b79c212a0459b1a17dd15f1159e663dbd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106820 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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& )
{