[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - cui/source

shubham goyal (via logerrit) logerrit at kemper.freedesktop.org
Sat Dec 7 22:15:18 UTC 2019


 cui/source/dialogs/QrCodeGenDialog.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 06b6879dbc93479a22163cadd3c91cf265a29781
Author:     shubham goyal <22shubh22 at gmail.com>
AuthorDate: Fri Sep 13 18:23:51 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at 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.Mehrbrodt at cib.de>
    (cherry picked from commit 704a558b8689beb1a83a3e2d21481e0ea118e134)
    Reviewed-on: https://gerrit.libreoffice.org/84613
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens 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