summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-10-04 16:47:03 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-10-04 16:47:03 -0400
commit9ef870bb6f2f101cdf9f55f198c4f2c84d29a42a (patch)
tree692718ce1241fcba1fe0407a1095cd3f4aaccd6a /sc/source/ui
parent8b586cfbf1032e944b5a81cb7fe496f869e7701d (diff)
Ported calc-subtotal-function-update.diff from ooo-build.
With this change, Calc correctly recalculates cells containing SUBTOTAL function when sheet's filtering state changes, instead of recalculating all formula cells that listens to those ranges whose filtering state has changed. The latter is wrong since the values of the filtered ranges haven't changed.
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index cf149d258062..c7a2f838e087 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -942,10 +942,9 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
pDoc->UpdatePageBreaks( nTab );
}
- // #i23299# because of Subtotal functions, the whole rows must be set dirty
- ScRange aDirtyRange( 0 , aLocalParam.nRow1, nDestTab,
- MAXCOL, aLocalParam.nRow2, nDestTab );
- pDoc->SetDirty( aDirtyRange );
+ // #i23299# Subtotal functions depend on cell's filtered states.
+ ScRange aDirtyRange(0 , aLocalParam.nRow1, nDestTab, MAXCOL, aLocalParam.nRow2, nDestTab);
+ pDoc->SetSubTotalCellsDirty(aDirtyRange);
if ( bRecord )
{