summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/shape.cxx
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2023-03-08 16:26:10 +0100
committerLászló Németh <nemeth@numbertext.org>2023-03-27 08:32:50 +0000
commita41dbf0bd726613204d975fb4fc5e50c23d61410 (patch)
treed72fcae7802892414bb95f2a96777f765c650041 /oox/source/drawingml/shape.cxx
parent31690100461d42fd93b9a1a6546b1e17a8d31720 (diff)
tdf#153466 PPTX import: fix "Custom position/size" background image
Custom sized background with the value "tile" was imported as "stretched", losing the preset size. Restore also the exported preset positions, and map the other values to the preset positions supported by OpenDocument/Impress. Follow-up to commit 11451781d4c562f506a3aae3732e35b92387b4db (tdf#153105 PPTX export: fix "Custom position/size" background image) Change-Id: Ibf9b487ecd31b3ad7b06bda668c51e6b7a98c4af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148482 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox/source/drawingml/shape.cxx')
-rw-r--r--oox/source/drawingml/shape.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 18e087dc2207..b8cac0d8f385 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -719,6 +719,7 @@ static void lcl_copyCharPropsToShape(const uno::Reference<drawing::XShape>& xSha
rCharProps.maFillProperties.pushToPropMap(aFillShapeProps, rFilter.getGraphicHelper(),
/*nShapeRotation*/ 0,
/*nPhClr*/ API_RGB_TRANSPARENT,
+ /*aShapeSize*/ css::awt::Size(0, 0),
/*nPhClrTheme*/ -1,
/*bFlipH*/ false, /*bFlipV*/ false,
/*bIsCustomShape*/ true);
@@ -1286,7 +1287,10 @@ Reference< XShape > const & Shape::createAndInsert(
if (getFillProperties().moFillType.has_value() && getFillProperties().moFillType.value() == XML_grpFill)
getFillProperties().assignUsed(aFillProperties);
if(!bIsCroppedGraphic)
- aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr, nFillPhClrTheme, mbFlipH, mbFlipV, bIsCustomShape );
+ aFillProperties.pushToPropMap(aShapeProps, rGraphicHelper, mnRotation, nFillPhClr,
+ css::awt::Size(aShapeRectHmm.Width, aShapeRectHmm.Height),
+ nFillPhClrTheme, mbFlipH, mbFlipV, bIsCustomShape);
+
LineProperties aLineProperties = getActualLineProperties(pTheme);
aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr, nLinePhClrTheme);
EffectProperties aEffectProperties = getActualEffectProperties(pTheme);