summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-12-09 12:45:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-12-09 14:47:49 +0000
commit6683010b1a856c3894cc0a7172ac14fda0b76aa8 (patch)
treee9810cb79d6fb2818230ba16793e7815d4bc98ac /cui
parent960207c72aedaf8569b880a7c000c10d0baabb70 (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/QrCodeGenDialog.cxx6
-rw-r--r--cui/uiconfig/ui/qrcodegen.ui4
2 files changed, 1 insertions, 9 deletions
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>