summaryrefslogtreecommitdiffstats
path: root/sc/inc/refhint.hxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /sc/inc/refhint.hxx
parentInitial commit. (diff)
downloadlibreoffice-upstream.tar.xz
libreoffice-upstream.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sc/inc/refhint.hxx')
-rw-r--r--sc/inc/refhint.hxx110
1 files changed, 110 insertions, 0 deletions
diff --git a/sc/inc/refhint.hxx b/sc/inc/refhint.hxx
new file mode 100644
index 000000000..ad13287ed
--- /dev/null
+++ b/sc/inc/refhint.hxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include "types.hxx"
+#include <svl/hint.hxx>
+
+namespace sc {
+
+struct RefUpdateContext;
+class ColRowReorderMapType;
+
+class RefHint : public SfxHint
+{
+public:
+ enum Type {
+ ColumnReordered,
+ RowReordered,
+ StartListening,
+ StopListening
+ };
+
+private:
+ Type meType;
+
+protected:
+ RefHint( Type eType );
+
+public:
+ RefHint() = delete;
+ virtual ~RefHint() override = 0;
+
+ RefHint(RefHint const &) = default;
+ RefHint(RefHint &&) = default;
+ RefHint & operator =(RefHint const &) = delete;
+ RefHint & operator =(RefHint &&) = delete;
+
+ Type getType() const;
+};
+
+class RefColReorderHint final : public RefHint
+{
+ const sc::ColRowReorderMapType& mrColMap;
+ SCTAB mnTab;
+ SCROW mnRow1;
+ SCROW mnRow2;
+
+public:
+ RefColReorderHint( const sc::ColRowReorderMapType& rColMap, SCTAB nTab, SCROW nRow1, SCROW nRow2 );
+ virtual ~RefColReorderHint() override;
+
+ RefColReorderHint(RefColReorderHint const &) = default;
+ RefColReorderHint(RefColReorderHint &&) = default;
+ RefColReorderHint & operator =(RefColReorderHint const &) = delete; // due to mrColMap
+ RefColReorderHint & operator =(RefColReorderHint &&) = delete; // due to mrColMap
+
+ const sc::ColRowReorderMapType& getColMap() const;
+
+ SCTAB getTab() const;
+ SCROW getStartRow() const;
+ SCROW getEndRow() const;
+};
+
+class RefRowReorderHint final : public RefHint
+{
+ const sc::ColRowReorderMapType& mrRowMap;
+ SCTAB mnTab;
+ SCCOL mnCol1;
+ SCCOL mnCol2;
+
+public:
+ RefRowReorderHint( const sc::ColRowReorderMapType& rRowMap, SCTAB nTab, SCCOL nCol1, SCCOL nCol2 );
+ virtual ~RefRowReorderHint() override;
+
+ RefRowReorderHint(RefRowReorderHint const &) = default;
+ RefRowReorderHint(RefRowReorderHint &&) = default;
+ RefRowReorderHint & operator =(RefRowReorderHint const &) = delete; // due to mrRowMap
+ RefRowReorderHint & operator =(RefRowReorderHint &&) = delete; // due to mrRowMap
+
+ const sc::ColRowReorderMapType& getRowMap() const;
+
+ SCTAB getTab() const;
+ SCCOL getStartColumn() const;
+ SCCOL getEndColumn() const;
+};
+
+class RefStartListeningHint final : public RefHint
+{
+public:
+ RefStartListeningHint();
+ virtual ~RefStartListeningHint() override;
+};
+
+class RefStopListeningHint final : public RefHint
+{
+public:
+ RefStopListeningHint();
+ virtual ~RefStopListeningHint() override;
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */