LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sc/inc - hints.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 20 27 74.1 %
Date: 2013-07-09 Functions: 20 27 74.1 %
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_HINTS_HXX
      21             : #define SC_HINTS_HXX
      22             : 
      23             : #include "global.hxx"
      24             : #include "address.hxx"
      25             : #include <svl/hint.hxx>
      26             : 
      27             : // ---------------------------------------------------------------------------
      28             : 
      29             : class ScPaintHint : public SfxHint
      30             : {
      31             :     ScRange     aRange;
      32             :     sal_uInt16      nParts;
      33             :     sal_Bool        bPrint;     //  flag indicating whether print/preview if affected
      34             : 
      35             :     ScPaintHint(); // disabled
      36             : 
      37             : public:
      38             :                     TYPEINFO();
      39             :                     ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint = PAINT_ALL );
      40             :                     ~ScPaintHint();
      41             : 
      42         159 :     void            SetPrintFlag(sal_Bool bSet) { bPrint = bSet; }
      43             : 
      44             :     const ScRange&  GetRange() const        { return aRange; }
      45        3568 :     SCCOL           GetStartCol() const     { return aRange.aStart.Col(); }
      46        3854 :     SCROW           GetStartRow() const     { return aRange.aStart.Row(); }
      47        3709 :     SCTAB           GetStartTab() const     { return aRange.aStart.Tab(); }
      48        3568 :     SCCOL           GetEndCol() const       { return aRange.aEnd.Col(); }
      49        3854 :     SCROW           GetEndRow() const       { return aRange.aEnd.Row(); }
      50        3695 :     SCTAB           GetEndTab() const       { return aRange.aEnd.Tab(); }
      51        3713 :     sal_uInt16          GetParts() const        { return nParts; }
      52           7 :     sal_Bool            GetPrintFlag() const    { return bPrint; }
      53             : };
      54             : 
      55             : 
      56             : class ScUpdateRefHint : public SfxHint
      57             : {
      58             :     UpdateRefMode   eUpdateRefMode;
      59             :     ScRange         aRange;
      60             :     SCsCOL          nDx;
      61             :     SCsROW          nDy;
      62             :     SCsTAB          nDz;
      63             : 
      64             : public:
      65             :                     TYPEINFO();
      66             : 
      67             :                     ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR,
      68             :                                         SCsCOL nX, SCsROW nY, SCsTAB nZ );
      69             :                     ~ScUpdateRefHint();
      70             : 
      71        5969 :     UpdateRefMode   GetMode() const         { return eUpdateRefMode; }
      72        3107 :     const ScRange&  GetRange() const        { return aRange; }
      73        3107 :     SCsCOL          GetDx() const           { return nDx; }
      74        3107 :     SCsROW          GetDy() const           { return nDy; }
      75        3107 :     SCsTAB          GetDz() const           { return nDz; }
      76             : };
      77             : 
      78             : 
      79             : #define SC_POINTERCHANGED_NUMFMT    1
      80             : 
      81             : class ScPointerChangedHint : public SfxHint
      82             : {
      83             :     sal_uInt16          nFlags;
      84             : 
      85             : public:
      86             :                     TYPEINFO();
      87             : 
      88             :                     ~ScPointerChangedHint();
      89             : 
      90           0 :     sal_uInt16          GetFlags() const            { return nFlags; }
      91             : };
      92             : 
      93             : 
      94             : //! move ScLinkRefreshedHint to a different file?
      95             : 
      96             : #define SC_LINKREFTYPE_NONE     0
      97             : #define SC_LINKREFTYPE_SHEET    1
      98             : #define SC_LINKREFTYPE_AREA     2
      99             : #define SC_LINKREFTYPE_DDE      3
     100             : 
     101             : class ScLinkRefreshedHint : public SfxHint
     102             : {
     103             :     sal_uInt16      nLinkType;  // SC_LINKREFTYPE_...
     104             :     String      aUrl;       // used for sheet links
     105             :     String      aDdeAppl;   // used for dde links:
     106             :     String      aDdeTopic;
     107             :     String      aDdeItem;
     108             :     sal_uInt8       nDdeMode;
     109             :     ScAddress   aDestPos;   // used to identify area links
     110             :                             //! also use source data for area links?
     111             : 
     112             : public:
     113             :                     TYPEINFO();
     114             :                     ScLinkRefreshedHint();
     115             :                     ~ScLinkRefreshedHint();
     116             : 
     117             :     void            SetSheetLink( const String& rSourceUrl );
     118             :     void            SetDdeLink( const String& rA, const String& rT, const String& rI, sal_uInt8 nM );
     119             :     void            SetAreaLink( const ScAddress& rPos );
     120             : 
     121           3 :     sal_uInt16              GetLinkType() const { return nLinkType; }
     122           0 :     const String&       GetUrl() const      { return aUrl; }
     123           2 :     const String&       GetDdeAppl() const  { return aDdeAppl; }
     124           2 :     const String&       GetDdeTopic() const { return aDdeTopic; }
     125           2 :     const String&       GetDdeItem() const  { return aDdeItem; }
     126             :     sal_uInt8               GetDdeMode() const  { return nDdeMode; }
     127           1 :     const ScAddress&    GetDestPos() const  { return aDestPos; }
     128             : };
     129             : 
     130             : 
     131             : //! move ScAutoStyleHint to a different file?
     132             : 
     133             : class ScAutoStyleHint : public SfxHint
     134             : {
     135             :     ScRange     aRange;
     136             :     String      aStyle1;
     137             :     String      aStyle2;
     138             :     sal_uLong       nTimeout;
     139             : 
     140             : public:
     141             :                     TYPEINFO();
     142             :                     ScAutoStyleHint( const ScRange& rR, const String& rSt1,
     143             :                                         sal_uLong nT, const String& rSt2 );
     144             :                     ~ScAutoStyleHint();
     145             : 
     146           0 :     const ScRange&  GetRange() const    { return aRange; }
     147           0 :     const String&   GetStyle1() const   { return aStyle1; }
     148           0 :     sal_uInt32          GetTimeout() const  { return nTimeout; }
     149           0 :     const String&   GetStyle2() const   { return aStyle2; }
     150             : };
     151             : 
     152             : class ScDBRangeRefreshedHint : public SfxHint
     153             : {
     154             :     ScImportParam   aParam;
     155             : 
     156             : public:
     157             :                     TYPEINFO();
     158             :                     ScDBRangeRefreshedHint( const ScImportParam& rP );
     159             :                     ~ScDBRangeRefreshedHint();
     160             : 
     161           0 :     const ScImportParam&  GetImportParam() const    { return aParam; }
     162             : };
     163             : 
     164             : class ScDataPilotModifiedHint : public SfxHint
     165             : {
     166             :     String          maName;
     167             : 
     168             : public:
     169             :                     TYPEINFO();
     170             :                     ScDataPilotModifiedHint( const String& rName );
     171             :                     ~ScDataPilotModifiedHint();
     172             : 
     173          34 :     const String&   GetName() const { return maName; }
     174             : };
     175             : 
     176             : #endif
     177             : 
     178             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10