[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 18 09:00:46 PDT 2012
sc/source/core/data/conditio.cxx | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
New commits:
commit e12546da1a88ecef130a3a6842820bc7ebb2a851
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Sep 18 14:44:21 2012 +0200
shrink to used area for duplicate codn format, fdo#54349
Change-Id: Ie0cce19c3ea2132d94a227cd051090573054b369
Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index aad6019..7a345ed 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;
More information about the Libreoffice-commits
mailing list