From 9c1826d98065c30411cbf2e731560165ca2b7668 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 8 Sep 2017 19:06:41 +0200 Subject: sc-perf: do not add a million empty filter entries just to sort and discard Which can happen if an (anonymous) database range as filter range was selected to span an entire column of which most (the tail) is empty cells. The entries are processed to be unique anyway. This significantly shortens the time to display the filter dialog. Happened with attachment http://bugs.documentfoundation.org/attachment.cgi?id=136074 of bug https://bugs.documentfoundation.org/show_bug.cgi?id=112258 Change-Id: Ia169911d6f23611a3b3ecbf291757465f1998210 Reviewed-on: https://gerrit.libreoffice.org/42118 Tested-by: Jenkins Reviewed-by: Eike Rathke --- sc/inc/column.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sc/inc/column.hxx') diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index b9b5b01f3fe2..6d2ac9e44cf1 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -105,6 +105,7 @@ struct ScCellValue; class ScDocumentImport; class ScHint; enum class ScMF; +struct ScFilterEntries; struct ScNeededSizeOptions { @@ -522,7 +523,7 @@ public: void GetFilterEntries( sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow, - std::vector& rStrings, bool& rHasDates ); + ScFilterEntries& rFilterEntries ); bool GetDataEntries( SCROW nRow, std::set& rStrings, bool bLimit ) const; -- cgit