Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / consdlg.hxx
blob4120f317d18871cf7c5e2e55c668bb2dc96237f3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef SC_CONSDLG_HXX
21 #define SC_CONSDLG_HXX
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"
31 class ScViewData;
32 class ScDocument;
33 class ScRangeUtil;
34 class ScAreaData;
37 //============================================================================
39 class ScConsolidateDlg : public ScAnyRefDlg
41 public:
42 ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
43 const SfxItemSet& rArgSet );
44 ~ScConsolidateDlg();
46 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
48 virtual sal_Bool IsRefInputMode() const { return sal_True; }
49 virtual void SetActive();
51 virtual sal_Bool Close();
53 protected:
54 virtual void Deactivate();
56 private:
57 ListBox* pLbFunc;
58 ListBox* pLbConsAreas;
60 ListBox* pLbDataArea;
61 formula::RefEdit* pEdDataArea;
62 formula::RefButton* pRbDataArea;
64 ListBox* pLbDestArea;
65 formula::RefEdit* pEdDestArea;
66 formula::RefButton* pRbDestArea;
68 VclExpander* pExpander;
69 CheckBox* pBtnByRow;
70 CheckBox* pBtnByCol;
72 CheckBox* pBtnRefs;
74 OKButton* pBtnOk;
75 CancelButton* pBtnCancel;
76 PushButton* pBtnAdd;
77 PushButton* pBtnRemove;
79 OUString aStrUndefined;
81 ScConsolidateParam theConsData;
82 ScViewData* pViewData;
83 ScDocument* pDoc;
84 ScRangeUtil* pRangeUtil;
85 ScAreaData* pAreaData;
86 size_t nAreaDataCount;
87 sal_uInt16 nWhichCons;
89 formula::RefEdit* pRefInputEdit;
90 sal_Bool bDlgLostFocus;
92 #ifdef _CONSDLG_CXX
93 private:
94 void Init ();
95 void FillAreaLists ();
96 sal_Bool VerifyEdit ( formula::RefEdit* pEd );
98 DECL_LINK( OkHdl, void* );
99 DECL_LINK( ClickHdl, PushButton* );
100 DECL_LINK( GetFocusHdl, Control* );
101 DECL_LINK( ModifyHdl, formula::RefEdit* );
102 DECL_LINK( SelectHdl, ListBox* );
104 ScSubTotalFunc LbPosToFunc( sal_uInt16 nPos );
105 sal_uInt16 FuncToLbPos( ScSubTotalFunc eFunc );
106 #endif // _CONSDLG_CXX
111 #endif // SC_CONSDLG_HXX
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */