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 SC_CONSDLG_HXX
21 : #define SC_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 :
37 : class ScConsolidateDlg : public ScAnyRefDlg
38 : {
39 : public:
40 : ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
41 : const SfxItemSet& rArgSet );
42 : virtual ~ScConsolidateDlg();
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 : ListBox* pLbFunc;
56 : ListBox* pLbConsAreas;
57 :
58 : ListBox* pLbDataArea;
59 : formula::RefEdit* pEdDataArea;
60 : formula::RefButton* pRbDataArea;
61 :
62 : ListBox* pLbDestArea;
63 : formula::RefEdit* pEdDestArea;
64 : formula::RefButton* pRbDestArea;
65 :
66 : VclExpander* pExpander;
67 : CheckBox* pBtnByRow;
68 : CheckBox* pBtnByCol;
69 :
70 : CheckBox* pBtnRefs;
71 :
72 : OKButton* pBtnOk;
73 : CancelButton* pBtnCancel;
74 : PushButton* pBtnAdd;
75 : PushButton* pBtnRemove;
76 :
77 : OUString aStrUndefined;
78 :
79 : ScConsolidateParam theConsData;
80 : ScViewData* pViewData;
81 : ScDocument* pDoc;
82 : ScRangeUtil* pRangeUtil;
83 : ScAreaData* pAreaData;
84 : size_t nAreaDataCount;
85 : sal_uInt16 nWhichCons;
86 :
87 : formula::RefEdit* pRefInputEdit;
88 : bool bDlgLostFocus;
89 :
90 : #ifdef _CONSDLG_CXX
91 : private:
92 : void Init ();
93 : void FillAreaLists ();
94 : bool VerifyEdit ( formula::RefEdit* pEd );
95 :
96 : DECL_LINK( OkHdl, void* );
97 : DECL_LINK( ClickHdl, PushButton* );
98 : DECL_LINK( GetFocusHdl, Control* );
99 : DECL_LINK( ModifyHdl, formula::RefEdit* );
100 : DECL_LINK( SelectHdl, ListBox* );
101 :
102 : ScSubTotalFunc LbPosToFunc( sal_uInt16 nPos );
103 : sal_uInt16 FuncToLbPos( ScSubTotalFunc eFunc );
104 : #endif // _CONSDLG_CXX
105 : };
106 :
107 : #endif // SC_CONSDLG_HXX
108 :
109 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|