From 27513d4df50f6d18b585f4cbec6a4dd3f9b432cc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 4 Nov 2016 13:37:06 +0200 Subject: loplugin:expandablemethods in sc Change-Id: Ib417c5e978fca563f8c0ef0dbe6b9d50fead9828 Reviewed-on: https://gerrit.libreoffice.org/30566 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/docshell/editable.cxx | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'sc/source/ui/docshell/editable.cxx') diff --git a/sc/source/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx index aab817d0d04e..05d4f19ebc89 100644 --- a/sc/source/ui/docshell/editable.cxx +++ b/sc/source/ui/docshell/editable.cxx @@ -64,7 +64,13 @@ ScEditableTester::ScEditableTester( ScViewFunc* pView ) : mbIsEditable(true), mbOnlyMatrix(true) { - TestView( pView ); + bool bThisMatrix; + if ( !pView->SelectionEditable( &bThisMatrix ) ) + { + mbIsEditable = false; + if ( !bThisMatrix ) + mbOnlyMatrix = false; + } } void ScEditableTester::TestBlock( ScDocument* pDoc, SCTAB nTab, @@ -118,20 +124,6 @@ void ScEditableTester::TestSelection( ScDocument* pDoc, const ScMarkData& rMark } } -void ScEditableTester::TestView( ScViewFunc* pView ) -{ - if (mbIsEditable || mbOnlyMatrix) - { - bool bThisMatrix; - if ( !pView->SelectionEditable( &bThisMatrix ) ) - { - mbIsEditable = false; - if ( !bThisMatrix ) - mbOnlyMatrix = false; - } - } -} - sal_uInt16 ScEditableTester::GetMessageId() const { if (mbIsEditable) -- cgit v1.2.3