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
This commit is contained in:
parent
37d9c0c403
commit
bb35210846
113
bsc1121874.patch
Normal file
113
bsc1121874.patch
Normal file
@ -0,0 +1,113 @@
|
||||
From 8af919d30f0f17a17ee6f5190bb31652476a52df Mon Sep 17 00:00:00 2001
|
||||
From: Tamas Bunth <tamas.bunth@collabora.co.uk>
|
||||
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 <btomi96@gmail.com>
|
||||
Reviewed-on: https://gerrit.libreoffice.org/72310
|
||||
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
||||
---
|
||||
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<css::io::XInputStream> 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
|
||||
|
121
bsc1124869.patch
Normal file
121
bsc1124869.patch
Normal file
@ -0,0 +1,121 @@
|
||||
From dc75d3cc5f2797dd5a8675004302a52bda1210c6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tam=C3=A1s=20Zolnai?= <tamas.zolnai@collabora.com>
|
||||
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 <ci@libreoffice.org>
|
||||
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
|
||||
(cherry picked from commit ae3aabdb951643af8d2f7aee9c9f900245e5b384)
|
||||
|
||||
Change-Id: Ib07c606083b833389fcb82aac57ca8535d6e861f
|
||||
Reviewed-on: https://gerrit.libreoffice.org/72051
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Andras Timar <andras.timar@collabora.com>
|
||||
---
|
||||
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<sal_Int16>(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<beans::X
|
||||
{
|
||||
sal_Int16 nBright = 0;
|
||||
sal_Int32 nContrast = 0;
|
||||
- sal_Int32 nTransparence = 0;
|
||||
+ sal_Int16 nTransparence = 0;
|
||||
|
||||
if (GetProperty(rXPropSet, "AdjustLuminance"))
|
||||
nBright = mAny.get<sal_Int16>();
|
||||
if (GetProperty(rXPropSet, "AdjustContrast"))
|
||||
nContrast = mAny.get<sal_Int32>();
|
||||
- if (GetProperty(rXPropSet, "FillTransparence"))
|
||||
- nTransparence = mAny.get<sal_Int32>();
|
||||
+ if (GetProperty(rXPropSet, "Transparency"))
|
||||
+ nTransparence = mAny.get<sal_Int16>();
|
||||
|
||||
|
||||
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<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
|
||||
+ uno::UNO_QUERY);
|
||||
+ CPPUNIT_ASSERT(xDoc.is());
|
||||
+
|
||||
+ uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
|
||||
+ CPPUNIT_ASSERT(xPage.is());
|
||||
+
|
||||
+ uno::Reference<beans::XPropertySet> xGraphicShape(getShape(0, xPage));
|
||||
+ CPPUNIT_ASSERT(xGraphicShape.is());
|
||||
+
|
||||
+ sal_Int16 nTransparency = 0;
|
||||
+ CPPUNIT_ASSERT(xGraphicShape->getPropertyValue("Transparency") >>= nTransparency);
|
||||
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(51), nTransparency);
|
||||
+
|
||||
+ xDocShRef->DoClose();
|
||||
+}
|
||||
+
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest1);
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
--
|
||||
cgit v1.1
|
||||
|
48
bsc1127760.patch
Normal file
48
bsc1127760.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From 1bdbd26987c387dcee170775ecc1305be03669e1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tam=C3=A1s=20Zolnai?= <tamas.zolnai@collabora.com>
|
||||
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 <tamas.zolnai@collabora.com>
|
||||
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
|
||||
(cherry picked from commit aa446591b7feb5bb667533ef7acdfc636105f9d9)
|
||||
Reviewed-on: https://gerrit.libreoffice.org/72360
|
||||
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
||||
Tested-by: Andras Timar <andras.timar@collabora.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 16 12:40:39 UTC 2019 - Andras Timar <andras.timar@collabora.com>
|
||||
|
||||
- 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 <mliska@suse.cz>
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user