Use o3tl::convert in Math
[LibreOffice.git] / sfx2 / inc / saveastemplatedlg.hxx
bloba4df61853aafa21ac7e9cce9e992a0195dbfcb85
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_SFX2_INC_SAVEASTEMPLATEDLG_HXX
11 #define INCLUDED_SFX2_INC_SAVEASTEMPLATEDLG_HXX
13 #include <sal/config.h>
14 #include <sfx2/doctempl.hxx>
15 #include <vcl/weld.hxx>
17 #include <com/sun/star/frame/XModel.hpp>
19 // class SfxSaveAsTemplateDialog -------------------------------------------------------------------
20 class SfxSaveAsTemplateDialog final : public weld::GenericDialogController
22 private:
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;
28 OUString msSelectedCategory;
29 OUString msTemplateName;
30 sal_uInt16 mnRegionPos;
32 std::vector<OUString> msCategories;
34 SfxDocumentTemplates maDocTemplates;
36 css::uno::Reference<css::frame::XModel> m_xModel;
38 public:
39 DECL_LINK(OkClickHdl, weld::Button&, void);
40 DECL_LINK(TemplateNameEditHdl, weld::Entry&, void);
41 DECL_LINK(SelectCategoryHdl, weld::TreeView&, void);
43 void initialize();
44 void SetCategoryLBEntries(const std::vector<OUString>& names);
46 /*Check whether template name is unique or not in a region*/
47 bool IsTemplateNameUnique();
49 bool SaveTemplate();
51 public:
52 SfxSaveAsTemplateDialog(weld::Window* pParent,
53 const css::uno::Reference<css::frame::XModel>& rModel);
56 #endif // INCLUDED_SFX2_INC_SAVEASTEMPLATEDLG_HXX
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */