sw/source/core/unocore/unoportenum.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit f6a02947896e19160c137032a7fc2e56277656af Author: Miklos Vajna <vmik...@suse.cz> Date: Mon Feb 18 11:16:38 2013 +0100 fdo#60710 SwXTextPortionEnumeration: filter out fields from the undo stack The UNO API provides the annotation field associated to a comment range fieldmark when the fieldmark starts. To achieve this, it looks up the annotation field by name, but it failed to ignore the fields which are present only because the undo stack still holds a reference to them, making the ODF export filter fail to export the document. Change-Id: Ia3b738a1eca7ed9981e1963b3d70ea8e3dbe8db8 diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 91f94db..412a76d 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -331,7 +331,8 @@ static const SwFmtFld* lcl_getFieldByName(SwDoc* pDoc, const OUString& rName) SwIterator<SwFmtFld, SwFieldType> aIter(*pCurType); for (const SwFmtFld* pCurFldFmt = aIter.First(); pCurFldFmt; pCurFldFmt = aIter.Next()) { - if (pCurFldFmt->GetFld()->GetTyp()->Which() != RES_POSTITFLD) + // Ignore the field if it's not an annotation or it doesn't have an anchor. + if (pCurFldFmt->GetFld()->GetTyp()->Which() != RES_POSTITFLD || !pCurFldFmt->GetTxtFld()) continue; const SwPostItField* pField = dynamic_cast<const SwPostItField*>(pCurFldFmt->GetFld()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits