summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-10-20 10:53:53 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2021-12-29 12:01:16 +0100
commit0cb4bc34deef43dc18c73daa0344c92717115456 (patch)
tree1f1a1f0fa86a93a81ed848676a3deadad9b6a006
parent27c815286befeb038a1b8463ba5bd45d3def3305 (diff)
Move SalInstanceImage decl to header file
Change-Id: Ic71e10a9cb296e8fed366b7dd622d8875d68f2d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123876 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127670 Tested-by: Jenkins
-rw-r--r--vcl/inc/salvtables.hxx15
-rw-r--r--vcl/source/app/salvtables.cxx56
2 files changed, 40 insertions, 31 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 2340169b193b..e21c9d48780e 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1926,4 +1926,19 @@ public:
virtual void sort_native_button_order() override;
};
+class SalInstanceImage : public SalInstanceWidget, public virtual weld::Image
+{
+private:
+ VclPtr<FixedImage> m_xImage;
+
+public:
+ SalInstanceImage(FixedImage* pImage, SalInstanceBuilder* pBuilder, bool bTakeOwnership);
+
+ virtual void set_from_icon_name(const OUString& rIconName) override;
+
+ virtual void set_image(VirtualDevice* pDevice) override;
+
+ virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) override;
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e2599afe1b0b..95451c9609ce 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3119,37 +3119,6 @@ public:
virtual void set_text(const OUString& rText) override { m_xProgressBar->SetText(rText); }
};
-class SalInstanceImage : public SalInstanceWidget, public virtual weld::Image
-{
-private:
- VclPtr<FixedImage> m_xImage;
-
-public:
- SalInstanceImage(FixedImage* pImage, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
- : SalInstanceWidget(pImage, pBuilder, bTakeOwnership)
- , m_xImage(pImage)
- {
- }
-
- virtual void set_from_icon_name(const OUString& rIconName) override
- {
- m_xImage->SetImage(::Image(StockImage::Yes, rIconName));
- }
-
- virtual void set_image(VirtualDevice* pDevice) override
- {
- if (pDevice)
- m_xImage->SetImage(createImage(*pDevice));
- else
- m_xImage->SetImage(::Image());
- }
-
- virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) override
- {
- m_xImage->SetImage(::Image(rImage));
- }
-};
-
class SalInstanceCalendar : public SalInstanceWidget, public virtual weld::Calendar
{
private:
@@ -3193,6 +3162,31 @@ IMPL_LINK_NOARG(SalInstanceCalendar, ActivateHdl, ::Calendar*, void)
signal_activated();
}
+SalInstanceImage::SalInstanceImage(FixedImage* pImage, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
+ : SalInstanceWidget(pImage, pBuilder, bTakeOwnership)
+ , m_xImage(pImage)
+{
+}
+
+void SalInstanceImage::set_from_icon_name(const OUString& rIconName)
+{
+ m_xImage->SetImage(::Image(StockImage::Yes, rIconName));
+}
+
+void SalInstanceImage::set_image(VirtualDevice* pDevice)
+{
+ if (pDevice)
+ m_xImage->SetImage(createImage(*pDevice));
+ else
+ m_xImage->SetImage(::Image());
+}
+
+void SalInstanceImage::set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage)
+{
+ m_xImage->SetImage(::Image(rImage));
+}
+
WeldTextFilter::WeldTextFilter(Link<OUString&, bool>& rInsertTextHdl)
: TextFilter(OUString())
, m_rInsertTextHdl(rInsertTextHdl)