LCOV - code coverage report
Current view: top level - sc/inc - chgviset.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 33 0.0 %
Date: 2014-04-14 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             :     bool                bShowIt;
      48             :     bool                bIsDate;
      49             :     bool                bIsAuthor;
      50             :     bool                bIsComment;
      51             :     bool                bIsRange;
      52             :     bool                bEveryoneButMe;
      53             :     bool                bShowAccepted;
      54             :     bool                bShowRejected;
      55             :     bool                mbIsActionRange;
      56             :     sal_uLong           mnFirstAction;
      57             :     sal_uLong           mnLastAction;
      58             : 
      59             : public:
      60             : 
      61           0 :     ScChangeViewSettings()
      62             :         : pCommentSearcher(NULL)
      63             :         , aFirstDateTime(DateTime::EMPTY)
      64             :         , aLastDateTime(DateTime::EMPTY)
      65             :         , eDateMode(SCDM_DATE_BEFORE)
      66             :         , bShowIt(false)
      67             :         , bIsDate(false)
      68             :         , bIsAuthor(false)
      69             :         , bIsComment(false)
      70             :         , bIsRange(false)
      71             :         , bEveryoneButMe(false)
      72             :         , bShowAccepted(false)
      73             :         , bShowRejected(false)
      74             :         , mbIsActionRange(false)
      75             :         , mnFirstAction(0)
      76           0 :         , mnLastAction(0)
      77             :     {
      78           0 :     }
      79             : 
      80             :     ScChangeViewSettings( const ScChangeViewSettings& r );
      81             : 
      82             :     ~ScChangeViewSettings();
      83             : 
      84           0 :     bool                ShowChanges() const {return bShowIt;}
      85           0 :     void                SetShowChanges(bool nFlag) {bShowIt=nFlag;}
      86             : 
      87           0 :     bool                HasDate() const {return bIsDate;}
      88           0 :     void                SetHasDate(bool nFlag) {bIsDate=nFlag;}
      89             : 
      90           0 :     void                SetTheDateMode(ScChgsDateMode eDatMod){ eDateMode=eDatMod; }
      91           0 :     ScChgsDateMode      GetTheDateMode() const { return eDateMode; }
      92             : 
      93           0 :     void                SetTheFirstDateTime(const DateTime& aDateTime) {aFirstDateTime=aDateTime;}
      94           0 :     const DateTime&     GetTheFirstDateTime()const {return aFirstDateTime;}
      95             : 
      96           0 :     void                SetTheLastDateTime(const DateTime& aDateTime) {aLastDateTime=aDateTime;}
      97           0 :     const DateTime&     GetTheLastDateTime()const {return aLastDateTime;}
      98             : 
      99             : 
     100           0 :     bool                HasAuthor() const {return bIsAuthor;}
     101           0 :     void                SetHasAuthor(bool nFlag) {bIsAuthor=nFlag;}
     102             : 
     103           0 :     OUString            GetTheAuthorToShow()const {return aAuthorToShow;}
     104           0 :     void                SetTheAuthorToShow(const OUString& aString){aAuthorToShow=aString;}
     105             : 
     106           0 :     bool                HasComment() const {return bIsComment;}
     107           0 :     void                SetHasComment(bool nFlag) {bIsComment=nFlag;}
     108             : 
     109           0 :     OUString            GetTheComment()const {return aComment;}
     110             :     void                SetTheComment(const OUString& aString);
     111             : 
     112             :     bool                IsValidComment(const OUString* pCommentStr) const;
     113             : 
     114           0 :     bool                IsEveryoneButMe() const {return bEveryoneButMe;}
     115             :     void                SetEveryoneButMe(bool nFlag) {bEveryoneButMe=nFlag;}
     116             : 
     117             : 
     118           0 :     bool                HasRange() const {return bIsRange;}
     119           0 :     void                SetHasRange(bool nFlag) {bIsRange=nFlag;}
     120             : 
     121           0 :     const ScRangeList&  GetTheRangeList()const {return aRangeList;}
     122           0 :     void                SetTheRangeList(const ScRangeList& aRl){aRangeList=aRl;}
     123             : 
     124           0 :     bool                IsShowAccepted() const { return bShowAccepted; }
     125           0 :     void                SetShowAccepted( bool bVal ) { bShowAccepted = bVal; }
     126             : 
     127           0 :     bool                IsShowRejected() const { return bShowRejected; }
     128           0 :     void                SetShowRejected( bool bVal ) { bShowRejected = bVal; }
     129             : 
     130             :     ScChangeViewSettings&   operator=   ( const ScChangeViewSettings& r );
     131             : 
     132             :                         /// Adjust dates according to selected DateMode
     133             :     void                AdjustDateMode( const ScDocument& rDoc );
     134             : 
     135           0 :     bool                HasActionRange() const { return mbIsActionRange; }
     136           0 :     void                SetHasActionRange( bool nFlag = true ) { mbIsActionRange = nFlag; }
     137           0 :     void                GetTheActionRange( sal_uLong& nFirst, sal_uLong& nLast ) const { nFirst = mnFirstAction; nLast = mnLastAction; }
     138           0 :     void                SetTheActionRange( sal_uLong nFirst, sal_uLong nLast ) { mnFirstAction = nFirst; mnLastAction = nLast; }
     139             : };
     140             : 
     141             : #endif
     142             : 
     143             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10