summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-01 09:26:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-02 08:00:10 +0000
commit1461ebbbb5d47d90e31f0945a4878a68fbee5213 (patch)
tree5af28d3cdaf4d5195ddf9e69727807ab8104a8e2 /reportdesign
parentc0f9bdd3e644e3ebf690aff9eb1aeec4f16dbf27 (diff)
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 <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx18
-rw-r--r--reportdesign/source/filter/xml/xmlExport.hxx2
2 files changed, 5 insertions, 15 deletions
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: