weld: Move weld::Image to own header

Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I2eb564b2483b052f01d4af55fd4feb00b5ed6031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205472
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn
2026-05-22 21:55:53 +02:00
parent e528f1de16
commit b2ce99c623
45 changed files with 77 additions and 9 deletions
@@ -36,6 +36,7 @@
#include <tools/mapunit.hxx>
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MessageDialog.hxx>
#include <vcl/weld/weld.hxx>
#include <vcl/settings.hxx>
@@ -24,6 +24,7 @@
#include <chartview/ChartSfxItemIds.hxx>
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/weld.hxx>
#include <ChartModel.hxx>
@@ -30,6 +30,7 @@
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/FormattedSpinButton.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/weld.hxx>
using namespace css::chart2;
+1
View File
@@ -31,6 +31,7 @@
#include <vcl/virdev.hxx>
#include <vcl/weld/ScrolledWindow.hxx>
#include <vcl/weld/Dialog.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/weldutils.hxx>
#include <unotools/lingucfg.hxx>
#include <unotools/linguprops.hxx>
+1
View File
@@ -15,6 +15,7 @@
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/Entry.hxx>
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MenuButton.hxx>
#include <vcl/weld/ScrolledWindow.hxx>
#include <vcl/weld/weld.hxx>
+1 -1
View File
@@ -10,7 +10,7 @@
#include <vcl/bitmap.hxx>
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/weld.hxx>
#include <vcl/weld/Image.hxx>
class ImageViewerDialog : public weld::GenericDialogController
{
+1
View File
@@ -19,6 +19,7 @@
#pragma once
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/Window.hxx>
#include <vcl/weld/weld.hxx>
+1
View File
@@ -33,6 +33,7 @@
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Entry.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/TreeView.hxx>
#include <string_view>
+1
View File
@@ -27,6 +27,7 @@
#include <svtools/ctrlbox.hxx>
#include <svx/numberingpreview.hxx>
#include <vcl/weld/Entry.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/Menu.hxx>
#include <vcl/weld/MenuButton.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
+1
View File
@@ -19,6 +19,7 @@
#pragma once
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/Window.hxx>
#include <vcl/weld/weld.hxx>
+1
View File
@@ -21,6 +21,7 @@
#include <sfx2/tabdlg.hxx>
#include <svx/swframeexample.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/weld.hxx>
#include <svx/dlgutil.hxx>
+1
View File
@@ -22,6 +22,7 @@
#include <svx/dlgutil.hxx>
#include <svx/dialcontrol.hxx>
#include <svx/anchorid.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/Window.hxx>
#include <basegfx/range/b2drange.hxx>
+1
View File
@@ -10,6 +10,7 @@
#pragma once
#include <sfx2/tabdlg.hxx>
#include <vcl/weld/Image.hxx>
#include <uimode.hrc>
+1
View File
@@ -22,6 +22,7 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/Entry.hxx>
#include <vcl/weld/Image.hxx>
namespace svx {
class SecurityOptionsDialog;
@@ -19,6 +19,7 @@
#pragma once
#include <vcl/InterimItemWindow.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/weld.hxx>
namespace dbaui
+1
View File
@@ -29,6 +29,7 @@
#include "fpsmartcontent.hxx"
#include "fpdialogbase.hxx"
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/Image.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <vcl/timer.hxx>
@@ -25,6 +25,7 @@
#include <vcl/InterimItemWindow.hxx>
#include <vcl/weld/weld.hxx>
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/Image.hxx>
#include <svtools/miscopt.hxx>
#include <svtools/imgdef.hxx>
#include <framework/addonsoptions.hxx>
+1
View File
@@ -36,6 +36,7 @@
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/Entry.hxx>
#include <vcl/weld/FormattedSpinButton.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/ScrolledWindow.hxx>
#include <vcl/weld/SpinButton.hxx>
#include <vcl/weld/weldutils.hxx>
+1
View File
@@ -23,6 +23,7 @@
#include <sfx2/ctrlitem.hxx>
#include <svx/svxdllapi.h>
#include <vcl/idle.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/Toolbar.hxx>
#include <vcl/weld/weld.hxx>
+1
View File
@@ -9,6 +9,7 @@
#pragma once
#include <vcl/weld/Image.hxx>
#include <vcl/InterimItemWindow.hxx>
#include <vcl/weld/weld.hxx>
#include <svx/svxdllapi.h>
+1
View File
@@ -29,6 +29,7 @@
#include <vcl/timer.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/Expander.hxx>
#include <vcl/weld/Image.hxx>
#include <memory>
#include <vector>
+33
View File
@@ -0,0 +1,33 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#include <vcl/dllapi.h>
#include <vcl/weld/Widget.hxx>
class VirtualDevice;
namespace com::sun::star::graphic
{
class XGraphic;
}
namespace weld
{
class VCL_DLLPUBLIC Image : virtual public Widget
{
public:
virtual void set_from_icon_name(const OUString& rIconName) = 0;
virtual void set_image(VirtualDevice* pDevice) = 0;
virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) = 0;
};
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
-8
View File
@@ -340,14 +340,6 @@ public:
virtual void set_text(const OUString& rText) = 0;
};
class VCL_DLLPUBLIC Image : virtual public Widget
{
public:
virtual void set_from_icon_name(const OUString& rIconName) = 0;
virtual void set_image(VirtualDevice* pDevice) = 0;
virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) = 0;
};
enum class LabelType
{
Normal,
@@ -26,6 +26,7 @@
#include <svl/numformat.hxx>
#include <svx/colorbox.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/Window.hxx>
#include <formula/token.hxx>
#include <formula/errorcodes.hxx>
+1
View File
@@ -21,6 +21,7 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/SpinButton.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
@@ -27,6 +27,7 @@
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Entry.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MenuButton.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/SpinButton.hxx>
+1
View File
@@ -20,6 +20,7 @@
#include <sfx2/sidebar/Theme.hxx>
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/Toolbar.hxx>
#include <vcl/weld/weld.hxx>
+1
View File
@@ -24,6 +24,7 @@
#include <vcl/InterimItemWindow.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MenuButton.hxx>
#include <recentdocsview.hxx>
+1
View File
@@ -30,6 +30,7 @@
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/TextView.hxx>
#include <vcl/weld/Toolbar.hxx>
#include <vcl/weld/weldutils.hxx>
@@ -44,6 +44,7 @@
#include <vcl/uitest/eventdescription.hxx>
#include <vcl/svapp.hxx>
#include <vcl/vclevent.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/Menu.hxx>
#include <splitwin.hxx>
#include <comphelper/diagnose_ex.hxx>
@@ -29,6 +29,7 @@
#include <com/sun/star/ui/XSidebar.hpp>
#include <basegfx/range/b2drange.hxx>
#include <vcl/EnumContext.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/Toolbar.hxx>
#include <vcl/weld/customweld.hxx>
+1
View File
@@ -24,6 +24,7 @@
#include <vcl/toolbox.hxx>
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/Window.hxx>
#include <svl/intitem.hxx>
+1
View File
@@ -27,6 +27,7 @@
#include <vcl/vclenum.hxx>
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/Dialog.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/TextView.hxx>
#include <vcl/weld/weld.hxx>
#include <comphelper/processfactory.hxx>
+1
View File
@@ -21,6 +21,7 @@
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/SpinButton.hxx>
#include <vcl/weld/Window.hxx>
#include <vcl/weld/weld.hxx>
+1
View File
@@ -28,6 +28,7 @@
#include <fmtanchr.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/Entry.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/TextView.hxx>
#include <swtypes.hxx>
+1
View File
@@ -21,6 +21,7 @@
#include <sfx2/basedlgs.hxx>
#include <svx/pagenumberlistbox.hxx>
#include <vcl/weld/Image.hxx>
/// Page number wizard for easy header/footer page number insertion
class SwPageNumberDlg final : public SfxDialogController
+1
View File
@@ -22,6 +22,7 @@
#include <sfx2/tabdlg.hxx>
#include <sfx2/basedlgs.hxx>
#include <svx/swframetypes.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/Window.hxx>
+1
View File
@@ -19,6 +19,7 @@
#pragma once
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/Window.hxx>
#include <vcl/weld/weld.hxx>
+1
View File
@@ -27,6 +27,7 @@
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Entry.hxx>
#include <vcl/weld/Expander.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/Notebook.hxx>
#include <vcl/weld/ScrolledWindow.hxx>
+2
View File
@@ -13,6 +13,8 @@
#include "QtInstanceWidget.hxx"
#include <vcl/weld/Image.hxx>
#include <QtWidgets/QLabel>
class QtInstanceImage : public QtInstanceWidget, public virtual weld::Image
+1
View File
@@ -22,6 +22,7 @@
#include <vcl/weld/EntryTreeView.hxx>
#include <vcl/weld/Expander.hxx>
#include <vcl/weld/FormattedSpinButton.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/LevelBar.hxx>
#include <vcl/weld/Menu.hxx>
#include <vcl/weld/MenuButton.hxx>
+1
View File
@@ -45,6 +45,7 @@
#include <vcl/weld/Dialog.hxx>
#include <vcl/weld/Expander.hxx>
#include <vcl/weld/FormattedSpinButton.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/LevelBar.hxx>
#include <vcl/weld/Menu.hxx>
#include <vcl/weld/MenuButton.hxx>
+1
View File
@@ -22,6 +22,7 @@
#include <utility>
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/Notebook.hxx>
#include <vcl/weld/TextView.hxx>
#include <vcl/weld/TreeView.hxx>
@@ -20,6 +20,7 @@
#pragma once
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/TreeView.hxx>
#include <vcl/weld/Window.hxx>
#include <vcl/weld/weld.hxx>
+1
View File
@@ -21,6 +21,7 @@
#include <vcl/weld/Builder.hxx>
#include <vcl/weld/DialogController.hxx>
#include <vcl/weld/Image.hxx>
#include <vcl/weld/Notebook.hxx>
#include <vcl/weld/TreeView.hxx>
#include <vcl/weld/weld.hxx>