summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-01-09 15:18:17 +0100
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-01-09 15:51:59 +0100
commit1ce372eec4dd0e4e807baa7bbf568245b955f99f (patch)
tree7d71f2efef8c57acfdf5b4ca4e20da22856578e0
parentd8385c2cfc63b25414f37699faf0143ee9f5ded9 (diff)
Template Manager: filter the results when opening the dialog
Change-Id: If6cc5f6d5e502c1fc5da210179263be63fc8c8a6
-rw-r--r--sfx2/source/control/templateabstractview.cxx7
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
2 files changed, 4 insertions, 5 deletions
diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx
index c9ea989a4ac4..27d37a8eca5c 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -103,7 +103,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));
}
@@ -112,7 +112,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));
}
@@ -186,9 +186,6 @@ void TemplateAbstractView::showOverlay (bool bVisible)
if (mbFilteredResults)
{
filterItems(ViewFilter_Application(meFilterOption));
-
- mbFilteredResults = false;
- meFilterOption = FILTER_APP_NONE;
}
mpItemView->Clear();
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 4c12338057d4..9a50ba9fe5f8 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -191,6 +191,8 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
maView->Populate();
maView->Show();
+ mpCurView->filterTemplatesByApp(FILTER_APP_WRITER);
+
FreeResource();
}