From e7721a2312b6bc81dbb33919feb065f33e2e61f6 Mon Sep 17 00:00:00 2001 From: Rafael Dominguez Date: Tue, 14 Aug 2012 21:17:51 -0430 Subject: Save a template to selected folders. Change-Id: I16969fa0b28ff5f1e5abe7e58ad8522c03b3ea4e --- sfx2/inc/sfx2/templatelocalview.hxx | 10 ++++++++++ sfx2/inc/templatedlg.hxx | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'sfx2/inc') diff --git a/sfx2/inc/sfx2/templatelocalview.hxx b/sfx2/inc/sfx2/templatelocalview.hxx index d59519699600..207e1e4f701c 100644 --- a/sfx2/inc/sfx2/templatelocalview.hxx +++ b/sfx2/inc/sfx2/templatelocalview.hxx @@ -18,6 +18,12 @@ class SfxDocumentTemplates; class TemplateLocalViewItem; +namespace com { + namespace sun { namespace star { namespace frame { + class XModel; + } } } +} + class SFX2_DLLPUBLIC TemplateLocalView : public TemplateAbstractView { public: @@ -57,6 +63,10 @@ public: bool exportTo (const sal_uInt16 nItemId, const sal_uInt16 nRegionItemId, const OUString &rName); + bool saveTemplateAs (const TemplateLocalViewItem *pDstItem, + com::sun::star::uno::Reference &rModel, + const OUString &rName); + private: virtual void OnItemDblClicked (ThumbnailViewItem *pRegionItem); diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx index 17596d924021..75fc4cff0cf3 100644 --- a/sfx2/inc/templatedlg.hxx +++ b/sfx2/inc/templatedlg.hxx @@ -29,6 +29,7 @@ class ToolBox; namespace com { namespace sun { namespace star { namespace frame { class XComponentLoader; + class XModel; } } } } @@ -40,6 +41,8 @@ public: ~SfxTemplateManagerDlg (); + void setDocumentModel (const com::sun::star::uno::Reference &rModel); + DECL_LINK(ViewAllHdl, void*); DECL_LINK(ViewDocsHdl, void*); DECL_LINK(ViewPresentsHdl, void*); @@ -135,6 +138,7 @@ private: std::set maSelTemplates; std::set maSelFolders; + com::sun::star::uno::Reference< com::sun::star::frame::XModel > m_xModel; com::sun::star::uno::Reference< com::sun::star::frame::XComponentLoader > mxDesktop; }; -- cgit