framework/source/fwe/helper/actiontriggerhelper.cxx | 1 framework/source/services/desktop.cxx | 2 + framework/source/uielement/generictoolbarcontroller.cxx | 1 include/framework/ContextChangeEventMultiplexerTunnel.hxx | 3 -- include/framework/actiontriggerhelper.hxx | 3 +- include/framework/addonsoptions.hxx | 4 +-- include/framework/desktop.hxx | 9 ++++--- include/framework/generictoolbarcontroller.hxx | 3 +- include/framework/interaction.hxx | 9 ++++++- include/framework/undomanagerhelper.hxx | 5 ++-- include/framework/windowstatehelper.hxx | 17 +++++++++++--- sfx2/source/sidebar/ControllerFactory.cxx | 1 vcl/workben/mtfdemo.cxx | 1 vcl/workben/vcldemo.cxx | 1 14 files changed, 44 insertions(+), 16 deletions(-)
New commits: commit 1d9b441da84168e46c56ea40a4b6bb9650008c42 Author: Gabor Kelemen <[email protected]> AuthorDate: Mon Feb 9 18:56:27 2026 +0100 Commit: Gabor Kelemen <[email protected]> CommitDate: Sat Feb 21 14:59:51 2026 +0100 tdf#146619 Use more forward declarations in include/framework Change-Id: I7a41c72fbd16fcde45c59ec19814be7962ded194 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199384 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx index c84ea031c11b..1fa0ea47e8bc 100644 --- a/framework/source/fwe/helper/actiontriggerhelper.cxx +++ b/framework/source/fwe/helper/actiontriggerhelper.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <toolkit/awt/vclxmenu.hxx> #include <tools/stream.hxx> +#include <vcl/bitmap.hxx> #include <vcl/dibtools.hxx> #include <vcl/graph.hxx> #include <vcl/graphic/BitmapHelper.hxx> diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index fc015370a551..0f2366c3fa5e 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <com/sun/star/frame/TerminationVetoException.hpp> +#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp> #include <com/sun/star/task/XInteractionAbort.hpp> #include <com/sun/star/task/XInteractionApprove.hpp> #include <com/sun/star/document/XInteractionFilterSelect.hpp> @@ -52,6 +53,7 @@ #include <comphelper/lok.hxx> #include <cppuhelper/supportsservice.hxx> #include <utility> +#include <unotools/cmdoptions.hxx> #include <vcl/svapp.hxx> #include <desktop/crashreport.hxx> #include <vcl/scheduler.hxx> diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 30b71f88a8c6..6ae9069fb095 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -33,6 +33,7 @@ #include <vcl/commandinfoprovider.hxx> #include <vcl/svapp.hxx> #include <vcl/vclevent.hxx> +#include <vcl/weld/Toolbar.hxx> #include <vcl/weld/weld.hxx> #include <tools/urlobj.hxx> #include <toolkit/helper/vclunohelper.hxx> diff --git a/include/framework/ContextChangeEventMultiplexerTunnel.hxx b/include/framework/ContextChangeEventMultiplexerTunnel.hxx index d2ff18bbeb87..8d4b94ab04a8 100644 --- a/include/framework/ContextChangeEventMultiplexerTunnel.hxx +++ b/include/framework/ContextChangeEventMultiplexerTunnel.hxx @@ -10,11 +10,10 @@ #include <framework/fwkdllapi.h> #include <functional> -#include <com/sun/star/uno/Reference.hxx> - namespace com::sun::star::ui { class XContextChangeEventListener; } namespace com::sun::star::uno { class XInterface; } namespace com::sun::star::uno { class XComponentContext; } +namespace com::sun::star::uno { template <class interface_type> class Reference; } namespace framework { diff --git a/include/framework/actiontriggerhelper.hxx b/include/framework/actiontriggerhelper.hxx index ec9574b537da..1ba70388a50a 100644 --- a/include/framework/actiontriggerhelper.hxx +++ b/include/framework/actiontriggerhelper.hxx @@ -21,10 +21,11 @@ #include <config_options.h> #include <framework/fwkdllapi.h> -#include <com/sun/star/uno/Reference.hxx> +#include <rtl/ustring.hxx> namespace com::sun::star::awt { class XPopupMenu; } namespace com::sun::star::container { class XIndexContainer; } +namespace com::sun::star::uno { template <class interface_type> class Reference; } namespace framework { diff --git a/include/framework/addonsoptions.hxx b/include/framework/addonsoptions.hxx index ee40be90be16..4bb52763df12 100644 --- a/include/framework/addonsoptions.hxx +++ b/include/framework/addonsoptions.hxx @@ -21,13 +21,13 @@ #include <config_options.h> #include <sal/types.h> -#include <vcl/bitmap.hxx> -#include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/uno/Sequence.h> #include <framework/fwkdllapi.h> #include <memory> #include <vector> +class Bitmap; +namespace com::sun::star::beans { struct PropertyValue; } namespace osl { class Mutex; } /*-************************************************************************************************************ diff --git a/include/framework/desktop.hxx b/include/framework/desktop.hxx index c0e1ab80d3b4..18151acc1a5e 100644 --- a/include/framework/desktop.hxx +++ b/include/framework/desktop.hxx @@ -34,19 +34,20 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/frame/XTasksSupplier.hpp> #include <com/sun/star/frame/XDispatchResultListener.hpp> -#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> -#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp> -#include <com/sun/star/uno/XComponentContext.hpp> #include <comphelper/multicontainer2.hxx> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase.hxx> #include <cppuhelper/propshlp.hxx> #include <rtl/ref.hxx> -#include <unotools/cmdoptions.hxx> + +class SvtCommandOptions; namespace comphelper { class NumberedCollection; } +namespace com::sun::star::frame { class XDispatchRecorderSupplier; } +namespace com::sun::star::lang { class XComponent; } +namespace com::sun::star::uno { class XComponentContext; } namespace framework{ diff --git a/include/framework/generictoolbarcontroller.hxx b/include/framework/generictoolbarcontroller.hxx index 70f831d28462..b041260d0ca7 100644 --- a/include/framework/generictoolbarcontroller.hxx +++ b/include/framework/generictoolbarcontroller.hxx @@ -22,7 +22,8 @@ #include <framework/fwkdllapi.h> #include <svtools/toolboxcontroller.hxx> #include <vcl/toolbox.hxx> -#include <vcl/weld/Toolbar.hxx> + +namespace weld { class Toolbar; } namespace framework { diff --git a/include/framework/interaction.hxx b/include/framework/interaction.hxx index 33647e241b89..39e6e80b3383 100644 --- a/include/framework/interaction.hxx +++ b/include/framework/interaction.hxx @@ -22,7 +22,6 @@ #include <config_options.h> #include <rtl/ref.hxx> #include <rtl/ustring.hxx> -#include <com/sun/star/uno/Reference.hxx> #include <framework/fwkdllapi.h> namespace com::sun::star::task @@ -37,6 +36,14 @@ namespace com::sun::star::uno { template <class E> class Sequence; } +namespace com::sun::star::uno +{ +class Any; +} +namespace com::sun::star::uno +{ +template <class interface_type> class Reference; +} namespace framework { diff --git a/include/framework/undomanagerhelper.hxx b/include/framework/undomanagerhelper.hxx index 5f71279a9675..af8fed69ac7b 100644 --- a/include/framework/undomanagerhelper.hxx +++ b/include/framework/undomanagerhelper.hxx @@ -21,8 +21,7 @@ #include <config_options.h> #include <framework/fwkdllapi.h> -#include <com/sun/star/uno/Sequence.hxx> -#include <com/sun/star/uno/Reference.hxx> +#include <rtl/ustring.hxx> #include <memory> @@ -30,6 +29,8 @@ namespace com::sun::star::document { class XUndoAction; } namespace com::sun::star::document { class XUndoManager; } namespace com::sun::star::document { class XUndoManagerListener; } namespace com::sun::star::util { class XModifyListener; } +namespace com::sun::star::uno { template <class interface_type> class Reference; } +namespace com::sun::star::uno { template <typename> class Sequence; } namespace framework { class IMutex; } class SfxUndoManager; diff --git a/include/framework/windowstatehelper.hxx b/include/framework/windowstatehelper.hxx index 86c1feee864a..08b7c4df5e0d 100644 --- a/include/framework/windowstatehelper.hxx +++ b/include/framework/windowstatehelper.hxx @@ -21,10 +21,21 @@ #include <sal/config.h> -#include <com/sun/star/frame/XModel.hpp> - #include <framework/fwkdllapi.h> -#include <vcl/window.hxx> +#include <rtl/ustring.hxx> + +namespace com::sun::star::frame +{ +class XModel; +} +namespace com::sun::star::uno +{ +template <class interface_type> class Reference; +} +namespace vcl +{ +class Window; +} namespace framework::WindowStateHelper { diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx index c0f1f15d615c..245c9c47c937 100644 --- a/sfx2/source/sidebar/ControllerFactory.cxx +++ b/sfx2/source/sidebar/ControllerFactory.cxx @@ -29,6 +29,7 @@ #include <framework/generictoolbarcontroller.hxx> #include <vcl/toolbox.hxx> #include <vcl/commandinfoprovider.hxx> +#include <vcl/weld/Toolbar.hxx> #include <vcl/weld/weldutils.hxx> #include <comphelper/processfactory.hxx> #include <toolkit/helper/vclunohelper.hxx> diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx index 587dc7ca3c21..09ec6bf0eaed 100644 --- a/vcl/workben/mtfdemo.cxx +++ b/vcl/workben/mtfdemo.cxx @@ -11,6 +11,7 @@ #include <cppuhelper/bootstrap.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/RuntimeException.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <vcl/vclmain.hxx> #include <vcl/gdimtf.hxx> diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 467f8a52eee0..2c18f8cb9ce7 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <o3tl/safeint.hxx> #include <osl/time.h>
