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

Generated by: LCOV version 1.10