ElyTable: a filtered range keeps its rows only for a cell inside it (R2.9)
This commit is contained in:
3 files changed
+61
-12
No files matched your search
@@ -7,8 +7,8 @@ appended rows join) and whenever a command finds it from a single cell
|
||||
its undo). A totals row right under a marked block joined the filter,
|
||||
showed in its list and hid with the data; a saved range reopened grew
|
||||
the same way. Under LOK the range keeps the rows it was set on, as in
|
||||
Excel. A single cell still takes the data area when the filter is set.
|
||||
|
||||
Excel, while the cursor is inside it; a cell in another block finds
|
||||
that block. A single cell still takes the data area when the filter is set.
|
||||
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
|
||||
index b1d714c55..9a01847ee 100644
|
||||
--- a/sc/source/core/tool/dbdata.cxx
|
||||
@@ -41,7 +41,7 @@ index b1d714c55..9a01847ee 100644
|
||||
SCCOL nOldCol1 = nStartCol, nOldCol2 = nEndCol;
|
||||
SCROW nOldEndRow = nEndRow;
|
||||
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
|
||||
index d154597c3..54a2344af 100644
|
||||
index d154597c3..5099dbe6f 100644
|
||||
--- a/sc/source/ui/docshell/docsh5.cxx
|
||||
+++ b/sc/source/ui/docshell/docsh5.cxx
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -52,13 +52,14 @@ index d154597c3..54a2344af 100644
|
||||
|
||||
#include <cassert>
|
||||
|
||||
@@ -147,7 +148,9 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
|
||||
@@ -147,7 +148,10 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
|
||||
if (!bSelected)
|
||||
{
|
||||
bUseThis = true;
|
||||
- if ( bIsNoName && (eMode == SC_DB_MAKE || eMode == SC_DB_AUTOFILTER) )
|
||||
+ // LOK: an AutoFilter range keeps its rows, as in Excel.
|
||||
+ const bool bKeep = comphelper::LibreOfficeKit::isActive() && pData->HasAutoFilter();
|
||||
+ const bool bKeep = comphelper::LibreOfficeKit::isActive() && pData->HasAutoFilter()
|
||||
+ && nCol >= nOldCol1 && nCol <= nOldCol2 && nRow >= nOldRow1 && nRow <= nOldRow2;
|
||||
+ if ( bIsNoName && !bKeep && (eMode == SC_DB_MAKE || eMode == SC_DB_AUTOFILTER) )
|
||||
{
|
||||
// If nothing marked or only one row marked, adapt
|
||||
|
||||
Reference in new issue
Block a user