diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-06-21 11:23:57 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2012-06-21 11:23:57 -0430 |
commit | c8e143206c611c62e9c32afe03e5cb93dd3e7cf2 (patch) | |
tree | b85831956fb40c6db062d31237623c7d21a01387 | |
parent | 0805a180b96e548045f6fd28713d80874f6a6d92 (diff) |
Dont expose ViewFilter_Application class.
Change-Id: I27f1df59f5e70657306bc74d498fa98342c96490
-rw-r--r-- | sfx2/inc/sfx2/templatefolderview.hxx | 17 | ||||
-rw-r--r-- | sfx2/source/control/templatefolderview.cxx | 63 |
2 files changed, 36 insertions, 44 deletions
diff --git a/sfx2/inc/sfx2/templatefolderview.hxx b/sfx2/inc/sfx2/templatefolderview.hxx index d6ae0a116976..b615eb4eb25d 100644 --- a/sfx2/inc/sfx2/templatefolderview.hxx +++ b/sfx2/inc/sfx2/templatefolderview.hxx @@ -23,23 +23,6 @@ enum FILTER_APPLICATION FILTER_APP_DRAW }; -// Display template items depending on the generator application -class ViewFilter_Application -{ -public: - - - - ViewFilter_Application (SfxDocumentTemplates *pDocTemplates, FILTER_APPLICATION App); - - bool operator () (const ThumbnailViewItem *pItem); - -private: - - FILTER_APPLICATION mApp; - SfxDocumentTemplates *mpDocTemplates; -}; - class TemplateFolderView : public ThumbnailView { public: diff --git a/sfx2/source/control/templatefolderview.cxx b/sfx2/source/control/templatefolderview.cxx index d4a187bfa139..735b453945c3 100644 --- a/sfx2/source/control/templatefolderview.cxx +++ b/sfx2/source/control/templatefolderview.cxx @@ -140,39 +140,48 @@ BitmapEx lcl_fetchThumbnail (const rtl::OUString &msURL, int width, int height) return aThumbnail; } -ViewFilter_Application::ViewFilter_Application (SfxDocumentTemplates *pDocTemplates, - FILTER_APPLICATION App) - : mApp(App), mpDocTemplates(pDocTemplates) +// Display template items depending on the generator application +class ViewFilter_Application { -} +public: -bool ViewFilter_Application::operator () (const ThumbnailViewItem *pItem) -{ - const TemplateViewItem *pTempItem = static_cast<const TemplateViewItem*>(pItem); + ViewFilter_Application (SfxDocumentTemplates *pDocTemplates, FILTER_APPLICATION App) + : mApp(App), mpDocTemplates(pDocTemplates) + {} - if (mApp == FILTER_APP_WRITER) - { - return pTempItem->getFileType() == "OpenDocument Text" || - pTempItem->getFileType() == "OpenDocument Text Template"; - } - else if (mApp == FILTER_APP_CALC) - { - return pTempItem->getFileType() == "OpenDocument Spreadsheet" || - pTempItem->getFileType() == "OpenDocument Spreadsheet Template"; - } - else if (mApp == FILTER_APP_IMPRESS) - { - return pTempItem->getFileType() == "OpenDocument Presentation" || - pTempItem->getFileType() == "OpenDocument Presentation Template"; - } - else if (mApp == FILTER_APP_DRAW) + bool operator () (const ThumbnailViewItem *pItem) { - return pTempItem->getFileType() == "OpenDocument Drawing" || - pTempItem->getFileType() == "OpenDocument Drawing Template"; + const TemplateViewItem *pTempItem = static_cast<const TemplateViewItem*>(pItem); + + if (mApp == FILTER_APP_WRITER) + { + return pTempItem->getFileType() == "OpenDocument Text" || + pTempItem->getFileType() == "OpenDocument Text Template"; + } + else if (mApp == FILTER_APP_CALC) + { + return pTempItem->getFileType() == "OpenDocument Spreadsheet" || + pTempItem->getFileType() == "OpenDocument Spreadsheet Template"; + } + else if (mApp == FILTER_APP_IMPRESS) + { + return pTempItem->getFileType() == "OpenDocument Presentation" || + pTempItem->getFileType() == "OpenDocument Presentation Template"; + } + else if (mApp == FILTER_APP_DRAW) + { + return pTempItem->getFileType() == "OpenDocument Drawing" || + pTempItem->getFileType() == "OpenDocument Drawing Template"; + } + + return true; } - return true; -} +private: + + FILTER_APPLICATION mApp; + SfxDocumentTemplates *mpDocTemplates; +}; TemplateFolderView::TemplateFolderView ( Window* pParent, const ResId& rResId, bool bDisableTransientChildren) : ThumbnailView(pParent,rResId,bDisableTransientChildren), |