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
34class SwWrtShell;
35
37{
38 OUString m_aStrTitle;
39 OUString m_aStrLabel;
40 OUString m_aStrClose;
42 OUString m_aStrDelMsg;
45
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::Toggleable&, 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
76public:
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< SwTableAutoFormatTable > m_xTableTable
Definition: tautofmt.hxx:53
std::unique_ptr< weld::Button > m_xBtnAdd
Definition: tautofmt.hxx:62
virtual ~SwAutoFormatDlg() override
Definition: tautofmt.cxx:99
DECL_LINK(RemoveHdl, weld::Button &, void)
void Init(const SwTableAutoFormat *pSelFormat)
Definition: tautofmt.cxx:112
std::unique_ptr< weld::CheckButton > m_xBtnNumFormat
Definition: tautofmt.hxx:56
OUString m_aStrTitle
Definition: tautofmt.hxx:38
sal_uInt8 m_nDfltStylePos
Definition: tautofmt.hxx:48
OUString m_aStrLabel
Definition: tautofmt.hxx:39
OUString m_aStrDelMsg
Definition: tautofmt.hxx:42
DECL_LINK(SelFormatHdl, weld::TreeView &, void)
std::unique_ptr< weld::CustomWeld > m_xWndPreview
Definition: tautofmt.hxx:65
SwAutoFormatDlg(weld::Window *pParent, SwWrtShell *pShell, bool bSetAutoFormat, const SwTableAutoFormat *pSelFormat)
Definition: tautofmt.cxx:59
void UpdateChecks(const SwTableAutoFormat &, bool bEnableBtn)
Definition: tautofmt.cxx:150
OUString m_aStrInvalidFormat
Definition: tautofmt.hxx:44
std::unique_ptr< weld::CheckButton > m_xBtnAlignment
Definition: tautofmt.hxx:60
OUString m_aStrClose
Definition: tautofmt.hxx:40
bool m_bCoreDataChanged
Definition: tautofmt.hxx:49
OUString m_aStrRenameTitle
Definition: tautofmt.hxx:43
DECL_LINK(RenameHdl, weld::Button &, void)
AutoFormatPreview m_aWndPreview
Definition: tautofmt.hxx:52
std::unique_ptr< SwTableAutoFormat > FillAutoFormatOfIndex() const
Definition: tautofmt.cxx:168
std::unique_ptr< weld::CheckButton > m_xBtnBorder
Definition: tautofmt.hxx:57
sal_uInt8 m_nIndex
Definition: tautofmt.hxx:47
std::unique_ptr< weld::TreeView > m_xLbFormat
Definition: tautofmt.hxx:55
std::unique_ptr< weld::CheckButton > m_xBtnFont
Definition: tautofmt.hxx:58
virtual short run() override
Definition: tautofmt.cxx:400
DECL_LINK(AddHdl, weld::Button &, void)
bool m_bSetAutoFormat
Definition: tautofmt.hxx:50
std::unique_ptr< weld::Button > m_xBtnRemove
Definition: tautofmt.hxx:63
DECL_LINK(CheckHdl, weld::Toggleable &, void)
std::unique_ptr< weld::CheckButton > m_xBtnPattern
Definition: tautofmt.hxx:59
std::unique_ptr< weld::Button > m_xBtnRename
Definition: tautofmt.hxx:64
SwWrtShell * m_pShell
Definition: tautofmt.hxx:46
OUString m_aStrDelTitle
Definition: tautofmt.hxx:41
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: tautofmt.hxx:61
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
unsigned char sal_uInt8