bump product version to 4.1.6.2
[LibreOffice.git] / sc / source / ui / inc / namedefdlg.hxx
blob6844f3e5be5a042dcab0da6c1bb5f7d7c5b40082
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/.
8 */
10 #include "anyrefdg.hxx"
11 #include <vcl/button.hxx>
12 #include <vcl/fixed.hxx>
13 #include <vcl/edit.hxx>
14 #include <vcl/lstbox.hxx>
16 #include <map>
18 class ScRangeName;
19 class ScDocument;
20 class ScDocShell;
21 class ScViewData;
23 class ScNameDefDlg : public ScAnyRefDlg
25 private:
26 Edit* m_pEdName;
28 formula::RefEdit* m_pEdRange;
29 formula::RefButton* m_pRbRange;
31 ListBox* m_pLbScope;
33 CheckBox* m_pBtnRowHeader;
34 CheckBox* m_pBtnColHeader;
35 CheckBox* m_pBtnPrintArea;
36 CheckBox* m_pBtnCriteria;
38 PushButton* m_pBtnAdd;
39 PushButton* m_pBtnCancel;
40 FixedText* m_pFtInfo;
42 bool mbUndo; //if true we need to add an undo action after creating a range name
43 ScDocument* mpDoc;
44 ScDocShell* mpDocShell;
46 ScAddress maCursorPos;
47 OUString maStrInfoDefault;
48 const OUString maGlobalNameStr;
49 const OUString maErrInvalidNameStr;
50 const OUString maErrNameInUse;
52 //hack to call this dialog from Manage Names
53 OUString maName;
54 OUString maScope;
56 std::map<OUString, ScRangeName*> maRangeMap;
58 void CancelPushed();
59 void AddPushed();
61 bool IsNameValid();
62 bool IsFormulaValid();
64 DECL_LINK( CancelBtnHdl, void * );
65 DECL_LINK( AddBtnHdl, void* );
66 DECL_LINK( NameModifyHdl, void* );
67 DECL_LINK( AssignGetFocusHdl, void * );
69 protected:
70 virtual void RefInputDone( sal_Bool bForced = sal_False );
72 public:
73 ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
74 ScViewData* pViewData, std::map<OUString, ScRangeName*> aRangeMap,
75 const ScAddress& aCursorPos, const bool bUndo);
77 virtual ~ScNameDefDlg() {};
79 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
80 virtual sal_Bool IsRefInputMode() const;
82 virtual void SetActive();
83 virtual sal_Bool Close();
85 void GetNewData( OUString& rName, OUString& rScope );
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */