summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/tabpages/tphatch.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index aa7e81177265..162c0134d750 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -184,18 +184,19 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
XFillBackgroundItem aBckItem( rSet.Get(XATTR_FILLBACKGROUND));
m_rXFSet.Put( aBckItem );
- if(aBckItem.GetValue())
+ if (aBckItem.GetValue())
{
m_xCbBackgroundColor->set_state(TRISTATE_TRUE);
XFillColorItem aColorItem( rSet.Get(XATTR_FILLCOLOR) );
Color aColor(aColorItem.GetColorValue());
- m_xLbBackgroundColor->set_sensitive(true);
m_xLbBackgroundColor->SelectEntry(aColor);
+ m_xLbBackgroundColor->set_sensitive(true);
m_rXFSet.Put( aColorItem );
}
else
{
m_xCbBackgroundColor->set_state(TRISTATE_FALSE);
+ m_xLbBackgroundColor->SelectEntry(COL_AUTO);
m_xLbBackgroundColor->set_sensitive(false);
}
@@ -262,6 +263,10 @@ void SvxHatchTabPage::Reset( const SfxItemSet* rSet )
{
ChangeHatchHdl_Impl();
+ XFillColorItem aColItem( rSet->Get(XATTR_FILLCOLOR) );
+ m_xLbBackgroundColor->SelectEntry(aColItem.GetColorValue());
+ m_rXFSet.Put( aColItem );
+
XFillBackgroundItem aBckItem( rSet->Get(XATTR_FILLBACKGROUND) );
if(aBckItem.GetValue())
m_xCbBackgroundColor->set_state(TRISTATE_TRUE);
@@ -269,10 +274,6 @@ void SvxHatchTabPage::Reset( const SfxItemSet* rSet )
m_xCbBackgroundColor->set_state(TRISTATE_FALSE);
m_rXFSet.Put( aBckItem );
- XFillColorItem aColItem( rSet->Get(XATTR_FILLCOLOR) );
- m_xLbBackgroundColor->SelectEntry(aColItem.GetColorValue());
- m_rXFSet.Put( aColItem );
-
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
m_aCtlPreview.Invalidate();
}