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 SW_TAUTOFMT_HXX 28 #define SW_TAUTOFMT_HXX 29 #include <sfx2/basedlgs.hxx> 30 31 #ifndef _FIXED_HXX //autogen 32 #include <vcl/fixed.hxx> 33 #endif 34 35 #ifndef _LSTBOX_HXX //autogen 36 #include <vcl/lstbox.hxx> 37 #endif 38 39 #ifndef _BUTTON_HXX //autogen 40 #include <vcl/button.hxx> 41 #endif 42 43 #ifndef _MOREBTN_HXX //autogen 44 #include <vcl/morebtn.hxx> 45 #endif 46 47 #ifndef _VIRDEV_HXX //autogen 48 #include <vcl/virdev.hxx> 49 #endif 50 51 class SwTableAutoFmt; 52 class AutoFmtPreview; 53 class SwTableAutoFmtTbl; 54 class SwWrtShell; 55 56 //------------------------------------------------------------------------ 57 58 enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE }; 59 60 //======================================================================== 61 62 class SwAutoFormatDlg : public SfxModalDialog 63 { 64 FixedLine aFlFormat; 65 ListBox aLbFormat; 66 FixedLine aFlFormats; 67 CheckBox aBtnNumFormat; 68 CheckBox aBtnBorder; 69 CheckBox aBtnFont; 70 CheckBox aBtnPattern; 71 CheckBox aBtnAlignment; 72 OKButton aBtnOk; 73 CancelButton aBtnCancel; 74 HelpButton aBtnHelp; 75 PushButton aBtnAdd; 76 PushButton aBtnRemove; 77 PushButton aBtnRename; 78 MoreButton aBtnMore; 79 String aStrTitle; 80 String aStrLabel; 81 String aStrClose; 82 String aStrDelTitle; 83 String aStrDelMsg; 84 String aStrRenameTitle; 85 String aStrInvalidFmt; 86 AutoFmtPreview* pWndPreview; 87 88 //------------------------ 89 SwWrtShell* pShell; 90 SwTableAutoFmtTbl* pTableTbl; 91 sal_uInt8 nIndex; 92 sal_uInt8 nDfltStylePos; 93 sal_Bool bCoreDataChanged : 1; 94 sal_Bool bSetAutoFmt : 1; 95 96 97 void Init( const SwTableAutoFmt* pSelFmt ); 98 void UpdateChecks( const SwTableAutoFmt&, sal_Bool bEnableBtn ); 99 //------------------------ 100 DECL_LINK( CheckHdl, Button * ); 101 DECL_LINK( OkHdl, Button * ); 102 DECL_LINK( AddHdl, void * ); 103 DECL_LINK( RemoveHdl, void * ); 104 DECL_LINK( RenameHdl, void * ); 105 DECL_LINK( SelFmtHdl, void * ); 106 107 public: 108 SwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, 109 sal_Bool bSetAutoFmt = sal_True, 110 const SwTableAutoFmt* pSelFmt = 0 ); 111 virtual ~SwAutoFormatDlg(); 112 113 void FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const; 114 }; 115 116 117 #endif // SW_AUTOFMT_HXX 118 119