From 638a86ec065f43425065d6459fde05bf60c0e575 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 4 Jul 2016 21:21:46 +0200 Subject: tdf#73335 sc: ODF export: ignore ScChangeAction SC_CAT_NONE harder ScChangeTrackingExportHelper::WorkWithChangeAction() must not add attributes when it does not export an element. Change-Id: Ia6625b73114ab8bf93c4b7a31b484d11bef2fde9 (cherry picked from commit ed913ce8352dc4ad9f4688180a9b27d02e8f524f) Reviewed-on: https://gerrit.libreoffice.org/26918 Tested-by: Jenkins Reviewed-by: Eike Rathke --- sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx index 8c3b6cc93147..0e0ec84a2832 100644 --- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx @@ -672,6 +672,11 @@ void ScChangeTrackingExportHelper::CollectActionAutoStyles(ScChangeAction* pActi void ScChangeTrackingExportHelper::WorkWithChangeAction(ScChangeAction* pAction) { + if (pAction->GetType() == SC_CAT_NONE) + { + SAL_WARN("sc.filter", "WorkWithChangeAction: type is not writable"); + return; + } rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_ID, GetChangeID(pAction->GetActionNumber())); GetAcceptanceState(pAction); if (pAction->IsRejecting()) @@ -688,7 +693,7 @@ void ScChangeTrackingExportHelper::WorkWithChangeAction(ScChangeAction* pAction) WriteRejection(pAction); else { - OSL_FAIL("not a writeable type"); + assert(false); // tdf#73335 this would create duplicate attributes } rExport.CheckAttrList(); } -- cgit