summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-02 20:51:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-03 13:04:07 +0200
commitcea4168db118f1f545772fd0d0aecf99512d401b (patch)
treebccdac96a2527177948bb3954aec06724a455e4f /sc
parentc20bb38fea30127835c62c9546ca02edf2182737 (diff)
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.grandin@collabora.co.uk> (cherry picked from commit c01fa7ff3bcd3447ea190bcc1833beb7c48a8803) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152535 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table2.cxx3
1 files changed, 1 insertions, 2 deletions
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;
}