/src/libreoffice/sc/source/ui/inc/consdlg.hxx
Line | Count | Source |
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 | | |
20 | | #pragma once |
21 | | |
22 | | #include <global.hxx> |
23 | | #include "anyrefdg.hxx" |
24 | | |
25 | | class ScViewData; |
26 | | class ScDocument; |
27 | | class ScAreaData; |
28 | | |
29 | | class ScConsolidateDlg : public ScAnyRefDlgController |
30 | | { |
31 | | public: |
32 | | ScConsolidateDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, |
33 | | const SfxItemSet& rArgSet); |
34 | | virtual ~ScConsolidateDlg() override; |
35 | | |
36 | | virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override; |
37 | | |
38 | 0 | virtual bool IsRefInputMode() const override { return true; } |
39 | | virtual void SetActive() override; |
40 | | |
41 | | virtual void Close() override; |
42 | | virtual void Deactivate() override; |
43 | | |
44 | | private: |
45 | | OUString aStrUndefined; |
46 | | |
47 | | ScConsolidateParam theConsData; |
48 | | ScViewData& rViewData; |
49 | | ScDocument& rDoc; |
50 | | std::unique_ptr<ScAreaData[]> pAreaData; |
51 | | size_t nAreaDataCount; |
52 | | sal_uInt16 nWhichCons; |
53 | | bool bDlgLostFocus; |
54 | | |
55 | | formula::RefEdit* m_pRefInputEdit; |
56 | | |
57 | | std::unique_ptr<weld::ComboBox> m_xLbFunc; |
58 | | std::unique_ptr<weld::TreeView> m_xLbConsAreas; |
59 | | |
60 | | std::unique_ptr<weld::ComboBox> m_xLbDataArea; |
61 | | std::unique_ptr<formula::RefEdit> m_xEdDataArea; |
62 | | std::unique_ptr<formula::RefButton> m_xRbDataArea; |
63 | | |
64 | | std::unique_ptr<weld::ComboBox> m_xLbDestArea; |
65 | | std::unique_ptr<formula::RefEdit> m_xEdDestArea; |
66 | | std::unique_ptr<formula::RefButton> m_xRbDestArea; |
67 | | |
68 | | std::unique_ptr<weld::Expander> m_xExpander; |
69 | | std::unique_ptr<weld::CheckButton> m_xBtnByRow; |
70 | | std::unique_ptr<weld::CheckButton> m_xBtnByCol; |
71 | | |
72 | | std::unique_ptr<weld::CheckButton> m_xBtnRefs; |
73 | | |
74 | | std::unique_ptr<weld::Button> m_xBtnOk; |
75 | | std::unique_ptr<weld::Button> m_xBtnCancel; |
76 | | std::unique_ptr<weld::Button> m_xBtnAdd; |
77 | | std::unique_ptr<weld::Button> m_xBtnRemove; |
78 | | |
79 | | std::unique_ptr<weld::Label> m_xDataFT; |
80 | | std::unique_ptr<weld::Label> m_xDestFT; |
81 | | |
82 | | void Init (); |
83 | | void FillAreaLists (); |
84 | | bool VerifyEdit(formula::RefEdit* pEd); |
85 | | |
86 | | DECL_LINK( OkHdl, weld::Button&, void ); |
87 | | DECL_LINK( ClickHdl, weld::Button&, void ); |
88 | | DECL_LINK( GetFocusHdl, weld::Widget&, void ); |
89 | | DECL_LINK( GetEditFocusHdl, formula::RefEdit&, void ); |
90 | | DECL_LINK( ModifyHdl, formula::RefEdit&, void ); |
91 | | DECL_LINK( SelectTVHdl, weld::TreeView&, void ); |
92 | | DECL_LINK( SelectCBHdl, weld::ComboBox&, void ); |
93 | | |
94 | | static ScSubTotalFunc LbPosToFunc( sal_Int32 nPos ); |
95 | | static sal_Int32 FuncToLbPos( ScSubTotalFunc eFunc ); |
96 | | }; |
97 | | |
98 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |