summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-15 09:25:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-15 11:25:52 +0100
commit22432848e99fddca20168f7637bbf3c579eea601 (patch)
treee2067953956c1c22dbaaa151865483a627fda3a2
parentoox: add missing nullptr checks (diff)
downloadcore-22432848e99fddca20168f7637bbf3c579eea601.tar.gz
core-22432848e99fddca20168f7637bbf3c579eea601.zip
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 <noel.grandin@collabora.co.uk> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86831
-rw-r--r--sc/source/core/data/markdata.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 60e7db0fb0ca..e37378d5b73e 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -366,10 +366,17 @@ ScMarkData::ScMarkData(const ScRangeList& rList)
for (const ScRange& rRange : rList)
maTabMarked.insert( rRange.aStart.Tab() );
- bMultiMarked = true;
- aMultiRange = rList.Combine();
-
- aMultiSel.Set( rList );
+ if (rList.size() > 1)
+ {
+ bMultiMarked = true;
+ aMultiRange = rList.Combine();
+ aMultiSel.Set( rList );
+ }
+ else if (rList.size() == 1)
+ {
+ const ScRange& rRange = rList[ 0 ];
+ SetMarkArea( rRange );
+ }
}