[Libreoffice-commits] core.git: cui/source
shubham goyal (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 6 07:18:05 UTC 2019
cui/source/dialogs/QrCodeGenDialog.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 704a558b8689beb1a83a3e2d21481e0ea118e134
Author: shubham goyal <22shubh22 at gmail.com>
AuthorDate: Fri Sep 13 18:23:51 2019 +0200
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Fri Dec 6 08:16:40 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.Mehrbrodt at 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;
}
More information about the Libreoffice-commits
mailing list