summaryrefslogtreecommitdiff
path: root/sfx2/inc
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-12-21 15:37:49 +0100
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-01-08 15:29:52 +0100
commit8a2bfe697bf71c8a2ca3c6ba1ef5e6324d4163aa (patch)
treebb1de8da97d066cbed5d47ca9af75b6cccf1de7b /sfx2/inc
parent94874973769fee81f8ab35b2aeb0dc22812a2b48 (diff)
Templates Manager: merged the Double Click Handling into TemplateAbstractView
Change-Id: Iafc1650d57d29fbc24921498f18da6c0e510b37a
Diffstat (limited to 'sfx2/inc')
-rw-r--r--sfx2/inc/sfx2/templateabstractview.hxx7
-rw-r--r--sfx2/inc/sfx2/templatelocalview.hxx6
-rw-r--r--sfx2/inc/sfx2/templateremoteview.hxx2
-rw-r--r--sfx2/inc/sfx2/templateview.hxx12
4 files changed, 12 insertions, 15 deletions
diff --git a/sfx2/inc/sfx2/templateabstractview.hxx b/sfx2/inc/sfx2/templateabstractview.hxx
index ca5118109a0d..a5fef712b8b2 100644
--- a/sfx2/inc/sfx2/templateabstractview.hxx
+++ b/sfx2/inc/sfx2/templateabstractview.hxx
@@ -87,7 +87,7 @@ public:
virtual void filterTemplatesByApp (const FILTER_APPLICATION &eApp);
- virtual void showOverlay (bool bVisible) = 0;
+ void showOverlay (bool bVisible);
void setItemDimensions (long ItemWidth, long ThumbnailHeight, long DisplayHeight, int itemPadding);
@@ -109,7 +109,7 @@ public:
void setOverlayItemStateHdl (const Link &aLink) { maOverlayItemStateHdl = aLink; }
- void setOverlayDblClickHdl (const Link &rLink);
+ void setOpenHdl (const Link &rLink);
void setOverlayCloseHdl (const Link &rLink);
@@ -127,10 +127,13 @@ protected:
DECL_LINK(OverlayItemStateHdl, const ThumbnailViewItem*);
+ virtual void OnItemDblClicked(ThumbnailViewItem *pItem);
+
protected:
TemplateView *mpItemView;
Link maOverlayItemStateHdl;
+ Link maOpenHdl;
bool mbFilteredResults; // Flag keep track if overlay has been filtered so folders can get filtered too afterwards
FILTER_APPLICATION meFilterOption;
diff --git a/sfx2/inc/sfx2/templatelocalview.hxx b/sfx2/inc/sfx2/templatelocalview.hxx
index e11c42bdf24b..5c54375a4935 100644
--- a/sfx2/inc/sfx2/templatelocalview.hxx
+++ b/sfx2/inc/sfx2/templatelocalview.hxx
@@ -39,8 +39,6 @@ public:
std::vector<OUString> getFolderNames ();
- virtual void showOverlay (bool bVisible);
-
std::vector<TemplateItemProperties>
getFilteredItems (const boost::function<bool (const TemplateItemProperties&) > &rFunc) const;
@@ -73,10 +71,6 @@ public:
private:
- virtual void OnItemDblClicked (ThumbnailViewItem *pRegionItem);
-
-private:
-
SfxDocumentTemplates *mpDocTemplates;
};
diff --git a/sfx2/inc/sfx2/templateremoteview.hxx b/sfx2/inc/sfx2/templateremoteview.hxx
index bd1bf5cad34a..b760f009ae3c 100644
--- a/sfx2/inc/sfx2/templateremoteview.hxx
+++ b/sfx2/inc/sfx2/templateremoteview.hxx
@@ -25,8 +25,6 @@ public:
virtual ~TemplateRemoteView ();
- virtual void showOverlay (bool bVisible);
-
bool loadRepository (TemplateRepository* pRepository, bool bRefresh);
private:
diff --git a/sfx2/inc/sfx2/templateview.hxx b/sfx2/inc/sfx2/templateview.hxx
index 6e81ea491186..8ee529d707ec 100644
--- a/sfx2/inc/sfx2/templateview.hxx
+++ b/sfx2/inc/sfx2/templateview.hxx
@@ -36,24 +36,26 @@ public:
void InsertItems (const std::vector<TemplateItemProperties> &rTemplates);
- void setDblClickHdl (const Link &rLink) { maDblClickHdl = rLink; }
-
void setCloseHdl (const Link &rLink) { maAllButton.SetClickHdl(rLink); }
+
+ // FIXME Kept only during the refactoring
+ void setOpenHdl (const Link &rLink) { maOpenHdl = rLink; }
+ virtual void OnItemDblClicked(ThumbnailViewItem *pItem) { maOpenHdl.Call(pItem); }
+
protected:
virtual void Resize ();
- virtual void OnItemDblClicked (ThumbnailViewItem *pItem);
-
private:
+ Link maOpenHdl;
+
Control maButtons;
PushButton maAllButton;
FixedText maFTName;
sal_uInt16 mnId;
OUString maName;
- Link maDblClickHdl;
};
#endif // TEMPLATEVIEW_HXX