[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 6 09:28:44 UTC 2021
vcl/source/control/button.cxx | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 9ce65638df4844fd00553dacac9019714df9bdfc
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jul 6 10:23:50 2021 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jul 6 11:28:07 2021 +0200
jsdialog: image for radiobuttons
Change-Id: Ic6027223c5771ffb659a4503cfd305d0decc2433
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118465
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 68fa3c3d0dd3..b6d97bdff604 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2893,6 +2893,18 @@ void RadioButton::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
if (!sGroupId.isEmpty())
rJsonWriter.put("group", sGroupId);
+
+ if (!!maImage)
+ {
+ SvMemoryStream aOStm(6535, 6535);
+ if(GraphicConverter::Export(aOStm, maImage.GetBitmapEx(), ConvertDataFormat::PNG) == ERRCODE_NONE)
+ {
+ css::uno::Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aOStm.GetData()), aOStm.Tell());
+ OUStringBuffer aBuffer("data:image/png;base64,");
+ ::comphelper::Base64::encode(aBuffer, aSeq);
+ rJsonWriter.put("image", aBuffer.makeStringAndClear());
+ }
+ }
}
FactoryFunction RadioButton::GetUITestFactory() const
More information about the Libreoffice-commits
mailing list