Fix empty pages in print preview and lines printed twice
Summary:
There were errors if a page's last line is too long and needs to be
wrapped into two or more lines:
- The first line of the wrapped lines was printed correctly at the end of the page, but on the next page this first line was printed again.
- In print preview the first wrapped line was shown correctly at the end of the page, but the next and following pages were empty.
Reasons:
- remainder variable was always 0
- clipping was not reset
BUG: 348598
Test Plan:
In Kate, open a text file that has long lines. Check lines at page ends
which are wrapped to the next page. Check printing and print preview.
Reviewers: Kate, KTextEditor, dhaumann
Reviewed By: Kate, KTextEditor, dhaumann
Subscribers: cullmann, dhaumann, ngraham, kwrite-devel, kde-frameworks-devel
Tags: Kate, Frameworks
Differential Revision: https://phabricator.kde.org/D21563