From b826c4a4df92c5280e4f8a4d7e1bebbbb03affb3 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 20 Mar 2024 19:20:02 +0000 Subject: [PATCH] Prefer numbering properties to numbering from paragraph style --- NEWS | 6 ++++ .../internal/docx/StatefulBodyXmlReader.java | 13 ++++---- .../mammoth/tests/docx/BodyXmlTests.java | 30 +++++++++++++++++-- 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 3c5b54f..96af28e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +# 1.7.1 + +* Switch the precedence of numbering properties in paragraph properties and the + numbering in paragraph styles so that the numbering properties in paragraph + properties takes precedence. + # 1.7.0 * Support attributes in HTML paths in style mappings. diff --git a/src/main/java/org/zwobble/mammoth/internal/docx/StatefulBodyXmlReader.java b/src/main/java/org/zwobble/mammoth/internal/docx/StatefulBodyXmlReader.java index 3be34ad..d17a404 100644 --- a/src/main/java/org/zwobble/mammoth/internal/docx/StatefulBodyXmlReader.java +++ b/src/main/java/org/zwobble/mammoth/internal/docx/StatefulBodyXmlReader.java @@ -354,6 +354,13 @@ private InternalResult> findStyleById( } private Optional readNumbering(Optional