LibreOffice Module sfx2 (master) 1
saveastemplatedlg.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#ifndef INCLUDED_SFX2_INC_SAVEASTEMPLATEDLG_HXX
11#define INCLUDED_SFX2_INC_SAVEASTEMPLATEDLG_HXX
12
13#include <sal/config.h>
14#include <sfx2/doctempl.hxx>
15#include <vcl/weld.hxx>
16
17#include <com/sun/star/frame/XModel.hpp>
18
19// class SfxSaveAsTemplateDialog -------------------------------------------------------------------
21{
22private:
23 std::unique_ptr<weld::TreeView> m_xLBCategory;
24 std::unique_ptr<weld::CheckButton> m_xCBXDefault;
25 std::unique_ptr<weld::Entry> m_xTemplateNameEdit;
26 std::unique_ptr<weld::Button> m_xOKButton;
27
30 sal_uInt16 mnRegionPos;
31
32 std::vector<OUString> msCategories;
33
35
36 css::uno::Reference<css::frame::XModel> m_xModel;
37
38public:
39 DECL_LINK(OkClickHdl, weld::Button&, void);
40 DECL_LINK(TemplateNameEditHdl, weld::Entry&, void);
41 DECL_LINK(SelectCategoryHdl, weld::TreeView&, void);
42
43 void initialize();
44 void SetCategoryLBEntries(const std::vector<OUString>& names);
45
46 /*Check whether template name is unique or not in a region*/
48
49 bool SaveTemplate();
50
51public:
52 SfxSaveAsTemplateDialog(weld::Window* pParent, css::uno::Reference<css::frame::XModel> xModel);
53};
54
55#endif // INCLUDED_SFX2_INC_SAVEASTEMPLATEDLG_HXX
56
57/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::TreeView > m_xLBCategory
std::vector< OUString > msCategories
DECL_LINK(OkClickHdl, weld::Button &, void)
SfxDocumentTemplates maDocTemplates
std::unique_ptr< weld::CheckButton > m_xCBXDefault
DECL_LINK(SelectCategoryHdl, weld::TreeView &, void)
void SetCategoryLBEntries(const std::vector< OUString > &names)
std::unique_ptr< weld::Entry > m_xTemplateNameEdit
css::uno::Reference< css::frame::XModel > m_xModel
std::unique_ptr< weld::Button > m_xOKButton
SfxSaveAsTemplateDialog(weld::Window *pParent, css::uno::Reference< css::frame::XModel > xModel)
DECL_LINK(TemplateNameEditHdl, weld::Entry &, void)