LibreOffice Module sc (master) 1
chgviset.hxx
Go to the documentation of this file.
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#pragma once
20
21#include <memory>
22#include <tools/datetime.hxx>
23#include <tools/solar.h>
25#include <svx/ctredlin.hxx>
26#include "rangelst.hxx"
27#include "scdllapi.h"
28
29class ScDocument;
30
32{
33private:
34
35 std::unique_ptr<utl::TextSearch>
39 OUString aAuthorToShow;
40 OUString aComment;
43 bool bShowIt;
44 bool bIsDate;
53
54public:
55
57 : aFirstDateTime(DateTime::EMPTY)
58 , aLastDateTime(DateTime::EMPTY)
59 , eDateMode(SvxRedlinDateMode::BEFORE)
60 , bShowIt(false)
61 , bIsDate(false)
62 , bIsAuthor(false)
63 , bIsComment(false)
64 , bIsRange(false)
65 , bShowAccepted(false)
66 , bShowRejected(false)
67 , mbIsActionRange(false)
68 , mnFirstAction(0)
69 , mnLastAction(0)
70 {
71 }
72
74
76
77 bool ShowChanges() const {return bShowIt;}
78 void SetShowChanges(bool bFlag) {bShowIt=bFlag;}
79
80 bool HasDate() const {return bIsDate;}
81 void SetHasDate(bool bFlag) {bIsDate=bFlag;}
82
83 void SetTheDateMode(SvxRedlinDateMode eDatMod){ eDateMode=eDatMod; }
84 SvxRedlinDateMode GetTheDateMode() const { return eDateMode; }
85
86 void SetTheFirstDateTime(const DateTime& aDateTime) {aFirstDateTime=aDateTime;}
87 const DateTime& GetTheFirstDateTime()const {return aFirstDateTime;}
88
89 void SetTheLastDateTime(const DateTime& aDateTime) {aLastDateTime=aDateTime;}
90 const DateTime& GetTheLastDateTime()const {return aLastDateTime;}
91
92 bool HasAuthor() const {return bIsAuthor;}
93 void SetHasAuthor(bool bFlag) {bIsAuthor=bFlag;}
94
95 const OUString& GetTheAuthorToShow()const {return aAuthorToShow;}
96 void SetTheAuthorToShow(const OUString& aString){aAuthorToShow=aString;}
97
98 bool HasComment() const {return bIsComment;}
99 void SetHasComment(bool bFlag) {bIsComment=bFlag;}
100
101 const OUString& GetTheComment()const {return aComment;}
102 void SetTheComment(const OUString& aString);
103
104 bool IsValidComment(const OUString* pCommentStr) const;
105
106 bool HasRange() const {return bIsRange;}
107 void SetHasRange(bool bFlag) {bIsRange=bFlag;}
108
109 const ScRangeList& GetTheRangeList()const {return aRangeList;}
110 void SetTheRangeList(const ScRangeList& aRl){aRangeList=aRl;}
111
112 bool IsShowAccepted() const { return bShowAccepted; }
113 void SetShowAccepted( bool bVal ) { bShowAccepted = bVal; }
114
115 bool IsShowRejected() const { return bShowRejected; }
116 void SetShowRejected( bool bVal ) { bShowRejected = bVal; }
117
118 ScChangeViewSettings& operator= ( const ScChangeViewSettings& r );
119
121 void AdjustDateMode( const ScDocument& rDoc );
122
123 bool HasActionRange() const { return mbIsActionRange; }
124 void SetHasActionRange() { mbIsActionRange = true; }
125 void GetTheActionRange( sal_uLong& nFirst, sal_uLong& nLast ) const { nFirst = mnFirstAction; nLast = mnLastAction; }
126 void SetTheActionRange( sal_uLong nFirst, sal_uLong nLast ) { mnFirstAction = nFirst; mnLastAction = nLast; }
127};
128
129/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const ScRangeList & GetTheRangeList() const
Definition: chgviset.hxx:109
void SetHasDate(bool bFlag)
Definition: chgviset.hxx:81
DateTime aFirstDateTime
Definition: chgviset.hxx:37
void SetHasAuthor(bool bFlag)
Definition: chgviset.hxx:93
void SetHasRange(bool bFlag)
Definition: chgviset.hxx:107
ScRangeList aRangeList
Definition: chgviset.hxx:41
OUString aAuthorToShow
Definition: chgviset.hxx:39
DateTime aLastDateTime
Definition: chgviset.hxx:38
bool HasAuthor() const
Definition: chgviset.hxx:92
const OUString & GetTheComment() const
Definition: chgviset.hxx:101
void SetTheLastDateTime(const DateTime &aDateTime)
Definition: chgviset.hxx:89
const DateTime & GetTheFirstDateTime() const
Definition: chgviset.hxx:87
SvxRedlinDateMode GetTheDateMode() const
Definition: chgviset.hxx:84
bool IsShowRejected() const
Definition: chgviset.hxx:115
void SetTheFirstDateTime(const DateTime &aDateTime)
Definition: chgviset.hxx:86
bool HasComment() const
Definition: chgviset.hxx:98
bool HasDate() const
Definition: chgviset.hxx:80
void SetShowChanges(bool bFlag)
Definition: chgviset.hxx:78
bool HasRange() const
Definition: chgviset.hxx:106
bool HasActionRange() const
Definition: chgviset.hxx:123
bool ShowChanges() const
Definition: chgviset.hxx:77
void SetTheDateMode(SvxRedlinDateMode eDatMod)
Definition: chgviset.hxx:83
sal_uLong mnFirstAction
Definition: chgviset.hxx:51
sal_uLong mnLastAction
Definition: chgviset.hxx:52
void SetShowRejected(bool bVal)
Definition: chgviset.hxx:116
SvxRedlinDateMode eDateMode
Definition: chgviset.hxx:42
std::unique_ptr< utl::TextSearch > pCommentSearcher
Definition: chgviset.hxx:36
void SetTheAuthorToShow(const OUString &aString)
Definition: chgviset.hxx:96
void SetTheRangeList(const ScRangeList &aRl)
Definition: chgviset.hxx:110
const DateTime & GetTheLastDateTime() const
Definition: chgviset.hxx:90
void SetTheActionRange(sal_uLong nFirst, sal_uLong nLast)
Definition: chgviset.hxx:126
void SetShowAccepted(bool bVal)
Definition: chgviset.hxx:113
bool IsShowAccepted() const
Definition: chgviset.hxx:112
const OUString & GetTheAuthorToShow() const
Definition: chgviset.hxx:95
void GetTheActionRange(sal_uLong &nFirst, sal_uLong &nLast) const
Definition: chgviset.hxx:125
void SetHasComment(bool bFlag)
Definition: chgviset.hxx:99
SvxRedlinDateMode
constexpr OUStringLiteral EMPTY
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
sal_uIntPtr sal_uLong