Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a09cb8fa authored by jing.zhao's avatar jing.zhao Committed by Jorge Ruesga
Browse files

CMFileManager: Printing preview content is not show complete.

fix the PageCount from int to double

Change-Id: I72f1577f22b563456b43dded4058572d328009c3
(cherry picked from commit ed63368d)
parent 21d641cc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -351,8 +351,8 @@ public final class PrintActionPolicy extends ActionsPolicy {
        }

        private int calculatePageCount(int rowsPerPage) {
            int pages = mAdjustedLines.size() / rowsPerPage;
            return pages <= 0 ? PrintDocumentInfo.PAGE_COUNT_UNKNOWN : pages;
            double pages = (double) mAdjustedLines.size() / rowsPerPage;
            return pages <= 0 ? PrintDocumentInfo.PAGE_COUNT_UNKNOWN : (int) Math.ceil(pages);
        }

        private int rowsPerPage(Rect pageContentRect) {