diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-11 16:21:25 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-01-12 07:40:08 +0000 |
commit | 813a319fe836d1ed1c967928bc044643d0b4c07d (patch) | |
tree | 602713b5f11a9c860ed351ebdccdd315af9e3fc6 /filter | |
parent | 1f9a610de1e1e540386972c010ebfc99e5f55df7 (diff) |
loplugin:unusedmethods unused return value in include/filter
Change-Id: Ibd7d701b6991ae76d0cba0bfbb9cb79150c90c72
Reviewed-on: https://gerrit.libreoffice.org/21362
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 43 | ||||
-rw-r--r-- | filter/source/msfilter/mscodec.cxx | 6 | ||||
-rw-r--r-- | filter/source/msfilter/msocximex.cxx | 5 | ||||
-rw-r--r-- | filter/source/msfilter/mstoolbar.cxx | 3 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 8 |
5 files changed, 20 insertions, 45 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index cd835b98bfc0..2e8f26303773 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1232,7 +1232,7 @@ void EscherPropertyContainer::ImplCreateGraphicAttributes( const css::uno::Refer } } -bool EscherPropertyContainer::CreateShapeProperties( const css::uno::Reference< css::drawing::XShape > & rXShape ) +void EscherPropertyContainer::CreateShapeProperties( const css::uno::Reference< css::drawing::XShape > & rXShape ) { uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY ); if ( aXPropSet.is() ) @@ -1253,7 +1253,6 @@ bool EscherPropertyContainer::CreateShapeProperties( const css::uno::Reference< if ( nShapeAttr ) AddOpt( ESCHER_Prop_fPrint, nShapeAttr ); } - return true; } bool EscherPropertyContainer::CreateOLEGraphicProperties( @@ -1345,7 +1344,7 @@ bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const OString& rUniqueId ) return false; } -bool EscherPropertyContainer::CreateEmbeddedBitmapProperties( +void EscherPropertyContainer::CreateEmbeddedBitmapProperties( const OUString& rBitmapUrl, css::drawing::BitmapMode eBitmapMode ) { bool bRetValue = false; @@ -1367,7 +1366,6 @@ bool EscherPropertyContainer::CreateEmbeddedBitmapProperties( } } } - return bRetValue; } @@ -1402,7 +1400,7 @@ GraphicObject lclDrawHatch( const css::drawing::Hatch& rHatch, const Color& rBac } // namespace -bool EscherPropertyContainer::CreateEmbeddedHatchProperties( const css::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground ) +void EscherPropertyContainer::CreateEmbeddedHatchProperties( const css::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground ) { const Rectangle aRect(pShapeBoundRect ? *pShapeBoundRect : Rectangle(Point(0,0), Size(28000, 21000))); GraphicObject aGraphicObject = lclDrawHatch( rHatch, rBackColor, bFillBackground, aRect ); @@ -1410,7 +1408,6 @@ bool EscherPropertyContainer::CreateEmbeddedHatchProperties( const css::drawing: bool bRetValue = ImplCreateEmbeddedBmp( aUniqueId ); if ( bRetValue ) AddOpt( ESCHER_Prop_fillType, ESCHER_FillTexture ); - return bRetValue; } @@ -2325,7 +2322,7 @@ bool EscherPropertyContainer::CreateConnectorProperties( return bRetValue; } -bool EscherPropertyContainer::CreateShadowProperties( +void EscherPropertyContainer::CreateShadowProperties( const css::uno::Reference< css::beans::XPropertySet > & rXPropSet ) { css::uno::Any aAny; @@ -2363,7 +2360,6 @@ bool EscherPropertyContainer::CreateShadowProperties( } } AddOpt( ESCHER_Prop_fshadowObscured, nShadowFlags ); - return bHasShadow; } sal_Int32 EscherPropertyContainer::GetValueForEnhancedCustomShapeParameter( const css::drawing::EnhancedCustomShapeParameter& rParameter, @@ -3881,7 +3877,7 @@ void EscherPersistTable::PtInsert( sal_uInt32 nID, sal_uInt32 nOfs ) maPersistTable.push_back( new EscherPersistEntry( nID, nOfs ) ); } -sal_uInt32 EscherPersistTable::PtDelete( sal_uInt32 nID ) +void EscherPersistTable::PtDelete( sal_uInt32 nID ) { ::std::vector< EscherPersistEntry* >::iterator it = maPersistTable.begin(); for( ; it != maPersistTable.end() ; ++it ) @@ -3892,7 +3888,6 @@ sal_uInt32 EscherPersistTable::PtDelete( sal_uInt32 nID ) break; } } - return 0; } sal_uInt32 EscherPersistTable::PtGetOffsetByID( sal_uInt32 nID ) @@ -3906,31 +3901,27 @@ sal_uInt32 EscherPersistTable::PtGetOffsetByID( sal_uInt32 nID ) return 0; }; -sal_uInt32 EscherPersistTable::PtReplace( sal_uInt32 nID, sal_uInt32 nOfs ) +void EscherPersistTable::PtReplace( sal_uInt32 nID, sal_uInt32 nOfs ) { for( size_t i = 0, n = maPersistTable.size(); i < n; ++i ) { EscherPersistEntry* pPtr = maPersistTable[ i ]; if ( pPtr->mnID == nID ) { - sal_uInt32 nRetValue = pPtr->mnOffset; pPtr->mnOffset = nOfs; - return nRetValue; + return; } } - return 0; } -sal_uInt32 EscherPersistTable::PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs ) +void EscherPersistTable::PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs ) { for( size_t i = 0, n = maPersistTable.size(); i < n; ++i ) { EscherPersistEntry* pPtr = maPersistTable[ i ]; if ( pPtr->mnID == nID ) { - sal_uInt32 nRetValue = pPtr->mnOffset; pPtr->mnOffset = nOfs; - return nRetValue; + return; } } PtInsert( nID, nOfs ); - return 0; } bool EscherPropertyValueHelper::GetPropertyValue( @@ -4148,13 +4139,12 @@ sal_uInt32 EscherGraphicProvider::GetBlibStoreContainerSize( SvStream* pMergePic return nSize; } -bool EscherGraphicProvider::WriteBlibStoreEntry(SvStream& rSt, +void EscherGraphicProvider::WriteBlibStoreEntry(SvStream& rSt, sal_uInt32 nBlipId, bool bWritePictureOffSet, sal_uInt32 nResize) { if (nBlipId > mnBlibEntrys || nBlipId == 0) - return false; + return; mpBlibEntrys[nBlipId-1]->WriteBlibEntry(rSt, bWritePictureOffSet, nResize); - return true; } void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pMergePicStreamBSE ) @@ -5125,7 +5115,7 @@ bool EscherEx::SeekToPersistOffset( sal_uInt32 nKey ) return DoSeek( ESCHER_Persist_PrivateEntry | nKey ); } -bool EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ) +void EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ) { sal_uInt32 nOldPos = mpOutStrm->Tell(); bool bRetValue = SeekToPersistOffset( nKey ); @@ -5134,7 +5124,6 @@ bool EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ) mpOutStrm->WriteUInt32( nValue ); mpOutStrm->Seek( nOldPos ); } - return bRetValue; } void EscherEx::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance ) @@ -5327,9 +5316,8 @@ sal_uInt32 EscherEx::EnterGroup( const Rectangle* pBoundRect ) return EnterGroup( OUString(), pBoundRect ); } -bool EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ) +void EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ) { - bool bRetValue = false; if ( nGroupLevel ) { sal_uInt32 nCurrentPos = mpOutStrm->Tell(); @@ -5342,12 +5330,10 @@ bool EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect mpOutStrm->Seek( nCurrentPos ); } } - return bRetValue; } -bool EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ) +void EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ) { - bool bRetValue = false; if ( nGroupLevel ) { sal_uInt32 nCurrentPos = mpOutStrm->Tell(); @@ -5357,7 +5343,6 @@ bool EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect mpOutStrm->Seek( nCurrentPos ); } } - return bRetValue; } void EscherEx::LeaveGroup() diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx index 87dbf70af132..ff74b81cc74f 100644 --- a/filter/source/msfilter/mscodec.cxx +++ b/filter/source/msfilter/mscodec.cxx @@ -417,13 +417,11 @@ bool MSCodec_Std97::InitCipher (sal_uInt32 nCounter) return (result == rtl_Cipher_E_None); } -bool MSCodec_Std97::CreateSaltDigest( const sal_uInt8 nSaltData[16], sal_uInt8 nSaltDigest[16] ) +void MSCodec_Std97::CreateSaltDigest( const sal_uInt8 nSaltData[16], sal_uInt8 nSaltDigest[16] ) { #if DEBUG_MSO_ENCRYPTION_STD97 lcl_PrintDigest(nSaltData, "salt data"); #endif - bool result = false; - if (InitCipher(0)) { sal_uInt8 pDigest[RTL_DIGEST_LENGTH_MD5]; @@ -434,8 +432,6 @@ bool MSCodec_Std97::CreateSaltDigest( const sal_uInt8 nSaltData[16], sal_uInt8 n (void)memcpy(nSaltDigest, pDigest, 16); } - - return result; } bool MSCodec_Std97::Encode ( diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx index a796798317c5..5ed9bbf2b5a3 100644 --- a/filter/source/msfilter/msocximex.cxx +++ b/filter/source/msfilter/msocximex.cxx @@ -40,8 +40,7 @@ SvxMSConvertOCXControls::~SvxMSConvertOCXControls() { } -const uno::Reference< drawing::XDrawPage >& - SvxMSConvertOCXControls::GetDrawPage() +void SvxMSConvertOCXControls::GetDrawPage() { if( !xDrawPage.is() && mxModel.is() ) { @@ -51,8 +50,6 @@ const uno::Reference< drawing::XDrawPage >& xDrawPage = xTxtDoc->getDrawPage(); OSL_ENSURE( xDrawPage.is(), "no XDrawPage" ); } - - return xDrawPage; } diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index f0e6fd2c3f5b..1a7df47f3dab 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -470,7 +470,7 @@ TBCGeneralInfo::Print( FILE* fp ) } #endif -bool +void TBCGeneralInfo::ImportToolBarControlData( CustomToolBarImportHelper& helper, std::vector< beans::PropertyValue >& sControlData ) { if ( ( bFlags & 0x5 ) ) @@ -511,7 +511,6 @@ aToolbarItem(3).Name = "Visible" aToolbarItem(3).Value = true */ } - return true; } TBCMenuSpecific::TBCMenuSpecific() : tbid( 0 ) diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 3264c9ca30c6..1162815f17bc 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1724,7 +1724,7 @@ bool PPTConvertOCXControls::InsertControl( } return bRetValue; }; -const css::uno::Reference< css::drawing::XDrawPage >& PPTConvertOCXControls::GetDrawPage() +void PPTConvertOCXControls::GetDrawPage() { if( !xDrawPage.is() && mxModel.is() ) { @@ -1757,7 +1757,6 @@ const css::uno::Reference< css::drawing::XDrawPage >& PPTConvertOCXControls::Get aAny >>= xDrawPage; } } - return xDrawPage; } bool SdrPowerPointOLEDecompress( SvStream& rOutput, SvStream& rInput, sal_uInt32 nInputSize ) @@ -3874,7 +3873,7 @@ PPTParaSheet::PPTParaSheet( const PPTParaSheet& rSheet ) *this = rSheet; } -bool PPTParaSheet::Read( SdrPowerPointImport& +void PPTParaSheet::Read( SdrPowerPointImport& #ifdef DBG_UTIL rManager #endif @@ -3932,7 +3931,7 @@ bool PPTParaSheet::Read( SdrPowerPointImport& // number of tabulators rIn.ReadUInt16( nVal16 ); if (rIn.remainingSize() / sizeof(nVal32) < nVal16) - return false; + return; for ( i = 0; i < nVal16; i++ ) rIn.ReadUInt32( nVal32 ); // reading the tabulators } @@ -4003,7 +4002,6 @@ bool PPTParaSheet::Read( SdrPowerPointImport& } nPMask >>= 1; } - return true; } void PPTParaSheet::UpdateBulletRelSize( sal_uInt32 nLevel, sal_uInt16 nFontHeight ) |