From e0223d890701204e0637c6e40bef9c7519beffd58b6cdf91cf0aa33fad362c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 1 Apr 2021 13:01:06 +0000 Subject: [PATCH] Accepting request 882540 from LibreOffice:7.1 - Fix bsc#1182970 - LO-L3: PPTX: image styles that clip images into curvy shapes missing (and images shown rectangular) * bsc1182970.patch OBS-URL: https://build.opensuse.org/request/show/882540 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=952 --- bsc1182970.patch | 41 +++++++++++++++++++++++++++++++++++++++++ libreoffice.changes | 6 ++++++ libreoffice.spec | 3 +++ 3 files changed, 50 insertions(+) create mode 100644 bsc1182970.patch diff --git a/bsc1182970.patch b/bsc1182970.patch new file mode 100644 index 0000000..5baaf8a --- /dev/null +++ b/bsc1182970.patch @@ -0,0 +1,41 @@ +From ff751d42a4f672e25188ba90958e91d7869f395a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=BCl=C5=9Fah=20K=C3=B6se?= +Date: Mon, 22 Mar 2021 23:39:17 +0300 +Subject: [PATCH] tdf#140714 Import graphics cropped into custom geometry as + custom shapes. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I2054d24ce41c9f0d6cc1675f461274067c3b2898 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112943 +Tested-by: Jenkins +Reviewed-by: Jan Holesovsky +Reviewed-by: Gülşah Köse +(cherry picked from commit db39b68c3c85531744ddeb8105b3ddb9b2dab099) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112811 +Reviewed-by: Xisco Fauli +--- + oox/source/drawingml/shape.cxx | 6 ++++-- + sd/qa/unit/data/pptx/tdf140714.pptx | Bin 0 -> 28384 bytes + sd/qa/unit/export-tests.cxx | 16 ++++++++++++++++ + 3 files changed, 20 insertions(+), 2 deletions(-) + create mode 100644 sd/qa/unit/data/pptx/tdf140714.pptx + +diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx +index 5f3204bf64f2..ffa7fb017aca 100644 +--- a/oox/source/drawingml/shape.cxx ++++ b/oox/source/drawingml/shape.cxx +@@ -722,8 +722,10 @@ Reference< XShape > const & Shape::createAndInsert( + } + // Use custom shape instead of GraphicObjectShape if the image is cropped to + // shape. Except rectangle, which does not require further cropping +- bool bIsCroppedGraphic = (aServiceName == "com.sun.star.drawing.GraphicObjectShape" && mpCustomShapePropertiesPtr->getShapePresetType() >= 0 +- && mpCustomShapePropertiesPtr->getShapePresetType() != XML_Rect && mpCustomShapePropertiesPtr->getShapePresetType() != XML_rect); ++ bool bIsCroppedGraphic = (aServiceName == "com.sun.star.drawing.GraphicObjectShape" && ++ (mpCustomShapePropertiesPtr->getShapePresetType() >= 0 || mpCustomShapePropertiesPtr->getPath2DList().size() > 0) && ++ mpCustomShapePropertiesPtr->getShapePresetType() != XML_Rect && ++ mpCustomShapePropertiesPtr->getShapePresetType() != XML_rect); + bool bIsCustomShape = ( aServiceName == "com.sun.star.drawing.CustomShape" || + aServiceName == "com.sun.star.drawing.ConnectorShape" || + bIsCroppedGraphic); diff --git a/libreoffice.changes b/libreoffice.changes index e2e20f9..c13a2c7 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 1 10:52:06 UTC 2021 - Andras Timar + +- Fix bsc#1182970 - LO-L3: PPTX: image styles that clip images into curvy shapes missing (and images shown rectangular) + * bsc1182970.patch + ------------------------------------------------------------------- Thu Mar 25 14:25:20 UTC 2021 - Tomáš Chvátal diff --git a/libreoffice.spec b/libreoffice.spec index 79b6bdd..fd8c851 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -101,6 +101,8 @@ Patch2: nlpsolver-no-broken-help.diff Patch3: mediawiki-no-broken-help.diff # PATCH-FIX-UPSTREAM https://github.com/LibreOffice/core/commit/f14b83b38d35a585976ef5d422754d8e0d0266a6 ucp: fix call to getComponentContext Patch4: use-comphelper.patch +# Bug 1182970 - LO-L3: PPTX: image styles that clip images into curvy shapes missing (and images shown rectangular) +Patch5: bsc1182970.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff # save time by relying on rpm check rather than doing stupid find+grep @@ -960,6 +962,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo %patch2 %patch3 %patch4 -p1 +%patch5 -p1 %patch990 -p1 %patch991 -p1