[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 2 commits - include/vcl vcl/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 7 12:34:58 UTC 2020


 include/vcl/tabpage.hxx       |    2 --
 vcl/source/window/tabpage.cxx |   11 ++++-------
 2 files changed, 4 insertions(+), 9 deletions(-)

New commits:
commit e2737d875079a5106e5645063fbdfb0ed7ea1d18
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Nov 24 08:59:11 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Dec 7 13:34:39 2020 +0100

    Remove unused ScrollBarBox from tabpage
    
    This displays an empty rectangle at the upper left of the tabpage.
    
    Change-Id: I8424a3f8ec4896814b135aa2c86012f0b33ee1be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106479
    Tested-by: Michael Weghorn <m.weghorn at posteo.de>
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107139
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx
index 7a57ad17d4bd..f65ba389245d 100644
--- a/include/vcl/tabpage.hxx
+++ b/include/vcl/tabpage.hxx
@@ -27,7 +27,6 @@
 #include <vcl/IContext.hxx>
 
 class ScrollBar;
-class ScrollBarBox;
 
 class VCL_DLLPUBLIC TabPage
     : public vcl::Window
@@ -43,7 +42,6 @@ private:
 
     VclPtr<ScrollBar>    m_pVScroll;
     VclPtr<ScrollBar>    m_pHScroll;
-    VclPtr<ScrollBarBox> m_aScrollBarBox;
     Size                 maScrollArea;
     bool                 mbHasHoriBar;
     bool                 mbHasVertBar;
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 335e2fd69d23..659aa15da39f 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -62,10 +62,6 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle )
 
     if ( mbHasHoriBar || mbHasVertBar )
     {
-        m_aScrollBarBox.set(
-            VclPtr<ScrollBarBox>::Create(this,
-                                         ((nStyle & (WB_VSCROLL|WB_HSCROLL)) ? WB_HIDE : 0)));
-        m_aScrollBarBox->Show();
         SetStyle( GetStyle() | WB_CLIPCHILDREN );
     }
 
@@ -130,7 +126,6 @@ void TabPage::dispose()
     disposeBuilder();
     m_pVScroll.disposeAndClear();
     m_pHScroll.disposeAndClear();
-    m_aScrollBarBox.disposeAndClear();
     vcl::Window::dispose();
 }
 
commit cbdc3ee3b1616101bf692799105307690271617d
Author:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Fri Nov 20 14:38:08 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Dec 7 13:34:20 2020 +0100

    Fix tdf#138373 scrollbars can now actually be nullptr
    
    Change-Id: I224969de51a1d7e0176facb503a5b27cd8da530c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106263
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107138

diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index d5f220a7b1b6..335e2fd69d23 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -284,7 +284,8 @@ void TabPage::SetScrollTop( long nTop )
 {
     Point aOld = mnScrollPos;
     lcl_Scroll( mnScrollPos.X() , mnScrollPos.Y() - nTop );
-    m_pHScroll->SetThumbPos( 0 );
+    if( m_pHScroll )
+        m_pHScroll->SetThumbPos( 0 );
     // new pos is 0,0
     mnScrollPos = aOld;
 }
@@ -292,7 +293,8 @@ void TabPage::SetScrollLeft( long nLeft )
 {
     Point aOld = mnScrollPos;
     lcl_Scroll( mnScrollPos.X() - nLeft , mnScrollPos.Y() );
-    m_pVScroll->SetThumbPos( 0 );
+    if( m_pVScroll )
+        m_pVScroll->SetThumbPos( 0 );
     // new pos is 0,0
     mnScrollPos = aOld;
 }


More information about the Libreoffice-commits mailing list