Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef SC_CONSDLG_HXX
30 : : #define SC_CONSDLG_HXX
31 : :
32 : : #include <vcl/fixed.hxx>
33 : : #include <vcl/lstbox.hxx>
34 : : #include <vcl/group.hxx>
35 : : #include <vcl/morebtn.hxx>
36 : : #include "global.hxx"
37 : : #include "anyrefdg.hxx"
38 : :
39 : : class ScViewData;
40 : : class ScDocument;
41 : : class ScRangeUtil;
42 : : class ScAreaData;
43 : :
44 : :
45 : : //============================================================================
46 : :
47 : : class ScConsolidateDlg : public ScAnyRefDlg
48 : : {
49 : : public:
50 : : ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
51 : : const SfxItemSet& rArgSet );
52 : : ~ScConsolidateDlg();
53 : :
54 : : virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
55 : :
56 : 0 : virtual sal_Bool IsRefInputMode() const { return sal_True; }
57 : : virtual void SetActive();
58 : :
59 : : virtual sal_Bool Close();
60 : :
61 : : protected:
62 : : virtual void Deactivate();
63 : :
64 : : private:
65 : : FixedText aFtFunc;
66 : : ListBox aLbFunc;
67 : :
68 : : FixedText aFtConsAreas;
69 : : MultiListBox aLbConsAreas;
70 : :
71 : : ListBox aLbDataArea;
72 : : FixedText aFtDataArea;
73 : : formula::RefEdit aEdDataArea;
74 : : formula::RefButton aRbDataArea;
75 : :
76 : : ListBox aLbDestArea;
77 : : FixedText aFtDestArea;
78 : : formula::RefEdit aEdDestArea;
79 : : formula::RefButton aRbDestArea;
80 : :
81 : : FixedLine aFlConsBy;
82 : : CheckBox aBtnByRow;
83 : : CheckBox aBtnByCol;
84 : :
85 : : FixedLine aFlSep;
86 : : FixedLine aFlOptions;
87 : : CheckBox aBtnRefs;
88 : :
89 : : OKButton aBtnOk;
90 : : CancelButton aBtnCancel;
91 : : HelpButton aBtnHelp;
92 : : PushButton aBtnAdd;
93 : : PushButton aBtnRemove;
94 : : MoreButton aBtnMore;
95 : :
96 : : String aStrUndefined;
97 : :
98 : : ScConsolidateParam theConsData;
99 : : ScViewData* pViewData;
100 : : ScDocument* pDoc;
101 : : ScRangeUtil* pRangeUtil;
102 : : ScAreaData* pAreaData;
103 : : size_t nAreaDataCount;
104 : : sal_uInt16 nWhichCons;
105 : :
106 : : formula::RefEdit* pRefInputEdit;
107 : : sal_Bool bDlgLostFocus;
108 : :
109 : : #ifdef _CONSDLG_CXX
110 : : private:
111 : : void Init ();
112 : : void FillAreaLists ();
113 : : sal_Bool VerifyEdit ( formula::RefEdit* pEd );
114 : :
115 : : DECL_LINK( OkHdl, void* );
116 : : DECL_LINK( ClickHdl, PushButton* );
117 : : DECL_LINK( GetFocusHdl, Control* );
118 : : DECL_LINK( ModifyHdl, formula::RefEdit* );
119 : : DECL_LINK( SelectHdl, ListBox* );
120 : :
121 : : ScSubTotalFunc LbPosToFunc( sal_uInt16 nPos );
122 : : sal_uInt16 FuncToLbPos( ScSubTotalFunc eFunc );
123 : : #endif // _CONSDLG_CXX
124 : : };
125 : :
126 : :
127 : :
128 : : #endif // SC_CONSDLG_HXX
129 : :
130 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|