1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
23 #include "anyrefdg.hxx"
30 class ScConsolidateDlg
: public ScAnyRefDlgController
33 ScConsolidateDlg(SfxBindings
* pB
, SfxChildWindow
* pCW
, weld::Window
* pParent
,
34 const SfxItemSet
& rArgSet
);
35 virtual ~ScConsolidateDlg() override
;
37 virtual void SetReference( const ScRange
& rRef
, ScDocument
& rDoc
) override
;
39 virtual bool IsRefInputMode() const override
{ return true; }
40 virtual void SetActive() override
;
42 virtual void Close() override
;
43 virtual void Deactivate() override
;
46 OUString aStrUndefined
;
48 ScConsolidateParam theConsData
;
49 ScViewData
& rViewData
;
51 std::unique_ptr
<ScAreaData
[]> pAreaData
;
52 size_t nAreaDataCount
;
53 sal_uInt16 nWhichCons
;
56 formula::RefEdit
* m_pRefInputEdit
;
58 std::unique_ptr
<weld::ComboBox
> m_xLbFunc
;
59 std::unique_ptr
<weld::TreeView
> m_xLbConsAreas
;
61 std::unique_ptr
<weld::ComboBox
> m_xLbDataArea
;
62 std::unique_ptr
<formula::RefEdit
> m_xEdDataArea
;
63 std::unique_ptr
<formula::RefButton
> m_xRbDataArea
;
65 std::unique_ptr
<weld::ComboBox
> m_xLbDestArea
;
66 std::unique_ptr
<formula::RefEdit
> m_xEdDestArea
;
67 std::unique_ptr
<formula::RefButton
> m_xRbDestArea
;
69 std::unique_ptr
<weld::Expander
> m_xExpander
;
70 std::unique_ptr
<weld::CheckButton
> m_xBtnByRow
;
71 std::unique_ptr
<weld::CheckButton
> m_xBtnByCol
;
73 std::unique_ptr
<weld::CheckButton
> m_xBtnRefs
;
75 std::unique_ptr
<weld::Button
> m_xBtnOk
;
76 std::unique_ptr
<weld::Button
> m_xBtnCancel
;
77 std::unique_ptr
<weld::Button
> m_xBtnAdd
;
78 std::unique_ptr
<weld::Button
> m_xBtnRemove
;
80 std::unique_ptr
<weld::Label
> m_xDataFT
;
81 std::unique_ptr
<weld::Label
> m_xDestFT
;
84 void FillAreaLists ();
85 bool VerifyEdit(formula::RefEdit
* pEd
);
87 DECL_LINK( OkHdl
, weld::Button
&, void );
88 DECL_LINK( ClickHdl
, weld::Button
&, void );
89 DECL_LINK( GetFocusHdl
, weld::Widget
&, void );
90 DECL_LINK( GetEditFocusHdl
, formula::RefEdit
&, void );
91 DECL_LINK( ModifyHdl
, formula::RefEdit
&, void );
92 DECL_LINK( SelectTVHdl
, weld::TreeView
&, void );
93 DECL_LINK( SelectCBHdl
, weld::ComboBox
&, void );
95 static ScSubTotalFunc
LbPosToFunc( sal_Int32 nPos
);
96 static sal_Int32
FuncToLbPos( ScSubTotalFunc eFunc
);
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */