Review comments
This commit is contained in:
@@ -1050,13 +1050,15 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
|
||||
}
|
||||
}
|
||||
} else if (strcmp(name, "hr") == 0) {
|
||||
if (self->partWordBufferIndex > 0) self->flushPartWordBuffer();
|
||||
if (self->partWordBufferIndex > 0) {
|
||||
if (!self->flushPartWordBuffer()) return;
|
||||
}
|
||||
self->makePages();
|
||||
if (!self->currentPage) {
|
||||
self->currentPage.reset(new Page());
|
||||
self->currentPageNextY = 0;
|
||||
}
|
||||
const int lineHeight = self->renderer.getLineHeight(self->fontId) * self->lineCompression;
|
||||
const int lineHeight = static_cast<int>(self->renderer.getLineHeight(self->fontId) * self->lineCompression + 0.5f);
|
||||
const int16_t marginV = static_cast<int16_t>(lineHeight / 2);
|
||||
self->currentPageNextY += marginV;
|
||||
if (self->currentPageNextY + 1 + marginV > self->viewportHeight) {
|
||||
|
||||
@@ -1079,9 +1079,9 @@ greet("World");</code></pre>
|
||||
<p>Second rule above. Two rules in a row with no text between them:</p>
|
||||
<hr/>
|
||||
<hr/>
|
||||
<p>Two rules appeared above. Now a rule at the very start of a section (right after the heading):</p>
|
||||
<p>Two rules appeared above. Now a rule right after the heading:</p>
|
||||
<hr/>
|
||||
<p>Rule appeared right after the heading. Finally, a rule near the end of the page to verify it does not cause a spurious page break when there is still room:</p>
|
||||
<p>Rule appeared right after the paragraph above. Finally, a rule near the end of the page to verify it does not cause a spurious page break when there is still room:</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
||||
<hr/>
|
||||
<p>End of horizontal rule tests.</p>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user