Branch data Line data Source code
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 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : : #ifndef _SFXDOCTDLG_HXX
20 : : #define _SFXDOCTDLG_HXX
21 : :
22 : : #include <comphelper/string.hxx>
23 : : #include <sfx2/doctempl.hxx>
24 : : #include <vcl/lstbox.hxx>
25 : : #include <vcl/edit.hxx>
26 : : #include <vcl/fixed.hxx>
27 : : #include <vcl/button.hxx>
28 : : #include <vcl/dialog.hxx>
29 : :
30 : : class SfxModalDefParentHelper;
31 : :
32 : : class SfxDocumentTemplateDlg : public ModalDialog
33 : : {
34 : : private:
35 : :
36 : : FixedLine aEditFL;
37 : : Edit aNameEd;
38 : : FixedLine aTemplateFL;
39 : : FixedText aRegionFt;
40 : : ListBox aRegionLb;
41 : : FixedText aTemplateFt;
42 : : ListBox aTemplateLb;
43 : :
44 : : OKButton aOkBt;
45 : : CancelButton aCancelBt;
46 : : HelpButton aHelpBt;
47 : : PushButton aEditBt;
48 : : PushButton aOrganizeBt;
49 : :
50 : : SfxDocumentTemplates *pTemplates;
51 : :
52 : : SfxModalDefParentHelper* pHelper;
53 : :
54 : : void Init();
55 : :
56 : : DECL_LINK( OrganizeHdl, Button * );
57 : : DECL_LINK( OkHdl, Control * );
58 : : DECL_LINK( RegionSelect, ListBox * );
59 : : DECL_LINK( TemplateSelect, ListBox * );
60 : : DECL_LINK( NameModify, Edit * );
61 : : DECL_LINK( EditHdl, Button * );
62 : :
63 : : public:
64 : : SfxDocumentTemplateDlg(Window * pParent, SfxDocumentTemplates* pTempl );
65 : : ~SfxDocumentTemplateDlg();
66 : :
67 : 0 : String GetTemplateName() const
68 [ # # ][ # # ]: 0 : { return comphelper::string::stripStart(aNameEd.GetText(), ' '); }
[ # # ]
69 : : sal_uInt16 GetRegion() const { return aRegionLb.GetSelectEntryPos(); }
70 : 0 : String GetRegionName() const { return aRegionLb.GetSelectEntry(); }
71 : : };
72 : :
73 : : #endif
74 : :
75 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|