1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _SFXNEW_HXX 28 #define _SFXNEW_HXX 29 30 #include "sal/config.h" 31 #include "sfx2/dllapi.h" 32 33 #ifndef _BUTTON_HXX //autogen 34 #include <vcl/button.hxx> 35 #endif 36 #ifndef _LSTBOX_HXX //autogen 37 #include <vcl/lstbox.hxx> 38 #endif 39 #ifndef _EDIT_HXX //autogen 40 #include <vcl/edit.hxx> 41 #endif 42 #ifndef _FIXED_HXX //autogen 43 #include <vcl/fixed.hxx> 44 #endif 45 #include <sfx2/basedlgs.hxx> 46 47 //========================================================================= 48 49 class SfxObjectShellLock; 50 class SfxObjectShell; 51 class MoreButton; 52 53 //========================================================================= 54 55 #define SFXWB_PREVIEW 0x0003 56 #define SFXWB_LOAD_TEMPLATE 0x0004 57 58 #define SFX_LOAD_TEXT_STYLES 0x0001 59 #define SFX_LOAD_FRAME_STYLES 0x0002 60 #define SFX_LOAD_PAGE_STYLES 0x0004 61 #define SFX_LOAD_NUM_STYLES 0x0008 62 #define SFX_MERGE_STYLES 0x0010 63 64 #define RET_TEMPLATE_LOAD 100 65 66 class SFX2_DLLPUBLIC SfxPreviewWin: public Window 67 { 68 SfxObjectShellLock &rDocShell; 69 protected: 70 virtual void Paint( const Rectangle& rRect ); 71 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 72 73 /** state whether a system setting for high contrast should be evaluated 74 and taken into account for this window. 75 76 The default implementation uses the accessibility option IsForDrawings 77 */ 78 virtual bool UseHighContrastSetting() const; 79 80 public: 81 SfxPreviewWin( Window* pParent, 82 const ResId& rResId, 83 SfxObjectShellLock &rDocSh ); 84 }; 85 86 class SfxNewFileDialog_Impl; 87 class SFX2_DLLPUBLIC SfxNewFileDialog : public SfxModalDialog 88 { 89 friend class SfxNewFileDialog_Impl; 90 91 private: 92 SfxNewFileDialog_Impl* pImpl; 93 94 public: 95 96 SfxNewFileDialog(Window *pParent, sal_uInt16 nFlags = 0); 97 ~SfxNewFileDialog(); 98 99 // Liefert sal_False, wenn '- Keine -' als Vorlage eingestellt ist 100 // Nur wenn IsTemplate() sal_True liefert, koennen Vorlagennamen 101 // erfragt werden 102 sal_Bool IsTemplate() const; 103 String GetTemplateRegion() const; 104 String GetTemplateName() const; 105 String GetTemplateFileName() const; 106 107 // load template methods 108 sal_uInt16 GetTemplateFlags()const; 109 void SetTemplateFlags(sal_uInt16 nSet); 110 }; 111 112 #endif 113