/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_SC_SOURCE_UI_INC_SCUITPHFEDIT_HXX #define INCLUDED_SC_SOURCE_UI_INC_SCUITPHFEDIT_HXX #include "tphfedit.hxx" enum ScHFEntryId { eNoneEntry , ePageEntry , ePagesEntry , eSheetEntry , eConfidentialEntry , eFileNamePageEntry , eExtFileNameEntry , ePageSheetEntry , ePageFileNameEntry , ePageExtFileNameEntry , eUserNameEntry , eCreatedByEntry , eEntryCount }; class EditTextObject; class EditEngine; class ScHFEditPage : public SfxTabPage { public: virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override; virtual void Reset ( const SfxItemSet* rCoreSet ) override; void SetNumType(SvxNumType eNumType); void ClearTextAreas(); protected: ScHFEditPage( vcl::Window* pParent, const SfxItemSet& rCoreSet, sal_uInt16 nWhich, bool bHeader ); virtual ~ScHFEditPage(); virtual void dispose() override; private: VclPtr m_pWndLeft; VclPtr m_pWndCenter; VclPtr m_pWndRight; VclPtr m_pFtDefinedHF; VclPtr m_pLbDefined; VclPtr m_pFtCustomHF; VclPtr m_pBtnText; VclPtr m_pBtnFile; VclPtr m_pBtnTable; VclPtr m_pBtnPage; VclPtr m_pBtnLastPage; VclPtr m_pBtnDate; VclPtr m_pBtnTime; VclPtr m_pFtConfidential; VclPtr m_pFtPage; VclPtr m_pFtOfQuestion; VclPtr m_pFtOf; VclPtr m_pFtNone; VclPtr m_pFtCreatedBy; VclPtr m_pFtCustomized; ScEditWindow * m_pEditFocus; ///one of m_pWndLeft, m_pWndCenter, m_pWndRight sal_uInt16 nWhich; DECL_LINK_TYPED( ObjectSelectHdl, ScEditWindow&, void ); private: void InitPreDefinedList(); void ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling = false); void InsertToDefinedList(); void RemoveFromDefinedList(); void SetSelectDefinedList(); bool IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj); static bool IsDateEntry(EditTextObject* pTextObj); static bool IsExtFileNameEntry(EditTextObject* pTextObj); DECL_LINK_TYPED( ListHdl_Impl, ListBox&, void); DECL_LINK_TYPED( ClickHdl, Button*, void ); DECL_LINK_TYPED( MenuHdl, ScExtIButton&, void ); }; class ScRightHeaderEditPage : public ScHFEditPage { friend class VclPtr; public: static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); private: ScRightHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet ); }; class ScLeftHeaderEditPage : public ScHFEditPage { friend class VclPtr; public: static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); private: ScLeftHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet ); }; class ScRightFooterEditPage : public ScHFEditPage { friend class VclPtr; public: static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); private: ScRightFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet ); }; class ScLeftFooterEditPage : public ScHFEditPage { friend class VclPtr; public: static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); private: ScLeftFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet ); }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */