cui/source/dialogs/QrCodeGenDialog.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 06b6879dbc93479a22163cadd3c91cf265a29781 Author: shubham goyal <22shub...@gmail.com> AuthorDate: Fri Sep 13 18:23:51 2019 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Sat Dec 7 23:14:42 2019 +0100 tdf#127305 display selected text in URL field QR Code Dialog Change-Id: Ic0d36225cc2c509c706a4599d45b92c6b9fea40e Reviewed-on: https://gerrit.libreoffice.org/78879 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> (cherry picked from commit 704a558b8689beb1a83a3e2d21481e0ea118e134) Reviewed-on: https://gerrit.libreoffice.org/84613 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index 7bd72ff0fc1c..d936219f7209 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -73,6 +73,14 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference<XModel> xModel { if (!bEditExisting) { + // TODO: This only works in Writer doc. Should also work in shapes + Reference<XIndexAccess> xSelections(m_xModel->getCurrentSelection(), UNO_QUERY); + if (xSelections.is()) + { + Reference<XTextRange> xSelection(xSelections->getByIndex(0), UNO_QUERY); + if (xSelection.is()) + m_xEdittext->set_text(xSelection->getString()); + } return; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits