[Libreoffice-commits] .: Branch 'libreoffice-4-0' - 2 commits - sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 14 10:39:24 PST 2013
sfx2/source/control/templateabstractview.cxx | 21 +++++++++++++++++++--
sfx2/source/doc/templatedlg.cxx | 5 ++---
sfx2/source/doc/templatedlg.hrc | 1 -
sfx2/source/doc/templatedlg.src | 5 -----
4 files changed, 21 insertions(+), 11 deletions(-)
New commits:
commit a98e717ba315b51fd2e9e3a4e12edfbc75f287be
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Wed Jan 9 15:18:17 2013 +0100
Template Manager: filter the results when opening the dialog
Conflicts:
sfx2/source/control/templateabstractview.cxx
Change-Id: If6cc5f6d5e502c1fc5da210179263be63fc8c8a6
Reviewed-on: https://gerrit.libreoffice.org/1675
Reviewed-by: Noel Power <noel.power at suse.com>
Tested-by: Noel Power <noel.power at suse.com>
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 @@ TemplateAbstractView::TemplateAbstractView (Window *pParent, WinBits nWinStyle,
: 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 @@ TemplateAbstractView::TemplateAbstractView(Window *pParent, const ResId &rResId,
: 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::filterTemplatesByApp (const FILTER_APPLICATION &eApp)
}
}
+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 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
maView->Populate();
maView->Show();
+ mpCurView->filterTemplatesByApp(FILTER_APP_WRITER);
+
FreeResource();
}
commit c61861f870385f0cfbf8f5aa1b8d301475c6a73e
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Wed Jan 9 14:22:23 2013 +0100
Template Manager: removed All category
Change-Id: I073b9601c82a464f705df30cfd7e760c212eb7ca
Reviewed-on: https://gerrit.libreoffice.org/1674
Reviewed-by: Noel Power <noel.power at suse.com>
Tested-by: Noel Power <noel.power at suse.com>
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index bff2dc1..7bd3741 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -253,9 +253,6 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,ActivatePageHdl)
case FILTER_DRAWS:
eFilter = FILTER_APP_DRAW;
break;
- default:
- case FILTER_ALL:
- ;
}
mpCurView->filterTemplatesByApp(eFilter);
return 0;
diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc
index 02c6702..672575c 100644
--- a/sfx2/source/doc/templatedlg.hrc
+++ b/sfx2/source/doc/templatedlg.hrc
@@ -7,7 +7,6 @@
*/
#define TAB_CONTROL 1
-#define FILTER_ALL 2
#define FILTER_DOCS 3
#define FILTER_PRESENTATIONS 4
#define FILTER_SHEETS 5
diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index 2480862..a351431 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -121,11 +121,6 @@ ModelessDialog DLG_TEMPLATE_MANAGER
{
PageItem
{
- Identifier = FILTER_ALL;
- Text [ en-US ] = "All";
- };
- PageItem
- {
Identifier = FILTER_DOCS;
Text [ en-US ] = "Documents";
};
More information about the Libreoffice-commits
mailing list