xref: /aoo41x/main/sc/source/ui/inc/tphf.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_TPHF_HXX
29 #define SC_TPHF_HXX
30 
31 
32 #include <svx/hdft.hxx>
33 
34 class ScStyleDlg;
35 
36 //========================================================================
37 
38 class ScHFPage : public SvxHFPage
39 {
40 public:
41 	virtual			~ScHFPage();
42 
43 	virtual void	Reset( const SfxItemSet& rSet );
44 	virtual sal_Bool 	FillItemSet( SfxItemSet& rOutSet );
45 
46 	void			SetPageStyle( const String& rName )    { aStrPageStyle = rName; }
47 	void			SetStyleDlg ( const ScStyleDlg* pDlg ) { pStyleDlg = pDlg; }
48 
49 protected:
50 					ScHFPage( Window* pParent,
51 							  sal_uInt16 nResId,
52 							  const SfxItemSet& rSet,
53 							  sal_uInt16 nSetId );
54 
55 //    using SvxHFPage::ActivatePage;
56 //    using SvxHFPage::DeactivatePage;
57     virtual void    ActivatePage();
58     virtual void    DeactivatePage();
59 	virtual void	ActivatePage( const SfxItemSet& rSet );
60 	virtual int		DeactivatePage( SfxItemSet* pSet = 0 );
61 
62 private:
63 	PushButton			aBtnEdit;
64 	SfxItemSet			aDataSet;
65 	String				aStrPageStyle;
66 	sal_uInt16				nPageUsage;
67 	const ScStyleDlg*	pStyleDlg;
68 
69 #ifdef _TPHF_CXX
70 private:
71 	DECL_LINK( BtnHdl, PushButton* );
72 	DECL_LINK( HFEditHdl, void* );
73 	DECL_LINK( TurnOnHdl, CheckBox* );
74 #endif
75 };
76 
77 //========================================================================
78 
79 class ScHeaderPage : public ScHFPage
80 {
81 public:
82 	static SfxTabPage* 	Create(	Window* pParent, const SfxItemSet& rSet );
83 	static sal_uInt16*		GetRanges();
84 
85 private:
86 	ScHeaderPage( Window* pParent, const SfxItemSet& rSet );
87 };
88 
89 //========================================================================
90 
91 class ScFooterPage : public ScHFPage
92 {
93 public:
94 	static SfxTabPage* 	Create(	Window* pParent, const SfxItemSet& rSet );
95 	static sal_uInt16*		GetRanges();
96 
97 private:
98 	ScFooterPage( Window* pParent, const SfxItemSet& rSet );
99 };
100 
101 
102 #endif // SC_TPHF_HXX
103 
104