Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / uibase / inc / instable.hxx
blobbe20b64dafd5f465ca252346156e2d48facaaf71
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 INCLUDED_SW_SOURCE_UIBASE_INC_INSTABLE_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_INSTABLE_HXX
22 #include <sfx2/basedlgs.hxx>
23 #include <sal/types.h>
24 #include <rtl/ustring.hxx>
25 #include <tools/link.hxx>
26 #include <vcl/textfilter.hxx>
28 #include "wrtsh.hxx"
29 #include "autoformatpreview.hxx"
30 #include <view.hxx>
31 #include <tblafmt.hxx>
32 #include <itabenum.hxx>
33 #include <memory>
35 class SwInsTableDlg final : public SfxDialogController
37 TextFilter m_aTextFilter;
39 SwWrtShell* m_pShell;
40 std::unique_ptr<SwTableAutoFormatTable> m_xTableTable;
41 std::unique_ptr<SwTableAutoFormat> m_xTAutoFormat;
43 sal_uInt8 m_lbIndex;
44 sal_uInt8 m_tbIndex;
45 sal_uInt8 minTableIndexInLb;
46 sal_uInt8 maxTableIndexInLb;
47 sal_Int64 m_nEnteredValRepeatHeaderNF;
49 AutoFormatPreview m_aWndPreview;
51 std::unique_ptr<weld::Entry> m_xNameEdit;
52 std::unique_ptr<weld::Label> m_xWarning;
53 std::unique_ptr<weld::SpinButton> m_xColSpinButton;
54 std::unique_ptr<weld::SpinButton> m_xRowSpinButton;
55 std::unique_ptr<weld::CheckButton> m_xHeaderCB;
56 std::unique_ptr<weld::CheckButton> m_xRepeatHeaderCB;
57 std::unique_ptr<weld::SpinButton> m_xRepeatHeaderNF;
58 std::unique_ptr<weld::Widget> m_xRepeatGroup;
59 std::unique_ptr<weld::CheckButton> m_xDontSplitCB;
60 std::unique_ptr<weld::Button> m_xInsertBtn;
61 std::unique_ptr<weld::TreeView> m_xLbFormat;
62 std::unique_ptr<weld::CustomWeld> m_xWndPreview;
63 std::unique_ptr<weld::Frame> m_xStyleFrame;
65 // Returns 255 if mapping is not possible.
66 // This means there cannot be more than 255 autotable style.
67 sal_uInt8 lbIndexToTableIndex(const sal_uInt8 listboxIndex);
68 void InitAutoTableFormat();
70 DECL_LINK(TextFilterHdl, OUString&, bool);
71 DECL_LINK(SelFormatHdl, weld::TreeView&, void);
72 DECL_LINK(ModifyName, weld::Entry&, void);
73 DECL_LINK(ModifyRowCol, weld::Entry&, void);
74 DECL_LINK(OKHdl, weld::Button&, void);
75 DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
76 DECL_LINK(RepeatHeaderCheckBoxHdl, weld::Toggleable&, void);
77 DECL_LINK(ModifyRepeatHeaderNF_Hdl, weld::SpinButton&, void);
79 public:
80 SwInsTableDlg(SwView& rView);
82 void GetValues(OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol,
83 SwInsertTableOptions& rInsTableOpts, OUString& rTableAutoFormatName,
84 std::unique_ptr<SwTableAutoFormat>& prTAFormat);
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */