LCOV - code coverage report
Current view: top level - sc/inc - chgviset.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 44 0.0 %
Date: 2012-08-25 Functions: 0 31 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 2 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                 :            : #ifndef SC_CHGVISET_HXX
      29                 :            : #define SC_CHGVISET_HXX
      30                 :            : 
      31                 :            : #include <tools/datetime.hxx>
      32                 :            : #include "rangelst.hxx"
      33                 :            : #include "scdllapi.h"
      34                 :            : 
      35                 :            : enum ScChgsDateMode{    SCDM_DATE_BEFORE=0,SCDM_DATE_SINCE=1,SCDM_DATE_EQUAL=2,
      36                 :            :                         SCDM_DATE_NOTEQUAL=3,SCDM_DATE_BETWEEN=4, SCDM_DATE_SAVE=5,
      37                 :            :                         SCDM_NO_DATEMODE=6};
      38                 :            : 
      39                 :            : namespace utl {
      40                 :            :     class TextSearch;
      41                 :            : }
      42                 :            : 
      43                 :            : class ScDocument;
      44                 :            : 
      45                 :            : class SC_DLLPUBLIC ScChangeViewSettings
      46                 :            : {
      47                 :            : private:
      48                 :            : 
      49                 :            :     utl::TextSearch*    pCommentSearcher;
      50                 :            :     DateTime            aFirstDateTime;
      51                 :            :     DateTime            aLastDateTime;
      52                 :            :     ::rtl::OUString     aAuthorToShow;
      53                 :            :     ::rtl::OUString     aComment;
      54                 :            :     ScRangeList         aRangeList;
      55                 :            :     ScChgsDateMode      eDateMode;
      56                 :            :     sal_Bool                bShowIt;
      57                 :            :     sal_Bool                bIsDate;
      58                 :            :     sal_Bool                bIsAuthor;
      59                 :            :     sal_Bool                bIsComment;
      60                 :            :     sal_Bool                bIsRange;
      61                 :            :     sal_Bool                bEveryoneButMe;
      62                 :            :     sal_Bool                bShowAccepted;
      63                 :            :     sal_Bool                bShowRejected;
      64                 :            :     bool                mbIsActionRange;
      65                 :            :     sal_uLong               mnFirstAction;
      66                 :            :     sal_uLong               mnLastAction;
      67                 :            : 
      68                 :            : public:
      69                 :            : 
      70                 :          0 :                         ScChangeViewSettings() :
      71                 :            :                             aFirstDateTime( DateTime::EMPTY ),
      72         [ #  # ]:          0 :                             aLastDateTime( DateTime::EMPTY )
      73                 :            :                         {
      74                 :          0 :                             pCommentSearcher=NULL;
      75                 :          0 :                             bIsDate=false;
      76                 :          0 :                             bIsAuthor=false;
      77                 :          0 :                             bIsRange=false;
      78                 :          0 :                             bIsComment=false;
      79                 :          0 :                             bShowIt=false;
      80                 :          0 :                             eDateMode=SCDM_DATE_BEFORE;
      81                 :          0 :                             bEveryoneButMe=false;
      82                 :          0 :                             bShowAccepted=false;
      83                 :          0 :                             bShowRejected=false;
      84                 :          0 :                             mbIsActionRange = false;
      85                 :          0 :                         }
      86                 :            : 
      87                 :            :                         ScChangeViewSettings( const ScChangeViewSettings& r );
      88                 :            : 
      89                 :            :                         ~ScChangeViewSettings();
      90                 :            : 
      91                 :          0 :     sal_Bool                ShowChanges() const {return bShowIt;}
      92                 :          0 :     void                SetShowChanges(sal_Bool nFlag=sal_True){bShowIt=nFlag;}
      93                 :            : 
      94                 :          0 :     sal_Bool                HasDate() const {return bIsDate;}
      95                 :          0 :     void                SetHasDate(sal_Bool nFlag=sal_True) {bIsDate=nFlag;}
      96                 :            : 
      97                 :          0 :     void                SetTheDateMode(ScChgsDateMode eDatMod){ eDateMode=eDatMod; }
      98                 :          0 :     ScChgsDateMode      GetTheDateMode() const { return eDateMode; }
      99                 :            : 
     100                 :          0 :     void                SetTheFirstDateTime(const DateTime& aDateTime) {aFirstDateTime=aDateTime;}
     101                 :          0 :     const DateTime&     GetTheFirstDateTime()const {return aFirstDateTime;}
     102                 :            : 
     103                 :          0 :     void                SetTheLastDateTime(const DateTime& aDateTime) {aLastDateTime=aDateTime;}
     104                 :          0 :     const DateTime&     GetTheLastDateTime()const {return aLastDateTime;}
     105                 :            : 
     106                 :            : 
     107                 :          0 :     sal_Bool                HasAuthor() const {return bIsAuthor;}
     108                 :          0 :     void                SetHasAuthor(sal_Bool nFlag=sal_True) {bIsAuthor=nFlag;}
     109                 :            : 
     110                 :          0 :     ::rtl::OUString     GetTheAuthorToShow()const {return aAuthorToShow;}
     111                 :          0 :     void                SetTheAuthorToShow(const ::rtl::OUString& aString){aAuthorToShow=aString;}
     112                 :            : 
     113                 :          0 :     sal_Bool                HasComment() const {return bIsComment;}
     114                 :          0 :     void                SetHasComment(sal_Bool nFlag=sal_True) {bIsComment=nFlag;}
     115                 :            : 
     116                 :          0 :     ::rtl::OUString     GetTheComment()const {return aComment;}
     117                 :            :     void                SetTheComment(const ::rtl::OUString& aString);
     118                 :            : 
     119                 :            :     sal_Bool            IsValidComment(const ::rtl::OUString* pCommentStr) const;
     120                 :            : 
     121                 :          0 :     sal_Bool                IsEveryoneButMe() const {return bEveryoneButMe;}
     122                 :            :     void                SetEveryoneButMe(sal_Bool nFlag=sal_True) {bEveryoneButMe=nFlag;}
     123                 :            : 
     124                 :            : 
     125                 :          0 :     sal_Bool                HasRange() const {return bIsRange;}
     126                 :          0 :     void                SetHasRange(sal_Bool nFlag=sal_True) {bIsRange=nFlag;}
     127                 :            : 
     128                 :          0 :     const ScRangeList&  GetTheRangeList()const {return aRangeList;}
     129                 :          0 :     void                SetTheRangeList(const ScRangeList& aRl){aRangeList=aRl;}
     130                 :            : 
     131                 :          0 :     sal_Bool                IsShowAccepted() const { return bShowAccepted; }
     132                 :          0 :     void                SetShowAccepted( sal_Bool bVal ) { bShowAccepted = bVal; }
     133                 :            : 
     134                 :          0 :     sal_Bool                IsShowRejected() const { return bShowRejected; }
     135                 :          0 :     void                SetShowRejected( sal_Bool bVal ) { bShowRejected = bVal; }
     136                 :            : 
     137                 :            :     ScChangeViewSettings&   operator=   ( const ScChangeViewSettings& r );
     138                 :            : 
     139                 :            :                         /// Adjust dates according to selected DateMode
     140                 :            :     void                AdjustDateMode( const ScDocument& rDoc );
     141                 :            : 
     142                 :          0 :     bool                HasActionRange() const { return mbIsActionRange; }
     143                 :          0 :     void                SetHasActionRange( bool nFlag = true ) { mbIsActionRange = nFlag; }
     144                 :          0 :     void                GetTheActionRange( sal_uLong& nFirst, sal_uLong& nLast ) const { nFirst = mnFirstAction; nLast = mnLastAction; }
     145                 :          0 :     void                SetTheActionRange( sal_uLong nFirst, sal_uLong nLast ) { mnFirstAction = nFirst; mnLastAction = nLast; }
     146                 :            : };
     147                 :            : 
     148                 :            : 
     149                 :            : 
     150                 :            : #endif
     151                 :            : 
     152                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10