1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef SW_TAUTOFMT_HXX
20 #define SW_TAUTOFMT_HXX
21 #include <sfx2/basedlgs.hxx>
23 #include <vcl/fixed.hxx>
25 #include <vcl/lstbox.hxx>
27 #include <vcl/button.hxx>
29 #include <vcl/morebtn.hxx>
31 #include <vcl/virdev.hxx>
35 class SwTableAutoFmtTbl
;
38 //------------------------------------------------------------------------
40 enum AutoFmtLine
{ TOP_LINE
, BOTTOM_LINE
, LEFT_LINE
, RIGHT_LINE
};
42 //========================================================================
44 class SwAutoFormatDlg
: public SfxModalDialog
47 VclContainer
* m_pFormatting
;
48 CheckBox
* m_pBtnNumFormat
;
49 CheckBox
* m_pBtnBorder
;
51 CheckBox
* m_pBtnPattern
;
52 CheckBox
* m_pBtnAlignment
;
54 CancelButton
* m_pBtnCancel
;
55 PushButton
* m_pBtnAdd
;
56 PushButton
* m_pBtnRemove
;
57 PushButton
* m_pBtnRename
;
63 String aStrRenameTitle
;
64 String aStrInvalidFmt
;
65 AutoFmtPreview
* m_pWndPreview
;
67 //------------------------
69 SwTableAutoFmtTbl
* pTableTbl
;
71 sal_uInt8 nDfltStylePos
;
72 sal_Bool bCoreDataChanged
: 1;
73 sal_Bool bSetAutoFmt
: 1;
76 void Init( const SwTableAutoFmt
* pSelFmt
);
77 void UpdateChecks( const SwTableAutoFmt
&, sal_Bool bEnableBtn
);
78 //------------------------
79 DECL_LINK( CheckHdl
, Button
* );
80 DECL_LINK(OkHdl
, void *);
81 DECL_LINK( AddHdl
, void * );
82 DECL_LINK( RemoveHdl
, void * );
83 DECL_LINK( RenameHdl
, void * );
84 DECL_LINK( SelFmtHdl
, void * );
87 SwAutoFormatDlg( Window
* pParent
, SwWrtShell
* pShell
,
88 sal_Bool bSetAutoFmt
= sal_True
,
89 const SwTableAutoFmt
* pSelFmt
= 0 );
90 virtual ~SwAutoFormatDlg();
92 void FillAutoFmtOfIndex( SwTableAutoFmt
*& rToFill
) const;
96 #endif // SW_AUTOFMT_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */