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 <sfx2/tabdlg.hxx>
25 #include <vcl/customweld.hxx>
26 #include <vcl/weld.hxx>
27 
29 {
43 };
44 
45 class EditTextObject;
46 class EditEngine;
47 
48 class ScHFEditPage : public SfxTabPage
49 {
50 public:
51  virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override;
52  virtual void Reset ( const SfxItemSet* rCoreSet ) override;
53 
54  void SetNumType(SvxNumType eNumType);
55  void ClearTextAreas();
56 
57 protected:
59  const SfxItemSet& rCoreSet,
60  sal_uInt16 nWhich,
61  bool bHeader );
62  virtual ~ScHFEditPage() override;
63 
64 private:
65  sal_uInt16 nWhich;
67  sal_Int64 m_nTimeToggled;
68 
69  std::unique_ptr<weld::Label> m_xFtDefinedHF;
70  std::unique_ptr<weld::ComboBox> m_xLbDefined;
71  std::unique_ptr<weld::Label> m_xFtCustomHF;
72  std::unique_ptr<weld::Button> m_xBtnText;
73  std::unique_ptr<weld::MenuButton> m_xBtnFile;
74  std::unique_ptr<weld::Button> m_xBtnTable;
75  std::unique_ptr<weld::Button> m_xBtnPage;
76  std::unique_ptr<weld::Button> m_xBtnLastPage;
77  std::unique_ptr<weld::Button> m_xBtnDate;
78  std::unique_ptr<weld::Button> m_xBtnTime;
79 
80  std::unique_ptr<weld::Label> m_xFtConfidential;
81  std::unique_ptr<weld::Label> m_xFtPage;
82  std::unique_ptr<weld::Label> m_xFtOfQuestion;
83  std::unique_ptr<weld::Label> m_xFtOf;
84  std::unique_ptr<weld::Label> m_xFtNone;
85  std::unique_ptr<weld::Label> m_xFtCreatedBy;
86  std::unique_ptr<weld::Label> m_xFtCustomized;
87 
88  std::unique_ptr<weld::Widget> m_xLeft;
89  std::unique_ptr<weld::Widget> m_xRight;
90 
91  std::unique_ptr<ScEditWindow> m_xWndLeft;
92  std::unique_ptr<ScEditWindow> m_xWndCenter;
93  std::unique_ptr<ScEditWindow> m_xWndRight;
94  std::unique_ptr<weld::CustomWeld> m_xWndLeftWnd;
95  std::unique_ptr<weld::CustomWeld> m_xWndCenterWnd;
96  std::unique_ptr<weld::CustomWeld> m_xWndRightWnd;
97 
99 
100  DECL_LINK( ObjectSelectHdl, ScEditWindow&, void );
101 
102 private:
103  void InitPreDefinedList();
104  void ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling);
105  void InsertToDefinedList();
106  void RemoveFromDefinedList();
107  void SetSelectDefinedList();
108  bool IsPageEntry(EditEngine*pEngine, const EditTextObject* pTextObj);
109  static bool IsDateEntry(const EditTextObject* pTextObj);
110  static bool IsExtFileNameEntry(const EditTextObject* pTextObj);
111  DECL_LINK( ListHdl_Impl, weld::ComboBox&, void);
112  DECL_LINK( ListToggleHdl_Impl, weld::ComboBox&, void);
113  DECL_LINK( ClickHdl, weld::Button&, void );
114  DECL_LINK( MenuHdl, const OString&, void );
115 };
116 
118 {
119 public:
120  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet );
121  ScRightHeaderEditPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
122 };
123 
125 {
126 public:
127  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet );
128  ScLeftHeaderEditPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
129 };
130 
132 {
133 public:
134  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet );
135  ScRightFooterEditPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
136 };
137 
139 {
140 public:
141  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet );
142  ScLeftFooterEditPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
143 };
144 
145 #endif
146 
147 /* 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