LibreOffice Module sc (master)  1
refhint.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 
10 #pragma once
11 
12 #include "types.hxx"
13 #include <svl/hint.hxx>
14 
15 namespace sc {
16 
17 struct RefUpdateContext;
18 class ColRowReorderMapType;
19 
20 class RefHint : public SfxHint
21 {
22 public:
23  enum Type {
28  };
29 
30 private:
32 
33 protected:
34  RefHint( Type eType );
35 
36 public:
37  RefHint() = delete;
38  virtual ~RefHint() override = 0;
39 
40  RefHint(RefHint const &) = default;
41  RefHint(RefHint &&) = default;
42  RefHint & operator =(RefHint const &) = delete;
43  RefHint & operator =(RefHint &&) = delete;
44 
45  Type getType() const;
46 };
47 
48 class RefColReorderHint final : public RefHint
49 {
54 
55 public:
56  RefColReorderHint( const sc::ColRowReorderMapType& rColMap, SCTAB nTab, SCROW nRow1, SCROW nRow2 );
57  virtual ~RefColReorderHint() override;
58 
59  RefColReorderHint(RefColReorderHint const &) = default;
61  RefColReorderHint & operator =(RefColReorderHint const &) = delete; // due to mrColMap
62  RefColReorderHint & operator =(RefColReorderHint &&) = delete; // due to mrColMap
63 
64  const sc::ColRowReorderMapType& getColMap() const;
65 
66  SCTAB getTab() const;
67  SCROW getStartRow() const;
68  SCROW getEndRow() const;
69 };
70 
71 class RefRowReorderHint final : public RefHint
72 {
77 
78 public:
79  RefRowReorderHint( const sc::ColRowReorderMapType& rRowMap, SCTAB nTab, SCCOL nCol1, SCCOL nCol2 );
80  virtual ~RefRowReorderHint() override;
81 
82  RefRowReorderHint(RefRowReorderHint const &) = default;
84  RefRowReorderHint & operator =(RefRowReorderHint const &) = delete; // due to mrRowMap
85  RefRowReorderHint & operator =(RefRowReorderHint &&) = delete; // due to mrRowMap
86 
87  const sc::ColRowReorderMapType& getRowMap() const;
88 
89  SCTAB getTab() const;
90  SCCOL getStartColumn() const;
91  SCCOL getEndColumn() const;
92 };
93 
94 class RefStartListeningHint final : public RefHint
95 {
96 public:
98  virtual ~RefStartListeningHint() override;
99 };
100 
101 class RefStopListeningHint final : public RefHint
102 {
103 public:
105  virtual ~RefStopListeningHint() override;
106 };
107 
108 }
109 
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~RefHint() override=0
Definition: refhint.cxx:15
SCTAB getTab() const
Definition: refhint.cxx:32
SCCOL getStartColumn() const
Definition: refhint.cxx:62
SCCOL getEndColumn() const
Definition: refhint.cxx:67
SCROW getEndRow() const
Definition: refhint.cxx:42
RefRowReorderHint(const sc::ColRowReorderMapType &rRowMap, SCTAB nTab, SCCOL nCol1, SCCOL nCol2)
Definition: refhint.cxx:47
SCTAB getTab() const
Definition: refhint.cxx:57
sal_Int16 SCCOL
Definition: types.hxx:21
virtual ~RefRowReorderHint() override
Definition: refhint.cxx:50
RefRowReorderHint & operator=(RefRowReorderHint const &)=delete
RefHint()=delete
const sc::ColRowReorderMapType & mrRowMap
Definition: refhint.hxx:73
const sc::ColRowReorderMapType & getColMap() const
Definition: refhint.cxx:27
const sc::ColRowReorderMapType & mrColMap
Definition: refhint.hxx:50
const sc::ColRowReorderMapType & getRowMap() const
Definition: refhint.cxx:52
virtual ~RefStopListeningHint() override
Definition: refhint.cxx:76
sal_Int32 SCROW
Definition: types.hxx:17
Type getType() const
Definition: refhint.cxx:17
virtual ~RefColReorderHint() override
Definition: refhint.cxx:25
RefHint & operator=(RefHint const &)=delete
RefColReorderHint(const sc::ColRowReorderMapType &rColMap, SCTAB nTab, SCROW nRow1, SCROW nRow2)
Definition: refhint.cxx:22
Type meType
Definition: refhint.hxx:31
SCROW getStartRow() const
Definition: refhint.cxx:37
RefColReorderHint & operator=(RefColReorderHint const &)=delete
virtual ~RefStartListeningHint() override
Definition: refhint.cxx:73
sal_Int16 SCTAB
Definition: types.hxx:22