From fa9fc166ea6afb70554e35571d94ba37ac130b1f Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 21 May 2026 10:31:47 +0200 Subject: [PATCH] weld: Move weld::Spinner to own header Move the class out of weld.hxx into its own header, in order to make it easier to keep an overview and to avoid having to recompile ~all UI code when the class is modified. Change-Id: I98a090f31fc8b4111b7e13dfcdf843af8c3113c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205474 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- .../deployment/gui/dp_gui_updatedialog.hxx | 1 + include/vcl/weld/Spinner.hxx | 25 +++++++++++++++++++ include/vcl/weld/weld.hxx | 7 ------ vcl/inc/qt5/QtInstanceSpinner.hxx | 2 ++ vcl/inc/salvtables.hxx | 1 + vcl/unx/gtk3/gtkinst.cxx | 1 + 6 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 include/vcl/weld/Spinner.hxx diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index 506eb565294a..75abbb19d7f0 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/include/vcl/weld/Spinner.hxx b/include/vcl/weld/Spinner.hxx new file mode 100644 index 000000000000..69cfcbf72272 --- /dev/null +++ b/include/vcl/weld/Spinner.hxx @@ -0,0 +1,25 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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 +#include + +namespace weld +{ +class VCL_DLLPUBLIC Spinner : virtual public Widget +{ +public: + virtual void start() = 0; + virtual void stop() = 0; +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/weld/weld.hxx b/include/vcl/weld/weld.hxx index 229d538c2646..8f339e9710de 100644 --- a/include/vcl/weld/weld.hxx +++ b/include/vcl/weld/weld.hxx @@ -324,13 +324,6 @@ public: void connect_value_changed(const Link& rLink) { m_aValueChangedHdl = rLink; } }; -class VCL_DLLPUBLIC Spinner : virtual public Widget -{ -public: - virtual void start() = 0; - virtual void stop() = 0; -}; - enum class LabelType { Normal, diff --git a/vcl/inc/qt5/QtInstanceSpinner.hxx b/vcl/inc/qt5/QtInstanceSpinner.hxx index 4fe579d5b962..95aa2a2f0d83 100644 --- a/vcl/inc/qt5/QtInstanceSpinner.hxx +++ b/vcl/inc/qt5/QtInstanceSpinner.hxx @@ -13,6 +13,8 @@ #include "QtInstanceWidget.hxx" +#include + #include class QtInstanceSpinner : public QtInstanceWidget, public virtual weld::Spinner diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 2f01bb994fb8..a1e039c30a75 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index df6ba20c262d..124ab852d7b7 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include