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

Move overlay attribute from subclasses to TemplateAbstractView.

Change-Id: Ia64c226f481a24c06bb3e248f4441fbbca5ad085
üst b2ed25b4
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <sfx2/thumbnailview.hxx> #include <sfx2/thumbnailview.hxx>
class TemplateView;
class SFX2_DLLPUBLIC TemplateAbstractView : public ThumbnailView class SFX2_DLLPUBLIC TemplateAbstractView : public ThumbnailView
{ {
public: public:
...@@ -21,6 +23,10 @@ public: ...@@ -21,6 +23,10 @@ public:
TemplateAbstractView ( Window* pParent, const ResId& rResId, bool bDisableTransientChildren = false ); TemplateAbstractView ( Window* pParent, const ResId& rResId, bool bDisableTransientChildren = false );
virtual ~TemplateAbstractView (); virtual ~TemplateAbstractView ();
protected:
TemplateView *mpItemView;
}; };
#endif // __SFX2_TEMPLATEABSTRACTVIEW_HXX__ #endif // __SFX2_TEMPLATEABSTRACTVIEW_HXX__
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
class SfxDocumentTemplates; class SfxDocumentTemplates;
class TemplateFolderViewItem; class TemplateFolderViewItem;
class TemplateView;
enum FILTER_APPLICATION enum FILTER_APPLICATION
{ {
...@@ -87,7 +86,6 @@ private: ...@@ -87,7 +86,6 @@ private:
bool mbFilteredResults; // Flag keep track if overlay has been filtered so folders can get filtered too afterwards bool mbFilteredResults; // Flag keep track if overlay has been filtered so folders can get filtered too afterwards
FILTER_APPLICATION meFilterOption; FILTER_APPLICATION meFilterOption;
SfxDocumentTemplates *mpDocTemplates; SfxDocumentTemplates *mpDocTemplates;
TemplateView *mpItemView;
Link maTemplateStateHdl; Link maTemplateStateHdl;
}; };
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp>
class TemplateView;
class TemplateOnlineView : public TemplateAbstractView class TemplateOnlineView : public TemplateAbstractView
{ {
public: public:
...@@ -37,7 +35,6 @@ private: ...@@ -37,7 +35,6 @@ private:
private: private:
TemplateView *mpItemView;
com::sun::star::uno::Sequence< rtl::OUString > maUrls; com::sun::star::uno::Sequence< rtl::OUString > maUrls;
com::sun::star::uno::Sequence< rtl::OUString > maNames; com::sun::star::uno::Sequence< rtl::OUString > maNames;
com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xCmdEnv; com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xCmdEnv;
......
...@@ -9,18 +9,23 @@ ...@@ -9,18 +9,23 @@
#include <sfx2/templateabstractview.hxx> #include <sfx2/templateabstractview.hxx>
#include <sfx2/templateview.hxx>
TemplateAbstractView::TemplateAbstractView (Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren) TemplateAbstractView::TemplateAbstractView (Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren)
: ThumbnailView(pParent,nWinStyle,bDisableTransientChildren) : ThumbnailView(pParent,nWinStyle,bDisableTransientChildren),
mpItemView(new TemplateView(this))
{ {
} }
TemplateAbstractView::TemplateAbstractView(Window *pParent, const ResId &rResId, bool bDisableTransientChildren) TemplateAbstractView::TemplateAbstractView(Window *pParent, const ResId &rResId, bool bDisableTransientChildren)
: ThumbnailView(pParent,rResId,bDisableTransientChildren) : ThumbnailView(pParent,rResId,bDisableTransientChildren),
mpItemView(new TemplateView(this))
{ {
} }
TemplateAbstractView::~TemplateAbstractView () TemplateAbstractView::~TemplateAbstractView ()
{ {
delete mpItemView;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -273,8 +273,7 @@ TemplateFolderView::TemplateFolderView ( Window* pParent, const ResId& rResId, b ...@@ -273,8 +273,7 @@ TemplateFolderView::TemplateFolderView ( Window* pParent, const ResId& rResId, b
: TemplateAbstractView(pParent,rResId,bDisableTransientChildren), : TemplateAbstractView(pParent,rResId,bDisableTransientChildren),
mbFilteredResults(false), mbFilteredResults(false),
meFilterOption(FILTER_APP_NONE), meFilterOption(FILTER_APP_NONE),
mpDocTemplates(new SfxDocumentTemplates), mpDocTemplates(new SfxDocumentTemplates)
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);
...@@ -291,7 +290,6 @@ TemplateFolderView::TemplateFolderView ( Window* pParent, const ResId& rResId, b ...@@ -291,7 +290,6 @@ TemplateFolderView::TemplateFolderView ( Window* pParent, const ResId& rResId, b
TemplateFolderView::~TemplateFolderView() TemplateFolderView::~TemplateFolderView()
{ {
delete mpItemView;
delete mpDocTemplates; delete mpDocTemplates;
} }
......
...@@ -47,8 +47,7 @@ enum ...@@ -47,8 +47,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))
{ {
mpItemView->SetColor(Color(COL_WHITE)); mpItemView->SetColor(Color(COL_WHITE));
...@@ -61,7 +60,6 @@ TemplateOnlineView::TemplateOnlineView (Window *pParent, WinBits nWinStyle, bool ...@@ -61,7 +60,6 @@ TemplateOnlineView::TemplateOnlineView (Window *pParent, WinBits nWinStyle, bool
TemplateOnlineView::~TemplateOnlineView () TemplateOnlineView::~TemplateOnlineView ()
{ {
delete mpItemView;
} }
void TemplateOnlineView::Populate() void TemplateOnlineView::Populate()
......
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