summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2021-06-18 11:23:41 +0300
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-21 13:36:46 +0200
commit1da6972c716256f908ea11549b6566877ce1e580 (patch)
treeef1eac961a660d4460d0d5068475a030baaed367 /editeng
parenttdf#109083 sw table styles: fix missing format update of tables (diff)
downloadcore-1da6972c716256f908ea11549b6566877ce1e580.tar.gz
core-1da6972c716256f908ea11549b6566877ce1e580.zip
tdf#142716 Update selection after any text is inserted.
When we don't update the selection after insertion of new text SvxUnoTextBase::createEnumeration knows old selection and losts last part of the text. Change-Id: I20f6530f34097ff213ff00cff617139887fd287a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117409 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit e837f50313a703b6b26abb78f224472c1e4734ea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117558 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/uno/unotext.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 20d901e0d300..cae30b9eaa99 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1739,13 +1739,6 @@ void SAL_CALL SvxUnoTextBase::insertString( const uno::Reference< text::XTextRan
if( !xRange.is() )
return;
- if (GetEditSource())
- {
- ESelection aSelection;
- ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
- SetSelection( aSelection );
- }
-
SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRange>( xRange );
if(!pRange)
return;
@@ -1761,6 +1754,13 @@ void SAL_CALL SvxUnoTextBase::insertString( const uno::Reference< text::XTextRan
pRange->setString( aString );
pRange->CollapseToEnd();
+
+ if (GetEditSource())
+ {
+ ESelection aSelection;
+ ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ SetSelection( aSelection );
+ }
}
void SAL_CALL SvxUnoTextBase::insertControlCharacter( const uno::Reference< text::XTextRange >& xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb )