1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
--- /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
+++ 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
+++ 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
+++ 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
|