Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / ui / inc / dbnamdlg.hxx
blob0f1ad2d7b901f6a40975b2bd61e9b7eed551cc7c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_DBNAMDLG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_DBNAMDLG_HXX
23 #include <vector>
24 #include "anyrefdg.hxx"
25 #include <dbdata.hxx>
27 class ScViewData;
28 class ScDocument;
30 class ScDbNameDlg : public ScAnyRefDlgController
32 public:
33 ScDbNameDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
34 ScViewData* ptrViewData);
35 virtual ~ScDbNameDlg() override;
37 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override;
39 virtual bool IsRefInputMode() const override;
40 virtual void SetActive() override;
41 virtual void Close() override;
43 private:
44 bool bSaved;
46 OUString aStrAdd;
47 OUString aStrModify;
48 OUString aStrInvalid;
50 OUString aStrSource;
51 OUString aStrOperations;
53 ScViewData* pViewData;
54 ScDocument* const pDoc;
55 bool bRefInputMode;
56 ScAddress::Details const aAddrDetails;
58 ScDBCollection aLocalDbCol;
59 ScRange theCurArea;
60 std::vector<ScRange> aRemoveList;
62 std::unique_ptr<weld::EntryTreeView> m_xEdName;
64 std::unique_ptr<weld::Frame> m_xAssignFrame;
65 std::unique_ptr<formula::RefEdit> m_xEdAssign;
66 std::unique_ptr<formula::RefButton> m_xRbAssign;
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;
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;
82 std::unique_ptr<weld::Button> m_xModifyPB;
83 std::unique_ptr<weld::Label> m_xInvalidFT;
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 );
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 );
101 #endif // INCLUDED_SC_SOURCE_UI_INC_DBNAMDLG_HXX
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */