sc/source/core/data/table2.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 7a5847b3716ac64ad422f24164c0b765610ffbd7
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jun 2 20:51:53 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Jun 3 10:43:14 2023 +0200

    remove unnecessary ScPatternAttr copy
    
    slightly speeds up loading document with large number of patterns
    
    Change-Id: I1b82145fb0f8a62da0d5a46a43594f7085ce2c22
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152564
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 1bceab692e54..b3a5b9aee9b9 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2902,8 +2902,7 @@ namespace
         std::vector<ScAttrEntry> aData(rOrigData);
         for (size_t nIdx = 0; nIdx < aData.size(); ++nIdx)
         {
-            ScPatternAttr aNewPattern(*aData[nIdx].pPattern);
-            aData[nIdx].pPattern = &rDocument.GetPool()->Put(aNewPattern);
+            aData[nIdx].pPattern = 
&rDocument.GetPool()->Put(*aData[nIdx].pPattern);
         }
         return aData;
     }

Reply via email to