cui/source/dialogs/QrCodeGenDialog.cxx | 7 +++++++ cui/source/inc/QrCodeGenDialog.hxx | 1 + external/zxing/UnpackedTarball_zxing.mk | 1 + external/zxing/macOS14.patch | 11 +++++++++++ 4 files changed, 20 insertions(+)
New commits: commit b659d76df983da7837634412d463c5b8b43d42b1 Author: Xisco Fauli <[email protected]> AuthorDate: Tue Mar 3 13:02:36 2026 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Mar 3 17:48:35 2026 +0100 QrCodeGenDialog: hide margin widgets with zxing >= 3.0 After commit 2baf1bceff0ebcd27ef29cef88298793802e1546 Author: Xisco Fauli <[email protected]> Date: Fri Feb 27 12:23:31 2026 +0100 zxing: use new CreateBarcode API with zxing >= 3.0 Change-Id: Ic1207b24c4df40ebc2ef3def677615f85e8b3ed9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200883 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index 06ae02b696cc..99f29807c806 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -210,12 +210,19 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference<XModel> xModel m_xBuilder->weld_radio_button(u"button_medium"_ustr), m_xBuilder->weld_radio_button(u"button_quartile"_ustr), m_xBuilder->weld_radio_button(u"button_high"_ustr) } + , m_xLabelMargin(m_xBuilder->weld_label(u"label_margin"_ustr)) , m_xSpinBorder(m_xBuilder->weld_spin_button(u"edit_margin"_ustr)) , m_xComboType(m_xBuilder->weld_combo_box(u"choose_type"_ustr)) #if ENABLE_ZXING , mpParent(pParent) #endif { +#if ZXING_VERSION_MAJOR >= 3 + // The new API simply does not allow to specify an arbitrary number of margin pixels. + m_xLabelMargin->hide(); + m_xSpinBorder->hide(); +#endif + m_xEdittext->set_size_request(m_xEdittext->get_approximate_digit_width() * 28, m_xEdittext->get_height_rows(6)); if (!bEditExisting) diff --git a/cui/source/inc/QrCodeGenDialog.hxx b/cui/source/inc/QrCodeGenDialog.hxx index 2544b6dbfac2..bd210317227b 100644 --- a/cui/source/inc/QrCodeGenDialog.hxx +++ b/cui/source/inc/QrCodeGenDialog.hxx @@ -40,6 +40,7 @@ private: css::uno::Reference<css::frame::XModel> m_xModel; std::unique_ptr<weld::TextView> m_xEdittext; std::unique_ptr<weld::RadioButton> m_xECC[4]; + std::unique_ptr<weld::Label> m_xLabelMargin; std::unique_ptr<weld::SpinButton> m_xSpinBorder; std::unique_ptr<weld::ComboBox> m_xComboType; commit 313cd1a04c30cffcc349f79bd468c1d5788589d9 Author: Xisco Fauli <[email protected]> AuthorDate: Tue Mar 3 14:47:26 2026 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Mar 3 17:48:26 2026 +0100 zxing: fix build on MacOSX14 it fails with In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__algorithm/inplace_merge.h:28: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__memory/unique_ptr.h:689:30: error: no matching constructor for initialization of 'ZXing::CreatorOptions::Data' return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Volumes/lode/lode/jenkins/workspace/lo_tb_master_mac_dbg/workdir/UnpackedTarball/zxing/core/src/CreateBarcode.cpp:76:84: note: in instantiation of function template specialization 'std::make_unique<ZXing::CreatorOptions::Data, ZXing::BarcodeFormat &, std::string>' requested here CreatorOptions::CreatorOptions(BarcodeFormat format, std::string options) : d(std::make_unique<Data>(format, std::move(options))) {} ^ /Volumes/lode/lode/jenkins/workspace/lo_tb_master_mac_dbg/workdir/UnpackedTarball/zxing/core/src/CreateBarcode.cpp:39:24: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided struct CreatorOptions::Data ^ /Volumes/lode/lode/jenkins/workspace/lo_tb_master_mac_dbg/workdir/UnpackedTarball/zxing/core/src/CreateBarcode.cpp:39:24: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided /Volumes/lode/lode/jenkins/workspace/lo_tb_master_mac_dbg/workdir/UnpackedTarball/zxing/core/src/CreateBarcode.cpp:39:24: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided 1 error generated. make[1]: *** [/Volumes/lode/lode/jenkins/workspace/lo_tb_master_mac_dbg/solenv/gbuild/LinkTarget.mk:402: /Volumes/lode/lode/jenkins/workspace/lo_tb_master_mac_dbg/workdir/GenCxxObject/UnpackedTarball/zxing/core/src/CreateBarcode.o] Error 1 Co-authored-by: axxel <[email protected]> Change-Id: I0ea3a60f8d64931e80783853db8657fbb8307a01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200888 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/external/zxing/UnpackedTarball_zxing.mk b/external/zxing/UnpackedTarball_zxing.mk index dcf620e265a4..6a30860ddd50 100644 --- a/external/zxing/UnpackedTarball_zxing.mk +++ b/external/zxing/UnpackedTarball_zxing.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,zxing, \ external/zxing/0001-add-ZXVersion-h.patch \ external/zxing/cassert.patch \ external/zxing/0001-Silence-deprecated-declarations-warnings-on-Windows-.patch \ + external/zxing/macOS14.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/zxing/macOS14.patch b/external/zxing/macOS14.patch new file mode 100644 index 000000000000..73b3f516e2bc --- /dev/null +++ b/external/zxing/macOS14.patch @@ -0,0 +1,11 @@ +--- a/core/src/CreateBarcode.cpp 2026-03-03 14:41:48.255770172 +0100 ++++ b/core/src/CreateBarcode.cpp 2026-03-03 14:42:12.911576522 +0100 +@@ -45,6 +45,8 @@ + // structured_append (idx, cnt, ID) + + mutable unique_zint_symbol zint; ++ ++ Data(BarcodeFormat format, std::string options) : format(format), options(std::move(options)) {} + }; + + // TODO: check return type
