diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-20 13:03:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-21 07:58:14 +0200 |
commit | c757117afb398277a46e79ba22066c5bbf2c9f72 (patch) | |
tree | 0c27216e2364d8e8f0c27caf7accda36bfbc2ab2 /sc/inc/table.hxx | |
parent | eb5606511fac2a8ee1af7cc03c12d6c5b16f7c96 (diff) |
tdf#81765 slow loading of .ods with >1000 of conditional formats, part 2
This takes the loading time from 15s to 14s.
Reduce unnecessary allocation/copying by passing down ownership of the
newly created ScPatternAttr to the item pool
Change-Id: Iec38bbff572d10ff8d86f5e65fbe9a96b6a5a706
Reviewed-on: https://gerrit.libreoffice.org/71010
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/table.hxx')
-rw-r--r-- | sc/inc/table.hxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index e9b1e3f54c65..50f6c5f85aef 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -707,11 +707,9 @@ public: const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = nullptr, bool* const pIsChanged = nullptr ); - void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr ) - { - if (ValidColRow(rPos.Col(),rPos.Row())) - aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr ); - } + void SetPattern( const ScAddress& rPos, std::unique_ptr<ScPatternAttr> ); + void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr ); + const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, std::unique_ptr<ScPatternAttr> ); void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr ); void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange, const ScPatternAttr& rPattern, SvNumFormatType nNewType ); |