vcl/source/control/button.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+)
New commits: commit 9ce65638df4844fd00553dacac9019714df9bdfc Author: Szymon Kłos <[email protected]> AuthorDate: Tue Jul 6 10:23:50 2021 +0200 Commit: Szymon Kłos <[email protected]> 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 <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> 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 _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
