diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-07-15 07:47:31 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2012-07-15 08:15:25 -0430 |
commit | 7d2e94d0f8ec8824b3056fc107e29b8ba283e0b3 (patch) | |
tree | a869133577d26c9e7a1678d429c360b6f42d6dfc | |
parent | 0703d559335588e69599a4172cbc3aa3d153a98f (diff) |
Move Populate and ShowOverlay as pure virtual functions.
Change-Id: I6544ec030646a2f9fb0e322c1c2032b78ff6390c
-rw-r--r-- | sfx2/inc/sfx2/templateabstractview.hxx | 5 | ||||
-rw-r--r-- | sfx2/inc/sfx2/templatefolderview.hxx | 4 | ||||
-rw-r--r-- | sfx2/inc/sfx2/templateonlineview.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/templateonlineview.cxx | 14 |
4 files changed, 24 insertions, 3 deletions
diff --git a/sfx2/inc/sfx2/templateabstractview.hxx b/sfx2/inc/sfx2/templateabstractview.hxx index 21cdd4a75d22..323e125785f1 100644 --- a/sfx2/inc/sfx2/templateabstractview.hxx +++ b/sfx2/inc/sfx2/templateabstractview.hxx @@ -24,6 +24,11 @@ public: virtual ~TemplateAbstractView (); + // Fill view with template folders thumbnails + virtual void Populate () = 0; + + virtual void showOverlay (bool bVisible) = 0; + // Check if the overlay is visible or not. bool isOverlayVisible () const; diff --git a/sfx2/inc/sfx2/templatefolderview.hxx b/sfx2/inc/sfx2/templatefolderview.hxx index 8e17dd74f2e7..5274dd6b7fe8 100644 --- a/sfx2/inc/sfx2/templatefolderview.hxx +++ b/sfx2/inc/sfx2/templatefolderview.hxx @@ -36,11 +36,11 @@ public: virtual ~TemplateFolderView (); // Fill view with template folders thumbnails - void Populate (); + virtual void Populate (); std::vector<rtl::OUString> getFolderNames (); - void showOverlay (bool bVisible); + virtual void showOverlay (bool bVisible); void filterTemplatesByApp (const FILTER_APPLICATION &eApp); diff --git a/sfx2/inc/sfx2/templateonlineview.hxx b/sfx2/inc/sfx2/templateonlineview.hxx index e38ad712f0dc..e868248e25d8 100644 --- a/sfx2/inc/sfx2/templateonlineview.hxx +++ b/sfx2/inc/sfx2/templateonlineview.hxx @@ -23,7 +23,9 @@ public: virtual ~TemplateOnlineView (); // Load repositories from user settings. - void Populate (); + virtual void Populate (); + + virtual void showOverlay (bool bVisible); void setItemDimensions (long ItemWidth, long ThumbnailHeight, long DisplayHeight, int itemPadding); diff --git a/sfx2/source/control/templateonlineview.cxx b/sfx2/source/control/templateonlineview.cxx index 7b502a65e383..a776515567d3 100644 --- a/sfx2/source/control/templateonlineview.cxx +++ b/sfx2/source/control/templateonlineview.cxx @@ -87,6 +87,20 @@ void TemplateOnlineView::Populate() Invalidate(); } +void TemplateOnlineView::showOverlay (bool bVisible) +{ + mbActive = !bVisible; + mpItemView->Show(bVisible); + + // Clear items is the overlay is closed. + if (!bVisible) + { + mpItemView->Clear(); + + setSelectionMode(mbSelectionMode); + } +} + void TemplateOnlineView::setItemDimensions(long ItemWidth, long ThumbnailHeight, long DisplayHeight, int itemPadding) { ThumbnailView::setItemDimensions(ItemWidth,ThumbnailHeight,DisplayHeight,itemPadding); |