sw/source/uibase/uiview/viewmdi.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
New commits: commit 4c29c7107ed45b777a63c4060340e03f54375391 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue May 30 14:49:22 2023 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue May 30 17:45:55 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> diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index b00cb475ea34..f07c25e2dfc1 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;