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

New commits:
commit cea4168db118f1f545772fd0d0aecf99512d401b
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 13:04:07 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>
    (cherry picked from commit c01fa7ff3bcd3447ea190bcc1833beb7c48a8803)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152535
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 47b3d1634c77..9a163e25b74e 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2907,8 +2907,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