summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2018-04-04 13:29:09 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-04-09 22:05:40 +0200
commit2eaa978d135a53abf22df2dc3fcb8d04733fe2d3 (patch)
treec6310d4aa2eacb24a5dbfc2f9dcb68c324a65621 /chart2
parent8c72e780694e86f84e1d5b5eab6b724e7ec06754 (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>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index 906318a6bdd6..198383cc2773 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -430,9 +430,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;