LibreOffice Module sc (master)  1
scuitphfedit.hxx
Go to the documentation of this file.
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 INCLUDED_SC_SOURCE_UI_INC_SCUITPHFEDIT_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_SCUITPHFEDIT_HXX
22 
23 #include "tphfedit.hxx"
24 #include <vcl/customweld.hxx>
25 #include <vcl/weld.hxx>
26 
28 {
42 };
43 
44 class EditTextObject;
45 class EditEngine;
46 
47 class ScHFEditPage : public SfxTabPage
48 {
49 public:
50  virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override;
51  virtual void Reset ( const SfxItemSet* rCoreSet ) override;
52 
53  void SetNumType(SvxNumType eNumType);
54  void ClearTextAreas();
55 
56 protected:
58  const SfxItemSet& rCoreSet,
59  sal_uInt16 nWhich,
60  bool bHeader );
61  virtual ~ScHFEditPage() override;
62 
63 private:
64  sal_uInt16 nWhich;
66  sal_Int64 m_nTimeToggled;
67 
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;
78 
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;
86 
87  std::unique_ptr<weld::Widget> m_xLeft;
88  std::unique_ptr<weld::Widget> m_xRight;
89 
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;
96 
98 
99  DECL_LINK( ObjectSelectHdl, ScEditWindow&, void );
100 
101 private:
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 OString&, void );
114 };
115 
117 {
118 public:
119  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet );
120  ScRightHeaderEditPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
121 };
122 
124 {
125 public:
126  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet );
127  ScLeftHeaderEditPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
128 };
129 
131 {
132 public:
133  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet );
134  ScRightFooterEditPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
135 };
136 
138 {
139 public:
140  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet );
141  ScLeftFooterEditPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
142 };
143 
144 #endif
145 
146 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::CustomWeld > m_xWndRightWnd
std::unique_ptr< weld::Label > m_xFtPage
std::unique_ptr< weld::Widget > m_xRight
bool IsPageEntry(EditEngine *pEngine, const EditTextObject *pTextObj)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
std::unique_ptr< weld::MenuButton > m_xBtnFile
std::unique_ptr< weld::ComboBox > m_xLbDefined
void ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
bool m_bDropDownActive
std::unique_ptr< weld::Label > m_xFtConfidential
std::unique_ptr< weld::Button > m_xBtnText
SvxNumType
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
void SetSelectDefinedList()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
std::unique_ptr< weld::Label > m_xFtNone
std::unique_ptr< weld::Label > m_xFtOfQuestion
std::unique_ptr< weld::CustomWeld > m_xWndCenterWnd
virtual void Reset(const SfxItemSet *rCoreSet) override
virtual bool FillItemSet(SfxItemSet *rCoreSet) override
DECL_LINK(ObjectSelectHdl, ScEditWindow &, void)
one of m_pWndLeft, m_pWndCenter, m_pWndRight
std::unique_ptr< weld::CustomWeld > m_xWndLeftWnd
ScHFEditPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreSet, sal_uInt16 nWhich, bool bHeader)
void InitPreDefinedList()
std::unique_ptr< ScEditWindow > m_xWndCenter
sal_uInt16 nWhich
std::unique_ptr< weld::Button > m_xBtnTime
ScEditWindow * m_pEditFocus
std::unique_ptr< weld::Button > m_xBtnPage
void InsertToDefinedList()
std::unique_ptr< weld::Label > m_xFtOf
std::unique_ptr< weld::Widget > m_xLeft
std::unique_ptr< weld::Button > m_xBtnTable
std::unique_ptr< weld::Label > m_xFtCreatedBy
virtual ~ScHFEditPage() override
ScLeftFooterEditPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
std::unique_ptr< weld::Label > m_xFtCustomized
std::unique_ptr< weld::Button > m_xBtnLastPage
ScRightFooterEditPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
void SetNumType(SvxNumType eNumType)
ScHFEntryId
std::unique_ptr< ScEditWindow > m_xWndLeft
std::unique_ptr< weld::Label > m_xFtCustomHF
ScRightHeaderEditPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
void ClearTextAreas()
static bool IsDateEntry(const EditTextObject *pTextObj)
std::unique_ptr< weld::Button > m_xBtnDate
sal_Int64 m_nTimeToggled
std::unique_ptr< weld::Label > m_xFtDefinedHF
void RemoveFromDefinedList()
ScLeftHeaderEditPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
static bool IsExtFileNameEntry(const EditTextObject *pTextObj)
std::unique_ptr< ScEditWindow > m_xWndRight