Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef SCUI_TPHFEDIT_HXX
21 : #define SCUI_TPHFEDIT_HXX
22 :
23 : #include "tphfedit.hxx"
24 : //#include <boost/graph/graph_concepts.hpp>
25 :
26 :
27 : enum ScHFEntryId
28 : {
29 : eNoneEntry ,
30 : ePageEntry ,
31 : ePagesEntry ,
32 : eSheetEntry ,
33 : eConfidentialEntry ,
34 : eFileNamePageEntry ,
35 : eExtFileNameEntry ,
36 : ePageSheetEntry ,
37 : ePageFileNameEntry ,
38 : ePageExtFileNameEntry ,
39 : eUserNameEntry ,
40 : eCreatedByEntry ,
41 : eEntryCount
42 : };
43 :
44 : class EditTextObject;
45 : class EditEngine;
46 :
47 : class ScHFEditPage : public SfxTabPage
48 : {
49 : public:
50 : virtual bool FillItemSet ( SfxItemSet& rCoreSet ) SAL_OVERRIDE;
51 : virtual void Reset ( const SfxItemSet& rCoreSet ) SAL_OVERRIDE;
52 :
53 : void SetNumType(SvxNumType eNumType);
54 : void ClearTextAreas();
55 :
56 : protected:
57 : ScHFEditPage( Window* pParent,
58 : const SfxItemSet& rCoreSet,
59 : sal_uInt16 nWhich,
60 : bool bHeader );
61 : virtual ~ScHFEditPage();
62 :
63 : private:
64 : ScEditWindow* m_pWndLeft;
65 : ScEditWindow* m_pWndCenter;
66 : ScEditWindow* m_pWndRight;
67 : FixedText* m_pFtDefinedHF;
68 : ListBox* m_pLbDefined;
69 : FixedText* m_pFtCustomHF;
70 : PushButton* m_pBtnText;
71 : ScExtIButton* m_pBtnFile;
72 : PushButton* m_pBtnTable;
73 : PushButton* m_pBtnPage;
74 : PushButton* m_pBtnLastPage;
75 : PushButton* m_pBtnDate;
76 : PushButton* m_pBtnTime;
77 :
78 : FixedText* m_pFtConfidential;
79 : FixedText* m_pFtPage;
80 : FixedText* m_pFtOfQuestion;
81 : FixedText* m_pFtOf;
82 : FixedText* m_pFtNone;
83 : FixedText* m_pFtCreatedBy;
84 : FixedText* m_pFtCustomized;
85 :
86 : sal_uInt16 nWhich;
87 : OUString aCmdArr[6];
88 :
89 : DECL_LINK( ObjectSelectHdl, ScEditWindow* );
90 :
91 : private:
92 : void FillCmdArr();
93 : void InitPreDefinedList();
94 : void ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling = false);
95 : void InsertToDefinedList();
96 : void RemoveFromDefinedList();
97 : void SetSelectDefinedList();
98 : bool IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj);
99 : bool IsDateEntry(EditTextObject* pTextObj);
100 : bool IsExtFileNameEntry(EditTextObject* pTextObj);
101 : DECL_LINK( ListHdl_Impl, ListBox* );
102 : DECL_LINK( ClickHdl, PushButton* );
103 : DECL_LINK( MenuHdl, ScExtIButton* );
104 : };
105 :
106 0 : class ScRightHeaderEditPage : public ScHFEditPage
107 : {
108 : public:
109 : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
110 :
111 : private:
112 : ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
113 : };
114 :
115 0 : class ScLeftHeaderEditPage : public ScHFEditPage
116 : {
117 : public:
118 : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
119 :
120 : private:
121 : ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
122 : };
123 :
124 0 : class ScRightFooterEditPage : public ScHFEditPage
125 : {
126 : public:
127 : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
128 :
129 : private:
130 : ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet );
131 : };
132 :
133 0 : class ScLeftFooterEditPage : public ScHFEditPage
134 : {
135 : public:
136 : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
137 :
138 : private:
139 : ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet );
140 : };
141 :
142 : #endif
143 :
144 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|