From 1461ebbbb5d47d90e31f0945a4878a68fbee5213 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 1 Feb 2017 09:26:27 +0200 Subject: expand out ::sax::Converter::convertNumber to OUString::number which results in much simpler code overall, there is no need to go via an OUStringBuffer all the time Change-Id: I69eba92c93f471fa9a45f97c29c56dcf3cd1ebf8 Reviewed-on: https://gerrit.libreoffice.org/33773 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- reportdesign/source/filter/xml/xmlExport.cxx | 18 +++++------------- reportdesign/source/filter/xml/xmlExport.hxx | 2 -- 2 files changed, 5 insertions(+), 15 deletions(-) (limited to 'reportdesign') diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 25151dd9c0dc..cc5fe5f8d2ed 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -801,7 +801,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) { if ( nEmptyCellColSpan > 0 ) { - AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_COLUMNS_SPANNED,implConvertNumber(nEmptyCellColSpan) ); + AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_COLUMNS_SPANNED, OUString::number(nEmptyCellColSpan) ); bCoveredCell = true; nColSpan = nEmptyCellColSpan - 1; nEmptyCellColSpan = 0; @@ -809,14 +809,14 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) sal_Int32 nSpan = aColIter->nColSpan; if ( nSpan > 1 ) { - AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_COLUMNS_SPANNED,implConvertNumber(nSpan) ); + AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_COLUMNS_SPANNED, OUString::number(nSpan) ); nColSpan = nSpan - 1; bCoveredCell = true; } nSpan = aColIter->nRowSpan; if ( nSpan > 1 ) { - AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_ROWS_SPANNED,implConvertNumber(nSpan) ); + AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_ROWS_SPANNED, OUString::number(nSpan) ); aRowSpan[nColIndex] = nSpan - 1; } if ( aColIter->xElement.is() ) @@ -951,7 +951,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) if ( nEmptyCellColSpan ) { { - AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_COLUMNS_SPANNED,implConvertNumber(nEmptyCellColSpan) ); + AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_COLUMNS_SPANNED, OUString::number(nEmptyCellColSpan) ); SvXMLElementExport aCell(*this,XML_NAMESPACE_TABLE, XML_TABLE_CELL, true, true); if ( !bShapeHandled ) { @@ -971,7 +971,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) if ( nEmptyCellColSpan ) { { - AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_COLUMNS_SPANNED,implConvertNumber(nEmptyCellColSpan) ); + AddAttribute( XML_NAMESPACE_TABLE,XML_NUMBER_COLUMNS_SPANNED, OUString::number(nEmptyCellColSpan) ); SvXMLElementExport aCell(*this,XML_NAMESPACE_TABLE, XML_TABLE_CELL, true, true); if ( !bShapeHandled ) { @@ -1364,14 +1364,6 @@ void ORptExport::ExportStyles_(bool bUsed) GetShapeExport()->ExportGraphicDefaults(); } -OUString ORptExport::implConvertNumber(sal_Int32 _nValue) -{ - OUStringBuffer aBuffer; - ::sax::Converter::convertNumber(aBuffer, _nValue); - return aBuffer.makeStringAndClear(); -} - - SvXMLAutoStylePoolP* ORptExport::CreateAutoStylePool() { return new OXMLAutoStylePoolP(*this); diff --git a/reportdesign/source/filter/xml/xmlExport.hxx b/reportdesign/source/filter/xml/xmlExport.hxx index ad4e972d872c..102af7a03cf1 100644 --- a/reportdesign/source/filter/xml/xmlExport.hxx +++ b/reportdesign/source/filter/xml/xmlExport.hxx @@ -138,8 +138,6 @@ private: void exportGroupsExpressionAsFunction(const Reference< XGroups>& _xGroups); static OUString convertFormula(const OUString& _sFormula); - static OUString implConvertNumber(sal_Int32 _nValue); - virtual void SetBodyAttributes() override; protected: -- cgit