LCOV - code coverage report
Current view: top level - sw/inc - hints.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 25 34 73.5 %
Date: 2012-08-25 Functions: 20 43 46.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 14 34 41.2 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _HINTS_HXX
      29                 :            : #define _HINTS_HXX
      30                 :            : 
      31                 :            : #include <swatrset.hxx>
      32                 :            : 
      33                 :            : class SwFmt;
      34                 :            : class OutputDevice;
      35                 :            : class SwTable;
      36                 :            : class SwNode;
      37                 :            : class SwNodes;
      38                 :            : class SwCntntNode;
      39                 :            : class SwPageFrm;
      40                 :            : class SwFrm;
      41                 :            : class SwTxtNode;
      42                 :            : class SwHistory;
      43                 :            : 
      44                 :            : // Base class for all Message-Hints:
      45                 :            : // "Overhead" of SfxPoolItem is handled here
      46         [ -  + ]:     735930 : class SwMsgPoolItem : public SfxPoolItem
      47                 :            : {
      48                 :            : public:
      49                 :            :     SwMsgPoolItem( sal_uInt16 nWhich );
      50                 :            : 
      51                 :            :     // "Overhead" of SfxPoolItem
      52                 :            :     virtual int             operator==( const SfxPoolItem& ) const;
      53                 :            :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const;
      54                 :            : };
      55                 :            : 
      56                 :            : 
      57                 :            : // ---------------------------------------
      58                 :            : // SwPtrMsgPoolItem (old SwObjectDying!)
      59                 :            : // ---------------------------------------
      60                 :            : 
      61         [ -  + ]:      50910 : class SwPtrMsgPoolItem : public SwMsgPoolItem
      62                 :            : {
      63                 :            : public:
      64                 :            :     void * pObject;
      65                 :            : 
      66                 :      50910 :     SwPtrMsgPoolItem( sal_uInt16 nId, void * pObj )
      67                 :      50910 :         : SwMsgPoolItem( nId ), pObject( pObj )
      68                 :      50910 :     {}
      69                 :            : };
      70                 :            : 
      71                 :            : 
      72                 :            : 
      73                 :            : /*
      74                 :            :  * SwFmtChg is sent when a format has changed to another format. 2 Hints are always sent
      75                 :            :  * the old and the new format
      76                 :            :  */
      77         [ -  + ]:      27615 : class SwFmtChg: public SwMsgPoolItem
      78                 :            : {
      79                 :            : public:
      80                 :            :     SwFmt *pChangedFmt;
      81                 :            :     SwFmtChg( SwFmt *pFmt );
      82                 :            : };
      83                 :            : 
      84                 :            : 
      85         [ -  + ]:      11071 : class SwInsTxt: public SwMsgPoolItem
      86                 :            : {
      87                 :            : public:
      88                 :            :     xub_StrLen nPos;
      89                 :            :     xub_StrLen nLen;
      90                 :            : 
      91                 :            :     SwInsTxt( xub_StrLen nP, xub_StrLen nL );
      92                 :            : };
      93                 :            : 
      94         [ -  + ]:        449 : class SwDelChr: public SwMsgPoolItem
      95                 :            : {
      96                 :            : public:
      97                 :            :     xub_StrLen nPos;
      98                 :            : 
      99                 :            :     SwDelChr( xub_StrLen nP );
     100                 :            : };
     101                 :            : 
     102         [ -  + ]:       2086 : class SwDelTxt: public SwMsgPoolItem
     103                 :            : {
     104                 :            : public:
     105                 :            :     xub_StrLen nStart;
     106                 :            :     xub_StrLen nLen;
     107                 :            : 
     108                 :            :     SwDelTxt( xub_StrLen nS, xub_StrLen nL );
     109                 :            : };
     110                 :            : 
     111         [ -  + ]:      16535 : class SwUpdateAttr: public SwMsgPoolItem
     112                 :            : {
     113                 :            : public:
     114                 :            :     xub_StrLen nStart;
     115                 :            :     xub_StrLen nEnd;
     116                 :            :     sal_uInt16 nWhichAttr;
     117                 :            :     SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, sal_uInt16 nW );
     118                 :            : };
     119                 :            : 
     120                 :            : 
     121                 :            : // SwRefMarkFldUpdate is sent when the referencemarks should be updated.
     122                 :            : // To determine Page- / chapternumbers the current frame has to be asked.
     123                 :            : //  For this we need the current outputdevice
     124         [ #  # ]:          0 : class SwRefMarkFldUpdate : public SwMsgPoolItem
     125                 :            : {
     126                 :            : public:
     127                 :            :     const OutputDevice* pOut; // pointer to the current output device
     128                 :            :     SwRefMarkFldUpdate( const OutputDevice* );
     129                 :            : };
     130                 :            : 
     131                 :            : // SwDocPosUpdate is sent to signal that only the frames from or to a specified document-global position
     132                 :            : // have to be updated. At the moment this is only needed when updating pagenumber fields.
     133         [ -  + ]:       1551 : class SwDocPosUpdate : public SwMsgPoolItem
     134                 :            : {
     135                 :            : public:
     136                 :            :     const long nDocPos;
     137                 :            :     SwDocPosUpdate( const long nDocPos );
     138                 :            : };
     139                 :            : 
     140                 :            : // SwTableFmlUpdate is sent when the table has to be newly calculated or when a table itself is merged or splitted
     141                 :            : enum TableFmlUpdtFlags { TBL_CALC = 0,
     142                 :            :                          TBL_BOXNAME,
     143                 :            :                          TBL_BOXPTR,
     144                 :            :                          TBL_RELBOXNAME,
     145                 :            :                          TBL_MERGETBL,
     146                 :            :                          TBL_SPLITTBL
     147                 :            :                        };
     148         [ -  + ]:        285 : class SwTableFmlUpdate : public SwMsgPoolItem
     149                 :            : {
     150                 :            : public:
     151                 :            :     const SwTable* pTbl;         // Pointer to the current table
     152                 :            :     union {
     153                 :            :         const SwTable* pDelTbl;  // Merge: Pointer to the table to be removed
     154                 :            :         const String* pNewTblNm; // Split: the name of the new table
     155                 :            :     } DATA;
     156                 :            :     SwHistory* pHistory;
     157                 :            :     sal_uInt16 nSplitLine;           // Split: from this BaseLine on will be splitted
     158                 :            :     TableFmlUpdtFlags eFlags;
     159                 :            :     sal_Bool bModified : 1;
     160                 :            :     sal_Bool bBehindSplitLine : 1;
     161                 :            : 
     162                 :            :     SwTableFmlUpdate( const SwTable* );
     163                 :            : };
     164                 :            : 
     165                 :            : 
     166         [ -  + ]:     128923 : class SwAutoFmtGetDocNode: public SwMsgPoolItem
     167                 :            : {
     168                 :            : public:
     169                 :            :     const SwCntntNode* pCntntNode;
     170                 :            :     const SwNodes* pNodes;
     171                 :            : 
     172                 :            :     SwAutoFmtGetDocNode( const SwNodes* pNds );
     173                 :            : };
     174                 :            : 
     175                 :            : /*
     176                 :            :  * SwAttrSetChg is sent when something has changed in the SwAttrSet rTheChgdSet.
     177                 :            :  * 2 Hints are always sent, the old and the new items in the rTheChgdSet.
     178                 :            :  */
     179                 :            : class SwAttrSetChg: public SwMsgPoolItem
     180                 :            : {
     181                 :            :     sal_Bool bDelSet;
     182                 :            :     SwAttrSet* pChgSet;           // what has changed
     183                 :            :     const SwAttrSet* pTheChgdSet; // is only used to compare
     184                 :            : public:
     185                 :            :     SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet );
     186                 :            :     SwAttrSetChg( const SwAttrSetChg& );
     187                 :            :     ~SwAttrSetChg();
     188                 :            : 
     189                 :            :     // What has changed
     190                 :      77426 :     const SwAttrSet* GetChgSet() const     { return pChgSet; }
     191                 :    1056205 :           SwAttrSet* GetChgSet()           { return pChgSet; }
     192                 :            : 
     193                 :            :     // Where it has changed
     194                 :     213894 :     const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; }
     195                 :            : 
     196                 :     142216 :     sal_uInt16 Count() const { return pChgSet->Count(); }
     197                 :       1732 :     void ClearItem( sal_uInt16 nWhichL = 0 )
     198                 :            : #ifdef DBG_UTIL
     199                 :            :         ;
     200                 :            : #else
     201                 :       1732 :     { pChgSet->ClearItem( nWhichL ); }
     202                 :            : #endif
     203                 :            : };
     204                 :            : 
     205         [ #  # ]:          0 : class SwCondCollCondChg: public SwMsgPoolItem
     206                 :            : {
     207                 :            : public:
     208                 :            :     SwFmt *pChangedFmt;
     209                 :            :     SwCondCollCondChg( SwFmt *pFmt );
     210                 :            : };
     211                 :            : 
     212         [ #  # ]:          0 : class SwVirtPageNumInfo: public SwMsgPoolItem
     213                 :            : {
     214                 :            :     const SwPageFrm *pPage;
     215                 :            :     const SwPageFrm *pOrigPage;
     216                 :            :     const SwFrm     *pFrm;
     217                 :            :     // Multiple attributes can be attached to a single paragraph / table
     218                 :            :     // The frame, in the end, has to decide which attribute takes effect and which physical page it involves
     219                 :            : public:
     220                 :            :     SwVirtPageNumInfo( const SwPageFrm *pPg );
     221                 :            : 
     222                 :          0 :     const SwPageFrm *GetPage()          { return pPage;    }
     223                 :          0 :     const SwPageFrm *GetOrigPage()      { return pOrigPage;}
     224                 :          0 :     const SwFrm *GetFrm()               { return pFrm; }
     225                 :          0 :     void  SetInfo( const SwPageFrm *pPg,
     226                 :          0 :                    const SwFrm *pF )    { pFrm = pF, pPage = pPg; }
     227                 :            : };
     228                 :            : 
     229         [ -  + ]:          2 : class SwFindNearestNode : public SwMsgPoolItem
     230                 :            : {
     231                 :            :     const SwNode *pNd, *pFnd;
     232                 :            : public:
     233                 :            :     SwFindNearestNode( const SwNode& rNd );
     234                 :            :     void CheckNode( const SwNode& rNd );
     235                 :            : 
     236                 :          2 :     const SwNode* GetFoundNode() const { return pFnd; }
     237                 :            : };
     238                 :            : 
     239 [ +  - ][ -  + ]:        266 : class SwStringMsgPoolItem : public SwMsgPoolItem
     240                 :            : {
     241                 :            :     String sStr;
     242                 :            : public:
     243                 :            : 
     244                 :          0 :     const String& GetString() const { return sStr; }
     245                 :            : 
     246                 :        266 :     SwStringMsgPoolItem( sal_uInt16 nId, const String& rStr )
     247         [ +  - ]:        266 :         : SwMsgPoolItem( nId ), sStr( rStr )
     248                 :        266 :     {}
     249                 :            : };
     250                 :            : #endif
     251                 :            : 
     252                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10