Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / sc / source / ui / inc / dbnamdlg.hxx
blob0a053c11294208a92b2432fb3f5bdfb203d48bb2
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>
25 #include <vcl/combobox.hxx>
26 #include <vcl/fixed.hxx>
27 #include <vcl/layout.hxx>
29 #include "anyrefdg.hxx"
30 #include "dbdata.hxx"
32 class ScViewData;
33 class ScDocument;
35 class ScDbNameDlg : public ScAnyRefDlg
37 public:
38 ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
39 ScViewData* ptrViewData );
40 virtual ~ScDbNameDlg();
41 virtual void dispose() override;
43 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override;
45 virtual bool IsRefInputMode() const override;
46 virtual void SetActive() override;
47 virtual bool Close() override;
49 private:
50 VclPtr<ComboBox> m_pEdName;
52 VclPtr<VclFrame> m_pAssignFrame;
53 VclPtr<formula::RefEdit> m_pEdAssign;
54 VclPtr<formula::RefButton> m_pRbAssign;
56 VclPtr<VclContainer> m_pOptions;
57 VclPtr<CheckBox> m_pBtnHeader;
58 VclPtr<CheckBox> m_pBtnTotals;
59 VclPtr<CheckBox> m_pBtnDoSize;
60 VclPtr<CheckBox> m_pBtnKeepFmt;
61 VclPtr<CheckBox> m_pBtnStripData;
62 VclPtr<FixedText> m_pFTSource;
63 VclPtr<FixedText> m_pFTOperations;
65 VclPtr<OKButton> m_pBtnOk;
66 VclPtr<CancelButton> m_pBtnCancel;
67 VclPtr<PushButton> m_pBtnAdd;
68 VclPtr<PushButton> m_pBtnRemove;
70 bool bSaved;
72 OUString aStrAdd;
73 OUString aStrModify;
74 OUString aStrInvalid;
76 OUString aStrSource;
77 OUString aStrOperations;
79 ScViewData* pViewData;
80 ScDocument* pDoc;
81 bool bRefInputMode;
82 ScAddress::Details aAddrDetails;
84 ScDBCollection aLocalDbCol;
85 ScRange theCurArea;
86 std::vector<ScRange> aRemoveList;
88 private:
89 void Init();
90 void UpdateNames();
91 void UpdateDBData( const OUString& rStrName );
92 void SetInfoStrings( const ScDBData* pDBData );
94 DECL_LINK_TYPED( CancelBtnHdl, Button*, void );
95 DECL_LINK_TYPED( OkBtnHdl, Button*, void );
96 DECL_LINK_TYPED( AddBtnHdl, Button*, void );
97 DECL_LINK_TYPED( RemoveBtnHdl, Button*, void );
98 DECL_LINK_TYPED( NameModifyHdl, Edit&, void );
99 DECL_LINK_TYPED( AssModifyHdl, Edit&, void );
102 #endif // INCLUDED_SC_SOURCE_UI_INC_DBNAMDLG_HXX
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */