cui/source/dialogs/QrCodeGenDialog.cxx |    6 +-----
 cui/uiconfig/ui/qrcodegen.ui           |    4 ----
 2 files changed, 1 insertion(+), 9 deletions(-)

New commits:
commit 6683010b1a856c3894cc0a7172ac14fda0b76aa8
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Dec 9 12:45:11 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Dec 9 14:47:49 2022 +0000

    Related: tdf#146395 drop default text
    
    Change-Id: Iaeedf11df5f1d5739ec247222cc4fc1f10abe1e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143875
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index e028d4d10e94..f8cbac1d758d 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -171,18 +171,14 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, 
Reference<XModel> xModel
                                   m_xEdittext->get_height_rows(6));
     if (!bEditExisting)
     {
-        OUString sSelection;
         // 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())
-                sSelection = xSelection->getString();
+                m_xEdittext->set_text(xSelection->getString());
         }
-        if (!sSelection.isEmpty())
-            m_xEdittext->set_text(sSelection);
-        m_xEdittext->select_region(0, -1);
         return;
     }
 
diff --git a/cui/uiconfig/ui/qrcodegen.ui b/cui/uiconfig/ui/qrcodegen.ui
index 7078e3aa44a5..2a55eaa01901 100644
--- a/cui/uiconfig/ui/qrcodegen.ui
+++ b/cui/uiconfig/ui/qrcodegen.ui
@@ -8,9 +8,6 @@
     <property name="step-increment">1</property>
     <property name="page-increment">10</property>
   </object>
-  <object class="GtkTextBuffer" id="textbuffer1">
-    <property name="text" translatable="yes" 
context="qrcodegen|edit_name">www.libreoffice.org</property>
-  </object>
   <object class="GtkDialog" id="QrCodeGenDialog">
     <property name="can-focus">False</property>
     <property name="border-width">6</property>
@@ -347,7 +344,6 @@
                             <property name="can-focus">True</property>
                             <property name="hexpand">True</property>
                             <property name="vexpand">True</property>
-                            <property name="buffer">textbuffer1</property>
                             <child internal-child="accessible">
                               <object class="AtkObject" 
id="edit_text-atkobject">
                                 <property 
name="AtkObject::accessible-description" translatable="yes" context="qr 
text">The text from which to generate the code.</property>

Reply via email to