[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 20 commits - accessibility/source avmedia/source basctl/source canvas/source chart2/source comphelper/source connectivity/source cui/source dbaccess/source desktop/source drawinglayer/CppunitTest_drawinglayer_border.mk drawinglayer/inc drawinglayer/Library_drawinglayercore.mk drawinglayer/Library_drawinglayer.mk drawinglayer/Module_drawinglayer.mk drawinglayer/source emfio/CppunitTest_emfio_emf_test.mk emfio/Library_emfio.mk emfio/source extensions/source filter/Library_svgfilter.mk filter/source forms/source framework/source helpcontent2 i18npool/source include/com include/drawinglayer include/sfx2 include/svx include/unotools include/vbahelper include/vcl oox/source pyuno/source reportdesign/inc reportdesign/source Repository.mk sc/CppunitTest_sc_ucalc.mk sc/Library_sc.mk sc/source sd/CppunitTest_sd_uimpress.mk sd/Library_sd.mk sd/source sfx2/Library_sfx.mk sfx2/source slideshow/source solenv/clang-format starmath/source svgio/ CppunitTest_svgio.mk svgio/Library_svgio.mk svtools/source svx/CppunitTest_svx_unit.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/source sw/CppunitTest_sw_uwriter.mk sw/Library_sw.mk sw/Library_swui.mk sw/source testtools/source toolkit/source ucbhelper/source unotools/Library_utl.mk unotools/source vbahelper/source vcl/CppunitTest_vcl_graphic_test.mk vcl/inc vcl/Library_vcl.mk vcl/qa vcl/source writerfilter/source writerperfect/qa writerperfect/source xmloff/source xmlscript/source xmlsecurity/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 27 07:59:46 UTC 2020


Rebased ref, commits from common ancestor:
commit 97bba82ac082b9f7a94b26cf7dc6784a8f30145e
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Apr 27 09:57:25 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Apr 27 09:58:57 2020 +0200

    vcl: PdfExportTest rename topdf method to saveAsPDF
    
    Change-Id: Id26a79fa047f1f6d26cab1f08e1db57330d4168b

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index c2aea35fb72f..313dbdd278b4 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -91,7 +91,7 @@ public:
     PdfExportTest();
     virtual void setUp() override;
     virtual void tearDown() override;
-    void topdf(const OUString& rFile);
+    void saveAsPDF(const OUString& rFile);
     void load(const OUString& rFile, vcl::filter::PDFDocument& rDocument);
     /// Tests that a pdf image is roundtripped back to PDF as a vector format.
     void testTdf106059();
@@ -241,7 +241,7 @@ void PdfExportTest::tearDown()
 
 char const DATA_DIRECTORY[] = "/vcl/qa/cppunit/pdfexport/data/";
 
-void PdfExportTest::topdf(const OUString& rFile)
+void PdfExportTest::saveAsPDF(const OUString& rFile)
 {
     // Import the bugdoc and export as PDF.
     OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFile;
@@ -256,7 +256,7 @@ void PdfExportTest::topdf(const OUString& rFile)
 
 void PdfExportTest::load(const OUString& rFile, vcl::filter::PDFDocument& rDocument)
 {
-    topdf(rFile);
+    saveAsPDF(rFile);
 
     // Parse the export result.
     SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
@@ -1681,7 +1681,7 @@ void PdfExportTest::testTdf113143()
 void PdfExportTest::testForcePoint71()
 {
     // I just care it doesn't crash
-    topdf("forcepoint71.key");
+    saveAsPDF("forcepoint71.key");
 }
 
 void PdfExportTest::testTdf115262()
commit d3e8125d6309cf974bd4cfa05ca3ae95f406f1ce
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Apr 1 13:00:25 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Apr 27 09:58:56 2020 +0200

    Add OutputDevice::drawPrimitive2D to OutputDevice
    
    Change-Id: Ifc22eca62df72bddd247ba097054f34756520614

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e4430b2415f3..44aa8f821dae 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -49,6 +49,8 @@
 #include <com/sun/star/drawing/LineCap.hpp>
 #include <com/sun/star/uno/Reference.h>
 
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+
 #include <memory>
 #include <vector>
 
@@ -1955,6 +1957,9 @@ public:
     ///@}
 
 
+    bool drawPrimitive2D(drawinglayer::primitive2d::Primitive2DContainer & rPrimitive2D);
+
+
     /** @name Native Widget Rendering functions
 
         These all just call through to the private mpGraphics functions of the same name.
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index cb59e378fb89..6d5b09ae4592 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -80,6 +80,7 @@ $(eval $(call gb_Library_use_libraries,vcl,\
     basegfx \
     comphelper \
     cppuhelper \
+    drawinglayercore \
     i18nlangtag \
     i18nutil \
     $(if $(filter OPENCL,$(BUILD_TYPE)),opencl) \
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 0dcdd84a5d0a..52f31234caa3 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -713,4 +713,9 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
     return bDrawn;
 }
 
+bool OutputDevice::drawPrimitive2D(drawinglayer::primitive2d::Primitive2DContainer & rPrimitive2D)
+{
+    return false;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0aec005c766a9dd119e83cfd8b97d79e36da618f
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Mar 7 14:33:43 2020 +0100
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Apr 27 09:58:56 2020 +0200

    Separate core drawinglayer func. into drawinglayercore library
    
    This separates the drawinglayer core functionallity into a
    separate library, to keep a strict separation what is backend
    dependent and what is not. More strict separation can be done
    at a later date.
    
    This will make it possible to push part of drawinglayer
    (part of processor2d) directly into VCL.
    
    Change-Id: Ibc26580067e50bf20d7cdd37fa0e44eb10200878

diff --git a/Repository.mk b/Repository.mk
index 4479ed901e23..78b146096bdd 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -350,6 +350,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 	$(call gb_Helper_optional,SCRIPTING,dlgprov) \
 	$(if $(filter WNT,$(OS)),directx9canvas) \
 	$(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
+	drawinglayercore \
 	drawinglayer \
 	editeng \
 	$(if $(filter WNT,$(OS)),emser) \
diff --git a/drawinglayer/CppunitTest_drawinglayer_border.mk b/drawinglayer/CppunitTest_drawinglayer_border.mk
index fa2f715590cd..e00006c18dba 100644
--- a/drawinglayer/CppunitTest_drawinglayer_border.mk
+++ b/drawinglayer/CppunitTest_drawinglayer_border.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,drawinglayer_border, \
 	sal \
 	salhelper \
 	drawinglayer \
+	drawinglayercore \
 	vcl \
 	test \
 	tl \
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 2a0f1030a789..46f21f56b6b6 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Library_use_externals,drawinglayer,\
 ))
 
 $(eval $(call gb_Library_use_libraries,drawinglayer,\
+    drawinglayercore \
     basegfx \
     canvastools \
     comphelper \
@@ -67,11 +68,9 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/attribute/sdrsceneattribute3d \
     drawinglayer/source/attribute/sdrshadowattribute \
     drawinglayer/source/attribute/strokeattribute \
-    drawinglayer/source/geometry/viewinformation2d \
     drawinglayer/source/geometry/viewinformation3d \
     drawinglayer/source/primitive2d/animatedprimitive2d \
     drawinglayer/source/primitive2d/backgroundcolorprimitive2d \
-    drawinglayer/source/primitive2d/baseprimitive2d \
     drawinglayer/source/primitive2d/bitmapprimitive2d \
     drawinglayer/source/primitive2d/borderlineprimitive2d \
     drawinglayer/source/primitive2d/controlprimitive2d \
@@ -111,7 +110,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D \
     drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D \
     drawinglayer/source/primitive2d/primitivetools2d \
-    drawinglayer/source/primitive2d/Primitive2DContainer \
     drawinglayer/source/primitive2d/sceneprimitive2d \
     drawinglayer/source/primitive2d/sdrdecompositiontools2d \
     drawinglayer/source/primitive2d/shadowprimitive2d \
@@ -126,7 +124,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/primitive2d/textlineprimitive2d \
     drawinglayer/source/primitive2d/textprimitive2d \
     drawinglayer/source/primitive2d/textstrikeoutprimitive2d \
-    drawinglayer/source/primitive2d/Tools \
     drawinglayer/source/primitive2d/transformprimitive2d \
     drawinglayer/source/primitive2d/transparenceprimitive2d \
     drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d \
diff --git a/drawinglayer/Library_drawinglayercore.mk b/drawinglayer/Library_drawinglayercore.mk
new file mode 100644
index 000000000000..f1643d27014d
--- /dev/null
+++ b/drawinglayer/Library_drawinglayercore.mk
@@ -0,0 +1,49 @@
+# -*- 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_Library_Library,drawinglayercore))
+
+$(eval $(call gb_Library_set_include,drawinglayercore,\
+    $$(INCLUDE) \
+    -I$(SRCDIR)/drawinglayer/inc \
+))
+
+$(eval $(call gb_Library_add_defs,drawinglayercore,\
+    -DDRAWINGLAYERCORE_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_set_precompiled_header,drawinglayercore,drawinglayer/inc/pch/precompiled_drawinglayercore))
+
+$(eval $(call gb_Library_use_sdk_api,drawinglayercore))
+
+$(eval $(call gb_Library_use_externals,drawinglayercore,\
+    boost_headers \
+    libxml2 \
+))
+
+$(eval $(call gb_Library_use_libraries,drawinglayercore,\
+    basegfx \
+    comphelper \
+    cppu \
+    cppuhelper \
+    i18nlangtag \
+    sal \
+    salhelper \
+    svl \
+    tl \
+))
+
+$(eval $(call gb_Library_add_exception_objects,drawinglayercore,\
+    drawinglayer/source/primitive2d/baseprimitive2d \
+    drawinglayer/source/primitive2d/Primitive2DContainer \
+    drawinglayer/source/primitive2d/Tools \
+    drawinglayer/source/geometry/viewinformation2d \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/drawinglayer/Module_drawinglayer.mk b/drawinglayer/Module_drawinglayer.mk
index 6d329e95c60a..687cd9c2671f 100644
--- a/drawinglayer/Module_drawinglayer.mk
+++ b/drawinglayer/Module_drawinglayer.mk
@@ -10,6 +10,7 @@
 $(eval $(call gb_Module_Module,drawinglayer))
 
 $(eval $(call gb_Module_add_targets,drawinglayer,\
+    Library_drawinglayercore \
     Library_drawinglayer \
 ))
 
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
index 9aaf7bace296..d60954dab588 100644
--- a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
+++ b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
@@ -93,7 +93,6 @@
 #include <basegfx/range/basicrange.hxx>
 #include <basegfx/tuple/b2dtuple.hxx>
 #include <basegfx/tuple/b3dtuple.hxx>
-#include <basegfx/utils/canvastools.hxx>
 #include <basegfx/vector/b2dvector.hxx>
 #include <basegfx/vector/b2enums.hxx>
 #include <basegfx/vector/b2ivector.hxx>
@@ -105,7 +104,7 @@
 #include <com/sun/star/drawing/TextureMode.hpp>
 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
 #include <com/sun/star/graphic/XPrimitive3D.hpp>
-#include <com/sun/star/util/XAccounting.hpp>
+#include <com/sun/star/uno/Reference.hxx>
 #include <comphelper/comphelperdllapi.h>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/sequence.hxx>
@@ -139,7 +138,6 @@
 #include <drawinglayer/drawinglayerdllapi.h>
 #include <drawinglayer/geometry/viewinformation2d.hxx>
 #include <drawinglayer/geometry/viewinformation3d.hxx>
-#include <drawinglayer/primitive2d/CommonTypes.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonGradientPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx>
@@ -147,9 +145,6 @@
 #include <drawinglayer/primitive2d/PolyPolygonHatchPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx>
-#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
-#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx>
-#include <drawinglayer/primitive2d/Tools.hxx>
 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx
new file mode 100644
index 000000000000..4a8c23ea8e65
--- /dev/null
+++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx
@@ -0,0 +1,12 @@
+/* -*- 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/.
+ */
+
+#include "precompiled_drawinglayercore.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx
new file mode 100644
index 000000000000..4cc5ca4612c9
--- /dev/null
+++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx
@@ -0,0 +1,46 @@
+/* -*- 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 has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2020-03-07 12:37:18 using:
+ ./bin/update_pch drawinglayer drawinglayercore --cutoff=4 --exclude:system --exclude:module --exclude:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./drawinglayer/inc/pch/precompiled_drawinglayercore.hxx "make drawinglayer.build" --find-conflicts
+*/
+
+#if PCH_LEVEL >= 1
+#include <ostream>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <osl/diagnose.h>
+#include <osl/interlck.h>
+#include <sal/config.h>
+#include <sal/types.h>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+#include <basegfx/utils/canvastools.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/emfio/CppunitTest_emfio_emf_test.mk b/emfio/CppunitTest_emfio_emf_test.mk
index 123e4b3549bd..2679c0a604d9 100644
--- a/emfio/CppunitTest_emfio_emf_test.mk
+++ b/emfio/CppunitTest_emfio_emf_test.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,emfio_emf))
 $(eval $(call gb_CppunitTest_use_libraries,emfio_emf,\
     basegfx \
     drawinglayer \
+    drawinglayercore \
     cppu \
     cppuhelper \
     comphelper \
diff --git a/emfio/Library_emfio.mk b/emfio/Library_emfio.mk
index 52fde14885b3..89add50b781a 100644
--- a/emfio/Library_emfio.mk
+++ b/emfio/Library_emfio.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_sdk_api,emfio))
 
 $(eval $(call gb_Library_use_libraries,emfio,\
     basegfx \
+    drawinglayercore \
     drawinglayer \
     cppu \
     cppuhelper \
diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk
index 21318aa1fd03..1f0caf11758c 100644
--- a/filter/Library_svgfilter.mk
+++ b/filter/Library_svgfilter.mk
@@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_libraries,svgfilter,\
 	sax \
 	salhelper \
 	comphelper \
+	drawinglayercore \
 	drawinglayer \
 	basegfx \
 	cppuhelper \
diff --git a/include/drawinglayer/drawinglayerdllapi.h b/include/drawinglayer/drawinglayerdllapi.h
index 0b3983504919..36a0d8abfea2 100644
--- a/include/drawinglayer/drawinglayerdllapi.h
+++ b/include/drawinglayer/drawinglayerdllapi.h
@@ -19,6 +19,12 @@
 #endif
 #define DRAWINGLAYER_DLLPRIVATE SAL_DLLPRIVATE
 
+#if defined(DRAWINGLAYERCORE_DLLIMPLEMENTATION)
+#define DRAWINGLAYERCORE_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define DRAWINGLAYERCORE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx b/include/drawinglayer/geometry/viewinformation2d.hxx
index 95be29a72bda..06b17248d213 100644
--- a/include/drawinglayer/geometry/viewinformation2d.hxx
+++ b/include/drawinglayer/geometry/viewinformation2d.hxx
@@ -63,7 +63,7 @@ namespace drawinglayer::geometry
     It is an implementation to support the sequence of PropertyValues used in a
     css::graphic::XPrimitive2D for C++ implementations working with those
 */
-class DRAWINGLAYER_DLLPUBLIC ViewInformation2D
+class DRAWINGLAYERCORE_DLLPUBLIC ViewInformation2D
 {
 public:
     typedef o3tl::cow_wrapper<ImpViewInformation2D, o3tl::ThreadSafeRefCountingPolicy> ImplType;
diff --git a/include/drawinglayer/primitive2d/Primitive2DContainer.hxx b/include/drawinglayer/primitive2d/Primitive2DContainer.hxx
index cca3a0a91485..c096e9a8cc2f 100644
--- a/include/drawinglayer/primitive2d/Primitive2DContainer.hxx
+++ b/include/drawinglayer/primitive2d/Primitive2DContainer.hxx
@@ -34,7 +34,7 @@ class ViewInformation2D;
 
 namespace drawinglayer::primitive2d
 {
-class SAL_WARN_UNUSED DRAWINGLAYER_DLLPUBLIC Primitive2DContainer
+class SAL_WARN_UNUSED DRAWINGLAYERCORE_DLLPUBLIC Primitive2DContainer
     : public std::deque<Primitive2DReference>,
       public Primitive2DDecompositionVisitor
 {
diff --git a/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx b/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx
index dfe04b32a320..e174d1e0878d 100644
--- a/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx
+++ b/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx
@@ -27,7 +27,7 @@ namespace drawinglayer::primitive2d
 class Primitive2DContainer;
 
 // Visitor class for walking a tree of Primitive2DReference
-class DRAWINGLAYER_DLLPUBLIC Primitive2DDecompositionVisitor
+class DRAWINGLAYERCORE_DLLPUBLIC Primitive2DDecompositionVisitor
 {
 public:
     virtual void append(const Primitive2DReference&) = 0;
diff --git a/include/drawinglayer/primitive2d/Tools.hxx b/include/drawinglayer/primitive2d/Tools.hxx
index fbb6f5717c01..1c30565c8c1b 100644
--- a/include/drawinglayer/primitive2d/Tools.hxx
+++ b/include/drawinglayer/primitive2d/Tools.hxx
@@ -31,16 +31,16 @@ class ViewInformation2D;
 namespace drawinglayer::primitive2d
 {
 /// get B2DRange from a given Primitive2DReference
-basegfx::B2DRange DRAWINGLAYER_DLLPUBLIC getB2DRangeFromPrimitive2DReference(
+basegfx::B2DRange DRAWINGLAYERCORE_DLLPUBLIC getB2DRangeFromPrimitive2DReference(
     const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation);
 
 /** compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D)
     and using compare operator
  */
-bool DRAWINGLAYER_DLLPUBLIC arePrimitive2DReferencesEqual(const Primitive2DReference& rA,
-                                                          const Primitive2DReference& rB);
+bool DRAWINGLAYERCORE_DLLPUBLIC arePrimitive2DReferencesEqual(const Primitive2DReference& rA,
+                                                              const Primitive2DReference& rB);
 
-OUString DRAWINGLAYER_DLLPUBLIC idToString(sal_uInt32 nId);
+OUString DRAWINGLAYERCORE_DLLPUBLIC idToString(sal_uInt32 nId);
 
 } // end of namespace drawinglayer::primitive2d
 
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index 5e1a96429ff3..8818cdd0bcde 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -121,8 +121,8 @@ typedef cppu::WeakComponentImplHelper<css::graphic::XPrimitive2D, css::util::XAc
     for view-independent primitives which are defined by not using ViewInformation2D
     in their get2DDecomposition/getB2DRange implementations.
 */
-class DRAWINGLAYER_DLLPUBLIC BasePrimitive2D : protected cppu::BaseMutex,
-                                               public BasePrimitive2DImplBase
+class DRAWINGLAYERCORE_DLLPUBLIC BasePrimitive2D : protected cppu::BaseMutex,
+                                                   public BasePrimitive2DImplBase
 {
     BasePrimitive2D(const BasePrimitive2D&) = delete;
     BasePrimitive2D& operator=(const BasePrimitive2D&) = delete;
@@ -200,7 +200,7 @@ public:
         to identify if a new decomposition is needed at the next call
     (f) return maBuffered2DDecomposition
  */
-class DRAWINGLAYER_DLLPUBLIC BufferedDecompositionPrimitive2D : public BasePrimitive2D
+class DRAWINGLAYERCORE_DLLPUBLIC BufferedDecompositionPrimitive2D : public BasePrimitive2D
 {
 private:
     /// a sequence used for buffering the last create2DDecomposition() result
diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk
index 8943de7ab4c3..60fb6676dab9 100644
--- a/sc/CppunitTest_sc_ucalc.mk
+++ b/sc/CppunitTest_sc_ucalc.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_ucalc, \
     cppuhelper \
     dbtools \
     drawinglayer \
+    drawinglayercore \
     editeng \
     for \
     forui \
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 997b14c0add9..b540b27c9834 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_Library_use_libraries,sc,\
     cppu \
     cppuhelper \
     dbtools \
+    drawinglayercore \
     drawinglayer \
     editeng \
     for \
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index 93426dfc3a55..63f143978231 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_uimpress,\
     cppu \
     cppuhelper \
     drawinglayer \
+    drawinglayercore \
     editeng \
     i18nlangtag \
     i18nutil \
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 43b168be8d8c..24520633e77f 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_Library_use_libraries,sd,\
 	cppcanvas \
 	cppu \
 	cppuhelper \
+	drawinglayercore \
 	drawinglayer \
 	editeng \
 	i18nlangtag \
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 67a66ef2d211..a6d6b7d6b71a 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,sfx,\
     comphelper \
     cppu \
     cppuhelper \
+    drawinglayercore \
     drawinglayer \
     fwe \
     i18nlangtag \
diff --git a/svgio/CppunitTest_svgio.mk b/svgio/CppunitTest_svgio.mk
index c6f4db91fc60..24fb7a39af32 100644
--- a/svgio/CppunitTest_svgio.mk
+++ b/svgio/CppunitTest_svgio.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_library_objects,svgio,\
 $(eval $(call gb_CppunitTest_use_libraries,svgio,\
     basegfx \
     drawinglayer \
+    drawinglayercore \
     cppu \
     cppuhelper \
     comphelper \
diff --git a/svgio/Library_svgio.mk b/svgio/Library_svgio.mk
index 449c17f61196..7ef1aeb19513 100644
--- a/svgio/Library_svgio.mk
+++ b/svgio/Library_svgio.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Library_use_sdk_api,svgio))
 
 $(eval $(call gb_Library_use_libraries,svgio,\
     basegfx \
+    drawinglayercore \
     drawinglayer \
     comphelper \
     cppu \
diff --git a/svx/CppunitTest_svx_unit.mk b/svx/CppunitTest_svx_unit.mk
index 92feb45d6578..c78b8d7769eb 100644
--- a/svx/CppunitTest_svx_unit.mk
+++ b/svx/CppunitTest_svx_unit.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,svx_unit, \
 $(eval $(call gb_CppunitTest_use_libraries,svx_unit, \
 	basegfx \
 	drawinglayer \
+	drawinglayercore \
 	sal \
 	sfx \
 	svxcore \
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index d3eff20b6769..9ccba33a748c 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_libraries,svx,\
 		crashreport) \
     $(call gb_Helper_optional,DBCONNECTIVITY, \
         dbtools) \
+    drawinglayercore \
     drawinglayer \
     editeng \
     fwe \
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 222d69bb6c8a..7a9b31e58b77 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -57,6 +57,7 @@ $(eval $(call gb_Library_use_libraries,svxcore,\
     cppu \
     $(call gb_Helper_optional,DBCONNECTIVITY, \
         dbtools) \
+    drawinglayercore \
     drawinglayer \
     editeng \
     fwe \
diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk
index 6b9ffa4ba683..a881587735e4 100644
--- a/sw/CppunitTest_sw_uwriter.mk
+++ b/sw/CppunitTest_sw_uwriter.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_uwriter, \
     $(call gb_Helper_optional,DBCONNECTIVITY, \
         dbtools) \
     drawinglayer \
+    drawinglayercore \
     editeng \
     i18nlangtag \
     i18nutil \
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index b6d75fd890bf..d99c59a58a4b 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -58,6 +58,7 @@ $(eval $(call gb_Library_use_libraries,sw,\
     cppuhelper \
     $(call gb_Helper_optional,DBCONNECTIVITY, \
         dbtools) \
+    drawinglayercore \
     drawinglayer \
     editeng \
     i18nlangtag \
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 99f1dd20ae3d..4c09d1cc4bda 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -75,6 +75,7 @@ $(eval $(call gb_Library_use_libraries,swui,\
     ucbhelper \
     utl \
     vcl \
+    drawinglayercore \
     drawinglayer \
 ))
 
commit 5cff6410222c04f47661ca07a1bbe6e6337633be
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Thu Apr 23 21:59:32 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Apr 27 09:50:05 2020 +0200

    Graphic: cleanup private, public declarations, remove friend
    
    Friend GraphicObject doesn't seem to be needed anymore.
    
    Change-Id: I629ddaabf0c1802e986af42b457cd6322d2fd04d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92949
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index b304cfb7ac97..17fdd6336e2d 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -83,15 +83,12 @@ class Image;
 class VCL_DLLPUBLIC Graphic
 {
 private:
-
     std::shared_ptr<ImpGraphic> mxImpGraphic;
+    SAL_DLLPRIVATE void ImplTestRefCount();
 
 public:
-
-    SAL_DLLPRIVATE void ImplTestRefCount();
     SAL_DLLPRIVATE ImpGraphic* ImplGetImpGraphic() const { return mxImpGraphic.get(); }
 
-public:
                     Graphic();
                     Graphic( const GraphicExternalLink& rGraphicLink );
                     Graphic( const Graphic& rGraphic );
@@ -180,16 +177,11 @@ public:
 
     OString getUniqueID() const;
 
-public:
-
     std::shared_ptr<GraphicReader>& GetReaderContext();
     void                            SetReaderContext( const std::shared_ptr<GraphicReader> &pReader );
     void                            SetDummyContext(bool value);
     bool                            IsDummyContext() const;
-private:
-    friend class GraphicObject;
 
-public:
     void            SetGfxLink(const std::shared_ptr<GfxLink>& rGfxLink);
     std::shared_ptr<GfxLink> GetSharedGfxLink() const;
     GfxLink         GetGfxLink() const;
@@ -200,8 +192,6 @@ public:
     friend VCL_DLLPUBLIC void WriteGraphic(SvStream& rOStream, const Graphic& rGraphic);
     friend VCL_DLLPUBLIC void ReadGraphic(SvStream& rIStream, Graphic& rGraphic);
 
-public:
-
     const std::shared_ptr<VectorGraphicData>& getVectorGraphicData() const;
 
     /// Get the page number of the multi-page source this Graphic is rendered from.
commit 32b8f5be41cf9294f995a27d83ae2b1e9e792869
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Apr 26 21:34:23 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Apr 27 09:42:33 2020 +0200

    STYLESPREVIEW is never defined
    
    added by...
    
    commit dda842bec338efb06457551136678340d0718807
    Date:   Thu Aug 29 17:22:48 2013 +0100
    
    Change-Id: I8fc15a0d7c18df69e772366ac81980f6acef52a2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92952
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index d793608eee53..2f2e1541eca0 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -891,11 +891,6 @@ void SfxCommonTemplateDialog_Impl::Initialize()
 
 SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
 {
-#if defined STYLESPREVIEW
-    Execute_Impl(SID_STYLE_END_PREVIEW,
-        OUString(), OUString(),
-        0, 0, 0, 0 );
-#endif
     if ( bIsWater )
         Execute_Impl(SID_STYLE_WATERCAN, "", "", 0);
     GetWindow()->Hide();
@@ -1308,13 +1303,6 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags)
     OUString aStyle;
     if(pState)
         aStyle = pState->GetStyleName();
-#if defined STYLESPREVIEW
-    mbIgnoreSelect = true; // in case we get a selection change
-    // in any case we should stop any preview
-    Execute_Impl(SID_STYLE_END_PREVIEW,
-    OUString(), OUString(),
-    0, 0, 0, 0 );
-#endif
     SelectStyle(aStyle);
     EnableDelete();
 }
@@ -2145,23 +2133,6 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pListBox
         return;
 
     SelectStyle( pListBox->GetEntryText( pListBox->GetHdlEntry() ));
-#if defined STYLESPREVIEW
-    sal_uInt16 nModifier = aFmtLb->GetModifier();
-    if ( mbIgnoreSelect )
-    {
-        Execute_Impl(SID_STYLE_END_PREVIEW,
-        OUString(), OUString(),
-        0, 0, 0, 0 );
-        mbIgnoreSelect = false;
-    }
-    else
-    {
-        Execute_Impl(SID_STYLE_PREVIEW,
-                 GetSelectedEntry(), OUString(),
-                 ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(),
-                 0, 0, &nModifier );
-    }
-#endif
 }
 
 IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu, bool )
commit 962a18691d9aa99555d6f332cc577c1fc256d48b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Apr 26 21:20:54 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Apr 27 09:41:56 2020 +0200

    aPoint is never consumed so calculations to derive it are moot
    
    Change-Id: I4b00fc1e3bb0f346e688d50d1ea4d1ad4dd56915
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92951
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index 8708b32c2e65..3c0f4e2e99d3 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -36,7 +36,6 @@ public:
     virtual void dispose() override;
 
     virtual void Resize() override;
-    virtual void StateChanged( StateChangedType nStateChange ) override;
 
 private:
     std::unique_ptr<SfxTemplateDialog_Impl> pImpl;
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 8ec385bff416..d793608eee53 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -414,25 +414,6 @@ void SfxTemplatePanelControl::Resize()
     Window::Resize();
 }
 
-void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange )
-{
-    if (nStateChange == StateChangedType::InitShow)
-    {
-        SfxViewFrame* pFrame = mpBindings->GetDispatcher_Impl()->GetFrame();
-        vcl::Window* pEditWin = pFrame->GetViewShell()->GetWindow();
-
-        Size aSize = pEditWin->GetSizePixel();
-        Point aPoint = pEditWin->OutputToScreenPixel( pEditWin->GetPosPixel() );
-        aPoint = GetParent()->ScreenToOutputPixel( aPoint );
-        Size aWinSize = GetSizePixel();
-        aPoint.AdjustX(aSize.Width() - aWinSize.Width() - 20 );
-        aPoint.AdjustY(aSize.Height() / 2 - aWinSize.Height() / 2 );
-        // SetFloatingPos( aPoint );
-    }
-
-    Window::StateChanged( nStateChange );
-}
-
 void StyleTreeListBox_Impl::MakeExpanded_Impl(std::vector<OUString>& rEntries) const
 {
     SvTreeListEntry* pEntry;
commit 27306e0eeee8a22e554f6f5bebccca4f778ae731
Author:     Ian Barkley-Yeung <ibarkleyyeung at gmail.com>
AuthorDate: Sun Apr 26 20:18:33 2020 -0700
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Apr 27 09:40:47 2020 +0200

    tdf#42982: Improve UNO API error reporting
    
    Improve error repoting in BreakIteratorImpl
    
    Change-Id: I0be64a758ed81b7a720c8b26af14de6b51cc5dbc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92955
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index a6ce162270ef..5037a7c63474 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -53,7 +53,9 @@ BreakIteratorImpl::~BreakIteratorImpl()
 sal_Int32 SAL_CALL BreakIteratorImpl::nextCharacters( const OUString& Text, sal_Int32 nStartPos,
         const Locale &rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32& nDone )
 {
-    if (nCount < 0) throw RuntimeException();
+    if (nCount < 0)
+        throw RuntimeException("BreakIteratorImpl::nextCharacters: expected nCount >=0, got "
+                               + OUString::number(nCount));
 
     return LBI->nextCharacters( Text, nStartPos, rLocale, nCharacterIteratorMode, nCount, nDone);
 }
@@ -61,7 +63,9 @@ sal_Int32 SAL_CALL BreakIteratorImpl::nextCharacters( const OUString& Text, sal_
 sal_Int32 SAL_CALL BreakIteratorImpl::previousCharacters( const OUString& Text, sal_Int32 nStartPos,
         const Locale& rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32& nDone )
 {
-    if (nCount < 0) throw RuntimeException();
+    if (nCount < 0)
+        throw RuntimeException("BreakIteratorImpl::previousCharacters: expected nCount >=0, got "
+                               + OUString::number(nCount));
 
     return LBI->previousCharacters( Text, nStartPos, rLocale, nCharacterIteratorMode, nCount, nDone);
 }
@@ -647,7 +651,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale)
             return xBI;
         }
     }
-    throw RuntimeException();
+    throw RuntimeException("getLocaleSpecificBreakIterator: iterator not found");
 }
 
 OUString SAL_CALL
commit e6df5847379a97ad2de95a3c01cb11380c56e0f7
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Apr 27 08:02:53 2020 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Apr 27 09:38:27 2020 +0200

    Extract getting default locale for filters into separate unotools function
    
    Change-Id: Ic97b1a4507d5629963f360147ecc20eb10f5d391
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92957
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 01c091be598c..06b0f813588d 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -34,9 +34,8 @@
 #include <osl/diagnose.h>
 #include <vcl/virdev.hxx>
 #include <o3tl/safeint.hxx>
-#include <officecfg/Setup.hxx>
-#include <officecfg/Office/Linguistic.hxx>
 #include <unotools/configmgr.hxx>
+#include <unotools/defaultencoding.hxx>
 #include <unotools/wincodepage.hxx>
 
 #if OSL_DEBUG_LEVEL > 1
@@ -164,20 +163,6 @@ namespace emfio
         bClosed = true;
     }
 
-    namespace {
-
-    OUString getLODefaultLanguage()
-    {
-        if (utl::ConfigManager::IsFuzzing())
-            return "en-US";
-        OUString result(officecfg::Office::Linguistic::General::DefaultLocale::get());
-        if (result.isEmpty())
-            result = officecfg::Setup::L10N::ooSetupSystemLocale::get();
-        return result;
-    }
-
-    }
-
     WinMtfFontStyle::WinMtfFontStyle( LOGFONTW const & rFont )
     {
         rtl_TextEncoding eCharSet;
@@ -185,7 +170,7 @@ namespace emfio
          || (rFont.alfFaceName == "MT Extra"))
             eCharSet = RTL_TEXTENCODING_SYMBOL;
         else if ((rFont.lfCharSet == DEFAULT_CHARSET) || (rFont.lfCharSet == OEM_CHARSET))
-            eCharSet = utl_getWinTextEncodingFromLangStr(getLODefaultLanguage(),
+            eCharSet = utl_getWinTextEncodingFromLangStr(utl_getLocaleForGlobalDefaultEncoding(),
                                                          rFont.lfCharSet == OEM_CHARSET);
         else
             eCharSet = rtl_getTextEncodingFromWindowsCharset( rFont.lfCharSet );
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx
index 8e4c9bc73560..e20e407cc013 100644
--- a/filter/source/graphicfilter/idxf/dxfreprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx
@@ -20,8 +20,7 @@
 
 #include "dxfreprd.hxx"
 #include <osl/nlsupport.h>
-#include <officecfg/Setup.hxx>
-#include <officecfg/Office/Linguistic.hxx>
+#include <unotools/defaultencoding.hxx>
 #include <unotools/wincodepage.hxx>
 #include <unotools/configmgr.hxx>
 
@@ -134,21 +133,6 @@ DXFRepresentation::~DXFRepresentation()
 {
 }
 
-namespace {
-
-OUString getLODefaultLanguage()
-{
-    if (utl::ConfigManager::IsFuzzing())
-        return "en-US";
-
-    OUString result(officecfg::Office::Linguistic::General::DefaultLocale::get());
-    if (result.isEmpty())
-        result = officecfg::Setup::L10N::ooSetupSystemLocale::get();
-    return result;
-}
-
-}
-
 rtl_TextEncoding DXFRepresentation::getTextEncoding() const
 {
     return (isTextEncodingSet()) ?
@@ -229,7 +213,8 @@ void DXFRepresentation::ReadHeader(DXFGroupReader & rDGR)
                     // only if the encoding is not set yet
                     // e.g. by previous $DWGCODEPAGE
                     if (!isTextEncodingSet())
-                        setTextEncoding(utl_getWinTextEncodingFromLangStr(getLODefaultLanguage(), true));
+                        setTextEncoding(utl_getWinTextEncodingFromLangStr(
+                            utl_getLocaleForGlobalDefaultEncoding(), true));
                 }
                 else if (rDGR.GetS() >= "AC1021")
                     setTextEncoding(RTL_TEXTENCODING_UTF8);
@@ -239,7 +224,8 @@ void DXFRepresentation::ReadHeader(DXFGroupReader & rDGR)
                     // only if the encoding is not set yet
                     // e.g. by previous $DWGCODEPAGE
                     if (!isTextEncodingSet())
-                        setTextEncoding(utl_getWinTextEncodingFromLangStr(getLODefaultLanguage()));
+                        setTextEncoding(utl_getWinTextEncodingFromLangStr(
+                            utl_getLocaleForGlobalDefaultEncoding()));
                 }
             }
             else if (rDGR.GetS() == "$DWGCODEPAGE")
diff --git a/include/unotools/defaultencoding.hxx b/include/unotools/defaultencoding.hxx
new file mode 100644
index 000000000000..8cde4bccbe04
--- /dev/null
+++ b/include/unotools/defaultencoding.hxx
@@ -0,0 +1,31 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_UNOTOOLS_DEFAULTENCODING_HXX
+#define INCLUDED_UNOTOOLS_DEFAULTENCODING_HXX
+
+#include <sal/config.h>
+
+#include <unotools/unotoolsdllapi.h>
+#include <rtl/ustring.hxx>
+
+/** Determines which locale should be used by default in filters when importing non-unicode strings.
+This value should be used when the file does not explicitly define encoding of 8-bit strings. It is
+defined by officecfg::Office::Linguistic::General::DefaultLocale, or when it's not set,
+officecfg::Setup::L10N::ooSetupSystemLocale, and is typically mapped to a corresponding Windows
+codepage by filters.
+
+ at return
+A BCP-47 language tag string.
+*/
+UNOTOOLS_DLLPUBLIC OUString utl_getLocaleForGlobalDefaultEncoding();
+
+#endif // INCLUDED_UNOTOOLS_DEFAULTENCODING_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unotools/Library_utl.mk b/unotools/Library_utl.mk
index e36d291db0f0..b7c06cbf4a7f 100644
--- a/unotools/Library_utl.mk
+++ b/unotools/Library_utl.mk
@@ -100,6 +100,7 @@ $(eval $(call gb_Library_add_exception_objects,utl,\
     unotools/source/i18n/transliterationwrapper \
     unotools/source/misc/closeveto \
     unotools/source/misc/datetime \
+    unotools/source/misc/defaultencoding \
     unotools/source/misc/desktopterminationobserver \
     unotools/source/misc/eventlisteneradapter \
     unotools/source/misc/fontcvt \
diff --git a/unotools/source/misc/defaultencoding.cxx b/unotools/source/misc/defaultencoding.cxx
new file mode 100644
index 000000000000..b0e473d099bd
--- /dev/null
+++ b/unotools/source/misc/defaultencoding.cxx
@@ -0,0 +1,27 @@
+/* -*- 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/.
+ */
+
+#include <sal/config.h>
+
+#include <unotools/configmgr.hxx>
+#include <unotools/defaultencoding.hxx>
+#include <officecfg/Office/Linguistic.hxx>
+#include <officecfg/Setup.hxx>
+
+OUString utl_getLocaleForGlobalDefaultEncoding()
+{
+    if (utl::ConfigManager::IsFuzzing())
+        return "en-US";
+    OUString result(officecfg::Office::Linguistic::General::DefaultLocale::get());
+    if (result.isEmpty())
+        result = officecfg::Setup::L10N::ooSetupSystemLocale::get();
+    return result;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index e847e58f0797..227fba3c24fa 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -26,23 +26,11 @@
 #include "rtfreferenceproperties.hxx"
 #include "rtfskipdestination.hxx"
 
-#include <officecfg/Setup.hxx>
-#include <officecfg/Office/Linguistic.hxx>
+#include <unotools/defaultencoding.hxx>
 #include <unotools/wincodepage.hxx>
 
 using namespace com::sun::star;
 
-namespace
-{
-OUString getLODefaultLanguage()
-{
-    OUString result(::officecfg::Office::Linguistic::General::DefaultLocale::get());
-    if (result.isEmpty())
-        result = ::officecfg::Setup::L10N::ooSetupSystemLocale::get();
-    return result;
-}
-}
-
 namespace writerfilter
 {
 static int getNumberFormat(int nParam)
@@ -841,8 +829,9 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         case RTF_CPG:
         {
             rtl_TextEncoding nEncoding
-                = (nParam == 0) ? utl_getWinTextEncodingFromLangStr(getLODefaultLanguage())
-                                : rtl_getTextEncodingFromWindowsCodePage(nParam);
+                = (nParam == 0)
+                      ? utl_getWinTextEncodingFromLangStr(utl_getLocaleForGlobalDefaultEncoding())
+                      : rtl_getTextEncodingFromWindowsCodePage(nParam);
             if (nKeyword == RTF_ANSICPG)
                 m_aDefaultState.setCurrentEncoding(nEncoding);
             else
commit b512ce255f46d90e682634e4dd17e146af7f9080
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sun Apr 26 22:07:21 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Apr 27 07:19:30 2020 +0200

    Make upcasting css::uno::Reference ctor require complete types
    
    The main reason for the "home-grown" UpCast introduced with
    904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for
    css::uno::Reference" in 2013 was probably that we could not yet rely on C++11
    std::is_base_of back then.  A (welcome) side effect was that the derived class
    could be incomplete.
    
    However, specializations of UpCast relying on whether or not T2 is incomplete
    are obviously an ODR violation if the type is incomplete in some TUs and
    complete (and derived from T1) in others.  And even if UpCast had internal
    linkage, it would still be brittle that its behavior depends on the completeness
    of T2 at the point of the template's instantiation, and not necessarily at the
    point of use.
    
    That means we should better base that ctor on std::is_base_of (which we can do
    now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference
    upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on
    Clang and GCC if the completeness requirements are not met.  This change fixes
    all the cases where types need to be complete now, plus any resulting
    loplugin:referencecasting warnings ("the source reference is already a subtype
    of the destination reference").
    
    Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx
index 2ba95b88bfb8..a1393d067a59 100644
--- a/accessibility/source/extended/accessibletabbar.cxx
+++ b/accessibility/source/extended/accessibletabbar.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <com/sun/star/awt/XDevice.hpp>
+#include <com/sun/star/awt/XWindowPeer.hpp>
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <cppuhelper/supportsservice.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
diff --git a/accessibility/source/standard/accessiblemenucomponent.cxx b/accessibility/source/standard/accessiblemenucomponent.cxx
index fb46c3e2d968..ff927df47d14 100644
--- a/accessibility/source/standard/accessiblemenucomponent.cxx
+++ b/accessibility/source/standard/accessiblemenucomponent.cxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <com/sun/star/awt/XDevice.hpp>
+#include <com/sun/star/awt/XWindowPeer.hpp>
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <unotools/accessiblestatesethelper.hxx>
 #include <unotools/accessiblerelationsethelper.hxx>
diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx
index c75900fee6b0..3b83f3853ce8 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/embed/ElementModes.hpp>
 #include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/document/XStorageBasedDocument.hpp>
 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
 #include <com/sun/star/uri/UriReferenceFactory.hpp>
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 45c132df06a7..e823c2e8dac5 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/media/XPlayer.hpp>
 #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
 #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
 #include <memory>
 #include <sal/log.hxx>
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 270c6cfc5b12..a722b802a55c 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -36,6 +36,7 @@
 #include <basic/sbuno.hxx>
 #include <com/sun/star/beans/XMultiPropertySet.hpp>
 #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
 #include <com/sun/star/script/XLibraryContainer2.hpp>
 #include <comphelper/string.hxx>
 #include <officecfg/Office/Common.hxx>
diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx
index 30f92f484967..54e93fcb3625 100644
--- a/canvas/source/tools/canvastools.cxx
+++ b/canvas/source/tools/canvastools.cxx
@@ -34,6 +34,7 @@
 #include <basegfx/utils/canvastools.hxx>
 #include <basegfx/vector/b2ivector.hxx>
 #include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/XWindow2.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/geometry/AffineMatrix2D.hpp>
 #include <com/sun/star/geometry/Matrix2D.hpp>
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index b0a1d5f85746..b15f33f1871a 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -34,6 +34,9 @@
 #include <com/sun/star/chart/ChartAxisPosition.hpp>
 #include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
 #include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
+#include <com/sun/star/chart2/XAxis.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 
 #include <CharacterProperties.hxx>
 #include <LinePropertiesHelper.hxx>
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
index a4239d10ce22..7b9d07f002bb 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -19,6 +19,8 @@
 
 #include "WrappedAxisAndGridExistenceProperties.hxx"
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/chart2/XAxis.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
 #include <AxisHelper.hxx>
 #include <WrappedProperty.hxx>
 #include "Chart2ModelContact.hxx"
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 2b599040dced..95759509c563 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/chart2/SymbolStyle.hpp>
 #include <com/sun/star/awt/Size.hpp>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
 #include <com/sun/star/chart/ChartSymbolType.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
 #include <vcl/GraphicLoader.hxx>
diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx b/chart2/source/controller/dialogs/TitleDialogData.cxx
index 907bc7324fda..e4e9099011a6 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <com/sun/star/frame/XModel.hpp>
+
 #include <TitleDialogData.hxx>
 #include <TitleHelper.hxx>
 #include <ChartModelHelper.hxx>
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index bc85e6c418b0..3cb9598cb2e9 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -22,6 +22,7 @@
 #include <comphelper/stl_types.hxx>
 
 #include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
 
 using namespace ::com::sun::star;
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
index 7acd590c6ed1..a7aeb35d72d6 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
@@ -27,6 +27,7 @@
 #include <AxisHelper.hxx>
 #include <ObjectNameProvider.hxx>
 
+#include <com/sun/star/frame/XModel.hpp>
 #include <comphelper/servicehelper.hxx>
 
 using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx
index 311182615935..b81b7ecacbf1 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.cxx
+++ b/chart2/source/controller/dialogs/dlg_View3D.cxx
@@ -25,6 +25,8 @@
 #include "tp_3D_SceneIllumination.hxx"
 #include <ChartModelHelper.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
index 1168fe0f18c7..c24cf6fab0d9 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
@@ -22,7 +22,9 @@
 #include <ThreeDHelper.hxx>
 #include <ControllerLockGuard.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
 #include <com/sun/star/drawing/ShadeMode.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <tools/diagnose_ex.h>
 #include <vcl/svapp.hxx>
 
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index eb22751a0ec3..d09fcf81ff87 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -28,7 +28,10 @@
 #include "DialogModel.hxx"
 #include <TabPageNotifiable.hxx>
 #include <com/sun/star/chart2/XChartType.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
+#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
 #include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/util/XModifiable.hpp>
 #include <com/sun/star/chart2/data/XDataSink.hpp>
 
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 303af1ceb26f..d60b259dad62 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -36,6 +36,7 @@
 #include <editeng/fhgtitem.hxx>
 
 #include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 
 #include <sfx2/objsh.hxx>
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 59ebe40c27fd..da0a880626b0 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -37,6 +37,7 @@
 #include <com/sun/star/chart/ChartAxisPosition.hpp>
 #include <com/sun/star/chart/TimeInterval.hpp>
 #include <com/sun/star/chart2/XAxis.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/AxisOrientation.hpp>
 #include <com/sun/star/chart2/AxisType.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index a931151e1c2c..4920d2b727e0 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -37,7 +37,7 @@
 #include <com/sun/star/chart2/Symbol.hpp>
 #include <com/sun/star/chart2/RelativePosition.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
-
+#include <com/sun/star/frame/XModel.hpp>
 #include <svx/xflclit.hxx>
 #include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index 63ab0723ee34..244cbf9a23bb 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -30,6 +30,8 @@
 #include <AxisHelper.hxx>
 #include <chartview/ExplicitValueProvider.hxx>
 #include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
+#include <com/sun/star/chart2/XTitle.hpp>
 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
 #include <com/sun/star/chart2/XAxis.hpp>
 
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 21ac2411bf0c..496b25e2692f 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -43,6 +43,7 @@
 #include <com/sun/star/chart2/DataPointLabel.hpp>
 #include <com/sun/star/chart2/Symbol.hpp>
 #include <com/sun/star/chart2/RelativePosition.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <memory>
 
 using namespace com::sun::star;
diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx
index cb98c4e7462a..9814a5db6595 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.cxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx
@@ -25,6 +25,7 @@
 #include <ObjectIdentifier.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <tools/diagnose_ex.h>
 
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index 6868f68a191e..7501f0bf7204 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -31,6 +31,7 @@
 #include <svx/scene3d.hxx>
 #include <basegfx/matrix/b3dhommatrix.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <basegfx/polygon/b2dpolypolygontools.hxx>
 #include <svx/sdr/contact/viewcontactofe3dscene.hxx>
 #include <drawinglayer/geometry/viewinformation3d.hxx>
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index e872964a38b8..bf7c812b16b1 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -34,6 +34,7 @@
 #include <algorithm>
 #include <iterator>
 
+#include <com/sun/star/drawing/XDrawPage.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx
index c1e0e14441bd..84e4325e3ef2 100644
--- a/chart2/source/controller/main/PositionAndSizeHelper.cxx
+++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx
@@ -21,9 +21,10 @@
 #include <ControllerLockGuard.hxx>
 #include <com/sun/star/chart2/LegendPosition.hpp>
 #include <com/sun/star/chart/ChartLegendExpansion.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
 #include <com/sun/star/chart2/RelativePosition.hpp>
 #include <com/sun/star/chart2/RelativeSize.hpp>
-
+#include <com/sun/star/frame/XModel.hpp>
 #include <tools/gen.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/awt/Rectangle.hpp>
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 5065a5768736..5475be204c00 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -22,6 +22,7 @@
 #include <DiagramHelper.hxx>
 #include <ChartModelHelper.hxx>
 
+#include <com/sun/star/frame/XModel.hpp>
 #include <svx/svdpage.hxx>
 #include <svx/svditer.hxx>
 #include <svx/obj3d.hxx>
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 76559121c11c..8161717fe339 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -24,7 +24,7 @@
 #include <dlg_ShapeFont.hxx>
 #include <dlg_ShapeParagraph.hxx>
 #include <chartview/DrawModelWrapper.hxx>
-
+#include <com/sun/star/drawing/XDrawPage.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/frame/CommandGroup.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx
index 6cb42ff88f61..e4bd85a3be34 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.cxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.cxx
@@ -19,6 +19,7 @@
 
 #include "UndoCommandDispatch.hxx"
 
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/util/XModifyBroadcaster.hpp>
 #include <com/sun/star/document/UndoFailedException.hpp>
 #include <com/sun/star/document/XUndoManagerSupplier.hpp>
diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx
index ffc694fbd5df..dce1ffbb09d9 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.cxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
 #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <tools/diagnose_ex.h>
diff --git a/chart2/source/tools/ChartViewHelper.cxx b/chart2/source/tools/ChartViewHelper.cxx
index 872960f17e41..a341f8894f14 100644
--- a/chart2/source/tools/ChartViewHelper.cxx
+++ b/chart2/source/tools/ChartViewHelper.cxx
@@ -20,6 +20,7 @@
 #include <ChartViewHelper.hxx>
 #include <servicenames.hxx>
 
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/util/XModifyListener.hpp>
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 3dbcd65f70a2..a772f11c5fb1 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/chart2/AxisType.hpp>
 #include <com/sun/star/chart2/SymbolStyle.hpp>
 #include <com/sun/star/chart2/Symbol.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
 
 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index 5ac9ba648e60..5817db73a2e1 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/util/CloseVetoException.hpp>
 #include <com/sun/star/util/XCloseListener.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
 #include <tools/diagnose_ex.h>
 #include <sal/log.hxx>
 
diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx
index ea49fc64a07f..9efdbc5d439b 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -26,6 +26,7 @@
 
 #include <com/sun/star/chart2/ScaleData.hpp>
 #include <com/sun/star/chart2/XAxis.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
 #include <com/sun/star/chart/ErrorBarStyle.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index 7cd07d911703..865acc660c08 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -22,7 +22,7 @@
 #include <ChartModelHelper.hxx>
 #include <DiagramHelper.hxx>
 #include <AxisHelper.hxx>
-
+#include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
 #include <com/sun/star/chart2/XTitle.hpp>
 #include <com/sun/star/chart2/XDataSeries.hpp>
diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx
index f90edf2fe15a..02dab3b9bd89 100644
--- a/chart2/source/tools/StatisticsHelper.cxx
+++ b/chart2/source/tools/StatisticsHelper.cxx
@@ -25,7 +25,7 @@
 #include <rtl/math.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <comphelper/processfactory.hxx>
-
+#include <com/sun/star/chart2/XDataSeries.hpp>
 #include <com/sun/star/chart2/data/LabeledDataSequence.hpp>
 #include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
 #include <com/sun/star/chart2/data/XDataProvider.hpp>
diff --git a/chart2/source/tools/WrappedDefaultProperty.cxx b/chart2/source/tools/WrappedDefaultProperty.cxx
index 6638654e76c1..74d2b4b0aae0 100644
--- a/chart2/source/tools/WrappedDefaultProperty.cxx
+++ b/chart2/source/tools/WrappedDefaultProperty.cxx
@@ -21,8 +21,7 @@
 #include <tools/diagnose_ex.h>
 
 #include <com/sun/star/beans/XPropertySet.hpp>
-
-namespace com::sun::star::beans { class XPropertyState; }
+#include <com/sun/star/beans/XPropertyState.hpp>
 
 using namespace ::com::sun::star;
 
diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx
index 164a9147cc4f..6e6f40b65684 100644
--- a/chart2/source/view/axes/VAxisBase.cxx
+++ b/chart2/source/view/axes/VAxisBase.cxx
@@ -23,6 +23,7 @@
 #include "Tickmarks.hxx"
 #include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/chart2/AxisType.hpp>
+#include <com/sun/star/chart2/XAxis.hpp>
 #include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 37c503eac30f..1c62bfb93903 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -29,7 +29,7 @@
 #include "Tickmarks_Equidistant.hxx"
 #include <ExplicitCategoriesProvider.hxx>
 #include <com/sun/star/chart2/AxisType.hpp>
-
+#include <com/sun/star/chart2/XAxis.hpp>
 #include <rtl/math.hxx>
 #include <tools/diagnose_ex.h>
 #include <tools/color.hxx>
diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx
index f9b7399694b0..1a93888b7428 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -25,6 +25,7 @@
 #include <NumberFormatterWrapper.hxx>
 #include <PolarLabelPositionHelper.hxx>
 #include <PlottingPositionHelper.hxx>
+#include <com/sun/star/chart2/XAxis.hpp>
 #include <tools/color.hxx>
 
 #include <memory>
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index 4204ab3fecfa..a82c8896592b 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -25,6 +25,7 @@
 #include "BarPositionHelper.hxx"
 #include <DateHelper.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
 #include <tools/diagnose_ex.h>
 #include <osl/diagnose.h>
 
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 0e3829c00ab2..009552c1800f 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -27,6 +27,7 @@
 #include <ObjectIdentifier.hxx>
 
 #include <com/sun/star/chart/DataLabelPlacement.hpp>
+#include <com/sun/star/chart2/XChartType.hpp>
 #include <com/sun/star/chart2/XColorScheme.hpp>
 
 #include <com/sun/star/container/XChild.hpp>
diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx
index 33c4a3118a7d..76c3b823557f 100644
--- a/comphelper/source/misc/componentmodule.cxx
+++ b/comphelper/source/misc/componentmodule.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <com/sun/star/lang/XSingleComponentFactory.hpp>
 #include <comphelper/componentmodule.hxx>
 
 #include <vector>
diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx
index 515c4b6a7476..8df1e244ca19 100644
--- a/comphelper/source/processfactory/processfactory.cxx
+++ b/comphelper/source/processfactory/processfactory.cxx
@@ -21,10 +21,10 @@
 #include <comphelper/processfactory.hxx>
 
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/uno/DeploymentException.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 
-namespace com::sun::star::lang { class XMultiServiceFactory; }
 namespace com::sun::star::uno { class XComponentContext; }
 
 using namespace ::com::sun::star;
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 38efeea57598..a9e0caff2eeb 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -24,8 +24,10 @@
 #include <unotools/confignode.hxx>
 #include <resource/sharedresources.hxx>
 #include <strings.hrc>
+#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
 #include <com/sun/star/sdbc/SQLException.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdbc/XDataSource.hpp>
 #include <com/sun/star/sdbc/ColumnValue.hpp>
 #include <com/sun/star/sdbc/DataType.hpp>
 #include <com/sun/star/sdbc/DriverManager.hpp>
diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx
index d0d36cdadbf9..ffe42419daa6 100644
--- a/connectivity/source/commontools/paramwrapper.cxx
+++ b/connectivity/source/commontools/paramwrapper.cxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <com/sun/star/lang/WrappedTargetException.hpp>
 #include <com/sun/star/sdb/XParametersSupplier.hpp>
+#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
 
 #include <tools/diagnose_ex.h>
diff --git a/connectivity/source/drivers/mork/MColumnAlias.cxx b/connectivity/source/drivers/mork/MColumnAlias.cxx
index e56c9a8442c0..b320d8c459e3 100644
--- a/connectivity/source/drivers/mork/MColumnAlias.cxx
+++ b/connectivity/source/drivers/mork/MColumnAlias.cxx
@@ -19,6 +19,7 @@
 
 #include "MColumnAlias.hxx"
 
+#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <officecfg/Office/DataAccess.hxx>
 
diff --git a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx
index 0c2e7129ed5c..2e55a46d2c6d 100644
--- a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx
@@ -20,6 +20,7 @@
 #include <writer/WDatabaseMetaData.hxx>
 #include <writer/WConnection.hxx>
 #include <com/sun/star/sdbc/SQLException.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
 #include <com/sun/star/text/XTextTablesSupplier.hpp>
 
 using namespace ::com::sun::star;
diff --git a/connectivity/source/drivers/writer/WTable.cxx b/connectivity/source/drivers/writer/WTable.cxx
index 4e95eedab7a5..7236df2476dd 100644
--- a/connectivity/source/drivers/writer/WTable.cxx
+++ b/connectivity/source/drivers/writer/WTable.cxx
@@ -21,6 +21,7 @@
 #include <com/sun/star/sdbc/ColumnValue.hpp>
 #include <com/sun/star/sdbc/DataType.hpp>
 #include <com/sun/star/sdbc/SQLException.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
 #include <com/sun/star/text/XTextTable.hpp>
 #include <com/sun/star/text/XTextTablesSupplier.hpp>
 #include <com/sun/star/table/XCellRange.hpp>
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 89fc0f483bec..9ddac7620b8d 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -82,6 +82,7 @@
 #include <com/sun/star/ui/theWindowStateConfiguration.hpp>
 #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
 #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
 #include <com/sun/star/util/thePathSettings.hpp>
 #include <comphelper/documentinfo.hxx>
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 9dfba2928e7b..6907eca46716 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -25,6 +25,7 @@
 #include <o3tl/any.hxx>
 #include <i18nlangtag/mslangid.hxx>
 #include <svl/asiancfg.hxx>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/Locale.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index c139060bc00c..57149d726bda 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -31,6 +31,7 @@
 #include <tools/diagnose_ex.h>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/linguistic2/LinguServiceManager.hpp>
+#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
 #include <com/sun/star/linguistic2/XSpellChecker.hpp>
 #include <com/sun/star/linguistic2/XProofreader.hpp>
 #include <com/sun/star/linguistic2/XHyphenator.hpp>
@@ -881,7 +882,7 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController*
         m_xMoreDictsLink->hide();
 
     xProp = LinguMgr::GetLinguPropertySet();
-    xDicList.set( LinguMgr::GetDictionaryList(), UNO_QUERY );
+    xDicList.set( LinguMgr::GetDictionaryList() );
     if (xDicList.is())
     {
         // keep references to all **currently** available dictionaries,
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index deb9ee5a7d10..109c9ef8982f 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -41,6 +41,7 @@
 #include <sfx2/basedlgs.hxx>
 #include <svx/flagsdef.hxx>
 #include <vector>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <memory>
 
diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx
index 1718e15f5ab3..043b0c083a17 100644
--- a/dbaccess/source/core/api/querycomposer.cxx
+++ b/dbaccess/source/core/api/querycomposer.cxx
@@ -19,6 +19,7 @@
 
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/sdbc/ColumnSearch.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <unotools/configmgr.hxx>
diff --git a/dbaccess/source/filter/xml/xmlDatabase.cxx b/dbaccess/source/filter/xml/xmlDatabase.cxx
index d76dfbe791ee..9de9bf349810 100644
--- a/dbaccess/source/filter/xml/xmlDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlDatabase.cxx
@@ -24,6 +24,7 @@
 #include "xmlDataSource.hxx"
 #include "xmlDocuments.hxx"
 #include "xmlEnums.hxx"
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/sdb/XReportDocumentsSupplier.hpp>
 #include <com/sun/star/sdb/XFormDocumentsSupplier.hpp>
 #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index b5edc7b4d3e4..299c59eb1dad 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -32,6 +32,7 @@
 #include <sal/log.hxx>
 #include <com/sun/star/beans/XPropertyState.hpp>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
 #include <com/sun/star/sdb/XFormDocumentsSupplier.hpp>
 #include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 10c28a6d00bc..7de744403d03 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -21,6 +21,7 @@
 #include <sal/log.hxx>
 
 #include <vcl/errinf.hxx>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/uri/UriReferenceFactory.hpp>
 #include <com/sun/star/util/MeasureUnit.hpp>
 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
@@ -344,7 +345,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
         uno::Reference< XNumberFormatsSupplier > xNum(m_xDataSource->getPropertyValue(PROPERTY_NUMBERFORMATSSUPPLIER),UNO_QUERY);
         SetNumberFormatsSupplier(xNum);
 
-        uno::Reference<XComponent> xModel(GetModel(),UNO_QUERY);
+        uno::Reference<XComponent> xModel(GetModel());
         ErrCode nRet = ReadThroughComponent( xStorage
                                     ,xModel
                                     ,"settings.xml"
diff --git a/dbaccess/source/sdbtools/misc/sdbt_services.cxx b/dbaccess/source/sdbtools/misc/sdbt_services.cxx
index a554611a8475..5023e9fcc2db 100644
--- a/dbaccess/source/sdbtools/misc/sdbt_services.cxx
+++ b/dbaccess/source/sdbtools/misc/sdbt_services.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <com/sun/star/lang/XSingleComponentFactory.hpp>
 #include <connectiontools.hxx>
 #include <cppuhelper/factory.hxx>
 
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 84cfa4ff8878..ccbe210afd5f 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -23,6 +23,7 @@
 
 #include <com/sun/star/beans/XMultiPropertySet.hpp>
 #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
 #include <officecfg/Office/Common.hxx>
 #include <sqledit.hxx>
 #include <QueryTextView.hxx>
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index 17f8b4e4e314..3e63f9424fce 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -20,6 +20,7 @@
 #include "UserAdmin.hxx"
 #include <com/sun/star/sdbc/SQLException.hpp>
 #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#include <com/sun/star/sdbc/XDriver.hpp>
 #include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
 #include <com/sun/star/sdbcx/XUsersSupplier.hpp>
 #include <com/sun/star/sdbcx/XDrop.hpp>
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 1b8f70dd49e5..4dbdb3d6afad 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -30,7 +30,7 @@
 #include "odbcconfig.hxx"
 #include "optionalboolitem.hxx"
 #include <sqlmessage.hxx>
-
+#include <com/sun/star/sdbc/XConnection.hpp>
 #include <comphelper/types.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
index 5e5c97768cd2..1c4669c17324 100644
--- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
+++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
@@ -12,6 +12,7 @@
 #include <uiservices.hxx>
 
 #include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/util/XURLTransformer.hpp>
 
diff --git a/desktop/source/deployment/misc/dp_ucb.cxx b/desktop/source/deployment/misc/dp_ucb.cxx
index 7f72208e5d6a..09ce86610cb8 100644
--- a/desktop/source/deployment/misc/dp_ucb.cxx
+++ b/desktop/source/deployment/misc/dp_ucb.cxx
@@ -27,6 +27,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <ucbhelper/content.hxx>
 #include <xmlscript/xml_helper.hxx>
+#include <com/sun/star/io/XOutputStream.hpp>
 #include <com/sun/star/ucb/CommandFailedException.hpp>
 #include <com/sun/star/ucb/ContentInfo.hpp>
 #include <com/sun/star/ucb/ContentInfoAttribute.hpp>
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 6bcc0cce5317..e3e57b2b5997 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -21,6 +21,7 @@
 
 #include <algorithm>
 
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <drawinglayer/attribute/fontattribute.hxx>
 #include <drawinglayer/primitive2d/textlayoutdevice.hxx>
 #include <comphelper/processfactory.hxx>
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index 46b71839d8e2..3ee8f4d368ab 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -26,6 +26,7 @@
 
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/sdb/DatabaseContext.hpp>
 #include <com/sun/star/sdb/SQLContext.hpp>
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 383bb51ed585..8487df2e39a0 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -57,6 +57,7 @@
 #include <com/sun/star/sdb/XQueriesSupplier.hpp>
 #include <com/sun/star/form/ListSourceType.hpp>
 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
 #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
 #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx
index 72a0e2e2dd32..25e9d017f192 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -38,7 +38,7 @@
 #include <com/sun/star/sdbc/XRowSet.hpp>
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <com/sun/star/sdb/SQLContext.hpp>
-
+#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
 
 namespace pcr
 {
diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx
index b7123363ddd2..457949ab770d 100644
--- a/filter/source/graphic/GraphicExportFilter.cxx
+++ b/filter/source/graphic/GraphicExportFilter.cxx
@@ -20,6 +20,8 @@
 #include "GraphicExportFilter.hxx"
 
 #include <com/sun/star/drawing/GraphicExportFilter.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/frame/XModel.hpp>
 
 #include <vcl/graphicfilter.hxx>
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx
index 75ba2678e4c8..fbe3282d6788 100644
--- a/filter/source/msfilter/msocximex.cxx
+++ b/filter/source/msfilter/msocximex.cxx
@@ -20,6 +20,7 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/drawing/XDrawPage.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/container/XIndexContainer.hpp>
 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 8b792eb3b98d..427cb440f1bd 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -11,6 +11,7 @@
 #include <sal/log.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/ui/XUIConfigurationManager.hpp>
 #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
 #include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index f4ee10034c50..3316fa67faf0 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -31,6 +31,7 @@
 #include <sot/stg.hxx>
 #include <com/sun/star/embed/Aspects.hpp>
 #include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/office/XAnnotation.hpp>
 #include <com/sun/star/office/XAnnotationAccess.hpp>
 #include <com/sun/star/text/XText.hpp>
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 9080ecedf13a..97928cff6fa9 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -33,6 +33,7 @@
 #include <com/sun/star/form/FormComponentType.hpp>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
 #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
 #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
 #include <com/sun/star/sdbc/DataType.hpp>
 #include <com/sun/star/awt/MouseButton.hpp>
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 696616031f23..0e23b5a7ec63 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -40,6 +40,7 @@
 #include <com/sun/star/sdb/OrderDialog.hpp>
 #include <com/sun/star/sdb/FilterDialog.hpp>
 #include <com/sun/star/sdbc/SQLException.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
 #include <com/sun/star/form/XReset.hpp>
 #include <com/sun/star/beans/XMultiPropertySet.hpp>
 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 651847c6ecd0..f27ff6d1d206 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -39,6 +39,7 @@
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/container/NoSuchElementException.hpp>
 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/util/XStringSubstitution.hpp>
 
 #include <unordered_map>
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 9e6d490d3e33..4403c89cd091 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -21,6 +21,7 @@
 
 #include <com/sun/star/frame/XDispatch.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/frame/XStatusListener.hpp>
 #include <com/sun/star/util/XURLTransformer.hpp>
 
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index 50cc9d344534..ed7bb926c3ad 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -23,6 +23,7 @@
 
 #include <com/sun/star/awt/MenuItemStyle.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/util/XURLTransformer.hpp>
 
 #include <toolkit/awt/vclxmenu.hxx>
diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx
index 2cc438ebb9e9..8c28cd64858f 100644
--- a/framework/source/uielement/toolbarmodemenucontroller.cxx
+++ b/framework/source/uielement/toolbarmodemenucontroller.cxx
@@ -22,6 +22,7 @@
 
 #include <com/sun/star/awt/MenuItemStyle.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/ui/UIElementType.hpp>
 #include <com/sun/star/frame/XModuleManager.hpp>
 #include <com/sun/star/frame/ModuleManager.hpp>
diff --git a/include/com/sun/star/uno/Reference.h b/include/com/sun/star/uno/Reference.h
index 951902b356bd..0221f0ca5f54 100644
--- a/include/com/sun/star/uno/Reference.h
+++ b/include/com/sun/star/uno/Reference.h
@@ -24,6 +24,10 @@
 #include <cassert>
 #include <cstddef>
 
+#if defined LIBO_INTERNAL_ONLY
+#include <type_traits>
+#endif
+
 #include "rtl/alloc.h"
 
 namespace com
@@ -167,51 +171,6 @@ enum UnoReference_SetThrow
     UNO_SET_THROW
 };
 
-#if defined LIBO_INTERNAL_ONLY
-/// @cond INTERNAL
-namespace detail {
-
-// A mechanism to enable up-casts, used by the Reference conversion constructor,
-// but at the same time disable up-casts to XInterface, so that the conversion
-// operator for that special case is used in an expression like
-// Reference< XInterface >(x); heavily borrowed from boost::is_base_and_derived
-// (which manages to avoid compilation problems with ambiguous bases and cites
-// comp.lang.c++.moderated mail <http://groups.google.com/groups?
-// selm=df893da6.0301280859.522081f7%40posting.google.com> "SuperSubclass
-// (is_base_and_derived) complete implementation!" by Rani Sharoni and cites
-// Aleksey Gurtovoy for the workaround for MSVC), to avoid including Boost
-// headers in URE headers (basing on C++11 std::is_base_of does not work when the types are
-// incomplete):
-
-template< typename T1, typename T2 > struct UpCast {
-private:
-    template< bool, typename U1, typename > struct C
-    { typedef U1 t; };
-
-    template< typename U1, typename U2 > struct C< false, U1, U2 >
-    { typedef U2 t; };
-
-    struct S { char c[2]; };
-
-    template< typename U > static char f(T2 *, U);
-    static S f(T1 *, int);
-
-    struct H {
-        H(); // avoid C2514 "class has no constructors" from MSVC
-        operator T1 * () const;
-        operator T2 * ();
-    };
-
-public:
-    typedef typename C< sizeof (f(H(), 0)) == 1, void *, void >::t t;
-};
-
-template< typename T2 > struct UpCast< XInterface, T2 > {};
-
-}
-/// @endcond
-#endif
-
 /** Template reference class for interface type derived from BaseReference.
     A special constructor given the UNO_QUERY identifier queries interfaces
     for reference type.
@@ -314,7 +273,9 @@ public:
     template< class derived_type >
     inline Reference(
         const Reference< derived_type > & rRef,
-        typename detail::UpCast< interface_type, derived_type >::t = 0 );
+        std::enable_if_t<
+            std::is_base_of_v<interface_type, derived_type>
+            && !std::is_same_v<interface_type, XInterface>, void *> = nullptr);
 #endif
 
     /** Constructor: Sets given interface pointer.
diff --git a/include/com/sun/star/uno/Reference.hxx b/include/com/sun/star/uno/Reference.hxx
index b3c01aaa2391..c78f2681e3d5 100644
--- a/include/com/sun/star/uno/Reference.hxx
+++ b/include/com/sun/star/uno/Reference.hxx
@@ -135,7 +135,9 @@ inline Reference< interface_type >::Reference( Reference< interface_type > && rR
 template< class interface_type > template< class derived_type >
 inline Reference< interface_type >::Reference(
     const Reference< derived_type > & rRef,
-    typename detail::UpCast< interface_type, derived_type >::t )
+    std::enable_if_t<
+        std::is_base_of_v<interface_type, derived_type>
+        && !std::is_same_v<interface_type, XInterface>, void *>)
 {
     interface_type * p = rRef.get();
     _pInterface = p;
diff --git a/include/vbahelper/vbahelperinterface.hxx b/include/vbahelper/vbahelperinterface.hxx
index 20f3d7ab77ce..5feb4ab83eba 100644
--- a/include/vbahelper/vbahelperinterface.hxx
+++ b/include/vbahelper/vbahelperinterface.hxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/RuntimeException.hpp>
 #include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/weakref.hxx>
 #include <ooo/vba/XHelperInterface.hpp>
@@ -31,10 +32,6 @@
 #include <sal/types.h>
 #include <vbahelper/vbahelper.hxx>
 
-namespace com { namespace sun { namespace star {
-    namespace uno { class XComponentContext; } }
-} }
-
 // use this class when you have an object like
 // interface  XAnInterface which contains XHelperInterface in its inheritance hierarchy
 // interface XAnInterface
diff --git a/oox/source/core/fragmenthandler2.cxx b/oox/source/core/fragmenthandler2.cxx
index a4855c1be8f0..121f3443731f 100644
--- a/oox/source/core/fragmenthandler2.cxx
+++ b/oox/source/core/fragmenthandler2.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <com/sun/star/frame/XModel.hpp>
 #include <oox/core/fragmenthandler2.hxx>
 #include <oox/core/xmlfilterbase.hxx>
 #include <oox/helper/attributelist.hxx>
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
index e24d6c72821e..59e99289b45e 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/RelativePosition.hpp>
 #include <com/sun/star/chart2/RelativeSize.hpp>
+#include <com/sun/star/chart2/XTitle.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <osl/diagnose.h>
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index b82fdbe6e026..bc3af886c8af 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -19,6 +19,7 @@
 
 #include <drawingml/chart/objectformatter.hxx>
 
+#include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
 #include <com/sun/star/util/XNumberFormatTypes.hpp>
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
index f55ac931fb98..4667afdeae02 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
 #include <com/sun/star/chart2/XCoordinateSystem.hpp>
 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
 #include <com/sun/star/chart2/data/XDataSink.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
 #include <osl/diagnose.h>
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index ad1d9e61e399..7425e0416fec 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -22,6 +22,7 @@
 #include <rtl/ustring.hxx>
 #include <rtl/string.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/text/XTextField.hpp>
 
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index 702ac6454cc3..8b34fd99082e 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -19,6 +19,7 @@
 
 #include <drawingml/textrun.hxx>
 
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/text/ControlCharacter.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/XPropertyState.hpp>
diff --git a/oox/source/dump/pptxdumper.cxx b/oox/source/dump/pptxdumper.cxx
index e3c9dce330af..fb1b42fb10b5 100644
--- a/oox/source/dump/pptxdumper.cxx
+++ b/oox/source/dump/pptxdumper.cxx
@@ -19,6 +19,7 @@
 
 #include <oox/dump/pptxdumper.hxx>
 
+#include <com/sun/star/io/XInputStream.hpp>
 #include <oox/dump/oledumper.hxx>
 #include <oox/dump/xlsbdumper.hxx>
 #include <oox/helper/zipstorage.hxx>
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 254bf0d96a6f..6655a21758cf 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -70,6 +70,7 @@
 #include <com/sun/star/drawing/XShape.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/graphic/XGraphic.hpp>
 #include <com/sun/star/i18n/ScriptType.hpp>
 #include <com/sun/star/i18n/BreakIterator.hpp>
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 0f7ef9647f85..78cc0b76770d 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -34,6 +34,7 @@
 #include <com/sun/star/beans/NamedValue.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
 #include <com/sun/star/form/XForm.hpp>
 #include <com/sun/star/form/XFormComponent.hpp>
 #include <com/sun/star/form/XFormsSupplier.hpp>
@@ -41,6 +42,7 @@
 #include <com/sun/star/form/binding/XListEntrySink.hpp>
 #include <com/sun/star/form/binding/XListEntrySource.hpp>
 #include <com/sun/star/form/binding/XValueBinding.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
 #include <com/sun/star/sheet/XCellRangeReferrer.hpp>
diff --git a/oox/source/ole/axcontrolfragment.cxx b/oox/source/ole/axcontrolfragment.cxx
index 54020a033e40..a0f0b109669a 100644
--- a/oox/source/ole/axcontrolfragment.cxx
+++ b/oox/source/ole/axcontrolfragment.cxx
@@ -19,6 +19,7 @@
 
 #include <oox/ole/axcontrolfragment.hxx>
 
+#include <com/sun/star/io/XInputStream.hpp>
 #include <oox/core/xmlfilterbase.hxx>
 #include <oox/helper/attributelist.hxx>
 #include <oox/helper/binaryinputstream.hxx>
diff --git a/oox/source/ole/oleobjecthelper.cxx b/oox/source/ole/oleobjecthelper.cxx
index 8a0ca5a7c9b4..a77a784af629 100644
--- a/oox/source/ole/oleobjecthelper.cxx
+++ b/oox/source/ole/oleobjecthelper.cxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/document/XEmbeddedObjectResolver.hpp>
 #include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/io/XOutputStream.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index a781aa5e4a6e..0fc486c05a3f 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -23,7 +23,9 @@
 #include <drawingml/table/tableproperties.hxx>
 
 #include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/text/XText.hpp>
 #include <basegfx/matrix/b2dhommatrix.hxx>
diff --git a/oox/source/ppt/presPropsfragmenthandler.cxx b/oox/source/ppt/presPropsfragmenthandler.cxx
index 60ce67133556..53d831b60ae9 100644
--- a/oox/source/ppt/presPropsfragmenthandler.cxx
+++ b/oox/source/ppt/presPropsfragmenthandler.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/presentation/XPresentationSupplier.hpp>
 
 #include <oox/core/xmlfilterbase.hxx>
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list