diff options
author | Tamas Bunth <tamas.bunth@collabora.co.uk> | 2019-05-13 01:02:07 +0200 |
---|---|---|
committer | Tamás Bunth <btomi96@gmail.com> | 2019-05-13 18:14:26 +0200 |
commit | f4ba484183a1e7b9824f10580d633466c266828f (patch) | |
tree | 5795d2c442e3dbb3496fcfd5ac6f5bd8ddc39e15 /oox/source/drawingml/fillproperties.cxx | |
parent | 8401a26363bf7cb3c30bf783b3f8978f4b69e4c4 (diff) |
ooxml import: supprt cropping to shape
Change-Id: I7bdc959921ecb0cbf19037a78b63eaeb8fc52814
Reviewed-on: https://gerrit.libreoffice.org/72206
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'oox/source/drawingml/fillproperties.cxx')
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 0b99d83733f3..9c5338ce8975 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -739,7 +739,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 ); @@ -770,7 +770,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() ) |