diff options
author | Eike Rathke [er] <erAck@sun.com> | 2010-02-24 12:16:42 +0100 |
---|---|---|
committer | Eike Rathke [er] <erAck@sun.com> | 2010-02-24 12:16:42 +0100 |
commit | 19e19bafa255e9ff6daa0b9504eaa88cf1bfa4fa (patch) | |
tree | c983ce1cff87f1487685d285a1e5160f171400b0 /sc/inc | |
parent | 25b005cbda460837f063ddf996c1ec72d4f4865b (diff) |
calcfilterrange: #i109553# #160403# for filters (AutoFilter, StandardFilter, AdvancedFilter) shrink selected area to used data area and expand single selected row down to end of data
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/document.hxx | 11 | ||||
-rw-r--r-- | sc/inc/global.hxx | 23 | ||||
-rw-r--r-- | sc/inc/table.hxx | 4 |
3 files changed, 35 insertions, 3 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index cc575b529d73..1d8986b1876f 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -866,10 +866,17 @@ public: USHORT GetErrCode( const ScAddress& ) const; - bool ShrinkToDataArea(SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow) const; + /** Shrink a range to only include data area. + This is not the actually used area within the + selection, but the bounds of the sheet's data area + instead. */ + bool ShrinkToDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const; + + /** Shrink a range to only include used data area. */ + bool ShrinkToUsedDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly ) const; void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, - SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld ); + SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld, bool bOnlyDown ); SC_DLLPUBLIC BOOL GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; SC_DLLPUBLIC BOOL GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; SC_DLLPUBLIC BOOL GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index c938968ddfef..fafe1a3514f0 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -417,6 +417,29 @@ enum ScGetDBMode SC_DB_OLD // nicht neu anlegen }; +/// For ScDBFunc::GetDBData() +enum ScGetDBSelection +{ + /** Keep selection as is, expand to used data area if no selection. */ + SC_DBSEL_KEEP, + + /** Shrink selection to sheet's data area. */ + SC_DBSEL_SHRINK_TO_SHEET_DATA, + + /** Shrink selection to actually used data area within the selection. */ + SC_DBSEL_SHRINK_TO_USED_DATA, + + /** If only one row or portion thereof is selected, shrink row to used data + columns and select further rows down until end of data. If an area is + selected, shrink rows to actually used columns. Else, no selection, + expand to used data area. */ + SC_DBSEL_ROW_DOWN, + + /** Behave as if the range corresponding to a ScDBData area was selected, + for API use. */ + SC_DBSEL_FORCE_MARK +}; + enum ScLkUpdMode { //Verknuepfungen LM_ALWAYS, //immer aktualisieren diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index f400054d00b7..1edf239e49a8 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -377,7 +377,9 @@ public: SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW nEndRow ); void GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, - BOOL bIncludeOld ); + BOOL bIncludeOld, bool bOnlyDown ) const; + + bool ShrinkToUsedDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly ) const; SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ); |