postprocess/qa/services.cxx            |    7 ---
 solenv/bin/native-code.py              |    1 
 vcl/Library_vcl.mk                     |    1 
 vcl/inc/factory.hxx                    |   46 -------------------------
 vcl/inc/osx/salinst.h                  |    4 +-
 vcl/inc/qt5/QtInstance.hxx             |    4 +-
 vcl/inc/salinst.hxx                    |    8 ++--
 vcl/inc/unx/gtk/gtkinst.hxx            |    4 +-
 vcl/inc/unx/salinst.h                  |    4 +-
 vcl/inc/win/salinst.h                  |    4 +-
 vcl/osx/service_entry.cxx              |    8 ++--
 vcl/qt5/QtInstance.cxx                 |    8 ++--
 vcl/source/components/dtranscomp.cxx   |   42 +++--------------------
 vcl/source/components/factory.cxx      |   60 ---------------------------------
 vcl/source/window/mouse.cxx            |    4 +-
 vcl/unx/generic/dtrans/X11_service.cxx |    6 +--
 vcl/unx/gtk3/gtkinst.cxx               |    8 ++--
 vcl/vcl.common.component               |   10 -----
 vcl/vcl.common.component.macosx        |    1 
 vcl/vcl.common.component.unx           |    1 
 vcl/win/app/salinst.cxx                |    8 ++--
 21 files changed, 42 insertions(+), 197 deletions(-)

New commits:
commit 47425922fcdde11cbf0c6c654acb813c8764a26b
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Jul 11 22:24:18 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Jul 14 09:48:55 2025 +0200

    vcl: Drop vcl_component_getFactory
    
    After
    
        Change-Id: If870b340f39bd7fcf6674af3184e2a4c3017310d
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Fri Jul 11 14:14:06 2025 +0200
    
            vcl: Drop logic to create drag source by implementation name
    
    , this function always returns nullptr. Drop it and
    the `prefix="vcl"` from vcl/vcl.common.component
    now that all services defined in there have a
    constructor defined, see also tdf#74608 comment 39.
    
    Change-Id: I6e02f73290a6dbd89f40b8b06d3e412f26b18bc6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187758
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 48508ad376b0..0026ad1943a3 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -20,7 +20,6 @@ import xml.etree.ElementTree as ET
 
 core_factory_list = [
     ("libi18npoollo.a", "i18npool_component_getFactory"),
-    ("libvcllo.a", "vcl_component_getFactory"),
     ("libsvtlo.a", "svt_component_getFactory"),
     ]
 
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 20062dade35f..cf2dff7ff509 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -480,7 +480,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/app/weldutils \
     vcl/source/app/winscheduler \
     vcl/source/components/dtranscomp \
-    vcl/source/components/factory \
     vcl/source/components/fontident \
     vcl/source/filter/bmp/BmpReader \
     vcl/source/filter/bmp/BmpWriter \
diff --git a/vcl/source/components/factory.cxx 
b/vcl/source/components/factory.cxx
deleted file mode 100644
index 63e9043c4878..000000000000
--- a/vcl/source/components/factory.cxx
+++ /dev/null
@@ -1,34 +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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <vcl/dllapi.h>
-
-extern "C" {
-
-    VCL_DLLPUBLIC void* vcl_component_getFactory(
-        const char* /*pImplementationName*/,
-        void* /*pXUnoSMgr*/,
-        void* /*pXUnoKey*/)
-    {
-        return nullptr;
-    }
-
-} /* extern "C" */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/vcl.common.component b/vcl/vcl.common.component
index 6f9bdccf7125..a7bdb6e4472f 100644
--- a/vcl/vcl.common.component
+++ b/vcl/vcl.common.component
@@ -18,7 +18,7 @@
 -->
 
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
-    prefix="vcl" xmlns="http://openoffice.org/2010/uno-components";>
+    xmlns="http://openoffice.org/2010/uno-components";>
   <implementation name="com.sun.star.comp.graphic.GraphicMapper"
       constructor="com_sun_star_comp_graphic_GraphicMapper_get_implementation">
     <service name="com.sun.star.graphic.GraphicMapper"/>
commit 6003d1973effc14a55da3c756a7091ed23e7e072
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Jul 11 14:32:41 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Jul 14 09:48:48 2025 +0200

    vcl: Pass SalInstance::{,Impl}Create{DragSource,DropTarget} param by ref
    
    Switch the param from a const SystemEnvData*
    to a reference.
    
    Most of the SalInstance::ImplCreateDragSource
    and SalInstance::ImplCreateDropTarget overrides
    were unconditionally dereferencing the pointer,
    so rather make sure this is never null, instead
    of having nullptr as the default arg - which is
    no longer used since
    
        Change-Id: I93c099b82e209efe11f30bbc4f5fa0a6e1fff992
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Fri Jul 11 13:47:54 2025 +0200
    
            vcl: Drop logic to create drop target by implementation name
    
    and
    
        Change-Id: If870b340f39bd7fcf6674af3184e2a4c3017310d
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Fri Jul 11 14:14:06 2025 +0200
    
            vcl: Drop logic to create drag source by implementation name
    
    Change-Id: Id8f0fc753cae3efd195198e4fa710601d5bb0626
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187728
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 0a4b66cd1660..443b370498f5 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -139,9 +139,9 @@ public:
     virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard>
     CreateClipboard(const css::uno::Sequence<css::uno::Any>& i_rArguments) 
override;
     virtual css::uno::Reference<css::datatransfer::dnd::XDragSource>
-    ImplCreateDragSource(const SystemEnvData*) override;
+    ImplCreateDragSource(const SystemEnvData& rSysEnv) override;
     virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-    ImplCreateDropTarget(const SystemEnvData*) override;
+    ImplCreateDropTarget(const SystemEnvData& rSysEnv) override;
 
     static void handleAppDefinedEvent( NSEvent* pEvent );
 
diff --git a/vcl/inc/qt5/QtInstance.hxx b/vcl/inc/qt5/QtInstance.hxx
index 9e60c37ae691..51308c6ede84 100644
--- a/vcl/inc/qt5/QtInstance.hxx
+++ b/vcl/inc/qt5/QtInstance.hxx
@@ -217,9 +217,9 @@ public:
     virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard>
     CreateClipboard(const css::uno::Sequence<css::uno::Any>& i_rArguments) 
override;
     virtual css::uno::Reference<css::datatransfer::dnd::XDragSource>
-    ImplCreateDragSource(const SystemEnvData*) override;
+    ImplCreateDragSource(const SystemEnvData& rSysEnv) override;
     virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-    ImplCreateDropTarget(const SystemEnvData*) override;
+    ImplCreateDropTarget(const SystemEnvData& rSysEnv) override;
 
     // for qt font options
     virtual const cairo_font_options_t* GetCairoFontOptions() override;
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index d94843d7f44b..15ef93c6236d 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -190,13 +190,13 @@ public:
     virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard>
     CreateClipboard(const css::uno::Sequence<css::uno::Any>& i_rArguments);
     virtual css::uno::Reference<css::datatransfer::dnd::XDragSource>
-    ImplCreateDragSource(const SystemEnvData*);
+    ImplCreateDragSource(const SystemEnvData& rSysEnv);
     virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-    ImplCreateDropTarget(const SystemEnvData*);
+    ImplCreateDropTarget(const SystemEnvData& rSysEnv);
     css::uno::Reference<css::datatransfer::dnd::XDragSource>
-    CreateDragSource(const SystemEnvData* = nullptr);
+    CreateDragSource(const SystemEnvData& rSysEnv);
     css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-    CreateDropTarget(const SystemEnvData* = nullptr);
+    CreateDropTarget(const SystemEnvData& rSysEnv);
     virtual void            AddToRecentDocumentList(const OUString& rFileUrl, 
const OUString& rMimeType, const OUString& rDocumentService) = 0;
 
     virtual bool            hasNativeFileSelection() const { return false; }
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 5727f1e4b62d..3834768355c7 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -273,9 +273,9 @@ public:
     virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard>
     CreateClipboard(const css::uno::Sequence<css::uno::Any>& i_rArguments) 
override;
     virtual css::uno::Reference<css::datatransfer::dnd::XDragSource>
-    ImplCreateDragSource(const SystemEnvData*) override;
+    ImplCreateDragSource(const SystemEnvData& rSysEnv) override;
     virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-    ImplCreateDropTarget(const SystemEnvData*) override;
+    ImplCreateDropTarget(const SystemEnvData& rSysEnv) override;
     virtual OpenGLContext* CreateOpenGLContext() override;
     virtual std::unique_ptr<weld::Builder> CreateBuilder(weld::Widget* 
pParent, const OUString& rUIRoot, const OUString& rUIFile) override;
     virtual std::unique_ptr<weld::Builder> CreateInterimBuilder(vcl::Window* 
pParent, const OUString& rUIRoot, const OUString& rUIFile,
diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
index 9fa93a7c5730..2d6deb0c76d1 100644
--- a/vcl/inc/unx/salinst.h
+++ b/vcl/inc/unx/salinst.h
@@ -84,9 +84,9 @@ public:
     virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard>
     CreateClipboard(const css::uno::Sequence<css::uno::Any>& i_rArguments) 
override;
     virtual css::uno::Reference<css::datatransfer::dnd::XDragSource>
-    ImplCreateDragSource(const SystemEnvData*) override;
+    ImplCreateDragSource(const SystemEnvData& rSysEnv) override;
     virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-    ImplCreateDropTarget(const SystemEnvData*) override;
+    ImplCreateDropTarget(const SystemEnvData& rSysEnv) override;
     virtual void            AddToRecentDocumentList(const OUString& rFileUrl, 
const OUString& rMimeType, const OUString& rDocumentService) override;
 };
 
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
index 9f4e53f597b5..a603aa7fcef0 100644
--- a/vcl/inc/win/salinst.h
+++ b/vcl/inc/win/salinst.h
@@ -83,9 +83,9 @@ public:
     static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, 
LPEXCEPTION_POINTERS pExceptionInfo);
 
     virtual css::uno::Reference<css::datatransfer::dnd::XDragSource>
-    ImplCreateDragSource(const SystemEnvData*) override;
+    ImplCreateDragSource(const SystemEnvData& rSysEnv) override;
     virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-    ImplCreateDropTarget(const SystemEnvData*) override;
+    ImplCreateDropTarget(const SystemEnvData& rSysEnv) override;
 };
 
 SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, 
SalFrameStyleFlags nSalFrameStyle );
diff --git a/vcl/osx/service_entry.cxx b/vcl/osx/service_entry.cxx
index e85b07c59c04..5829a07ef75f 100644
--- a/vcl/osx/service_entry.cxx
+++ b/vcl/osx/service_entry.cxx
@@ -51,19 +51,19 @@ AquaSalInstance::CreateClipboard(const Sequence<Any>& 
i_rArguments)
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDragSource>
-AquaSalInstance::ImplCreateDragSource(const SystemEnvData* pSysEnv)
+AquaSalInstance::ImplCreateDragSource(const SystemEnvData& rSysEnv)
 {
     rtl::Reference<DragSource> xDragSource = new DragSource();
-    vcl::OleDnDHelper(xDragSource, 
reinterpret_cast<sal_IntPtr>(pSysEnv->mpNSView),
+    vcl::OleDnDHelper(xDragSource, 
reinterpret_cast<sal_IntPtr>(rSysEnv.mpNSView),
                       vcl::DragOrDrop::Drag);
     return xDragSource;
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-AquaSalInstance::ImplCreateDropTarget(const SystemEnvData* pSysEnv)
+AquaSalInstance::ImplCreateDropTarget(const SystemEnvData& rSysEnv)
 {
     rtl::Reference<DropTarget> xDropTarget = new DropTarget();
-    vcl::OleDnDHelper(xDropTarget, 
reinterpret_cast<sal_IntPtr>(pSysEnv->mpNSView),
+    vcl::OleDnDHelper(xDropTarget, 
reinterpret_cast<sal_IntPtr>(rSysEnv.mpNSView),
                       vcl::DragOrDrop::Drop);
     return xDropTarget;
 }
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 67482dcefed7..cb65d7b3e974 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -655,16 +655,16 @@ QtInstance::CreateClipboard(const 
css::uno::Sequence<css::uno::Any>& arguments)
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDragSource>
-QtInstance::ImplCreateDragSource(const SystemEnvData* pSysEnv)
+QtInstance::ImplCreateDragSource(const SystemEnvData& rSysEnv)
 {
-    return new QtDragSource(static_cast<QtFrame*>(pSysEnv->pSalFrame));
+    return new QtDragSource(static_cast<QtFrame*>(rSysEnv.pSalFrame));
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-QtInstance::ImplCreateDropTarget(const SystemEnvData* pSysEnv)
+QtInstance::ImplCreateDropTarget(const SystemEnvData& rSysEnv)
 {
     rtl::Reference<QtDropTarget> pDropTarget = new QtDropTarget;
-    QtFrame* pFrame = static_cast<QtFrame*>(pSysEnv->pSalFrame);
+    QtFrame* pFrame = static_cast<QtFrame*>(rSysEnv.pSalFrame);
     pFrame->registerDropTarget(pDropTarget.get());
     pDropTarget->setActive(true);
 
diff --git a/vcl/source/components/dtranscomp.cxx 
b/vcl/source/components/dtranscomp.cxx
index 3f910456bb13..569c6274d8d0 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -380,34 +380,34 @@ SalInstance::CreateClipboard(const Sequence<Any>& 
arguments)
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDragSource>
-SalInstance::ImplCreateDragSource(const SystemEnvData*)
+SalInstance::ImplCreateDragSource(const SystemEnvData&)
 {
     return nullptr;
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDragSource>
-SalInstance::CreateDragSource(const SystemEnvData* pSysEnv)
+SalInstance::CreateDragSource(const SystemEnvData& rSysEnv)
 {
     // We run unit tests in parallel, which is a problem when touching a 
shared resource
     // the system clipboard, so rather use the dummy GenericClipboard.
     if (Application::IsHeadlessModeEnabled() || o3tl::IsRunningUnitTest() || 
o3tl::IsRunningUITest())
         return new vcl::GenericDragSource();
-    return ImplCreateDragSource(pSysEnv);
+    return ImplCreateDragSource(rSysEnv);
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-SalInstance::ImplCreateDropTarget(const SystemEnvData*)
+SalInstance::ImplCreateDropTarget(const SystemEnvData&)
 {
     return nullptr;
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-SalInstance::CreateDropTarget(const SystemEnvData* pSysEnv)
+SalInstance::CreateDropTarget(const SystemEnvData& rSysEnv)
 {
     // see SalInstance::CreateDragSource
     if (Application::IsHeadlessModeEnabled() || o3tl::IsRunningUnitTest() || 
o3tl::IsRunningUITest())
         return new vcl::GenericDropTarget();
-    return ImplCreateDropTarget(pSysEnv);
+    return ImplCreateDropTarget(rSysEnv);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 2611ded9d374..015bbada0af7 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -723,8 +723,8 @@ Reference< css::datatransfer::dnd::XDragSource > 
Window::GetDragSource()
     try
     {
         SalInstance* pInst = ImplGetSVData()->mpDefInst;
-        mpWindowImpl->mpFrameData->mxDragSource = 
pInst->CreateDragSource(pEnvData);
-        mpWindowImpl->mpFrameData->mxDropTarget = 
pInst->CreateDropTarget(pEnvData);
+        mpWindowImpl->mpFrameData->mxDragSource = 
pInst->CreateDragSource(*pEnvData);
+        mpWindowImpl->mpFrameData->mxDropTarget = 
pInst->CreateDropTarget(*pEnvData);
     }
     catch (const Exception&)
     {
diff --git a/vcl/unx/generic/dtrans/X11_service.cxx 
b/vcl/unx/generic/dtrans/X11_service.cxx
index 191659b41653..88528bfda900 100644
--- a/vcl/unx/generic/dtrans/X11_service.cxx
+++ b/vcl/unx/generic/dtrans/X11_service.cxx
@@ -79,7 +79,7 @@ X11SalInstance::CreateClipboard(const Sequence<Any>& 
arguments)
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDragSource>
-X11SalInstance::ImplCreateDragSource(const SystemEnvData*)
+X11SalInstance::ImplCreateDragSource(const SystemEnvData&)
 {
     rtl::Reference<SelectionManagerHolder> xSelectionManagerHolder = new 
SelectionManagerHolder();
     xSelectionManagerHolder->initialize();
@@ -88,11 +88,11 @@ X11SalInstance::ImplCreateDragSource(const SystemEnvData*)
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-X11SalInstance::ImplCreateDropTarget(const SystemEnvData* pSysEnv)
+X11SalInstance::ImplCreateDropTarget(const SystemEnvData& rSysEnv)
 {
     rtl::Reference<X11DropTarget> xDropTarget = new X11DropTarget();
 
-    X11SalFrame* pFrame = static_cast<X11SalFrame*>(pSysEnv->pSalFrame);
+    X11SalFrame* pFrame = static_cast<X11SalFrame*>(rSysEnv.pSalFrame);
     ::Window aShellWindow = pFrame ? pFrame->GetShellWindow() : 0;
     if (aShellWindow)
         xDropTarget->initialize(aShellWindow);
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 14fedb9994f3..51eea482eea5 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -1659,9 +1659,9 @@ void GtkInstDropTarget::deinitialize()
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-GtkInstance::ImplCreateDropTarget(const SystemEnvData* pSysEnv)
+GtkInstance::ImplCreateDropTarget(const SystemEnvData& rSysEnv)
 {
-    return new 
GtkInstDropTarget(static_cast<GtkSalFrame*>(pSysEnv->pSalFrame));
+    return new GtkInstDropTarget(static_cast<GtkSalFrame*>(rSysEnv.pSalFrame));
 }
 
 GtkInstDragSource::GtkInstDragSource(GtkSalFrame* pFrame)
@@ -1717,9 +1717,9 @@ css::uno::Sequence<OUString> SAL_CALL 
GtkInstDragSource::getSupportedServiceName
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDragSource>
-GtkInstance::ImplCreateDragSource(const SystemEnvData* pSysEnv)
+GtkInstance::ImplCreateDragSource(const SystemEnvData& rSysEnv)
 {
-    return new 
GtkInstDragSource(static_cast<GtkSalFrame*>(pSysEnv->pSalFrame));
+    return new GtkInstDragSource(static_cast<GtkSalFrame*>(rSysEnv.pSalFrame));
 }
 
 namespace {
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index b0e2de5db00b..6f080a3f83e5 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -1051,18 +1051,18 @@ void WinSalInstance::BeforeAbort(const OUString&, bool)
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDragSource>
-WinSalInstance::ImplCreateDragSource(const SystemEnvData* pSysEnv)
+WinSalInstance::ImplCreateDragSource(const SystemEnvData& rSysEnv)
 {
     rtl::Reference<DragSource> xDragSource = new 
DragSource(comphelper::getProcessComponentContext());
-    vcl::OleDnDHelper(xDragSource, 
reinterpret_cast<sal_IntPtr>(pSysEnv->hWnd), vcl::DragOrDrop::Drag);
+    vcl::OleDnDHelper(xDragSource, reinterpret_cast<sal_IntPtr>(rSysEnv.hWnd), 
vcl::DragOrDrop::Drag);
     return xDragSource;
 }
 
 css::uno::Reference<css::datatransfer::dnd::XDropTarget>
-WinSalInstance::ImplCreateDropTarget(const SystemEnvData* pSysEnv)
+WinSalInstance::ImplCreateDropTarget(const SystemEnvData& rSysEnv)
 {
     rtl::Reference<DropTarget> xDropTarget = new 
DropTarget(comphelper::getProcessComponentContext());
-    vcl::OleDnDHelper(xDropTarget, 
reinterpret_cast<sal_IntPtr>(pSysEnv->hWnd), vcl::DragOrDrop::Drop);
+    vcl::OleDnDHelper(xDropTarget, reinterpret_cast<sal_IntPtr>(rSysEnv.hWnd), 
vcl::DragOrDrop::Drop);
     return xDropTarget;
 }
 
commit a4954e5575ed4cc17e88bdfe24ae30442cd883ab
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Jul 11 14:14:06 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Jul 14 09:48:41 2025 +0200

    vcl: Drop logic to create drag source by service name
    
    This is basically the drag source equivalent of previous
    commit
    
        Change-Id: I93c099b82e209efe11f30bbc4f5fa0a6e1fff992
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Fri Jul 11 13:47:54 2025 +0200
    
            vcl: Drop logic to create drop target by service name
    
    , see the commit message of that one for more details/background.
    
    Change-Id: If870b340f39bd7fcf6674af3184e2a4c3017310d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187727
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx
index 26f9963dc46f..be123dc67fe1 100644
--- a/postprocess/qa/services.cxx
+++ b/postprocess/qa/services.cxx
@@ -351,13 +351,6 @@ void Test::createInstance(
         // SystemClipboard is a wrapper returning either a platform-specific or
         // the generic VCLGenericClipboard:
         expImpl = "com.sun.star.datatransfer.VCLGenericClipboard";
-#if !defined(_WIN32)
-    } else if (name == "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1"
-               || name == "com.sun.star.datatransfer.dnd.XdndSupport")
-    {
-        expImpl = "com.sun.star.datatransfer.dnd.VclGenericDragSource";
-        expServs = {u"com.sun.star.datatransfer.dnd.GenericDragSource"_ustr};
-#endif
     } else if (name == "com.sun.star.ui.dialogs.FolderPicker") {
         // FolderPicker is a wrapper returning either a platform-specific or 
the
         // generic OfficeFolderPicker. In headless mode it is always the
diff --git a/vcl/inc/factory.hxx b/vcl/inc/factory.hxx
deleted file mode 100644
index f961f06d49ac..000000000000
--- a/vcl/inc/factory.hxx
+++ /dev/null
@@ -1,46 +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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-#include <sal/config.h>
-
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <rtl/ustring.hxx>
-
-namespace com::sun::star {
-    namespace lang {
-        class XMultiServiceFactory;
-    }
-    namespace uno { class XInterface; }
-}
-
-namespace vcl {
-
-css::uno::Sequence<OUString> DragSource_getSupportedServiceNames();
-
-OUString DragSource_getImplementationName();
-
-css::uno::Reference<css::uno::XInterface> DragSource_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory > const &);
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/components/dtranscomp.cxx 
b/vcl/source/components/dtranscomp.cxx
index 053d2319b5aa..3f910456bb13 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -26,7 +26,6 @@
 #include <tools/debug.hxx>
 #include <vcl/svapp.hxx>
 
-#include <factory.hxx>
 #include <svdata.hxx>
 #include <salinst.hxx>
 
@@ -274,35 +273,6 @@ void GenericDragSource::initialize( const Sequence< Any >& 
)
 {
 }
 
-Sequence< OUString > DragSource_getSupportedServiceNames()
-{
-#if defined MACOSX
-    return { "com.sun.star.datatransfer.dnd.OleDragSource" };
-#elif defined UNX
-    return { u"com.sun.star.datatransfer.dnd.X11DragSource"_ustr };
-#else
-    return { "com.sun.star.datatransfer.dnd.VclGenericDragSource" };
-#endif
-}
-
-OUString DragSource_getImplementationName()
-{
-#if defined MACOSX
-    return "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1";
-#elif defined UNX
-    return u"com.sun.star.datatransfer.dnd.XdndSupport"_ustr;
-#else
-    return "com.sun.star.datatransfer.dnd.VclGenericDragSource";
-#endif
-}
-
-Reference< XInterface > DragSource_createInstance( const Reference< 
XMultiServiceFactory >&  )
-{
-    SolarMutexGuard aGuard;
-    Reference< XInterface > xResult = 
ImplGetSVData()->mpDefInst->CreateDragSource();
-    return xResult;
-}
-
 /*
 *   generic DragSource dummy
 */
diff --git a/vcl/source/components/factory.cxx 
b/vcl/source/components/factory.cxx
index 806dc6277d8e..63e9043c4878 100644
--- a/vcl/source/components/factory.cxx
+++ b/vcl/source/components/factory.cxx
@@ -17,41 +17,15 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <vcl/dllapi.h>
 
-#include <factory.hxx>
-
 extern "C" {
 
     VCL_DLLPUBLIC void* vcl_component_getFactory(
-        const char* pImplementationName,
-        void* pXUnoSMgr,
+        const char* /*pImplementationName*/,
+        void* /*pXUnoSMgr*/,
         void* /*pXUnoKey*/)
     {
-        if (!pXUnoSMgr)
-            return nullptr;
-
-        css::uno::Reference<css::lang::XMultiServiceFactory> xMgr(
-            static_cast<css::lang::XMultiServiceFactory*>(pXUnoSMgr));
-
-        css::uno::Reference<css::lang::XSingleServiceFactory> xFactory;
-
-        if( vcl::DragSource_getImplementationName().equalsAscii( 
pImplementationName ) )
-        {
-            xFactory = ::cppu::createSingleFactory(
-                xMgr, vcl::DragSource_getImplementationName(), 
vcl::DragSource_createInstance,
-                vcl::DragSource_getSupportedServiceNames() );
-        }
-
-        if( xFactory.is() )
-        {
-            xFactory->acquire();
-            return xFactory.get();
-        }
-
         return nullptr;
     }
 
diff --git a/vcl/vcl.common.component b/vcl/vcl.common.component
index d79fa0061db0..6f9bdccf7125 100644
--- a/vcl/vcl.common.component
+++ b/vcl/vcl.common.component
@@ -19,10 +19,6 @@
 
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
     prefix="vcl" xmlns="http://openoffice.org/2010/uno-components";>
-  <implementation name="com.sun.star.comp.datatransfer.dnd.OleDragSource_V1">
-    <service name="com.sun.star.datatransfer.dnd.OleDragSource"/>
-    <optional/>
-  </implementation>
   <implementation name="com.sun.star.comp.graphic.GraphicMapper"
       constructor="com_sun_star_comp_graphic_GraphicMapper_get_implementation">
     <service name="com.sun.star.graphic.GraphicMapper"/>
@@ -41,10 +37,6 @@
     <service name="com.sun.star.datatransfer.clipboard.SystemClipboard"/>
     <optional/>
   </implementation>
-  <implementation name="com.sun.star.datatransfer.dnd.XdndSupport">
-    <service name="com.sun.star.datatransfer.dnd.X11DragSource"/>
-    <optional/>
-  </implementation>
   <implementation name="com.sun.star.datatransfer.MimeCntTypeFactory"
       constructor="dtrans_CMimeContentTypeFactory_get_implementation">
     <service name="com.sun.star.datatransfer.MimeContentTypeFactory"/>
diff --git a/vcl/vcl.common.component.macosx b/vcl/vcl.common.component.macosx
index cc831c8090e9..2ba983feded4 100644
--- a/vcl/vcl.common.component.macosx
+++ b/vcl/vcl.common.component.macosx
@@ -4,7 +4,6 @@
 # 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/.
 
-com.sun.star.comp.datatransfer.dnd.OleDragSource_V1
 com.sun.star.datatransfer.clipboard.AquaClipboard
 com.sun.star.frame.VCLSessionManagerClient
 org.libreoffice.uitest.UITest
diff --git a/vcl/vcl.common.component.unx b/vcl/vcl.common.component.unx
index 88ddc02397fe..ecdafce5f73e 100644
--- a/vcl/vcl.common.component.unx
+++ b/vcl/vcl.common.component.unx
@@ -4,7 +4,6 @@
 # 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/.
 
-com.sun.star.datatransfer.dnd.XdndSupport
 com.sun.star.datatransfer.X11ClipboardSupport
 com.sun.star.frame.VCLSessionManagerClient
 org.libreoffice.uitest.UITest

Reply via email to