1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 INCLUDED_SC_SOURCE_UI_INC_CRNRDLG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_CRNRDLG_HXX
23 #include "anyrefdg.hxx"
24 #include "rangelst.hxx"
25 #include <vcl/fixed.hxx>
26 #include <vcl/lstbox.hxx>
28 #include <unordered_map>
33 class ScColRowNameRangesDlg
: public ScAnyRefDlg
36 ScColRowNameRangesDlg( SfxBindings
* pB
, SfxChildWindow
* pCW
, vcl::Window
* pParent
,
37 ScViewData
* ptrViewData
);
38 virtual ~ScColRowNameRangesDlg();
39 virtual void dispose() SAL_OVERRIDE
;
41 virtual void SetReference( const ScRange
& rRef
, ScDocument
* pDoc
) SAL_OVERRIDE
;
43 virtual bool IsRefInputMode() const SAL_OVERRIDE
;
44 virtual void SetActive() SAL_OVERRIDE
;
45 virtual bool Close() SAL_OVERRIDE
;
48 VclPtr
<ListBox
> pLbRange
;
50 VclPtr
<formula::RefEdit
> pEdAssign
;
51 VclPtr
<formula::RefButton
> pRbAssign
;
52 VclPtr
<RadioButton
> pBtnColHead
;
53 VclPtr
<RadioButton
> pBtnRowHead
;
54 VclPtr
<formula::RefEdit
> pEdAssign2
;
55 VclPtr
<formula::RefButton
> pRbAssign2
;
57 VclPtr
<OKButton
> pBtnOk
;
58 VclPtr
<CancelButton
> pBtnCancel
;
59 VclPtr
<PushButton
> pBtnAdd
;
60 VclPtr
<PushButton
> pBtnRemove
;
65 ScRangePairListRef xColNameRanges
;
66 ScRangePairListRef xRowNameRanges
;
68 typedef std::unordered_map
< OUString
, ScRange
, OUStringHash
> NameRangeMap
;
69 NameRangeMap aRangeMap
;
70 ScViewData
* pViewData
;
72 VclPtr
<formula::RefEdit
> pEdActive
;
77 void UpdateRangeData ( const ScRange
& rRange
, bool bColName
);
78 void SetColRowData( const ScRange
& rLabelRange
, bool bRef
=false);
79 void AdjustColRowData( const ScRange
& rDataRange
, bool bRef
=false);
80 DECL_LINK( CancelBtnHdl
, void * );
81 DECL_LINK( OkBtnHdl
, void * );
82 DECL_LINK( AddBtnHdl
, void * );
83 DECL_LINK( RemoveBtnHdl
, void * );
84 DECL_LINK( Range1SelectHdl
, void * );
85 DECL_LINK( Range1DataModifyHdl
, void * );
86 DECL_LINK( ColClickHdl
, void * );
87 DECL_LINK( RowClickHdl
, void * );
88 DECL_LINK( Range2DataModifyHdl
, void * );
89 DECL_LINK( GetFocusHdl
, Control
* );
90 DECL_LINK( LoseFocusHdl
, void* );
93 #endif // INCLUDED_SC_SOURCE_UI_INC_CRNRDLG_HXX
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */