[Libreoffice-commits] core.git: include/svl sc/inc sc/qa sc/source svl/source
include/svl/zforlist.hxx |7 -- sc/inc/cellform.hxx |2 - sc/inc/column.hxx|5 +++- sc/inc/queryentry.hxx|3 +- sc/inc/table.hxx |2 - sc/qa/uitest/autofilter/autofilter.py| 15 ++ sc/qa/uitest/data/autofilter/time_value.xlsx |binary sc/source/core/data/column.cxx |3 +- sc/source/core/data/column3.cxx |5 ++-- sc/source/core/data/documen3.cxx |2 - sc/source/core/data/table3.cxx | 13 +++- sc/source/core/tool/cellform.cxx |4 +-- sc/source/core/tool/queryentry.cxx |2 - sc/source/ui/unoobj/datauno.cxx | 14 - sc/source/ui/view/gridwin.cxx| 28 --- svl/source/numbers/zforlist.cxx |6 +++-- 16 files changed, 79 insertions(+), 32 deletions(-) New commits: commit 4fd1333ba4bb4f2311e9098291154772bd310429 Author: Balazs Varga AuthorDate: Thu Mar 11 14:44:49 2021 +0100 Commit: László Németh CommitDate: Thu Mar 25 15:00:31 2021 +0100 tdf#140968 tdf#140978 XLSX import: fix lost rounded filters if the stored filter values are in the visible cell format (e.g. rounded values) instead of the original (editing) values. Now AutoFilter popup window shows the items according to the visible cell format (e.g. 1.0 instead of 1.01 or 0.99), but still grouping them based on the "editing format" (e.g. not rounded values which visible during editing), i.e. there could be repeated values in the filtering conditions (e.g. two options "1.0" and "1.0" for 1.01 and 0.99). Note: Next step will be to group and filter based on the actual cell format, like MSO does, to simplify filtering of values rounded by the cell format (e.g. selecting the single AutoFilter condition "1.0" to filter both 1.01 and 0.99). Change-Id: I430da5e09794fc4ed8acf79b6485926f46b70277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112343 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index fe148e978466..7a8703873460 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -560,9 +560,12 @@ public: OUString& sOutString, const Color** ppColor, bool bUseStarFormat = false ); /** Format a number according to the standard default format matching -the given format index */ +the given format index. rOutString will be the real cell string (e.g. +a number rounded by the cell format, which rounded value is used +in the filtering condition now), instead of the EditFormat string +(e.g a not rounded value, which is visible during editing).*/ void GetInputLineString( const double& fOutNumber, - sal_uInt32 nFIndex, OUString& rOutString ); + sal_uInt32 nFIndex, OUString& rOutString, bool bFiltering = false ); /** Format a number according to a format code string to be scanned. @return diff --git a/sc/inc/cellform.hxx b/sc/inc/cellform.hxx index afda8feea89a..02ea8b6e6347 100644 --- a/sc/inc/cellform.hxx +++ b/sc/inc/cellform.hxx @@ -44,7 +44,7 @@ public: static void GetInputString( const ScRefCellValue& rCell, sal_uInt32 nFormat, OUString& rString, SvNumberFormatter& rFormatter, -const ScDocument& rDoc ); +const ScDocument& rDoc, bool bFiltering = false ); static OUString GetOutputString( ScDocument& rDoc, const ScAddress& rPos, const ScRefCellValue& rCell ); diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 1395d7ec7825..4f88f556e9eb 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -134,6 +134,8 @@ class ScColumn SCCOL nCol; SCTAB nTab; +bool mbFiltering; // it is true if there is a filtering in the column + friend class ScDocument;// for FillInfo friend class ScTable; friend class ScValueIterator; @@ -181,6 +183,7 @@ public: ScDocument& GetDoc() const { return pAttrArray->GetDoc(); } SCTAB GetTab() const { return nTab; } SCCOL GetCol() const { return nCol; } +bool HasFiltering() const { return mbFiltering; } sc::CellStoreType& GetCellStore() { return maCells; } const sc::CellStoreType& GetCellStore() const { return maCells; } sc::CellTextAttrStoreType& GetCellAttrStore() { return maCellTextAttrs; } @@ -534,7 +537,7 @@ public: void GetFilterEntries( sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow, -ScFilterEntries& rFilterEntries ); +ScFilterEntries& rFilterEntries, bool bFiltering ); bool GetDataEntries( SCROW nRow, std::set& rStrings, bool bLimit )
[Libreoffice-commits] core.git: include/svl sc/inc sc/qa sc/source svl/source
include/svl/broadcast.hxx | 10 +- sc/inc/cellvalue.hxx |2 sc/inc/clipcontext.hxx|5 + sc/inc/column.hxx | 17 +++-- sc/inc/document.hxx |2 sc/inc/formulacell.hxx|9 +- sc/inc/grouparealistener.hxx |6 + sc/inc/stringutil.hxx |3 sc/inc/table.hxx |5 + sc/inc/types.hxx |7 ++ sc/qa/unit/ucalc.hxx | 25 ++- sc/qa/unit/ucalc_sharedformula.cxx| 101 ++ sc/source/core/data/bcaslot.cxx | 24 +++ sc/source/core/data/cellvalue.cxx |4 - sc/source/core/data/clipcontext.cxx | 14 +++- sc/source/core/data/column.cxx| 36 -- sc/source/core/data/column3.cxx | 43 sc/source/core/data/column4.cxx |2 sc/source/core/data/document.cxx | 28 sc/source/core/data/document10.cxx| 34 ++ sc/source/core/data/formulacell.cxx | 59 +++-- sc/source/core/data/table2.cxx| 14 +++- sc/source/core/inc/bcaslot.hxx|5 + sc/source/core/tool/grouparealistener.cxx | 17 - sc/source/core/tool/stringutil.cxx|3 sc/source/ui/undo/refundo.cxx | 38 ++- svl/source/notify/broadcast.cxx |4 - 27 files changed, 435 insertions(+), 82 deletions(-) New commits: commit 0dae7466fff1e742543ef7512b7dd22472c75624 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Tue Nov 25 00:02:21 2014 -0500 Adjust ref undo to ensure group area listeners are used. When undoing row deletion (and possibly other similar undo's). And write test for it. Change-Id: I04b4fd9932f4236f124dcd25967355c6055dec33 diff --git a/include/svl/broadcast.hxx b/include/svl/broadcast.hxx index 5615255..a73abea 100644 --- a/include/svl/broadcast.hxx +++ b/include/svl/broadcast.hxx @@ -41,7 +41,7 @@ private: * entries. As a side effect, the listeners get sorted by pointer values * after this call. */ -void Normalize(); +void Normalize() const; void Add( SvtListener* p ); void Remove( SvtListener* p ); @@ -74,16 +74,16 @@ public: void PrepareForDestruction(); private: -ListenersType maListeners; +mutable ListenersType maListeners; /// When the broadcaster is about to die, collect listeners that asked for removal. -ListenersType maDestructedListeners; +mutable ListenersType maDestructedListeners; /// Indicate that this broadcaster will be destructed (we indicate this on all ScColumn's broadcasters during the ScTable destruction, eg.) bool mbAboutToDie:1; bool mbDisposing:1; -bool mbNormalized:1; -bool mbDestNormalized:1; +mutable bool mbNormalized:1; +mutable bool mbDestNormalized:1; }; diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx index 9154e30..3a2d3c8 100644 --- a/sc/inc/cellvalue.hxx +++ b/sc/inc/cellvalue.hxx @@ -76,7 +76,7 @@ struct SC_DLLPUBLIC ScCellValue */ void release( ScDocument rDoc, const ScAddress rPos ); -void release( ScColumn rColumn, SCROW nRow ); +void release( ScColumn rColumn, SCROW nRow, sc::StartListeningType eListenType = sc::SingleCellListening ); OUString getString( const ScDocument* pDoc ); diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx index 3891274..aa783e4 100644 --- a/sc/inc/clipcontext.hxx +++ b/sc/inc/clipcontext.hxx @@ -144,9 +144,14 @@ public: class CopyToDocContext : public ClipContextBase { +bool mbStartListening; + public: CopyToDocContext(ScDocument rDoc); virtual ~CopyToDocContext(); + +void setStartListening( bool b ); +bool isStartListening() const; }; class MixDocContext : public ClipContextBase diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 102af12..7f883a6 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -314,8 +314,12 @@ public: * @return pCell if it was successfully inserted, NULL otherwise. pCell * is deleted automatically on failure to insert. */ -ScFormulaCell* SetFormulaCell( SCROW nRow, ScFormulaCell* pCell, bool bSingle = false ); -ScFormulaCell* SetFormulaCell( sc::ColumnBlockPosition rBlockPos, SCROW nRow, ScFormulaCell* pCell ); +ScFormulaCell* SetFormulaCell( +SCROW nRow, ScFormulaCell* pCell, +sc::StartListeningType eListenType = sc::SingleCellListening ); +ScFormulaCell* SetFormulaCell( +sc::ColumnBlockPosition rBlockPos, SCROW nRow, ScFormulaCell* pCell, +sc::StartListeningType eListenType = sc::SingleCellListening ); bool SetFormulaCells( SCROW nRow, std::vectorScFormulaCell* rCells ); @@ -639,10 +643,15 @@ private: sc::CellStoreType::iterator