summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-02-13 13:14:55 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-02-14 12:41:43 +0100
commitea7eef21707bb18ec5811f27c0584fe9421e30d8 (patch)
treed1c84b17c87aa1b8a9b74e4820b8143ce3587d21 /cui/source
parent76254d6c01cdf240aa9058949a2fccbd3ac48818 (diff)
SvxBackgroundTabPage: fix non-gradient preview in gradient frame
Change-Id: Ia7d64301a250bf51a6343f155144edced8e3bd09
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/tabpages/backgrnd.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 3553df854308..d436bb1e46ea 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1280,6 +1280,12 @@ void SvxBackgroundTabPage::ShowGradientUI_Impl()
HideBitmapUI_Impl();
m_pBackGroundGradientFrame->Show();
+ if (!m_rXFillSet.HasItem(XATTR_FILLSTYLE) || ((const XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue() != XFILL_GRADIENT)
+ {
+ // Frame has no gradient? Then select the first one, just to be able to show something in the preview control.
+ m_pLbGradients->SelectEntryPos(0);
+ ModifyGradientHdl_Impl(this);
+ }
}
}