2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2013-11-05 02:17:53 +01:00
|
|
|
#ifndef INCLUDED_SW_INC_FMTHDFT_HXX
|
|
|
|
#define INCLUDED_SW_INC_FMTHDFT_HXX
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#include <hintids.hxx>
|
|
|
|
#include <format.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/poolitem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <calbck.hxx>
|
|
|
|
|
|
|
|
class SwFrmFmt;
|
2001-05-13 02:33:31 +00:00
|
|
|
class IntlWrapper;
|
2010-12-17 09:02:23 +01:00
|
|
|
class SwFmt;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2012-09-02 09:05:03 +03:00
|
|
|
/** Header, for PageFormats
|
|
|
|
Client of FrmFmt discribing the header. */
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2009-01-05 14:06:42 +00:00
|
|
|
class SW_DLLPUBLIC SwFmtHeader: public SfxPoolItem, public SwClient
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2012-09-02 09:05:03 +03:00
|
|
|
sal_Bool bActive; ///< Only for controlling (creation of content).
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
public:
|
2011-01-17 15:06:54 +01:00
|
|
|
SwFmtHeader( sal_Bool bOn = sal_False );
|
2000-09-18 16:15:01 +00:00
|
|
|
SwFmtHeader( SwFrmFmt *pHeaderFmt );
|
|
|
|
SwFmtHeader( const SwFmtHeader &rCpy );
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~SwFmtHeader();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwFmtHeader& operator=( const SwFmtHeader &rCpy );
|
|
|
|
|
2014-03-26 11:54:10 +01:00
|
|
|
TYPEINFO_OVERRIDE();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2012-09-02 09:05:03 +03:00
|
|
|
/// "pure virtual methods" of SfxPoolItem
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
|
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const SAL_OVERRIDE;
|
2000-09-18 16:15:01 +00:00
|
|
|
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
|
|
|
|
SfxMapUnit eCoreMetric,
|
|
|
|
SfxMapUnit ePresMetric,
|
2013-01-23 12:41:52 +01:00
|
|
|
OUString &rText,
|
2014-03-27 18:12:18 +01:00
|
|
|
const IntlWrapper* pIntl = 0 ) const SAL_OVERRIDE;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2010-12-17 09:02:23 +01:00
|
|
|
const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
|
|
|
|
SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2010-12-17 09:02:23 +01:00
|
|
|
void RegisterToFormat( SwFmt& rFmt );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool IsActive() const { return bActive; }
|
|
|
|
void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
2012-09-02 09:05:03 +03:00
|
|
|
/**Footer, for pageformats
|
|
|
|
Client of FrmFmt describing the footer */
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2009-01-05 14:06:42 +00:00
|
|
|
class SW_DLLPUBLIC SwFmtFooter: public SfxPoolItem, public SwClient
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-03-14 16:51:14 +00:00
|
|
|
sal_Bool bActive; // Only for controlling (creation of content).
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
public:
|
2011-01-17 15:06:54 +01:00
|
|
|
SwFmtFooter( sal_Bool bOn = sal_False );
|
2000-09-18 16:15:01 +00:00
|
|
|
SwFmtFooter( SwFrmFmt *pFooterFmt );
|
|
|
|
SwFmtFooter( const SwFmtFooter &rCpy );
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~SwFmtFooter();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwFmtFooter& operator=( const SwFmtFooter &rCpy );
|
|
|
|
|
2014-03-26 11:54:10 +01:00
|
|
|
TYPEINFO_OVERRIDE();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2012-09-02 09:05:03 +03:00
|
|
|
/// "pure virtual methods" of SfxPoolItem
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
|
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const SAL_OVERRIDE;
|
2000-09-18 16:15:01 +00:00
|
|
|
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
|
|
|
|
SfxMapUnit eCoreMetric,
|
|
|
|
SfxMapUnit ePresMetric,
|
2013-01-23 12:41:52 +01:00
|
|
|
OUString &rText,
|
2014-03-27 18:12:18 +01:00
|
|
|
const IntlWrapper* pIntl = 0 ) const SAL_OVERRIDE;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2010-12-17 09:02:23 +01:00
|
|
|
const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
|
|
|
|
SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2010-12-17 09:02:23 +01:00
|
|
|
void RegisterToFormat( SwFmt& rFmt );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool IsActive() const { return bActive; }
|
|
|
|
void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
inline const SwFmtHeader &SwAttrSet::GetHeader(sal_Bool bInP) const
|
2000-09-18 16:15:01 +00:00
|
|
|
{ return (const SwFmtHeader&)Get( RES_HEADER,bInP); }
|
2011-01-17 15:06:54 +01:00
|
|
|
inline const SwFmtFooter &SwAttrSet::GetFooter(sal_Bool bInP) const
|
2000-09-18 16:15:01 +00:00
|
|
|
{ return (const SwFmtFooter&)Get( RES_FOOTER,bInP); }
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
inline const SwFmtHeader &SwFmt::GetHeader(sal_Bool bInP) const
|
2000-09-18 16:15:01 +00:00
|
|
|
{ return aSet.GetHeader(bInP); }
|
2011-01-17 15:06:54 +01:00
|
|
|
inline const SwFmtFooter &SwFmt::GetFooter(sal_Bool bInP) const
|
2000-09-18 16:15:01 +00:00
|
|
|
{ return aSet.GetFooter(bInP); }
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|