diff options
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/uiview/pview.cxx | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 9dbe51f0749f..ccb10ee21ec6 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -309,18 +309,21 @@ void ScPreviewShell::UpdateScrollBars() // page smaller than window -> center (but put scrollbar to 0) aOfs.X() = 0; pPreview->SetXOffset( nMaxPos / 2 ); + pHorScroll->Show( sal_False ); } else if (aOfs.X() < 0) { // page larger than window -> never use negative offset aOfs.X() = 0; pPreview->SetXOffset( 0 ); + pHorScroll->Show( sal_True ); } else if (aOfs.X() > nMaxPos) { // limit offset to align with right edge of window aOfs.X() = nMaxPos; pPreview->SetXOffset(nMaxPos); + pHorScroll->Show( sal_True ); } pHorScroll->SetThumbPos( aOfs.X() ); } diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index ae2e1d75b5e3..b37baea376bb 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1666,10 +1666,13 @@ void SwPagePreView::ScrollViewSzChg() if(rDocRect.GetWidth() < rPreviewSize.Width()) { + pHScrollbar->Show( sal_True ); nVisWidth = rDocRect.GetWidth(); nThumb = rDocRect.Left(); aRange = Range(0, rPreviewSize.Width()); } + else + pHScrollbar->Show( sal_False ); pHScrollbar->SetRange( aRange ); pHScrollbar->SetVisibleSize( nVisWidth ); pHScrollbar->SetThumbPos( nThumb ); |