vcl/headless/headlessinst.cxx | 1 + vcl/inc/staticsalinstance.hxx | 20 ++++++++++++++++++++ vcl/source/app/salplug.cxx | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-)
New commits: commit 3454432894026d40661669018200e909f5ae0ee5 Author: Stephan Bergmann <[email protected]> AuthorDate: Thu Dec 11 11:30:25 2025 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Thu Dec 11 21:25:06 2025 +0100 loplugin:externandnotdefined and loplugin:unreffun (--disable-gui) Change-Id: Ie502257776f9482c24ba3e115e05110fc56d3ad4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195444 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Jenkins diff --git a/vcl/headless/headlessinst.cxx b/vcl/headless/headlessinst.cxx index abe3e1cf92c7..d8a8b63fbdd9 100644 --- a/vcl/headless/headlessinst.cxx +++ b/vcl/headless/headlessinst.cxx @@ -9,6 +9,7 @@ #include <headless/svpinst.hxx> #include <headless/svpdummies.hxx> #include <headless/svpdata.hxx> +#include <staticsalinstance.hxx> #include <unistd.h> class HeadlessSalInstance : public SvpSalInstance diff --git a/vcl/inc/staticsalinstance.hxx b/vcl/inc/staticsalinstance.hxx new file mode 100644 index 000000000000..20a33a2793fb --- /dev/null +++ b/vcl/inc/staticsalinstance.hxx @@ -0,0 +1,20 @@ +/* -*- 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 <sal/config.h> + +class SalInstance; + +// For vcl/source/app/salplug.cxx's STATIC_SAL_INSTANCE mode, directly calling one of the +// definitions: +extern "C" SalInstance* create_SalInstance(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx index 29722d4a7994..db59ded6c27b 100644 --- a/vcl/source/app/salplug.cxx +++ b/vcl/source/app/salplug.cxx @@ -51,7 +51,7 @@ #if defined(DISABLE_DYNLOADING) || !HAVE_FEATURE_UI #define STATIC_SAL_INSTANCE 1 -extern "C" SalInstance* create_SalInstance(); +#include <staticsalinstance.hxx> #else #define STATIC_SAL_INSTANCE 0 #include <osl/module.hxx>
