[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/editeng sc/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 3 12:31:52 UTC 2020
include/editeng/wghtitem.hxx | 8 ++++++++
sc/source/core/data/table1.cxx | 4 ++++
2 files changed, 12 insertions(+)
New commits:
commit a5010d00be3a2dc1c89935d473b20fcbc127da86
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Jun 2 17:15:15 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jun 3 14:31:23 2020 +0200
tdf#88109 improve autofill perf (2)
make SvxWeightItem sortable, which shaves off 1%
and turn the tree search off while performing this operation, which
shaves off about 25% of the time on my machine.
Change-Id: I94358ed565a0d9f1cc0ddb36b8349e83c9deb959
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95369
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 9073a47b99e22585c6d1603dd747cb14f081fca1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95414
diff --git a/include/editeng/wghtitem.hxx b/include/editeng/wghtitem.hxx
index 121cfcf318a6..6f5f4b31ccc3 100644
--- a/include/editeng/wghtitem.hxx
+++ b/include/editeng/wghtitem.hxx
@@ -59,6 +59,14 @@ public:
FontWeight GetWeight() const { return GetValue(); }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+
+ virtual bool IsSortable() const override { return true; }
+
+ virtual bool operator<(const SfxPoolItem& rCmp) const override
+ {
+ auto const & other = static_cast<const SvxWeightItem&>(rCmp);
+ return GetValue() < other.GetValue();
+ }
};
#endif // INCLUDED_EDITENG_WGHTITEM_HXX
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 022a57f2503f..16e6e5d594d5 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -464,6 +464,8 @@ bool ScTable::SetOptimalHeight(
ScProgress* pProgress = GetProgressBar(nCount, GetWeightedCount(), pOuterProgress, pDocument);
+ mpRowHeights->enableTreeSearch(false);
+
GetOptimalHeightsInColumn(rCxt, aCol, nStartRow, nEndRow, pProgress, nProgressStart);
SetRowHeightRangeFunc aFunc(this, rCxt.getPPTY());
@@ -472,6 +474,8 @@ bool ScTable::SetOptimalHeight(
if ( pProgress != pOuterProgress )
delete pProgress;
+ mpRowHeights->enableTreeSearch(true);
+
return bChanged;
}
More information about the Libreoffice-commits
mailing list