1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _SFXDOCTDLG_HXX 24 #define _SFXDOCTDLG_HXX 25 26 #include <sfx2/doctempl.hxx> 27 #include <vcl/lstbox.hxx> 28 #include <vcl/edit.hxx> 29 #include <vcl/fixed.hxx> 30 #ifndef _SV_BUTTON_HXX 31 #include <vcl/button.hxx> 32 #endif 33 #include <vcl/dialog.hxx> 34 #include <vcl/fixed.hxx> 35 36 class SfxModalDefParentHelper; 37 38 class SfxDocumentTemplateDlg : public ModalDialog 39 { 40 private: 41 42 FixedLine aEditFL; 43 Edit aNameEd; 44 FixedLine aTemplateFL; 45 FixedText aRegionFt; 46 ListBox aRegionLb; 47 FixedText aTemplateFt; 48 ListBox aTemplateLb; 49 50 OKButton aOkBt; 51 CancelButton aCancelBt; 52 HelpButton aHelpBt; 53 PushButton aEditBt; 54 PushButton aOrganizeBt; 55 56 SfxDocumentTemplates *pTemplates; 57 58 SfxModalDefParentHelper* pHelper; 59 60 void Init(); 61 62 DECL_LINK( OrganizeHdl, Button * ); 63 DECL_LINK( OkHdl, Control * ); 64 DECL_LINK( RegionSelect, ListBox * ); 65 DECL_LINK( TemplateSelect, ListBox * ); 66 DECL_LINK( NameModify, Edit * ); 67 DECL_LINK( EditHdl, Button * ); 68 69 public: 70 SfxDocumentTemplateDlg(Window * pParent, SfxDocumentTemplates* pTempl ); 71 ~SfxDocumentTemplateDlg(); 72 GetTemplateName() const73 String GetTemplateName() const 74 { return aNameEd.GetText().EraseLeadingChars(); } 75 String GetTemplatePath(); 76 void NewTemplate(const String &rPath); GetRegion() const77 sal_uInt16 GetRegion() const { return aRegionLb.GetSelectEntryPos(); } GetRegionName() const78 String GetRegionName() const { return aRegionLb.GetSelectEntry(); } 79 }; 80 81 #endif 82 83