--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/core/data/column.cxx 2003-04-15 22:55:52.000000000 +0530 +++ /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/core/data/column.cxx 2004-10-13 13:32:36.888372528 +0530 @@ -1322,6 +1322,9 @@ for (i = 0; i < nCount; i++) if ((pItems[i].nRow >= nRow1) && (pItems[i].nRow <= nRow2)) { + + if ( pDocument->RowFiltered( pItems[i].nRow , nTab)) + continue; if (!nBlockCount) nStartIndex = i; nEndIndex = i; @@ -1342,7 +1345,11 @@ { rColumn.Resize( rColumn.GetCellCount() + nBlockCount ); for (i = nStartIndex; i <= nEndIndex; i++) + { + if ( pDocument->RowFiltered( pItems[i].nRow , nTab)) + continue; rColumn.Append(pItems[i].nRow, pItems[i].pCell->Clone(rColumn.pDocument)); + } } } --- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/core/data/column3.cxx 2003-03-26 23:33:52.000000000 +0530 +++ /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/core/data/column3.cxx 2004-10-13 11:16:15.567122408 +0530 @@ -398,6 +398,17 @@ BOOL bSimple = ((nDelFlag & IDF_CONTENTS) == IDF_CONTENTS); USHORT i; + /* + *If we are deleting a range that has filtered column, let it not be simple + */ + + if (bSimple) + { + for (i = nStartIndex; i <= nEndIndex && bSimple; i++) + if ( pDocument->RowFiltered(pItems[i].nRow, nTab)) + bSimple = FALSE; + } + // Notiz-Zeichenobjekte if (nDelFlag & IDF_NOTE) { @@ -452,6 +463,16 @@ BOOL bDelete = FALSE; ScBaseCell* pOldCell = pItems[j].pCell; CellType eCellType = pOldCell->GetCellType(); + + /* + * If the rows are filtered continue instead deleting. + */ + if ( pDocument->RowFiltered( pItems[j].nRow, nTab)) + { + ++j; + continue; + } + switch ( eCellType ) { case CELLTYPE_VALUE: --- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/inc/document.hxx 2004-09-14 09:12:10.000000000 +0530 +++ /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/inc/document.hxx 2004-10-12 11:44:52.000000000 +0530 @@ -508,6 +508,8 @@ long GetWeightedCount() const; // Formeln und Edit staerker gewichtet ULONG GetCodeCount() const; // RPN-Code in Formeln DECL_LINK( GetUserDefinedColor, USHORT * ); + BOOL RowFiltered( USHORT nRow, USHORT nTab ) const; // FillInfo + BOOL ColFiltered( USHORT nCol, USHORT nTab ) const; // FillInfo // Numberformatter public: @@ -1698,6 +1700,15 @@ return ( pTab[nTab]->pRowFlags[nRow] & CR_HIDDEN ) != 0; } +inline BOOL ScDocument::ColFiltered( USHORT nCol, USHORT nTab ) const +{ + return ( pTab[nTab]->pColFlags[nCol] & CR_FILTERED) != 0; +} + +inline BOOL ScDocument::RowFiltered( USHORT nRow, USHORT nTab ) const +{ + return ( pTab[nTab]->pRowFlags[nRow] & CR_FILTERED) != 0; +} #endif