Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / include / sfx2 / new.hxx
blobc7f5b625b01e4ddcead2f91b5f407fc2190b846a
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SFX2_NEW_HXX
20 #define INCLUDED_SFX2_NEW_HXX
22 #include <sal/config.h>
23 #include <sfx2/dllapi.h>
25 #include <vcl/button.hxx>
26 #include <vcl/lstbox.hxx>
27 #include <vcl/edit.hxx>
28 #include <vcl/fixed.hxx>
29 #include <sfx2/basedlgs.hxx>
30 #include <o3tl/typed_flags_set.hxx>
33 class SfxObjectShellLock;
34 class SfxObjectShell;
37 #define SFXWB_PREVIEW 0x0003
38 #define SFXWB_LOAD_TEMPLATE 0x0004
40 enum class SfxTemplateFlags
42 NONE = 0x00,
43 LOAD_TEXT_STYLES = 0x01,
44 LOAD_FRAME_STYLES = 0x02,
45 LOAD_PAGE_STYLES = 0x04,
46 LOAD_NUM_STYLES = 0x08,
47 MERGE_STYLES = 0x10,
49 namespace o3tl
51 template<> struct typed_flags<SfxTemplateFlags> : is_typed_flags<SfxTemplateFlags, 0x1f> {};
54 #define RET_TEMPLATE_LOAD 100
56 class SfxNewFileDialog_Impl;
57 class SFX2_DLLPUBLIC SfxNewFileDialog : public SfxModalDialog
59 friend class SfxNewFileDialog_Impl;
61 private:
62 std::unique_ptr< SfxNewFileDialog_Impl > pImpl;
64 public:
66 SfxNewFileDialog(vcl::Window *pParent, sal_uInt16 nFlags = 0);
67 virtual ~SfxNewFileDialog();
68 virtual void dispose() override;
70 // Returns false, when '- No -' is set as Template
71 // Template names can only be obtained when IsTemplate() returns true.
72 bool IsTemplate() const;
73 OUString GetTemplateFileName() const;
75 // load template methods
76 SfxTemplateFlags GetTemplateFlags() const;
77 void SetTemplateFlags(SfxTemplateFlags nSet);
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */