LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sc/source/core/inc - ddelink.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 5 6 83.3 %
Date: 2013-07-09 Functions: 5 6 83.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             : 
      20             : #ifndef SC_DDELINK_HXX
      21             : #define SC_DDELINK_HXX
      22             : 
      23             : #include "address.hxx"
      24             : #include <sfx2/lnkbase.hxx>
      25             : #include <svl/broadcast.hxx>
      26             : #include "types.hxx"
      27             : 
      28             : class ScDocument;
      29             : class ScMultipleReadHeader;
      30             : class ScMultipleWriteHeader;
      31             : class SvStream;
      32             : 
      33             : class ScDdeLink : public ::sfx2::SvBaseLink, public SvtBroadcaster
      34             : {
      35             : private:
      36             : static bool bIsInUpdate;
      37             : 
      38             :     ScDocument*     pDoc;
      39             : 
      40             :     String          aAppl;          // connection/ link data
      41             :     String          aTopic;
      42             :     String          aItem;
      43             :     sal_uInt8       nMode;          // number format mode
      44             : 
      45             :     bool            bNeedUpdate;    // is set, if update was not possible
      46             : 
      47             :     ScMatrixRef     pResult;
      48             : 
      49             : public:
      50             :     TYPEINFO();
      51             : 
      52             :             ScDdeLink( ScDocument* pD,
      53             :                         const String& rA, const String& rT, const String& rI,
      54             :                         sal_uInt8 nM );
      55             :             ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& rHdr );
      56             :             ScDdeLink( ScDocument* pD, const ScDdeLink& rOther );
      57             :     virtual ~ScDdeLink();
      58             : 
      59             :     void            Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const;
      60             : 
      61             :                     // overloaded by SvBaseLink:
      62             :     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
      63             :         const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
      64             : 
      65             :                     // overloaded by SvtBroadcaster:
      66             :     virtual void    ListenersGone();
      67             : 
      68             :                     // for interpreter:
      69             : 
      70             :     const ScMatrix* GetResult() const;
      71             :     void            SetResult( const ScMatrixRef& pRes );
      72             : 
      73             :                     // XML and Excel import after NewData()
      74             :     ScMatrixRef     GetModifiableResult();
      75             : 
      76          25 :     const String&   GetAppl() const     { return aAppl; }
      77          25 :     const String&   GetTopic() const    { return aTopic; }
      78          25 :     const String&   GetItem() const     { return aItem; }
      79          12 :     sal_uInt8       GetMode() const     { return nMode; }
      80             : 
      81             :     void            TryUpdate();
      82             : 
      83           0 :     bool            NeedsUpdate() const { return bNeedUpdate; }
      84             : 
      85           1 :     static bool     IsInUpdate()        { return bIsInUpdate; }
      86             : };
      87             : 
      88             : #endif
      89             : 
      90             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10