LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/inc - fmtpdsc.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 10 100.0 %
Date: 2013-07-09 Functions: 8 8 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef _FMTPDSC_HXX
      20             : #define _FMTPDSC_HXX
      21             : 
      22             : 
      23             : #include <svl/poolitem.hxx>
      24             : #include "swdllapi.h"
      25             : #include <hintids.hxx>
      26             : #include <format.hxx>
      27             : #include <calbck.hxx>
      28             : 
      29             : class SwPageDesc;
      30             : class SwHistory;
      31             : class SwPaM;
      32             : class IntlWrapper;
      33             : class SwEndNoteInfo;
      34             : 
      35             : /** Pagedescriptor
      36             :  Client of SwPageDesc that is "described" by the attribute. */
      37             : 
      38             : class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
      39             : {
      40             :     /** This "Doc"-function is made friend in order to be able
      41             :      to set the auto-flag after copying!! */
      42             :     friend sal_Bool InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, sal_uInt16,
      43             :                         SwHistory* );
      44             :     sal_uInt16 nNumOffset;          ///< Offset page number.
      45             :     sal_uInt16 nDescNameIdx;        ///< SW3-Reader: stringpool-index of style name.
      46             :     SwModify* pDefinedIn;       /**< Points to the object in which the
      47             :                                  attribute was set (CntntNode/Format). */
      48             : protected:
      49             :     virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
      50             :     virtual void SwClientNotify( const SwModify&, const SfxHint& rHint );
      51             : 
      52             : public:
      53             :     SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
      54             :     SwFmtPageDesc( const SwFmtPageDesc &rCpy );
      55             :     SwFmtPageDesc &operator=( const SwFmtPageDesc &rCpy );
      56             :     ~SwFmtPageDesc();
      57             : 
      58             :     TYPEINFO();
      59             : 
      60             :     /// "Pure virtual methods" of SfxPoolItem.
      61             :     virtual int             operator==( const SfxPoolItem& ) const;
      62             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const;
      63             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      64             :                                     SfxMapUnit eCoreMetric,
      65             :                                     SfxMapUnit ePresMetric,
      66             :                                     OUString &rText,
      67             :                                     const IntlWrapper*    pIntl = 0 ) const;
      68             :     virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      69             :     virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      70             : 
      71        1059 :           SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
      72       12539 :     const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
      73             : 
      74        1091 :     sal_uInt16  GetNumOffset() const        { return nNumOffset; }
      75          26 :     void    SetNumOffset( sal_uInt16 nNum ) { nNumOffset = nNum; }
      76             : 
      77             :     /// Query / set where attribute is anchored.
      78        2723 :     inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
      79        2722 :     void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; }
      80             :     void RegisterToEndNotInfo( SwEndNoteInfo& );
      81             :     void RegisterToPageDesc( SwPageDesc& );
      82             :     bool KnowsPageDesc() const;
      83             : };
      84             : 
      85             : 
      86        7820 : inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(sal_Bool bInP) const
      87        7820 :     { return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); }
      88             : 
      89          90 : inline const SwFmtPageDesc &SwFmt::GetPageDesc(sal_Bool bInP) const
      90          90 :     { return aSet.GetPageDesc(bInP); }
      91             : 
      92             : #endif
      93             : 
      94             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10