diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-04-04 13:29:09 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-05-22 17:33:42 +0200 |
commit | 4eed0937c971a21287da639e0708c682d0241ea2 (patch) | |
tree | 250797e7ce9b258170339a337f497253d8d81cbd | |
parent | 3e50044ba41410b9f6a6879f71cdb8314a6d56c3 (diff) |
tdf#104658: Fix jumping bitmap-filled chart bars
Coincidentally this also resolves almost identical issues in chart wall
(tdf#114132)
Change-Id: Ib566110639d00aa46463ee592861ce3e15c64f50
Reviewed-on: https://gerrit.libreoffice.org/52624
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
(cherry picked from commit 2eaa978d135a53abf22df2dc3fcb8d04733fe2d3)
Reviewed-on: https://gerrit.libreoffice.org/52978
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx index f6e3e7a16bd5..b5d7ff68c864 100644 --- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -429,9 +429,14 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( bool bStretched = rItemSet.Get( XATTR_FILLBMP_STRETCH ).GetValue(); drawing::BitmapMode aMode = (bStretched ? drawing::BitmapMode_STRETCH : drawing::BitmapMode_NO_REPEAT); + drawing::BitmapMode aOtherMode = drawing::BitmapMode_NO_REPEAT; aValue <<= aMode; - if( aValue != GetPropertySet()->getPropertyValue( aModePropName )) + GetPropertySet()->getPropertyValue( aModePropName ) >>= aOtherMode; + + // don't overwrite if it has been set to BitmapMode_REPEAT (= tiled) already + // XATTR_FILLBMP_STRETCH and XATTR_FILLBMP_TILE often come in pairs, tdf#104658 + if( aMode != aOtherMode && aOtherMode != drawing::BitmapMode_REPEAT ) { GetPropertySet()->setPropertyValue( aModePropName, aValue ); bChanged = true; |