From 0927bf0dc9580867450b5a14f8ae1c7fc18ad2de Mon Sep 17 00:00:00 2001 From: Shangwen Wang <59810938+ShangwenWang@users.noreply.github.com> Date: Sun, 14 Feb 2021 16:41:32 +0800 Subject: [PATCH] Update TableBorderPrecedence.java --- .../fo/properties/TableBorderPrecedence.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/fop-core/src/main/java/org/apache/fop/fo/properties/TableBorderPrecedence.java b/fop-core/src/main/java/org/apache/fop/fo/properties/TableBorderPrecedence.java index b01ee22a0bc..ea69fa08fa3 100644 --- a/fop-core/src/main/java/org/apache/fop/fo/properties/TableBorderPrecedence.java +++ b/fop-core/src/main/java/org/apache/fop/fo/properties/TableBorderPrecedence.java @@ -50,6 +50,34 @@ public TableBorderPrecedence(int propId) { * * {@inheritDoc} */ + public Property getNameId(PropertyList propertyList) throws PropertyException { + FObj fo = propertyList.getFObj(); + switch (fo.getNameId()) { + case Constants.FO_TABLE: + return num6; + case Constants.FO_TABLE_CELL: + return num5; + case Constants.FO_TABLE_COLUMN: + return num4; + case Constants.FO_TABLE_ROW: + return num3; + case Constants.FO_TABLE_BODY: + return num2; + case Constants.FO_TABLE_HEADER: + return num1; + case Constants.FO_TABLE_FOOTER: + return num0; + default: + return null; + } + } + + /** + * Set default precedence according to the parent FObj + * + * {@inheritDoc} + */ + @Deprecated public Property make(PropertyList propertyList) throws PropertyException { FObj fo = propertyList.getFObj(); switch (fo.getNameId()) {