summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-24 08:37:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-24 10:53:05 +0200
commit57de1a3c279d4ecfaa020626296f7e667765e5a3 (patch)
treef7d49701357ae4ccb4729bbf9fd50ceac6801393 /sc/source/filter/oox
parent90e3b47b52f26420425a7417d2f51b6a386282d9 (diff)
simplify call sites of SfxItemPool::Put
use template to make return type match input type, so we don't need to cast at the call sites Change-Id: I1e65f362c67f74c9a230cdbc1db12545b28eb499 Reviewed-on: https://gerrit.libreoffice.org/71216 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index be046906a033..bb5e6f934f19 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2079,7 +2079,7 @@ void Xf::applyPatternToAttrList( AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal
// Fill this gap with the default pattern.
ScAttrEntry aEntry;
aEntry.nEndRow = nRow1 - 1;
- aEntry.pPattern = static_cast<const ScPatternAttr*>(&rDoc.GetPool()->Put(*rAttrs.mpDefPattern));
+ aEntry.pPattern = &rDoc.GetPool()->Put(*rAttrs.mpDefPattern);
rAttrs.maAttrs.push_back(aEntry);
// Check if the default pattern is 'General'.
@@ -2089,7 +2089,7 @@ void Xf::applyPatternToAttrList( AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal
ScAttrEntry aEntry;
aEntry.nEndRow = nRow2;
- aEntry.pPattern = static_cast<const ScPatternAttr*>(&rDoc.GetPool()->Put(rPat));
+ aEntry.pPattern = &rDoc.GetPool()->Put(rPat);
rAttrs.maAttrs.push_back(aEntry);
if (!sc::NumFmtUtil::isLatinScript(*aEntry.pPattern, rDoc))