[Libreoffice-commits] core.git: sc/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 8 20:18:34 UTC 2021
sc/source/ui/unoobj/chart2uno.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 993ae97e38e72e9d5dabeb0f3abafdc55c73161e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Sep 8 21:11:05 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Sep 8 22:17:59 2021 +0200
avoid double-lookup
this is hot when creating charts
Change-Id: Ic096d9293a48d53fc2cadfda95b5b7a13ba16f68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121830
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 5efa562cb352..3ee4f1cde054 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -760,12 +760,13 @@ void Chart2Positioner::createPositionMap()
aCellData.SetAbsRow(nRow);
aCellData.SetAbsTab(nTab);
- if (rCol.find(nInsRow) == rCol.end())
+ auto& rCell = rCol[nInsRow];
+ if (!rCell)
{
if (bExternal)
- rCol[ nInsRow ].reset(new ScExternalSingleRefToken(nFileId, aTabName, aCellData));
+ rCell.reset(new ScExternalSingleRefToken(nFileId, aTabName, aCellData));
else
- rCol[ nInsRow ].reset(new ScSingleRefToken(mpDoc->GetSheetLimits(), aCellData));
+ rCell.reset(new ScSingleRefToken(mpDoc->GetSheetLimits(), aCellData));
}
}
}
More information about the Libreoffice-commits
mailing list