diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-07-04 21:21:46 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-07-04 21:43:18 +0000 |
commit | 1b9f0082ba963baa37c8c565bab3b9b893e1a690 (patch) | |
tree | 28e7322aaa253d4738b5b0b111048da8b4648eaf | |
parent | 313543cd7b8d8614dec08925894fb5eb95c8fc95 (diff) |
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/26919
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
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(); } |