diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-20 12:02:48 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-23 06:17:29 +0000 |
commit | 7b26389414b203a4f3225acf0c027b93bcb234ac (patch) | |
tree | 144aeb20c5e191840c4fb862106b0d0344d0260f /reportdesign/source | |
parent | 85ea267b7a8fbd5859569db6ef7ac8dd1bd9bcd1 (diff) |
clang-tidy clang-analyzer-deadcode.DeadStores
Change-Id: I7113a13ac36db5beef3a17e9849c1f5506df2374
Reviewed-on: https://gerrit.libreoffice.org/25194
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 37 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 7 |
2 files changed, 10 insertions, 34 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 4349d287c4b8..f4ccbb0501a5 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1317,8 +1317,8 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS uno::Sequence < beans::PropertyValue > aProps; // export sub streams for package, else full stream into a file - bool bWarn = false, bErr = false; - OUString sWarnFile, sErrFile; + bool bErr = false; + OUString sErrFile; uno::Reference< beans::XPropertySet> xProp(_xStorageToSaveTo,uno::UNO_QUERY); if ( xProp.is() ) @@ -1373,49 +1373,28 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS if( !bErr ) { xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("settings.xml"))); - if( !WriteThroughComponent( + WriteThroughComponent( xCom, "settings.xml", "com.sun.star.comp.report.XMLSettingsExporter", - aDelegatorArguments, aProps, _xStorageToSaveTo ) ) - { - if( !bWarn ) - { - bWarn = true; - sWarnFile = "settings.xml"; - } - } + aDelegatorArguments, aProps, _xStorageToSaveTo ); } if( !bErr ) { xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("meta.xml"))); - if( !WriteThroughComponent( + WriteThroughComponent( xCom, "meta.xml", "com.sun.star.comp.report.XMLMetaExporter", - aDelegatorArguments, aProps, _xStorageToSaveTo ) ) - { - if( !bWarn ) - { - bWarn = true; - sWarnFile = "meta.xml"; - } - } + aDelegatorArguments, aProps, _xStorageToSaveTo ); } if( !bErr ) { xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("styles.xml"))); - if( !WriteThroughComponent( + WriteThroughComponent( xCom, "styles.xml", "com.sun.star.comp.report.XMLStylesExporter", - aDelegatorArguments, aProps, _xStorageToSaveTo ) ) - { - if( !bWarn ) - { - bWarn = true; - sWarnFile = "styles.xml"; - } - } + aDelegatorArguments, aProps, _xStorageToSaveTo ); } if ( !bErr ) diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 6ab1e188a649..ebb66a3cdba8 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -764,7 +764,6 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) TGrid::const_iterator aRowIter = aFind->second.begin(); TGrid::const_iterator aRowEnd = aFind->second.end(); - sal_Int32 nEmptyCellColSpan = 0; TGridStyleMap::const_iterator aRowFind = m_aRowStyleNames.find(_xSection.get()); TStringVec::const_iterator aHeightIter = aRowFind->second.begin(); OSL_ENSURE(aRowFind->second.size() == aFind->second.size(),"Different count for rows"); @@ -779,7 +778,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) { ::std::vector< TCell >::const_iterator aColIter = aRowIter->second.begin(); ::std::vector< TCell >::const_iterator aColEnd = aRowIter->second.end(); - nEmptyCellColSpan = 0; + sal_Int32 nEmptyCellColSpan = 0; for (; aColIter != aColEnd; ++aColIter) { bool bCoveredCell = false; @@ -964,12 +963,11 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) { SvXMLElementExport aCoveredCell(*this,XML_NAMESPACE_TABLE, XML_COVERED_TABLE_CELL, true, true); } - nEmptyCellColSpan = 0; } } else { // empty rows - nEmptyCellColSpan = aRowIter->second.size(); + sal_Int32 nEmptyCellColSpan = aRowIter->second.size(); if ( nEmptyCellColSpan ) { { @@ -985,7 +983,6 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) { SvXMLElementExport aCoveredCell(*this,XML_NAMESPACE_TABLE, XML_COVERED_TABLE_CELL, true, true); } - nEmptyCellColSpan = 0; } } } |