diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:27:33 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:27:33 +0200 |
commit | 1cea5a80a71243e780bfc2cc161044449a87eda9 (patch) | |
tree | a883a4225b719db9531080c951e2834fae3c9761 | |
parent | 18f390b7a358abad2f04ddb87fc32e82d5205d5e (diff) |
loplugin:casttovoid: writerfilter
Change-Id: I83d5fa6f2912069bd60a6af5ebe5e543997c20a7
-rw-r--r-- | writerfilter/source/dmapper/CellColorHandler.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/CellMarginHandler.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 10 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 21 | ||||
-rw-r--r-- | writerfilter/source/dmapper/MeasureHandler.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/OLEHandler.cxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMapHelper.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/SettingsTable.cxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TDefTableHandler.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TrackChangesHandler.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/util.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/ooxml/qnametostrcore.cxx | 4 |
14 files changed, 14 insertions, 56 deletions
diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx index 58c2a35457cc..f1ce39a6b917 100644 --- a/writerfilter/source/dmapper/CellColorHandler.cxx +++ b/writerfilter/source/dmapper/CellColorHandler.cxx @@ -146,10 +146,7 @@ void CellColorHandler::lcl_attribute(Id rName, Value & rVal) } } -void CellColorHandler::lcl_sprm(Sprm & rSprm) -{ - (void)rSprm; -} +void CellColorHandler::lcl_sprm(Sprm &) {} TablePropertyMapPtr CellColorHandler::getProperties() { diff --git a/writerfilter/source/dmapper/CellMarginHandler.cxx b/writerfilter/source/dmapper/CellMarginHandler.cxx index 5fbd99f363dd..1055b2745c5d 100644 --- a/writerfilter/source/dmapper/CellMarginHandler.cxx +++ b/writerfilter/source/dmapper/CellMarginHandler.cxx @@ -52,8 +52,6 @@ CellMarginHandler::~CellMarginHandler() void CellMarginHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); - (void)nIntValue; - (void)rName; switch( rName ) { case NS_ooxml::LN_CT_TblWidth_w: diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index fab6ff1d255e..92bcdc30f969 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -165,10 +165,7 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon uno::Reference< document::XDocumentPropertiesSupplier > xPropSupplier( xModel, uno::UNO_QUERY_THROW); xImporter->importProperties( xDocumentStorage, xPropSupplier->getDocumentProperties() ); } - catch( const uno::Exception& rEx ) - { - (void)rEx; - } + catch( const uno::Exception& ) {} } DomainMapper::~DomainMapper() @@ -219,10 +216,7 @@ DomainMapper::~DomainMapper() xDocProps->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag.getAsConstPropertyValueList())); } } - catch( const uno::Exception& rEx ) - { - (void)rEx; - } + catch( const uno::Exception& ) {} #ifdef DEBUG_WRITERFILTER TagLogger::getInstance().endDocument(); diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index db2c4fa4d5c9..9f73f8cf0641 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -870,27 +870,6 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl ++nCell; ++aCellIterator; } -#ifdef DEBUG_WRITERFILTER - //-->debug cell properties - { - OUString sNames; - const uno::Sequence< beans::PropertyValues > aDebugCurrentRow = aCellProperties[nRow]; - sal_Int32 nDebugCells = aDebugCurrentRow.getLength(); - (void) nDebugCells; - for( sal_Int32 nDebugCell = 0; nDebugCell < nDebugCells; ++nDebugCell) - { - const uno::Sequence< beans::PropertyValue >& aDebugCellProperties = aDebugCurrentRow[nDebugCell]; - sal_Int32 nDebugCellProperties = aDebugCellProperties.getLength(); - for( sal_Int32 nDebugProperty = 0; nDebugProperty < nDebugCellProperties; ++nDebugProperty) - { - sNames += aDebugCellProperties[nDebugProperty].Name + "-"; - } - sNames += "\n"; - } - (void)sNames; - } - //--< -#endif ++nRow; ++aRowOfCellsIterator; ++aRowIter; diff --git a/writerfilter/source/dmapper/MeasureHandler.cxx b/writerfilter/source/dmapper/MeasureHandler.cxx index 715215297bde..43fce6b4b24f 100644 --- a/writerfilter/source/dmapper/MeasureHandler.cxx +++ b/writerfilter/source/dmapper/MeasureHandler.cxx @@ -47,7 +47,6 @@ MeasureHandler::~MeasureHandler() void MeasureHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); - (void)rName; switch( rName ) { case NS_ooxml::LN_CT_TblWidth_type:// = 90668; @@ -101,10 +100,7 @@ void MeasureHandler::lcl_attribute(Id rName, Value & rVal) } -void MeasureHandler::lcl_sprm(Sprm & rSprm) -{ - (void)rSprm; -} +void MeasureHandler::lcl_sprm(Sprm &) {} sal_Int32 MeasureHandler::getMeasureValue() const diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx index 6097e02c6137..1f01c77e3fd4 100644 --- a/writerfilter/source/dmapper/OLEHandler.cxx +++ b/writerfilter/source/dmapper/OLEHandler.cxx @@ -69,7 +69,6 @@ OLEHandler::~OLEHandler() void OLEHandler::lcl_attribute(Id rName, Value & rVal) { OUString sStringValue = rVal.getString(); - (void)rName; switch( rName ) { case NS_ooxml::LN_CT_OLEObject_Type: diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index d2191f796427..7ce401bd4a95 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -1311,10 +1311,9 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) Insert( PROP_GRID_STANDARD_MODE, uno::makeAny( !bSquaredPageMode ) ); xDocProperties->setPropertyValue( "DefaultPageMode", uno::makeAny( bSquaredPageMode ) ); } - catch ( const uno::Exception& rEx ) + catch ( const uno::Exception& ) { OSL_ENSURE( false, "Exception in SectionPropertyMap::CloseSectionGroup" ); - (void)rEx; } Insert( PROP_GRID_BASE_HEIGHT, uno::makeAny( nGridLinePitch ) ); diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx index 2ec048c42f50..e1afdd6d23ed 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.cxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx @@ -30,7 +30,6 @@ using namespace ::com::sun::star; void lcl_DumpTableColumnSeparators(const uno::Any & rTableColumnSeparators) { - (void) rTableColumnSeparators; #ifdef DEBUG_WRITERFILTER uno::Sequence<text::TableColumnSeparator> aSeq; rTableColumnSeparators >>= aSeq; @@ -49,6 +48,8 @@ void lcl_DumpTableColumnSeparators(const uno::Any & rTableColumnSeparators) } TagLogger::getInstance().endElement(); +#else + (void) rTableColumnSeparators; #endif // DEBUG_WRITERFILTER } diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index 9c2f2f46783f..196a2a237af9 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -166,7 +166,6 @@ void SettingsTable::lcl_sprm(Sprm& rSprm) Value::Pointer_t pValue = rSprm.getValue(); sal_Int32 nIntValue = pValue->getInt(); - (void)nIntValue; OUString sStringValue = pValue->getString(); switch(nSprmId) diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 13d520f75441..1c1702c12790 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -1141,7 +1141,6 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) } catch( const lang::WrappedTargetException& rWrapped) { - (void) rWrapped; #ifdef DEBUG_WRITERFILTER OUString aMessage("StyleSheetTable::ApplyStyleSheets: Some style properties could not be set"); beans::UnknownPropertyException aUnknownPropertyException; @@ -1150,6 +1149,8 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) aMessage += ": " + aUnknownPropertyException.Message; SAL_WARN("writerfilter", aMessage); +#else + (void) rWrapped; #endif } catch( const uno::Exception& ) diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx index b1f2560d79f7..a77b40d7fde5 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.cxx +++ b/writerfilter/source/dmapper/TDefTableHandler.cxx @@ -274,8 +274,6 @@ OUString TDefTableHandler::getThemeColorTypeString(sal_Int32 nType) void TDefTableHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); - (void)nIntValue; - (void)rName; switch( rName ) { case NS_ooxml::LN_CT_Border_sz: diff --git a/writerfilter/source/dmapper/TrackChangesHandler.cxx b/writerfilter/source/dmapper/TrackChangesHandler.cxx index 6ace7e62c7eb..831a122322a1 100644 --- a/writerfilter/source/dmapper/TrackChangesHandler.cxx +++ b/writerfilter/source/dmapper/TrackChangesHandler.cxx @@ -36,7 +36,6 @@ TrackChangesHandler::~TrackChangesHandler() void TrackChangesHandler::lcl_attribute(Id rName, Value & rVal) { OUString sStringValue = rVal.getString(); - (void)rName; switch( rName ) { case NS_ooxml::LN_CT_TrackChange_author: @@ -90,10 +89,7 @@ uno::Sequence<beans::PropertyValue> TrackChangesHandler::getRedlineProperties() return aRedlineProperties; } -void TrackChangesHandler::lcl_sprm(Sprm & rSprm) -{ - (void)rSprm; -} +void TrackChangesHandler::lcl_sprm(Sprm &) {} } //namespace dmapper } //namespace writerfilter diff --git a/writerfilter/source/dmapper/util.cxx b/writerfilter/source/dmapper/util.cxx index 7886bba5c684..fbbb069d7772 100644 --- a/writerfilter/source/dmapper/util.cxx +++ b/writerfilter/source/dmapper/util.cxx @@ -31,7 +31,6 @@ std::string XTextRangeToString(uno::Reference< text::XTextRange > const & textRa { std::string result; - (void) textRange; #ifdef DEBUG_WRITERFILTER if (textRange.get()) { @@ -44,6 +43,8 @@ std::string XTextRangeToString(uno::Reference< text::XTextRange > const & textRa { result="(nil)"; } +#else + (void) textRange; #endif return result; diff --git a/writerfilter/source/ooxml/qnametostrcore.cxx b/writerfilter/source/ooxml/qnametostrcore.cxx index c4509b9a76f7..91b6795afe25 100644 --- a/writerfilter/source/ooxml/qnametostrcore.cxx +++ b/writerfilter/source/ooxml/qnametostrcore.cxx @@ -34,13 +34,13 @@ QNameToString::Pointer_t const & QNameToString::Instance() std::string QNameToString::operator()(Id qName) { - (void) qName; #ifdef DEBUG_WRITERFILTER Map::const_iterator aIt = mMap.find(qName); if (aIt != mMap.end()) return aIt->second; - +#else + (void) qName; #endif return std::string(); } |