LibreOffice Module sc (master) 1
crnrdlg.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "anyrefdg.hxx"
23#include <rangelst.hxx>
24
25#include <unordered_map>
26
27class ScViewData;
28class ScDocument;
29
31{
32public:
34 ScViewData& rViewData);
35 virtual ~ScColRowNameRangesDlg() override;
36
37 virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
38
39 virtual bool IsRefInputMode() const override;
40 virtual void SetActive() override;
41 virtual void Close() override;
42
43private:
46
49
50 typedef std::unordered_map< OUString, ScRange > NameRangeMap;
55
57 std::unique_ptr<weld::TreeView> m_xLbRange;
58
59 std::unique_ptr<formula::RefEdit> m_xEdAssign;
60 std::unique_ptr<formula::RefButton> m_xRbAssign;
61 std::unique_ptr<weld::RadioButton> m_xBtnColHead;
62 std::unique_ptr<weld::RadioButton> m_xBtnRowHead;
63 std::unique_ptr<formula::RefEdit> m_xEdAssign2;
64 std::unique_ptr<formula::RefButton> m_xRbAssign2;
65
66 std::unique_ptr<weld::Button> m_xBtnOk;
67 std::unique_ptr<weld::Button> m_xBtnCancel;
68 std::unique_ptr<weld::Button> m_xBtnAdd;
69 std::unique_ptr<weld::Button> m_xBtnRemove;
70
71 std::unique_ptr<weld::Frame> m_xRangeFrame;
72 std::unique_ptr<weld::Label> m_xRangeFT;
73 std::unique_ptr<weld::Label> m_xDataFT;
74
75 void Init ();
76 void UpdateNames ();
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, weld::Button&, void );
81 DECL_LINK( OkBtnHdl, weld::Button&, void );
82 DECL_LINK( AddBtnHdl, weld::Button&, void );
83 DECL_LINK( RemoveBtnHdl, weld::Button&, void );
84 DECL_LINK( Range1SelectHdl, weld::TreeView&, void );
85 DECL_LINK( Range1DataModifyHdl, formula::RefEdit&, void );
86 DECL_LINK( ColRowToggleHdl, weld::Toggleable&, void );
87 DECL_LINK( Range2DataModifyHdl, formula::RefEdit&, void );
88 DECL_LINK( GetEditFocusHdl, formula::RefEdit&, void );
89 DECL_LINK( LoseEditFocusHdl, formula::RefEdit&, void );
90 DECL_LINK( GetButtonFocusHdl, formula::RefButton&, void );
91 DECL_LINK( LoseButtonFocusHdl, formula::RefButton&, void );
92};
93
94/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScRangePairListRef xColNameRanges
Definition: crnrdlg.hxx:47
DECL_LINK(GetEditFocusHdl, formula::RefEdit &, void)
DECL_LINK(Range2DataModifyHdl, formula::RefEdit &, void)
DECL_LINK(LoseEditFocusHdl, formula::RefEdit &, void)
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: crnrdlg.hxx:67
std::unique_ptr< weld::Button > m_xBtnAdd
Definition: crnrdlg.hxx:68
std::unique_ptr< weld::Label > m_xRangeFT
Definition: crnrdlg.hxx:72
std::unique_ptr< weld::Button > m_xBtnRemove
Definition: crnrdlg.hxx:69
std::unique_ptr< formula::RefButton > m_xRbAssign2
Definition: crnrdlg.hxx:64
std::unique_ptr< formula::RefButton > m_xRbAssign
Definition: crnrdlg.hxx:60
DECL_LINK(AddBtnHdl, weld::Button &, void)
void UpdateRangeData(const ScRange &rRange, bool bColName)
Definition: crnrdlg.cxx:437
virtual ~ScColRowNameRangesDlg() override
Definition: crnrdlg.cxx:93
DECL_LINK(GetButtonFocusHdl, formula::RefButton &, void)
ScViewData & m_rViewData
Definition: crnrdlg.hxx:52
NameRangeMap aRangeMap
Definition: crnrdlg.hxx:51
std::unordered_map< OUString, ScRange > NameRangeMap
Definition: crnrdlg.hxx:50
DECL_LINK(LoseButtonFocusHdl, formula::RefButton &, void)
DECL_LINK(ColRowToggleHdl, weld::Toggleable &, void)
void SetColRowData(const ScRange &rLabelRange, bool bRef=false)
Definition: crnrdlg.cxx:150
std::unique_ptr< weld::Frame > m_xRangeFrame
Definition: crnrdlg.hxx:71
std::unique_ptr< weld::Label > m_xDataFT
Definition: crnrdlg.hxx:73
DECL_LINK(OkBtnHdl, weld::Button &, void)
std::unique_ptr< weld::RadioButton > m_xBtnRowHead
Definition: crnrdlg.hxx:62
DECL_LINK(Range1DataModifyHdl, formula::RefEdit &, void)
DECL_LINK(CancelBtnHdl, weld::Button &, void)
std::unique_ptr< formula::RefEdit > m_xEdAssign
Definition: crnrdlg.hxx:59
ScDocument & rDoc
Definition: crnrdlg.hxx:53
DECL_LINK(Range1SelectHdl, weld::TreeView &, void)
virtual void SetActive() override
Definition: crnrdlg.cxx:318
std::unique_ptr< weld::TreeView > m_xLbRange
Definition: crnrdlg.hxx:57
DECL_LINK(RemoveBtnHdl, weld::Button &, void)
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
Definition: crnrdlg.cxx:295
std::unique_ptr< weld::RadioButton > m_xBtnColHead
Definition: crnrdlg.hxx:61
formula::RefEdit * m_pEdActive
Definition: crnrdlg.hxx:56
ScColRowNameRangesDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData)
Definition: crnrdlg.cxx:58
void AdjustColRowData(const ScRange &rDataRange, bool bRef=false)
Definition: crnrdlg.cxx:234
ScRangePairListRef xRowNameRanges
Definition: crnrdlg.hxx:48
virtual bool IsRefInputMode() const override
Definition: crnrdlg.cxx:471
std::unique_ptr< weld::Button > m_xBtnOk
Definition: crnrdlg.hxx:66
std::unique_ptr< formula::RefEdit > m_xEdAssign2
Definition: crnrdlg.hxx:63
virtual void Close() override
Definition: crnrdlg.cxx:313