LCOV - code coverage report
Current view: top level - sc/inc - arealink.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 6 7 85.7 %
Date: 2015-06-13 12:38:46 Functions: 6 7 85.7 %
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 INCLUDED_SC_INC_AREALINK_HXX
      21             : #define INCLUDED_SC_INC_AREALINK_HXX
      22             : 
      23             : #include "global.hxx"
      24             : #include "refreshtimer.hxx"
      25             : #include "address.hxx"
      26             : #include <sfx2/lnkbase.hxx>
      27             : #include "scdllapi.h"
      28             : 
      29             : class SfxObjectShell;
      30             : struct AreaLink_Impl;
      31             : 
      32             : class SC_DLLPUBLIC ScAreaLink : public ::sfx2::SvBaseLink, public ScRefreshTimer
      33             : {
      34             : private:
      35             :     AreaLink_Impl*  pImpl;
      36             :     OUString        aFileName;
      37             :     OUString        aFilterName;
      38             :     OUString        aOptions;
      39             :     OUString        aSourceArea;
      40             :     ScRange         aDestArea;
      41             :     bool            bAddUndo;
      42             :     bool            bInCreate;
      43             :     bool            bDoInsert;      // is set to FALSE for first update
      44             :     static bool FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const OUString& rAreaName );
      45             : 
      46             : public:
      47             :     TYPEINFO_OVERRIDE();
      48             :     ScAreaLink( SfxObjectShell* pShell, const OUString& rFile,
      49             :                     const OUString& rFilter, const OUString& rOpt,
      50             :                     const OUString& rArea, const ScRange& rDest, sal_uLong nRefresh );
      51             :     virtual ~ScAreaLink();
      52             : 
      53             :     virtual void Closed() SAL_OVERRIDE;
      54             :     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
      55             :         const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ) SAL_OVERRIDE;
      56             : 
      57             :     virtual void    Edit( vcl::Window*, const Link<>& rEndEditHdl ) SAL_OVERRIDE;
      58             : 
      59             :     bool    Refresh( const OUString& rNewFile, const OUString& rNewFilter,
      60             :                     const OUString& rNewArea, sal_uLong nNewRefresh );
      61             : 
      62           0 :     void    SetInCreate(bool bSet)                  { bInCreate = bSet; }
      63          32 :     void    SetDoInsert(bool bSet)                  { bDoInsert = bSet; }
      64             :     void    SetDestArea(const ScRange& rNew);
      65             :     void    SetSource(const OUString& rDoc, const OUString& rFlt, const OUString& rOpt,
      66             :                         const OUString& rArea);
      67             : 
      68             :     bool IsEqual( const OUString& rFile, const OUString& rFilter, const OUString& rOpt,
      69             :                   const OUString& rSource, const ScRange& rDest ) const;
      70             : 
      71          20 :     const OUString& GetFile() const         { return aFileName;     }
      72          20 :     const OUString& GetFilter() const       { return aFilterName;   }
      73          20 :     const OUString& GetOptions() const      { return aOptions;      }
      74          16 :     const OUString& GetSource() const       { return aSourceArea;   }
      75          17 :     const ScRange&  GetDestArea() const     { return aDestArea;     }
      76             : 
      77             :     DECL_LINK_TYPED( RefreshHdl, Timer*, void );
      78             :     DECL_LINK( AreaEndEditHdl, void* );
      79             : };
      80             : 
      81             : #endif
      82             : 
      83             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11