sc/inc/SheetView.hxx                        |   22 ------------
 sc/inc/SheetViewManager.hxx                 |   50 ++++++++++++++++++++++++++++
 sc/qa/unit/tiledrendering/SheetViewTest.cxx |    1 
 sc/source/core/data/SheetViewManager.cxx    |    2 -
 sc/source/core/data/document10.cxx          |    2 -
 sc/source/core/data/table1.cxx              |    2 -
 sc/source/ui/view/viewfun3.cxx              |    2 -
 sc/source/ui/view/viewfunc.cxx              |    2 -
 8 files changed, 56 insertions(+), 27 deletions(-)

New commits:
commit be4fadfaf47c74ec625eaa9e497e8bc38b4eb3c1
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Tue Aug 12 12:48:34 2025 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Sep 17 16:30:17 2025 +0200

    sc: move SheetViewManager into own header file, describe methods.
    
    No other functional change was made, just simplification.
    
    Change-Id: I9d34f1525470f6517b315be48f519f6a6e1b62f9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189857
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit eb514bdac8850ef8b26bda68a5a39a0906ad83ce)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191084
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sc/inc/SheetView.hxx b/sc/inc/SheetView.hxx
index b7db3e84b22a..2f381f1472e9 100644
--- a/sc/inc/SheetView.hxx
+++ b/sc/inc/SheetView.hxx
@@ -8,8 +8,6 @@
  */
 
 #pragma once
-#include <vector>
-#include "SheetViewTypes.hxx"
 #include "types.hxx"
 
 class ScTable;
@@ -36,26 +34,6 @@ public:
     /** A sheet view is valid if the pointer to the table is set */
     bool isValid() const;
 };
-
-/** Manager and the holder of the sheet views for a sheet. */
-class SheetViewManager
-{
-private:
-    std::vector<SheetView> maViews;
-
-public:
-    SheetViewManager();
-
-    /** Creates a new sheet view. */
-    SheetViewID create(ScTable* pSheetViewTable);
-
-    /** Returns a sheet view for the ID. */
-    SheetView get(SheetViewID nID) const;
-    bool isEmpty() const { return maViews.empty(); }
-    bool remove(SheetViewID nID);
-    std::vector<SheetView> const& getSheetViews() const { return maViews; }
-    SheetViewID getNextSheetView(SheetViewID nID);
-};
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/SheetViewManager.hxx b/sc/inc/SheetViewManager.hxx
new file mode 100644
index 000000000000..e807cbd8fb57
--- /dev/null
+++ b/sc/inc/SheetViewManager.hxx
@@ -0,0 +1,50 @@
+/* -*- 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 "SheetViewTypes.hxx"
+#include "SheetView.hxx"
+#include "types.hxx"
+
+#include <vector>
+
+class ScTable;
+
+namespace sc
+{
+/** Manager and the holder of the sheet views for a sheet. */
+class SheetViewManager
+{
+private:
+    std::vector<SheetView> maViews;
+
+public:
+    SheetViewManager();
+
+    /** Creates a new sheet view. */
+    SheetViewID create(ScTable* pSheetViewTable);
+
+    /** Returns a sheet view for the ID. */
+    SheetView get(SheetViewID nID) const;
+
+    /** True if there are no sheet views. */
+    bool isEmpty() const { return maViews.empty(); }
+
+    /** Remove the sheet view with the ID. True if successful. */
+    bool remove(SheetViewID nID);
+
+    /** Return the list of sheet views. */
+    std::vector<SheetView> const& getSheetViews() const { return maViews; }
+
+    /** Calculate the next sheet view ID from the current ID. */
+    SheetViewID getNextSheetView(SheetViewID nID);
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/tiledrendering/SheetViewTest.cxx 
b/sc/qa/unit/tiledrendering/SheetViewTest.cxx
index 6363034b6bfb..0777efe4f412 100644
--- a/sc/qa/unit/tiledrendering/SheetViewTest.cxx
+++ b/sc/qa/unit/tiledrendering/SheetViewTest.cxx
@@ -17,6 +17,7 @@
 #include <sctestviewcallback.hxx>
 #include <docuno.hxx>
 #include <SheetView.hxx>
+#include <SheetViewManager.hxx>
 
 using namespace css;
 
diff --git a/sc/source/core/data/SheetViewManager.cxx 
b/sc/source/core/data/SheetViewManager.cxx
index a57ea9666025..ffbd41c8f298 100644
--- a/sc/source/core/data/SheetViewManager.cxx
+++ b/sc/source/core/data/SheetViewManager.cxx
@@ -7,7 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <SheetView.hxx>
+#include <SheetViewManager.hxx>
 #include <table.hxx>
 
 namespace sc
diff --git a/sc/source/core/data/document10.cxx 
b/sc/source/core/data/document10.cxx
index 9883e0412e72..8cf23b7d97c7 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -28,7 +28,7 @@
 #include <docsh.hxx>
 #include <bcaslot.hxx>
 #include <broadcast.hxx>
-#include <SheetView.hxx>
+#include <SheetViewManager.hxx>
 
 // Add totally brand-new methods to this source file.
 
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index af27f9405c1b..2a783606dcf6 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -53,7 +53,7 @@
 #include <rowheightcontext.hxx>
 #include <compressedarray.hxx>
 #include <tabvwsh.hxx>
-#include <SheetView.hxx>
+#include <SheetViewManager.hxx>
 #include <vcl/svapp.hxx>
 
 #include <formula/vectortoken.hxx>
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 85622824f067..b1d284114636 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -63,7 +63,7 @@
 #include <cliputil.hxx>
 #include <clipoptions.hxx>
 #include <gridwin.hxx>
-#include <SheetView.hxx>
+#include <SheetViewManager.hxx>
 #include <uiitems.hxx>
 #include <com/sun/star/util/XCloneable.hpp>
 
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index e39f68db126a..8fbdd4535ae5 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -77,7 +77,7 @@
 #include <columnspanset.hxx>
 #include <stringutil.hxx>
 #include <SparklineList.hxx>
-#include <SheetView.hxx>
+#include <SheetViewManager.hxx>
 
 #include <memory>
 

Reply via email to