1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: crnrdlg.hxx,v $
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_CRNRDLG_HXX
32 #define SC_CRNRDLG_HXX
34 #include "anyrefdg.hxx"
35 #include "rangelst.hxx"
36 #include <vcl/fixed.hxx>
37 #include <vcl/lstbox.hxx>
45 //============================================================================
47 class ScColRowNameRangesDlg
: public ScAnyRefDlg
50 ScColRowNameRangesDlg( SfxBindings
* pB
, SfxChildWindow
* pCW
, Window
* pParent
,
51 ScViewData
* ptrViewData
);
52 ~ScColRowNameRangesDlg();
54 virtual void SetReference( const ScRange
& rRef
, ScDocument
* pDoc
);
56 virtual BOOL
IsRefInputMode() const;
57 virtual void SetActive();
64 formula::RefEdit aEdAssign
;
65 formula::RefButton aRbAssign
;
66 RadioButton aBtnColHead
;
67 RadioButton aBtnRowHead
;
69 formula::RefEdit aEdAssign2
;
70 formula::RefButton aRbAssign2
;
73 CancelButton aBtnCancel
;
76 PushButton aBtnRemove
;
81 ScRangePairListRef xColNameRanges
;
82 ScRangePairListRef xRowNameRanges
;
84 typedef ::std::hash_map
< String
, ScRange
, ScStringHashCode
, ::std::equal_to
<String
> > NameRangeMap
;
85 NameRangeMap aRangeMap
;
86 ScViewData
* pViewData
;
88 formula::RefEdit
* pEdActive
;
95 void UpdateRangeData ( const ScRange
& rRange
, BOOL bColName
);
96 void SetColRowData( const ScRange
& rLabelRange
,BOOL bRef
=FALSE
);
97 void AdjustColRowData( const ScRange
& rDataRange
,BOOL bRef
=FALSE
);
98 DECL_LINK( CancelBtnHdl
, void * );
99 DECL_LINK( OkBtnHdl
, void * );
100 DECL_LINK( AddBtnHdl
, void * );
101 DECL_LINK( RemoveBtnHdl
, void * );
102 DECL_LINK( Range1SelectHdl
, void * );
103 DECL_LINK( Range1DataModifyHdl
, void * );
104 DECL_LINK( ColClickHdl
, void * );
105 DECL_LINK( RowClickHdl
, void * );
106 DECL_LINK( Range2DataModifyHdl
, void * );
107 DECL_LINK( GetFocusHdl
, Control
* );
108 DECL_LINK( LoseFocusHdl
, Control
* );
114 #endif // SC_CRNRDLG_HXX