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
This commit is contained in:
parent
5fdc53ce5a
commit
249ef2e3d6
@ -173,7 +173,7 @@ public class ModifyDocumentSummaryInformation
|
|||||||
|
|
||||||
/* Insert some custom properties into the container. */
|
/* Insert some custom properties into the container. */
|
||||||
customProperties.put("Key 1", "Value 1");
|
customProperties.put("Key 1", "Value 1");
|
||||||
customProperties.put("Schlüssel 2", "Wert 2");
|
customProperties.put("Schl\u00fcssel 2", "Wert 2");
|
||||||
customProperties.put("Sample Number", new Integer(12345));
|
customProperties.put("Sample Number", new Integer(12345));
|
||||||
customProperties.put("Sample Boolean", new Boolean(true));
|
customProperties.put("Sample Boolean", new Boolean(true));
|
||||||
customProperties.put("Sample Date", new Date());
|
customProperties.put("Sample Date", new Date());
|
||||||
|
@ -19,7 +19,7 @@ package org.apache.poi.hssf.record;
|
|||||||
|
|
||||||
import org.apache.poi.util.LittleEndian;
|
import org.apache.poi.util.LittleEndian;
|
||||||
/**
|
/**
|
||||||
* XCT – CRN Count <P>
|
* XCT - CRN Count <P>
|
||||||
*
|
*
|
||||||
* REFERENCE: 5.114<P>
|
* REFERENCE: 5.114<P>
|
||||||
*
|
*
|
||||||
|
@ -22,7 +22,7 @@ package org.apache.poi.hssf.util;
|
|||||||
*
|
*
|
||||||
* @author Andrew C. Oliver (acoliver at apache dot org)
|
* @author Andrew C. Oliver (acoliver at apache dot org)
|
||||||
* @author Glen Stampoultzis (glens at apache.org)
|
* @author Glen Stampoultzis (glens at apache.org)
|
||||||
* @author Rolf-Jürgen Moll
|
* @author Rolf-J\u00f6rgen Moll
|
||||||
*
|
*
|
||||||
* @see org.apache.poi.hssf.record.MulRKRecord
|
* @see org.apache.poi.hssf.record.MulRKRecord
|
||||||
* @see org.apache.poi.hssf.record.RKRecord
|
* @see org.apache.poi.hssf.record.RKRecord
|
||||||
|
@ -100,7 +100,7 @@ public class ExtractorFactory {
|
|||||||
if(corePart.getContentType().equals(XSSFRelation.WORKBOOK.getContentType())) {
|
if(corePart.getContentType().equals(XSSFRelation.WORKBOOK.getContentType())) {
|
||||||
return new XSSFExcelExtractor(pkg);
|
return new XSSFExcelExtractor(pkg);
|
||||||
}
|
}
|
||||||
if(corePart.getContentType().equals(XWPFRelation.MAIN_CONTENT_TYPE)) {
|
if(corePart.getContentType().equals(XWPFRelation.DOCUMENT.getContentType())) {
|
||||||
return new XWPFWordExtractor(pkg);
|
return new XWPFWordExtractor(pkg);
|
||||||
}
|
}
|
||||||
if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) {
|
if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) {
|
||||||
|
@ -121,23 +121,23 @@ public class XSSFColor {
|
|||||||
* <blockquote>
|
* <blockquote>
|
||||||
* <pre>
|
* <pre>
|
||||||
* If (tint < 0)
|
* If (tint < 0)
|
||||||
* Lum’ = Lum * (1.0 + tint)
|
* Lum' = Lum * (1.0 + tint)
|
||||||
*
|
*
|
||||||
* For example: Lum = 200; tint = -0.5; Darken 50%
|
* 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)
|
* 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)
|
* 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%
|
* For example: Lum = 100; tint = 0.75; Lighten 75%
|
||||||
*
|
*
|
||||||
* Lum‘ = 100 * (1-.75) + (HLSMAX – HLSMAX*(1-.75))
|
* Lum' = 100 * (1-.75) + (HLSMAX - HLSMAX*(1-.75))
|
||||||
* = 100 * .25 + (255 – 255 * .25)
|
* = 100 * .25 + (255 - 255 * .25)
|
||||||
* = 25 + (255 – 63) = 25 + 192 = 217
|
* = 25 + (255 - 63) = 25 + 192 = 217
|
||||||
* For example: Lum = 100; tint = 1.0; Lighten 100% (make white)
|
* For example: Lum = 100; tint = 1.0; Lighten 100% (make white)
|
||||||
* Lum‘ = 100 * (1-1) + (HLSMAX – HLSMAX*(1-1))
|
* Lum' = 100 * (1-1) + (HLSMAX - HLSMAX*(1-1))
|
||||||
* = 100 * 0 + (255 – 255 * 0)
|
* = 100 * 0 + (255 - 255 * 0)
|
||||||
* = 0 + (255 – 0) = 255
|
* = 0 + (255 - 0) = 255
|
||||||
* </pre>
|
* </pre>
|
||||||
* </blockquote>
|
* </blockquote>
|
||||||
*
|
*
|
||||||
@ -166,23 +166,23 @@ public class XSSFColor {
|
|||||||
* <blockquote>
|
* <blockquote>
|
||||||
* <pre>
|
* <pre>
|
||||||
* If (tint < 0)
|
* If (tint < 0)
|
||||||
* Lum’ = Lum * (1.0 + tint)
|
* Lum' = Lum * (1.0 + tint)
|
||||||
*
|
*
|
||||||
* For example: Lum = 200; tint = -0.5; Darken 50%
|
* 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)
|
* 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)
|
* 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%
|
* For example: Lum = 100; tint = 0.75; Lighten 75%
|
||||||
*
|
*
|
||||||
* Lum‘ = 100 * (1-.75) + (HLSMAX – HLSMAX*(1-.75))
|
* Lum' = 100 * (1-.75) + (HLSMAX - HLSMAX*(1-.75))
|
||||||
* = 100 * .25 + (255 – 255 * .25)
|
* = 100 * .25 + (255 - 255 * .25)
|
||||||
* = 25 + (255 – 63) = 25 + 192 = 217
|
* = 25 + (255 - 63) = 25 + 192 = 217
|
||||||
* For example: Lum = 100; tint = 1.0; Lighten 100% (make white)
|
* For example: Lum = 100; tint = 1.0; Lighten 100% (make white)
|
||||||
* Lum‘ = 100 * (1-1) + (HLSMAX – HLSMAX*(1-1))
|
* Lum' = 100 * (1-1) + (HLSMAX - HLSMAX*(1-1))
|
||||||
* = 100 * 0 + (255 – 255 * 0)
|
* = 100 * 0 + (255 - 255 * 0)
|
||||||
* = 0 + (255 – 0) = 255
|
* = 0 + (255 - 0) = 255
|
||||||
* </pre>
|
* </pre>
|
||||||
* </blockquote>
|
* </blockquote>
|
||||||
*
|
*
|
||||||
|
@ -46,7 +46,7 @@ public class XSSFFactory extends POIXMLFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public POIXMLDocumentPart createDocumentPart(PackageRelationship rel, PackagePart part){
|
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){
|
if(descriptor == null || descriptor.getRelationClass() == null){
|
||||||
logger.log(POILogger.DEBUG, "using default POIXMLDocumentPart for " + rel.getRelationshipType());
|
logger.log(POILogger.DEBUG, "using default POIXMLDocumentPart for " + rel.getRelationshipType());
|
||||||
return new POIXMLDocumentPart(part, rel);
|
return new POIXMLDocumentPart(part, rel);
|
||||||
|
@ -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
|
* 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
|
* application shall not assume 600dpi as specified in the schema as a default and instead
|
||||||
* shall let the printer specify the default dpi.
|
* shall let the printer specify the default dpi.
|
||||||
|
@ -1360,9 +1360,9 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
|
|||||||
* <pre>
|
* <pre>
|
||||||
* 10 - 10%
|
* 10 - 10%
|
||||||
* 20 - 20%
|
* 20 - 20%
|
||||||
* <EFBFBD>
|
* ...
|
||||||
* 100 - 100%
|
* 100 - 100%
|
||||||
* <EFBFBD>
|
* ...
|
||||||
* 400 - 400%
|
* 400 - 400%
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -110,7 +110,7 @@ public class XWPFDocument extends POIXMLDocument {
|
|||||||
|
|
||||||
for(POIXMLDocumentPart p : getRelations()){
|
for(POIXMLDocumentPart p : getRelations()){
|
||||||
String relation = p.getPackageRelationship().getRelationshipType();
|
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());
|
CommentsDocument cmntdoc = CommentsDocument.Factory.parse(p.getPackagePart().getInputStream());
|
||||||
for(CTComment ctcomment : cmntdoc.getComments().getCommentArray()) {
|
for(CTComment ctcomment : cmntdoc.getComments().getCommentArray()) {
|
||||||
comments.add(new XWPFComment(ctcomment));
|
comments.add(new XWPFComment(ctcomment));
|
||||||
@ -130,7 +130,7 @@ public class XWPFDocument extends POIXMLDocument {
|
|||||||
// TODO: make me optional/separated in private function
|
// TODO: make me optional/separated in private function
|
||||||
try {
|
try {
|
||||||
Iterator <PackageRelationship> relIter =
|
Iterator <PackageRelationship> relIter =
|
||||||
getPackagePart().getRelationshipsByType(XWPFRelation.HYPERLINK_RELATION_TYPE).iterator();
|
getPackagePart().getRelationshipsByType(XWPFRelation.HYPERLINK.getRelation()).iterator();
|
||||||
while(relIter.hasNext()) {
|
while(relIter.hasNext()) {
|
||||||
PackageRelationship rel = relIter.next();
|
PackageRelationship rel = relIter.next();
|
||||||
hyperlinks.add(new XWPFHyperlink(rel.getId(), rel.getTargetURI().toString()));
|
hyperlinks.add(new XWPFHyperlink(rel.getId(), rel.getTargetURI().toString()));
|
||||||
@ -257,7 +257,7 @@ public class XWPFDocument extends POIXMLDocument {
|
|||||||
public CTStyles getStyle() throws XmlException, IOException {
|
public CTStyles getStyle() throws XmlException, IOException {
|
||||||
PackagePart[] parts;
|
PackagePart[] parts;
|
||||||
try {
|
try {
|
||||||
parts = getRelatedByType(XWPFRelation.STYLES_RELATION_TYPE);
|
parts = getRelatedByType(XWPFRelation.STYLES.getRelation());
|
||||||
} catch(InvalidFormatException e) {
|
} catch(InvalidFormatException e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
|
@ -26,15 +26,6 @@ import java.util.HashMap;
|
|||||||
* @author Yegor Kozlov
|
* @author Yegor Kozlov
|
||||||
*/
|
*/
|
||||||
public class XWPFRelation extends POIXMLRelation {
|
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
|
* A map to lookup POIXMLRelation by its relation type
|
||||||
@ -72,6 +63,30 @@ public class XWPFRelation extends POIXMLRelation {
|
|||||||
"/word/webSettings.xml",
|
"/word/webSettings.xml",
|
||||||
null
|
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) {
|
private XWPFRelation(String type, String rel, String defaultName, Class<? extends POIXMLDocumentPart> cls) {
|
||||||
|
@ -22,7 +22,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STOnOff;
|
|||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
|
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
|
* @author Yegor Kozlov
|
||||||
*/
|
*/
|
||||||
|
@ -51,7 +51,7 @@ public class TestXWPFDocument extends TestCase {
|
|||||||
|
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for(PackagePart part : pack.getParts()) {
|
for(PackagePart part : pack.getParts()) {
|
||||||
if(part.getContentType().equals(XWPFRelation.MAIN_CONTENT_TYPE)) {
|
if(part.getContentType().equals(XWPFRelation.DOCUMENT.getContentType())) {
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
System.out.println(part);
|
System.out.println(part);
|
||||||
|
@ -44,7 +44,7 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
|||||||
* Basing on: src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java
|
* Basing on: src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java
|
||||||
* This class tests reading and writing of meta data. No actual document is created. All information
|
* This class tests reading and writing of meta data. No actual document is created. All information
|
||||||
* is stored in a virtal document in a ByteArrayOutputStream
|
* is stored in a virtal document in a ByteArrayOutputStream
|
||||||
* @author Matthias Günter
|
* @author Matthias G\u00fcnter
|
||||||
* @since 2006-03-03
|
* @since 2006-03-03
|
||||||
* @version $Id: TestEmptyProperties.java 353563 2004-06-22 16:16:33Z klute $
|
* @version $Id: TestEmptyProperties.java 353563 2004-06-22 16:16:33Z klute $
|
||||||
*/
|
*/
|
||||||
@ -286,7 +286,7 @@ public class TestMetaDataIPI extends TestCase{
|
|||||||
|
|
||||||
/* Insert some custom properties into the container. */
|
/* Insert some custom properties into the container. */
|
||||||
customProperties.put("Key1", "Value1");
|
customProperties.put("Key1", "Value1");
|
||||||
customProperties.put("Schlüssel2", "Wert2");
|
customProperties.put("Schl<EFBFBD>ssel2", "Wert2");
|
||||||
customProperties.put("Sample Integer", new Integer(12345));
|
customProperties.put("Sample Integer", new Integer(12345));
|
||||||
customProperties.put("Sample Boolean", new Boolean(true));
|
customProperties.put("Sample Boolean", new Boolean(true));
|
||||||
Date date=new Date();
|
Date date=new Date();
|
||||||
@ -325,8 +325,8 @@ public class TestMetaDataIPI extends TestCase{
|
|||||||
/* Insert some custom properties into the container. */
|
/* Insert some custom properties into the container. */
|
||||||
String a1=(String) customProperties.get("Key1");
|
String a1=(String) customProperties.get("Key1");
|
||||||
assertEquals("Key1","Value1",a1);
|
assertEquals("Key1","Value1",a1);
|
||||||
String a2=(String) customProperties.get("Schlüssel2");
|
String a2=(String) customProperties.get("Schl<EFBFBD>ssel2");
|
||||||
assertEquals("Schlüssel2","Wert2",a2);
|
assertEquals("Schl<EFBFBD>ssel2","Wert2",a2);
|
||||||
Integer a3=(Integer) customProperties.get("Sample Integer");
|
Integer a3=(Integer) customProperties.get("Sample Integer");
|
||||||
assertEquals("Sample Number",new Integer(12345),a3);
|
assertEquals("Sample Number",new Integer(12345),a3);
|
||||||
Boolean a4=(Boolean) customProperties.get("Sample Boolean");
|
Boolean a4=(Boolean) customProperties.get("Sample Boolean");
|
||||||
@ -431,7 +431,7 @@ public void testTwo(){
|
|||||||
String a1=(String) customProperties.get(k1);
|
String a1=(String) customProperties.get(k1);
|
||||||
assertEquals("Key1",p1,a1);
|
assertEquals("Key1",p1,a1);
|
||||||
String a2=(String) customProperties.get(k2);
|
String a2=(String) customProperties.get(k2);
|
||||||
assertEquals("Schlüssel2",p2,a2);
|
assertEquals("Schl<EFBFBD>ssel2",p2,a2);
|
||||||
Integer a3=(Integer) customProperties.get("Sample Number");
|
Integer a3=(Integer) customProperties.get("Sample Number");
|
||||||
assertEquals("Sample Number",new Integer(12345),a3);
|
assertEquals("Sample Number",new Integer(12345),a3);
|
||||||
Boolean a4=(Boolean) customProperties.get("Sample Boolean");
|
Boolean a4=(Boolean) customProperties.get("Sample Boolean");
|
||||||
@ -450,7 +450,7 @@ public void testTwo(){
|
|||||||
*/
|
*/
|
||||||
public String strangize(String s){
|
public String strangize(String s){
|
||||||
StringBuffer sb=new StringBuffer();
|
StringBuffer sb=new StringBuffer();
|
||||||
String[] umlaute= {"ä","ü","ö","Ü","$","Ö","Ü","É","Ö","@","ç","&"};
|
String[] umlaute= {"<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","$","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","@","<EFBFBD>","&"};
|
||||||
char j=0;
|
char j=0;
|
||||||
Random rand=new Random();
|
Random rand=new Random();
|
||||||
for (int i=0;i<5;i++){
|
for (int i=0;i<5;i++){
|
||||||
@ -544,7 +544,7 @@ public void testThree(){
|
|||||||
String a1=(String) customProperties.get(k1);
|
String a1=(String) customProperties.get(k1);
|
||||||
assertEquals("Key1",p1,a1);
|
assertEquals("Key1",p1,a1);
|
||||||
String a2=(String) customProperties.get(k2);
|
String a2=(String) customProperties.get(k2);
|
||||||
assertEquals("Schlüssel2",p2,a2);
|
assertEquals("Schl<EFBFBD>ssel2",p2,a2);
|
||||||
Integer a3=(Integer) customProperties.get("Sample Number");
|
Integer a3=(Integer) customProperties.get("Sample Number");
|
||||||
assertEquals("Sample Number",new Integer(12345),a3);
|
assertEquals("Sample Number",new Integer(12345),a3);
|
||||||
Boolean a4=(Boolean) customProperties.get("Sample Boolean");
|
Boolean a4=(Boolean) customProperties.get("Sample Boolean");
|
||||||
@ -577,7 +577,7 @@ public void testThree(){
|
|||||||
public String strangizeU(String s){
|
public String strangizeU(String s){
|
||||||
|
|
||||||
StringBuffer sb=new StringBuffer();
|
StringBuffer sb=new StringBuffer();
|
||||||
String[] umlaute= {"ä","ü","ö","Ü","$","Ö","Ü","É","Ö","@","ç","&"};
|
String[] umlaute= {"<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","$","<EFBFBD>","<EFBFBD>","<EFBFBD>","<EFBFBD>","@","<EFBFBD>","&"};
|
||||||
char j=0;
|
char j=0;
|
||||||
Random rand=new Random();
|
Random rand=new Random();
|
||||||
for (int i=0;i<5;i++){
|
for (int i=0;i<5;i++){
|
||||||
@ -592,7 +592,7 @@ public void testThree(){
|
|||||||
sb.append(umlaute[rand.nextInt(umlaute.length)]);
|
sb.append(umlaute[rand.nextInt(umlaute.length)]);
|
||||||
sb.append("<");
|
sb.append("<");
|
||||||
}
|
}
|
||||||
sb.append("äöü\uD840\uDC00");
|
sb.append("<EFBFBD><EFBFBD><EFBFBD>\uD840\uDC00");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -668,7 +668,7 @@ public void testThree(){
|
|||||||
String a1=(String) customProperties.get(k1);
|
String a1=(String) customProperties.get(k1);
|
||||||
assertEquals("Key1",p1,a1);
|
assertEquals("Key1",p1,a1);
|
||||||
String a2=(String) customProperties.get(k2);
|
String a2=(String) customProperties.get(k2);
|
||||||
assertEquals("Schlüssel2",p2,a2);
|
assertEquals("Schl<EFBFBD>ssel2",p2,a2);
|
||||||
Integer a3=(Integer) customProperties.get("Sample Number");
|
Integer a3=(Integer) customProperties.get("Sample Number");
|
||||||
assertEquals("Sample Number",new Integer(12345),a3);
|
assertEquals("Sample Number",new Integer(12345),a3);
|
||||||
Boolean a4=(Boolean) customProperties.get("Sample Boolean");
|
Boolean a4=(Boolean) customProperties.get("Sample Boolean");
|
||||||
|
@ -351,10 +351,10 @@ public class TestWriteWellKnown extends TestCase
|
|||||||
CustomProperties customProperties = dsi.getCustomProperties();
|
CustomProperties customProperties = dsi.getCustomProperties();
|
||||||
if (customProperties == null)
|
if (customProperties == null)
|
||||||
customProperties = new CustomProperties();
|
customProperties = new CustomProperties();
|
||||||
customProperties.put("Schlüssel ä", "Wert ä");
|
customProperties.put("Schl\u00fcssel <20>", "Wert <20>");
|
||||||
customProperties.put("Schlüssel äö", "Wert äö");
|
customProperties.put("Schl\u00fcssel <20><>", "Wert <20><>");
|
||||||
customProperties.put("Schlüssel äöü", "Wert äöü");
|
customProperties.put("Schl\u00fcssel <20><><EFBFBD>", "Wert <20><><EFBFBD>");
|
||||||
customProperties.put("Schlüssel äöüß", "Wert äöüß");
|
customProperties.put("Schl\u00fcssel <20><><EFBFBD><EFBFBD>", "Wert <20><><EFBFBD><EFBFBD>");
|
||||||
customProperties.put("positive_Integer", POSITIVE_INTEGER);
|
customProperties.put("positive_Integer", POSITIVE_INTEGER);
|
||||||
customProperties.put("positive_Long", POSITIVE_LONG);
|
customProperties.put("positive_Long", POSITIVE_LONG);
|
||||||
customProperties.put("positive_Double", POSITIVE_DOUBLE);
|
customProperties.put("positive_Double", POSITIVE_DOUBLE);
|
||||||
@ -440,10 +440,10 @@ public class TestWriteWellKnown extends TestCase
|
|||||||
final CustomProperties cps = dsi.getCustomProperties();
|
final CustomProperties cps = dsi.getCustomProperties();
|
||||||
assertEquals(customProperties, cps);
|
assertEquals(customProperties, cps);
|
||||||
assertNull(cps.get("No value available"));
|
assertNull(cps.get("No value available"));
|
||||||
assertEquals("Wert ä", cps.get("Schlüssel ä"));
|
assertEquals("Wert <EFBFBD>", cps.get("Schl\u00fcssel <20>"));
|
||||||
assertEquals("Wert äö", cps.get("Schlüssel äö"));
|
assertEquals("Wert <EFBFBD><EFBFBD>", cps.get("Schl\u00fcssel <20><>"));
|
||||||
assertEquals("Wert äöü", cps.get("Schlüssel äöü"));
|
assertEquals("Wert <EFBFBD><EFBFBD><EFBFBD>", cps.get("Schl\u00fcssel <20><><EFBFBD>"));
|
||||||
assertEquals("Wert äöüß", cps.get("Schlüssel äöüß"));
|
assertEquals("Wert <EFBFBD><EFBFBD><EFBFBD><EFBFBD>", cps.get("Schl\u00fcssel <20><><EFBFBD><EFBFBD>"));
|
||||||
assertEquals(POSITIVE_INTEGER, cps.get("positive_Integer"));
|
assertEquals(POSITIVE_INTEGER, cps.get("positive_Integer"));
|
||||||
assertEquals(POSITIVE_LONG, cps.get("positive_Long"));
|
assertEquals(POSITIVE_LONG, cps.get("positive_Long"));
|
||||||
assertEquals(POSITIVE_DOUBLE, cps.get("positive_Double"));
|
assertEquals(POSITIVE_DOUBLE, cps.get("positive_Double"));
|
||||||
@ -665,7 +665,7 @@ public class TestWriteWellKnown extends TestCase
|
|||||||
*/
|
*/
|
||||||
public void testCustomerProperties()
|
public void testCustomerProperties()
|
||||||
{
|
{
|
||||||
final String KEY = "Schlüssel ä";
|
final String KEY = "Schl\u00fcssel <20>";
|
||||||
final String VALUE_1 = "Wert 1";
|
final String VALUE_1 = "Wert 1";
|
||||||
final String VALUE_2 = "Wert 2";
|
final String VALUE_2 = "Wert 2";
|
||||||
|
|
||||||
@ -705,7 +705,7 @@ public class TestWriteWellKnown extends TestCase
|
|||||||
{
|
{
|
||||||
final int ID_1 = 2;
|
final int ID_1 = 2;
|
||||||
final int ID_2 = 3;
|
final int ID_2 = 3;
|
||||||
final String NAME_1 = "Schlüssel ä";
|
final String NAME_1 = "Schl\u00fcssel <20>";
|
||||||
final String VALUE_1 = "Wert 1";
|
final String VALUE_1 = "Wert 1";
|
||||||
final Map dictionary = new HashMap();
|
final Map dictionary = new HashMap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user