LCOV - code coverage report
Current view: top level - libreoffice/sw/inc - swbaslnk.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 9 33.3 %
Date: 2012-12-27 Functions: 1 7 14.3 %
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 _SWBASLNK_HXX
      20             : #define _SWBASLNK_HXX
      21             : 
      22             : #include <sfx2/lnkbase.hxx>
      23             : 
      24             : class SwNode;
      25             : class SwCntntNode;
      26             : class ReReadThread;
      27             : long GrfNodeChanged( void* pLink, void* pCaller );
      28             : 
      29             : class SwBaseLink : public ::sfx2::SvBaseLink
      30             : {
      31             :     friend long GrfNodeChanged( void* pLink, void* pCaller );
      32             : 
      33             :     SwCntntNode* pCntntNode;
      34             :     sal_Bool bSwapIn : 1;
      35             :     sal_Bool bNoDataFlag : 1;
      36             :     sal_Bool bIgnoreDataChanged : 1;
      37             :     ReReadThread* m_pReReadThread;
      38             : 
      39             : protected:
      40             :     SwBaseLink(): m_pReReadThread(0) {}
      41             : 
      42             :     SwBaseLink( const String& rNm, sal_uInt16 nObjectType, ::sfx2::SvLinkSource* pObj,
      43             :                  SwCntntNode* pNode = 0 )
      44             :         : ::sfx2::SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ),
      45             :         bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ),
      46             :         m_pReReadThread(0)
      47             :     {}
      48             : 
      49             : public:
      50             :     TYPEINFO();
      51             : 
      52           1 :     SwBaseLink( sal_uInt16 nMode, sal_uInt16 nFormat, SwCntntNode* pNode = 0 )
      53             :         : ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ),
      54             :         bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ),
      55           1 :         m_pReReadThread(0)
      56           1 :     {}
      57             :     virtual ~SwBaseLink();
      58             : 
      59             :     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
      60             :         const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
      61             : 
      62             :     virtual void Closed();
      63             : 
      64             :     virtual const SwNode* GetAnchor() const;
      65             : 
      66           0 :     SwCntntNode *GetCntntNode() { return pCntntNode; }
      67             : 
      68             :     // For graphics only.
      69             :     sal_Bool SwapIn( sal_Bool bWaitForData = sal_False, sal_Bool bNativFormat = sal_False );
      70             : 
      71           0 :     sal_Bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
      72             : 
      73             :     // Only for graphics-links (for switching between DDE / Grf-link).
      74           0 :     void SetObjType( sal_uInt16 nType ) { SvBaseLink::SetObjType( nType ); }
      75             : 
      76             :     sal_Bool IsRecursion( const SwBaseLink* pChkLnk ) const;
      77             :     virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
      78             :                             xub_StrLen nEnd = STRING_NOTFOUND ) const;
      79             : 
      80           0 :     void SetNoDataFlag()    { bNoDataFlag = sal_True; }
      81           0 :     sal_Bool ChkNoDataFlag()    { sal_Bool bRet = bNoDataFlag; bNoDataFlag = sal_False; return bRet; }
      82           0 :     sal_Bool IsNoDataFlag() const           { return bNoDataFlag; }
      83             : };
      84             : 
      85             : 
      86             : #endif
      87             : 
      88             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10