Accepting request 703561 from LibreOffice:Factory
OBS-URL: https://build.opensuse.org/request/show/703561 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=180
This commit is contained in:
commit
f24f4e8e43
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
|
||||
|
63
bsc1124869.patch
Normal file
63
bsc1124869.patch
Normal file
@ -0,0 +1,63 @@
|
||||
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)
|
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,23 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
- Strip lto from %_lto_cflags as the project has --enable-lto option
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 6 08:54:09 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Fake the epoch to make zip files reproducible
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 15 09:14:47 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@ -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
|
||||
@ -100,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
|
||||
@ -963,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
|
||||
|
||||
@ -990,6 +1000,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
|
||||
@ -1010,6 +1022,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'
|
||||
|
Loading…
Reference in New Issue
Block a user