vcl/source/gdi/print3.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 305c064af40f54f45e06720f93d0e045caea9f3e
Author:     Justin Luth <[email protected]>
AuthorDate: Mon Oct 27 13:24:08 2025 -0400
Commit:     Justin Luth <[email protected]>
CommitDate: Mon Oct 27 21:17:21 2025 +0100

    add comment: 'vcl PrinterController: oversized? align top, not center'
    
    This was not a hard-and-fast calculation
    about where the top should start,
    so document this using arbitrary terms.
    
    Elsewhere in the code we can see
    that bFullPaper can shift by PageOffset,
    and since all the content is not going to fit anyway,
    just avoid any potential shift
    (since documents typically include a significant top margin anyway).
    
    bFullPaper is normally set to true (even on pages with empty content).
    
    Change-Id: I43a83e25a251cc6b66dfa46d7585332041ec0bf8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193048
    Reviewed-by: Justin Luth <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 0dba55e6f11a..1943ddc75941 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1203,6 +1203,7 @@ PrinterController::PageSize 
PrinterController::getFilteredPageFile( int i_nFilte
             const bool bHeigher = aPageSize.aSize.Height() > 
aPaperSize.Height();
             if (aPageSize.bFullPaper && bHeigher)
             {
+                // try to cram as much of the content onto the page as possible
                 Point aOffset(mpImplData->mxPrinter->GetPageOffset());
                 if (aPageSize.aSize.Height() - aPaperSize.Height() > 
aOffset.Y() * 2)
                     nDY = -aOffset.Y();

Reply via email to