Skip to content

Commit

Permalink
fix #1192 bbox as the entire page
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreiden2 authored and zdenop committed Sep 18, 2018
1 parent 59e42fc commit c98391d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/textord/colpartitiongrid.cpp
Expand Up @@ -719,6 +719,7 @@ void ColPartitionGrid::ExtractPartitionsAsBlocks(BLOCK_LIST* blocks,
to_block->line_spacing = static_cast<float>(box.height());
to_block->max_blob_size = static_cast<float>(box.height() + 1);
}
if (to_block->line_size == 0) to_block->line_size = 1;
block_it.add_to_end(block);
to_block_it.add_to_end(to_block);
} else {
Expand Down Expand Up @@ -1251,7 +1252,7 @@ void ColPartitionGrid::FindVPartitionPartners(bool to_the_left,
const TBOX& box = part->bounding_box();
int left = part->median_left();
int right = part->median_right();
int width = right - left;
int width = right >= left ? right - left : -1;
int mid_x = (left + right) / 2;
ColPartitionGridSearch hsearch(this);
// Search left for neighbour to_the_left
Expand Down

0 comments on commit c98391d

Please sign in to comment.