Kaydet (Commit) 8893a361 authored tarafından Albert Thuswaldner's avatar Albert Thuswaldner Kaydeden (comit) Caolán McNamara

Translated german commments in sc/source/core/data/table1-3.cxx

Change-Id: Ic28cb4f9371caf39e783f39fd8a117260b962bfe
Reviewed-on: https://gerrit.libreoffice.org/14451Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3743302f
...@@ -86,15 +86,15 @@ void GetOptimalHeightsInColumn( ...@@ -86,15 +86,15 @@ void GetOptimalHeightsInColumn(
{ {
SCSIZE nCount = static_cast<SCSIZE>(nEndRow-nStartRow+1); SCSIZE nCount = static_cast<SCSIZE>(nEndRow-nStartRow+1);
// zuerst einmal ueber den ganzen Bereich // first, one time over the whole range
// (mit der letzten Spalte in der Hoffnung, dass die am ehesten noch auf // (with the last column in the hope that they most likely still are
// Standard formatiert ist) // on standard format)
std::vector<sal_uInt16>& rHeights = rCxt.getHeightArray(); std::vector<sal_uInt16>& rHeights = rCxt.getHeightArray();
pCol[MAXCOL].GetOptimalHeight(rCxt, nStartRow, nEndRow, 0, 0); pCol[MAXCOL].GetOptimalHeight(rCxt, nStartRow, nEndRow, 0, 0);
// daraus Standardhoehe suchen, die im unteren Bereich gilt // from there search for the standard height that is in use in the lower part
sal_uInt16 nMinHeight = rHeights[nCount-1]; sal_uInt16 nMinHeight = rHeights[nCount-1];
SCSIZE nPos = nCount-1; SCSIZE nPos = nCount-1;
...@@ -103,14 +103,14 @@ void GetOptimalHeightsInColumn( ...@@ -103,14 +103,14 @@ void GetOptimalHeightsInColumn(
SCROW nMinStart = nStartRow + nPos; SCROW nMinStart = nStartRow + nPos;
sal_uLong nWeightedCount = 0; sal_uLong nWeightedCount = 0;
for (SCCOL nCol=0; nCol<MAXCOL; nCol++) // MAXCOL schon oben for (SCCOL nCol=0; nCol<MAXCOL; nCol++) // MAXCOL already above
{ {
pCol[nCol].GetOptimalHeight(rCxt, nStartRow, nEndRow, nMinHeight, nMinStart); pCol[nCol].GetOptimalHeight(rCxt, nStartRow, nEndRow, nMinHeight, nMinStart);
if (pProgress) if (pProgress)
{ {
sal_uLong nWeight = pCol[nCol].GetWeightedCount(); sal_uLong nWeight = pCol[nCol].GetWeightedCount();
if (nWeight) // nochmal denselben Status muss auch nicht sein if (nWeight) // does not have to be the same Status
{ {
nWeightedCount += nWeight; nWeightedCount += nWeight;
pProgress->SetState( nWeightedCount + nProgressStart ); pProgress->SetState( nWeightedCount + nProgressStart );
...@@ -326,9 +326,9 @@ ScTable::~ScTable() ...@@ -326,9 +326,9 @@ ScTable::~ScTable()
{ {
aCol[nCol].FreeNotes(); aCol[nCol].FreeNotes();
} }
// nicht im dtor die Pages in der falschen Reihenfolge loeschen // In the dtor, don't delete the pages in the wrong order.
// (nTab stimmt dann als Page-Number nicht!) // (or else nTab does not reflect the page number!)
// In ScDocument::Clear wird hinterher per Clear am Draw Layer alles geloescht. // In ScDocument::Clear is afterwards used from Clear at the Draw Layer to delete everything.
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer(); ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if (pDrawLayer) if (pDrawLayer)
...@@ -422,10 +422,10 @@ void ScTable::SetLink( sal_uInt8 nMode, ...@@ -422,10 +422,10 @@ void ScTable::SetLink( sal_uInt8 nMode,
const OUString& rTab, sal_uLong nRefreshDelay ) const OUString& rTab, sal_uLong nRefreshDelay )
{ {
nLinkMode = nMode; nLinkMode = nMode;
aLinkDoc = rDoc; // Datei aLinkDoc = rDoc; // File
aLinkFlt = rFlt; // Filter aLinkFlt = rFlt; // Filter
aLinkOpt = rOpt; // Filter-Optionen aLinkOpt = rOpt; // Filter options
aLinkTab = rTab; // Tabellenname in Quelldatei aLinkTab = rTab; // Sheet name in source file
nLinkRefreshDelay = nRefreshDelay; // refresh delay in seconds, 0==off nLinkRefreshDelay = nRefreshDelay; // refresh delay in seconds, 0==off
if (IsStreamValid()) if (IsStreamValid())
...@@ -449,7 +449,7 @@ long ScTable::GetNeededSize( SCCOL nCol, SCROW nRow, ...@@ -449,7 +449,7 @@ long ScTable::GetNeededSize( SCCOL nCol, SCROW nRow,
bool bWidth, bool bTotalSize ) bool bWidth, bool bTotalSize )
{ {
ScNeededSizeOptions aOptions; ScNeededSizeOptions aOptions;
aOptions.bSkipMerged = false; // zusammengefasste mitzaehlen aOptions.bSkipMerged = false; // count merged cells
aOptions.bTotalSize = bTotalSize; aOptions.bTotalSize = bTotalSize;
return aCol[nCol].GetNeededSize return aCol[nCol].GetNeededSize
...@@ -568,7 +568,7 @@ bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bF ...@@ -568,7 +568,7 @@ bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bF
SCROW nMaxY = 0; SCROW nMaxY = 0;
SCCOL i; SCCOL i;
for (i=0; i<=MAXCOL; i++) // Daten testen for (i=0; i<=MAXCOL; i++) // Test data
{ {
if (!aCol[i].IsEmptyData()) if (!aCol[i].IsEmptyData())
{ {
...@@ -600,7 +600,7 @@ bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bF ...@@ -600,7 +600,7 @@ bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bF
SCCOL nMaxDataX = nMaxX; SCCOL nMaxDataX = nMaxX;
for (i=0; i<=MAXCOL; i++) // Attribute testen for (i=0; i<=MAXCOL; i++) // Test attribute
{ {
SCROW nLastRow; SCROW nLastRow;
if (aCol[i].GetLastVisibleAttr( nLastRow, bFullFormattedArea )) if (aCol[i].GetLastVisibleAttr( nLastRow, bFullFormattedArea ))
...@@ -612,7 +612,7 @@ bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bF ...@@ -612,7 +612,7 @@ bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bF
} }
} }
if (nMaxX == MAXCOL) // Attribute rechts weglassen if (nMaxX == MAXCOL) // omit attribute at the right
{ {
--nMaxX; --nMaxX;
while ( nMaxX>0 && aCol[nMaxX].IsVisibleAttrEqual(aCol[nMaxX+1]) ) while ( nMaxX>0 && aCol[nMaxX].IsVisibleAttrEqual(aCol[nMaxX+1]) )
...@@ -658,7 +658,7 @@ bool ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow, ...@@ -658,7 +658,7 @@ bool ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
SCCOL nMaxX = 0; SCCOL nMaxX = 0;
SCCOL i; SCCOL i;
for (i=0; i<=MAXCOL; i++) // Attribute testen for (i=0; i<=MAXCOL; i++) // Test attribute
{ {
if (aCol[i].HasVisibleAttrIn( nStartRow, nEndRow )) if (aCol[i].HasVisibleAttrIn( nStartRow, nEndRow ))
{ {
...@@ -667,7 +667,7 @@ bool ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow, ...@@ -667,7 +667,7 @@ bool ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
} }
} }
if (nMaxX == MAXCOL) // Attribute rechts weglassen if (nMaxX == MAXCOL) // omit attribute at the right
{ {
--nMaxX; --nMaxX;
while ( nMaxX>0 && aCol[nMaxX].IsVisibleAttrEqual(aCol[nMaxX+1], nStartRow, nEndRow) ) while ( nMaxX>0 && aCol[nMaxX].IsVisibleAttrEqual(aCol[nMaxX+1], nStartRow, nEndRow) )
...@@ -695,7 +695,7 @@ bool ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol, ...@@ -695,7 +695,7 @@ bool ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
SCROW nMaxY = 0; SCROW nMaxY = 0;
SCCOL i; SCCOL i;
for (i=nStartCol; i<=nEndCol; i++) // Attribute testen for (i=nStartCol; i<=nEndCol; i++) // Test attribute
{ {
SCROW nLastRow; SCROW nLastRow;
if (aCol[i].GetLastVisibleAttr( nLastRow )) if (aCol[i].GetLastVisibleAttr( nLastRow ))
...@@ -706,7 +706,7 @@ bool ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol, ...@@ -706,7 +706,7 @@ bool ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
} }
} }
for (i=nStartCol; i<=nEndCol; i++) // Daten testen for (i=nStartCol; i<=nEndCol; i++) // Test data
{ {
if (!aCol[i].IsEmptyData()) if (!aCol[i].IsEmptyData())
{ {
...@@ -740,7 +740,7 @@ bool ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const ...@@ -740,7 +740,7 @@ bool ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
SCROW nMinY = MAXROW; SCROW nMinY = MAXROW;
SCCOL i; SCCOL i;
for (i=0; i<=MAXCOL; i++) // Attribute testen for (i=0; i<=MAXCOL; i++) // Test attribute
{ {
SCROW nFirstRow; SCROW nFirstRow;
if (aCol[i].GetFirstVisibleAttr( nFirstRow )) if (aCol[i].GetFirstVisibleAttr( nFirstRow ))
...@@ -753,9 +753,9 @@ bool ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const ...@@ -753,9 +753,9 @@ bool ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
} }
} }
if (nMinX == 0) // Attribute links weglassen if (nMinX == 0) // omit attribute at the right
{ {
if ( aCol[0].IsVisibleAttrEqual(aCol[1]) ) // keine einzelnen if ( aCol[0].IsVisibleAttrEqual(aCol[1]) ) // no single ones
{ {
++nMinX; ++nMinX;
while ( nMinX<MAXCOL && aCol[nMinX].IsVisibleAttrEqual(aCol[nMinX-1]) ) while ( nMinX<MAXCOL && aCol[nMinX].IsVisibleAttrEqual(aCol[nMinX-1]) )
...@@ -764,7 +764,7 @@ bool ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const ...@@ -764,7 +764,7 @@ bool ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
} }
bool bDatFound = false; bool bDatFound = false;
for (i=0; i<=MAXCOL; i++) // Daten testen for (i=0; i<=MAXCOL; i++) // Test data
{ {
if (!aCol[i].IsEmptyData()) if (!aCol[i].IsEmptyData())
{ {
...@@ -1222,7 +1222,7 @@ bool ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark, ...@@ -1222,7 +1222,7 @@ bool ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const
{ {
if (bUnprotected && !IsProtected()) // Tabelle ueberhaupt geschuetzt? if (bUnprotected && !IsProtected()) // Is sheet really protected?
bUnprotected = false; bUnprotected = false;
sal_uInt16 nWrap = 0; sal_uInt16 nWrap = 0;
...@@ -1233,7 +1233,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1233,7 +1233,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
nRow = sal::static_int_cast<SCsROW>( nRow + nMovY ); nRow = sal::static_int_cast<SCsROW>( nRow + nMovY );
OSL_ENSURE( !nMovY || !bUnprotected, OSL_ENSURE( !nMovY || !bUnprotected,
"GetNextPos mit bUnprotected horizontal nicht implementiert" ); "GetNextPos with bUnprotected horizontal not implemented" );
if ( nMovY && bMarked ) if ( nMovY && bMarked )
{ {
...@@ -1242,7 +1242,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1242,7 +1242,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
while ( ValidRow(nRow) && while ( ValidRow(nRow) &&
(RowHidden(nRow) || pDocument->HasAttrib(nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_OVERLAPPED)) ) (RowHidden(nRow) || pDocument->HasAttrib(nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_OVERLAPPED)) )
{ {
// ausgeblendete ueberspringen (s.o.) // skip hidden rows (see above)
nRow += nMovY; nRow += nMovY;
nRow = rMark.GetNextMarked( nCol, nRow, bUp ); nRow = rMark.GetNextMarked( nCol, nRow, bUp );
} }
...@@ -1272,7 +1272,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1272,7 +1272,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
while ( ValidRow(nRow) && while ( ValidRow(nRow) &&
(RowHidden(nRow) || pDocument->HasAttrib(nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_OVERLAPPED)) ) (RowHidden(nRow) || pDocument->HasAttrib(nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_OVERLAPPED)) )
{ {
// ausgeblendete ueberspringen (s.o.) // skip hidden rows (see above)
nRow += nMovY; nRow += nMovY;
nRow = rMark.GetNextMarked( nCol, nRow, bUp ); nRow = rMark.GetNextMarked( nCol, nRow, bUp );
} }
...@@ -1281,7 +1281,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1281,7 +1281,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
if ( nMovX && ( bMarked || bUnprotected ) ) if ( nMovX && ( bMarked || bUnprotected ) )
{ {
// initiales Weiterzaehlen wrappen: // wrap initial skip counting:
if (nCol<0) if (nCol<0)
{ {
nCol = MAXCOL; nCol = MAXCOL;
...@@ -1302,7 +1302,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1302,7 +1302,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
boost::scoped_array<SCsROW> pNextRows(new SCsROW[MAXCOL+1]); boost::scoped_array<SCsROW> pNextRows(new SCsROW[MAXCOL+1]);
SCCOL i; SCCOL i;
if ( nMovX > 0 ) // vorwaerts if ( nMovX > 0 ) // forward
{ {
for (i=0; i<=MAXCOL; i++) for (i=0; i<=MAXCOL; i++)
pNextRows[i] = (i<nCol) ? (nRow+1) : nRow; pNextRows[i] = (i<nCol) ? (nRow+1) : nRow;
...@@ -1317,7 +1317,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1317,7 +1317,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
SCsROW nMinRow = MAXROW+1; SCsROW nMinRow = MAXROW+1;
for (i=0; i<=MAXCOL; i++) for (i=0; i<=MAXCOL; i++)
if (pNextRows[i] < nMinRow) // bei gleichen den linken if (pNextRows[i] < nMinRow) // when two equal on the left
{ {
nMinRow = pNextRows[i]; nMinRow = pNextRows[i];
nCol = i; nCol = i;
...@@ -1326,16 +1326,16 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1326,16 +1326,16 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
if ( nRow > MAXROW ) if ( nRow > MAXROW )
{ {
if (++nWrap >= 2) break; // ungueltigen Wert behalten if (++nWrap >= 2) break; // handle invalid value
nCol = 0; nCol = 0;
nRow = 0; nRow = 0;
for (i=0; i<=MAXCOL; i++) for (i=0; i<=MAXCOL; i++)
pNextRows[i] = 0; // alles ganz von vorne pNextRows[i] = 0; // do it all over again
} }
} }
while ( !ValidNextPos(nCol, nRow, rMark, bMarked, bUnprotected) ); while ( !ValidNextPos(nCol, nRow, rMark, bMarked, bUnprotected) );
} }
else // rueckwaerts else // backwards
{ {
for (i=0; i<=MAXCOL; i++) for (i=0; i<=MAXCOL; i++)
pNextRows[i] = (i>nCol) ? (nRow-1) : nRow; pNextRows[i] = (i>nCol) ? (nRow-1) : nRow;
...@@ -1350,7 +1350,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1350,7 +1350,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
SCsROW nMaxRow = -1; SCsROW nMaxRow = -1;
for (i=0; i<=MAXCOL; i++) for (i=0; i<=MAXCOL; i++)
if (pNextRows[i] >= nMaxRow) // bei gleichen den rechten if (pNextRows[i] >= nMaxRow) // when two equal on the right
{ {
nMaxRow = pNextRows[i]; nMaxRow = pNextRows[i];
nCol = i; nCol = i;
...@@ -1359,11 +1359,11 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1359,11 +1359,11 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
if ( nRow < 0 ) if ( nRow < 0 )
{ {
if (++nWrap >= 2) break; // ungueltigen Wert behalten if (++nWrap >= 2) break; // handle invalid value
nCol = MAXCOL; nCol = MAXCOL;
nRow = MAXROW; nRow = MAXROW;
for (i=0; i<=MAXCOL; i++) for (i=0; i<=MAXCOL; i++)
pNextRows[i] = MAXROW; // alles ganz von vorne pNextRows[i] = MAXROW; // do it all over again
} }
} }
while ( !ValidNextPos(nCol, nRow, rMark, bMarked, bUnprotected) ); while ( !ValidNextPos(nCol, nRow, rMark, bMarked, bUnprotected) );
...@@ -1371,9 +1371,8 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, ...@@ -1371,9 +1371,8 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
} }
} }
// ungueltige Werte kommen z.b. bei Tab heraus, // Invalid values show up for instane for Tab, when nothing is selected and not
// wenn nicht markiert und nicht geschuetzt ist (linker / rechter Rand), // protected (left / right edge), then leave values unchanged.
// dann Werte unveraendert lassen
if (ValidColRow(nCol,nRow)) if (ValidColRow(nCol,nRow))
{ {
...@@ -1389,7 +1388,7 @@ bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa ...@@ -1389,7 +1388,7 @@ bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa
if ( !pMarkArray ) if ( !pMarkArray )
return false; return false;
++rRow; // naechste Zelle ist gesucht ++rRow; // next row
while ( rCol <= MAXCOL ) while ( rCol <= MAXCOL )
{ {
...@@ -1425,16 +1424,16 @@ bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa ...@@ -1425,16 +1424,16 @@ bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa
return true; return true;
} }
rRow = nEnd + 1; // naechsten markierten Bereich suchen rRow = nEnd + 1; // Search for next selected range
} }
else else
rRow = MAXROW + 1; // Ende der Spalte rRow = MAXROW + 1; // End of column
} }
rRow = 0; rRow = 0;
++rCol; // naechste Spalte testen ++rCol; // test next column
} }
return false; // alle Spalten durch return false; // Through all columns
} }
void ScTable::UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, void ScTable::UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
...@@ -1537,7 +1536,7 @@ void ScTable::UpdateReference( ...@@ -1537,7 +1536,7 @@ void ScTable::UpdateReference(
{ {
*pRepeatColRange = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 ); *pRepeatColRange = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 );
bRecalcPages = true; bRecalcPages = true;
nRepeatStartX = nSCol; // fuer UpdatePageBreaks nRepeatStartX = nSCol; // for UpdatePageBreaks
nRepeatEndX = nECol; nRepeatEndX = nECol;
} }
} }
...@@ -1557,7 +1556,7 @@ void ScTable::UpdateReference( ...@@ -1557,7 +1556,7 @@ void ScTable::UpdateReference(
{ {
*pRepeatRowRange = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 ); *pRepeatRowRange = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 );
bRecalcPages = true; bRecalcPages = true;
nRepeatStartY = nSRow; // fuer UpdatePageBreaks nRepeatStartY = nSRow; // for UpdatePageBreaks
nRepeatEndY = nERow; nRepeatEndY = nERow;
} }
} }
......
...@@ -110,7 +110,7 @@ bool ScTable::SetOutlineTable( const ScOutlineTable* pNewOutline ) ...@@ -110,7 +110,7 @@ bool ScTable::SetOutlineTable( const ScOutlineTable* pNewOutline )
else else
pOutlineTable = NULL; pOutlineTable = NULL;
return ( nNewSizeX != nOldSizeX || nNewSizeY != nOldSizeY ); // Groesse geaendert ? return ( nNewSizeX != nOldSizeX || nNewSizeY != nOldSizeY ); // changed size?
} }
void ScTable::StartOutlineTable() void ScTable::StartOutlineTable()
...@@ -466,7 +466,7 @@ void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMa ...@@ -466,7 +466,7 @@ void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMa
mpCondFormatList->DeleteArea( pRange->aStart.Col(), pRange->aStart.Row(), pRange->aEnd.Col(), pRange->aEnd.Row() ); mpCondFormatList->DeleteArea( pRange->aStart.Col(), pRange->aStart.Row(), pRange->aEnd.Col(), pRange->aEnd.Row() );
} }
// Zellschutz auf geschuetzter Tabelle nicht setzen // Do not set protected cell in a protected sheet
if ( IsProtected() && (nDelFlag & IDF_ATTRIB) ) if ( IsProtected() && (nDelFlag & IDF_ATTRIB) )
{ {
...@@ -522,7 +522,7 @@ void ScTable::CopyToClip( ...@@ -522,7 +522,7 @@ void ScTable::CopyToClip(
pTable->CopyRowHidden(*this, 0, nRow2); pTable->CopyRowHidden(*this, 0, nRow2);
pTable->CopyRowFiltered(*this, 0, nRow2); pTable->CopyRowFiltered(*this, 0, nRow2);
// ggf. Formeln durch Werte ersetzen // If necessary replace formulas with values
if ( IsProtected() ) if ( IsProtected() )
for (i = nCol1; i <= nCol2; i++) for (i = nCol1; i <= nCol2; i++)
...@@ -683,7 +683,7 @@ void ScTable::CopyFromClip( ...@@ -683,7 +683,7 @@ void ScTable::CopyFromClip(
} }
} }
// Zellschutz auf geschuetzter Tabelle nicht setzen // Do not set protected cell in a protected sheet
if (IsProtected() && (rCxt.getInsertFlag() & IDF_ATTRIB)) if (IsProtected() && (rCxt.getInsertFlag() & IDF_ATTRIB))
{ {
ScPatternAttr aPattern(pDocument->GetPool()); ScPatternAttr aPattern(pDocument->GetPool());
...@@ -705,7 +705,7 @@ void ScTable::MixData( ...@@ -705,7 +705,7 @@ void ScTable::MixData(
aCol[i].MixData(rCxt, nRow1, nRow2, nFunction, bSkipEmpty, pSrcTab->aCol[i]); aCol[i].MixData(rCxt, nRow1, nRow2, nFunction, bSkipEmpty, pSrcTab->aCol[i]);
} }
// Markierung von diesem Dokument // Selection form this document
void ScTable::MixMarked( void ScTable::MixMarked(
sc::MixDocContext& rCxt, const ScMarkData& rMark, sal_uInt16 nFunction, sc::MixDocContext& rCxt, const ScMarkData& rMark, sal_uInt16 nFunction,
bool bSkipEmpty, const ScTable* pSrcTab ) bool bSkipEmpty, const ScTable* pSrcTab )
...@@ -802,8 +802,8 @@ public: ...@@ -802,8 +802,8 @@ public:
ScFormulaCell* pNew = new ScFormulaCell( ScFormulaCell* pNew = new ScFormulaCell(
*p, mrClipTab.GetDoc(), getDestPos(nRow), SC_CLONECELL_STARTLISTENING); *p, mrClipTab.GetDoc(), getDestPos(nRow), SC_CLONECELL_STARTLISTENING);
// Referenzen drehen // rotate reference
// bei Cut werden Referenzen spaeter per UpdateTranspose angepasst // for Cut, the referneces are later adjusted through UpdateTranspose
if (!mbWasCut) if (!mbWasCut)
pNew->TransposeReference(); pNew->TransposeReference();
...@@ -1091,7 +1091,7 @@ void ScTable::CopyToTable( ...@@ -1091,7 +1091,7 @@ void ScTable::CopyToTable(
aCol[i].CopyToColumn(rCxt, nRow1, nRow2, nFlags, bMarked, aCol[i].CopyToColumn(rCxt, nRow1, nRow2, nFlags, bMarked,
pDestTab->aCol[i], pMarkData, bAsLink); pDestTab->aCol[i], pMarkData, bAsLink);
if (!bColRowFlags) // Spaltenbreiten/Zeilenhoehen/Flags if (!bColRowFlags) // Column widths/Row heights/Flags
return; return;
if(pDestTab->pDocument->IsUndo() && (nFlags & IDF_ATTRIB)) if(pDestTab->pDocument->IsUndo() && (nFlags & IDF_ATTRIB))
...@@ -1109,7 +1109,7 @@ void ScTable::CopyToTable( ...@@ -1109,7 +1109,7 @@ void ScTable::CopyToTable(
pNewDBData->MoveTo(pDestTab->nTab, aCol1, aRow1, aCol2, aRow2); pNewDBData->MoveTo(pDestTab->nTab, aCol1, aRow1, aCol2, aRow2);
pDestTab->SetAnonymousDBData(pNewDBData); pDestTab->SetAnonymousDBData(pNewDBData);
} }
// Charts muessen beim Ein-/Ausblenden angepasst werden // Charts have to be adjusted when hide/show
ScChartListenerCollection* pCharts = pDestTab->pDocument->GetChartListenerCollection(); ScChartListenerCollection* pCharts = pDestTab->pDocument->GetChartListenerCollection();
bool bFlagChange = false; bool bFlagChange = false;
...@@ -1271,7 +1271,7 @@ void ScTable::MarkScenarioIn( ScMarkData& rDestMark, sal_uInt16 nNeededBits ) co ...@@ -1271,7 +1271,7 @@ void ScTable::MarkScenarioIn( ScMarkData& rDestMark, sal_uInt16 nNeededBits ) co
{ {
OSL_ENSURE( bScenario, "bScenario == FALSE" ); OSL_ENSURE( bScenario, "bScenario == FALSE" );
if ( ( nScenarioFlags & nNeededBits ) != nNeededBits ) // alle Bits gesetzt? if ( ( nScenarioFlags & nNeededBits ) != nNeededBits ) // Are all Bits set?
return; return;
for (SCCOL i=0; i<=MAXCOL; i++) for (SCCOL i=0; i<=MAXCOL; i++)
...@@ -1315,7 +1315,7 @@ const ScRangeList* ScTable::GetScenarioRanges() const ...@@ -1315,7 +1315,7 @@ const ScRangeList* ScTable::GetScenarioRanges() const
{ {
((ScTable*)this)->pScenarioRanges = new ScRangeList; ((ScTable*)this)->pScenarioRanges = new ScRangeList;
ScMarkData aMark; ScMarkData aMark;
MarkScenarioIn( aMark, 0 ); // immer MarkScenarioIn( aMark, 0 ); // always
aMark.FillRangeListWithMarks( pScenarioRanges, false ); aMark.FillRangeListWithMarks( pScenarioRanges, false );
} }
return pScenarioRanges; return pScenarioRanges;
...@@ -1688,7 +1688,7 @@ void ScTable::SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt ) ...@@ -1688,7 +1688,7 @@ void ScTable::SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt )
void ScTable::SetDirty( const ScRange& rRange, ScColumn::BroadcastMode eMode ) void ScTable::SetDirty( const ScRange& rRange, ScColumn::BroadcastMode eMode )
{ {
bool bOldAutoCalc = pDocument->GetAutoCalc(); bool bOldAutoCalc = pDocument->GetAutoCalc();
pDocument->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden pDocument->SetAutoCalc( false ); // avoid multiple recalculations
SCCOL nCol2 = rRange.aEnd.Col(); SCCOL nCol2 = rRange.aEnd.Col();
for (SCCOL i=rRange.aStart.Col(); i<=nCol2; i++) for (SCCOL i=rRange.aStart.Col(); i<=nCol2; i++)
aCol[i].SetDirty(rRange.aStart.Row(), rRange.aEnd.Row(), eMode); aCol[i].SetDirty(rRange.aStart.Row(), rRange.aEnd.Row(), eMode);
...@@ -1708,7 +1708,7 @@ void ScTable::SetTableOpDirty( const ScRange& rRange ) ...@@ -1708,7 +1708,7 @@ void ScTable::SetTableOpDirty( const ScRange& rRange )
void ScTable::SetDirtyAfterLoad() void ScTable::SetDirtyAfterLoad()
{ {
bool bOldAutoCalc = pDocument->GetAutoCalc(); bool bOldAutoCalc = pDocument->GetAutoCalc();
pDocument->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden pDocument->SetAutoCalc( false ); // avoid multiple recalculations
for (SCCOL i=0; i<=MAXCOL; i++) for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].SetDirtyAfterLoad(); aCol[i].SetDirtyAfterLoad();
pDocument->SetAutoCalc( bOldAutoCalc ); pDocument->SetAutoCalc( bOldAutoCalc );
...@@ -1717,7 +1717,7 @@ void ScTable::SetDirtyAfterLoad() ...@@ -1717,7 +1717,7 @@ void ScTable::SetDirtyAfterLoad()
void ScTable::SetDirtyIfPostponed() void ScTable::SetDirtyIfPostponed()
{ {
bool bOldAutoCalc = pDocument->GetAutoCalc(); bool bOldAutoCalc = pDocument->GetAutoCalc();
pDocument->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden pDocument->SetAutoCalc( false ); // avoid multiple recalculations
for (SCCOL i=0; i<=MAXCOL; i++) for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].SetDirtyIfPostponed(); aCol[i].SetDirtyIfPostponed();
pDocument->SetAutoCalc( bOldAutoCalc ); pDocument->SetAutoCalc( bOldAutoCalc );
...@@ -1937,7 +1937,7 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO ...@@ -1937,7 +1937,7 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO
SCCOL nCol, SCROW nAttrRow1, SCROW nAttrRow2, SCSIZE nArrY, SCCOL nCol, SCROW nAttrRow1, SCROW nAttrRow2, SCSIZE nArrY,
const ScPatternAttr* pPattern, const SfxItemSet* pCondSet ) const ScPatternAttr* pPattern, const SfxItemSet* pCondSet )
{ {
// Rueckgabe = neues nArrY // Return value = new nArrY
sal_uInt8 nRotDir = pPattern->GetRotateDir( pCondSet ); sal_uInt8 nRotDir = pPattern->GetRotateDir( pCondSet );
if ( nRotDir != SC_ROTDIR_NONE ) if ( nRotDir != SC_ROTDIR_NONE )
...@@ -1973,7 +1973,7 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO ...@@ -1973,7 +1973,7 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO
bool bHitOne = true; bool bHitOne = true;
if ( nCol > nX2+1 ) if ( nCol > nX2+1 )
{ {
// reicht die gedrehte Zelle bis in den sichtbaren Bereich? // Does the rotated cell extend into the visable range?
SCCOL nTouchedCol = nCol; SCCOL nTouchedCol = nCol;
long nWidth = static_cast<long>(mpRowHeights->getValue(nRow) * nFactor); long nWidth = static_cast<long>(mpRowHeights->getValue(nRow) * nFactor);
...@@ -2010,7 +2010,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC ...@@ -2010,7 +2010,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
return; return;
} }
// nRotMaxCol ist auf SC_ROTMAX_NONE initialisiert, nRowNo ist schon gesetzt // nRotMaxCol is initalized to SC_ROTMAX_NONE, nRowNo is already set
SCROW nY1 = pRowInfo[0].nRowNo; SCROW nY1 = pRowInfo[0].nRowNo;
SCROW nY2 = pRowInfo[nArrCount-1].nRowNo; SCROW nY2 = pRowInfo[nArrCount-1].nRowNo;
...@@ -2030,8 +2030,8 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC ...@@ -2030,8 +2030,8 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
if ( pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, true, &pCondItem ) if ( pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, true, &pCondItem )
== SfxItemState::SET ) == SfxItemState::SET )
{ {
// alle Formate durchgehen, damit die Zellen nicht einzeln // Run through all formats, so that each cell does not have to be
// angeschaut werden muessen // handled individually
const std::vector<sal_uInt32>& rCondFormatData = static_cast<const ScCondFormatItem*>(pCondItem)->GetCondFormatData(); const std::vector<sal_uInt32>& rCondFormatData = static_cast<const ScCondFormatItem*>(pCondItem)->GetCondFormatData();
ScStyleSheetPool* pStylePool = pDocument->GetStyleSheetPool(); ScStyleSheetPool* pStylePool = pDocument->GetStyleSheetPool();
...@@ -2060,7 +2060,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC ...@@ -2060,7 +2060,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
FillMaxRot( pRowInfo, nArrCount, nX1, nX2, FillMaxRot( pRowInfo, nArrCount, nX1, nX2,
nCol, nAttrRow1, nAttrRow2, nCol, nAttrRow1, nAttrRow2,
nArrY, pPattern, &pStyleSheet->GetItemSet() ); nArrY, pPattern, &pStyleSheet->GetItemSet() );
// nArrY nicht veraendern // not changing nArrY
} }
} }
} }
...@@ -2086,28 +2086,28 @@ bool ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR ...@@ -2086,28 +2086,28 @@ bool ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR
sal_uInt16 nEdges = 0; sal_uInt16 nEdges = 0;
if ( nCol1 == nCol2 ) if ( nCol1 == nCol2 )
{ // linke und rechte Spalte { // left and right column
const sal_uInt16 n = MatrixEdgeLeft | MatrixEdgeRight; const sal_uInt16 n = MatrixEdgeLeft | MatrixEdgeRight;
nEdges = aCol[nCol1].GetBlockMatrixEdges( nRow1, nRow2, n ); nEdges = aCol[nCol1].GetBlockMatrixEdges( nRow1, nRow2, n );
// nicht (4 und 16) oder 1 oder 32 // not (4 and 16) or 1 or 32
if (nEdges && (((nEdges & n) != n) || (nEdges & (MatrixEdgeInside|MatrixEdgeOpen)))) if (nEdges && (((nEdges & n) != n) || (nEdges & (MatrixEdgeInside|MatrixEdgeOpen))))
return true; // linke oder rechte Kante fehlt oder offen return true; // left or right edge is missing or open
} }
else else
{ // linke Spalte { // left column
nEdges = aCol[nCol1].GetBlockMatrixEdges(nRow1, nRow2, MatrixEdgeLeft); nEdges = aCol[nCol1].GetBlockMatrixEdges(nRow1, nRow2, MatrixEdgeLeft);
// nicht 4 oder 1 oder 32 // not 4 or 1 or 32
if (nEdges && (((nEdges & MatrixEdgeLeft) != MatrixEdgeLeft) || (nEdges & (MatrixEdgeInside|MatrixEdgeOpen)))) if (nEdges && (((nEdges & MatrixEdgeLeft) != MatrixEdgeLeft) || (nEdges & (MatrixEdgeInside|MatrixEdgeOpen))))
return true; // linke Kante fehlt oder offen return true; // left edge missing or open
// rechte Spalte // right column
nEdges = aCol[nCol2].GetBlockMatrixEdges(nRow1, nRow2, MatrixEdgeRight); nEdges = aCol[nCol2].GetBlockMatrixEdges(nRow1, nRow2, MatrixEdgeRight);
// nicht 16 oder 1 oder 32 // not 16 or 1 or 32
if (nEdges && (((nEdges & MatrixEdgeRight) != MatrixEdgeRight) || (nEdges & (MatrixEdgeInside|MatrixEdgeOpen)))) if (nEdges && (((nEdges & MatrixEdgeRight) != MatrixEdgeRight) || (nEdges & (MatrixEdgeInside|MatrixEdgeOpen))))
return true; // rechte Kante fehlt oder offen return true; // right edge is missing or open
} }
if ( nRow1 == nRow2 ) if ( nRow1 == nRow2 )
{ // obere und untere Zeile { // Row on top and on bottom
bool bOpen = false; bool bOpen = false;
const sal_uInt16 n = MatrixEdgeBottom | MatrixEdgeTop; const sal_uInt16 n = MatrixEdgeBottom | MatrixEdgeTop;
for ( SCCOL i=nCol1; i<=nCol2; i++) for ( SCCOL i=nCol1; i<=nCol2; i++)
...@@ -2116,23 +2116,23 @@ bool ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR ...@@ -2116,23 +2116,23 @@ bool ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR
if ( nEdges ) if ( nEdges )
{ {
if ( (nEdges & n) != n ) if ( (nEdges & n) != n )
return true; // obere oder untere Kante fehlt return true; // Top or bottom edge missing
if (nEdges & MatrixEdgeLeft) if (nEdges & MatrixEdgeLeft)
bOpen = true; // linke Kante oeffnet, weitersehen bOpen = true; // left edge open, continue
else if ( !bOpen ) else if ( !bOpen )
return true; // es gibt was, was nicht geoeffnet wurde return true; // Something exist that has not been opened
if (nEdges & MatrixEdgeRight) if (nEdges & MatrixEdgeRight)
bOpen = false; // rechte Kante schliesst bOpen = false; // Close right edge
} }
} }
if ( bOpen ) if ( bOpen )
return true; // es geht noch weiter return true; // continue
} }
else else
{ {
sal_uInt16 j, n; sal_uInt16 j, n;
SCROW nR; SCROW nR;
// erst obere Zeile, dann untere Zeile // first rop row, then bottom row
for ( j=0, nR=nRow1, n=8; j<2; j++, nR=nRow2, n=2 ) for ( j=0, nR=nRow1, n=8; j<2; j++, nR=nRow2, n=2 )
{ {
bool bOpen = false; bool bOpen = false;
...@@ -2141,20 +2141,20 @@ bool ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR ...@@ -2141,20 +2141,20 @@ bool ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR
nEdges = aCol[i].GetBlockMatrixEdges( nR, nR, n ); nEdges = aCol[i].GetBlockMatrixEdges( nR, nR, n );
if ( nEdges ) if ( nEdges )
{ {
// in oberere Zeile keine obere Kante bzw. // in top row no top edge respectively
// in unterer Zeile keine untere Kante // in bottom row no bottom edge
if ( (nEdges & n) != n ) if ( (nEdges & n) != n )
return true; return true;
if (nEdges & MatrixEdgeLeft) if (nEdges & MatrixEdgeLeft)
bOpen = true; // linke Kante oeffnet, weitersehen bOpen = true; // open left edge, continue
else if ( !bOpen ) else if ( !bOpen )
return true; // es gibt was, was nicht geoeffnet wurde return true; // Something exist that has not been opened
if (nEdges & MatrixEdgeRight) if (nEdges & MatrixEdgeRight)
bOpen = false; // rechte Kante schliesst bOpen = false; // Close right edge
} }
} }
if ( bOpen ) if ( bOpen )
return true; // es geht noch weiter return true; // continue
} }
} }
return false; return false;
...@@ -2515,7 +2515,7 @@ const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, bool& r ...@@ -2515,7 +2515,7 @@ const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, bool& r
{ {
rFound = true; rFound = true;
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) ) if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
bEqual = false; // unterschiedliche bEqual = false;
pStyle = pNewStyle; pStyle = pNewStyle;
} }
} }
...@@ -2541,7 +2541,7 @@ const ScStyleSheet* ScTable::GetAreaStyle( bool& rFound, SCCOL nCol1, SCROW nRow ...@@ -2541,7 +2541,7 @@ const ScStyleSheet* ScTable::GetAreaStyle( bool& rFound, SCCOL nCol1, SCROW nRow
{ {
rFound = true; rFound = true;
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) ) if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
bEqual = false; // unterschiedliche bEqual = false;
pStyle = pNewStyle; pStyle = pNewStyle;
} }
} }
...@@ -2643,7 +2643,7 @@ void ScTable::ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& r ...@@ -2643,7 +2643,7 @@ void ScTable::ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& r
aCol[i].ClearSelectionItems( pWhich, rMark ); aCol[i].ClearSelectionItems( pWhich, rMark );
} }
// Spaltenbreiten / Zeilenhoehen // Column widths / Row heights
void ScTable::SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth ) void ScTable::SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth )
{ {
...@@ -2861,7 +2861,7 @@ sal_uLong ScTable::GetColWidth( SCCOL nStartCol, SCCOL nEndCol, bool bHiddenAsZe ...@@ -2861,7 +2861,7 @@ sal_uLong ScTable::GetColWidth( SCCOL nStartCol, SCCOL nEndCol, bool bHiddenAsZe
return nW; return nW;
} }
sal_uInt16 ScTable::GetOriginalWidth( SCCOL nCol ) const // immer die eingestellte sal_uInt16 ScTable::GetOriginalWidth( SCCOL nCol ) const // always the set value
{ {
OSL_ENSURE(ValidCol(nCol),"wrong column number"); OSL_ENSURE(ValidCol(nCol),"wrong column number");
...@@ -3034,7 +3034,7 @@ sal_uInt16 ScTable::GetOriginalHeight( SCROW nRow ) const // non-0 even if ...@@ -3034,7 +3034,7 @@ sal_uInt16 ScTable::GetOriginalHeight( SCROW nRow ) const // non-0 even if
return (sal_uInt16) ScGlobal::nStdRowHeight; return (sal_uInt16) ScGlobal::nStdRowHeight;
} }
// Spalten-/Zeilen-Flags // Column/Row -Flags
SCROW ScTable::GetHiddenRowCount( SCROW nRow ) const SCROW ScTable::GetHiddenRowCount( SCROW nRow ) const
{ {
...@@ -3097,7 +3097,7 @@ void ScTable::DBShowRow(SCROW nRow, bool bShow) ...@@ -3097,7 +3097,7 @@ void ScTable::DBShowRow(SCROW nRow, bool bShow)
{ {
if (ValidRow(nRow) && pRowFlags) if (ValidRow(nRow) && pRowFlags)
{ {
// Filter-Flag immer setzen, auch wenn Hidden unveraendert // Always set Filter-Flag, also unchanged when Hidden
bool bChanged = SetRowHidden(nRow, nRow, !bShow); bool bChanged = SetRowHidden(nRow, nRow, !bShow);
SetRowFiltered(nRow, nRow, !bShow); SetRowFiltered(nRow, nRow, !bShow);
...@@ -3442,7 +3442,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC ...@@ -3442,7 +3442,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
StartOutlineTable(); StartOutlineTable();
// Zeilen // Rows
UsedRowsType aUsed(0, MAXROW+1, false); UsedRowsType aUsed(0, MAXROW+1, false);
for (nCol=nStartCol; nCol<=nEndCol; nCol++) for (nCol=nStartCol; nCol<=nEndCol; nCol++)
...@@ -3497,7 +3497,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC ...@@ -3497,7 +3497,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
} }
} }
// CopyData - fuer Query in anderen Bereich // CopyData - for Query in other range
void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCCOL nDestCol, SCROW nDestRow, SCTAB nDestTab ) SCCOL nDestCol, SCROW nDestRow, SCTAB nDestTab )
...@@ -3569,7 +3569,7 @@ bool ScTable::RefVisible(ScFormulaCell* pCell) ...@@ -3569,7 +3569,7 @@ bool ScTable::RefVisible(ScFormulaCell* pCell)
} }
} }
return true; // irgendwie anders return true; // somehow different
} }
void ScTable::GetUpperCellString(SCCOL nCol, SCROW nRow, OUString& rStr) void ScTable::GetUpperCellString(SCCOL nCol, SCROW nRow, OUString& rStr)
...@@ -3578,7 +3578,7 @@ void ScTable::GetUpperCellString(SCCOL nCol, SCROW nRow, OUString& rStr) ...@@ -3578,7 +3578,7 @@ void ScTable::GetUpperCellString(SCCOL nCol, SCROW nRow, OUString& rStr)
rStr = ScGlobal::pCharClass->uppercase(rStr.trim()); rStr = ScGlobal::pCharClass->uppercase(rStr.trim());
} }
// Berechnen der Groesse der Tabelle und setzen der Groesse an der DrawPage // Calculate the size of the sheet and set the size on DrawPage
void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos) void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos)
{ {
......
...@@ -1526,11 +1526,11 @@ short ScTable::CompareCell( ...@@ -1526,11 +1526,11 @@ short ScTable::CompareCell(
nRes = static_cast<short>( pSortCollator->compareString( aStr1, aStr2 ) ); nRes = static_cast<short>( pSortCollator->compareString( aStr1, aStr2 ) );
} }
} }
else if ( bStr1 ) // String <-> Zahl else if ( bStr1 ) // String <-> Number
nRes = 1; // Zahl vorne nRes = 1; // Number in front
else if ( bStr2 ) // Zahl <-> String else if ( bStr2 ) // Number <-> String
nRes = -1; // Zahl vorne nRes = -1; // Number in front
else // Zahlen untereinander else // Mixed numbers
{ {
double nVal1 = rCell1.getValue(); double nVal1 = rCell1.getValue();
double nVal2 = rCell2.getValue(); double nVal2 = rCell2.getValue();
...@@ -1550,7 +1550,7 @@ short ScTable::CompareCell( ...@@ -1550,7 +1550,7 @@ short ScTable::CompareCell(
if (!rCell2.isEmpty()) if (!rCell2.isEmpty())
nRes = 1; nRes = 1;
else else
nRes = 0; // beide leer nRes = 0; // both empty
} }
return nRes; return nRes;
} }
...@@ -1655,7 +1655,7 @@ short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const ...@@ -1655,7 +1655,7 @@ short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const
return nRes; return nRes;
} }
bool ScTable::IsSorted( SCCOLROW nStart, SCCOLROW nEnd ) const // ueber aSortParam bool ScTable::IsSorted( SCCOLROW nStart, SCCOLROW nEnd ) const // over aSortParam
{ {
for (SCCOLROW i=nStart; i<nEnd; i++) for (SCCOLROW i=nStart; i<nEnd; i++)
{ {
...@@ -1871,7 +1871,7 @@ void ScTable::RemoveSubTotals( ScSubTotalParam& rParam ) ...@@ -1871,7 +1871,7 @@ void ScTable::RemoveSubTotals( ScSubTotalParam& rParam )
SCCOL nStartCol = rParam.nCol1; SCCOL nStartCol = rParam.nCol1;
SCROW nStartRow = rParam.nRow1 + 1; // Header SCROW nStartRow = rParam.nRow1 + 1; // Header
SCCOL nEndCol = rParam.nCol2; SCCOL nEndCol = rParam.nCol2;
SCROW nEndRow = rParam.nRow2; // wird veraendert SCROW nEndRow = rParam.nRow2; // will change
RemoveSubTotalsHandler aFunc; RemoveSubTotalsHandler aFunc;
for (SCCOL nCol = nStartCol; nCol <= nEndCol; ++nCol) for (SCCOL nCol = nStartCol; nCol <= nEndCol; ++nCol)
...@@ -1894,7 +1894,7 @@ void ScTable::RemoveSubTotals( ScSubTotalParam& rParam ) ...@@ -1894,7 +1894,7 @@ void ScTable::RemoveSubTotals( ScSubTotalParam& rParam )
rParam.nRow2 -= aRows.size(); rParam.nRow2 -= aRows.size();
} }
// harte Zahlenformate loeschen (fuer Ergebnisformeln) // Delete hard number formats (for result formulas)
static void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow ) static void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow )
{ {
...@@ -1920,24 +1920,24 @@ typedef struct lcl_ScTable_DoSubTotals_RowEntry ...@@ -1920,24 +1920,24 @@ typedef struct lcl_ScTable_DoSubTotals_RowEntry
SCROW nFuncEnd; SCROW nFuncEnd;
} RowEntry; } RowEntry;
// neue Zwischenergebnisse // new intermediate results
// rParam.nRow2 wird veraendert ! // rParam.nRow2 is changed !
bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
{ {
SCCOL nStartCol = rParam.nCol1; SCCOL nStartCol = rParam.nCol1;
SCROW nStartRow = rParam.nRow1 + 1; // Header SCROW nStartRow = rParam.nRow1 + 1; // Header
SCCOL nEndCol = rParam.nCol2; SCCOL nEndCol = rParam.nCol2;
SCROW nEndRow = rParam.nRow2; // wird veraendert SCROW nEndRow = rParam.nRow2; // will change
sal_uInt16 i; sal_uInt16 i;
// Leerzeilen am Ende weglassen, // Remove emty rows at the end
// damit alle Ueberlaeufe (MAXROW) bei InsertRow gefunden werden (#35180#) // so that all exceeding (MAXROW) can be found by InsertRow (#35180#)
// Wenn sortiert wurde, sind alle Leerzeilen am Ende. // If sorted, all empty rows are at the end.
SCSIZE nEmpty = GetEmptyLinesInBlock( nStartCol, nStartRow, nEndCol, nEndRow, DIR_BOTTOM ); SCSIZE nEmpty = GetEmptyLinesInBlock( nStartCol, nStartRow, nEndCol, nEndRow, DIR_BOTTOM );
nEndRow -= nEmpty; nEndRow -= nEmpty;
sal_uInt16 nLevelCount = 0; // Anzahl Gruppierungen sal_uInt16 nLevelCount = 0; // Number of levels
bool bDoThis = true; bool bDoThis = true;
for (i=0; i<MAXSUBTOTAL && bDoThis; i++) for (i=0; i<MAXSUBTOTAL && bDoThis; i++)
if (rParam.bGroupActive[i]) if (rParam.bGroupActive[i])
...@@ -1945,15 +1945,14 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) ...@@ -1945,15 +1945,14 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
else else
bDoThis = false; bDoThis = false;
if (nLevelCount==0) // nichts tun if (nLevelCount==0) // do nothing
return true; return true;
SCCOL* nGroupCol = rParam.nField; // Spalten nach denen SCCOL* nGroupCol = rParam.nField; // columns which will be used when grouping
// gruppiert wird
// Durch (leer) als eigene Kategorie muss immer auf // With (blank) as a separate category, subtotal rows from
// Teilergebniszeilen aus den anderen Spalten getestet werden // the other columns must always be tested
// (frueher nur, wenn eine Spalte mehrfach vorkam) // (previously only when a column occured more than once)
bool bTestPrevSub = ( nLevelCount > 1 ); bool bTestPrevSub = ( nLevelCount > 1 );
OUString aSubString; OUString aSubString;
...@@ -1961,7 +1960,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) ...@@ -1961,7 +1960,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
bool bIgnoreCase = !rParam.bCaseSens; bool bIgnoreCase = !rParam.bCaseSens;
OUString *pCompString[MAXSUBTOTAL]; // Pointer wegen Compiler-Problemen OUString *pCompString[MAXSUBTOTAL]; // Pointer due to compiler problemens
for (i=0; i<MAXSUBTOTAL; i++) for (i=0; i<MAXSUBTOTAL; i++)
pCompString[i] = new OUString; pCompString[i] = new OUString;
...@@ -1970,7 +1969,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) ...@@ -1970,7 +1969,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
ScStyleSheet* pStyle = static_cast<ScStyleSheet*>(pDocument->GetStyleSheetPool()->Find( ScStyleSheet* pStyle = static_cast<ScStyleSheet*>(pDocument->GetStyleSheetPool()->Find(
ScGlobal::GetRscString(STR_STYLENAME_RESULT), SFX_STYLE_FAMILY_PARA )); ScGlobal::GetRscString(STR_STYLENAME_RESULT), SFX_STYLE_FAMILY_PARA ));
bool bSpaceLeft = true; // Erfolg beim Einfuegen? bool bSpaceLeft = true; // Succsess when inserting?
// For performance reasons collect formula entries so their // For performance reasons collect formula entries so their
// references don't have to be tested for updates each time a new row is // references don't have to be tested for updates each time a new row is
...@@ -1978,7 +1977,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) ...@@ -1978,7 +1977,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
RowEntry aRowEntry; RowEntry aRowEntry;
::std::vector< RowEntry > aRowVector; ::std::vector< RowEntry > aRowVector;
for (sal_uInt16 nLevel=0; nLevel<=nLevelCount && bSpaceLeft; nLevel++) // incl. Gesamtergebnis for (sal_uInt16 nLevel=0; nLevel<=nLevelCount && bSpaceLeft; nLevel++) // including grand total
{ {
bool bTotal = ( nLevel == nLevelCount ); bool bTotal = ( nLevel == nLevelCount );
aRowEntry.nGroupNo = bTotal ? 0 : (nLevelCount-nLevel-1); aRowEntry.nGroupNo = bTotal ? 0 : (nLevelCount-nLevel-1);
...@@ -1988,7 +1987,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) ...@@ -1988,7 +1987,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
// result functions // result functions
ScSubTotalFunc* eResFunc = rParam.pFunctions[aRowEntry.nGroupNo]; ScSubTotalFunc* eResFunc = rParam.pFunctions[aRowEntry.nGroupNo];
if (nResCount > 0) // sonst nur sortieren if (nResCount > 0) // otherwise only sort
{ {
for (i=0; i<=aRowEntry.nGroupNo; i++) for (i=0; i<=aRowEntry.nGroupNo; i++)
{ {
...@@ -1997,9 +1996,9 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) ...@@ -1997,9 +1996,9 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
*pCompString[i] = ScGlobal::pCharClass->uppercase( aSubString ); *pCompString[i] = ScGlobal::pCharClass->uppercase( aSubString );
else else
*pCompString[i] = aSubString; *pCompString[i] = aSubString;
} // aSubString bleibt auf dem letzten stehen } // aSubString stays on the last
bool bBlockVis = false; // Gruppe eingeblendet? bool bBlockVis = false; // group visible?
aRowEntry.nSubStartRow = nStartRow; aRowEntry.nSubStartRow = nStartRow;
for (SCROW nRow=nStartRow; nRow<=nEndRow+1 && bSpaceLeft; nRow++) for (SCROW nRow=nStartRow; nRow<=nEndRow+1 && bSpaceLeft; nRow++)
{ {
...@@ -2017,8 +2016,8 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) ...@@ -2017,8 +2016,8 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
GetString( nGroupCol[i], nRow, aString ); GetString( nGroupCol[i], nRow, aString );
if (bIgnoreCase) if (bIgnoreCase)
aString = ScGlobal::pCharClass->uppercase(aString); aString = ScGlobal::pCharClass->uppercase(aString);
// wenn sortiert, ist "leer" eine eigene Gruppe // when sorting, blanks are seperate group
// sonst sind leere Zellen unten erlaubt // otherwise blak cells are allowed below
bChanged = ( ( !aString.isEmpty() || rParam.bDoSort ) && bChanged = ( ( !aString.isEmpty() || rParam.bDoSort ) &&
aString != *pCompString[i] ); aString != *pCompString[i] );
} }
...@@ -2070,10 +2069,10 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) ...@@ -2070,10 +2069,10 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
// collect formula positions // collect formula positions
aRowVector.push_back( aRowEntry ); aRowVector.push_back( aRowEntry );
if (bTotal) // "Gesamtergebnis" if (bTotal) // "Grand total"
aOutString = ScGlobal::GetRscString( STR_TABLE_GESAMTERGEBNIS ); aOutString = ScGlobal::GetRscString( STR_TABLE_GESAMTERGEBNIS );
else else
{ // " Ergebnis" { // "Result"
aOutString = aSubString; aOutString = aSubString;
if (aOutString.isEmpty()) if (aOutString.isEmpty())
aOutString = ScGlobal::GetRscString( STR_EMPTYDATA ); aOutString = ScGlobal::GetRscString( STR_EMPTYDATA );
...@@ -2156,7 +2155,6 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam ) ...@@ -2156,7 +2155,6 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
{ {
ApplyStyle( nResCols[nResult], iEntry->nDestRow, *pStyle ); ApplyStyle( nResCols[nResult], iEntry->nDestRow, *pStyle );
// Zahlformat loeschen
lcl_RemoveNumberFormat( this, nResCols[nResult], iEntry->nDestRow ); lcl_RemoveNumberFormat( this, nResCols[nResult], iEntry->nDestRow );
} }
} }
...@@ -2751,18 +2749,18 @@ void ScTable::TopTenQuery( ScQueryParam& rParam ) ...@@ -2751,18 +2749,18 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
QuickSort( pArray.get(), nRow1, rParam.nRow2 ); QuickSort( pArray.get(), nRow1, rParam.nRow2 );
ScSortInfo** ppInfo = pArray->GetFirstArray(); ScSortInfo** ppInfo = pArray->GetFirstArray();
SCSIZE nValidCount = nCount; SCSIZE nValidCount = nCount;
// keine Note-/Leerzellen zaehlen, sind ans Ende sortiert // Don't count note or blank cells, they are sorted at the end
while (nValidCount > 0 && ppInfo[nValidCount-1]->maCell.isEmpty()) while (nValidCount > 0 && ppInfo[nValidCount-1]->maCell.isEmpty())
nValidCount--; nValidCount--;
// keine Strings zaehlen, sind zwischen Value und Leer // Don't count Strings, they are between Value and blank
while (nValidCount > 0 && ppInfo[nValidCount-1]->maCell.hasString()) while (nValidCount > 0 && ppInfo[nValidCount-1]->maCell.hasString())
nValidCount--; nValidCount--;
if ( nValidCount > 0 ) if ( nValidCount > 0 )
{ {
if ( rItem.meType == ScQueryEntry::ByString ) if ( rItem.meType == ScQueryEntry::ByString )
{ // dat wird nix { // this will be nothing
rItem.meType = ScQueryEntry::ByValue; rItem.meType = ScQueryEntry::ByValue;
rItem.mfVal = 10; // 10 bzw. 10% rItem.mfVal = 10; // 10 and 10% respectively
} }
SCSIZE nVal = (rItem.mfVal >= 1 ? static_cast<SCSIZE>(rItem.mfVal) : 1); SCSIZE nVal = (rItem.mfVal >= 1 ? static_cast<SCSIZE>(rItem.mfVal) : 1);
SCSIZE nOffset = 0; SCSIZE nOffset = 0;
...@@ -2953,9 +2951,9 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, bool bKeepSub) ...@@ -2953,9 +2951,9 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, bool bKeepSub)
SCROW nRealRow2 = aParam.nRow2; SCROW nRealRow2 = aParam.nRow2;
for (SCROW j = aParam.nRow1 + nHeader; j <= nRealRow2; ++j) for (SCROW j = aParam.nRow1 + nHeader; j <= nRealRow2; ++j)
{ {
bool bResult; // Filterergebnis bool bResult; // Filter result
bool bValid = ValidQuery(j, aParam); bool bValid = ValidQuery(j, aParam);
if (!bValid && bKeepSub) // Subtotals stehenlassen if (!bValid && bKeepSub) // Keep subtotals
{ {
for (SCCOL nCol=aParam.nCol1; nCol<=aParam.nCol2 && !bValid; nCol++) for (SCCOL nCol=aParam.nCol1; nCol<=aParam.nCol2 && !bValid; nCol++)
{ {
...@@ -3039,7 +3037,7 @@ bool ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow ...@@ -3039,7 +3037,7 @@ bool ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
SCTAB nDBTab = (rQueryParam.nTab == SCTAB_MAX ? nTab : rQueryParam.nTab); SCTAB nDBTab = (rQueryParam.nTab == SCTAB_MAX ? nTab : rQueryParam.nTab);
SCROW nDBRow1 = rQueryParam.nRow1; SCROW nDBRow1 = rQueryParam.nRow1;
SCCOL nDBCol2 = rQueryParam.nCol2; SCCOL nDBCol2 = rQueryParam.nCol2;
// Erste Zeile muessen Spaltenkoepfe sein // First row must be column header
while (bValid && (nCol <= nCol2)) while (bValid && (nCol <= nCol2))
{ {
OUString aQueryStr; OUString aQueryStr;
...@@ -3140,7 +3138,7 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ...@@ -3140,7 +3138,7 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
ScQueryEntry& rEntry = rQueryParam.GetEntry(nIndex); ScQueryEntry& rEntry = rQueryParam.GetEntry(nIndex);
bValid = false; bValid = false;
// Erste Spalte UND/ODER // First column AND/OR
if (nIndex > 0) if (nIndex > 0)
{ {
GetUpperCellString(nCol1, nRow, aCellStr); GetUpperCellString(nCol1, nRow, aCellStr);
...@@ -3155,7 +3153,7 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ...@@ -3155,7 +3153,7 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
bValid = true; bValid = true;
} }
} }
// Zweite Spalte FeldName // Second column field name
if ((nIndex < 1) || bValid) if ((nIndex < 1) || bValid)
{ {
bFound = false; bFound = false;
...@@ -3177,7 +3175,7 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ...@@ -3177,7 +3175,7 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
bValid = false; bValid = false;
} }
} }
// Dritte Spalte Operator =<>... // Third column operator =<>...
if (bValid) if (bValid)
{ {
bFound = false; bFound = false;
...@@ -3202,7 +3200,7 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ...@@ -3202,7 +3200,7 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
rEntry.eOp = SC_EQUAL; rEntry.eOp = SC_EQUAL;
} }
// Vierte Spalte Wert // Forth column values
if (bValid) if (bValid)
{ {
OUString aStr; OUString aStr;
...@@ -3227,16 +3225,16 @@ bool ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow ...@@ -3227,16 +3225,16 @@ bool ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
for (i=0; i < nCount; i++) for (i=0; i < nCount; i++)
rQueryParam.GetEntry(i).Clear(); rQueryParam.GetEntry(i).Clear();
// Standard QueryTabelle // Standard query tabel
bool bValid = CreateStarQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam); bool bValid = CreateStarQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam);
// Excel QueryTabelle // Excel Query tabel
if (!bValid) if (!bValid)
bValid = CreateExcelQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam); bValid = CreateExcelQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam);
nCount = rQueryParam.GetEntryCount(); nCount = rQueryParam.GetEntryCount();
if (bValid) if (bValid)
{ {
// bQueryByString muss gesetzt sein // bQueryByString must be set
for (i=0; i < nCount; i++) for (i=0; i < nCount; i++)
rQueryParam.GetEntry(i).GetQueryItem().meType = ScQueryEntry::ByString; rQueryParam.GetEntry(i).GetQueryItem().meType = ScQueryEntry::ByString;
} }
......
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