{"action":"created","issue":{"url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/76","repository_url":"https://api.github.com/repos/sailfishos/sailfish-office","labels_url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/76/comments","events_url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/76/events","html_url":"https://github.com/sailfishos/sailfish-office/pull/76","id":142899059,"number":76,"title":"[Office] Correct text selection in documents with columns.","user":{"login":"dcaliste","id":5889532,"avatar_url":"https://avatars.githubusercontent.com/u/5889532?v=3","gravatar_id":"","url":"https://api.github.com/users/dcaliste","html_url":"https://github.com/dcaliste","followers_url":"https://api.github.com/users/dcaliste/followers","following_url":"https://api.github.com/users/dcaliste/following{/other_user}","gists_url":"https://api.github.com/users/dcaliste/gists{/gist_id}","starred_url":"https://api.github.com/users/dcaliste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcaliste/subscriptions","organizations_url":"https://api.github.com/users/dcaliste/orgs","repos_url":"https://api.github.com/users/dcaliste/repos","events_url":"https://api.github.com/users/dcaliste/events{/privacy}","received_events_url":"https://api.github.com/users/dcaliste/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-23T08:46:02Z","updated_at":"2016-04-05T13:17:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/76","html_url":"https://github.com/sailfishos/sailfish-office/pull/76","diff_url":"https://github.com/sailfishos/sailfish-office/pull/76.diff","patch_url":"https://github.com/sailfishos/sailfish-office/pull/76.patch"},"body":"The previous code to change selection by moving handles does not work in a multi-column document (my bad). It resulted in always moving the selection edge into the first column.\r\n\r\nThis PR hopefully corrects it. This problem was difficult to tackle that I thought of initially. Currently, the code is scanning all text boxes, classifying them as \"after\" or \"before\" the \"cursor\" position. When a before to after transition is found, the before or after box is returned depending on the value of the position argument of the routine. This works well in a document where the layout go from top to bottom.\r\n\r\nBut in a multi-column document, the layout goes from top to bottom and returns to top again, several times. Thus it exists several before / after transitions for a given cursor position and deciding which one is the best can be tricky (think about when the cursor is in the margin between columns). Finally, I decided to sort these transitions by adopting the one that has the closest before / after boxes to the cursor position.\r\n\r\nAll this need to be tested. I've done testing for two days now, but maybe additional testing should be good…"},"comment":{"url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/comments/205798416","html_url":"https://github.com/sailfishos/sailfish-office/pull/76#issuecomment-205798416","issue_url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/76","id":205798416,"user":{"login":"pvuorela","id":2478615,"avatar_url":"https://avatars.githubusercontent.com/u/2478615?v=3","gravatar_id":"","url":"https://api.github.com/users/pvuorela","html_url":"https://github.com/pvuorela","followers_url":"https://api.github.com/users/pvuorela/followers","following_url":"https://api.github.com/users/pvuorela/following{/other_user}","gists_url":"https://api.github.com/users/pvuorela/gists{/gist_id}","starred_url":"https://api.github.com/users/pvuorela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvuorela/subscriptions","organizations_url":"https://api.github.com/users/pvuorela/orgs","repos_url":"https://api.github.com/users/pvuorela/repos","events_url":"https://api.github.com/users/pvuorela/events{/privacy}","received_events_url":"https://api.github.com/users/pvuorela/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T13:17:07Z","updated_at":"2016-04-05T13:17:07Z","body":"Btw, selecting the \"approved\" text was quite an interesting detail, also on desktop PDF readers. "}}