Update ooo320-m1
[ooovba.git] / applied_patches / 0596-sd-print-fix-pageoffset.diff
blob52a33d84339bb2bc8b4c0e404afec024420fa496
1 diff -rup sd/source/ui/view-orig//PrintManager.cxx sd/source/ui/view/PrintManager.cxx
2 --- sd/source/ui/view-orig//PrintManager.cxx 2009-09-17 15:45:07.000000000 +0200
3 +++ sd/source/ui/view/PrintManager.cxx 2009-09-17 17:43:47.000000000 +0200
4 @@ -1610,15 +1610,18 @@ void PrintManager::PrintStdOrNotes (
6 else
8 + Point aOrigin;
10 + // if the printable area is bigger than page size, center the page
11 + if( aPageSize.Width() < aPrintWidth )
12 + aOrigin.X() = ( aPrintWidth - aPageSize.Width() )/2;
13 + if( aPageSize.Height() < aPrintHeight )
14 + aOrigin.Y() = ( aPrintHeight - aPageSize.Height() )/2;
16 // Handle 3. Print parts of the page in the
17 // size of the printable area until the
18 // whole page is covered.
20 - // keep the page content at its
21 - // position if it fits, otherwise move
22 - // it to the printable area
23 - Point aOrigin (aPageWidth < aPrintWidth ? -aPageOfs.X() : 0, aPageHeight < aPrintHeight ? -aPageOfs.Y() : 0);
25 for (aPageOrigin = aOrigin;
26 -aPageOrigin.Y()<aPageHeight;
27 aPageOrigin.Y() -= aPrintHeight)