Revert "tdf#158280 Replace usage of InputDialog with SvxNameDialog"
[LibreOffice.git] / sw / source / uibase / inc / convert.hxx
bloba0b83f8237141b99b12192c2e8cfbf29bfc412db
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_CONVERT_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_CONVERT_HXX
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>
28 #include "wrtsh.hxx"
29 #include "autoformatpreview.hxx"
30 #include <tblafmt.hxx>
32 class VclContainer;
33 class SwTableAutoFormat;
34 class SwView;
35 class SwWrtShell;
36 struct SwInsertTableOptions;
38 class SwConvertTableDlg final : public SfxDialogController
40 sal_uInt8 m_nIndex;
41 sal_uInt8 m_nDfltStylePos;
42 bool m_bCoreDataChanged : 1;
44 std::unique_ptr<SwTableAutoFormatTable> m_xTableTable;
45 std::unique_ptr<weld::RadioButton> m_xTabBtn;
46 std::unique_ptr<weld::RadioButton> m_xSemiBtn;
47 std::unique_ptr<weld::RadioButton> m_xParaBtn;
48 std::unique_ptr<weld::RadioButton> m_xOtherBtn;
49 std::unique_ptr<weld::Entry> m_xOtherEd;
50 std::unique_ptr<weld::CheckButton> m_xKeepColumn;
52 std::unique_ptr<weld::Container> m_xOptions;
54 std::unique_ptr<weld::CheckButton> m_xHeaderCB;
55 std::unique_ptr<weld::CheckButton> m_xRepeatHeaderCB;
57 std::unique_ptr<weld::Container> m_xRepeatRows;
58 std::unique_ptr<weld::SpinButton> m_xRepeatHeaderNF;
60 std::unique_ptr<weld::CheckButton> m_xDontSplitCB;
62 std::unique_ptr<SwTableAutoFormat> mxTAutoFormat;
64 std::unique_ptr<weld::TreeView> m_xLbFormat;
65 std::unique_ptr<weld::CheckButton> m_xBtnNumFormat;
66 std::unique_ptr<weld::CheckButton> m_xBtnBorder;
67 std::unique_ptr<weld::CheckButton> m_xBtnFont;
68 std::unique_ptr<weld::CheckButton> m_xBtnPattern;
69 std::unique_ptr<weld::CheckButton> m_xBtnAlignment;
70 AutoFormatPreview m_aWndPreview;
71 std::unique_ptr<weld::CustomWeld> m_xWndPreview;
73 void Init();
74 void UpdateChecks(const SwTableAutoFormat&, bool bEnableBtn);
76 DECL_LINK(BtnHdl, weld::Toggleable&, void);
77 DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
78 DECL_LINK(RepeatHeaderCheckBoxHdl, weld::Toggleable&, void);
79 DECL_LINK(CheckHdl, weld::Toggleable&, void);
80 DECL_LINK(SelFormatHdl, weld::TreeView&, void);
82 public:
83 SwConvertTableDlg(SwView& rView, bool bToTable);
85 void GetValues(sal_Unicode& rDelim, SwInsertTableOptions& rInsTableOpts,
86 SwTableAutoFormat const*& prTAFormat);
88 std::unique_ptr<SwTableAutoFormat> FillAutoFormatOfIndex() const;
90 virtual ~SwConvertTableDlg() override;
93 #endif
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */