Kaydet (Commit) b2ed25b4 authored tarafından Rafael Dominguez's avatar Rafael Dominguez

Remove SfxDocumentTemplates dependency from TemplateView.

Change-Id: I316d14303f3772fe2a3ea72b5b5a733f16b95e5a
üst 29a0a916
...@@ -15,14 +15,13 @@ ...@@ -15,14 +15,13 @@
#include <vcl/image.hxx> #include <vcl/image.hxx>
class Edit; class Edit;
class SfxDocumentTemplates;
class TemplateViewItem; class TemplateViewItem;
class TemplateView : public ThumbnailView class TemplateView : public ThumbnailView
{ {
public: public:
TemplateView (Window *pParent, SfxDocumentTemplates *pTemplates); TemplateView (Window *pParent);
virtual ~TemplateView (); virtual ~TemplateView ();
...@@ -60,7 +59,6 @@ private: ...@@ -60,7 +59,6 @@ private:
bool mbRenderTitle; bool mbRenderTitle;
sal_uInt16 mnId; sal_uInt16 mnId;
rtl::OUString maName; rtl::OUString maName;
SfxDocumentTemplates *mpDocTemplates;
Link maDblClickHdl; Link maDblClickHdl;
Link maChangeNameHdl; Link maChangeNameHdl;
Link maCloseHdl; Link maCloseHdl;
......
...@@ -274,7 +274,7 @@ TemplateFolderView::TemplateFolderView ( Window* pParent, const ResId& rResId, b ...@@ -274,7 +274,7 @@ TemplateFolderView::TemplateFolderView ( Window* pParent, const ResId& rResId, b
mbFilteredResults(false), mbFilteredResults(false),
meFilterOption(FILTER_APP_NONE), meFilterOption(FILTER_APP_NONE),
mpDocTemplates(new SfxDocumentTemplates), mpDocTemplates(new SfxDocumentTemplates),
mpItemView(new TemplateView(this,mpDocTemplates)) mpItemView(new TemplateView(this))
{ {
Size aViewSize = mpItemView->CalcWindowSizePixel(INIT_VIEW_COLS,INIT_VIEW_LINES, Size aViewSize = mpItemView->CalcWindowSizePixel(INIT_VIEW_COLS,INIT_VIEW_LINES,
ITEM_MAX_WIDTH,ITEM_MAX_HEIGHT,ITEM_SPACE); ITEM_MAX_WIDTH,ITEM_MAX_HEIGHT,ITEM_SPACE);
......
...@@ -48,7 +48,7 @@ enum ...@@ -48,7 +48,7 @@ enum
TemplateOnlineView::TemplateOnlineView (Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren) TemplateOnlineView::TemplateOnlineView (Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren)
: TemplateAbstractView(pParent,nWinStyle,bDisableTransientChildren), : TemplateAbstractView(pParent,nWinStyle,bDisableTransientChildren),
mpItemView(new TemplateView(this,NULL)) mpItemView(new TemplateView(this))
{ {
mpItemView->SetColor(Color(COL_WHITE)); mpItemView->SetColor(Color(COL_WHITE));
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <drawinglayer/primitive2d/textlayoutdevice.hxx> #include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx> #include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx> #include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <sfx2/doctempl.hxx>
#include <sfx2/sfxresid.hxx> #include <sfx2/sfxresid.hxx>
#include <sfx2/templateviewitem.hxx> #include <sfx2/templateviewitem.hxx>
#include <vcl/edit.hxx> #include <vcl/edit.hxx>
...@@ -32,12 +31,11 @@ using namespace basegfx::tools; ...@@ -32,12 +31,11 @@ using namespace basegfx::tools;
using namespace drawinglayer::attribute; using namespace drawinglayer::attribute;
using namespace drawinglayer::primitive2d; using namespace drawinglayer::primitive2d;
TemplateView::TemplateView (Window *pParent, SfxDocumentTemplates *pTemplates) TemplateView::TemplateView (Window *pParent)
: ThumbnailView(pParent,WB_VSCROLL), : ThumbnailView(pParent,WB_VSCROLL),
maCloseImg(SfxResId(IMG_TEMPLATE_VIEW_CLOSE)), maCloseImg(SfxResId(IMG_TEMPLATE_VIEW_CLOSE)),
mbRenderTitle(true), mbRenderTitle(true),
mnId(0), mnId(0),
mpDocTemplates(pTemplates),
mpEditName(new Edit(this, WB_BORDER | WB_HIDE)) mpEditName(new Edit(this, WB_BORDER | WB_HIDE))
{ {
mnHeaderHeight = 30; mnHeaderHeight = 30;
......
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