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