update dev300-m57
[ooovba.git] / sc / source / ui / inc / scuitphfedit.hxx
blobc297d2f3afbaf0968977fef8ea7dcae4c4ca9567
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: scuitphfedit.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SCUI_TPHFEDIT_HXX
32 #define SCUI_TPHFEDIT_HXX
34 #include "tphfedit.hxx"
36 //===================================================================
37 enum ScHFEntryId
39 eNoneEntry ,
40 ePageEntry ,
41 ePagesEntry ,
42 eSheetEntry ,
43 eConfidentialEntry ,
44 eFileNamePageEntry ,
45 eExtFileNameEntry ,
46 ePageSheetEntry ,
47 ePageFileNameEntry ,
48 ePageExtFileNameEntry ,
49 eUserNameEntry ,
50 eCreatedByEntry ,
51 eEntryCount
54 class ScHeaderEditEngine;
55 class ScPatternAttr;
56 class EditView;
57 class EditTextObject;
58 class SvxFieldItem;
59 class ScAccessibleEditObject;
62 class ScHFEditPage : public SfxTabPage
64 public:
65 virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
66 virtual void Reset ( const SfxItemSet& rCoreSet );
68 void SetNumType(SvxNumType eNumType);
69 void ClearTextAreas();
71 protected:
72 ScHFEditPage( Window* pParent,
73 USHORT nResId,
74 const SfxItemSet& rCoreSet,
75 USHORT nWhich, bool bHeader );
76 virtual ~ScHFEditPage();
78 private:
79 FixedText aFtLeft;
80 ScEditWindow aWndLeft;
81 FixedText aFtCenter;
82 ScEditWindow aWndCenter;
83 FixedText aFtRight;
84 ScEditWindow aWndRight;
85 FixedText maFtDefinedHF;
86 ListBox maLbDefined;
87 FixedText maFtCustomHF;
88 ImageButton aBtnText;
89 ScExtIButton aBtnFile;
90 ImageButton aBtnTable;
91 ImageButton aBtnPage;
92 ImageButton aBtnLastPage;
93 ImageButton aBtnDate;
94 ImageButton aBtnTime;
95 FixedLine aFlInfo;
96 FixedInfo aFtInfo;
97 ScPopupMenu aPopUpFile;
99 USHORT nWhich;
100 String aCmdArr[6];
102 private:
103 #ifdef _TPHFEDIT_CXX
104 void FillCmdArr();
105 void InitPreDefinedList();
106 void ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling = false);
107 void InsertToDefinedList();
108 void RemoveFromDefinedList();
109 void SetSelectDefinedList();
110 bool IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj);
111 bool IsDateEntry(EditTextObject* pTextObj);
112 bool IsExtFileNameEntry(EditTextObject* pTextObj);
113 DECL_LINK( ListHdl_Impl, ListBox* );
114 DECL_LINK( ClickHdl, ImageButton* );
115 DECL_LINK( MenuHdl, ScExtIButton* );
116 #endif
119 //===================================================================
121 class ScRightHeaderEditPage : public ScHFEditPage
123 public:
124 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
125 static USHORT* GetRanges();
127 private:
128 ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
131 //===================================================================
133 class ScLeftHeaderEditPage : public ScHFEditPage
135 public:
136 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
137 static USHORT* GetRanges();
139 private:
140 ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
143 //===================================================================
145 class ScRightFooterEditPage : public ScHFEditPage
147 public:
148 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
149 static USHORT* GetRanges();
151 private:
152 ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet );
155 //===================================================================
157 class ScLeftFooterEditPage : public ScHFEditPage
159 public:
160 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
161 static USHORT* GetRanges();
163 private:
164 ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet );
167 #endif