[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 3 commits - compilerplugins/clang desktop/source filter/CppunitTest_filter_dxf_test.mk filter/Library_gie.mk filter/Module_filter.mk filter/qa filter/source include/vcl solenv/clang-format vcl/CppunitTest_vcl_filters_test.mk vcl/inc vcl/Library_vcl.mk vcl/qa vcl/source vcl/workben

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 15 03:50:14 UTC 2021


Rebased ref, commits from common ancestor:
commit fd93a4da92a2bff906bd210c848699dd538713c3
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Feb 15 12:49:12 2021 +0900
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Feb 15 12:49:12 2021 +0900

    vcl: add TIF case to GraphicDescriptorTest
    
    Change-Id: I2e2724fda545e67777c1101b33cc10483f73b3a5

diff --git a/vcl/qa/cppunit/GraphicDescriptorTest.cxx b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
index 13f51262c233..65eca603da62 100644
--- a/vcl/qa/cppunit/GraphicDescriptorTest.cxx
+++ b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
@@ -26,11 +26,13 @@ class GraphicDescriptorTest : public CppUnit::TestFixture
     void testDetectPNG();
     void testDetectJPG();
     void testDetectGIF();
+    void testDetectTIF();
 
     CPPUNIT_TEST_SUITE(GraphicDescriptorTest);
     CPPUNIT_TEST(testDetectPNG);
     CPPUNIT_TEST(testDetectJPG);
     CPPUNIT_TEST(testDetectGIF);
+    CPPUNIT_TEST(testDetectTIF);
     CPPUNIT_TEST_SUITE_END();
 };
 
@@ -96,6 +98,20 @@ void GraphicDescriptorTest::testDetectGIF()
     CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
 }
 
+void GraphicDescriptorTest::testDetectTIF()
+{
+    SvMemoryStream aStream;
+    createBitmapAndExportForType(aStream, u"tif");
+
+    GraphicDescriptor aDescriptor(aStream, nullptr);
+    aDescriptor.Detect(true);
+
+    CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::TIF, aDescriptor.GetFileFormat());
+
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
+}
+
 } // namespace
 
 CPPUNIT_TEST_SUITE_REGISTRATION(GraphicDescriptorTest);
commit 572282fee8e79fde60863b2402598746c2e06b7b
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Feb 15 12:30:25 2021 +0900
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Feb 15 12:42:58 2021 +0900

    Move GIF writer from filter module into VCL
    
    Change-Id: I8db3ca0f7953b44791bda47534220902931fab8d

diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx
index 95c8184009d7..c72ccc9dd488 100644
--- a/compilerplugins/clang/constparams.cxx
+++ b/compilerplugins/clang/constparams.cxx
@@ -189,9 +189,6 @@ bool ConstParams::CheckTraverseFunctionDecl(FunctionDecl * functionDecl)
             || name.startswith("Read_F_")
                 // UNO component entry points
             || name.endswith("component_getFactory")
-            || name == "egiGraphicExport"
-            || name == "etiGraphicExport"
-            || name == "epsGraphicExport"
             // callback for some external code?
             || name == "ScAddInAsyncCallBack"
             // used as function pointers
diff --git a/filter/Library_gie.mk b/filter/Library_gie.mk
deleted file mode 100644
index b40da250a183..000000000000
--- a/filter/Library_gie.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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 .
-#
-
-$(eval $(call gb_Library_Library,gie))
-
-$(eval $(call gb_Library_set_include,gie,\
-    $$(INCLUDE) \
-    -I$(SRCDIR)/filter/inc \
-))
-
-$(eval $(call gb_Library_use_external,gie,boost_headers))
-
-$(eval $(call gb_Library_use_sdk_api,gie))
-
-$(eval $(call gb_Library_use_custom_headers,gie,\
-	officecfg/registry \
-))
-
-$(eval $(call gb_Library_use_common_precompiled_header,gie))
-
-$(eval $(call gb_Library_use_libraries,gie,\
-    basegfx \
-    comphelper \
-    i18nlangtag \
-    svt \
-    vcl \
-    utl \
-    tl \
-    tk \
-    cppu \
-    sal \
-    salhelper \
-))
-
-$(eval $(call gb_Library_add_exception_objects,gie,\
-    filter/source/graphicfilter/egif/egif \
-    filter/source/graphicfilter/egif/giflzwc \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 2fb2e4c0c8e3..42a82bacf5c0 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -21,7 +21,6 @@ $(eval $(call gb_Module_Module,filter))
 $(eval $(call gb_Module_add_targets,filter,\
 	Configuration_filter \
 	CustomTarget_svg \
-    Library_gie \
 	Library_filterconfig \
     Library_icg \
 	Library_msfilter \
diff --git a/filter/source/config/fragments/internalgraphicfilters/gif_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/gif_Export.xcu
index 7f021c1b9a7f..f55d1ba55385 100644
--- a/filter/source/config/fragments/internalgraphicfilters/gif_Export.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/gif_Export.xcu
@@ -15,13 +15,14 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->
-    <node oor:name="gif_Export" oor:op="replace"  >
-        <prop oor:name="Type"><value>gif_Graphics_Interchange</value></prop>
-        <prop oor:name="FormatName"><value>egi</value></prop>
-        <prop oor:name="RealFilterName"/>
-        <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
-        <prop oor:name="UIName">
-            <value xml:lang="en-US">GIF - Graphics Interchange Format</value>
-        </prop>
-        <prop oor:name="Flags"><value>EXPORT</value></prop>
-    </node>
+
+<node oor:name="gif_Export" oor:op="replace"  >
+    <prop oor:name="Type"><value>gif_Graphics_Interchange</value></prop>
+    <prop oor:name="FormatName"><value>SVEGIF</value></prop>
+    <prop oor:name="RealFilterName"/>
+    <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
+    <prop oor:name="UIName">
+        <value xml:lang="en-US">GIF - Graphics Interchange Format</value>
+    </prop>
+    <prop oor:name="Flags"><value>EXPORT</value></prop>
+</node>
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index e1da325eab2a..88b5fea0481c 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -99,6 +99,7 @@ namespace o3tl
 #define EXP_PNG                 "SVEPNG"
 #define EXP_TIFF                "SVTIFF"
 #define EXP_EPS                 "SVEEPS"
+#define EXP_GIF                 "SVEGIF"
 
 
 #define BMP_SHORTNAME           u"BMP"
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 81284432553b..7d3e1ec19a87 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -3916,9 +3916,6 @@ filter/source/config/cache/typedetection.cxx
 filter/source/config/cache/typedetection.hxx
 filter/source/graphic/GraphicExportFilter.cxx
 filter/source/graphic/GraphicExportFilter.hxx
-filter/source/graphicfilter/egif/egif.cxx
-filter/source/graphicfilter/egif/giflzwc.cxx
-filter/source/graphicfilter/egif/giflzwc.hxx
 filter/source/graphicfilter/icgm/actimpr.cxx
 filter/source/graphicfilter/icgm/bitmap.cxx
 filter/source/graphicfilter/icgm/bitmap.hxx
@@ -14902,6 +14899,9 @@ vcl/source/filter/FilterConfigCache.hxx
 vcl/source/filter/FilterConfigItem.cxx
 vcl/source/filter/graphicfilter.cxx
 vcl/source/filter/graphicfilter2.cxx
+vcl/source/filter/egif/egif.cxx
+vcl/source/filter/egif/giflzwc.cxx
+vcl/source/filter/egif/giflzwc.hxx
 vcl/source/filter/eps/eps.cxx
 vcl/source/filter/etiff/etiff.cxx
 vcl/source/filter/idxf/dxf2mtf.cxx
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index bea21fee0867..0c37cf54684b 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -427,6 +427,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/components/dtranscomp \
     vcl/source/components/factory \
     vcl/source/components/fontident \
+    vcl/source/filter/egif/egif \
+    vcl/source/filter/egif/giflzwc \
     vcl/source/filter/eps/eps \
     vcl/source/filter/etiff/etiff \
     vcl/source/filter/FilterConfigCache \
diff --git a/vcl/inc/filter/GifWriter.hxx b/vcl/inc/filter/GifWriter.hxx
new file mode 100644
index 000000000000..6512c4bf6f2f
--- /dev/null
+++ b/vcl/inc/filter/GifWriter.hxx
@@ -0,0 +1,28 @@
+/* -*- 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 <vcl/graph.hxx>
+#include <vcl/FilterConfigItem.hxx>
+
+VCL_DLLPUBLIC bool ExportGifGraphic(SvStream& rStream, Graphic& rGraphic,
+                                    FilterConfigItem* pFilterConfigItem);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index d8ab4d44e0a8..411d44a5801d 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -41,10 +41,11 @@ using namespace ::com::sun::star::configuration ;
 
 const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] =
 {
-    IMP_BMP, IMP_GIF, IMP_PNG, IMP_JPEG, IMP_XBM, IMP_XPM,
-    EXP_BMP, EXP_JPEG, EXP_PNG, IMP_MOV, IMP_TIFF, EXP_TIFF,
-    IMP_TGA, IMP_PICT, IMP_MET, IMP_RAS, IMP_PCX, IMP_PSD,
-    IMP_PCD, IMP_PBM, IMP_DXF, nullptr
+    IMP_BMP, IMP_GIF, IMP_PNG, IMP_JPEG, IMP_TIFF,
+    IMP_XBM, IMP_XPM, IMP_TGA, IMP_PICT, IMP_MET, IMP_RAS,
+    IMP_PCX, IMP_MOV, IMP_PSD, IMP_PCD,  IMP_PBM, IMP_DXF,
+    EXP_BMP, EXP_GIF, EXP_PNG, EXP_JPEG, EXP_TIFF,
+    nullptr
 };
 
 const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameList[] =
@@ -56,7 +57,7 @@ const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameL
 
 const char* FilterConfigCache::FilterConfigCacheEntry::ExternalPixelFilterNameList[] =
 {
-    "egi", "epb", "epg", "epp", nullptr
+   nullptr
 };
 
 void FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString& rUserDataEntry )
@@ -225,7 +226,7 @@ const char* FilterConfigCache::InternalFilterListForSvxLight[] =
     "eps","1","SVIEPS",
     "eps","2","SVEEPS",
     "gif","1","SVIGIF",
-    "gif","2","egi",
+    "gif","2","SVEGIF",
     "jpg","1","SVIJPEG",
     "jpg","2","SVEJPEG",
     "mov","1","SVMOV",
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/vcl/source/filter/egif/egif.cxx
similarity index 99%
rename from filter/source/graphicfilter/egif/egif.cxx
rename to vcl/source/filter/egif/egif.cxx
index 7a70d337e6c5..bfd41d952b4c 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/vcl/source/filter/egif/egif.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/task/XStatusIndicator.hpp>
 #include "giflzwc.hxx"
 #include <memory>
+#include <filter/GifWriter.hxx>
 
 namespace {
 
@@ -539,8 +540,7 @@ void GIFWriter::WriteTerminator()
 }
 
 
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-egiGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem )
+bool ExportGifGraphic(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem)
 {
     GIFWriter aWriter(rStream);
     return aWriter.WriteGIF(rGraphic, pConfigItem);
diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/vcl/source/filter/egif/giflzwc.cxx
similarity index 100%
rename from filter/source/graphicfilter/egif/giflzwc.cxx
rename to vcl/source/filter/egif/giflzwc.cxx
diff --git a/filter/source/graphicfilter/egif/giflzwc.hxx b/vcl/source/filter/egif/giflzwc.hxx
similarity index 100%
rename from filter/source/graphicfilter/egif/giflzwc.hxx
rename to vcl/source/filter/egif/giflzwc.hxx
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 817900777ac6..43851e9a56b5 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -60,6 +60,7 @@
 #include <filter/PcdReader.hxx>
 #include <filter/PbmReader.hxx>
 #include <filter/DxfReader.hxx>
+#include <filter/GifWriter.hxx>
 #include <osl/module.hxx>
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/awt/Size.hpp>
@@ -1984,12 +1985,6 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObje
     return nRetValue;
 }
 
-#ifdef DISABLE_DYNLOADING
-
-extern "C" bool egiGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem );
-
-#endif
-
 ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& rPath,
     SvStream& rOStm, sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue >* pFilterData )
 {
@@ -2017,7 +2012,6 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
 
     FilterConfigItem aConfigItem( pFilterData );
     OUString aFilterName( pConfig->GetExportFilterName( nFormat ) );
-    OUString aExternalFilterName(pConfig->GetExternalFilterName(nFormat, true));
     ErrCode     nStatus = ERRCODE_NONE;
     GraphicType eType;
     Graphic     aGraphic = ImpGetScaledGraphic( rGraphic, aConfigItem );
@@ -2079,7 +2073,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
                 if( rOStm.GetError() )
                     nStatus = ERRCODE_GRFILTER_IOERROR;
             }
-            if (aFilterName.equalsIgnoreAsciiCase(EXP_TIFF))
+            else if (aFilterName.equalsIgnoreAsciiCase(EXP_TIFF))
             {
                 if (!ExportTiffGraphicImport(rOStm, aGraphic, &aConfigItem))
                     nStatus = ERRCODE_GRFILTER_FORMATERROR;
@@ -2087,6 +2081,14 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
                 if( rOStm.GetError() )
                     nStatus = ERRCODE_GRFILTER_IOERROR;
             }
+            else if (aFilterName.equalsIgnoreAsciiCase(EXP_GIF))
+            {
+                if (!ExportGifGraphic(rOStm, aGraphic, &aConfigItem))
+                    nStatus = ERRCODE_GRFILTER_FORMATERROR;
+
+                if( rOStm.GetError() )
+                    nStatus = ERRCODE_GRFILTER_IOERROR;
+            }
             else if( aFilterName.equalsIgnoreAsciiCase( EXP_SVMETAFILE ) )
             {
                 sal_Int32 nVersion = aConfigItem.ReadInt32( "Version", 0 ) ;
@@ -2312,35 +2314,6 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
             else
                 nStatus = ERRCODE_GRFILTER_FILTERERROR;
         }
-        else
-        {
-            sal_Int32 nIdx {aFilterPath.isEmpty() ? -1 : 0};
-            while (nIdx>=0)
-            {
-#ifndef DISABLE_DYNLOADING
-                OUString aPhysicalName( ImpCreateFullFilterPath( aFilterPath.getToken(0, ';', nIdx), aFilterName ) );
-                osl::Module aLibrary( aPhysicalName );
-
-                PFilterCall pFunc = nullptr;
-                if (aExternalFilterName == "egi")
-                    pFunc = reinterpret_cast<PFilterCall>(aLibrary.getFunctionSymbol("egiGraphicExport"));
-                 // Execute dialog in DLL
- #else
-                --nIdx; // Just one iteration
-                PFilterCall pFunc = NULL;
-                if (aExternalFilterName == "egi")
-                    pFunc = egiGraphicExport;
- #endif
-                if( pFunc )
-                {
-                    if ( !(*pFunc)( rOStm, aGraphic, &aConfigItem ) )
-                        nStatus = ERRCODE_GRFILTER_FORMATERROR;
-                    break;
-                }
-                else
-                    nStatus = ERRCODE_GRFILTER_FILTERERROR;
-            }
-        }
     }
     if( nStatus != ERRCODE_NONE )
     {
commit dfda8d077bf3205115bb59ce9821269eb9660fa0
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Feb 15 11:35:38 2021 +0900
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Feb 15 12:40:09 2021 +0900

    Move DXF reader from filter module into VCL
    
    Change-Id: If1a933256401c1a971f581d1b389ca06fd77eaae

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fbbf450b6530..1dfddfaa6785 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -6275,9 +6275,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
                     InitVCL();
                 }
 
-                // pre-load all graphic libraries.
-                GraphicFilter::GetGraphicFilter().preload();
-
                 // pre-load all component libraries.
                 if (!xContext.is())
                     throw css::uno::DeploymentException("preInit: XComponentContext is not created");
diff --git a/filter/CppunitTest_filter_dxf_test.mk b/filter/CppunitTest_filter_dxf_test.mk
deleted file mode 100644
index 4a10c1845cef..000000000000
--- a/filter/CppunitTest_filter_dxf_test.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_dxf_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_dxf_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_dxf_test, \
-    filter/qa/cppunit/filters-dxf-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_dxf_test, \
-	gie \
-	sal \
-	test \
-	tl \
-	unotest \
-	vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_dxf_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_dxf_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_dxf_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_dxf_test,\
-    configmgr/source/configmgr \
-    i18npool/util/i18npool \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_dxf_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/Library_gie.mk b/filter/Library_gie.mk
index e04eb08fda7f..b40da250a183 100644
--- a/filter/Library_gie.mk
+++ b/filter/Library_gie.mk
@@ -51,14 +51,6 @@ $(eval $(call gb_Library_use_libraries,gie,\
 $(eval $(call gb_Library_add_exception_objects,gie,\
     filter/source/graphicfilter/egif/egif \
     filter/source/graphicfilter/egif/giflzwc \
-    filter/source/graphicfilter/idxf/dxf2mtf \
-    filter/source/graphicfilter/idxf/dxfblkrd \
-    filter/source/graphicfilter/idxf/dxfentrd \
-    filter/source/graphicfilter/idxf/dxfgrprd \
-    filter/source/graphicfilter/idxf/dxfreprd \
-    filter/source/graphicfilter/idxf/dxftblrd \
-    filter/source/graphicfilter/idxf/dxfvec \
-    filter/source/graphicfilter/idxf/idxf \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 607a5fc46d0c..2fb2e4c0c8e3 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -55,7 +55,6 @@ $(eval $(call gb_Module_add_check_targets,filter,\
 
 ifneq ($(DISABLE_CVE_TESTS),TRUE)
 $(eval $(call gb_Module_add_check_targets,filter,\
-    CppunitTest_filter_dxf_test \
     CppunitTest_filter_svg \
 ))
 endif
diff --git a/filter/source/config/fragments/internalgraphicfilters/dxf_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/dxf_Import.xcu
index 1ab3279bd809..d4ce34e28b1e 100644
--- a/filter/source/config/fragments/internalgraphicfilters/dxf_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/dxf_Import.xcu
@@ -15,13 +15,14 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->
-    <node oor:name="dxf_Import" oor:op="replace"  >
-        <prop oor:name="Type"><value>dxf_AutoCAD_Interchange</value></prop>
-        <prop oor:name="FormatName"><value>idx</value></prop>
-        <prop oor:name="RealFilterName"><value>DXF - AutoCAD Interchange</value></prop>
-        <prop oor:name="UIComponent"/>
-        <prop oor:name="UIName">
-            <value xml:lang="en-US">DXF - AutoCAD Interchange Format</value>
-        </prop>
-        <prop oor:name="Flags"><value>IMPORT</value></prop>
-    </node>
+
+<node oor:name="dxf_Import" oor:op="replace"  >
+    <prop oor:name="Type"><value>dxf_AutoCAD_Interchange</value></prop>
+    <prop oor:name="FormatName"><value>SVDXF</value></prop>
+    <prop oor:name="RealFilterName"><value>DXF - AutoCAD Interchange</value></prop>
+    <prop oor:name="UIComponent"/>
+    <prop oor:name="UIName">
+        <value xml:lang="en-US">DXF - AutoCAD Interchange Format</value>
+    </prop>
+    <prop oor:name="Flags"><value>IMPORT</value></prop>
+</node>
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 73b8e932fbd6..e1da325eab2a 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -87,6 +87,8 @@ namespace o3tl
 #define IMP_PSD                 "SVPSD"
 #define IMP_PCD                 "SVPCD"
 #define IMP_PBM                 "SVPBM"
+#define IMP_DXF                 "SVDXF"
+
 #define EXP_BMP                 "SVBMP"
 #define EXP_SVMETAFILE          "SVMETAFILE"
 #define EXP_WMF                 "SVWMF"
@@ -335,8 +337,6 @@ public:
 
     ErrCode         compressAsPNG(const Graphic& rGraphic, SvStream& rOutputStream);
 
-    void preload();
-
     ErrCode readGIF(SvStream& rStream, Graphic& rGraphic, GfxLinkType& rLinkType);
     ErrCode readPNG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & rLinkType,
                     std::unique_ptr<sal_uInt8[]> & rpGraphicContent, sal_Int32& rGraphicContentSize);
@@ -364,6 +364,7 @@ public:
     ErrCode readPSD(SvStream & rStream, Graphic & rGraphic);
     ErrCode readPCD(SvStream & rStream, Graphic & rGraphic);
     ErrCode readPBM(SvStream & rStream, Graphic & rGraphic);
+    ErrCode readDXF(SvStream & rStream, Graphic & rGraphic);
 
 private:
     OUString        aFilterPath;
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 4cd0fd50c95e..81284432553b 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -3890,7 +3890,6 @@ external/unixODBC/inc/odbc/sqlext.h
 external/unixODBC/inc/odbc/sqltypes.h
 external/unixODBC/inc/odbc/sqlucode.h
 filter/inc/strings.hxx
-filter/qa/cppunit/filters-dxf-test.cxx
 filter/qa/cppunit/msfilter-test.cxx
 filter/qa/cppunit/priority-test.cxx
 filter/qa/cppunit/xslt-test.cxx
@@ -3941,21 +3940,6 @@ filter/source/graphicfilter/icgm/classx.cxx
 filter/source/graphicfilter/icgm/elements.cxx
 filter/source/graphicfilter/icgm/elements.hxx
 filter/source/graphicfilter/icgm/outact.hxx
-filter/source/graphicfilter/idxf/dxf2mtf.cxx
-filter/source/graphicfilter/idxf/dxf2mtf.hxx
-filter/source/graphicfilter/idxf/dxfblkrd.cxx
-filter/source/graphicfilter/idxf/dxfblkrd.hxx
-filter/source/graphicfilter/idxf/dxfentrd.cxx
-filter/source/graphicfilter/idxf/dxfentrd.hxx
-filter/source/graphicfilter/idxf/dxfgrprd.cxx
-filter/source/graphicfilter/idxf/dxfgrprd.hxx
-filter/source/graphicfilter/idxf/dxfreprd.cxx
-filter/source/graphicfilter/idxf/dxfreprd.hxx
-filter/source/graphicfilter/idxf/dxftblrd.cxx
-filter/source/graphicfilter/idxf/dxftblrd.hxx
-filter/source/graphicfilter/idxf/dxfvec.cxx
-filter/source/graphicfilter/idxf/dxfvec.hxx
-filter/source/graphicfilter/idxf/idxf.cxx
 filter/source/msfilter/countryid.cxx
 filter/source/msfilter/dffpropset.cxx
 filter/source/msfilter/escherex.cxx
@@ -14803,6 +14787,7 @@ vcl/qa/cppunit/dndtest.cxx
 vcl/qa/cppunit/errorhandler.cxx
 vcl/qa/cppunit/font.cxx
 vcl/qa/cppunit/fontmetric.cxx
+vcl/qa/cppunit/graphicfilter/filters-dxf-test.cxx
 vcl/qa/cppunit/graphicfilter/filters-eps-test.cxx
 vcl/qa/cppunit/graphicfilter/filters-met-test.cxx
 vcl/qa/cppunit/graphicfilter/filters-pcd-test.cxx
@@ -14919,6 +14904,21 @@ vcl/source/filter/graphicfilter.cxx
 vcl/source/filter/graphicfilter2.cxx
 vcl/source/filter/eps/eps.cxx
 vcl/source/filter/etiff/etiff.cxx
+vcl/source/filter/idxf/dxf2mtf.cxx
+vcl/source/filter/idxf/dxf2mtf.hxx
+vcl/source/filter/idxf/dxfblkrd.cxx
+vcl/source/filter/idxf/dxfblkrd.hxx
+vcl/source/filter/idxf/dxfentrd.cxx
+vcl/source/filter/idxf/dxfentrd.hxx
+vcl/source/filter/idxf/dxfgrprd.cxx
+vcl/source/filter/idxf/dxfgrprd.hxx
+vcl/source/filter/idxf/dxfreprd.cxx
+vcl/source/filter/idxf/dxfreprd.hxx
+vcl/source/filter/idxf/dxftblrd.cxx
+vcl/source/filter/idxf/dxftblrd.hxx
+vcl/source/filter/idxf/dxfvec.cxx
+vcl/source/filter/idxf/dxfvec.hxx
+vcl/source/filter/idxf/idxf.cxx
 vcl/source/filter/ieps/ieps.cxx
 vcl/source/filter/igif/decode.cxx
 vcl/source/filter/igif/decode.hxx
diff --git a/vcl/CppunitTest_vcl_filters_test.mk b/vcl/CppunitTest_vcl_filters_test.mk
index ccb427dddd6c..ab5108f51b1c 100644
--- a/vcl/CppunitTest_vcl_filters_test.mk
+++ b/vcl/CppunitTest_vcl_filters_test.mk
@@ -10,6 +10,7 @@
 $(eval $(call gb_CppunitTest_CppunitTest,vcl_filters_test))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,vcl_filters_test, \
+    vcl/qa/cppunit/graphicfilter/filters-dxf-test \
     vcl/qa/cppunit/graphicfilter/filters-eps-test \
     vcl/qa/cppunit/graphicfilter/filters-met-test \
     vcl/qa/cppunit/graphicfilter/filters-pcd-test \
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 581e50aec36f..bea21fee0867 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -436,6 +436,14 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/filter/GraphicNativeTransform \
     vcl/source/filter/GraphicNativeMetadata \
     vcl/source/filter/GraphicFormatDetector \
+    vcl/source/filter/idxf/dxf2mtf \
+    vcl/source/filter/idxf/dxfblkrd \
+    vcl/source/filter/idxf/dxfentrd \
+    vcl/source/filter/idxf/dxfgrprd \
+    vcl/source/filter/idxf/dxfreprd \
+    vcl/source/filter/idxf/dxftblrd \
+    vcl/source/filter/idxf/dxfvec \
+    vcl/source/filter/idxf/idxf \
     vcl/source/filter/ieps/ieps \
     vcl/source/filter/igif/decode \
     vcl/source/filter/igif/gifread \
diff --git a/vcl/inc/filter/DxfReader.hxx b/vcl/inc/filter/DxfReader.hxx
new file mode 100644
index 000000000000..f1e89bf4b115
--- /dev/null
+++ b/vcl/inc/filter/DxfReader.hxx
@@ -0,0 +1,26 @@
+/* -*- 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 <vcl/graph.hxx>
+
+VCL_DLLPUBLIC bool ImportDxfGraphic(SvStream& rStream, Graphic& rGraphic);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/cppunit/data/dxf/fail/.gitignore b/vcl/qa/cppunit/graphicfilter/data/dxf/fail/.gitignore
similarity index 100%
rename from filter/qa/cppunit/data/dxf/fail/.gitignore
rename to vcl/qa/cppunit/graphicfilter/data/dxf/fail/.gitignore
diff --git a/filter/qa/cppunit/data/dxf/fail/CVE-2010-1681-1.dxf b/vcl/qa/cppunit/graphicfilter/data/dxf/fail/CVE-2010-1681-1.dxf
similarity index 100%
rename from filter/qa/cppunit/data/dxf/fail/CVE-2010-1681-1.dxf
rename to vcl/qa/cppunit/graphicfilter/data/dxf/fail/CVE-2010-1681-1.dxf
diff --git a/filter/qa/cppunit/data/dxf/fail/hang-1.dxf b/vcl/qa/cppunit/graphicfilter/data/dxf/fail/hang-1.dxf
similarity index 100%
rename from filter/qa/cppunit/data/dxf/fail/hang-1.dxf
rename to vcl/qa/cppunit/graphicfilter/data/dxf/fail/hang-1.dxf
diff --git a/filter/qa/cppunit/data/dxf/indeterminate/.gitignore b/vcl/qa/cppunit/graphicfilter/data/dxf/indeterminate/.gitignore
similarity index 100%
rename from filter/qa/cppunit/data/dxf/indeterminate/.gitignore
rename to vcl/qa/cppunit/graphicfilter/data/dxf/indeterminate/.gitignore
diff --git a/filter/qa/cppunit/data/dxf/pass/.gitignore b/vcl/qa/cppunit/graphicfilter/data/dxf/pass/.gitignore
similarity index 100%
rename from filter/qa/cppunit/data/dxf/pass/.gitignore
rename to vcl/qa/cppunit/graphicfilter/data/dxf/pass/.gitignore
diff --git a/filter/qa/cppunit/data/dxf/pass/bigangle-1.dxf b/vcl/qa/cppunit/graphicfilter/data/dxf/pass/bigangle-1.dxf
similarity index 100%
rename from filter/qa/cppunit/data/dxf/pass/bigangle-1.dxf
rename to vcl/qa/cppunit/graphicfilter/data/dxf/pass/bigangle-1.dxf
diff --git a/filter/qa/cppunit/data/dxf/pass/loop-1.dxf b/vcl/qa/cppunit/graphicfilter/data/dxf/pass/loop-1.dxf
similarity index 100%
rename from filter/qa/cppunit/data/dxf/pass/loop-1.dxf
rename to vcl/qa/cppunit/graphicfilter/data/dxf/pass/loop-1.dxf
diff --git a/filter/qa/cppunit/data/dxf/pass/loop-2.dxf b/vcl/qa/cppunit/graphicfilter/data/dxf/pass/loop-2.dxf
similarity index 100%
rename from filter/qa/cppunit/data/dxf/pass/loop-2.dxf
rename to vcl/qa/cppunit/graphicfilter/data/dxf/pass/loop-2.dxf
diff --git a/filter/qa/cppunit/data/dxf/pass/pyramid.dxf b/vcl/qa/cppunit/graphicfilter/data/dxf/pass/pyramid.dxf
similarity index 100%
rename from filter/qa/cppunit/data/dxf/pass/pyramid.dxf
rename to vcl/qa/cppunit/graphicfilter/data/dxf/pass/pyramid.dxf
diff --git a/filter/qa/cppunit/filters-dxf-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-dxf-test.cxx
similarity index 80%
rename from filter/qa/cppunit/filters-dxf-test.cxx
rename to vcl/qa/cppunit/graphicfilter/filters-dxf-test.cxx
index 2dddac45d026..7a133500826a 100644
--- a/filter/qa/cppunit/filters-dxf-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-dxf-test.cxx
@@ -12,15 +12,9 @@
 #include <vcl/FilterConfigItem.hxx>
 #include <tools/stream.hxx>
 #include <vcl/graph.hxx>
+#include <filter/DxfReader.hxx>
 
-extern "C"
-{
-    SAL_DLLPUBLIC_EXPORT bool SAL_CALL
-        idxGraphicImport(SvStream & rStream, Graphic & rGraphic,
-        FilterConfigItem*);
-}
-
-using namespace ::com::sun::star;
+using namespace css;
 
 /* Implementation of Filters test */
 
@@ -51,17 +45,17 @@ bool DxfFilterTest::load(const OUString &,
 {
     SvFileStream aFileStream(rURL, StreamMode::READ);
     Graphic aGraphic;
-    return idxGraphicImport(aFileStream, aGraphic, nullptr);
+    return ImportDxfGraphic(aFileStream, aGraphic);
 }
 
 void DxfFilterTest::testCVEs()
 {
+#ifndef DISABLE_CVE_TESTS
     testDir(OUString(),
-        m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/dxf/"));
+        m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/dxf/"));
+#endif
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DxfFilterTest);
 
-CPPUNIT_PLUGIN_IMPLEMENT();
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index 0f19f717f2c8..d8ab4d44e0a8 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -44,7 +44,7 @@ const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameLi
     IMP_BMP, IMP_GIF, IMP_PNG, IMP_JPEG, IMP_XBM, IMP_XPM,
     EXP_BMP, EXP_JPEG, EXP_PNG, IMP_MOV, IMP_TIFF, EXP_TIFF,
     IMP_TGA, IMP_PICT, IMP_MET, IMP_RAS, IMP_PCX, IMP_PSD,
-    IMP_PCD, IMP_PBM, nullptr
+    IMP_PCD, IMP_PBM, IMP_DXF, nullptr
 };
 
 const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameList[] =
@@ -221,7 +221,7 @@ const char* FilterConfigCache::InternalFilterListForSvxLight[] =
 {
     "bmp","1","SVBMP",
     "bmp","2","SVBMP",
-    "dxf","1","idx",
+    "dxf","1","SVDXF",
     "eps","1","SVIEPS",
     "eps","2","SVEEPS",
     "gif","1","SVIGIF",
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index f76ede5dc840..817900777ac6 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -59,6 +59,7 @@
 #include <filter/PsdReader.hxx>
 #include <filter/PcdReader.hxx>
 #include <filter/PbmReader.hxx>
+#include <filter/DxfReader.hxx>
 #include <osl/module.hxx>
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/awt/Size.hpp>
@@ -647,26 +648,9 @@ ImpFilterLibCacheEntry::ImpFilterLibCacheEntry( const OUString& rPathname, const
 #endif
 }
 
-#ifdef DISABLE_DYNLOADING
-
-extern "C" bool idxGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem );
-
-#endif
-
 PFilterCall ImpFilterLibCacheEntry::GetImportFunction()
 {
-    if( !mpfnImport )
-    {
-#ifndef DISABLE_DYNLOADING
-        if (maFormatName == "idx")
-            mpfnImport = reinterpret_cast<PFilterCall>(maLibrary.getFunctionSymbol("idxGraphicImport"));
- #else
-        if (maFormatName ==  "idx")
-            mpfnImport = idxGraphicImport;
- #endif
-    }
-
-    return mpfnImport;
+    return nullptr;
 }
 
 namespace {
@@ -1392,30 +1376,6 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size
     return aGraphic;
 }
 
-void GraphicFilter::preload()
-{
-    sal_Int32 nTokenCount = comphelper::string::getTokenCount(aFilterPath, ';');
-    ImpFilterLibCache& rCache = Cache::get();
-    static const std::initializer_list<std::u16string_view> aFilterNames = {
-        u"idx", u"ipb", u"ipd"
-    };
-
-    // Load library for each filter.
-    for (const auto& rFilterName : aFilterNames)
-    {
-        ImpFilterLibCacheEntry* pFilter = nullptr;
-        // Look at the library in each element inside the filter path.
-        for (sal_Int32 i = 0; i < nTokenCount; ++i)
-        {
-            pFilter = rCache.GetFilter(aFilterPath.getToken(i, ';'), SVLIBRARY("gie"), OUString(rFilterName));
-            if (pFilter)
-            {
-                break;
-            }
-        }
-    }
-}
-
 ErrCode GraphicFilter::readGIF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & rLinkType)
 {
     if (ImportGIF(rStream, rGraphic))
@@ -1766,6 +1726,14 @@ ErrCode GraphicFilter::readPBM(SvStream & rStream, Graphic & rGraphic)
         return ERRCODE_GRFILTER_FILTERERROR;
 }
 
+ErrCode GraphicFilter::readDXF(SvStream & rStream, Graphic & rGraphic)
+{
+    if (ImportDxfGraphic(rStream, rGraphic))
+        return ERRCODE_NONE;
+    else
+        return ERRCODE_GRFILTER_FILTERERROR;
+}
+
 ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, SvStream& rIStream,
                                      sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat, GraphicFilterImportFlags nImportFlags,
                                      const css::uno::Sequence< css::beans::PropertyValue >* /*pFilterData*/,
@@ -1915,6 +1883,10 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
         {
             nStatus = readPBM(rIStream, rGraphic);
         }
+        else if (aFilterName.equalsIgnoreAsciiCase(IMP_DXF))
+        {
+            nStatus = readDXF(rIStream, rGraphic);
+        }
         else
             nStatus = ERRCODE_GRFILTER_FILTERERROR;
     }
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/vcl/source/filter/idxf/dxf2mtf.cxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxf2mtf.cxx
rename to vcl/source/filter/idxf/dxf2mtf.cxx
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/vcl/source/filter/idxf/dxf2mtf.hxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxf2mtf.hxx
rename to vcl/source/filter/idxf/dxf2mtf.hxx
diff --git a/filter/source/graphicfilter/idxf/dxfblkrd.cxx b/vcl/source/filter/idxf/dxfblkrd.cxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfblkrd.cxx
rename to vcl/source/filter/idxf/dxfblkrd.cxx
diff --git a/filter/source/graphicfilter/idxf/dxfblkrd.hxx b/vcl/source/filter/idxf/dxfblkrd.hxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfblkrd.hxx
rename to vcl/source/filter/idxf/dxfblkrd.hxx
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/vcl/source/filter/idxf/dxfentrd.cxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfentrd.cxx
rename to vcl/source/filter/idxf/dxfentrd.cxx
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.hxx b/vcl/source/filter/idxf/dxfentrd.hxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfentrd.hxx
rename to vcl/source/filter/idxf/dxfentrd.hxx
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/vcl/source/filter/idxf/dxfgrprd.cxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfgrprd.cxx
rename to vcl/source/filter/idxf/dxfgrprd.cxx
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.hxx b/vcl/source/filter/idxf/dxfgrprd.hxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfgrprd.hxx
rename to vcl/source/filter/idxf/dxfgrprd.hxx
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/vcl/source/filter/idxf/dxfreprd.cxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfreprd.cxx
rename to vcl/source/filter/idxf/dxfreprd.cxx
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.hxx b/vcl/source/filter/idxf/dxfreprd.hxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfreprd.hxx
rename to vcl/source/filter/idxf/dxfreprd.hxx
diff --git a/filter/source/graphicfilter/idxf/dxftblrd.cxx b/vcl/source/filter/idxf/dxftblrd.cxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxftblrd.cxx
rename to vcl/source/filter/idxf/dxftblrd.cxx
diff --git a/filter/source/graphicfilter/idxf/dxftblrd.hxx b/vcl/source/filter/idxf/dxftblrd.hxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxftblrd.hxx
rename to vcl/source/filter/idxf/dxftblrd.hxx
diff --git a/filter/source/graphicfilter/idxf/dxfvec.cxx b/vcl/source/filter/idxf/dxfvec.cxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfvec.cxx
rename to vcl/source/filter/idxf/dxfvec.cxx
diff --git a/filter/source/graphicfilter/idxf/dxfvec.hxx b/vcl/source/filter/idxf/dxfvec.hxx
similarity index 100%
rename from filter/source/graphicfilter/idxf/dxfvec.hxx
rename to vcl/source/filter/idxf/dxfvec.hxx
diff --git a/filter/source/graphicfilter/idxf/idxf.cxx b/vcl/source/filter/idxf/idxf.cxx
similarity index 90%
rename from filter/source/graphicfilter/idxf/idxf.cxx
rename to vcl/source/filter/idxf/idxf.cxx
index ad75d6b5e1c3..26d42b10cbe4 100644
--- a/filter/source/graphicfilter/idxf/idxf.cxx
+++ b/vcl/source/filter/idxf/idxf.cxx
@@ -18,16 +18,14 @@
  */
 
 
+#include <filter/DxfReader.hxx>
 #include <vcl/gdimtf.hxx>
 #include <vcl/graph.hxx>
 #include "dxf2mtf.hxx"
 
-class FilterConfigItem;
-
 //================== GraphicImport - the exported function ================
 
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-idxGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
+bool ImportDxfGraphic(SvStream & rStream, Graphic & rGraphic)
 {
     DXFRepresentation aDXF;
     DXF2GDIMetaFile aConverter;
diff --git a/vcl/workben/dxffuzzer.cxx b/vcl/workben/dxffuzzer.cxx
index 6ca526a1d8cf..8768072c93fb 100644
--- a/vcl/workben/dxffuzzer.cxx
+++ b/vcl/workben/dxffuzzer.cxx
@@ -10,6 +10,7 @@
 #include <tools/stream.hxx>
 #include <vcl/FilterConfigItem.hxx>
 #include "commonfuzzer.hxx"
+#include <filter/DxfReader.hxx>
 
 #include <config_features.h>
 #include <osl/detail/component-mapping.h>
@@ -48,8 +49,6 @@ extern "C" void* lo_get_custom_widget_func(const char*)
     return nullptr;
 }
 
-extern "C" bool idxGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem);
-
 extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
 {
     TypicalFuzzerInitialize(argc, argv);
@@ -60,7 +59,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
 {
     SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
     Graphic aGraphic;
-    (void)idxGraphicImport(aStream, aGraphic, nullptr);
+    (void)ImportDxfGraphic(aStream, aGraphic);
     return 0;
 }
 
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index 45deeee37169..5dafd12be683 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -52,6 +52,7 @@
 #include <filter/PsdReader.hxx>
 #include <filter/PcdReader.hxx>
 #include <filter/PbmReader.hxx>
+#include <filter/DxfReader.hxx>
 #include <osl/file.hxx>
 #include <osl/module.hxx>
 #include <tools/stream.hxx>
@@ -165,7 +166,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
             SvFileStream aFileStream(out, StreamMode::READ);
             ReadGDIMetaFile(aFileStream, aGDIMetaFile);
         }
-#ifndef DISABLE_DYNLOADING
         else if (strcmp(argv[2], "pcd") == 0)
         {
             Graphic aGraphic;
@@ -174,18 +174,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         }
         else if (strcmp(argv[2], "dxf") == 0)
         {
-            static PFilterCall pfnImport(nullptr);
-            if (!pfnImport)
-            {
-                osl::Module aLibrary;
-                aLibrary.loadRelative(&thisModule, "libgielo.so");
-                pfnImport = reinterpret_cast<PFilterCall>(
-                    aLibrary.getFunctionSymbol("idxGraphicImport"));
-                aLibrary.release();
-            }
             Graphic aGraphic;
             SvFileStream aFileStream(out, StreamMode::READ);
-            ret = static_cast<int>((*pfnImport)(aFileStream, aGraphic, nullptr));
+            ret = static_cast<int>(ImportDxfGraphic(aFileStream, aGraphic));
         }
         else if (strcmp(argv[2], "met") == 0)
         {
@@ -241,6 +232,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
             SvFileStream aFileStream(out, StreamMode::READ);
             ret = static_cast<int>(ImportTiffGraphicImport(aFileStream, aGraphic));
         }
+#ifndef DISABLE_DYNLOADING
         else if ((strcmp(argv[2], "doc") == 0) || (strcmp(argv[2], "ww8") == 0))
         {
             static FFilterCall pfnImport(nullptr);


More information about the Libreoffice-commits mailing list