mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
code cleanup
This commit is contained in:
parent
7f30c5fa73
commit
e790aeb68a
1 changed files with 4 additions and 8 deletions
|
@ -83,8 +83,7 @@ bool OleStreamReader::readDocument(shared_ptr<ZLInputStream> inputStream) {
|
||||||
}
|
}
|
||||||
|
|
||||||
OleEntry wordDocumentEntry;
|
OleEntry wordDocumentEntry;
|
||||||
bool result = storage->getEntryByName(WORD_DOCUMENT, wordDocumentEntry);
|
if (!storage->getEntryByName(WORD_DOCUMENT, wordDocumentEntry)) {
|
||||||
if (!result) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,8 +94,7 @@ bool OleStreamReader::readDocument(shared_ptr<ZLInputStream> inputStream) {
|
||||||
bool OleStreamReader::readStream(OleMainStream &oleMainStream) {
|
bool OleStreamReader::readStream(OleMainStream &oleMainStream) {
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
bool res = oleMainStream.open();
|
if (!oleMainStream.open()) {
|
||||||
if (!res) {
|
|
||||||
ZLLogger::Instance().println("OleStreamReader", "doesn't open correct");
|
ZLLogger::Instance().println("OleStreamReader", "doesn't open correct");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -169,11 +167,9 @@ bool OleStreamReader::readStream(OleMainStream &oleMainStream) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OleStreamReader::getUcs2Char(OleMainStream &stream, ZLUnicodeUtil::Ucs2Char &ucs2char) {
|
bool OleStreamReader::getUcs2Char(OleMainStream &stream, ZLUnicodeUtil::Ucs2Char &ucs2char) {
|
||||||
if (myCurBufferPosition >= myBuffer.size()) {
|
if (myCurBufferPosition >= myBuffer.size() && !fillBuffer(stream)) {
|
||||||
if (!fillBuffer(stream)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
ucs2char = myBuffer.at(myCurBufferPosition++);
|
ucs2char = myBuffer.at(myCurBufferPosition++);
|
||||||
processStyles(stream);
|
processStyles(stream);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue