summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2025-04-25 23:23:56 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2025-04-26 00:35:47 +0200
commite4fb32ffef1630ceaf5a0a77307e02ae93c9f8f4 (patch)
tree1667c3f752959c99f85df49c8a8178fb5edd78ee
parentd37739f961375a39845fa1449c323d18b788bffe (diff)
ScCornerButton: pass ScViewData by refHEADmaster
Change-Id: Id76186f6eb1d59f101273dc3d97fde1265c3e0ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184654 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sc/source/ui/inc/tabview.hxx4
-rw-r--r--sc/source/ui/view/tabview.cxx12
2 files changed, 8 insertions, 8 deletions
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 ),