Line data Source code
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 <vcl/fixed.hxx>
24 : #include <vcl/lstbox.hxx>
25 : #include <vcl/group.hxx>
26 : #include <vcl/layout.hxx>
27 : #include <vcl/morebtn.hxx>
28 : #include "global.hxx"
29 : #include "anyrefdg.hxx"
30 :
31 : class ScViewData;
32 : class ScDocument;
33 : class ScRangeUtil;
34 : class ScAreaData;
35 :
36 : class ScConsolidateDlg : public ScAnyRefDlg
37 : {
38 : public:
39 : ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
40 : const SfxItemSet& rArgSet );
41 : virtual ~ScConsolidateDlg();
42 : virtual void dispose() SAL_OVERRIDE;
43 :
44 : virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
45 :
46 0 : virtual bool IsRefInputMode() const SAL_OVERRIDE { return true; }
47 : virtual void SetActive() SAL_OVERRIDE;
48 :
49 : virtual bool Close() SAL_OVERRIDE;
50 :
51 : protected:
52 : virtual void Deactivate() SAL_OVERRIDE;
53 :
54 : private:
55 : VclPtr<ListBox> pLbFunc;
56 : VclPtr<ListBox> pLbConsAreas;
57 :
58 : VclPtr<ListBox> pLbDataArea;
59 : VclPtr<formula::RefEdit> pEdDataArea;
60 : VclPtr<formula::RefButton> pRbDataArea;
61 :
62 : VclPtr<ListBox> pLbDestArea;
63 : VclPtr<formula::RefEdit> pEdDestArea;
64 : VclPtr<formula::RefButton> pRbDestArea;
65 :
66 : VclPtr<VclExpander> pExpander;
67 : VclPtr<CheckBox> pBtnByRow;
68 : VclPtr<CheckBox> pBtnByCol;
69 :
70 : VclPtr<CheckBox> pBtnRefs;
71 :
72 : VclPtr<OKButton> pBtnOk;
73 : VclPtr<CancelButton> pBtnCancel;
74 : VclPtr<PushButton> pBtnAdd;
75 : VclPtr<PushButton> pBtnRemove;
76 :
77 : OUString aStrUndefined;
78 :
79 : ScConsolidateParam theConsData;
80 : ScViewData& rViewData;
81 : ScDocument* pDoc;
82 : ScRangeUtil* pRangeUtil;
83 : ScAreaData* pAreaData;
84 : size_t nAreaDataCount;
85 : sal_uInt16 nWhichCons;
86 :
87 : VclPtr<formula::RefEdit> pRefInputEdit;
88 : bool bDlgLostFocus;
89 :
90 : void Init ();
91 : void FillAreaLists ();
92 : bool VerifyEdit ( formula::RefEdit* pEd );
93 :
94 : DECL_LINK( OkHdl, void* );
95 : DECL_LINK( ClickHdl, PushButton* );
96 : DECL_LINK( GetFocusHdl, Control* );
97 : DECL_LINK( ModifyHdl, formula::RefEdit* );
98 : DECL_LINK( SelectHdl, ListBox* );
99 :
100 : static ScSubTotalFunc LbPosToFunc( sal_uInt16 nPos );
101 : static sal_uInt16 FuncToLbPos( ScSubTotalFunc eFunc );
102 : };
103 :
104 : #endif // INCLUDED_SC_SOURCE_UI_INC_CONSDLG_HXX
105 :
106 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|