summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/view0.cxx
diff options
context:
space:
mode:
authorAshod Nakashian <ashodnakashian@yahoo.com>2015-10-30 13:58:47 -0400
committerCaolán McNamara <caolanm@redhat.com>2015-11-10 11:51:58 +0000
commit40f3a942448facb900b422d30f64b75d7cac7f0f (patch)
tree7240b0ed0481f93af893739d7895d92f2d7121ec /sw/source/uibase/uiview/view0.cxx
parentcec647c42a07091d946723cdf711aa3b56d0b6cf (diff)
tdf#39080 Hide Whitespace improvements
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 <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/uiview/view0.cxx')
-rw-r--r--sw/source/uibase/uiview/view0.cxx5
1 files changed, 2 insertions, 3 deletions
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);
}