1 --- sd/source/ui/inc/Window.hxx 2008-04-10 22:56:52.000000000 +0200
2 +++ sd/source/ui/inc/Window.hxx 2008-05-01 03:51:10.000000000 +0200
4 ::sd::Window* mpShareWin;
9 + Size maPrevSize; // contains previous window size in logical coords
12 /** This flag tells whether to re-calculate the minimal zoom factor
13 --- sd/source/ui/view/sdwindow.cxx 2008-04-11 01:19:01.000000000 +0200
14 +++ sd/source/ui/view/sdwindow.cxx 2008-05-01 03:50:12.000000000 +0200
16 maWinPos(0, 0), // vorsichtshalber; die Werte sollten aber
17 maViewOrigin(0, 0), // vom Besitzer des Fensters neu gesetzt
18 maViewSize(1000, 1000), // werden
22 mbMinZoomAutoCalc(false),
24 aMap.SetScaleY(Fraction(nZoom, 100));
27 + // invalidate previous size - it was relative to the old scaling
28 + maPrevSize = Size(-1,-1);
30 // Update the map mode's origin (to what effect?).
35 void Window::UpdateMapOrigin(BOOL bInvalidate)
37 - BOOL bChanged = FALSE;
38 - Size aWinSize = PixelToLogic(GetOutputSizePixel());
39 + BOOL bChanged = FALSE;
40 + const Size aWinSize = PixelToLogic(GetOutputSizePixel());
42 if ( mbCenterAllowed )
44 + if( maPrevSize != Size(-1,-1) )
46 + // keep view centered around current pos, when window
48 + maWinPos.X() -= (aWinSize.Width() - maPrevSize.Width()) / 2;
49 + maWinPos.Y() -= (aWinSize.Height() - maPrevSize.Height()) / 2;
53 if ( maWinPos.X() > maViewSize.Width() - aWinSize.Width() )
55 maWinPos.X() = maViewSize.Width() - aWinSize.Width();
60 + maPrevSize = aWinSize;
62 if (bChanged && bInvalidate)