Index: pdf/pdfium/pdfium_engine.cc |
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc |
index 8c49b9dc0bc67a56ed1bb3732a394ae62ec88ccb..ee908b5c88acf484749163bfb9bf13b125a0041f 100644 |
--- a/pdf/pdfium/pdfium_engine.cc |
+++ b/pdf/pdfium/pdfium_engine.cc |
@@ -2221,11 +2221,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) |
gene
2015/01/05 21:42:43
Do you want to check selections are from the diffe
Deepak
2015/01/06 03:15:35
No,We don't have to do this. Let me explain.
We ha
gene
2015/01/07 23:35:04
OK, understood
raymes
2015/01/08 00:08:57
I'm a bit confused but I *think* the answer to you
|
+ result.append(new_line_char); |
result.append(selection_[i].GetText()); |
} |
} |