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#pragma once
21
22#include <global.hxx>
23#include "anyrefdg.hxx"
24
25class ScViewData;
26class ScDocument;
27class ScRangeUtil;
28class ScAreaData;
29
31{
32public:
34 const SfxItemSet& rArgSet);
35 virtual ~ScConsolidateDlg() override;
36
37 virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
38
39 virtual bool IsRefInputMode() const override { return true; }
40 virtual void SetActive() override;
41
42 virtual void Close() override;
43 virtual void Deactivate() override;
44
45private:
46 OUString aStrUndefined;
47
51 std::unique_ptr<ScAreaData[]> pAreaData;
53 sal_uInt16 nWhichCons;
55
57
58 std::unique_ptr<weld::ComboBox> m_xLbFunc;
59 std::unique_ptr<weld::TreeView> m_xLbConsAreas;
60
61 std::unique_ptr<weld::ComboBox> m_xLbDataArea;
62 std::unique_ptr<formula::RefEdit> m_xEdDataArea;
63 std::unique_ptr<formula::RefButton> m_xRbDataArea;
64
65 std::unique_ptr<weld::ComboBox> m_xLbDestArea;
66 std::unique_ptr<formula::RefEdit> m_xEdDestArea;
67 std::unique_ptr<formula::RefButton> m_xRbDestArea;
68
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 ();
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: */
std::unique_ptr< weld::ComboBox > m_xLbDataArea
Definition: consdlg.hxx:61
std::unique_ptr< weld::CheckButton > m_xBtnRefs
Definition: consdlg.hxx:72
void FillAreaLists()
Definition: consdlg.cxx:208
virtual void Deactivate() override
Definition: consdlg.cxx:277
DECL_LINK(ModifyHdl, formula::RefEdit &, void)
ScDocument & rDoc
Definition: consdlg.hxx:50
bool bDlgLostFocus
Definition: consdlg.hxx:54
std::unique_ptr< ScAreaData[]> pAreaData
Definition: consdlg.hxx:51
DECL_LINK(GetFocusHdl, weld::Widget &, void)
static sal_Int32 FuncToLbPos(ScSubTotalFunc eFunc)
Definition: consdlg.cxx:513
std::unique_ptr< weld::Button > m_xBtnOk
Definition: consdlg.hxx:74
virtual ~ScConsolidateDlg() override
Definition: consdlg.cxx:105
std::unique_ptr< weld::Button > m_xBtnRemove
Definition: consdlg.hxx:77
std::unique_ptr< weld::TreeView > m_xLbConsAreas
Definition: consdlg.hxx:59
std::unique_ptr< formula::RefEdit > m_xEdDestArea
Definition: consdlg.hxx:66
static ScSubTotalFunc LbPosToFunc(sal_Int32 nPos)
Definition: consdlg.cxx:493
OUString aStrUndefined
Definition: consdlg.hxx:46
DECL_LINK(ClickHdl, weld::Button &, void)
DECL_LINK(SelectTVHdl, weld::TreeView &, void)
std::unique_ptr< weld::CheckButton > m_xBtnByRow
Definition: consdlg.hxx:69
std::unique_ptr< weld::Button > m_xBtnAdd
Definition: consdlg.hxx:76
std::unique_ptr< weld::CheckButton > m_xBtnByCol
Definition: consdlg.hxx:70
DECL_LINK(OkHdl, weld::Button &, void)
std::unique_ptr< formula::RefButton > m_xRbDataArea
Definition: consdlg.hxx:63
virtual void SetActive() override
Definition: consdlg.cxx:259
virtual bool IsRefInputMode() const override
Definition: consdlg.hxx:39
ScConsolidateDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, const SfxItemSet &rArgSet)
Definition: consdlg.cxx:67
DECL_LINK(GetEditFocusHdl, formula::RefEdit &, void)
ScViewData & rViewData
Definition: consdlg.hxx:49
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
Definition: consdlg.cxx:230
DECL_LINK(SelectCBHdl, weld::ComboBox &, void)
std::unique_ptr< weld::ComboBox > m_xLbDestArea
Definition: consdlg.hxx:65
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: consdlg.hxx:75
ScConsolidateParam theConsData
Definition: consdlg.hxx:48
std::unique_ptr< weld::Label > m_xDataFT
Definition: consdlg.hxx:79
virtual void Close() override
Definition: consdlg.cxx:254
formula::RefEdit * m_pRefInputEdit
Definition: consdlg.hxx:56
std::unique_ptr< formula::RefEdit > m_xEdDataArea
Definition: consdlg.hxx:62
size_t nAreaDataCount
Definition: consdlg.hxx:52
std::unique_ptr< formula::RefButton > m_xRbDestArea
Definition: consdlg.hxx:67
std::unique_ptr< weld::Label > m_xDestFT
Definition: consdlg.hxx:80
bool VerifyEdit(formula::RefEdit *pEd)
Definition: consdlg.cxx:282
sal_uInt16 nWhichCons
Definition: consdlg.hxx:53
std::unique_ptr< weld::ComboBox > m_xLbFunc
Definition: consdlg.hxx:58
ScSubTotalFunc
Definition: global.hxx:860