Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1241)

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 824363002: copying to clipboard should add a newline before the content of the next page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698