|
|
Descriptioncopying to clipboard should add a newline before the content of the next page.
When we selected some text that spreads in multiple pages then content of
pages should be separated by new line as happening in the Adobe Reader.
code added for checking selection in newpage, then add a newline char.
BUG=84387
Committed: https://crrev.com/d209afa5561213383fa0bc18423a28c684dbe142
Cr-Commit-Position: refs/heads/master@{#310714}
Patch Set 1 #Patch Set 2 : #
Total comments: 4
Patch Set 3 : #Messages
Total messages: 20 (7 generated)
deepak.m1@samsung.com changed reviewers: + gene@chromium.org, raymes@chromium.org
PTAL at my changes. Thanks
@gene PTAL at my changes. Thanks
https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine.cc File pdf/pdfium/pdfium_engine.cc (right): https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine... pdf/pdfium/pdfium_engine.cc:2230: if (i > 0) Do you want to check selections are from the different pages here? e.g. if (i > 0 && selection_[i - 1].page_index() < selection_[i].page_index()) { ... }
https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine.cc File pdf/pdfium/pdfium_engine.cc (right): https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine... pdf/pdfium/pdfium_engine.cc:2230: if (i > 0) On 2015/01/05 21:42:43, gene wrote: > Do you want to check selections are from the different pages here? > e.g. if (i > 0 && selection_[i - 1].page_index() < selection_[i].page_index()) > { ... } No,We don't have to do this. Let me explain. We have 2 cases. 1) When we are doing selection in the same page, then in else case no need of adding new line. 2) When I am copying from page 1 to page 2 then first for page 1 contents , else condition came so again no need to add newline, and for page 2 content, as it will again come in the else condition , because page index of page 2 is greater than page 1, so new line require.. This is copying from lower to higher page index. here we have selection[0] have page index 1, and selection[1] have page index 2. 3) When I copy from Higher page index to lower one. then selection[0] have page index 2 , so I am not adding newline and just copy text, and selection[1] have page index 1, here I am getting text and then adding new line after that copied text of page index 2. As is happening in the if condition of for loop. I am doing this as for first selection page in either direction I don't have to add newline.so no need of checking page index in else condition. Please inform me, if still you have any query. Thanks
LGTM https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine.cc File pdf/pdfium/pdfium_engine.cc (right): https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine... pdf/pdfium/pdfium_engine.cc:2230: if (i > 0) OK, understood
https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine.cc File pdf/pdfium/pdfium_engine.cc (right): https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine... pdf/pdfium/pdfium_engine.cc:2230: if (i > 0) I'm a bit confused but I *think* the answer to your question is that it makes sense to add newlines between selection segments even if they are on the same page.
On 2015/01/08 00:08:57, raymes wrote: > https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine.cc > File pdf/pdfium/pdfium_engine.cc (right): > > https://codereview.chromium.org/824363002/diff/20001/pdf/pdfium/pdfium_engine... > pdf/pdfium/pdfium_engine.cc:2230: if (i > 0) > I'm a bit confused but I *think* the answer to your question is that it makes > sense to add newlines between selection segments even if they are on the same > page. @Raymes, When we copy segments in the same page then automatically new line comes as part of content. This issue is regarding doing copy across page boundaries. So that next page content starts with next line as in adobe reader. Please inform me if you have any query. Thanks
The CQ bit was checked by deepak.m1@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/824363002/20001
The CQ bit was unchecked by deepak.m1@samsung.com
The CQ bit was checked by deepak.m1@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/824363002/20001
The CQ bit was unchecked by deepak.m1@samsung.com
The CQ bit was checked by deepak.m1@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/824363002/20001
The CQ bit was checked by deepak.m1@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/824363002/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/d209afa5561213383fa0bc18423a28c684dbe142 Cr-Commit-Position: refs/heads/master@{#310714} |