LCOV - code coverage report
Current view: top level - sw/inc - hints.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 34 0.0 %
Date: 2014-04-14 Functions: 0 43 0.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 INCLUDED_SW_INC_HINTS_HXX
      20             : #define INCLUDED_SW_INC_HINTS_HXX
      21             : 
      22             : #include <swatrset.hxx>
      23             : 
      24             : class SwFmt;
      25             : class OutputDevice;
      26             : class SwTable;
      27             : class SwNode;
      28             : class SwNodes;
      29             : class SwCntntNode;
      30             : class SwPageFrm;
      31             : class SwFrm;
      32             : class SwTxtNode;
      33             : class SwHistory;
      34             : 
      35             : // Base class for all Message-Hints:
      36             : // "Overhead" of SfxPoolItem is handled here
      37           0 : class SwMsgPoolItem : public SfxPoolItem
      38             : {
      39             : public:
      40             :     SwMsgPoolItem( sal_uInt16 nWhich );
      41             : 
      42             :     // "Overhead" of SfxPoolItem
      43             :     virtual bool            operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      44             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const SAL_OVERRIDE;
      45             : };
      46             : 
      47             : // SwPtrMsgPoolItem (old SwObjectDying!)
      48             : 
      49           0 : class SwPtrMsgPoolItem : public SwMsgPoolItem
      50             : {
      51             : public:
      52             :     void * pObject;
      53             : 
      54           0 :     SwPtrMsgPoolItem( sal_uInt16 nId, void * pObj )
      55           0 :         : SwMsgPoolItem( nId ), pObject( pObj )
      56           0 :     {}
      57             : };
      58             : 
      59             : /*
      60             :  * SwFmtChg is sent when a format has changed to another format. 2 Hints are always sent
      61             :  * the old and the new format
      62             :  */
      63           0 : class SwFmtChg: public SwMsgPoolItem
      64             : {
      65             : public:
      66             :     SwFmt *pChangedFmt;
      67             :     SwFmtChg( SwFmt *pFmt );
      68             : };
      69             : 
      70           0 : class SwInsTxt: public SwMsgPoolItem
      71             : {
      72             : public:
      73             :     sal_Int32 nPos;
      74             :     sal_Int32 nLen;
      75             : 
      76             :     SwInsTxt( sal_Int32 nP, sal_Int32 nL );
      77             : };
      78             : 
      79           0 : class SwDelChr: public SwMsgPoolItem
      80             : {
      81             : public:
      82             :     sal_Int32 nPos;
      83             : 
      84             :     SwDelChr( sal_Int32 nP );
      85             : };
      86             : 
      87           0 : class SwDelTxt: public SwMsgPoolItem
      88             : {
      89             : public:
      90             :     sal_Int32 nStart;
      91             :     sal_Int32 nLen;
      92             : 
      93             :     SwDelTxt( sal_Int32 nS, sal_Int32 nL );
      94             : };
      95             : 
      96           0 : class SwUpdateAttr: public SwMsgPoolItem
      97             : {
      98             : public:
      99             :     sal_Int32 nStart;
     100             :     sal_Int32 nEnd;
     101             :     sal_uInt16 nWhichAttr;
     102             :     SwUpdateAttr( sal_Int32 nS, sal_Int32 nE, sal_uInt16 nW );
     103             : };
     104             : 
     105             : /** SwRefMarkFldUpdate is sent when the referencemarks should be updated.
     106             :      To determine Page- / chapternumbers the current frame has to be asked.
     107             :       For this we need the current outputdevice */
     108           0 : class SwRefMarkFldUpdate : public SwMsgPoolItem
     109             : {
     110             : public:
     111             :     const OutputDevice* pOut; ///< pointer to the current output device
     112             :     SwRefMarkFldUpdate( const OutputDevice* );
     113             : };
     114             : 
     115             : /** SwDocPosUpdate is sent to signal that only the frames from or to a specified document-global position
     116             :    have to be updated. At the moment this is only needed when updating pagenumber fields. */
     117           0 : class SwDocPosUpdate : public SwMsgPoolItem
     118             : {
     119             : public:
     120             :     const long nDocPos;
     121             :     SwDocPosUpdate( const long nDocPos );
     122             : };
     123             : 
     124             : /// SwTableFmlUpdate is sent when the table has to be newly calculated or when a table itself is merged or splitted
     125             : enum TableFmlUpdtFlags { TBL_CALC = 0,
     126             :                          TBL_BOXNAME,
     127             :                          TBL_BOXPTR,
     128             :                          TBL_RELBOXNAME,
     129             :                          TBL_MERGETBL,
     130             :                          TBL_SPLITTBL
     131             :                        };
     132           0 : class SwTableFmlUpdate : public SwMsgPoolItem
     133             : {
     134             : public:
     135             :     const SwTable* pTbl;         ///< Pointer to the current table
     136             :     union {
     137             :         const SwTable* pDelTbl;  ///< Merge: Pointer to the table to be removed
     138             :         const OUString* pNewTblNm; ///< Split: the name of the new table
     139             :     } DATA;
     140             :     SwHistory* pHistory;
     141             :     sal_uInt16 nSplitLine;       ///< Split: from this BaseLine on will be splitted
     142             :     TableFmlUpdtFlags eFlags;
     143             :     sal_Bool bModified : 1;
     144             :     sal_Bool bBehindSplitLine : 1;
     145             : 
     146             :     SwTableFmlUpdate( const SwTable* );
     147             : };
     148             : 
     149           0 : class SwAutoFmtGetDocNode: public SwMsgPoolItem
     150             : {
     151             : public:
     152             :     const SwCntntNode* pCntntNode;
     153             :     const SwNodes* pNodes;
     154             : 
     155             :     SwAutoFmtGetDocNode( const SwNodes* pNds );
     156             : };
     157             : 
     158             : /*
     159             :  * SwAttrSetChg is sent when something has changed in the SwAttrSet rTheChgdSet.
     160             :  * 2 Hints are always sent, the old and the new items in the rTheChgdSet.
     161             :  */
     162             : class SwAttrSetChg: public SwMsgPoolItem
     163             : {
     164             :     sal_Bool bDelSet;
     165             :     SwAttrSet* pChgSet;           ///< what has changed
     166             :     const SwAttrSet* pTheChgdSet; ///< is only used to compare
     167             : public:
     168             :     SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet );
     169             :     SwAttrSetChg( const SwAttrSetChg& );
     170             :     virtual ~SwAttrSetChg();
     171             : 
     172             :     /// What has changed
     173           0 :     const SwAttrSet* GetChgSet() const     { return pChgSet; }
     174           0 :           SwAttrSet* GetChgSet()           { return pChgSet; }
     175             : 
     176             :     /// Where it has changed
     177           0 :     const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; }
     178             : 
     179           0 :     sal_uInt16 Count() const { return pChgSet->Count(); }
     180           0 :     void ClearItem( sal_uInt16 nWhichL = 0 )
     181             : #ifdef DBG_UTIL
     182             :         ;
     183             : #else
     184           0 :     { pChgSet->ClearItem( nWhichL ); }
     185             : #endif
     186             : };
     187             : 
     188           0 : class SwCondCollCondChg: public SwMsgPoolItem
     189             : {
     190             : public:
     191             :     SwFmt *pChangedFmt;
     192             :     SwCondCollCondChg( SwFmt *pFmt );
     193             : };
     194             : 
     195           0 : class SwVirtPageNumInfo: public SwMsgPoolItem
     196             : {
     197             :     const SwPageFrm *pPage;
     198             :     const SwPageFrm *pOrigPage;
     199             :     const SwFrm     *pFrm;
     200             :     /** Multiple attributes can be attached to a single paragraph / table
     201             :      The frame, in the end, has to decide which attribute takes effect and which physical page it involves */
     202             : public:
     203             :     SwVirtPageNumInfo( const SwPageFrm *pPg );
     204             : 
     205           0 :     const SwPageFrm *GetPage()          { return pPage;    }
     206           0 :     const SwPageFrm *GetOrigPage()      { return pOrigPage;}
     207           0 :     const SwFrm *GetFrm()               { return pFrm; }
     208           0 :     void  SetInfo( const SwPageFrm *pPg,
     209           0 :                    const SwFrm *pF )    { pFrm = pF, pPage = pPg; }
     210             : };
     211             : 
     212           0 : class SwFindNearestNode : public SwMsgPoolItem
     213             : {
     214             :     const SwNode *pNd, *pFnd;
     215             : public:
     216             :     SwFindNearestNode( const SwNode& rNd );
     217             :     void CheckNode( const SwNode& rNd );
     218             : 
     219           0 :     const SwNode* GetFoundNode() const { return pFnd; }
     220             : };
     221             : 
     222           0 : class SwStringMsgPoolItem : public SwMsgPoolItem
     223             : {
     224             :     OUString m_sStr;
     225             : public:
     226             : 
     227           0 :     OUString GetString() const { return m_sStr; }
     228             : 
     229           0 :     SwStringMsgPoolItem( sal_uInt16 nId, const OUString& rStr )
     230           0 :         : SwMsgPoolItem( nId ), m_sStr( rStr )
     231           0 :     {}
     232             : };
     233             : #endif
     234             : 
     235             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10