Return-Path: X-Original-To: apmail-poi-commits-archive@minotaur.apache.org Delivered-To: apmail-poi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 814474592 for ; Thu, 7 Jul 2011 08:36:27 +0000 (UTC) Received: (qmail 53958 invoked by uid 500); 7 Jul 2011 08:36:24 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 53917 invoked by uid 500); 7 Jul 2011 08:36:22 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 53877 invoked by uid 99); 7 Jul 2011 08:36:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2011 08:36:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2011 08:36:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F29D623888CE for ; Thu, 7 Jul 2011 08:35:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1143709 - in /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf: HWPFDocument.java HWPFDocumentCore.java HWPFOldDocument.java usermodel/Range.java Date: Thu, 07 Jul 2011 08:35:52 -0000 To: commits@poi.apache.org From: sergey@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110707083552.F29D623888CE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sergey Date: Thu Jul 7 08:35:51 2011 New Revision: 1143709 URL: http://svn.apache.org/viewvc?rev=1143709&view=rev Log: add getOverallRange() method definition to HWPFDocumentCore Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocumentCore.java poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java?rev=1143709&r1=1143708&r2=1143709&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java Thu Jul 7 08:35:51 2011 @@ -284,11 +284,6 @@ public final class HWPFDocument extends return _dop; } - /** - * Returns the range that covers all text in the - * file, including main text, footnotes, headers - * and comments - */ public Range getOverallRange() { // hack to get the ending cp of the document, Have to revisit this. PropertyNode p = _tpt.getTextPieces().get(_tpt.getTextPieces().size() - 1); Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocumentCore.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocumentCore.java?rev=1143709&r1=1143708&r2=1143709&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocumentCore.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocumentCore.java Thu Jul 7 08:35:51 2011 @@ -149,12 +149,18 @@ public abstract class HWPFDocumentCore e } } - /** - * Returns the range which covers the whole of the - * document, but excludes any headers and footers. - */ - public abstract Range getRange(); - + /** + * Returns the range which covers the whole of the document, but excludes + * any headers and footers. + */ + public abstract Range getRange(); + + /** + * Returns the range that covers all text in the file, including main text, + * footnotes, headers and comments + */ + public abstract Range getOverallRange(); + public abstract TextPieceTable getTextTable(); public CHPBinTable getCharacterTable() Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java?rev=1143709&r1=1143708&r2=1143709&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java Thu Jul 7 08:35:51 2011 @@ -109,12 +109,16 @@ public class HWPFOldDocument extends HWP _fib.getFcMin(), tpt ); } - - public Range getRange() { + + public Range getOverallRange() + { // Life is easy when we have no footers, headers or unicode! - return new Range( - 0, _fib.getFcMac() - _fib.getFcMin(), this - ); + return new Range( 0, _fib.getFcMac() - _fib.getFcMin(), this ); + } + + public Range getRange() + { + return getOverallRange(); } public TextPieceTable getTextTable() Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java?rev=1143709&r1=1143708&r2=1143709&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java Thu Jul 7 08:35:51 2011 @@ -901,8 +901,7 @@ public class Range { // TODO -instantiab } } - final Range overallrange = getDocument() instanceof HWPFDocument ? ((HWPFDocument) getDocument()) - .getOverallRange() : getDocument().getRange(); + final Range overallrange = getDocument().getOverallRange(); int limit = _paragraphs.size(); for ( ; tableEndInclusive < limit - 1; tableEndInclusive++ ) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org