poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1657712 - in /poi/trunk/src: ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java scratchpad/src/org/apache/poi/wp/usermodel/Paragraph.java
Date Thu, 05 Feb 2015 23:20:43 GMT
Author: nick
Date: Thu Feb  5 23:20:43 2015
New Revision: 1657712

URL: http://svn.apache.org/r1657712
Log:
Stub a common WP paragraph class, needs uncommenting as XWPF implements/emulates

Added:
    poi/trunk/src/scratchpad/src/org/apache/poi/wp/usermodel/Paragraph.java
Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java?rev=1657712&r1=1657711&r2=1657712&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java Thu Feb  5 23:20:43
2015
@@ -62,7 +62,7 @@ import org.openxmlformats.schemas.wordpr
  *  actual text (possibly along with more styling) is held on
  *  the child {@link XWPFRun}s.</p>
  */
-public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents {
+public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Paragraph {
     private final CTP paragraph;
     protected IBody part;
     /** For access to the document's hyperlink, comments, tables etc */

Added: poi/trunk/src/scratchpad/src/org/apache/poi/wp/usermodel/Paragraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/wp/usermodel/Paragraph.java?rev=1657712&view=auto
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/wp/usermodel/Paragraph.java (added)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/wp/usermodel/Paragraph.java Thu Feb  5 23:20:43
2015
@@ -0,0 +1,144 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+
+package org.apache.poi.wp.usermodel;
+
+/**
+ * This class represents a paragraph, made up of one or more
+ *  runs of text.
+ */
+public interface Paragraph {
+    // Tables work very differently between the formats
+//  public boolean isInTable();
+//  public boolean isTableRowEnd();
+//  public int getTableLevel();
+
+    // TODO Implement justifaction in XWPF
+//  public int getJustification();
+//  public void setJustification(byte jc);
+
+    // TODO Expose the different page break related things,
+    //  XWPF currently doesn't have the full set
+/*
+    public boolean keepOnPage();
+    public void setKeepOnPage(boolean fKeep);
+
+    public boolean keepWithNext();
+    public void setKeepWithNext(boolean fKeepFollow);
+
+    public boolean pageBreakBefore();
+    public void setPageBreakBefore(boolean fPageBreak);
+
+    public boolean isSideBySide();
+    public void setSideBySide(boolean fSideBySide);
+*/
+
+/*
+    public boolean isLineNotNumbered();
+    public void setLineNotNumbered(boolean fNoLnn);
+
+    public boolean isAutoHyphenated();
+    public void setAutoHyphenated(boolean autoHyph);
+
+    public boolean isWidowControlled();
+    public void setWidowControl(boolean widowControl);
+
+    public int getIndentFromRight();
+    public void setIndentFromRight(int dxaRight);
+
+    public int getIndentFromLeft();
+    public void setIndentFromLeft(int dxaLeft);
+
+    public int getFirstLineIndent();
+    public void setFirstLineIndent(int first);
+
+    public int getSpacingBefore();
+    public void setSpacingBefore(int before);
+
+    public int getSpacingAfter();
+    public void setSpacingAfter(int after);
+*/
+
+    //  public LineSpacingDescriptor getLineSpacing();
+    //  public void setLineSpacing(LineSpacingDescriptor lspd);
+
+/*
+    public boolean isWordWrapped();
+    public void setWordWrapped(boolean wrap);
+
+    public int getFontAlignment();
+    public void setFontAlignment(int align);
+
+    public boolean isVertical();
+    public void setVertical(boolean vertical);
+
+    public boolean isBackward();
+    public void setBackward(boolean bward);
+*/
+
+/*
+    public BorderCode getTopBorder();
+    public void setTopBorder(BorderCode top);
+    public BorderCode getLeftBorder();
+    public void setLeftBorder(BorderCode left);
+    public BorderCode getBottomBorder();
+    public void setBottomBorder(BorderCode bottom);
+    public BorderCode getRightBorder();
+    public void setRightBorder(BorderCode right);
+    public BorderCode getBarBorder();
+    public void setBarBorder(BorderCode bar);
+
+    public ShadingDescriptor getShading();
+    public void setShading(ShadingDescriptor shd);
+*/
+
+    /**
+     * Returns the ilfo, an index to the document's hpllfo, which
+     *  describes the automatic number formatting of the paragraph.
+     * A value of zero means it isn't numbered.
+     */
+//    public int getIlfo();
+
+    /**
+     * Returns the multi-level indent for the paragraph. Will be
+     *  zero for non-list paragraphs, and the first level of any
+     *  list. Subsequent levels in hold values 1-8.
+     */
+//    public int getIlvl();
+
+    /**
+     * Returns the heading level (1-8), or 9 if the paragraph
+     *  isn't in a heading style.
+     */
+//    public int getLvl();
+
+    /**
+     * Returns number of tabs stops defined for paragraph. Must be >= 0 and <=
+     * 64.
+     * 
+     * @return number of tabs stops defined for paragraph. Must be >= 0 and <=
+     *         64
+     */
+//    public int getTabStopsNumber();
+
+    /**
+     * Returns array of positions of itbdMac tab stops
+     * 
+     * @return array of positions of itbdMac tab stops
+     */
+//    public int[] getTabStopsPositions();
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message