summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-03-03 10:57:21 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-03-03 22:37:35 +0100
commitf92e15bc09def64a718b52812a9cb39e43fb8b5b (patch)
tree5448da27a291b2bd240f033facd0fb81322e5e15 /sc/source/ui/unoobj
parentdd6ff950cbc570a11100a7cce69d51577a26bbd7 (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/source/ui/unoobj')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index d75d1dba666a..f7bddf569605 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1624,8 +1624,7 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
{
// #i115266# copy behavior of old printing:
// treat multiple selection like a single selection with the enclosing range
- ScRange aMultiMarkArea;
- rMark.GetMultiMarkArea( aMultiMarkArea );
+ const ScRange& aMultiMarkArea = rMark.GetMultiMarkArea();
rMark.ResetMark();
rMark.SetMarkArea( aMultiMarkArea );
}
@@ -1858,8 +1857,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
if (lcl_renderSelectionToGraphic( bRenderToGraphic, aStatus))
{
assert( aMark.IsMarked());
- ScRange aRange;
- aMark.GetMarkArea( aRange );
+ const ScRange& aRange = aMark.GetMarkArea();
tools::Rectangle aMMRect( pDocShell->GetDocument().GetMMRect(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab()));
@@ -1943,7 +1941,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
}
else if ( aMark.IsMarked() )
{
- aMark.GetMarkArea( aRange );
+ aRange = aMark.GetMarkArea();
pSelRange = &aRange;
}
@@ -2132,7 +2130,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
else if ( aMark.IsMarked() )
{
- aMark.GetMarkArea( aRange );
+ aRange = aMark.GetMarkArea();
pSelRange = &aRange;
}