diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-12 22:33:49 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-12 22:46:56 +0100 |
commit | 35211d334e36dc970624705dd9a663b5be8c2479 (patch) | |
tree | 8146afd5e1c8095cab50da630c39738ef241879b /sfx2/source/control/templatelocalview.cxx | |
parent | a5bfc2c6be6795dea5d615a7c3b5c6018354ace0 (diff) |
Template manager: filter on extensions, file type is localized
Change-Id: I4b4a4f8aaf253e663bbeb4f061c6aa87411b730f
Diffstat (limited to 'sfx2/source/control/templatelocalview.cxx')
-rw-r--r-- | sfx2/source/control/templatelocalview.cxx | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index 5147014135b9..b77a57421a63 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -33,12 +33,12 @@ using namespace ::com::sun::star::frame; static void lcl_updateThumbnails (TemplateLocalViewItem *pItem); -class FolderFilter_Application +class FolderFilter_Application : public ViewFilter_Application { public: FolderFilter_Application (FILTER_APPLICATION eApp) - : meApp(eApp) + : ViewFilter_Application(eApp) { } @@ -56,7 +56,7 @@ public: for (size_t i = 0, n = rTemplates.size(); i < n; ++i) { - if (isValid(rTemplates[i].aType)) + if (isValid(rTemplates[i].aPath)) { ++nVisCount; if ( pFolderItem->maPreview1.IsEmpty( ) ) @@ -77,29 +77,6 @@ public: return meApp != FILTER_APP_NONE ? nVisCount : true ; } - bool isValid (const OUString &rType) const - { - bool bRet = true; - - if (meApp == FILTER_APP_WRITER) - { - bRet = rType == "OpenDocument Text" || rType == "OpenDocument Text Template"; - } - else if (meApp == FILTER_APP_CALC) - { - bRet = rType == "OpenDocument Spreadsheet" || rType == "OpenDocument Spreadsheet Template"; - } - else if (meApp == FILTER_APP_IMPRESS) - { - bRet = rType == "OpenDocument Presentation" || rType == "OpenDocument Presentation Template"; - } - else if (meApp == FILTER_APP_DRAW) - { - bRet = rType == "OpenDocument Drawing" || rType == "OpenDocument Drawing Template"; - } - - return bRet; - } private: |