sc/source/ui/inc/tabview.hxx  |    4 ++--
 sc/source/ui/view/tabview.cxx |   12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit e4fb32ffef1630ceaf5a0a77307e02ae93c9f8f4
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Apr 25 23:23:56 2025 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Sat Apr 26 00:35:47 2025 +0200

    ScCornerButton: pass ScViewData by ref
    
    Change-Id: Id76186f6eb1d59f101273dc3d97fde1265c3e0ec
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184654
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index b876fd25d60f..54ca1cde3403 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -66,14 +66,14 @@ enum HeaderType
 class ScCornerButton : public vcl::Window
 {
 private:
-    ScViewData*     pViewData;
+    ScViewData&     rViewData;
 
 protected:
     virtual void    Paint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect ) override;
     virtual void    Resize() override;
     virtual void    MouseButtonDown( const MouseEvent& rMEvt ) override;
 public:
-                    ScCornerButton( vcl::Window* pParent, ScViewData* pData );
+                    ScCornerButton( vcl::Window* pParent, ScViewData& pData );
                     virtual ~ScCornerButton() override;
 
     virtual void    StateChanged( StateChangedType nType ) override;
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 1b219878411d..652e6b5a244f 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -76,9 +76,9 @@ using namespace ::com::sun::star;
 
 //  Corner-Button
 
-ScCornerButton::ScCornerButton( vcl::Window* pParent, ScViewData* pData ) :
+ScCornerButton::ScCornerButton( vcl::Window* pParent, ScViewData& rData ) :
     Window( pParent, WinBits( 0 ) ),
-    pViewData( pData )
+    rViewData( rData )
 {
     ScCornerButton::EnableRTL( false );
     SetQuickHelpText(ScResId(SCSTR_QHELP_SELECT_ALL_CELLS));
@@ -99,7 +99,7 @@ void ScCornerButton::Paint(vcl::RenderContext& 
rRenderContext, const tools::Rect
 
     Window::Paint(rRenderContext, rRect);
 
-    bool bLayoutRTL = pViewData->GetDocument().IsLayoutRTL( 
pViewData->GetTabNo() );
+    bool bLayoutRTL = rViewData.GetDocument().IsLayoutRTL( 
rViewData.GetTabNo() );
     tools::Long nDarkX = bLayoutRTL ? 0 : nPosX;
 
     //  both buttons have the same look now - only dark right/bottom lines
@@ -137,7 +137,7 @@ void ScCornerButton::MouseButtonDown( const MouseEvent& 
rMEvt )
     bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
     if (!bDisable)
     {
-        ScTabViewShell* pViewSh = pViewData->GetViewShell();
+        ScTabViewShell* pViewSh = rViewData.GetViewShell();
         pViewSh->SetActive();                                   // Appear and 
SetViewFrame
         pViewSh->ActiveGrabFocus();
 
@@ -183,8 +183,8 @@ ScTabView::ScTabView( vcl::Window* pParent, ScDocShell& 
rDocSh, ScTabViewShell*
     aVScrollBottom( VclPtr<ScrollAdaptor>::Create( pFrameWin, false ) ),
     aHScrollLeft( VclPtr<ScrollAdaptor>::Create( pFrameWin, true ) ),
     aHScrollRight( VclPtr<ScrollAdaptor>::Create( pFrameWin, true ) ),
-    aCornerButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData ) ),
-    aTopButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData ) ),
+    aCornerButton( VclPtr<ScCornerButton>::Create( pFrameWin, aViewData ) ),
+    aTopButton( VclPtr<ScCornerButton>::Create( pFrameWin, aViewData ) ),
     aScrollTimer("ScTabView aScrollTimer"),
     pTimerWindow( nullptr ),
     aExtraEditViewManager( pViewShell, pGridWin ),

Reply via email to