1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 19:42:17 +02:00

formatting cleanup

This commit is contained in:
Nikolay Pultsin 2012-04-18 04:08:40 +01:00
parent 9d33c3e457
commit d6349b8735
8 changed files with 20 additions and 20 deletions

View file

@ -40,10 +40,10 @@ class LibraryTreeAdapter extends TreeAdapter {
}
private View createView(View convertView, ViewGroup parent, LibraryTree tree) {
final View view = (convertView != null) ? convertView :
final View view = (convertView != null) ? convertView :
LayoutInflater.from(parent.getContext()).inflate(R.layout.library_tree_item, parent, false);
((TextView)view.findViewById(R.id.library_tree_item_name)).setText(tree.getName());
((TextView)view.findViewById(R.id.library_tree_item_name)).setText(tree.getName());
((TextView)view.findViewById(R.id.library_tree_item_childrenlist)).setText(tree.getSummary());
return view;
}

View file

@ -95,7 +95,7 @@ public abstract class FBTree extends ZLTree<FBTree> implements Comparable<FBTree
/**
* Returns id used as a part of unique key above. This string must be not null
* and be different for all children of same tree
* and be different for all children of same tree
*/
protected abstract String getStringId();

View file

@ -81,7 +81,7 @@ public final class ZLPhysicalFile extends ZLFile {
public ZLPhysicalFile getPhysicalFile() {
return this;
}
@Override
public InputStream getInputStream() throws IOException {
return new FileInputStream(myFile);
@ -93,7 +93,7 @@ public final class ZLPhysicalFile extends ZLFile {
return Collections.emptyList();
}
ArrayList<ZLFile> entries = new ArrayList<ZLFile>(subFiles.length);
ArrayList<ZLFile> entries = new ArrayList<ZLFile>(subFiles.length);
for (File f : subFiles) {
if (!f.getName().startsWith(".")) {
entries.add(new ZLPhysicalFile(f));

View file

@ -73,7 +73,7 @@ public abstract class ZLLanguageUtil {
if (index != -1) {
String str = name.substring(0, index);
if (!codes.contains(str)) {
codes.add(str);
codes.add(str);
}
}
}

View file

@ -23,7 +23,7 @@ import org.geometerplus.zlibrary.core.xml.ZLStringMap;
import org.geometerplus.zlibrary.core.xml.ZLXMLReaderAdapter;
import org.geometerplus.zlibrary.core.util.ZLArrayUtils;
final class ZLTextHyphenationReader extends ZLXMLReaderAdapter {
final class ZLTextHyphenationReader extends ZLXMLReaderAdapter {
private static final String PATTERN = "pattern";
private final ZLTextTeXHyphenator myHyphenator;

View file

@ -45,7 +45,7 @@ public final class ZLTextTeXHyphenationPattern {
}
final char[] symbols = new char[patternLength];
final byte[] values = new byte[patternLength + 1];
for (int i = 0, k = 0; i < length; ++i) {
final char sym = pattern[offset + i];
if ((sym <= '9') && (sym >= '0')) {
@ -55,7 +55,7 @@ public final class ZLTextTeXHyphenationPattern {
++k;
}
}
myLength = patternLength;
mySymbols = symbols;
myValues = values;
@ -67,7 +67,7 @@ public final class ZLTextTeXHyphenationPattern {
myValues = null;
}
}
void apply(byte[] mask, int position) {
final int patternLength = myLength;
final byte[] values = myValues;
@ -115,7 +115,7 @@ public final class ZLTextTeXHyphenationPattern {
}
public char[] getSymbols() {
return mySymbols;
return mySymbols;
}
public byte[] getValues() {

View file

@ -26,7 +26,7 @@ import org.geometerplus.zlibrary.core.filesystem.ZLFile;
import org.geometerplus.zlibrary.core.filesystem.ZLResourceFile;
final class ZLTextTeXHyphenator extends ZLTextHyphenator {
private final HashMap<ZLTextTeXHyphenationPattern,ZLTextTeXHyphenationPattern> myPatternTable =
private final HashMap<ZLTextTeXHyphenationPattern,ZLTextTeXHyphenationPattern> myPatternTable =
new HashMap<ZLTextTeXHyphenationPattern,ZLTextTeXHyphenationPattern>();
private String myLanguage;
@ -42,7 +42,7 @@ final class ZLTextTeXHyphenator extends ZLTextHyphenator {
for (ZLFile file : patternsFile.children()) {
final String name = file.getShortName();
if (name.endsWith(".pattern")) {
codes.add(name.substring(0, name.length() - ".pattern".length()));
codes.add(name.substring(0, name.length() - ".pattern".length()));
}
}
@ -65,10 +65,10 @@ final class ZLTextTeXHyphenator extends ZLTextHyphenator {
if (language != null) {
new ZLTextHyphenationReader(this).readQuietly(ZLResourceFile.createResourceFile(
"hyphenationPatterns/" + language + ".pattern"
));
"hyphenationPatterns/" + language + ".pattern"
));
}
}
}
public void unload() {
myPatternTable.clear();
@ -100,7 +100,7 @@ final class ZLTextTeXHyphenator extends ZLTextHyphenator {
}
}
}
for (int i = 0; i < length - 1; i++) {
mask[i] = (values[i + 1] % 2) == 1;
}

View file

@ -163,9 +163,9 @@ final class ZLTextElementAreaVector {
if (myElementRegions.isEmpty()) {
return null;
}
int index = currentRegion != null ? myElementRegions.indexOf(currentRegion) : -1;
switch (direction) {
case rightToLeft:
case up:
@ -186,7 +186,7 @@ final class ZLTextElementAreaVector {
}
break;
}
switch (direction) {
case rightToLeft:
for (; index >= 0; --index) {