vcl/android/androidinst.cxx | 5 +++-- vcl/headless/headlessinst.cxx | 4 ++-- vcl/inc/headless/svpdata.hxx | 25 ------------------------- vcl/inc/qt5/QtData.hxx | 3 --- vcl/inc/unx/gendata.hxx | 7 ++++--- vcl/inc/unx/gtk/gtkdata.hxx | 1 - vcl/inc/unx/saldata.hxx | 2 +- vcl/ios/dummies.cxx | 2 +- vcl/ios/iosinst.cxx | 4 ++-- vcl/qt5/QtData.cxx | 4 ---- vcl/source/app/salplug.cxx | 4 ++-- vcl/unx/generic/app/gendata.cxx | 2 -- vcl/unx/generic/app/salinst.cxx | 2 +- vcl/unx/gtk3/gtkdata.cxx | 5 ----- 14 files changed, 16 insertions(+), 54 deletions(-)
New commits: commit a5b28dbdfe5115d77ade06544f04344cfffdd1d6 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Feb 24 19:35:06 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Feb 25 01:03:32 2026 +0100 vcl: Replace SvpSalData with GenericUnixSalData Now after Change-Id: Ief26fc9ae96e0f8991d476ff9d5dc5739640ae72 Author: Michael Weghorn <[email protected]> Date: Tue Feb 24 19:26:59 2026 +0100 vcl: Have empty ErrorTrap{Push,Pop} impls in GenericUnixSalData , SvpSalData doesn't add any value over its GenericUnixSalData base class, so drop the subclass altogether. Change-Id: Idd2094f3c2106d6eaa65e275ebbd67b4c69e646f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200262 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx index 8c9c997f87ea..1c6242dd0b8a 100644 --- a/vcl/android/androidinst.cxx +++ b/vcl/android/androidinst.cxx @@ -14,7 +14,8 @@ #include <android/androidinst.hxx> #include <headless/svpdummies.hxx> -#include <headless/svpdata.hxx> +#include <unx/gendata.hxx> + #include <osl/detail/android-bootstrap.h> #include <rtl/strbuf.hxx> #include <vcl/settings.hxx> @@ -159,7 +160,7 @@ extern "C" SalInstance *create_SalInstance() { LOGI("Android: create_SalInstance!"); AndroidSalInstance* pInstance = new AndroidSalInstance( std::make_unique<SvpSalYieldMutex>() ); - new SvpSalData(); + new GenericUnixSalData(); return pInstance; } diff --git a/vcl/headless/headlessinst.cxx b/vcl/headless/headlessinst.cxx index 88a7f91f1a7c..8a745beda08b 100644 --- a/vcl/headless/headlessinst.cxx +++ b/vcl/headless/headlessinst.cxx @@ -8,8 +8,8 @@ */ #include <headless/svpinst.hxx> #include <headless/svpdummies.hxx> -#include <headless/svpdata.hxx> #include <staticsalinstance.hxx> +#include <unx/gendata.hxx> #include <unistd.h> namespace { @@ -52,7 +52,7 @@ SalSystem *HeadlessSalInstance::CreateSalSystem() extern "C" SalInstance *create_SalInstance() { HeadlessSalInstance* pInstance = new HeadlessSalInstance(std::make_unique<SvpSalYieldMutex>()); - new SvpSalData(); + new GenericUnixSalData(); return pInstance; } diff --git a/vcl/inc/headless/svpdata.hxx b/vcl/inc/headless/svpdata.hxx deleted file mode 100644 index 4c04d4a8d28c..000000000000 --- a/vcl/inc/headless/svpdata.hxx +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- 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 <unx/gendata.hxx> - -class SvpSalData : public GenericUnixSalData -{ -public: - explicit SvpSalData() - : GenericUnixSalData() - { - } -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/ios/dummies.cxx b/vcl/ios/dummies.cxx index 42ecc363e35d..68ddc6b1c81f 100644 --- a/vcl/ios/dummies.cxx +++ b/vcl/ios/dummies.cxx @@ -20,9 +20,9 @@ #include "ios/iosinst.hxx" #include "salprn.hxx" #include "quartz/salgdi.h" -#include "headless/svpdata.hxx" #include "headless/svpinst.hxx" #include "unx/fontmanager.hxx" +#include "unx/gendata.hxx" std::unique_ptr<SalPrinter> SvpSalInstance::CreatePrinter( SalInfoPrinter* /* pInfoPrinter */ ) { diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 548da31e58b6..ab0308e3cea7 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -23,10 +23,10 @@ #include "ios/iosinst.hxx" #include "quartz/salgdi.h" -#include "headless/svpdata.hxx" #include "headless/svpdummies.hxx" #include "quartz/utils.h" #include "quartz/SystemFontList.hxx" +#include "unx/gendata.hxx" #include <vcl/layout.hxx> #include <vcl/settings.hxx> @@ -147,7 +147,7 @@ SalData::~SalData() extern "C" SalInstance *create_SalInstance() { IosSalInstance* pInstance = new IosSalInstance( std::make_unique<SvpSalYieldMutex>() ); - new SvpSalData(); + new GenericUnixSalData(); return pInstance; } diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx index db59ded6c27b..7077c2794186 100644 --- a/vcl/source/app/salplug.cxx +++ b/vcl/source/app/salplug.cxx @@ -75,8 +75,8 @@ #endif #if ENABLE_HEADLESS -#include <headless/svpdata.hxx> #include <headless/svpinst.hxx> +#include <unx/gendata.hxx> #endif namespace { @@ -85,7 +85,7 @@ namespace { SalInstance* svp_create_SalInstance() { SvpSalInstance* pInstance = new SvpSalInstance(std::make_unique<SvpSalYieldMutex>()); - new SvpSalData(); + new GenericUnixSalData(); return pInstance; } #endif commit 8b5e899e6f197ba8b016bcc7c32787b877f6a534 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Feb 24 19:26:59 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Feb 25 01:03:25 2026 +0100 vcl: Have empty ErrorTrap{Push,Pop} impls in GenericUnixSalData Instead of having purely virtual methods in the GenericUnixSalData base class and empty dummy implementations in the SvpSalData and QtData subclasses, have empty implementations in the base class itself. Change-Id: Ief26fc9ae96e0f8991d476ff9d5dc5739640ae72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200261 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/vcl/inc/headless/svpdata.hxx b/vcl/inc/headless/svpdata.hxx index f995d7ef396f..4c04d4a8d28c 100644 --- a/vcl/inc/headless/svpdata.hxx +++ b/vcl/inc/headless/svpdata.hxx @@ -18,8 +18,6 @@ public: : GenericUnixSalData() { } - virtual void ErrorTrapPush() override {} - virtual bool ErrorTrapPop(bool /*bIgnoreError*/ = true) override { return false; } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/qt5/QtData.hxx b/vcl/inc/qt5/QtData.hxx index e2f1bb12315e..de8062624b8b 100644 --- a/vcl/inc/qt5/QtData.hxx +++ b/vcl/inc/qt5/QtData.hxx @@ -36,9 +36,6 @@ public: explicit QtData(); virtual ~QtData() override; - virtual void ErrorTrapPush() override; - virtual bool ErrorTrapPop(bool bIgnoreError = true) override; - QCursor& getCursor(PointerStyle ePointerStyle); static bool noNativeControls(); diff --git a/vcl/inc/unx/gendata.hxx b/vcl/inc/unx/gendata.hxx index c93549bbc959..3e3765af1b5e 100644 --- a/vcl/inc/unx/gendata.hxx +++ b/vcl/inc/unx/gendata.hxx @@ -105,8 +105,10 @@ public: #endif // Mostly useful for remote protocol backends - virtual void ErrorTrapPush() = 0; - virtual bool ErrorTrapPop(bool bIgnoreError = true) = 0; // true on error + virtual void ErrorTrapPush(){}; + + // true on error + virtual bool ErrorTrapPop(bool /* bIgnoreError */ = true) { return false; }; }; inline GenericUnixSalData* GetGenericUnixSalData() diff --git a/vcl/qt5/QtData.cxx b/vcl/qt5/QtData.cxx index 767cc0714f7a..46036f568d0d 100644 --- a/vcl/qt5/QtData.cxx +++ b/vcl/qt5/QtData.cxx @@ -210,10 +210,6 @@ QCursor& QtData::getCursor(PointerStyle ePointerStyle) return *m_aCursors[ePointerStyle]; } -void QtData::ErrorTrapPush() {} - -bool QtData::ErrorTrapPop(bool /*bIgnoreError*/) { return false; } - bool QtData::noNativeControls() { static const bool bNoNative = (getenv("SAL_VCL_QT_NO_NATIVE") != nullptr); commit 0f5965e01fc75c57a16d0393d7968d2f43ca9e6d Author: Michael Weghorn <[email protected]> AuthorDate: Tue Feb 24 19:00:40 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Feb 25 01:03:16 2026 +0100 vcl: Drop unused or empty GenericUnixSalData::Dispose impls The base class GenericUnixSalData::Dispose does nothing. The X11SalData subclass overrides the base class method and gets called from the X11SalInstance dtor. The GtkSalData subclass overrides the method but it doesn't get called from anywhere (GtkInstance is not an X11SalInstance subclass). Let the X11SalInstance dtor directly call the X11SalInstance method and drop the others. If the logic so far in GtkSalData::Dispose (but not called from anywhere) should be relevant, it should possibly be called from the GtkInstance dtor, similar to what happens for the x11/gen case. (?) Change-Id: I8771d7788528c17bcb7db8e684a6aea4d9595aaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200260 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/vcl/inc/unx/gendata.hxx b/vcl/inc/unx/gendata.hxx index 4949613c0b10..c93549bbc959 100644 --- a/vcl/inc/unx/gendata.hxx +++ b/vcl/inc/unx/gendata.hxx @@ -71,7 +71,6 @@ class VCL_PLUGIN_PUBLIC GenericUnixSalData : public SalData public: GenericUnixSalData(); virtual ~GenericUnixSalData() override; - virtual void Dispose(); SalGenericDisplay* GetDisplay() const { return m_pDisplay; } void SetDisplay(SalGenericDisplay* pDisp) { m_pDisplay = pDisp; } diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index 518ec6443079..6e1ec245edca 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -231,7 +231,6 @@ public: virtual ~GtkSalData() override; void Init(); - virtual void Dispose() override; static void initNWF(); static void deInitNWF(); diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx index 4152fdace067..33460a162dae 100644 --- a/vcl/inc/unx/saldata.hxx +++ b/vcl/inc/unx/saldata.hxx @@ -44,7 +44,7 @@ public: virtual ~X11SalData() override; void Init(); - virtual void Dispose() override; + void Dispose(); void DeleteDisplay(); // for shutdown diff --git a/vcl/unx/generic/app/gendata.cxx b/vcl/unx/generic/app/gendata.cxx index 79175217c89a..0fb41be2b2f4 100644 --- a/vcl/unx/generic/app/gendata.cxx +++ b/vcl/unx/generic/app/gendata.cxx @@ -51,8 +51,6 @@ GenericUnixSalData::~GenericUnixSalData() #endif } -void GenericUnixSalData::Dispose() {} - #ifndef IOS void GenericUnixSalData::InitFreetypeManager() { m_pFreetypeManager.reset(new FreetypeManager); } #endif diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index ebb3c2d1f364..af2c85a4e303 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -89,7 +89,7 @@ X11SalInstance::~X11SalInstance() // dispose SalDisplay list from SalData // would be done in a static destructor else which is // a little late - GetGenericUnixSalData()->Dispose(); + GetX11SalData()->Dispose(); #if HAVE_FEATURE_SKIA SkiaHelper::cleanup(); diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx index 1c6f97f3c688..1ab838cbda3a 100644 --- a/vcl/unx/gtk3/gtkdata.cxx +++ b/vcl/unx/gtk3/gtkdata.cxx @@ -369,11 +369,6 @@ GtkSalData::~GtkSalData() #endif } -void GtkSalData::Dispose() -{ - deInitNWF(); -} - /// Allows events to be processed, returns true if we processed an event. bool GtkSalData::Yield( bool bWait, bool bHandleAllCurrentEvents ) {
