From 40f3a942448facb900b422d30f64b75d7cac7f0f Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Fri, 30 Oct 2015 13:58:47 -0400 Subject: tdf#39080 Hide Whitespace improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved the page resizing from SwLayoutFrm::Format to SwPageFrm::MakeAll and calculated the new page height more accurately based on the content (stolen from the browser-mode height calculation, to be refactored). This fixes issues with repagination with certain contents. Removed unnecessary ToggleLayoutMode calls and prevented clicking between pages in single-view mode to jump the cursor. Change-Id: I5662dd26efff66d6e95b8fd4dcf8564588adbbb7 Reviewed-on: https://gerrit.libreoffice.org/19699 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/uibase/uiview/view0.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sw/source/uibase/uiview/view0.cxx') diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 49c666e9d1f7..c762faa60e13 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -368,7 +368,6 @@ void SwView::ExecViewOptions(SfxRequest &rReq) int eState = STATE_TOGGLE; bool bSet = false; bool bBrowseModeChanged = false; - bool bHideWhitespaceModeChanged = false; const SfxItemSet *pArgs = rReq.GetArgs(); sal_uInt16 nSlot = rReq.GetSlot(); @@ -454,7 +453,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) case FN_VIEW_HIDE_WHITESPACE: if ( STATE_TOGGLE == eState ) bFlag = !pOpt->IsHideWhitespaceMode(); - bHideWhitespaceModeChanged = (bFlag != pOpt->IsHideWhitespaceMode()); + pOpt->SetHideWhitespaceMode(bFlag); break; @@ -578,7 +577,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) if( !(*rSh.GetViewOptions() == *pOpt )) { rSh.ApplyViewOptions( *pOpt ); - if( bBrowseModeChanged || bHideWhitespaceModeChanged ) + if( bBrowseModeChanged ) { GetDocShell()->ToggleLayoutMode(this); } -- cgit