LibreOffice Module sc (master)  1
dbnamdlg.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 #ifndef INCLUDED_SC_SOURCE_UI_INC_DBNAMDLG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_DBNAMDLG_HXX
22 
23 #include <vector>
24 #include "anyrefdg.hxx"
25 #include <dbdata.hxx>
26 
27 class ScViewData;
28 class ScDocument;
29 
31 {
32 public:
34  ScViewData& rViewData);
35  virtual ~ScDbNameDlg() 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 
43 private:
44  bool bSaved;
45 
46  OUString aStrAdd;
47  OUString aStrModify;
48  OUString aStrInvalid;
49 
50  OUString aStrSource;
51  OUString aStrOperations;
52 
54  const ScDocument& rDoc;
57 
60  std::vector<ScRange> aRemoveList;
61 
62  std::unique_ptr<weld::EntryTreeView> m_xEdName;
63 
64  std::unique_ptr<weld::Frame> m_xAssignFrame;
65  std::unique_ptr<formula::RefEdit> m_xEdAssign;
66  std::unique_ptr<formula::RefButton> m_xRbAssign;
67 
68  std::unique_ptr<weld::Widget> m_xOptions;
69  std::unique_ptr<weld::CheckButton> m_xBtnHeader;
70  std::unique_ptr<weld::CheckButton> m_xBtnTotals;
71  std::unique_ptr<weld::CheckButton> m_xBtnDoSize;
72  std::unique_ptr<weld::CheckButton> m_xBtnKeepFmt;
73  std::unique_ptr<weld::CheckButton> m_xBtnStripData;
74  std::unique_ptr<weld::Label> m_xFTSource;
75  std::unique_ptr<weld::Label> m_xFTOperations;
76 
77  std::unique_ptr<weld::Button> m_xBtnOk;
78  std::unique_ptr<weld::Button> m_xBtnCancel;
79  std::unique_ptr<weld::Button> m_xBtnAdd;
80  std::unique_ptr<weld::Button> m_xBtnRemove;
81 
82  std::unique_ptr<weld::Button> m_xModifyPB;
83  std::unique_ptr<weld::Label> m_xInvalidFT;
84 
85  std::unique_ptr<weld::Label> m_xFrameLabel;
86  std::unique_ptr<weld::Expander> m_xExpander;
87 private:
88  void Init();
89  void UpdateNames();
90  void UpdateDBData( const OUString& rStrName );
91  void SetInfoStrings( const ScDBData* pDBData );
92 
93  DECL_LINK( CancelBtnHdl, weld::Button&, void );
94  DECL_LINK( OkBtnHdl, weld::Button&, void );
95  DECL_LINK( AddBtnHdl, weld::Button&, void );
96  DECL_LINK( RemoveBtnHdl, weld::Button&, void );
97  DECL_LINK( NameModifyHdl, weld::ComboBox&, void );
98  DECL_LINK( AssModifyHdl, formula::RefEdit&, void );
99 };
100 
101 #endif // INCLUDED_SC_SOURCE_UI_INC_DBNAMDLG_HXX
102 
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::CheckButton > m_xBtnKeepFmt
Definition: dbnamdlg.hxx:72
std::unique_ptr< weld::Button > m_xBtnAdd
Definition: dbnamdlg.hxx:79
std::unique_ptr< weld::Widget > m_xOptions
Definition: dbnamdlg.hxx:68
virtual void Close() override
Definition: dbnamdlg.cxx:295
virtual bool IsRefInputMode() const override
Definition: dbnamdlg.cxx:370
void SetInfoStrings(const ScDBData *pDBData)
Definition: dbnamdlg.cxx:254
ScRange theCurArea
Definition: dbnamdlg.hxx:59
std::unique_ptr< weld::CheckButton > m_xBtnTotals
Definition: dbnamdlg.hxx:70
bool bRefInputMode
Definition: dbnamdlg.hxx:55
ScAddress::Details aAddrDetails
Definition: dbnamdlg.hxx:56
std::unique_ptr< formula::RefEdit > m_xEdAssign
Definition: dbnamdlg.hxx:65
OUString aStrAdd
Definition: dbnamdlg.hxx:46
OUString aStrOperations
Definition: dbnamdlg.hxx:51
std::unique_ptr< weld::Button > m_xBtnRemove
Definition: dbnamdlg.hxx:80
ScViewData & m_rViewData
Definition: dbnamdlg.hxx:53
void Init()
Definition: dbnamdlg.cxx:180
std::unique_ptr< weld::CheckButton > m_xBtnHeader
Definition: dbnamdlg.hxx:69
std::unique_ptr< weld::Button > m_xBtnCancel
Definition: dbnamdlg.hxx:78
void UpdateDBData(const OUString &rStrName)
Definition: dbnamdlg.cxx:337
std::unique_ptr< weld::Label > m_xFTOperations
Definition: dbnamdlg.hxx:75
void UpdateNames()
Definition: dbnamdlg.cxx:311
OUString aStrInvalid
Definition: dbnamdlg.hxx:48
bool bSaved
Definition: dbnamdlg.hxx:44
const ScDocument & rDoc
Definition: dbnamdlg.hxx:54
std::unique_ptr< formula::RefButton > m_xRbAssign
Definition: dbnamdlg.hxx:66
std::unique_ptr< weld::Button > m_xModifyPB
Definition: dbnamdlg.hxx:82
ScDBCollection aLocalDbCol
Definition: dbnamdlg.hxx:58
std::unique_ptr< weld::Label > m_xFTSource
Definition: dbnamdlg.hxx:74
virtual void SetActive() override
Definition: dbnamdlg.cxx:300
std::unique_ptr< weld::Label > m_xInvalidFT
Definition: dbnamdlg.hxx:83
ScDbNameDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData)
Definition: dbnamdlg.cxx:129
std::unique_ptr< weld::CheckButton > m_xBtnStripData
Definition: dbnamdlg.hxx:73
virtual ~ScDbNameDlg() override
Definition: dbnamdlg.cxx:175
std::unique_ptr< weld::Frame > m_xAssignFrame
Definition: dbnamdlg.hxx:64
std::unique_ptr< weld::EntryTreeView > m_xEdName
Definition: dbnamdlg.hxx:62
std::unique_ptr< weld::Label > m_xFrameLabel
Definition: dbnamdlg.hxx:85
std::unique_ptr< weld::Button > m_xBtnOk
Definition: dbnamdlg.hxx:77
OUString aStrModify
Definition: dbnamdlg.hxx:47
std::unique_ptr< weld::CheckButton > m_xBtnDoSize
Definition: dbnamdlg.hxx:71
OUString aStrSource
Definition: dbnamdlg.hxx:50
DECL_LINK(CancelBtnHdl, weld::Button &, void)
std::vector< ScRange > aRemoveList
Definition: dbnamdlg.hxx:60
std::unique_ptr< weld::Expander > m_xExpander
Definition: dbnamdlg.hxx:86
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
Definition: dbnamdlg.cxx:277