Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / scuitphfedit.hxx
blob40476da70a7e29693919edc9a55db9de9212010c
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef SCUI_TPHFEDIT_HXX
21 #define SCUI_TPHFEDIT_HXX
23 #include "tphfedit.hxx"
24 //#include <boost/graph/graph_concepts.hpp>
26 //===================================================================
27 enum ScHFEntryId
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
44 class EditTextObject;
47 class ScHFEditPage : public SfxTabPage
49 public:
50 virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
51 virtual void Reset ( const SfxItemSet& rCoreSet );
53 void SetNumType(SvxNumType eNumType);
54 void ClearTextAreas();
56 protected:
57 ScHFEditPage( Window* pParent,
58 const SfxItemSet& rCoreSet,
59 sal_uInt16 nWhich,
60 bool bHeader );
61 virtual ~ScHFEditPage();
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;
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;
86 sal_uInt16 nWhich;
87 OUString aCmdArr[6];
89 private:
90 #ifdef _TPHFEDIT_CXX
91 void FillCmdArr();
92 void InitPreDefinedList();
93 void ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling = false);
94 void InsertToDefinedList();
95 void RemoveFromDefinedList();
96 void SetSelectDefinedList();
97 bool IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj);
98 bool IsDateEntry(EditTextObject* pTextObj);
99 bool IsExtFileNameEntry(EditTextObject* pTextObj);
100 DECL_LINK( ListHdl_Impl, ListBox* );
101 DECL_LINK( ClickHdl, PushButton* );
102 DECL_LINK( MenuHdl, ScExtIButton* );
103 #endif
106 //===================================================================
108 class ScRightHeaderEditPage : public ScHFEditPage
110 public:
111 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
113 private:
114 ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
117 //===================================================================
119 class ScLeftHeaderEditPage : public ScHFEditPage
121 public:
122 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
124 private:
125 ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
128 //===================================================================
130 class ScRightFooterEditPage : public ScHFEditPage
132 public:
133 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
135 private:
136 ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet );
139 //===================================================================
141 class ScLeftFooterEditPage : public ScHFEditPage
143 public:
144 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
146 private:
147 ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet );
150 #endif
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */