LCOV - code coverage report
Current view: top level - sc/inc - hints.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 20 27 74.1 %
Date: 2012-08-25 Functions: 20 27 74.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef SC_HINTS_HXX
      30                 :            : #define SC_HINTS_HXX
      31                 :            : 
      32                 :            : #include "global.hxx"
      33                 :            : #include "address.hxx"
      34                 :            : #include <svl/hint.hxx>
      35                 :            : 
      36                 :            : // ---------------------------------------------------------------------------
      37                 :            : 
      38                 :            : class ScPaintHint : public SfxHint
      39                 :            : {
      40                 :            :     ScRange     aRange;
      41                 :            :     sal_uInt16      nParts;
      42                 :            :     sal_Bool        bPrint;     //  flag indicating whether print/preview if affected
      43                 :            : 
      44                 :            :     ScPaintHint(); // disabled
      45                 :            : 
      46                 :            : public:
      47                 :            :                     TYPEINFO();
      48                 :            :                     ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint = PAINT_ALL );
      49                 :            :                     ~ScPaintHint();
      50                 :            : 
      51                 :        195 :     void            SetPrintFlag(sal_Bool bSet) { bPrint = bSet; }
      52                 :            : 
      53                 :            :     const ScRange&  GetRange() const        { return aRange; }
      54                 :       3625 :     SCCOL           GetStartCol() const     { return aRange.aStart.Col(); }
      55                 :       3742 :     SCROW           GetStartRow() const     { return aRange.aStart.Row(); }
      56                 :       4144 :     SCTAB           GetStartTab() const     { return aRange.aStart.Tab(); }
      57                 :       3625 :     SCCOL           GetEndCol() const       { return aRange.aEnd.Col(); }
      58                 :       3742 :     SCROW           GetEndRow() const       { return aRange.aEnd.Row(); }
      59                 :       4121 :     SCTAB           GetEndTab() const       { return aRange.aEnd.Tab(); }
      60                 :       4154 :     sal_uInt16          GetParts() const        { return nParts; }
      61                 :         15 :     sal_Bool            GetPrintFlag() const    { return bPrint; }
      62                 :            : };
      63                 :            : 
      64                 :            : 
      65                 :            : class ScUpdateRefHint : public SfxHint
      66                 :            : {
      67                 :            :     UpdateRefMode   eUpdateRefMode;
      68                 :            :     ScRange         aRange;
      69                 :            :     SCsCOL          nDx;
      70                 :            :     SCsROW          nDy;
      71                 :            :     SCsTAB          nDz;
      72                 :            : 
      73                 :            : public:
      74                 :            :                     TYPEINFO();
      75                 :            : 
      76                 :            :                     ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR,
      77                 :            :                                         SCsCOL nX, SCsROW nY, SCsTAB nZ );
      78                 :            :                     ~ScUpdateRefHint();
      79                 :            : 
      80                 :       5702 :     UpdateRefMode   GetMode() const         { return eUpdateRefMode; }
      81                 :       3043 :     const ScRange&  GetRange() const        { return aRange; }
      82                 :       3043 :     SCsCOL          GetDx() const           { return nDx; }
      83                 :       3043 :     SCsROW          GetDy() const           { return nDy; }
      84                 :       3043 :     SCsTAB          GetDz() const           { return nDz; }
      85                 :            : };
      86                 :            : 
      87                 :            : 
      88                 :            : #define SC_POINTERCHANGED_NUMFMT    1
      89                 :            : 
      90                 :            : class ScPointerChangedHint : public SfxHint
      91                 :            : {
      92                 :            :     sal_uInt16          nFlags;
      93                 :            : 
      94                 :            : public:
      95                 :            :                     TYPEINFO();
      96                 :            : 
      97                 :            :                     ~ScPointerChangedHint();
      98                 :            : 
      99                 :          0 :     sal_uInt16          GetFlags() const            { return nFlags; }
     100                 :            : };
     101                 :            : 
     102                 :            : 
     103                 :            : //! move ScLinkRefreshedHint to a different file?
     104                 :            : 
     105                 :            : #define SC_LINKREFTYPE_NONE     0
     106                 :            : #define SC_LINKREFTYPE_SHEET    1
     107                 :            : #define SC_LINKREFTYPE_AREA     2
     108                 :            : #define SC_LINKREFTYPE_DDE      3
     109                 :            : 
     110                 :            : class ScLinkRefreshedHint : public SfxHint
     111                 :            : {
     112                 :            :     sal_uInt16      nLinkType;  // SC_LINKREFTYPE_...
     113                 :            :     String      aUrl;       // used for sheet links
     114                 :            :     String      aDdeAppl;   // used for dde links:
     115                 :            :     String      aDdeTopic;
     116                 :            :     String      aDdeItem;
     117                 :            :     sal_uInt8       nDdeMode;
     118                 :            :     ScAddress   aDestPos;   // used to identify area links
     119                 :            :                             //! also use source data for area links?
     120                 :            : 
     121                 :            : public:
     122                 :            :                     TYPEINFO();
     123                 :            :                     ScLinkRefreshedHint();
     124                 :            :                     ~ScLinkRefreshedHint();
     125                 :            : 
     126                 :            :     void            SetSheetLink( const String& rSourceUrl );
     127                 :            :     void            SetDdeLink( const String& rA, const String& rT, const String& rI, sal_uInt8 nM );
     128                 :            :     void            SetAreaLink( const ScAddress& rPos );
     129                 :            : 
     130                 :          3 :     sal_uInt16              GetLinkType() const { return nLinkType; }
     131                 :          0 :     const String&       GetUrl() const      { return aUrl; }
     132                 :          2 :     const String&       GetDdeAppl() const  { return aDdeAppl; }
     133                 :          2 :     const String&       GetDdeTopic() const { return aDdeTopic; }
     134                 :          2 :     const String&       GetDdeItem() const  { return aDdeItem; }
     135                 :            :     sal_uInt8               GetDdeMode() const  { return nDdeMode; }
     136                 :          1 :     const ScAddress&    GetDestPos() const  { return aDestPos; }
     137                 :            : };
     138                 :            : 
     139                 :            : 
     140                 :            : //! move ScAutoStyleHint to a different file?
     141                 :            : 
     142                 :            : class ScAutoStyleHint : public SfxHint
     143                 :            : {
     144                 :            :     ScRange     aRange;
     145                 :            :     String      aStyle1;
     146                 :            :     String      aStyle2;
     147                 :            :     sal_uLong       nTimeout;
     148                 :            : 
     149                 :            : public:
     150                 :            :                     TYPEINFO();
     151                 :            :                     ScAutoStyleHint( const ScRange& rR, const String& rSt1,
     152                 :            :                                         sal_uLong nT, const String& rSt2 );
     153                 :            :                     ~ScAutoStyleHint();
     154                 :            : 
     155                 :          0 :     const ScRange&  GetRange() const    { return aRange; }
     156                 :          0 :     const String&   GetStyle1() const   { return aStyle1; }
     157                 :          0 :     sal_uInt32          GetTimeout() const  { return nTimeout; }
     158                 :          0 :     const String&   GetStyle2() const   { return aStyle2; }
     159                 :            : };
     160                 :            : 
     161                 :            : class ScDBRangeRefreshedHint : public SfxHint
     162                 :            : {
     163                 :            :     ScImportParam   aParam;
     164                 :            : 
     165                 :            : public:
     166                 :            :                     TYPEINFO();
     167                 :            :                     ScDBRangeRefreshedHint( const ScImportParam& rP );
     168                 :            :                     ~ScDBRangeRefreshedHint();
     169                 :            : 
     170                 :          0 :     const ScImportParam&  GetImportParam() const    { return aParam; }
     171                 :            : };
     172                 :            : 
     173                 :            : class ScDataPilotModifiedHint : public SfxHint
     174                 :            : {
     175                 :            :     String          maName;
     176                 :            : 
     177                 :            : public:
     178                 :            :                     TYPEINFO();
     179                 :            :                     ScDataPilotModifiedHint( const String& rName );
     180                 :            :                     ~ScDataPilotModifiedHint();
     181                 :            : 
     182                 :         60 :     const String&   GetName() const { return maName; }
     183                 :            : };
     184                 :            : 
     185                 :            : #endif
     186                 :            : 
     187                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10