summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-27 15:42:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-27 21:54:19 +0200
commite71d05eaa9a8c9e628b256f3e889b85ac11ed474 (patch)
tree8d6a17b254615eb45ba435e8e48af20b09d0c71a
parentd8bb4fa99104c3c30d880a4bec81571a5600f888 (diff)
ofz#8038 defer subdocument redlining to end of parse like main document
Change-Id: Ibdec7e5f9cee45ba11fc0e3aabcc46bb5da54c2c Reviewed-on: https://gerrit.libreoffice.org/53567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/qa/core/data/ww6/pass/ofz-redlining-1.docbin0 -> 35101 bytes
-rw-r--r--sw/source/filter/ww8/ww8par.cxx3
-rw-r--r--sw/source/filter/ww8/ww8par.hxx3
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx1
4 files changed, 6 insertions, 1 deletions
diff --git a/sw/qa/core/data/ww6/pass/ofz-redlining-1.doc b/sw/qa/core/data/ww6/pass/ofz-redlining-1.doc
new file mode 100644
index 000000000000..b2f60eb2a251
--- /dev/null
+++ b/sw/qa/core/data/ww6/pass/ofz-redlining-1.doc
Binary files differ
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 8e8d2f99bfd0..c9b994a76f94 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2028,6 +2028,7 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr )
pRdr->m_xCtrlStck = std::move(mxOldStck);
pRdr->m_xRedlineStack->closeall(*pRdr->m_pPaM->GetPoint());
+ pRdr->m_aFrameRedlines.emplace(std::move(pRdr->m_xRedlineStack));
pRdr->m_xRedlineStack = std::move(mxOldRedlines);
pRdr->DeleteAnchorStack();
@@ -5298,6 +5299,8 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const *pGloss)
// are updated
m_aExtraneousParas.delete_all_from_doc();
m_xRedlineStack->closeall(*m_pPaM->GetPoint());
+ while (!m_aFrameRedlines.empty())
+ m_aFrameRedlines.pop();
m_xRedlineStack.reset();
// For i120928,achieve the graphics from the special bookmark with is for graphic bullet
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 68e4063217a1..37d74e6c0d26 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1090,7 +1090,8 @@ private:
This stack is for redlines, because their sequence of discovery can
be out of order of their order of insertion into the document.
*/
- std::unique_ptr<sw::util::RedlineStack> m_xRedlineStack;
+ std::stack<std::unique_ptr<sw::util::RedlineStack>> m_aFrameRedlines; //inside frames, tables, etc
+ std::unique_ptr<sw::util::RedlineStack> m_xRedlineStack; //main document
/*
This stack is for fields that get referenced later, e.g. BookMarks and TOX.
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 0bfeeb680fb8..56c45f4d5ba5 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2701,6 +2701,7 @@ void WW8TabDesc::MoveOutsideTable()
void WW8TabDesc::FinishSwTable()
{
m_pIo->m_xRedlineStack->closeall(*m_pIo->m_pPaM->GetPoint());
+ m_pIo->m_aFrameRedlines.emplace(std::move(m_pIo->m_xRedlineStack));
m_pIo->m_xRedlineStack = std::move(mxOldRedlineStack);
WW8DupProperties aDup(m_pIo->m_rDoc,m_pIo->m_xCtrlStck.get());