summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column3.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-27 16:05:38 +0200
committerEike Rathke <erack@redhat.com>2018-03-27 21:22:31 +0200
commitf4f1654c07ec58bc36d824e9434ab851b7900e9f (patch)
tree4978137029f28713204021a14394cdb0d1d1662f /sc/source/core/data/column3.cxx
parent1bf2ed44a18666843d6c1b4a92966fd78cda07bf (diff)
tdf#106667 Hang when trying to open a dialog and the whole sheet is selected
regression from commit 8d54796bf152499ecbe61788be64c9035f725dfa (patch) enhance pass-by-ref plugin to detect large arguments which converted this peice of code into an O(n^2) loop Change-Id: I0473a084518c0d10411615e1b3901b9b90144bc9 Reviewed-on: https://gerrit.libreoffice.org/51956 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc/source/core/data/column3.cxx')
-rw-r--r--sc/source/core/data/column3.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index b3a01a4737f3..2907532f961e 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -502,7 +502,7 @@ void ScColumn::BroadcastNewCell( SCROW nRow )
Broadcast(nRow);
}
-bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, const sc::CellStoreType::iterator& itr )
+bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, sc::CellStoreType::iterator& itr )
{
if (rAttr.mnScriptType != SvtScriptType::UNKNOWN)
// Already updated. Nothing to do.
@@ -515,9 +515,9 @@ bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, const sc::
return false;
sc::CellStoreType::position_type pos = maCells.position(itr, nRow);
- sc::CellStoreType::iterator itr2 = pos.first;
+ itr = pos.first;
size_t nOffset = pos.second;
- ScRefCellValue aCell = GetCellValue( itr2, nOffset );
+ ScRefCellValue aCell = GetCellValue( itr, nOffset );
ScAddress aPos(nCol, nRow, nTab);
ScDocument* pDocument = GetDoc();