sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx |binary sw/source/core/doc/DocumentLayoutManager.cxx | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit 26a3f8283716e6545ec7803cfdc65068f1abf085 Author: Michael Stahl <mst...@redhat.com> Date: Fri Aug 7 20:44:43 2015 +0200 sw: fix ~SwIndexReg() assertion on import of tdf92157-1.docx Problem is that the TextBox SwFrmFmt of a draw object gets a FLY_AS_CHAR anchor set, which is then not updated later before nodes are deleted. (regression from c7307c77254557646f33017af915f6808a861e29) (cherry picked from commit 9dbb88fc41e7a91c852795f00a663c0d073dd70a) Change-Id: I906ee47b5c30944a08fd8a0d7d6ea8b8c9e6a6a8 Reviewed-on: https://gerrit.libreoffice.org/17580 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx b/sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx new file mode 100644 index 0000000..6edbe18 Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx differ diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx index 14dc9ab..d606706 100644 --- a/sw/source/core/doc/DocumentLayoutManager.cxx +++ b/sw/source/core/doc/DocumentLayoutManager.cxx @@ -496,7 +496,14 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( // If the draw format has a TextBox, then copy its fly format as well. if (SwFrameFormat* pSourceTextBox = SwTextBoxHelper::findTextBox(&rSource)) { - SwFrameFormat* pDestTextBox = CopyLayoutFormat(*pSourceTextBox, rNewAnchor, bSetTextFlyAtt, bMakeFrms); + SwFormatAnchor boxAnchor(rNewAnchor); + if (FLY_AS_CHAR == boxAnchor.GetAnchorId()) + { + // AS_CHAR *must not* be set on textbox fly-frame + boxAnchor.SetType(FLY_AT_CHAR); + } + SwFrameFormat* pDestTextBox = CopyLayoutFormat(*pSourceTextBox, + boxAnchor, bSetTextFlyAtt, bMakeFrms); SwAttrSet aSet(pDest->GetAttrSet()); SwFormatContent aContent(pDestTextBox->GetContent().GetContentIdx()->GetNode().GetStartNode()); aSet.Put(aContent); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits