diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 14:46:21 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 14:46:21 +0000 |
commit | 5e251be26f5bf8ebbeda61b11266d8ca3c5a77a7 (patch) | |
tree | 9eadab0c6f269165564497fa8c55153a12133dfb /sd/source/ui/view | |
parent | d634b2c23cd99b22e43038f08f118b120a91aa6b (diff) |
INTEGRATION: CWS impress122 (1.15.48); FILE MERGED
2007/06/12 08:17:30 af 1.15.48.1: #i73014# Applied fix of printing cut pages.
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/PrintManager.cxx | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/sd/source/ui/view/PrintManager.cxx b/sd/source/ui/view/PrintManager.cxx index 68814353e1ce..94d8ef29ec8b 100644 --- a/sd/source/ui/view/PrintManager.cxx +++ b/sd/source/ui/view/PrintManager.cxx @@ -4,9 +4,9 @@ * * $RCSfile: PrintManager.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: rt $ $Date: 2007-04-03 16:27:36 $ + * last change: $Author: hr $ $Date: 2007-06-27 15:46:21 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1538,20 +1538,26 @@ void PrintManager::PrintStdOrNotes ( // For pages larger then the printable area there // are three options: // 1. Scale down to the page to the printable area. - // 2. Print only the upper left part of the page. + // 2. Print only the upper left part of the page + // (without the unprintable borders). // 3. Split the page into parts of the size of the // printable area. if (bPrint) { - if (bScalePage - || (rInfo.mpPrintOpts && rInfo.mpPrintOpts->GetOptionsPrint().IsCutPage())) + const bool bCutPage (rInfo.mpPrintOpts && rInfo.mpPrintOpts->GetOptionsPrint().IsCutPage()); + if (bScalePage || bCutPage) { - // Handlee 1 and 2. + // Handle 1 and 2. + + // if CutPage is set then do not move + // it, otherwise move the scaled page + // to printable area + PrintPagePart( rInfo, pPage, *pPrintView, - Point(0,0), + bCutPage ? Point(-aPageOfs.X(), -aPageOfs.Y()) : Point(0,0), bPrintMarkedOnly, aPageStr, aPageOfs); @@ -1561,7 +1567,12 @@ void PrintManager::PrintStdOrNotes ( // Handle 3. Print parts of the page in the // size of the printable area until the // whole page is covered. - Point aOrigin (-aPageOfs.X(), -aPageOfs.Y()); + + // keep the page content at its + // position if it fits, otherwise move + // it to the printable area + Point aOrigin (aPageWidth < aPrintWidth ? -aPageOfs.X() : 0, aPageHeight < aPrintHeight ? -aPageOfs.Y() : 0); + for (aPageOrigin = aOrigin; -aPageOrigin.Y()<aPageHeight; aPageOrigin.Y() -= aPrintHeight) |