1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00
This commit is contained in:
Lu Wang 2013-04-07 17:10:36 +08:00
parent 33e9d2d750
commit cf9b917ba1
2 changed files with 4 additions and 6 deletions

View File

@ -59,19 +59,19 @@ void HTMLTextLine::append_state(const HTMLState & html_state)
(HTMLState&)(states.back()) = html_state;
}
bool HTMLTextLine::dump_text(ostream & out)
void HTMLTextLine::dump_text(ostream & out)
{
/*
* Each Line is an independent absolute positioned block
* so even we have a few states or offsets, we may omit them
*/
if(text.empty())
return false;
return;
if(states.empty() || (states[0].start_idx != 0))
{
cerr << "Warning: text without a style! Must be a bug in pdf2htmlEX" << endl;
return false;
return;
}
// Start Output
@ -222,7 +222,6 @@ bool HTMLTextLine::dump_text(ostream & out)
}
out << "</div>";
return true;
}
void HTMLTextLine::clear(void)

View File

@ -76,8 +76,7 @@ public:
void append_unicodes(const Unicode * u, int l);
void append_offset(double width);
void append_state(const HTMLState & html_state);
// return if anything dumped
bool dump_text(std::ostream & out);
void dump_text(std::ostream & out);
bool empty(void) const { return text.empty(); }
void clear(void);