tdf#94677 Calc is slow opening large CSV, avoid std::shared_ptr
Shaves 2s off a load time of 48s
Change-Id: I616d8b4280bee64e7c25eda8523a13cb80b121ad
Reviewed-on: https://gerrit.libreoffice.org/74640
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index bf3d1dc..d3ce46d 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -542,14 +542,14 @@
{
// Read Items
std::shared_ptr<SvxColorItem> aColorItem(std::make_shared<SvxColorItem>(EE_CHAR_COLOR)); // use item as-is
std::shared_ptr<SvxFontItem> aFontItem(std::make_shared<SvxFontItem>(EE_CHAR_FONTINFO)); // use item as-is
std::shared_ptr<SvxFontItem> aCjkFontItem(std::make_shared<SvxFontItem>(EE_CHAR_FONTINFO_CJK)); // use item as-is
std::shared_ptr<SvxFontItem> aCtlFontItem(std::make_shared<SvxFontItem>(EE_CHAR_FONTINFO_CTL)); // use item as-is
std::unique_ptr<SvxColorItem> aColorItem(std::make_unique<SvxColorItem>(EE_CHAR_COLOR)); // use item as-is
std::unique_ptr<SvxFontItem> aFontItem(std::make_unique<SvxFontItem>(EE_CHAR_FONTINFO)); // use item as-is
std::unique_ptr<SvxFontItem> aCjkFontItem(std::make_unique<SvxFontItem>(EE_CHAR_FONTINFO_CJK)); // use item as-is
std::unique_ptr<SvxFontItem> aCtlFontItem(std::make_unique<SvxFontItem>(EE_CHAR_FONTINFO_CTL)); // use item as-is
long nTHeight, nCjkTHeight, nCtlTHeight; // Twips
FontWeight eWeight, eCjkWeight, eCtlWeight;
std::shared_ptr<SvxUnderlineItem> aUnderlineItem(std::make_shared<SvxUnderlineItem>(LINESTYLE_NONE, EE_CHAR_UNDERLINE));
std::shared_ptr<SvxOverlineItem> aOverlineItem(std::make_shared<SvxOverlineItem>(LINESTYLE_NONE, EE_CHAR_OVERLINE));
std::unique_ptr<SvxUnderlineItem> aUnderlineItem(std::make_unique<SvxUnderlineItem>(LINESTYLE_NONE, EE_CHAR_UNDERLINE));
std::unique_ptr<SvxOverlineItem> aOverlineItem(std::make_unique<SvxOverlineItem>(LINESTYLE_NONE, EE_CHAR_OVERLINE));
bool bWordLine;
FontStrikeout eStrike;
FontItalic eItalic, eCjkItalic, eCtlItalic;