LCOV - code coverage report
Current view: top level - sw/inc - swbaslnk.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 5 8 62.5 %
Date: 2015-06-13 12:38:46 Functions: 3 6 50.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_SWBASLNK_HXX
      20             : #define INCLUDED_SW_INC_SWBASLNK_HXX
      21             : 
      22             : #include <sfx2/lnkbase.hxx>
      23             : 
      24             : class SwNode;
      25             : class SwContentNode;
      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             :     SwContentNode* pContentNode;
      34             :     bool bSwapIn : 1;
      35             :     bool bNoDataFlag : 1;
      36             :     bool bIgnoreDataChanged : 1;
      37             :     ReReadThread* m_pReReadThread;
      38             : 
      39             : protected:
      40             :     SwBaseLink(): m_pReReadThread(0) {}
      41             : 
      42             : public:
      43             :     TYPEINFO_OVERRIDE();
      44             : 
      45          16 :     SwBaseLink( SfxLinkUpdateMode nMode, SotClipboardFormatId nFormat, SwContentNode* pNode = 0 )
      46             :         : ::sfx2::SvBaseLink( nMode, nFormat ), pContentNode( pNode ),
      47             :         bSwapIn( false ), bNoDataFlag( false ), bIgnoreDataChanged( false ),
      48          16 :         m_pReReadThread(0)
      49          16 :     {}
      50             :     virtual ~SwBaseLink();
      51             : 
      52             :     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
      53             :         const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ) SAL_OVERRIDE;
      54             : 
      55             :     virtual void Closed() SAL_OVERRIDE;
      56             : 
      57             :     virtual const SwNode* GetAnchor() const;
      58             : 
      59             :     SwContentNode *GetContentNode() { return pContentNode; }
      60             : 
      61             :     // For graphics only.
      62             :     bool SwapIn( bool bWaitForData = false, bool bNativFormat = false );
      63             : 
      64          16 :     bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
      65             : 
      66             :     // Only for graphics-links (for switching between DDE / Grf-link).
      67           0 :     void SetObjType( sal_uInt16 nType ) { SvBaseLink::SetObjType( nType ); }
      68             : 
      69             :     bool IsRecursion( const SwBaseLink* pChkLnk ) const;
      70             :     virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0,
      71             :                             sal_Int32 nEnd = -1 ) const;
      72             : 
      73           0 :     void SetNoDataFlag() { bNoDataFlag = true; }
      74          35 :     bool ChkNoDataFlag() { const bool bRet = bNoDataFlag; bNoDataFlag = false; return bRet; }
      75           0 :     bool IsNoDataFlag() const { return bNoDataFlag; }
      76             : };
      77             : 
      78             : #endif
      79             : 
      80             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11