- Remove merged patches:
* bsc1124869.patch * bsc1127760.patch * bsc1121874.patch * bsc1135228.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=795
This commit is contained in:
parent
2ee7a99b8d
commit
d8d0249cdb
113
bsc1121874.patch
113
bsc1121874.patch
@ -1,113 +0,0 @@
|
||||
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
|
||||
|
@ -1,63 +0,0 @@
|
||||
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)
|
@ -1,48 +0,0 @@
|
||||
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
|
||||
|
199
bsc1135228.patch
199
bsc1135228.patch
@ -1,199 +0,0 @@
|
||||
diff --git a/include/oox/ppt/presentationfragmenthandler.hxx b/include/oox/ppt/presentationfragmenthandler.hxx
|
||||
index ab24a8262fae..bb9166e24afc 100644
|
||||
--- a/include/oox/ppt/presentationfragmenthandler.hxx
|
||||
+++ b/include/oox/ppt/presentationfragmenthandler.hxx
|
||||
@@ -50,7 +50,7 @@ private:
|
||||
void importSlide( const ::oox::core::FragmentHandlerRef& rSlideFragmentHandler,
|
||||
const oox::ppt::SlidePersistPtr& rPersist );
|
||||
void importSlide(sal_uInt32 nSlide, bool bFirstSlide, bool bImportNotes);
|
||||
- void saveThemeToGrabBag(const oox::drawingml::ThemePtr& pThemePtr, const OUString& sTheme);
|
||||
+ void saveThemeToGrabBag(const oox::drawingml::ThemePtr& pThemePtr, sal_Int32 nThemeIdx);
|
||||
|
||||
std::vector< OUString > maSlideMasterVector;
|
||||
std::vector< OUString > maSlidesVector;
|
||||
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
|
||||
index f2477b2cef6e..13bba2da95a3 100644
|
||||
--- a/oox/source/ppt/presentationfragmenthandler.cxx
|
||||
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
|
||||
@@ -160,7 +160,7 @@ static void ResolveTextFields( XmlFilterBase const & rFilter )
|
||||
}
|
||||
|
||||
void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::ThemePtr& pThemePtr,
|
||||
- const OUString& sTheme)
|
||||
+ sal_Int32 nThemeIdx)
|
||||
{
|
||||
if (!pThemePtr)
|
||||
return;
|
||||
@@ -198,8 +198,11 @@ void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::Theme
|
||||
aCurrentTheme[nId].Value = rColor;
|
||||
}
|
||||
|
||||
+
|
||||
// add new theme to the sequence
|
||||
- aTheme[0].Name = sTheme;
|
||||
+ // Export code uses the master slide's index to find the right theme
|
||||
+ // so use the same index in the grabbag.
|
||||
+ aTheme[0].Name = "ppt/theme/theme" + OUString::number(nThemeIdx) + ".xml";
|
||||
const uno::Any& rCurrentTheme = makeAny(aCurrentTheme);
|
||||
aTheme[0].Value = rCurrentTheme;
|
||||
|
||||
@@ -273,10 +276,17 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
|
||||
Reference< drawing::XMasterPagesSupplier > xMPS( xModel, uno::UNO_QUERY_THROW );
|
||||
Reference< drawing::XDrawPages > xMasterPages( xMPS->getMasterPages(), uno::UNO_QUERY_THROW );
|
||||
|
||||
+ sal_Int32 nIndex;
|
||||
if( rFilter.getMasterPages().empty() )
|
||||
- xMasterPages->getByIndex( 0 ) >>= xMasterPage;
|
||||
+ {
|
||||
+ nIndex = 0;
|
||||
+ xMasterPages->getByIndex( nIndex ) >>= xMasterPage;
|
||||
+ }
|
||||
else
|
||||
- xMasterPage = xMasterPages->insertNewByIndex( xMasterPages->getCount() );
|
||||
+ {
|
||||
+ nIndex = xMasterPages->getCount();
|
||||
+ xMasterPage = xMasterPages->insertNewByIndex( nIndex );
|
||||
+ }
|
||||
|
||||
pMasterPersistPtr = std::make_shared<SlidePersist>( rFilter, true, false, xMasterPage,
|
||||
ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle );
|
||||
@@ -306,7 +316,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
|
||||
UNO_QUERY_THROW));
|
||||
rThemes[ aThemeFragmentPath ] = pThemePtr;
|
||||
pThemePtr->setFragment(xDoc);
|
||||
- saveThemeToGrabBag(pThemePtr, aThemeFragmentPath);
|
||||
+ saveThemeToGrabBag(pThemePtr, nIndex + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
|
||||
index 24adf475be16..2da61a6f5300 100644
|
||||
--- a/include/oox/export/drawingml.hxx
|
||||
+++ b/include/oox/export/drawingml.hxx
|
||||
@@ -170,14 +170,14 @@ public:
|
||||
OUString WriteImage( const Graphic &rGraphic , bool bRelPathToMedia = false);
|
||||
|
||||
void WriteColor( ::Color nColor, sal_Int32 nAlpha = MAX_PERCENT );
|
||||
- void WriteColor( const OUString& sColorSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations );
|
||||
- void WriteColorTransformations( const css::uno::Sequence< css::beans::PropertyValue >& aTransformations );
|
||||
+ void WriteColor( const OUString& sColorSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
|
||||
+ void WriteColorTransformations( const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
|
||||
void WriteGradientStop( sal_uInt16 nStop, ::Color nColor );
|
||||
void WriteLineArrow( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, bool bLineStart );
|
||||
void WriteConnectorConnections( EscherConnectorListEntry& rConnectorEntry, sal_Int32 nStartID, sal_Int32 nEndID );
|
||||
|
||||
void WriteSolidFill( ::Color nColor, sal_Int32 nAlpha = MAX_PERCENT );
|
||||
- void WriteSolidFill( const OUString& sSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations );
|
||||
+ void WriteSolidFill( const OUString& sSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
|
||||
void WriteSolidFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
|
||||
void WriteGradientFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
|
||||
void WriteGradientFill( css::awt::Gradient rGradient );
|
||||
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
|
||||
index 23065ec67678..30f330226788 100644
|
||||
--- a/oox/source/export/drawingml.cxx
|
||||
+++ b/oox/source/export/drawingml.cxx
|
||||
@@ -231,7 +231,7 @@ void DrawingML::WriteColor( ::Color nColor, sal_Int32 nAlpha )
|
||||
}
|
||||
}
|
||||
|
||||
-void DrawingML::WriteColor( const OUString& sColorSchemeName, const Sequence< PropertyValue >& aTransformations )
|
||||
+void DrawingML::WriteColor( const OUString& sColorSchemeName, const Sequence< PropertyValue >& aTransformations, sal_Int32 nAlpha )
|
||||
{
|
||||
// prevent writing a tag with empty val attribute
|
||||
if( sColorSchemeName.isEmpty() )
|
||||
@@ -242,7 +242,15 @@ void DrawingML::WriteColor( const OUString& sColorSchemeName, const Sequence< Pr
|
||||
mpFS->startElementNS( XML_a, XML_schemeClr,
|
||||
XML_val, USS( sColorSchemeName ),
|
||||
FSEND );
|
||||
- WriteColorTransformations( aTransformations );
|
||||
+ WriteColorTransformations( aTransformations, nAlpha );
|
||||
+ mpFS->endElementNS( XML_a, XML_schemeClr );
|
||||
+ }
|
||||
+ else if(nAlpha < MAX_PERCENT)
|
||||
+ {
|
||||
+ mpFS->startElementNS( XML_a, XML_schemeClr,
|
||||
+ XML_val, USS( sColorSchemeName ),
|
||||
+ FSEND );
|
||||
+ mpFS->singleElementNS(XML_a, XML_alpha, XML_val, OString::number(nAlpha), FSEND);
|
||||
mpFS->endElementNS( XML_a, XML_schemeClr );
|
||||
}
|
||||
else
|
||||
@@ -253,15 +261,22 @@ void DrawingML::WriteColor( const OUString& sColorSchemeName, const Sequence< Pr
|
||||
}
|
||||
}
|
||||
|
||||
-void DrawingML::WriteColorTransformations( const Sequence< PropertyValue >& aTransformations )
|
||||
+void DrawingML::WriteColorTransformations( const Sequence< PropertyValue >& aTransformations, sal_Int32 nAlpha )
|
||||
{
|
||||
for( sal_Int32 i = 0; i < aTransformations.getLength(); i++ )
|
||||
{
|
||||
sal_Int32 nToken = Color::getColorTransformationToken( aTransformations[i].Name );
|
||||
if( nToken != XML_TOKEN_INVALID && aTransformations[i].Value.hasValue() )
|
||||
{
|
||||
- sal_Int32 nValue = aTransformations[i].Value.get<sal_Int32>();
|
||||
- mpFS->singleElementNS( XML_a, nToken, XML_val, I32S( nValue ), FSEND );
|
||||
+ if(nToken == XML_alpha && nAlpha < MAX_PERCENT)
|
||||
+ {
|
||||
+ mpFS->singleElementNS( XML_a, nToken, XML_val, I32S( nAlpha ), FSEND );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ sal_Int32 nValue = aTransformations[i].Value.get<sal_Int32>();
|
||||
+ mpFS->singleElementNS( XML_a, nToken, XML_val, I32S( nValue ), FSEND );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -273,10 +288,10 @@ void DrawingML::WriteSolidFill( ::Color nColor, sal_Int32 nAlpha )
|
||||
mpFS->endElementNS( XML_a, XML_solidFill );
|
||||
}
|
||||
|
||||
-void DrawingML::WriteSolidFill( const OUString& sSchemeName, const Sequence< PropertyValue >& aTransformations )
|
||||
+void DrawingML::WriteSolidFill( const OUString& sSchemeName, const Sequence< PropertyValue >& aTransformations, sal_Int32 nAlpha )
|
||||
{
|
||||
mpFS->startElementNS( XML_a, XML_solidFill, FSEND );
|
||||
- WriteColor( sSchemeName, aTransformations );
|
||||
+ WriteColor( sSchemeName, aTransformations, nAlpha );
|
||||
mpFS->endElementNS( XML_a, XML_solidFill );
|
||||
}
|
||||
|
||||
@@ -326,22 +341,36 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
|
||||
else if ( !sColorFillScheme.isEmpty() )
|
||||
{
|
||||
// the shape had a scheme color and the user didn't change it
|
||||
- WriteSolidFill( sColorFillScheme, aTransformations );
|
||||
+ WriteSolidFill( sColorFillScheme, aTransformations, nAlpha );
|
||||
}
|
||||
else if ( aStyleProperties.hasElements() )
|
||||
{
|
||||
sal_uInt32 nThemeColor = 0;
|
||||
+ sal_Int32 nThemeAlpha = MAX_PERCENT;
|
||||
for( sal_Int32 i=0; i < aStyleProperties.getLength(); ++i )
|
||||
{
|
||||
if( aStyleProperties[i].Name == "Color" )
|
||||
{
|
||||
aStyleProperties[i].Value >>= nThemeColor;
|
||||
- break;
|
||||
+ }
|
||||
+ else if(aStyleProperties[i].Name == "Transformations" )
|
||||
+ {
|
||||
+ Sequence< PropertyValue > aStyleTransformations;
|
||||
+ aStyleProperties[i].Value >>= aStyleTransformations;
|
||||
+ for( sal_Int32 j = 0; j < aStyleTransformations.getLength(); j++ )
|
||||
+ {
|
||||
+ if (aStyleTransformations[j].Name == "alpha" )
|
||||
+ {
|
||||
+ aStyleTransformations[j].Value >>= nThemeAlpha;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
- if ( nFillColor != nThemeColor )
|
||||
+ if ( nFillColor != nThemeColor || nAlpha != nThemeAlpha )
|
||||
// the shape contains a theme but it wasn't being used
|
||||
WriteSolidFill( ::Color(nFillColor & 0xffffff), nAlpha );
|
||||
+
|
||||
// in case the shape used the style color and the user didn't change it,
|
||||
// we must not write a <a: solidFill> tag.
|
||||
}
|
@ -3,6 +3,11 @@ Mon Jul 1 10:29:34 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 6.2.5.2:
|
||||
* Various bugfixes on the 6.2 branch
|
||||
- Remove merged patches:
|
||||
* bsc1124869.patch
|
||||
* bsc1127760.patch
|
||||
* bsc1121874.patch
|
||||
* bsc1135228.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 28 09:36:45 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
@ -101,14 +101,6 @@ 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
|
||||
# LO-L3: PPTX: Rectangle turns from green to blue and loses transparency when transparency is set
|
||||
Patch16: bsc1135228.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
|
||||
@ -979,10 +971,6 @@ Provides %{langname} translations and additional resources (help files, etc.) fo
|
||||
%patch2
|
||||
%patch3
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch990 -p1
|
||||
%patch991 -p1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user