Kaydet (Commit) 429be969 authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: tdf#101588, do not prevent color de-selection tdf#96382 follow-up

Comparing colors to determine whether to set one in the result item set does
not work if the color previously was set before SaveValue() was called
unconditionally even for the "undetermined" color state. Actually we want to
know whether the user selected a color instead.

Change-Id: I508f791684ebd79ba4af9cb654f9aa0bb25bff5d
üst b17b413e
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment