diff options
author | Noel <noelgrandin@gmail.com> | 2020-12-14 15:05:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-14 17:46:15 +0100 |
commit | 1b69f0c2731ec66e76073ab0f2936b7112bf1e77 (patch) | |
tree | dfefda1f5c2e885dac499363a663390ba79793b0 /xmloff | |
parent | eed2f0fd3fb70bcf26539683c4347e418da66ff1 (diff) |
use more direct parsing on FastAttributeList
instead of first allocating an OUString
Change-Id: I796b1b2d47eb3cb9bebb00ae1bbd465010ebf494
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107691
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLTableContext.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/table/XMLTableImport.cxx | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index e00245a2e2c3..8b128461bf35 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -427,9 +427,8 @@ void SchXMLTableColumnContext::startFastElement (sal_Int32 /*nElement*/, { case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_REPEATED): { - OUString aValue = aIter.toString(); - if( !aValue.isEmpty()) - nRepeated = aValue.toInt32(); + if( !aIter.isEmpty()) + nRepeated = aIter.toInt32(); break; } case XML_ELEMENT(TABLE, XML_VISIBILITY): diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index 6d8b30f474ce..d6c2d549c3b5 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -619,21 +619,19 @@ XMLCellImportContext::XMLCellImportContext( SvXMLImport& rImport, // read attributes for the table-cell for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) ) { - const OUString sValue = aIter.toString(); - switch (aIter.getToken()) { case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_REPEATED): - mnRepeated = sValue.toInt32(); + mnRepeated = aIter.toInt32(); break; case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_SPANNED): - mnColSpan = sValue.toInt32(); + mnColSpan = aIter.toInt32(); break; case XML_ELEMENT(TABLE, XML_NUMBER_ROWS_SPANNED): - mnRowSpan = sValue.toInt32(); + mnRowSpan = aIter.toInt32(); break; case XML_ELEMENT(TABLE, XML_STYLE_NAME): - sStyleName = sValue; + sStyleName = aIter.toString(); break; case XML_ELEMENT(XML, XML_ID): //FIXME: TODO |