Resolves: tdf#162278 get popup position relative to the dest parent
[LibreOffice.git] / sc / inc / refhint.hxx
blobad13287ede653f292dba8dbdb4c16f607e3e40f0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #pragma once
12 #include "types.hxx"
13 #include <svl/hint.hxx>
15 namespace sc {
17 struct RefUpdateContext;
18 class ColRowReorderMapType;
20 class RefHint : public SfxHint
22 public:
23 enum Type {
24 ColumnReordered,
25 RowReordered,
26 StartListening,
27 StopListening
30 private:
31 Type meType;
33 protected:
34 RefHint( Type eType );
36 public:
37 RefHint() = delete;
38 virtual ~RefHint() override = 0;
40 RefHint(RefHint const &) = default;
41 RefHint(RefHint &&) = default;
42 RefHint & operator =(RefHint const &) = delete;
43 RefHint & operator =(RefHint &&) = delete;
45 Type getType() const;
48 class RefColReorderHint final : public RefHint
50 const sc::ColRowReorderMapType& mrColMap;
51 SCTAB mnTab;
52 SCROW mnRow1;
53 SCROW mnRow2;
55 public:
56 RefColReorderHint( const sc::ColRowReorderMapType& rColMap, SCTAB nTab, SCROW nRow1, SCROW nRow2 );
57 virtual ~RefColReorderHint() override;
59 RefColReorderHint(RefColReorderHint const &) = default;
60 RefColReorderHint(RefColReorderHint &&) = default;
61 RefColReorderHint & operator =(RefColReorderHint const &) = delete; // due to mrColMap
62 RefColReorderHint & operator =(RefColReorderHint &&) = delete; // due to mrColMap
64 const sc::ColRowReorderMapType& getColMap() const;
66 SCTAB getTab() const;
67 SCROW getStartRow() const;
68 SCROW getEndRow() const;
71 class RefRowReorderHint final : public RefHint
73 const sc::ColRowReorderMapType& mrRowMap;
74 SCTAB mnTab;
75 SCCOL mnCol1;
76 SCCOL mnCol2;
78 public:
79 RefRowReorderHint( const sc::ColRowReorderMapType& rRowMap, SCTAB nTab, SCCOL nCol1, SCCOL nCol2 );
80 virtual ~RefRowReorderHint() override;
82 RefRowReorderHint(RefRowReorderHint const &) = default;
83 RefRowReorderHint(RefRowReorderHint &&) = default;
84 RefRowReorderHint & operator =(RefRowReorderHint const &) = delete; // due to mrRowMap
85 RefRowReorderHint & operator =(RefRowReorderHint &&) = delete; // due to mrRowMap
87 const sc::ColRowReorderMapType& getRowMap() const;
89 SCTAB getTab() const;
90 SCCOL getStartColumn() const;
91 SCCOL getEndColumn() const;
94 class RefStartListeningHint final : public RefHint
96 public:
97 RefStartListeningHint();
98 virtual ~RefStartListeningHint() override;
101 class RefStopListeningHint final : public RefHint
103 public:
104 RefStopListeningHint();
105 virtual ~RefStopListeningHint() override;
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */