1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include "tphfedit.hxx"
23 #include <sfx2/tabdlg.hxx>
24 #include <vcl/customweld.hxx>
25 #include <vcl/weld.hxx>
38 ePageExtFileNameEntry
,
47 class ScHFEditPage
: public SfxTabPage
50 virtual bool FillItemSet ( SfxItemSet
* rCoreSet
) override
;
51 virtual void Reset ( const SfxItemSet
* rCoreSet
) override
;
53 void SetNumType(SvxNumType eNumType
);
54 void ClearTextAreas();
57 ScHFEditPage( weld::Container
* pPage
, weld::DialogController
* pController
,
58 const SfxItemSet
& rCoreSet
,
59 TypedWhichId
<ScPageHFItem
> nWhich
,
61 virtual ~ScHFEditPage() override
;
64 TypedWhichId
<ScPageHFItem
> nWhich
;
65 bool m_bDropDownActive
;
66 sal_Int64 m_nTimeToggled
;
68 std::unique_ptr
<weld::Label
> m_xFtDefinedHF
;
69 std::unique_ptr
<weld::ComboBox
> m_xLbDefined
;
70 std::unique_ptr
<weld::Label
> m_xFtCustomHF
;
71 std::unique_ptr
<weld::Button
> m_xBtnText
;
72 std::unique_ptr
<weld::MenuButton
> m_xBtnFile
;
73 std::unique_ptr
<weld::Button
> m_xBtnTable
;
74 std::unique_ptr
<weld::Button
> m_xBtnPage
;
75 std::unique_ptr
<weld::Button
> m_xBtnLastPage
;
76 std::unique_ptr
<weld::Button
> m_xBtnDate
;
77 std::unique_ptr
<weld::Button
> m_xBtnTime
;
79 std::unique_ptr
<weld::Label
> m_xFtConfidential
;
80 std::unique_ptr
<weld::Label
> m_xFtPage
;
81 std::unique_ptr
<weld::Label
> m_xFtOfQuestion
;
82 std::unique_ptr
<weld::Label
> m_xFtOf
;
83 std::unique_ptr
<weld::Label
> m_xFtNone
;
84 std::unique_ptr
<weld::Label
> m_xFtCreatedBy
;
85 std::unique_ptr
<weld::Label
> m_xFtCustomized
;
87 std::unique_ptr
<weld::Widget
> m_xLeft
;
88 std::unique_ptr
<weld::Widget
> m_xRight
;
90 std::unique_ptr
<ScEditWindow
> m_xWndLeft
;
91 std::unique_ptr
<ScEditWindow
> m_xWndCenter
;
92 std::unique_ptr
<ScEditWindow
> m_xWndRight
;
93 std::unique_ptr
<weld::CustomWeld
> m_xWndLeftWnd
;
94 std::unique_ptr
<weld::CustomWeld
> m_xWndCenterWnd
;
95 std::unique_ptr
<weld::CustomWeld
> m_xWndRightWnd
;
97 ScEditWindow
* m_pEditFocus
; ///one of m_pWndLeft, m_pWndCenter, m_pWndRight
99 DECL_LINK( ObjectSelectHdl
, ScEditWindow
&, void );
102 void InitPreDefinedList();
103 void ProcessDefinedListSel(ScHFEntryId eSel
, bool bTravelling
);
104 void InsertToDefinedList();
105 void RemoveFromDefinedList();
106 void SetSelectDefinedList();
107 bool IsPageEntry(EditEngine
*pEngine
, const EditTextObject
* pTextObj
);
108 static bool IsDateEntry(const EditTextObject
* pTextObj
);
109 static bool IsExtFileNameEntry(const EditTextObject
* pTextObj
);
110 DECL_LINK( ListHdl_Impl
, weld::ComboBox
&, void);
111 DECL_LINK( ListToggleHdl_Impl
, weld::ComboBox
&, void);
112 DECL_LINK( ClickHdl
, weld::Button
&, void );
113 DECL_LINK( MenuHdl
, const OUString
&, void );
116 class ScFirstHeaderEditPage
: public ScHFEditPage
119 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rCoreSet
);
120 ScFirstHeaderEditPage( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
123 class ScRightHeaderEditPage
: public ScHFEditPage
126 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rCoreSet
);
127 ScRightHeaderEditPage( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
130 class ScLeftHeaderEditPage
: public ScHFEditPage
133 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rCoreSet
);
134 ScLeftHeaderEditPage( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
137 class ScFirstFooterEditPage
: public ScHFEditPage
140 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rCoreSet
);
141 ScFirstFooterEditPage( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
144 class ScRightFooterEditPage
: public ScHFEditPage
147 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rCoreSet
);
148 ScRightFooterEditPage( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
151 class ScLeftFooterEditPage
: public ScHFEditPage
154 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rCoreSet
);
155 ScLeftFooterEditPage( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */