[Libreoffice-commits] core.git: svx/source

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Thu Nov 2 08:01:54 UTC 2017


 svx/source/dialog/ClassificationDialog.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 53d7225c3984cbc1a4cab255dbbcdfeeea50ae40
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Thu Nov 2 14:35:09 2017 +0900

    TSCP: insert at cursor position when clicking an IP part
    
    Change-Id: I0672f55c1d5ec14324b0d0589e2507c759b95911
    Reviewed-on: https://gerrit.libreoffice.org/44186
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index 22fce44f1560..b82743a1675a 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -537,7 +537,8 @@ IMPL_LINK(ClassificationDialog, SelectIPPartNumbersHdl, ListBox&, rBox, void)
     if (nSelected >= 0)
     {
         OUString sString = maHelper.GetIntellectualPropertyPartNumbers()[nSelected];
-        m_pIntellectualPropertyPartEdit->SetText(m_pIntellectualPropertyPartEdit->GetText() + sString);
+        m_pIntellectualPropertyPartEdit->ReplaceSelected(sString);
+        m_pIntellectualPropertyPartEdit->GrabFocus();
     }
 }
 
@@ -557,7 +558,8 @@ IMPL_LINK(ClassificationDialog, SelectIPPartHdl, ListBox&, rBox, void)
     if (nSelected >= 0)
     {
         const OUString sString = maHelper.GetIntellectualPropertyParts()[nSelected];
-        m_pIntellectualPropertyPartEdit->SetText(m_pIntellectualPropertyPartEdit->GetText() + sString);
+        m_pIntellectualPropertyPartEdit->ReplaceSelected(sString);
+        m_pIntellectualPropertyPartEdit->GrabFocus();
     }
 }
 


More information about the Libreoffice-commits mailing list