summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/drawdoc.hxx2
-rw-r--r--sw/source/core/draw/drawdoc.cxx8
-rw-r--r--sw/source/uibase/shells/frmsh.cxx6
-rw-r--r--sw/source/uibase/shells/textsh.cxx7
4 files changed, 18 insertions, 5 deletions
diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx
index 0e4ea36e5417..bad9c0ca41a1 100644
--- a/sw/inc/drawdoc.hxx
+++ b/sw/inc/drawdoc.hxx
@@ -35,6 +35,8 @@ public:
const SwDoc& GetDoc() const { return *m_pDoc; }
SwDoc& GetDoc() { return *m_pDoc; }
+ /// Put needed items for XPropertyList entries from the DrawModel.
+ void PutAreaListItems(SfxItemSet& rSet) const;
virtual SdrPage* AllocPage(bool bMasterPage) SAL_OVERRIDE;
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 6c7a0b1cc228..efd0bb1f163d 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -151,4 +151,12 @@ uno::Reference< uno::XInterface > SwDrawModel::createUnoModel()
return xModel;
}
+void SwDrawModel::PutAreaListItems(SfxItemSet& rSet) const
+{
+ rSet.Put(SvxColorListItem(GetColorList(), SID_COLOR_TABLE));
+ rSet.Put(SvxGradientListItem(GetGradientList(), SID_GRADIENT_LIST));
+ rSet.Put(SvxHatchListItem(GetHatchList(), SID_HATCH_LIST));
+ rSet.Put(SvxBitmapListItem(GetBitmapList(), SID_BITMAP_LIST));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index d42f0e98a2c8..4868fdfd58be 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -415,11 +415,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
//UUUU create needed items for XPropertyList entries from the DrawModel so that
// the Area TabPage can access them
const SwDrawModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
-
- aSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE));
- aSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST));
- aSet.Put(SvxHatchListItem(pDrawModel->GetHatchList(), SID_HATCH_LIST));
- aSet.Put(SvxBitmapListItem(pDrawModel->GetBitmapList(), SID_BITMAP_LIST));
+ pDrawModel->PutAreaListItems(aSet);
const SwViewOption* pVOpt = rSh.GetViewOptions();
if(nSel & nsSelectionType::SEL_OLE)
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 2cf10fea72b8..6087187ea9e1 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -114,6 +114,8 @@ using namespace ::com::sun::star;
#include <table.hrc>
#include <frmui.hrc>
#include <unomid.h>
+#include <IDocumentDrawModelAccess.hxx>
+#include <drawdoc.hxx>
#include <boost/scoped_ptr.hpp>
SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell)
@@ -579,11 +581,16 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
SID_HTML_MODE, SID_HTML_MODE,
+ SID_COLOR_TABLE, SID_BITMAP_LIST,
0
};
SfxItemSet aSet(GetPool(), aFrmAttrRange );
aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
+
+ // For the Area tab page.
+ GetShell().GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->PutAreaListItems(aSet);
+
const SwRect &rPg = GetShell().GetAnyCurRect(RECT_PAGE);
SwFormatFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height());
aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE));