From 6a374984fecc9da07adc04356b5db0e8d725d5a5 Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Fri, 12 Oct 2012 13:11:26 +0000 Subject: [PATCH] Bugzilla 53943 - added method processSymbol() to allow converting word symbols git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1397554 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/status.xml | 1 + .../poi/hwpf/converter/AbstractWordConverter.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index a953da8f68..3cfd2c194e 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 53943 - added method processSymbol() to allow converting word symbols 53763 - avoid style mess when using HSSFOptimiser 52972 - preserve leading / trailing spaces in SXSSF 53965 - Fixed XmlValueOutOfRangeExceptio calling getDataValidations for custom validations with XSSFSheet diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java index 819e681912..64a1900abe 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java @@ -520,6 +520,13 @@ public abstract class AbstractWordConverter processOle2( doc, characterRun, block ); continue; } + if ( characterRun.isSymbol() + && ( wordDocument instanceof HWPFDocument ) ) + { + HWPFDocument doc = (HWPFDocument) wordDocument; + processSymbol( doc, characterRun, block ); + continue; + } } if ( text.getBytes()[0] == FIELD_BEGIN_MARK ) @@ -1003,6 +1010,12 @@ public abstract class AbstractWordConverter return false; } } + + protected void processSymbol( HWPFDocument doc, CharacterRun characterRun, + Element block ) + { + + } @SuppressWarnings( "unused" ) protected boolean processOle2( HWPFDocument wordDocument, Element block, -- 2.39.5