[Libreoffice-commits] core.git: writerfilter/source
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 22 00:18:34 UTC 2020
writerfilter/source/dmapper/DomainMapper.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 70a9c644c63248719f1f4248e288df7ee06635cc
Author: Jan-Marek Glogowski <jan-marek.glogowski at extern.cib.de>
AuthorDate: Thu Feb 20 20:20:47 2020 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sat Feb 22 01:18:01 2020 +0100
tdf#130814 preserve context before page breaks
... and add a comment, so nobody tries to move these again.
Change-Id: I79e6f7a1538d0839fd525870439facef3218ec65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89239
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index b4490712ccdd..0787b96fc1cd 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3168,6 +3168,8 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len)
}
}
+ // GetTopContext() is changed by inserted breaks, but we want to keep the current context
+ PropertyMapPtr pContext = m_pImpl->GetTopContext();
if (!m_pImpl->GetFootnoteContext())
{
if (m_pImpl->isBreakDeferred(PAGE_BREAK))
@@ -3177,7 +3179,6 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len)
m_pImpl->clearDeferredBreaks();
}
- PropertyMapPtr pContext = m_pImpl->GetTopContext();
if (pContext && pContext->GetFootnote().is() && m_pImpl->IsInCustomFootnote())
{
pContext->GetFootnote()->setLabel(sText);
@@ -3464,6 +3465,8 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
}
else
{
+ // GetTopContext() is changed by inserted breaks, but we want to keep the current context
+ PropertyMapPtr pContext = m_pImpl->GetTopContext();
if (!m_pImpl->GetFootnoteContext())
{
if (m_pImpl->isBreakDeferred(PAGE_BREAK))
@@ -3493,7 +3496,6 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
m_pImpl->clearDeferredBreaks();
}
- PropertyMapPtr pContext = m_pImpl->GetTopContext();
if (pContext && pContext->GetFootnote().is() && m_pImpl->IsInCustomFootnote())
{
pContext->GetFootnote()->setLabel( sText );
More information about the Libreoffice-commits
mailing list