Comment 19 for bug 33288

Revision history for this message
In , Brian Ewins (brian-ewins) wrote :

Created an attachment (id=24739)
prevent re-sorting of selection fragments

I managed to test this one with evince. Carlos, your screenshot in comment #9 shows what I presume was the intended old behaviour: its actually pasting the text with its layout intact; I'd agree this isn't what I'd want as a user. With this second patch applied, the selected parts of each column are presented in reading order instead of side-by-side.

I think the output has excess whitespace - the columns should be directly below each other instead of leaving space for previous columns. Also it might also be better if TextPage::dump effectively selected the whole page and dumped its text by visiting the selection, to avoid duplication of this logic. However, I went for the simple fix first.

This seems to work except for those cases where poppler's reading-order heuristics break down, eg, on paragraphs that flow around a diagram that contains text labels (the labels are viewed as part of the para because the fall within the flow bbox, I think), pasting tables (which unlike text columns, are best kept tabular), and most likely on rtl text.