LibreOffice Module sw (master)  1
tautofmt.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_TAUTOFMT_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_TAUTOFMT_HXX
21 
22 #include <tools/link.hxx>
23 #include <sfx2/basedlgs.hxx>
24 #include <sal/types.h>
25 #include <rtl/ustring.hxx>
26 #include <vcl/weld.hxx>
27 
28 #include "wrtsh.hxx"
29 #include "autoformatpreview.hxx"
30 #include <tblafmt.hxx>
31 
32 class SwTableAutoFormat;
34 class SwWrtShell;
35 
37 {
38  OUString const m_aStrTitle;
39  OUString const m_aStrLabel;
40  OUString const m_aStrClose;
41  OUString const m_aStrDelTitle;
42  OUString const m_aStrDelMsg;
43  OUString const m_aStrRenameTitle;
44  OUString const m_aStrInvalidFormat;
45 
50  bool const m_bSetAutoFormat : 1;
51 
53  std::unique_ptr<SwTableAutoFormatTable> m_xTableTable;
54 
55  std::unique_ptr<weld::TreeView> m_xLbFormat;
56  std::unique_ptr<weld::CheckButton> m_xBtnNumFormat;
57  std::unique_ptr<weld::CheckButton> m_xBtnBorder;
58  std::unique_ptr<weld::CheckButton> m_xBtnFont;
59  std::unique_ptr<weld::CheckButton> m_xBtnPattern;
60  std::unique_ptr<weld::CheckButton> m_xBtnAlignment;
61  std::unique_ptr<weld::Button> m_xBtnCancel;
62  std::unique_ptr<weld::Button> m_xBtnAdd;
63  std::unique_ptr<weld::Button> m_xBtnRemove;
64  std::unique_ptr<weld::Button> m_xBtnRename;
65  std::unique_ptr<weld::CustomWeld> m_xWndPreview;
66 
67  void Init( const SwTableAutoFormat* pSelFormat );
68  void UpdateChecks( const SwTableAutoFormat&, bool bEnableBtn );
69 
70  DECL_LINK(CheckHdl, weld::ToggleButton&, void);
71  DECL_LINK(AddHdl, weld::Button&, void);
72  DECL_LINK(RemoveHdl, weld::Button&, void);
73  DECL_LINK(RenameHdl, weld::Button&, void);
74  DECL_LINK(SelFormatHdl, weld::TreeView&, void);
75 
76 public:
77  SwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell,
78  bool bSetAutoFormat, const SwTableAutoFormat* pSelFormat);
79 
80  virtual short run() override;
81 
82  std::unique_ptr<SwTableAutoFormat> FillAutoFormatOfIndex() const;
83 
84  virtual ~SwAutoFormatDlg() override;
85 };
86 
87 #endif // SW_AUTOFMT_HXX
88 
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SwTableAutoFormat > FillAutoFormatOfIndex() const
Definition: tautofmt.cxx:165
bool m_bCoreDataChanged
Definition: tautofmt.hxx:49
virtual ~SwAutoFormatDlg() override
Definition: tautofmt.cxx:96
sal_uInt8 m_nIndex
Definition: tautofmt.hxx:47
std::unique_ptr< weld::CheckButton > m_xBtnFont
Definition: tautofmt.hxx:58
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
std::unique_ptr< SwTableAutoFormatTable > m_xTableTable
Definition: tautofmt.hxx:53
std::unique_ptr< weld::Button > m_xBtnRename
Definition: tautofmt.hxx:64
OUString const m_aStrLabel
Definition: tautofmt.hxx:39
std::unique_ptr< weld::CheckButton > m_xBtnBorder
Definition: tautofmt.hxx:57
std::unique_ptr< weld::Button > m_xBtnRemove
Definition: tautofmt.hxx:63
virtual short run() override
Definition: tautofmt.cxx:397
OUString const m_aStrDelTitle
Definition: tautofmt.hxx:41
void Init(const SwTableAutoFormat *pSelFormat)
Definition: tautofmt.cxx:109
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: tautofmt.hxx:61
std::unique_ptr< weld::CheckButton > m_xBtnNumFormat
Definition: tautofmt.hxx:56
std::unique_ptr< weld::CheckButton > m_xBtnPattern
Definition: tautofmt.hxx:59
OUString const m_aStrDelMsg
Definition: tautofmt.hxx:42
DECL_LINK(CheckHdl, weld::ToggleButton &, void)
bool const m_bSetAutoFormat
Definition: tautofmt.hxx:50
std::unique_ptr< weld::TreeView > m_xLbFormat
Definition: tautofmt.hxx:55
SwAutoFormatDlg(weld::Window *pParent, SwWrtShell *pShell, bool bSetAutoFormat, const SwTableAutoFormat *pSelFormat)
Definition: tautofmt.cxx:56
AutoFormatPreview m_aWndPreview
Definition: tautofmt.hxx:52
unsigned char sal_uInt8
std::unique_ptr< weld::Button > m_xBtnAdd
Definition: tautofmt.hxx:62
sal_uInt8 m_nDfltStylePos
Definition: tautofmt.hxx:48
std::unique_ptr< weld::CustomWeld > m_xWndPreview
Definition: tautofmt.hxx:65
OUString const m_aStrTitle
Definition: tautofmt.hxx:38
OUString const m_aStrInvalidFormat
Definition: tautofmt.hxx:44
OUString const m_aStrClose
Definition: tautofmt.hxx:40
OUString const m_aStrRenameTitle
Definition: tautofmt.hxx:43
SwWrtShell * m_pShell
Definition: tautofmt.hxx:46
std::unique_ptr< weld::CheckButton > m_xBtnAlignment
Definition: tautofmt.hxx:60
void UpdateChecks(const SwTableAutoFormat &, bool bEnableBtn)
Definition: tautofmt.cxx:147