Update ooo320-m1
[ooovba.git] / sc / source / ui / inc / consdlg.hxx
blob6a0cb283c7846d1aa2196c55580303e47275fac1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: consdlg.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_CONSDLG_HXX
32 #define SC_CONSDLG_HXX
34 #ifndef _FIXED_HXX //autogen
35 #include <vcl/fixed.hxx>
36 #endif
37 #ifndef _LSTBOX_HXX //autogen
38 #include <vcl/lstbox.hxx>
39 #endif
40 #ifndef _GROUP_HXX //autogen
41 #include <vcl/group.hxx>
42 #endif
43 #ifndef _MOREBTN_HXX //autogen
44 #include <vcl/morebtn.hxx>
45 #endif
46 #include "global.hxx"
47 #include "anyrefdg.hxx"
49 class ScViewData;
50 class ScDocument;
51 class ScRangeUtil;
52 class ScAreaData;
55 //============================================================================
57 class ScConsolidateDlg : public ScAnyRefDlg
59 public:
60 ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
61 const SfxItemSet& rArgSet );
62 ~ScConsolidateDlg();
64 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
66 virtual BOOL IsRefInputMode() const { return TRUE; }
67 virtual void SetActive();
69 virtual BOOL Close();
71 protected:
72 virtual void Deactivate();
74 private:
75 FixedText aFtFunc;
76 ListBox aLbFunc;
78 FixedText aFtConsAreas;
79 MultiListBox aLbConsAreas;
81 ListBox aLbDataArea;
82 FixedText aFtDataArea;
83 formula::RefEdit aEdDataArea;
84 formula::RefButton aRbDataArea;
86 ListBox aLbDestArea;
87 FixedText aFtDestArea;
88 formula::RefEdit aEdDestArea;
89 formula::RefButton aRbDestArea;
91 FixedLine aFlConsBy;
92 CheckBox aBtnByRow;
93 CheckBox aBtnByCol;
95 FixedLine aFlSep;
96 FixedLine aFlOptions;
97 CheckBox aBtnRefs;
99 OKButton aBtnOk;
100 CancelButton aBtnCancel;
101 HelpButton aBtnHelp;
102 PushButton aBtnAdd;
103 PushButton aBtnRemove;
104 MoreButton aBtnMore;
106 String aStrUndefined;
108 ScConsolidateParam theConsData;
109 ScViewData* pViewData;
110 ScDocument* pDoc;
111 ScRangeUtil* pRangeUtil;
112 ScAreaData* pAreaData;
113 USHORT nAreaDataCount;
114 USHORT nWhichCons;
116 formula::RefEdit* pRefInputEdit;
117 BOOL bDlgLostFocus;
119 #ifdef _CONSDLG_CXX
120 private:
121 void Init ();
122 void FillAreaLists ();
123 BOOL VerifyEdit ( formula::RefEdit* pEd );
125 DECL_LINK( OkHdl, void* );
126 DECL_LINK( ClickHdl, PushButton* );
127 DECL_LINK( GetFocusHdl, Control* );
128 DECL_LINK( ModifyHdl, formula::RefEdit* );
129 DECL_LINK( SelectHdl, ListBox* );
131 ScSubTotalFunc LbPosToFunc( USHORT nPos );
132 USHORT FuncToLbPos( ScSubTotalFunc eFunc );
133 #endif // _CONSDLG_CXX
138 #endif // SC_CONSDLG_HXX