diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-03-03 10:57:21 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-03-03 22:37:35 +0100 |
commit | f92e15bc09def64a718b52812a9cb39e43fb8b5b (patch) | |
tree | 5448da27a291b2bd240f033facd0fb81322e5e15 /sc/qa/extras | |
parent | dd6ff950cbc570a11100a7cce69d51577a26bbd7 (diff) |
improve ScMark* classes a bit
Bin pointless empty destructors, make trivial functions inline,
return value by simply returning it.
Change-Id: Ia71e73262802bbe6b022ca4bafb2b958ffdf39f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130915
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/qa/extras')
-rw-r--r-- | sc/qa/extras/vba-macro-test.cxx | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/sc/qa/extras/vba-macro-test.cxx b/sc/qa/extras/vba-macro-test.cxx index a611e9f5cc08..bd2ebe1702e4 100644 --- a/sc/qa/extras/vba-macro-test.cxx +++ b/sc/qa/extras/vba-macro-test.cxx @@ -303,12 +303,7 @@ void VBAMacroTest::testSelectAllChaged() ScTabViewShell* pView = pDocSh->GetBestViewShell(false); CPPUNIT_ASSERT(pView != nullptr); auto const& pViewData = pView->GetViewData(); - - { - ScRange aRange; - pViewData.GetMarkData().GetMarkArea(aRange); - CPPUNIT_ASSERT_EQUAL(ScRange(), aRange); - } + CPPUNIT_ASSERT_EQUAL(ScRange(), pViewData.GetMarkData().GetMarkArea()); uno::Any aRet; uno::Sequence<sal_Int16> aOutParamIndex; @@ -320,12 +315,8 @@ void VBAMacroTest::testSelectAllChaged() "language=Basic&location=document", aParams, aRet, aOutParamIndex, aOutParam); - { - ScRange aRange; - pViewData.GetMarkData().GetMarkArea(aRange); - // A1:E1048576 - CPPUNIT_ASSERT_EQUAL(ScRange(0, 0, 0, 4, MAXROW, 0), aRange); - } + // A1:E1048576 + CPPUNIT_ASSERT_EQUAL(ScRange(0, 0, 0, 4, MAXROW, 0), pViewData.GetMarkData().GetMarkArea()); } void VBAMacroTest::testRangeSelect() @@ -344,12 +335,7 @@ void VBAMacroTest::testRangeSelect() ScTabViewShell* pView = pDocSh->GetBestViewShell(false); CPPUNIT_ASSERT(pView != nullptr); auto const& pViewData = pView->GetViewData(); - - { - ScRange aRange; - pViewData.GetMarkData().GetMarkArea(aRange); - CPPUNIT_ASSERT_EQUAL(ScRange(), aRange); - } + CPPUNIT_ASSERT_EQUAL(ScRange(), pViewData.GetMarkData().GetMarkArea()); uno::Any aRet; uno::Sequence<sal_Int16> aOutParamIndex; @@ -361,12 +347,8 @@ void VBAMacroTest::testRangeSelect() "language=Basic&location=document", aParams, aRet, aOutParamIndex, aOutParam); - { - ScRange aRange; - pViewData.GetMarkData().GetMarkArea(aRange); - // B2:E5 - CPPUNIT_ASSERT_EQUAL(ScRange(1, 1, 0, 4, 1, 0), aRange); - } + // B2:E5 + CPPUNIT_ASSERT_EQUAL(ScRange(1, 1, 0, 4, 1, 0), pViewData.GetMarkData().GetMarkArea()); } void VBAMacroTest::testWindowState() |