diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-07-28 21:21:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-29 08:52:51 +0200 |
commit | 01b4c5b27f38d606b05e7a9236ec151e8039972a (patch) | |
tree | caa3df2686d23f7c2318b1d4a3f55b175653b743 /xmloff | |
parent | c97df0d704bfa5eebe573386445abfa4dcfd95b8 (diff) |
cppcheck: useInitializationList in test to xmloff
Change-Id: I50545784c5412ab7767f401c6e40058a1d0bfab0
Reviewed-on: https://gerrit.libreoffice.org/58262
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 17 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 43 |
3 files changed, 27 insertions, 42 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 20a6847f1d5e..94e1fea31043 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1017,16 +1017,13 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl( SvXMLAutoStylePoolP& rASPool ) : mrExport( rExport ), mrAutoStylePool( rASPool ), + mxPropertySetMapper( new XMLChartPropertySetMapper( true ) ), + mxExpPropMapper( new XMLChartExportPropertyMapper( mxPropertySetMapper, rExport ) ), + msTableName("local-table"), mbHasCategoryLabels( false ), mbRowSourceColumns( true ), msCLSID( SvGlobalName( SO3_SCH_CLASSID ).GetHexName() ) { - msTableName = "local-table"; - - // create property set mapper - mxPropertySetMapper = new XMLChartPropertySetMapper( true); - mxExpPropMapper = new XMLChartExportPropertyMapper( mxPropertySetMapper, rExport ); - // register chart auto-style family mrAutoStylePool.AddFamily( XML_STYLE_FAMILY_SCH_CHART_ID, diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 28074c4724a1..6c3abe7d60ba 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -283,17 +283,14 @@ public: }; SvXMLExport_Impl::SvXMLExport_Impl() +: mxUriReferenceFactory( uri::UriReferenceFactory::create(comphelper::getProcessComponentContext()) ), // Written OpenDocument file format doesn't fit to the created text document (#i69627#) - : mbOutlineStyleAsNormalListStyle( false ) - ,mbSaveBackwardCompatibleODF( true ) - ,mStreamName() - ,mNamespaceMaps() - ,mDepth(0) - ,mpRDFaHelper() // lazy - ,mbExportTextNumberElement( false ) - ,mbNullDateInitialized( false ) -{ - mxUriReferenceFactory = uri::UriReferenceFactory::create( comphelper::getProcessComponentContext() ); + mbOutlineStyleAsNormalListStyle( false ), + mbSaveBackwardCompatibleODF( true ), + mDepth( 0 ), + mbExportTextNumberElement( false ), + mbNullDateInitialized( false ) +{ } void SvXMLExport::SetDocHandler( const uno::Reference< xml::sax::XDocumentHandler > &rHandler ) diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index d93d2f9ffbcf..59b48edf7c70 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -92,34 +92,25 @@ public: struct SvXMLNumberInfo { - sal_Int32 nDecimals; - sal_Int32 nInteger; - sal_Int32 nExpDigits; - sal_Int32 nExpInterval; - sal_Int32 nMinNumerDigits; - sal_Int32 nMinDenomDigits; - sal_Int32 nMaxNumerDigits; - sal_Int32 nMaxDenomDigits; - sal_Int32 nFracDenominator; - sal_Int32 nMinDecimalDigits; - sal_Int32 nZerosNumerDigits; - sal_Int32 nZerosDenomDigits; - bool bGrouping; - bool bDecReplace; - bool bExpSign; - bool bDecAlign; - double fDisplayFactor; + sal_Int32 nDecimals = -1; + sal_Int32 nInteger = -1; + sal_Int32 nExpDigits = -1; + sal_Int32 nExpInterval = -1; + sal_Int32 nMinNumerDigits = -1; + sal_Int32 nMinDenomDigits = -1; + sal_Int32 nMaxNumerDigits = -1; + sal_Int32 nMaxDenomDigits = -1; + sal_Int32 nFracDenominator = -1; + sal_Int32 nMinDecimalDigits = -1; + sal_Int32 nZerosNumerDigits = -1; + sal_Int32 nZerosDenomDigits = -1; + bool bGrouping = false; + bool bDecReplace = false; + bool bExpSign = true; + bool bDecAlign = false; + double fDisplayFactor = 1.0; OUString aIntegerFractionDelimiter; std::map<sal_Int32, OUString> m_EmbeddedElements; - - SvXMLNumberInfo() - { - nDecimals = nInteger = nExpDigits = nExpInterval = nMinNumerDigits = nMinDenomDigits = nMaxNumerDigits = nMaxDenomDigits = - nFracDenominator = nMinDecimalDigits = nZerosNumerDigits = nZerosDenomDigits = -1; - bGrouping = bDecReplace = bDecAlign = false; - bExpSign = true; - fDisplayFactor = 1.0; - } }; class SvXMLNumFmtElementContext : public SvXMLImportContext |