Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1675

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/75/1675/1

Template Manager: filter the results when opening the dialog

Conflicts:
        sfx2/source/control/templateabstractview.cxx

Change-Id: If6cc5f6d5e502c1fc5da210179263be63fc8c8a6
---
M sfx2/source/control/templateabstractview.cxx
M sfx2/source/doc/templatedlg.cxx
2 files changed, 21 insertions(+), 2 deletions(-)



diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index f8f20f5..182d833 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -102,7 +102,7 @@
     : ThumbnailView(pParent,nWinStyle,bDisableTransientChildren),
       mpItemView(new TemplateView(this)),
       mbFilteredResults(false),
-      meFilterOption(FILTER_APP_NONE)
+      meFilterOption(FILTER_APP_WRITER)
 {
     mpItemView->setItemStateHdl(LINK(this,TemplateAbstractView,OverlayItemStateHdl));
 }
@@ -111,7 +111,7 @@
     : ThumbnailView(pParent,rResId,bDisableTransientChildren),
       mpItemView(new TemplateView(this)),
       mbFilteredResults(false),
-      meFilterOption(FILTER_APP_NONE)
+      meFilterOption(FILTER_APP_WRITER)
 {
     mpItemView->setItemStateHdl(LINK(this,TemplateAbstractView,OverlayItemStateHdl));
 }
@@ -174,6 +174,23 @@
     }
 }
 
+void TemplateAbstractView::showOverlay (bool bVisible)
+{
+    mpItemView->Show(bVisible);
+
+    // Clear items is the overlay is closed.
+    if (!bVisible)
+    {
+        // Check if the folder view needs to be filtered
+        if (mbFilteredResults)
+        {
+            filterItems(ViewFilter_Application(meFilterOption));
+        }
+
+        mpItemView->Clear();
+    }
+}
+
 void TemplateAbstractView::filterTemplatesByKeyword(const OUString &rKeyword)
 {
     if (mpItemView->IsVisible())
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 7bd3741..388f0cb 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -190,6 +190,8 @@
     maView->Populate();
     maView->Show();
 
+    mpCurView->filterTemplatesByApp(FILTER_APP_WRITER);
+
     FreeResource();
 }
 

-- 
To view, visit https://gerrit.libreoffice.org/1675
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6cc5f6d5e502c1fc5da210179263be63fc8c8a6
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric <cedric.bosdonnat@free.fr>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.