Kaydet (Commit) 2c933f90 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

shrink to used area for duplicate codn format, fdo#54349

Change-Id: Ie0cce19c3ea2132d94a227cd051090573054b369
üst f5b299e6
...@@ -768,8 +768,21 @@ static bool lcl_IsDuplicate( ScDocument *pDoc, double nArg, const String& rStr, ...@@ -768,8 +768,21 @@ static bool lcl_IsDuplicate( ScDocument *pDoc, double nArg, const String& rStr,
const ScRange *aRange = rRanges[i]; const ScRange *aRange = rRanges[i];
SCROW nRow = aRange->aEnd.Row(); SCROW nRow = aRange->aEnd.Row();
SCCOL nCol = aRange->aEnd.Col(); SCCOL nCol = aRange->aEnd.Col();
for( SCROW r = aRange->aStart.Row(); r <= nRow; r++ ) SCCOL nColStart = aRange->aStart.Col();
for( SCCOL c = aRange->aStart.Col(); c <= nCol; c++ ) 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; double nVal = 0.0;
ScBaseCell *pCell = NULL; ScBaseCell *pCell = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment