summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-02-12 16:14:23 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-02-12 16:38:39 +0100
commitd884f8f65cc73cf932cde1e40cadf13556a7d44e (patch)
tree85333f8fd820c5f433716fbb84befccf481bca5d /sw
parentSimplify this (diff)
downloadcore-d884f8f65cc73cf932cde1e40cadf13556a7d44e.tar.gz
core-d884f8f65cc73cf932cde1e40cadf13556a7d44e.zip
SwFrmDlg: initial gradient background UI
Change-Id: I7d8612d6b2d3eb2262ed148153a0c249bcb36599
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/bastyp/init.cxx4
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx16
2 files changed, 18 insertions, 2 deletions
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 8bc36232ee91..e3b64ac45337 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -381,8 +381,8 @@ SfxItemInfo aSlotTab[] =
{ 0, 0 }, // RES_AUTO_STYLE
{ 0, SFX_ITEM_POOLABLE }, // RES_FRMATR_STYLE_NAME
{ 0, SFX_ITEM_POOLABLE }, // RES_FRMATR_CONDITIONAL_STYLE_NAME
- { 0, SFX_ITEM_POOLABLE }, // RES_FILL_STYLE
- { 0, SFX_ITEM_POOLABLE }, // RES_FILL_GRADIENT
+ { SID_ATTR_FILL_STYLE, SFX_ITEM_POOLABLE }, // RES_FILL_STYLE
+ { SID_ATTR_FILL_GRADIENT, SFX_ITEM_POOLABLE }, // RES_FILL_GRADIENT
{ 0, SFX_ITEM_POOLABLE }, // RES_GRFATR_MIRRORGRF
{ SID_ATTR_GRAF_CROP, SFX_ITEM_POOLABLE }, // RES_GRFATR_CROPGRF
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index b1b25507001a..aaccdf499874 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -23,6 +23,7 @@
#include <svx/htmlmode.hxx>
#include <fmtfsize.hxx>
#include <wrtsh.hxx>
+#include <doc.hxx>
#include <view.hxx>
#include <docsh.hxx>
#include <viewopt.hxx>
@@ -37,6 +38,10 @@
#include <svx/svxids.hrc>
#include <svx/flagsdef.hxx>
#include <svx/svxdlg.hxx>
+#include <svx/svdmodel.hxx>
+#include <svx/drawitem.hxx>
+#include <svx/xfillit0.hxx>
+#include <svx/xflgrit.hxx>
/*--------------------------------------------------------------------
Description: the dialog's carrier
@@ -173,6 +178,17 @@ void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
if(!m_bHTMLMode)
nFlagType |= SVX_ENABLE_TRANSPARENCY;
aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlagType));
+
+ SvxGradientListItem aGradientListItem(m_pWrtShell->GetDoc()->GetOrCreateDrawModel()->GetGradientList(), SID_GRADIENT_LIST);
+ aSet.Put(aGradientListItem);
+
+ XFillStyleItem aFillStyleItem(((const XFillStyleItem&)m_rSet.Get(RES_FILL_STYLE)).GetValue(), SID_ATTR_FILL_STYLE);
+ aSet.Put(aFillStyleItem);
+
+ const XFillGradientItem& rFillGradientItem = (const XFillGradientItem&)m_rSet.Get(RES_FILL_GRADIENT);
+ XFillGradientItem aFillGradientItem(rFillGradientItem.GetName(), rFillGradientItem.GetGradientValue(), SID_ATTR_FILL_GRADIENT);
+ aSet.Put(aFillGradientItem);
+
rPage.PageCreated(aSet);
}
break;