diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-09-18 14:44:21 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-09-21 15:16:02 +0200 |
commit | 1d803422af63589699a3d78a506fd46a765e8a01 (patch) | |
tree | 306f30b082b03d783f4f1a1ce06b9bc29533f8dc | |
parent | use correct cell for broadcasting, fdo#55059 (diff) | |
download | core-1d803422af63589699a3d78a506fd46a765e8a01.tar.gz core-1d803422af63589699a3d78a506fd46a765e8a01.zip |
shrink to used area for duplicate codn format, fdo#54349
Change-Id: Ie0cce19c3ea2132d94a227cd051090573054b369
Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Signed-off-by: Michael Meeks <michael.meeks@suse.com>
Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
-rw-r--r-- | sc/source/core/data/conditio.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index aad60197dda5..7a345ed254b2 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -774,8 +774,21 @@ static bool lcl_IsDuplicate( ScDocument *pDoc, double nArg, const String& rStr, const ScRange *aRange = rRanges[i]; SCROW nRow = aRange->aEnd.Row(); SCCOL nCol = aRange->aEnd.Col(); - for( SCROW r = aRange->aStart.Row(); r <= nRow; r++ ) - for( SCCOL c = aRange->aStart.Col(); c <= nCol; c++ ) + SCCOL nColStart = aRange->aStart.Col(); + SCROW nRowStart = aRange->aEnd.Row(); + SCTAB nTab = aRange->aStart.Tab(); + + // temporary fix to workaorund slow duplicate entry + // conditions, prevent to use a whole row + if(nRow == MAXROW) + { + bool bShrunk = false; + pDoc->ShrinkToUsedDataArea(bShrunk, nTab, nColStart, nRowStart, + nCol, nRow, false); + } + + for( SCROW r = nRowStart; r <= nRow; r++ ) + for( SCCOL c = nColStart; c <= nCol; c++ ) { double nVal = 0.0; ScBaseCell *pCell = NULL; |