sw/inc/view.hxx | 3 --- sw/source/uibase/inc/pview.hxx | 2 -- sw/source/uibase/uiview/pview.cxx | 8 ++------ sw/source/uibase/uiview/view.cxx | 3 --- sw/source/uibase/uiview/viewfunc.hxx | 1 - sw/source/uibase/uiview/viewport.cxx | 8 ++------ 6 files changed, 4 insertions(+), 21 deletions(-)
New commits: commit c473a34d77968fc9fad49f0c2539d37da4709fce Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Aug 8 09:37:26 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Aug 8 14:56:02 2022 +0200 no need for ScrollBarBox when bg is already the desired color Change-Id: Id9dd4d4e3ba2c0b0a335fc9f8b1892cd70daf010 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137945 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index fe45f38f215d..33847fcb93d9 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -205,9 +205,6 @@ class SW_DLLPUBLIC SwView: public SfxViewShell bool m_bHScrollbarEnabled; bool m_bVScrollbarEnabled; - VclPtr<vcl::Window> m_pScrollFill; // dummy window for filling the lower right edge - // when both scrollbars are active - VclPtr<SvxRuler> m_pHRuler, m_pVRuler; diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index bc78b3c1e156..f37a55863bb8 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -179,8 +179,6 @@ class SW_DLLPUBLIC SwPagePreview final : public SfxViewShell VclPtr<SwScrollbar> m_pVScrollbar; bool mbHScrollbarEnabled : 1; bool mbVScrollbarEnabled : 1; - // dummy window for filling the lower right edge when both scrollbars are active - VclPtr<vcl::Window> m_pScrollFill; sal_uInt16 mnPageCount; bool m_bNormalPrint; diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 9b198f4389ee..6a5eb147e28d 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -22,7 +22,6 @@ #include <sfx2/objface.hxx> #include <vcl/help.hxx> #include <vcl/commandevent.hxx> -#include <vcl/scrbar.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <vcl/syswin.hxx> @@ -1143,7 +1142,6 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): m_sPageStr(SwResId(STR_PAGE)), m_pHScrollbar(nullptr), m_pVScrollbar(nullptr), - m_pScrollFill(VclPtr<ScrollBarBox>::Create( &pViewFrame->GetWindow(), WB_SIZEABLE )), mnPageCount( 0 ), mbResetFormDesignMode( false ), mbFormDesignModeToReset( false ) @@ -1219,7 +1217,6 @@ SwPagePreview::~SwPagePreview() delete pVShell; m_pViewWin.disposeAndClear(); - m_pScrollFill.disposeAndClear(); m_pHScrollbar.disposeAndClear(); m_pVScrollbar.disposeAndClear(); } @@ -1308,7 +1305,7 @@ void SwPagePreview::InnerResizePixel( const Point &rOfst, const Size &rSize, bo aRect += aBorder; ViewResizePixel( *m_pViewWin->GetOutDev(), aRect.TopLeft(), aRect.GetSize(), m_pViewWin->GetOutputSizePixel(), - *m_pVScrollbar, *m_pHScrollbar, *m_pScrollFill ); + *m_pVScrollbar, *m_pHScrollbar ); // Never set EditWin ! // Never set VisArea ! @@ -1336,7 +1333,7 @@ void SwPagePreview::OuterResizePixel( const Point &rOfst, const Size &rSize ) SvBorder aBorderNew; CalcAndSetBorderPixel( aBorderNew ); ViewResizePixel( *m_pViewWin->GetOutDev(), rOfst, rSize, m_pViewWin->GetOutputSizePixel(), - *m_pVScrollbar, *m_pHScrollbar, *m_pScrollFill ); + *m_pVScrollbar, *m_pHScrollbar ); } void SwPagePreview::SetVisArea( const tools::Rectangle &rRect ) @@ -1632,7 +1629,6 @@ void SwPagePreview::ScrollViewSzChg() ShowHScrollbar(bShowHScrollbar); } - m_pScrollFill->Show(bShowVScrollbar && bShowHScrollbar); } void SwPagePreview::ScrollDocSzChg() diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 6d541096a5a4..9fa0064386e6 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -32,7 +32,6 @@ #include <officecfg/Office/Common.hxx> #include <vcl/graph.hxx> #include <vcl/inputctx.hxx> -#include <vcl/scrbar.hxx> #include <svl/eitem.hxx> #include <unotools/configmgr.hxx> #include <unotools/lingucfg.hxx> @@ -724,7 +723,6 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_pFormShell(nullptr), m_pHScrollbar(nullptr), m_pVScrollbar(nullptr), - m_pScrollFill(VclPtr<ScrollBarBox>::Create( &_pFrame->GetWindow(), WB_SIZEABLE )), m_pVRuler(VclPtr<SvxRuler>::Create(&GetViewFrame()->GetWindow(), m_pEditWin, SvxRulerSupportFlags::TABS | SvxRulerSupportFlags::PARAGRAPH_MARGINS_VERTICAL| SvxRulerSupportFlags::BORDERS | SvxRulerSupportFlags::REDUCED_METRIC, @@ -1113,7 +1111,6 @@ SwView::~SwView() m_pViewImpl->Invalidate(); EndListening(*GetViewFrame()); EndListening(*GetDocShell()); - m_pScrollFill.disposeAndClear(); m_pWrtShell.reset(); // reset here so that it is not accessible by the following dtors. m_pHScrollbar.disposeAndClear(); m_pVScrollbar.disposeAndClear(); diff --git a/sw/source/uibase/uiview/viewfunc.hxx b/sw/source/uibase/uiview/viewfunc.hxx index c9d300039127..38320f6f39aa 100644 --- a/sw/source/uibase/uiview/viewfunc.hxx +++ b/sw/source/uibase/uiview/viewfunc.hxx @@ -45,7 +45,6 @@ void ViewResizePixel( const vcl::RenderContext &rRef, const Size &rEditSz, SwScrollbar& rVScrollbar, SwScrollbar& rHScrollbar, - vcl::Window& rScrollBarBox, SvxRuler* pVRuler = nullptr, SvxRuler* pHRuler = nullptr, bool bVRulerRight = false ); diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index e2fbefaabb2a..7a62667570b9 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -847,7 +847,6 @@ void ViewResizePixel( const vcl::RenderContext &rRef, const Size &rEditSz, SwScrollbar& rVScrollbar, SwScrollbar& rHScrollbar, - vcl::Window& rScrollBarBox, SvxRuler* pVRuler, SvxRuler* pHRuler, bool bVRulerRight ) @@ -935,8 +934,6 @@ void ViewResizePixel( const vcl::RenderContext &rRef, aScrollFillPos.setX( aPos.X() ); } - - rScrollBarBox.SetPosSizePixel(aScrollFillPos, Size(nVBSzWidth, nHBSzHeight)); } void SwView::ShowAtResize() @@ -987,7 +984,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize, bool ) Size aEditSz( GetEditWin().GetOutputSizePixel() ); ViewResizePixel( *GetEditWin().GetOutDev(), rOfst, aSz, aEditSz, *m_pVScrollbar, - *m_pHScrollbar, *m_pScrollFill, m_pVRuler, m_pHRuler, + *m_pHScrollbar, m_pVRuler, m_pHRuler, m_pWrtShell->GetViewOptions()->IsVRulerRight()); if ( m_bShowAtResize ) ShowAtResize(); @@ -1083,7 +1080,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) CalcAndSetBorderPixel( aBorder ); const Size aEditSz( GetEditWin().GetOutputSizePixel() ); ViewResizePixel( *GetEditWin().GetOutDev(), rOfst, rSize, aEditSz, *m_pVScrollbar, - *m_pHScrollbar, *m_pScrollFill, m_pVRuler, m_pHRuler, + *m_pHScrollbar, m_pVRuler, m_pHRuler, m_pWrtShell->GetViewOptions()->IsVRulerRight() ); if ( m_bShowAtResize ) ShowAtResize(); @@ -1185,7 +1182,6 @@ bool SwView::UpdateScrollbars() m_pHScrollbar->ViewPortChgd( aTmpRect ); if ( bHScrollVisible != m_pHScrollbar->IsScrollbarVisible(true) ) bRet = true; - m_pScrollFill->Show(m_pHScrollbar->IsScrollbarVisible(true) && m_pVScrollbar->IsScrollbarVisible(true) ); } } return bRet;