diff options
author | Yegor Kozlov <yegor@apache.org> | 2008-11-09 19:45:45 +0000 |
---|---|---|
committer | Yegor Kozlov <yegor@apache.org> | 2008-11-09 19:45:45 +0000 |
commit | 8e0be016469b67385634cf6d55aa9b3b756e8da6 (patch) | |
tree | fc93e4e4037594d9bbe76b75bd4447c7c9531e8b /src/ooxml/java/org | |
parent | 292797064530e5d788a4c84efbabc5dfc09fc572 (diff) | |
download | poi-8e0be016469b67385634cf6d55aa9b3b756e8da6.tar.gz poi-8e0be016469b67385634cf6d55aa9b3b756e8da6.zip |
converted non-ascii characters to unicode to keep compilers on UTF-8 systems quiet
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@712543 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org')
8 files changed, 53 insertions, 38 deletions
diff --git a/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java b/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java index 3eed794c0b..406a3145e9 100644 --- a/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java +++ b/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java @@ -100,7 +100,7 @@ public class ExtractorFactory { if(corePart.getContentType().equals(XSSFRelation.WORKBOOK.getContentType())) { return new XSSFExcelExtractor(pkg); } - if(corePart.getContentType().equals(XWPFRelation.MAIN_CONTENT_TYPE)) { + if(corePart.getContentType().equals(XWPFRelation.DOCUMENT.getContentType())) { return new XWPFWordExtractor(pkg); } if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) { diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColor.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColor.java index 9bd38c019f..4a2c63f03b 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColor.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColor.java @@ -121,23 +121,23 @@ public class XSSFColor { * <blockquote> * <pre> * If (tint < 0) - * Lum’ = Lum * (1.0 + tint) + * Lum' = Lum * (1.0 + tint) * * For example: Lum = 200; tint = -0.5; Darken 50% - * Lum‘ = 200 * (0.5) => 100 + * Lum' = 200 * (0.5) => 100 * For example: Lum = 200; tint = -1.0; Darken 100% (make black) - * Lum‘ = 200 * (1.0-1.0) => 0 + * Lum' = 200 * (1.0-1.0) => 0 * If (tint > 0) - * Lum‘ = Lum * (1.0-tint) + (HLSMAX – HLSMAX * (1.0-tint)) + * Lum' = Lum * (1.0-tint) + (HLSMAX - HLSMAX * (1.0-tint)) * For example: Lum = 100; tint = 0.75; Lighten 75% * - * Lum‘ = 100 * (1-.75) + (HLSMAX – HLSMAX*(1-.75)) - * = 100 * .25 + (255 – 255 * .25) - * = 25 + (255 – 63) = 25 + 192 = 217 + * Lum' = 100 * (1-.75) + (HLSMAX - HLSMAX*(1-.75)) + * = 100 * .25 + (255 - 255 * .25) + * = 25 + (255 - 63) = 25 + 192 = 217 * For example: Lum = 100; tint = 1.0; Lighten 100% (make white) - * Lum‘ = 100 * (1-1) + (HLSMAX – HLSMAX*(1-1)) - * = 100 * 0 + (255 – 255 * 0) - * = 0 + (255 – 0) = 255 + * Lum' = 100 * (1-1) + (HLSMAX - HLSMAX*(1-1)) + * = 100 * 0 + (255 - 255 * 0) + * = 0 + (255 - 0) = 255 * </pre> * </blockquote> * @@ -166,23 +166,23 @@ public class XSSFColor { * <blockquote> * <pre> * If (tint < 0) - * Lum’ = Lum * (1.0 + tint) + * Lum' = Lum * (1.0 + tint) * * For example: Lum = 200; tint = -0.5; Darken 50% - * Lum‘ = 200 * (0.5) => 100 + * Lum' = 200 * (0.5) => 100 * For example: Lum = 200; tint = -1.0; Darken 100% (make black) - * Lum‘ = 200 * (1.0-1.0) => 0 + * Lum' = 200 * (1.0-1.0) => 0 * If (tint > 0) - * Lum‘ = Lum * (1.0-tint) + (HLSMAX – HLSMAX * (1.0-tint)) + * Lum' = Lum * (1.0-tint) + (HLSMAX - HLSMAX * (1.0-tint)) * For example: Lum = 100; tint = 0.75; Lighten 75% * - * Lum‘ = 100 * (1-.75) + (HLSMAX – HLSMAX*(1-.75)) - * = 100 * .25 + (255 – 255 * .25) - * = 25 + (255 – 63) = 25 + 192 = 217 + * Lum' = 100 * (1-.75) + (HLSMAX - HLSMAX*(1-.75)) + * = 100 * .25 + (255 - 255 * .25) + * = 25 + (255 - 63) = 25 + 192 = 217 * For example: Lum = 100; tint = 1.0; Lighten 100% (make white) - * Lum‘ = 100 * (1-1) + (HLSMAX – HLSMAX*(1-1)) - * = 100 * 0 + (255 – 255 * 0) - * = 0 + (255 – 0) = 255 + * Lum' = 100 * (1-1) + (HLSMAX - HLSMAX*(1-1)) + * = 100 * 0 + (255 - 255 * 0) + * = 0 + (255 - 0) = 255 * </pre> * </blockquote> * diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFactory.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFactory.java index 40d55f2eab..9317d39520 100755 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFactory.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFactory.java @@ -46,7 +46,7 @@ public class XSSFFactory extends POIXMLFactory { }
public POIXMLDocumentPart createDocumentPart(PackageRelationship rel, PackagePart part){
- XSSFRelation descriptor = XSSFRelation.getInstance(rel.getRelationshipType());
+ POIXMLRelation descriptor = XSSFRelation.getInstance(rel.getRelationshipType());
if(descriptor == null || descriptor.getRelationClass() == null){
logger.log(POILogger.DEBUG, "using default POIXMLDocumentPart for " + rel.getRelationshipType());
return new POIXMLDocumentPart(part, rel);
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java index 0e70db6051..2905228204 100755 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java @@ -344,7 +344,7 @@ public class XSSFPrintSetup implements PrintSetup { } /** - * Use the printerŐs defaults settings for page setup values and don't use the default values + * Use the printer's defaults settings for page setup values and don't use the default values * specified in the schema. For example, if dpi is not present or specified in the XML, the * application shall not assume 600dpi as specified in the schema as a default and instead * shall let the printer specify the default dpi. diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java index c72241a729..24a3f252f0 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java @@ -1360,9 +1360,9 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * <pre> * 10 - 10% * 20 - 20% - * … + * ... * 100 - 100% - * … + * ... * 400 - 400% * </pre> * diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java index f8ff5c84b0..fdf6c97976 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java @@ -110,7 +110,7 @@ public class XWPFDocument extends POIXMLDocument { for(POIXMLDocumentPart p : getRelations()){ String relation = p.getPackageRelationship().getRelationshipType(); - if(relation.equals(XWPFRelation.COMMENT_RELATION_TYPE)){ + if(relation.equals(XWPFRelation.COMMENT.getRelation())){ CommentsDocument cmntdoc = CommentsDocument.Factory.parse(p.getPackagePart().getInputStream()); for(CTComment ctcomment : cmntdoc.getComments().getCommentArray()) { comments.add(new XWPFComment(ctcomment)); @@ -130,7 +130,7 @@ public class XWPFDocument extends POIXMLDocument { // TODO: make me optional/separated in private function try { Iterator <PackageRelationship> relIter = - getPackagePart().getRelationshipsByType(XWPFRelation.HYPERLINK_RELATION_TYPE).iterator(); + getPackagePart().getRelationshipsByType(XWPFRelation.HYPERLINK.getRelation()).iterator(); while(relIter.hasNext()) { PackageRelationship rel = relIter.next(); hyperlinks.add(new XWPFHyperlink(rel.getId(), rel.getTargetURI().toString())); @@ -257,7 +257,7 @@ public class XWPFDocument extends POIXMLDocument { public CTStyles getStyle() throws XmlException, IOException { PackagePart[] parts; try { - parts = getRelatedByType(XWPFRelation.STYLES_RELATION_TYPE); + parts = getRelatedByType(XWPFRelation.STYLES.getRelation()); } catch(InvalidFormatException e) { throw new IllegalStateException(e); } diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java index 7b44e841ac..b58db4a75f 100755 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java @@ -26,15 +26,6 @@ import java.util.HashMap; * @author Yegor Kozlov
*/
public class XWPFRelation extends POIXMLRelation {
- public static final String MAIN_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml";
- public static final String HEADER_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml";
- public static final String HEADER_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";
- public static final String FOOTER_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml";
- public static final String FOOTER_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";
- public static final String STYLES_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml";
- public static final String STYLES_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles";
- public static final String HYPERLINK_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
- public static final String COMMENT_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
/**
* A map to lookup POIXMLRelation by its relation type
@@ -72,6 +63,30 @@ public class XWPFRelation extends POIXMLRelation { "/word/webSettings.xml",
null
);
+ public static final XWPFRelation HEADER = new XWPFRelation(
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",
+ "/word/header#.xml",
+ null
+ );
+ public static final XWPFRelation FOOTER = new XWPFRelation(
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",
+ "/word/footer#.xml",
+ null
+ );
+ public static final XWPFRelation HYPERLINK = new XWPFRelation(
+ null,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
+ null,
+ null
+ );
+ public static final XWPFRelation COMMENT = new XWPFRelation(
+ null,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",
+ null,
+ null
+ );
private XWPFRelation(String type, String rel, String defaultName, Class<? extends POIXMLDocumentPart> cls) {
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java index 0db7a8a65e..570f6faa14 100755 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java @@ -22,7 +22,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STOnOff; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
/**
- * XWPFRun object defines a region of text with a common set of properties
+ * XWPFRun object defines a region of text with a common set of properties
*
* @author Yegor Kozlov
*/
|