Replace tabs with spaces ( part of accepting another big patch); fix one failing test due to typo

git-svn-id: https://zxing.googlecode.com/svn/trunk@1326 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2010-05-02 06:49:18 +00:00
parent 1109e2aecf
commit 816d6b81e0
21 changed files with 303 additions and 325 deletions

View file

@ -30,7 +30,9 @@ final class SearchBookContentsResult {
private final String snippet; private final String snippet;
private final boolean validSnippet; private final boolean validSnippet;
SearchBookContentsResult(String pageId, String pageNumber, String snippet, SearchBookContentsResult(String pageId,
String pageNumber,
String snippet,
boolean validSnippet) { boolean validSnippet) {
this.pageId = pageId; this.pageId = pageId;
this.pageNumber = pageNumber; this.pageNumber = pageNumber;

View file

@ -28,7 +28,10 @@ import com.google.zxing.common.BitMatrix;
*/ */
public final class Code39Writer extends UPCEANWriter { public final class Code39Writer extends UPCEANWriter {
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, public BitMatrix encode(String contents,
BarcodeFormat format,
int width,
int height,
Hashtable hints) throws WriterException { Hashtable hints) throws WriterException {
if (format != BarcodeFormat.CODE_39) { if (format != BarcodeFormat.CODE_39) {
throw new IllegalArgumentException("Can only encode CODE_39, but got " + format); throw new IllegalArgumentException("Can only encode CODE_39, but got " + format);

View file

@ -28,7 +28,10 @@ import com.google.zxing.common.BitMatrix;
*/ */
public final class ITFWriter extends UPCEANWriter { public final class ITFWriter extends UPCEANWriter {
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, public BitMatrix encode(String contents,
BarcodeFormat format,
int width,
int height,
Hashtable hints) throws WriterException { Hashtable hints) throws WriterException {
if (format != BarcodeFormat.ITF) { if (format != BarcodeFormat.ITF) {
throw new IllegalArgumentException("Can only encode ITF, but got " + format); throw new IllegalArgumentException("Can only encode ITF, but got " + format);
@ -61,4 +64,5 @@ public final class ITFWriter extends UPCEANWriter {
return result; return result;
} }
} }

View file

@ -146,4 +146,5 @@ public final class Decoder {
} }
return result; return result;
} }
} }

View file

@ -202,11 +202,11 @@ public final class ParsedReaderResultTestCase extends TestCase {
"DTEND:20080505\r\nEND:VEVENT", "foo\n20080504\n20080505", ParsedResultType.CALENDAR); "DTEND:20080505\r\nEND:VEVENT", "foo\n20080504\n20080505", ParsedResultType.CALENDAR);
// Start time only // Start time only
doTestResult("BEGIN:VEVENT\r\nSUMMARY:foo\r\nDTSTART:20080504T123456Z\r\nEND:VEVENT", doTestResult("BEGIN:VEVENT\r\nSUMMARY:foo\r\nDTSTART:20080504T123456Z\r\nEND:VEVENT",
"foo\n20080504T123456Z", ParsedResultType.CALENDAR); "foo\n20080504T123456Z\n20080504T123456Z", ParsedResultType.CALENDAR);
doTestResult("BEGIN:VEVENT\r\nSUMMARY:foo\r\nDTSTART:20080504T123456\r\nEND:VEVENT", doTestResult("BEGIN:VEVENT\r\nSUMMARY:foo\r\nDTSTART:20080504T123456\r\nEND:VEVENT",
"foo\n20080504T123456", ParsedResultType.CALENDAR); "foo\n20080504T123456\n20080504T123456", ParsedResultType.CALENDAR);
doTestResult("BEGIN:VEVENT\r\nSUMMARY:foo\r\nDTSTART:20080504\r\nEND:VEVENT", doTestResult("BEGIN:VEVENT\r\nSUMMARY:foo\r\nDTSTART:20080504\r\nEND:VEVENT",
"foo\n20080504", ParsedResultType.CALENDAR); "foo\n20080504\n20080504", ParsedResultType.CALENDAR);
doTestResult("BEGIN:VEVENT\r\nDTEND:20080505T\r\nEND:VEVENT", doTestResult("BEGIN:VEVENT\r\nDTEND:20080505T\r\nEND:VEVENT",
"BEGIN:VEVENT\r\nDTEND:20080505T\r\nEND:VEVENT", ParsedResultType.TEXT); "BEGIN:VEVENT\r\nDTEND:20080505T\r\nEND:VEVENT", ParsedResultType.TEXT);
// Make sure illegal entries without newlines don't crash // Make sure illegal entries without newlines don't crash

View file

@ -290,8 +290,7 @@ public final class MatrixUtilTestCase extends TestCase {
public void testMakeTypeInfoInfoBits() throws WriterException { public void testMakeTypeInfoInfoBits() throws WriterException {
// From Appendix C in JISX0510:2004 (p 65) // From Appendix C in JISX0510:2004 (p 65)
BitArray bits = new BitArray(); BitArray bits = new BitArray();
MatrixUtil.makeTypeInfoBits(ErrorCorrectionLevel.M, MatrixUtil.makeTypeInfoBits(ErrorCorrectionLevel.M, 5, bits);
5, bits);
assertEquals(" X......X X..XXX.", bits.toString()); assertEquals(" X......X X..XXX.", bits.toString());
} }
} }

View file

@ -1,21 +1,16 @@
<module> <module>
<!-- Inherit the core Web Toolkit stuff. --> <!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/> <inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. --> <!-- Inherit the default GWT style sheet. -->
<inherits name='com.google.gwt.user.theme.standard.Standard'/> <inherits name='com.google.gwt.user.theme.standard.Standard'/>
<!-- Other module inherits --> <!-- Other module inherits -->
<inherits name='com.google.gwt.widgetideas.WidgetIdeas' /> <inherits name='com.google.gwt.widgetideas.WidgetIdeas' />
<inherits name='com.google.gwt.libideas.LibIdeas' /> <inherits name='com.google.gwt.libideas.LibIdeas' />
<inherits name='com.google.gwt.maps.GoogleMaps' /> <inherits name='com.google.gwt.maps.GoogleMaps' />
<!-- Specify the app entry point class. --> <!-- Specify the app entry point class. -->
<entry-point class='com.google.zxing.web.generator.client.Generator'/> <entry-point class='com.google.zxing.web.generator.client.Generator'/>
<!-- Specify the application specific style sheet. --> <!-- Specify the application specific style sheet. -->
<stylesheet src='Generator.css' /> <stylesheet src='Generator.css' />
<stylesheet src='DatePickerDemo.css' /> <stylesheet src='DatePickerDemo.css' />
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjEOGGB_IEuss4QYUzB6Z0BRlY4xXjGBjgubjQXCS8Djm2jdpYBQn9f8dHtxpg30ararqd3GCyq_T4A' /> <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjEOGGB_IEuss4QYUzB6Z0BRlY4xXjGBjgubjQXCS8Djm2jdpYBQn9f8dHtxpg30ararqd3GCyq_T4A' />
</module> </module>

View file

@ -24,8 +24,6 @@ package com.google.zxing.web.generator.client;
* @author Yohann Coppel * @author Yohann Coppel
*/ */
public class GeneratorException extends Exception { public class GeneratorException extends Exception {
private static final long serialVersionUID = 1L;
public GeneratorException(String message) { public GeneratorException(String message) {
super(message); super(message);
} }

View file

@ -6,12 +6,10 @@ body {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
font-size: 11px; font-size: 11px;
} }
#header { #header {
background-color: #dde3e9; background-color: #dde3e9;
border-bottom: 1px solid #f2f7fc; border-bottom: 1px solid #f2f7fc;
} }
#header h1 { #header h1 {
font-size: 15px; font-size: 15px;
font-weight: bold; font-weight: bold;
@ -19,23 +17,19 @@ body {
padding: 12px; padding: 12px;
border-bottom: 1px solid #c8d0d9; border-bottom: 1px solid #c8d0d9;
} }
#header span { #header span {
font-weight: normal; font-weight: normal;
color: #5e6b75; color: #5e6b75;
} }
#footer { #footer {
width: 100%; width: 100%;
text-align:center; text-align:center;
padding-top: 12px; padding-top: 12px;
} }
#footer a { #footer a {
text-decoration:none; text-decoration:none;
color: #5e6b75; color: #5e6b75;
} }
/****************************************/ /****************************************/
#mainpanel { #mainpanel {
width: 800px; width: 800px;
@ -43,7 +37,6 @@ body {
padding: 12px; padding: 12px;
font-size: 11px; font-size: 11px;
} }
#imageresult { #imageresult {
background-color: #dde3e9; background-color: #dde3e9;
height: 350px; height: 350px;
@ -56,7 +49,6 @@ body {
display: table; display: table;
#position: relative; #position: relative;
} }
#innerresult { #innerresult {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
@ -64,20 +56,16 @@ body {
#position: absolute; #position: absolute;
#top: 50%; #top: 50%;
} }
#innerresult img { #innerresult img {
#position: relative; #position: relative;
#top: -50%; #top: -50%;
} }
#downloadText { #downloadText {
font-size: 11px; font-size: 11px;
} }
#urlresult { #urlresult {
width: 350px; width: 350px;
} }
.firstColumn { .firstColumn {
width: 100px; width: 100px;
text-align: right; text-align: right;
@ -87,14 +75,12 @@ body {
font-weight: bold; font-weight: bold;
font-size: 11px; font-size: 11px;
} }
.secondColumn { .secondColumn {
width: 270px; width: 270px;
font-size: 11px; font-size: 11px;
color: #5e6b75; color: #5e6b75;
font-weight: bold; font-weight: bold;
} }
/*.inputfield,*/ /*.inputfield,*/
.gwt-TextBox, .gwt-TextBox,
.gwt-TextArea { .gwt-TextArea {
@ -106,19 +92,15 @@ body {
color: #000; color: #000;
font-weight: normal; font-weight: normal;
} }
/*.inputfield:focus,*/ /*.inputfield:focus,*/
.gwt-TextBox:focus { .gwt-TextBox:focus {
background-color: #fffbcc; background-color: #fffbcc;
} }
.required { .required {
background: #ffffff url(required-field-bg.png) repeat-y; background: #ffffff url(required-field-bg.png) repeat-y;
} }
.errorMessage { .errorMessage {
padding-left: 110px; padding-left: 110px;
font-size: 11px; font-size: 11px;
color: red; color: red;
} }

View file

@ -6,16 +6,13 @@ body {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
font-size: 12px; font-size: 12px;
} }
td { td {
font-size: 14px; font-size: 14px;
} }
#header { #header {
background-color: #dde3e9; background-color: #dde3e9;
border-bottom: 1px solid #f2f7fc; border-bottom: 1px solid #f2f7fc;
} }
#header h1 { #header h1 {
font-size: 15px; font-size: 15px;
font-weight: bold; font-weight: bold;
@ -23,18 +20,15 @@ td {
padding: 12px; padding: 12px;
border-bottom: 1px solid #c8d0d9; border-bottom: 1px solid #c8d0d9;
} }
#header span { #header span {
font-weight: normal; font-weight: normal;
color: #5e6b75; color: #5e6b75;
} }
#footer { #footer {
width: 100%; width: 100%;
text-align:center; text-align:center;
padding-top: 12px; padding-top: 12px;
} }
#footer a { #footer a {
text-decoration:none; text-decoration:none;
color: #5e6b75; color: #5e6b75;