summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/sheetdatabuffer.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-13 10:10:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-14 08:28:15 +0200
commita4fb52ac0f48b10b72be330fe49d99a9a2471751 (patch)
treeeaf53307c7534a47ecdc5b5729e5109f50fafe1a /sc/source/filter/oox/sheetdatabuffer.cxx
parentf70e0ec6b3c61a7c7caa469949b0ac8016c89854 (diff)
convert ScAttrArray to use std::vector
instead of re-implementing it ourselves. Which lead to some changes in Xf::AttrList since the import process wants to donate it's array to ScAttrArray. Change-Id: I176148131fb5f163e25691ad690f63398ba1a556 Reviewed-on: https://gerrit.libreoffice.org/42205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/oox/sheetdatabuffer.cxx')
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index ea5406bc1bf3..f6c6d8be0792 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -485,14 +485,10 @@ void SheetDataBuffer::finalizeImport()
}
ScDocumentImport::Attrs aAttrParam;
- aAttrParam.mnSize = aAttrs.maAttrs.size();
- aAttrParam.mpData = new ScAttrEntry[aAttrParam.mnSize];
+ aAttrParam.mvData.swap(aAttrs.maAttrs);
aAttrParam.mbLatinNumFmtOnly = aAttrs.mbLatinNumFmtOnly;
- std::list<ScAttrEntry>::const_iterator itr = aAttrs.maAttrs.begin(), itrEnd = aAttrs.maAttrs.end();
- for (size_t i = 0; itr != itrEnd; ++itr, ++i)
- aAttrParam.mpData[i] = *itr;
- rDoc.setAttrEntries(getSheetIndex(), nScCol, aAttrParam);
+ rDoc.setAttrEntries(getSheetIndex(), nScCol, std::move(aAttrParam));
}
// merge all cached merged ranges and update right/bottom cell borders