xref: /aoo41x/main/sc/source/ui/inc/areasdlg.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_AREASDLG_HXX
29 #define SC_AREASDLG_HXX
30 
31 #include "address.hxx"
32 
33 #ifndef _LSTBOX_HXX //autogen
34 #include <vcl/lstbox.hxx>
35 #endif
36 #ifndef _FIXED_HXX //autogen
37 #include <vcl/fixed.hxx>
38 #endif
39 #include <anyrefdg.hxx>
40 
41 class ScDocument;
42 class ScViewData;
43 class ScRangeUtil;
44 class ScRangeItem;
45 
46 
47 //============================================================================
48 
49 class ScPrintAreasDlg : public ScAnyRefDlg
50 {
51 public:
52 					ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent );
53 					~ScPrintAreasDlg();
54 
55 	virtual void	SetReference( const ScRange& rRef, ScDocument* pDoc );
56 	virtual void	AddRefEntry();
57 
58 	virtual sal_Bool	IsTableLocked() const;
59 
60 	virtual void	SetActive();
61 	virtual void	Deactivate();
62 	virtual sal_Bool	Close();
63 
64 private:
65 	FixedLine       aFlPrintArea;
66 	ListBox			aLbPrintArea;
67 	formula::RefEdit		aEdPrintArea;
68 	formula::RefButton		aRbPrintArea;
69 
70 	FixedLine       aFlRepeatRow;
71 	ListBox			aLbRepeatRow;
72 	formula::RefEdit		aEdRepeatRow;
73 	formula::RefButton		aRbRepeatRow;
74 
75 	FixedLine       aFlRepeatCol;
76 	ListBox			aLbRepeatCol;
77 	formula::RefEdit		aEdRepeatCol;
78 	formula::RefButton		aRbRepeatCol;
79 
80 	OKButton		aBtnOk;
81 	CancelButton	aBtnCancel;
82 	HelpButton		aBtnHelp;
83 
84 	sal_Bool			bDlgLostFocus;
85 	formula::RefEdit*		pRefInputEdit;
86 	ScDocument*		pDoc;
87 	ScViewData*		pViewData;
88 	SCTAB			nCurTab;
89 
90 #ifdef _AREASDLG_CXX
91 private:
92 	void Impl_Reset();
93 	sal_Bool Impl_CheckRefStrings();
94 	void Impl_FillLists();
95 	sal_Bool Impl_GetItem( Edit* pEd, SfxStringItem& rItem );
96 
97 	// Handler:
98 	DECL_LINK( Impl_SelectHdl,		ListBox*    );
99 	DECL_LINK( Impl_ModifyHdl,		formula::RefEdit*  );
100 	DECL_LINK( Impl_BtnHdl,    		PushButton* );
101 	DECL_LINK( Impl_GetFocusHdl,	Control*	);
102 #endif
103 };
104 
105 
106 
107 #endif
108 
109