summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/backgrnd.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/backgrnd.cxx')
-rw-r--r--cui/source/tabpages/backgrnd.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 5b40f396b040..9938b36714e6 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -684,7 +684,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
// Brush-treatment:
if ( rOldItem.GetColor() != aBgdColor ||
- (SfxItemState::DEFAULT >= eOldItemState && m_pBackgroundColorSet->GetSavedValue() != m_pBackgroundColorSet->GetSelectItemId()))
+ (SfxItemState::DEFAULT >= eOldItemState && !m_pBackgroundColorSet->IsNoSelection()))
{
bModified = true;
rCoreSet->Put( SvxBrushItem( aBgdColor, nWhich ) );
@@ -1423,9 +1423,13 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
}
else
{
+ bool bNoSelection = m_pBackgroundColorSet->IsNoSelection();
m_pBackgroundColorSet->SelectItem( nCol );
+ m_pBackgroundColorSet->SaveValue();
+ // The actual selection is user set, not what we preset.
+ if (bNoSelection)
+ m_pBackgroundColorSet->SetNoSelection();
}
- m_pBackgroundColorSet->SaveValue();
m_pPreviewWin1->NotifyChange( aBgdColor );