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 _SFXNEW_HXX 24 #define _SFXNEW_HXX 25 26 #include "sal/config.h" 27 #include "sfx2/dllapi.h" 28 29 #ifndef _BUTTON_HXX //autogen 30 #include <vcl/button.hxx> 31 #endif 32 #ifndef _LSTBOX_HXX //autogen 33 #include <vcl/lstbox.hxx> 34 #endif 35 #ifndef _EDIT_HXX //autogen 36 #include <vcl/edit.hxx> 37 #endif 38 #ifndef _FIXED_HXX //autogen 39 #include <vcl/fixed.hxx> 40 #endif 41 #include <sfx2/basedlgs.hxx> 42 43 //========================================================================= 44 45 class SfxObjectShellLock; 46 class SfxObjectShell; 47 class MoreButton; 48 49 //========================================================================= 50 51 #define SFXWB_PREVIEW 0x0003 52 #define SFXWB_LOAD_TEMPLATE 0x0004 53 54 #define SFX_LOAD_TEXT_STYLES 0x0001 55 #define SFX_LOAD_FRAME_STYLES 0x0002 56 #define SFX_LOAD_PAGE_STYLES 0x0004 57 #define SFX_LOAD_NUM_STYLES 0x0008 58 #define SFX_MERGE_STYLES 0x0010 59 60 #define RET_TEMPLATE_LOAD 100 61 62 class SFX2_DLLPUBLIC SfxPreviewWin: public Window 63 { 64 SfxObjectShellLock &rDocShell; 65 protected: 66 virtual void Paint( const Rectangle& rRect ); 67 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 68 69 /** state whether a system setting for high contrast should be evaluated 70 and taken into account for this window. 71 72 The default implementation uses the accessibility option IsForDrawings 73 */ 74 virtual bool UseHighContrastSetting() const; 75 76 public: 77 SfxPreviewWin( Window* pParent, 78 const ResId& rResId, 79 SfxObjectShellLock &rDocSh ); 80 }; 81 82 class SfxNewFileDialog_Impl; 83 class SFX2_DLLPUBLIC SfxNewFileDialog : public SfxModalDialog 84 { 85 friend class SfxNewFileDialog_Impl; 86 87 private: 88 SfxNewFileDialog_Impl* pImpl; 89 90 public: 91 92 SfxNewFileDialog(Window *pParent, sal_uInt16 nFlags = 0); 93 ~SfxNewFileDialog(); 94 95 // Liefert sal_False, wenn '- Keine -' als Vorlage eingestellt ist 96 // Nur wenn IsTemplate() sal_True liefert, koennen Vorlagennamen 97 // erfragt werden 98 sal_Bool IsTemplate() const; 99 String GetTemplateRegion() const; 100 String GetTemplateName() const; 101 String GetTemplateFileName() const; 102 103 // load template methods 104 sal_uInt16 GetTemplateFlags()const; 105 void SetTemplateFlags(sal_uInt16 nSet); 106 }; 107 108 #endif 109