| Index: pdf/pdfium/pdfium_engine.cc
|
| diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
|
| index 6cd9cae4f9974104ef0879c11b3732ba52a23964..5920af1ee5c5427ca6e5001b30b7ad7a38e560b4 100644
|
| --- a/pdf/pdfium/pdfium_engine.cc
|
| +++ b/pdf/pdfium/pdfium_engine.cc
|
| @@ -2229,11 +2229,14 @@ void PDFiumEngine::InvalidateAllPages() {
|
|
|
| std::string PDFiumEngine::GetSelectedText() {
|
| base::string16 result;
|
| + base::string16 new_line_char = base::UTF8ToUTF16("\n");
|
| for (size_t i = 0; i < selection_.size(); ++i) {
|
| if (i > 0 &&
|
| selection_[i - 1].page_index() > selection_[i].page_index()) {
|
| - result = selection_[i].GetText() + result;
|
| + result = selection_[i].GetText() + new_line_char + result;
|
| } else {
|
| + if (i > 0)
|
| + result.append(new_line_char);
|
| result.append(selection_[i].GetText());
|
| }
|
| }
|
|
|