fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / inc / namedefdlg.hxx
blobacdb9ed31e52e8398d8973f084c14f228646fef1
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 #ifndef INCLUDED_SC_SOURCE_UI_INC_NAMEDEFDLG_HXX
11 #define INCLUDED_SC_SOURCE_UI_INC_NAMEDEFDLG_HXX
13 #include "anyrefdg.hxx"
14 #include <vcl/button.hxx>
15 #include <vcl/fixed.hxx>
16 #include <vcl/edit.hxx>
17 #include <vcl/lstbox.hxx>
19 #include <map>
21 class ScRangeName;
22 class ScDocument;
23 class ScDocShell;
24 class ScViewData;
26 class ScNameDefDlg : public ScAnyRefDlg
28 private:
29 VclPtr<Edit> m_pEdName;
31 VclPtr<formula::RefEdit> m_pEdRange;
32 VclPtr<formula::RefButton> m_pRbRange;
34 VclPtr<ListBox> m_pLbScope;
36 VclPtr<CheckBox> m_pBtnRowHeader;
37 VclPtr<CheckBox> m_pBtnColHeader;
38 VclPtr<CheckBox> m_pBtnPrintArea;
39 VclPtr<CheckBox> m_pBtnCriteria;
41 VclPtr<PushButton> m_pBtnAdd;
42 VclPtr<PushButton> m_pBtnCancel;
43 VclPtr<FixedText> m_pFtInfo;
45 bool mbUndo; //if true we need to add an undo action after creating a range name
46 ScDocument* mpDoc;
47 ScDocShell* mpDocShell;
49 ScAddress maCursorPos;
50 OUString maStrInfoDefault;
51 const OUString maGlobalNameStr;
52 const OUString maErrInvalidNameStr;
53 const OUString maErrNameInUse;
55 //hack to call this dialog from Manage Names
56 OUString maName;
57 OUString maScope;
59 std::map<OUString, ScRangeName*> maRangeMap;
61 void CancelPushed();
62 void AddPushed();
64 bool IsNameValid();
65 bool IsFormulaValid();
67 DECL_LINK( CancelBtnHdl, void * );
68 DECL_LINK( AddBtnHdl, void* );
69 DECL_LINK( NameModifyHdl, void* );
70 DECL_LINK( AssignGetFocusHdl, void * );
72 protected:
73 virtual void RefInputDone( bool bForced = false ) SAL_OVERRIDE;
75 public:
76 ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
77 ScViewData* pViewData, const std::map<OUString, ScRangeName*>& aRangeMap,
78 const ScAddress& aCursorPos, const bool bUndo);
80 virtual ~ScNameDefDlg();
81 virtual void dispose() SAL_OVERRIDE;
83 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
84 virtual bool IsRefInputMode() const SAL_OVERRIDE;
86 virtual void SetActive() SAL_OVERRIDE;
87 virtual bool Close() SAL_OVERRIDE;
89 void GetNewData( OUString& rName, OUString& rScope );
92 #endif
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */