Blob Blame History Raw
From 773d856c8ef2bf65aec25289cb0186d81d76f5f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 10 Feb 2011 12:46:34 +0000
Subject: [PATCH] Resolves: fdo#33750 #i94623# use optimal border width when zooming to optimal

---
 sw/source/ui/uiview/viewmdi.cxx |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 3310b83..28af9ca 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -123,15 +123,9 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
 
         if( SVX_ZOOM_OPTIMAL == eZoomType )
         {
-            if (pPostItMgr->HasNotes() && pPostItMgr->ShowNotes())
-            {
-                lLeftMargin = long(rLRSpace.GetLeft()) + aPageRect.Left() + nLeftOfst;
-            }
-            else
-            {
+            if (!pPostItMgr->HasNotes() || !pPostItMgr->ShowNotes())
                 aPageSize.Width() -= ( rLRSpace.GetLeft() + rLRSpace.GetRight() + nLeftOfst * 2 );
-                lLeftMargin = long(rLRSpace.GetLeft()) + aPageRect.Left() + nLeftOfst;
-            }
+            lLeftMargin = long(rLRSpace.GetLeft()) + DOCUMENTBORDER + nLeftOfst;
             nFac = aWindowSize.Width() * 100 / aPageSize.Width();
         }
         else if(SVX_ZOOM_WHOLEPAGE == eZoomType || SVX_ZOOM_PAGEWIDTH == eZoomType )
-- 
1.7.4