From b58eb2829ef09f3b56618afdb74b5951fc05aa4140a2e69f6c17dccc18f41cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 6 May 2019 08:54:44 +0000 Subject: [PATCH 1/4] - Fake the epoch to make zip files reproducible OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=784 --- libreoffice.changes | 5 +++++ libreoffice.spec | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/libreoffice.changes b/libreoffice.changes index abb92b7..1593ed5 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 6 08:54:09 UTC 2019 - Tomáš Chvátal + +- Fake the epoch to make zip files reproducible + ------------------------------------------------------------------- Mon Apr 15 09:14:47 UTC 2019 - Tomáš Chvátal diff --git a/libreoffice.spec b/libreoffice.spec index b964205..fc0c0cc 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -68,6 +68,7 @@ Source5: %{tarball_url}/libreoffice-translations-%{version}.tar.xz.asc Source6: SUSE.soc Source98: %{name}.keyring Source99: %{name}-rpmlintrc +Source100: %{name}.changes # prebuilt extensions Source402: %{external_url}/b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_%{numbertext_version}.oxt # used extensions sources @@ -1010,6 +1011,9 @@ export CC=gcc-7 export CXX=g++-7 %endif +# Fake the epoch stuff in generated zip files +export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s) + # Colada does not have .pc file and configure creator was really lazy export OPENCOLLADA_CFLAGS='-I/usr/include/COLLADABaseUtils -I/usr/include/COLLADAFramework -I/usr/include/COLLADASaxFrameworkLoader -I/usr/include/GeneratedSaxParser' export OPENCOLLADA_LIBS='-lOpenCOLLADABaseUtils -lOpenCOLLADAFramework -lOpenCOLLADASaxFrameworkLoader -lGeneratedSaxParser' From 37d9c0c403641ae62305e1d12a5d209343af0dec15828b7beeb222e5ac607751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 15 May 2019 15:48:41 +0000 Subject: [PATCH 2/4] Accepting request 703149 from home:marxin:branches:LibreOffice:Factory - Strip lto from %_lto_cflags as the project has --enable-lto option OBS-URL: https://build.opensuse.org/request/show/703149 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=785 --- libreoffice.changes | 5 +++++ libreoffice.spec | 2 ++ 2 files changed, 7 insertions(+) diff --git a/libreoffice.changes b/libreoffice.changes index 1593ed5..fbf5936 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 15 13:43:40 UTC 2019 - Martin Liška + +- Strip lto from %_lto_cflags as the project has --enable-lto option + ------------------------------------------------------------------- Mon May 6 08:54:09 UTC 2019 - Tomáš Chvátal diff --git a/libreoffice.spec b/libreoffice.spec index fc0c0cc..9bb2ace 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -991,6 +991,8 @@ echo "HTML_TIMESTAMP = NO" >> odk/docs/cpp/Doxyfile echo "HTML_TIMESTAMP = NO" >> odk/docs/idl/Doxyfile %build +# Strip lto from %_lto_cflags as the project has --enable-lto option +%define _lto_cflags %{nil} # do not eat all memory %limit_build -m 1200 # make sure that JAVA_HOME is set correctly From bb35210846c5729b776664b805560ae7dd97cdde05fc6f8f2cc96746f1bb9c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 16 May 2019 15:10:57 +0000 Subject: [PATCH 3/4] Accepting request 703455 from LibreOffice:6.2 3 LO-L3s fixed OBS-URL: https://build.opensuse.org/request/show/703455 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=786 --- bsc1121874.patch | 113 +++++++++++++++++++++++++++++++++++++++++ bsc1124869.patch | 121 ++++++++++++++++++++++++++++++++++++++++++++ bsc1127760.patch | 48 ++++++++++++++++++ libreoffice.changes | 10 ++++ libreoffice.spec | 9 ++++ 5 files changed, 301 insertions(+) create mode 100644 bsc1121874.patch create mode 100644 bsc1124869.patch create mode 100644 bsc1127760.patch diff --git a/bsc1121874.patch b/bsc1121874.patch new file mode 100644 index 0000000..7718dc4 --- /dev/null +++ b/bsc1121874.patch @@ -0,0 +1,113 @@ +From 8af919d30f0f17a17ee6f5190bb31652476a52df Mon Sep 17 00:00:00 2001 +From: Tamas Bunth +Date: Mon, 13 May 2019 01:02:07 +0200 +Subject: ooxml import: supprt cropping to shape +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I7bdc959921ecb0cbf19037a78b63eaeb8fc52814 +Reviewed-on: https://gerrit.libreoffice.org/72206 +Tested-by: Jenkins +Reviewed-by: Tamás Bunth +Reviewed-on: https://gerrit.libreoffice.org/72310 +Reviewed-by: Miklos Vajna +--- + oox/inc/drawingml/graphicproperties.hxx | 3 ++- + oox/source/drawingml/fillproperties.cxx | 12 ++++++++++-- + oox/source/drawingml/shape.cxx | 17 ++++++++++++++--- + 3 files changed, 26 insertions(+), 6 deletions(-) + +diff --git a/oox/inc/drawingml/graphicproperties.hxx b/oox/inc/drawingml/graphicproperties.hxx +index 01dd96c..7a227f8 100644 +--- a/oox/inc/drawingml/graphicproperties.hxx ++++ b/oox/inc/drawingml/graphicproperties.hxx +@@ -40,12 +40,13 @@ struct GraphicProperties + { + BlipFillProperties maBlipProps; ///< Properties for the graphic. + OUString m_sMediaPackageURL; ///< Audio/Video URL. ++ bool mbIsCustomShape = false; + css::uno::Reference m_xMediaStream; ///< Audio/Video input stream. + + /** Writes the properties to the passed property map. */ + void pushToPropMap( + PropertyMap& rPropMap, +- const GraphicHelper& rGraphicHelper ) const; ++ const GraphicHelper& rGraphicHelper) const; + }; + + } // namespace drawingml +diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx +index a2fb6ee..be91daa 100644 +--- a/oox/source/drawingml/fillproperties.cxx ++++ b/oox/source/drawingml/fillproperties.cxx +@@ -703,7 +703,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, + } + } + +-void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper ) const ++void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper) const + { + sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 ); + sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 ); +@@ -734,7 +734,15 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe + nBrightness = 0; + nContrast = 0; + } +- rPropMap.setProperty(PROP_Graphic, xGraphic); ++ if(mbIsCustomShape) ++ { ++ // it is a cropped graphic. ++ rPropMap.setProperty(PROP_FillStyle, FillStyle_BITMAP); ++ rPropMap.setProperty(PROP_FillBitmapMode, BitmapMode_STRETCH); ++ rPropMap.setProperty(PROP_FillBitmap, xGraphic); ++ } ++ else ++ rPropMap.setProperty(PROP_Graphic, xGraphic); + + // cropping + if ( maBlipProps.moClipRect.has() ) +diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx +index 933d909..ba3e8d7 100644 +--- a/oox/source/drawingml/shape.cxx ++++ b/oox/source/drawingml/shape.cxx +@@ -647,8 +647,18 @@ Reference< XShape > const & Shape::createAndInsert( + { + aServiceName = finalizeServiceName( rFilterBase, rServiceName, aShapeRectHmm ); + } ++ // 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 bIsCustomShape = ( aServiceName == "com.sun.star.drawing.CustomShape" || +- aServiceName == "com.sun.star.drawing.ConnectorShape" ); ++ aServiceName == "com.sun.star.drawing.ConnectorShape" || ++ bIsCroppedGraphic); ++ if(bIsCroppedGraphic) ++ { ++ aServiceName = "com.sun.star.drawing.CustomShape"; ++ mpGraphicPropertiesPtr->mbIsCustomShape = true; ++ } + bool bUseRotationTransform = ( !mbWps || + aServiceName == "com.sun.star.drawing.LineShape" || + aServiceName == "com.sun.star.drawing.GroupShape" || +@@ -949,13 +959,14 @@ Reference< XShape > const & Shape::createAndInsert( + // applying properties + aShapeProps.assignUsed( getShapeProperties() ); + aShapeProps.assignUsed( maDefaultShapeProperties ); +- if ( bIsEmbMedia || aServiceName == "com.sun.star.drawing.GraphicObjectShape" || aServiceName == "com.sun.star.drawing.OLE2Shape" ) ++ if ( bIsEmbMedia || aServiceName == "com.sun.star.drawing.GraphicObjectShape" || aServiceName == "com.sun.star.drawing.OLE2Shape" || bIsCustomShape ) + mpGraphicPropertiesPtr->pushToPropMap( aShapeProps, rGraphicHelper ); + if ( mpTablePropertiesPtr.get() && aServiceName == "com.sun.star.drawing.TableShape" ) + mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle ); + + FillProperties aFillProperties = getActualFillProperties(pTheme, &rShapeOrParentShapeFillProps); +- aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr, mbFlipH, mbFlipV ); ++ if(!bIsCroppedGraphic) ++ aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr, mbFlipH, mbFlipV ); + LineProperties aLineProperties = getActualLineProperties(pTheme); + aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr ); + EffectProperties aEffectProperties = getActualEffectProperties(pTheme); +-- +cgit v1.1 + diff --git a/bsc1124869.patch b/bsc1124869.patch new file mode 100644 index 0000000..528be78 --- /dev/null +++ b/bsc1124869.patch @@ -0,0 +1,121 @@ +From dc75d3cc5f2797dd5a8675004302a52bda1210c6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tam=C3=A1s=20Zolnai?= +Date: Thu, 9 May 2019 13:03:13 +0200 +Subject: PPTX: Fix import / export of image transparency +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Reviewed-on: https://gerrit.libreoffice.org/71916 +Tested-by: Jenkins +Reviewed-by: Tamás Zolnai +(cherry picked from commit ae3aabdb951643af8d2f7aee9c9f900245e5b384) + +Change-Id: Ib07c606083b833389fcb82aac57ca8535d6e861f +Reviewed-on: https://gerrit.libreoffice.org/72051 +Tested-by: Jenkins +Reviewed-by: Andras Timar +--- + oox/source/drawingml/fillproperties.cxx | 5 +++++ + oox/source/export/drawingml.cxx | 6 +++--- + sd/qa/unit/data/odp/image_transparency.odp | Bin 0 -> 24448 bytes + sd/qa/unit/export-tests-ooxml1.cxx | 26 ++++++++++++++++++++++++++ + 4 files changed, 34 insertions(+), 3 deletions(-) + create mode 100644 sd/qa/unit/data/odp/image_transparency.odp + +diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx +index b255116..a2fb6ee 100644 +--- a/oox/source/drawingml/fillproperties.cxx ++++ b/oox/source/drawingml/fillproperties.cxx +@@ -755,6 +755,11 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe + rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop); + } + } ++ ++ if ( maBlipProps.moAlphaModFix.has() ) ++ { ++ rPropMap.setProperty(PROP_Transparency, static_cast(100 - (maBlipProps.moAlphaModFix.get() / PER_PERCENT))); ++ } + } + rPropMap.setProperty(PROP_GraphicColorMode, eColorMode); + +diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx +index a797adb..23065ec 100644 +--- a/oox/source/export/drawingml.cxx ++++ b/oox/source/export/drawingml.cxx +@@ -1154,14 +1154,14 @@ void DrawingML::WriteImageBrightnessContrastTransparence(uno::Reference(); + if (GetProperty(rXPropSet, "AdjustContrast")) + nContrast = mAny.get(); +- if (GetProperty(rXPropSet, "FillTransparence")) +- nTransparence = mAny.get(); ++ if (GetProperty(rXPropSet, "Transparency")) ++ nTransparence = mAny.get(); + + + if (nBright || nContrast) +diff --git a/sd/qa/unit/data/odp/image_transparency.odp b/sd/qa/unit/data/odp/image_transparency.odp +new file mode 100644 +index 0000000..6d3f6c2 +Binary files /dev/null and b/sd/qa/unit/data/odp/image_transparency.odp differ +diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx +index f649d27..7cc50e2 100644 +--- a/sd/qa/unit/export-tests-ooxml1.cxx ++++ b/sd/qa/unit/export-tests-ooxml1.cxx +@@ -101,6 +101,7 @@ public: + void testTdf111884(); + void testTdf112633(); + void testCustomXml(); ++ void testPictureTransparency(); + + CPPUNIT_TEST_SUITE(SdOOXMLExportTest1); + +@@ -131,6 +132,7 @@ public: + CPPUNIT_TEST(testTdf111884); + CPPUNIT_TEST(testTdf112633); + CPPUNIT_TEST(testCustomXml); ++ CPPUNIT_TEST(testPictureTransparency); + + CPPUNIT_TEST_SUITE_END(); + +@@ -853,6 +855,30 @@ void SdOOXMLExportTest1::testCustomXml() + CPPUNIT_ASSERT(pStream); + } + ++void SdOOXMLExportTest1::testPictureTransparency() ++{ ++ // Load document and export it to a temporary file. ++ ::sd::DrawDocShellRef xDocShRef ++ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/image_transparency.odp"), ODP); ++ utl::TempFile tempFile; ++ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); ++ uno::Reference xDoc(xDocShRef->GetDoc()->getUnoModel(), ++ uno::UNO_QUERY); ++ CPPUNIT_ASSERT(xDoc.is()); ++ ++ uno::Reference xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); ++ CPPUNIT_ASSERT(xPage.is()); ++ ++ uno::Reference xGraphicShape(getShape(0, xPage)); ++ CPPUNIT_ASSERT(xGraphicShape.is()); ++ ++ sal_Int16 nTransparency = 0; ++ CPPUNIT_ASSERT(xGraphicShape->getPropertyValue("Transparency") >>= nTransparency); ++ CPPUNIT_ASSERT_EQUAL(static_cast(51), nTransparency); ++ ++ xDocShRef->DoClose(); ++} ++ + CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest1); + + CPPUNIT_PLUGIN_IMPLEMENT(); +-- +cgit v1.1 + diff --git a/bsc1127760.patch b/bsc1127760.patch new file mode 100644 index 0000000..53115a6 --- /dev/null +++ b/bsc1127760.patch @@ -0,0 +1,48 @@ +From 1bdbd26987c387dcee170775ecc1305be03669e1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tam=C3=A1s=20Zolnai?= +Date: Mon, 13 May 2019 15:56:52 +0200 +Subject: Presentation minimizer: Handle also presentation.GraphicObjectShape + URL +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I326b2803bf2d98d440e14d7f3f75ca61c2c9e49a +Reviewed-on: https://gerrit.libreoffice.org/72303 +Reviewed-by: Tamás Zolnai +Tested-by: Tamás Zolnai +(cherry picked from commit aa446591b7feb5bb667533ef7acdfc636105f9d9) +Reviewed-on: https://gerrit.libreoffice.org/72360 +Reviewed-by: Michael Stahl +Tested-by: Andras Timar +--- + sdext/source/minimizer/graphiccollector.cxx | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/sdext/source/minimizer/graphiccollector.cxx b/sdext/source/minimizer/graphiccollector.cxx +index 26ae7fc..4888260 100644 +--- a/sdext/source/minimizer/graphiccollector.cxx ++++ b/sdext/source/minimizer/graphiccollector.cxx +@@ -222,7 +222,8 @@ static void ImpCollectGraphicObjects( const Reference< XComponentContext >& rxMS + continue; + } + +- if ( sShapeType == "com.sun.star.drawing.GraphicObjectShape" ) ++ if ( sShapeType == "com.sun.star.drawing.GraphicObjectShape" || ++ sShapeType == "com.sun.star.presentation.GraphicObjectShape" ) + ImpAddGraphicEntity( rxMSF, xShape, rGraphicSettings, rGraphicEntities ); + + // now check for a fillstyle +@@ -342,7 +343,8 @@ static void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, + continue; + } + +- if ( sShapeType == "com.sun.star.drawing.GraphicObjectShape" ) ++ if ( sShapeType == "com.sun.star.drawing.GraphicObjectShape" || ++ sShapeType == "com.sun.star.presentation.GraphicObjectShape" ) + { + rnGraphics++; + } +-- +cgit v1.1 + diff --git a/libreoffice.changes b/libreoffice.changes index fbf5936..ed99798 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu May 16 12:40:39 UTC 2019 - Andras Timar + +- LO-L3: Slide deck compression doesn't, hmm, compress too much + * bsc1127760.patch +- LO-L3: Psychedelic graphics in LibreOffice (but not PowerPoint) + * bsc1124869.patch +- LO-L3: Image from PPTX shown in a square, not a circle + * bsc1121874.patch + ------------------------------------------------------------------- Wed May 15 13:43:40 UTC 2019 - Martin Liška diff --git a/libreoffice.spec b/libreoffice.spec index 9bb2ace..5511b08 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -101,6 +101,12 @@ Patch1: scp2-user-config-suse.diff Patch2: nlpsolver-no-broken-help.diff Patch3: mediawiki-no-broken-help.diff Patch12: 0001-Use-sort-on-finds-to-improve-deterministic-build.patch +# LO-L3: Slide deck compression doesn't, hmm, compress too much +Patch13: bsc1127760.patch +# LO-L3: Psychedelic graphics in LibreOffice (but not PowerPoint) +Patch14: bsc1124869.patch +# LO-L3: Image from PPTX shown in a square, not a circle +Patch15: bsc1121874.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 @@ -964,6 +970,9 @@ Provides %{langname} translations and additional resources (help files, etc.) fo %patch2 %patch3 %patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 %patch990 -p1 %patch991 -p1 From 99166396b0be6251d11ebc4eaf91bd8c5d935593be4874f196c8aa183e542a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 16 May 2019 21:13:57 +0000 Subject: [PATCH 4/4] Accepting request 703558 from LibreOffice:6.2 fixup of bsc1124869.patch OBS-URL: https://build.opensuse.org/request/show/703558 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=787 --- bsc1124869.patch | 66 +++--------------------------------------------- 1 file changed, 4 insertions(+), 62 deletions(-) diff --git a/bsc1124869.patch b/bsc1124869.patch index 528be78..1ebf86c 100644 --- a/bsc1124869.patch +++ b/bsc1124869.patch @@ -38,7 +38,7 @@ index b255116..a2fb6ee 100644 + } } rPropMap.setProperty(PROP_GraphicColorMode, eColorMode); - + diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index a797adb..23065ec 100644 --- a/oox/source/export/drawingml.cxx @@ -49,7 +49,7 @@ index a797adb..23065ec 100644 sal_Int32 nContrast = 0; - sal_Int32 nTransparence = 0; + sal_Int16 nTransparence = 0; - + if (GetProperty(rXPropSet, "AdjustLuminance")) nBright = mAny.get(); if (GetProperty(rXPropSet, "AdjustContrast")) @@ -58,64 +58,6 @@ index a797adb..23065ec 100644 - nTransparence = mAny.get(); + if (GetProperty(rXPropSet, "Transparency")) + nTransparence = mAny.get(); - - - if (nBright || nContrast) -diff --git a/sd/qa/unit/data/odp/image_transparency.odp b/sd/qa/unit/data/odp/image_transparency.odp -new file mode 100644 -index 0000000..6d3f6c2 -Binary files /dev/null and b/sd/qa/unit/data/odp/image_transparency.odp differ -diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx -index f649d27..7cc50e2 100644 ---- a/sd/qa/unit/export-tests-ooxml1.cxx -+++ b/sd/qa/unit/export-tests-ooxml1.cxx -@@ -101,6 +101,7 @@ public: - void testTdf111884(); - void testTdf112633(); - void testCustomXml(); -+ void testPictureTransparency(); - - CPPUNIT_TEST_SUITE(SdOOXMLExportTest1); - -@@ -131,6 +132,7 @@ public: - CPPUNIT_TEST(testTdf111884); - CPPUNIT_TEST(testTdf112633); - CPPUNIT_TEST(testCustomXml); -+ CPPUNIT_TEST(testPictureTransparency); - - CPPUNIT_TEST_SUITE_END(); - -@@ -853,6 +855,30 @@ void SdOOXMLExportTest1::testCustomXml() - CPPUNIT_ASSERT(pStream); - } - -+void SdOOXMLExportTest1::testPictureTransparency() -+{ -+ // Load document and export it to a temporary file. -+ ::sd::DrawDocShellRef xDocShRef -+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/image_transparency.odp"), ODP); -+ utl::TempFile tempFile; -+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); -+ uno::Reference xDoc(xDocShRef->GetDoc()->getUnoModel(), -+ uno::UNO_QUERY); -+ CPPUNIT_ASSERT(xDoc.is()); -+ -+ uno::Reference xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); -+ CPPUNIT_ASSERT(xPage.is()); -+ -+ uno::Reference xGraphicShape(getShape(0, xPage)); -+ CPPUNIT_ASSERT(xGraphicShape.is()); -+ -+ sal_Int16 nTransparency = 0; -+ CPPUNIT_ASSERT(xGraphicShape->getPropertyValue("Transparency") >>= nTransparency); -+ CPPUNIT_ASSERT_EQUAL(static_cast(51), nTransparency); -+ -+ xDocShRef->DoClose(); -+} -+ - CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest1); - - CPPUNIT_PLUGIN_IMPLEMENT(); --- -cgit v1.1 + + if (nBright || nContrast)