Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / crnrdlg.hxx
blobdd1077ba45e22ccdca8c9387051461f45e5484b4
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_CRNRDLG_HXX
21 #define SC_CRNRDLG_HXX
23 #include "anyrefdg.hxx"
24 #include "rangelst.hxx"
25 #include <vcl/fixed.hxx>
26 #include <vcl/lstbox.hxx>
28 #include <boost/unordered_map.hpp>
30 class ScViewData;
31 class ScDocument;
34 //============================================================================
36 class ScColRowNameRangesDlg : public ScAnyRefDlg
38 public:
39 ScColRowNameRangesDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
40 ScViewData* ptrViewData );
41 ~ScColRowNameRangesDlg();
43 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
45 virtual sal_Bool IsRefInputMode() const;
46 virtual void SetActive();
47 virtual sal_Bool Close();
49 private:
50 ListBox* pLbRange;
52 formula::RefEdit* pEdAssign;
53 formula::RefButton* pRbAssign;
54 RadioButton* pBtnColHead;
55 RadioButton* pBtnRowHead;
56 formula::RefEdit* pEdAssign2;
57 formula::RefButton* pRbAssign2;
59 OKButton* pBtnOk;
60 CancelButton* pBtnCancel;
61 PushButton* pBtnAdd;
62 PushButton* pBtnRemove;
64 ScRange theCurArea;
65 ScRange theCurData;
67 ScRangePairListRef xColNameRanges;
68 ScRangePairListRef xRowNameRanges;
70 typedef ::boost::unordered_map< OUString, ScRange, OUStringHash > NameRangeMap;
71 NameRangeMap aRangeMap;
72 ScViewData* pViewData;
73 ScDocument* pDoc;
74 formula::RefEdit* pEdActive;
75 sal_Bool bDlgLostFocus;
77 #ifdef _CRNRDLG_CXX
78 private:
79 void Init ();
80 void UpdateNames ();
81 void UpdateRangeData ( const ScRange& rRange, sal_Bool bColName );
82 void SetColRowData( const ScRange& rLabelRange,sal_Bool bRef=false);
83 void AdjustColRowData( const ScRange& rDataRange,sal_Bool bRef=false);
84 DECL_LINK( CancelBtnHdl, void * );
85 DECL_LINK( OkBtnHdl, void * );
86 DECL_LINK( AddBtnHdl, void * );
87 DECL_LINK( RemoveBtnHdl, void * );
88 DECL_LINK( Range1SelectHdl, void * );
89 DECL_LINK( Range1DataModifyHdl, void * );
90 DECL_LINK( ColClickHdl, void * );
91 DECL_LINK( RowClickHdl, void * );
92 DECL_LINK( Range2DataModifyHdl, void * );
93 DECL_LINK( GetFocusHdl, Control* );
94 DECL_LINK( LoseFocusHdl, void* );
95 #endif
100 #endif // SC_CRNRDLG_HXX
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */