sw/source/uibase/uiview/viewmdi.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
New commits: commit 10c79e145477e7a247c491756e5cd8ae0317ddaa Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue May 30 14:49:22 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed May 31 10:15:50 2023 +0200 sw: SwView::SetZoom_() shouldn't subtract page margins In the PAGEWIDTH mode, this has the annoying habit of changing the zoom factor when moving the cursor between a page with a mirrored page style and a page with a non-mirrored page style. Change-Id: I0e4290432ebaa5012b10d896fc96ae53b39fa475 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152391 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 0c1aa15d05cc52e3f2b34d0ccc9fc47bcf2f379b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152329 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index f2c9ad63034a..932d80b70250 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -121,14 +121,15 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType, const MapMode aTmpMap( MapUnit::MapTwip ); const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) ); - if( UseOnPage::Mirror == rDesc.GetUseOn() ) // mirrored pages - { - const SvxLRSpaceItem &rLeftLRSpace = rDesc.GetLeft().GetLRSpace(); - aPageSize.AdjustWidth(std::abs( rLeftLRSpace.GetLeft() - rLRSpace.GetLeft() ) ); - } - if( SvxZoomType::OPTIMAL == eZoomType ) { + // unclear if this is useful for OPTIMAL, or completely useless? + if( UseOnPage::Mirror == rDesc.GetUseOn() ) // mirrored pages + { + const SvxLRSpaceItem &rLeftLRSpace = rDesc.GetLeft().GetLRSpace(); + aPageSize.AdjustWidth(std::abs( rLeftLRSpace.GetLeft() - rLRSpace.GetLeft() ) ); + } + if (!pPostItMgr->HasNotes() || !pPostItMgr->ShowNotes()) aPageSize.AdjustWidth( -( rLRSpace.GetLeft() + rLRSpace.GetRight() + nLeftOfst * 2 ) ); lLeftMargin = rLRSpace.GetLeft() + DOCUMENTBORDER + nLeftOfst;