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