LCOV - code coverage report
Current view: top level - sw/inc - swbaslnk.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 9 44.4 %
Date: 2012-08-25 Functions: 2 7 28.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           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 _SWBASLNK_HXX
      29                 :            : #define _SWBASLNK_HXX
      30                 :            : 
      31                 :            : #include <sfx2/lnkbase.hxx>
      32                 :            : 
      33                 :            : class SwNode;
      34                 :            : class SwCntntNode;
      35                 :            : class ReReadThread;
      36                 :            : long GrfNodeChanged( void* pLink, void* pCaller );
      37                 :            : 
      38                 :            : class SwBaseLink : public ::sfx2::SvBaseLink
      39                 :            : {
      40                 :            :     friend long GrfNodeChanged( void* pLink, void* pCaller );
      41                 :            : 
      42                 :            :     SwCntntNode* pCntntNode;
      43                 :            :     sal_Bool bSwapIn : 1;
      44                 :            :     sal_Bool bNoDataFlag : 1;
      45                 :            :     sal_Bool bIgnoreDataChanged : 1;
      46                 :            :     ReReadThread* m_pReReadThread;
      47                 :            : 
      48                 :            : protected:
      49                 :            :     SwBaseLink(): m_pReReadThread(0) {}
      50                 :            : 
      51                 :            :     SwBaseLink( const String& rNm, sal_uInt16 nObjectType, ::sfx2::SvLinkSource* pObj,
      52                 :            :                  SwCntntNode* pNode = 0 )
      53                 :            :         : ::sfx2::SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ),
      54                 :            :         bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ),
      55                 :            :         m_pReReadThread(0)
      56                 :            :     {}
      57                 :            : 
      58                 :            : public:
      59                 :            :     TYPEINFO();
      60                 :            : 
      61                 :         13 :     SwBaseLink( sal_uInt16 nMode, sal_uInt16 nFormat, SwCntntNode* pNode = 0 )
      62                 :            :         : ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ),
      63                 :            :         bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ),
      64                 :         13 :         m_pReReadThread(0)
      65                 :         13 :     {}
      66                 :            :     virtual ~SwBaseLink();
      67                 :            : 
      68                 :            :     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
      69                 :            :         const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
      70                 :            : 
      71                 :            :     virtual void Closed();
      72                 :            : 
      73                 :            :     virtual const SwNode* GetAnchor() const;
      74                 :            : 
      75                 :          0 :     SwCntntNode *GetCntntNode() { return pCntntNode; }
      76                 :            : 
      77                 :            :     // For graphics only.
      78                 :            :     sal_Bool SwapIn( sal_Bool bWaitForData = sal_False, sal_Bool bNativFormat = sal_False );
      79                 :            : 
      80                 :          0 :     sal_Bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
      81                 :            : 
      82                 :            :     // Only for graphics-links (for switching between DDE / Grf-link).
      83                 :          0 :     void SetObjType( sal_uInt16 nType ) { SvBaseLink::SetObjType( nType ); }
      84                 :            : 
      85                 :            :     sal_Bool IsRecursion( const SwBaseLink* pChkLnk ) const;
      86                 :            :     virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
      87                 :            :                             xub_StrLen nEnd = STRING_NOTFOUND ) const;
      88                 :            : 
      89                 :          0 :     void SetNoDataFlag()    { bNoDataFlag = sal_True; }
      90                 :         60 :     sal_Bool ChkNoDataFlag()    { sal_Bool bRet = bNoDataFlag; bNoDataFlag = sal_False; return bRet; }
      91                 :          0 :     sal_Bool IsNoDataFlag() const           { return bNoDataFlag; }
      92                 :            : };
      93                 :            : 
      94                 :            : 
      95                 :            : #endif
      96                 :            : 
      97                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10