Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / dbnamdlg.hxx
blob65350a7f42d9ab415e50d01996e1c07cbb83fece
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 SC_DBNAMDLG_HXX
21 #define SC_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"
31 #include "expftext.hxx"
33 class ScViewData;
34 class ScDocument;
37 //============================================================================
39 class ScDbNameDlg : public ScAnyRefDlg
41 public:
42 ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
43 ScViewData* ptrViewData );
44 ~ScDbNameDlg();
46 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
48 virtual sal_Bool IsRefInputMode() const;
49 virtual void SetActive();
50 virtual sal_Bool Close();
52 private:
53 ComboBox* m_pEdName;
55 VclFrame* m_pAssignFrame;
56 formula::RefEdit* m_pEdAssign;
57 formula::RefButton* m_pRbAssign;
59 VclContainer* m_pOptions;
60 CheckBox* m_pBtnHeader;
61 CheckBox* m_pBtnDoSize;
62 CheckBox* m_pBtnKeepFmt;
63 CheckBox* m_pBtnStripData;
64 FixedText* m_pFTSource;
65 FixedText* m_pFTOperations;
67 OKButton* m_pBtnOk;
68 CancelButton* m_pBtnCancel;
69 PushButton* m_pBtnAdd;
70 PushButton* m_pBtnRemove;
72 sal_Bool bSaved;
74 OUString aStrAdd;
75 OUString aStrModify;
76 OUString aStrInvalid;
78 OUString aStrSource;
79 OUString aStrOperations;
81 ScViewData* pViewData;
82 ScDocument* pDoc;
83 sal_Bool bRefInputMode;
84 ScAddress::Details aAddrDetails;
86 ScDBCollection aLocalDbCol;
87 ScRange theCurArea;
88 std::vector<ScRange> aRemoveList;
90 private:
91 void Init();
92 void UpdateNames();
93 void UpdateDBData( const OUString& rStrName );
94 void SetInfoStrings( const ScDBData* pDBData );
96 DECL_LINK( CancelBtnHdl, void * );
97 DECL_LINK( OkBtnHdl, void * );
98 DECL_LINK( AddBtnHdl, void * );
99 DECL_LINK( RemoveBtnHdl, void * );
100 DECL_LINK( NameModifyHdl, void * );
101 DECL_LINK( AssModifyHdl, void * );
106 #endif // SC_DBNAMDLG_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */