From bf17db716f4ecaf28c2a0797bf90c9b0731015d6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 15 Jan 2020 09:25:23 +0200 Subject: tdf#129393 Calc: cannot format whole row of unprotected cells regression from commit 3c3a371c799d00475deb13b4c3e0a8860c7e4fb3 tdf#125254 Performance: A spreadsheet opens too slow, part2 Change-Id: I87e06a58d6a4eb1a32bdf7e9267a4fe9d6dc4f2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86826 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/core/data/markdata.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'sc') diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx index 3d730065dd2f..6b8a99eb5237 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -335,10 +335,18 @@ ScMarkData::ScMarkData(SCROW nMaxRow, SCCOL nMaxCol, const ScRangeList& rList) for (const ScRange& rRange : rList) maTabMarked.insert( rRange.aStart.Tab() ); - bMultiMarked = true; - aMultiRange = rList.Combine(); + if (rList.size() > 1) + { + bMultiMarked = true; + aMultiRange = rList.Combine(); - aMultiSel.Set( ScSheetLimits(mnMaxCol, mnMaxRow), rList ); + aMultiSel.Set( ScSheetLimits(mnMaxCol, mnMaxRow), rList ); + } + else if (rList.size() == 1) + { + const ScRange& rRange = rList[ 0 ]; + SetMarkArea( rRange ); + } } -- cgit