[Libreoffice-commits] core.git: writerfilter/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 23 11:07:09 UTC 2019
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 80e9e3747ba622300c7ef66018b5fa6945add0f6
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Oct 15 18:14:49 2019 +0200
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Wed Oct 23 13:05:29 2019 +0200
writerfilter: StartOrEndBookmark(): don't hardcode end of document
... use xInsertPosition if available.
Change-Id: Id9a0ba2842ed88c7a83ffcd5ce9d12334deae755
Reviewed-on: https://gerrit.libreoffice.org/80916
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index e4b88d868cf6..b87e9af77970 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5532,7 +5532,11 @@ void DomainMapper_Impl::StartOrEndBookmark( const OUString& rId )
uno::Reference< text::XTextRange > xCurrent;
if (xTextAppend.is())
{
- uno::Reference< text::XTextCursor > xCursor = xTextAppend->createTextCursorByRange( xTextAppend->getEnd() );
+ uno::Reference<text::XTextCursor> const xCursor =
+ xTextAppend->createTextCursorByRange(
+ m_aTextAppendStack.top().xInsertPosition.is()
+ ? m_aTextAppendStack.top().xInsertPosition
+ : xTextAppend->getEnd() );
if (!xCursor)
return;
More information about the Libreoffice-commits
mailing list