diff options
author | Oliver Specht <oliver.specht@cib.de> | 2015-12-10 12:22:07 +0100 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2015-12-11 06:42:20 +0000 |
commit | e5246a6b679cfd15ba9ec6db23448066f34c7c08 (patch) | |
tree | 3ae6242e7cbca180b4a2065a97015a316ff52201 /cui | |
parent | a5fb58caa0f941caacb1fff78c22285bb7f63026 (diff) |
tdf#96382: background color is not applied unintentionally
background color attribute should only be applied in a dialog
if the user selects it
Change-Id: Idf03840f7332a8cdbbfd616ce47ac26b3602d840
Reviewed-on: https://gerrit.libreoffice.org/20592
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index d85a6a8f97d9..6504b11da2ac 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -598,6 +598,7 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) aBgdColor = pBgdAttr->GetColor(); sal_uInt16 nCol = GetItemId_Impl(*m_pBackgroundColorSet, aBgdColor); m_pBackgroundColorSet->SelectItem( nCol ); + m_pBackgroundColorSet->SaveValue(); m_pPreviewWin1->NotifyChange( aBgdColor ); } } @@ -682,7 +683,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) { // Brush-treatment: if ( rOldItem.GetColor() != aBgdColor || - (SfxItemState::DEFAULT >= eOldItemState && !m_pBackgroundColorSet->IsNoSelection())) + (SfxItemState::DEFAULT >= eOldItemState && m_pBackgroundColorSet->GetSavedValue() != m_pBackgroundColorSet->GetSelectItemId())) { bModified = true; rCoreSet->Put( SvxBrushItem( aBgdColor, nWhich ) ); @@ -1423,6 +1424,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, { m_pBackgroundColorSet->SelectItem( nCol ); } + m_pBackgroundColorSet->SaveValue(); m_pPreviewWin1->NotifyChange( aBgdColor ); |