[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sc/source
Michael Stahl
mstahl at redhat.com
Mon Jul 4 21:44:45 UTC 2016
sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 638a86ec065f43425065d6459fde05bf60c0e575
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jul 4 21:21:46 2016 +0200
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 <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 8c3b6cc..0e0ec84 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();
}
More information about the Libreoffice-commits
mailing list