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 ) diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index 4d3bedcb2434..1cb93dcf4568 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -680,8 +680,8 @@ public: sal_uInt32 GetBlibStoreContainerSize( SvStream* pMergePicStreamBSE = nullptr ) const; void WriteBlibStoreContainer( SvStream& rStrm, SvStream* pMergePicStreamBSE = nullptr ); - bool WriteBlibStoreEntry(SvStream& rStrm, sal_uInt32 nBlipId, - bool bWritePictureOffset, sal_uInt32 nResize = 0); + void WriteBlibStoreEntry(SvStream& rStrm, sal_uInt32 nBlipId, + bool bWritePictureOffset, sal_uInt32 nResize = 0); sal_uInt32 GetBlibID( SvStream& rPicOutStream, const OString& rGraphicId, @@ -818,7 +818,7 @@ public: void Commit( SvStream& rSt, sal_uInt16 nVersion = 3, sal_uInt16 nRecType = ESCHER_OPT ); - bool CreateShapeProperties( + void CreateShapeProperties( const css::uno::Reference< css::drawing::XShape > & rXShape ); bool CreateOLEGraphicProperties( @@ -833,12 +833,12 @@ public: ); /** Creates a complex ESCHER_Prop_fillBlip containing the BLIP directly (for Excel charts). */ - bool CreateEmbeddedBitmapProperties( + void CreateEmbeddedBitmapProperties( const OUString& rBitmapUrl, css::drawing::BitmapMode eBitmapMode ); /** Creates a complex ESCHER_Prop_fillBlip containing a hatch style (for Excel charts). */ - bool CreateEmbeddedHatchProperties( + void CreateEmbeddedHatchProperties( const css::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground @@ -906,7 +906,7 @@ public: // Because shadow properties depends to the line and fillstyle, the CreateShadowProperties method should be called at last. // It activ only when at least a FillStyle or LineStyle is set. - bool CreateShadowProperties( + void CreateShadowProperties( const css::uno::Reference< css::beans::XPropertySet > & ); @@ -957,10 +957,10 @@ public: bool PtIsID( sal_uInt32 nID ); void PtInsert( sal_uInt32 nID, sal_uInt32 nOfs ); - sal_uInt32 PtDelete( sal_uInt32 nID ); + void PtDelete( sal_uInt32 nID ); sal_uInt32 PtGetOffsetByID( sal_uInt32 nID ); - sal_uInt32 PtReplace( sal_uInt32 nID, sal_uInt32 nOfs ); - sal_uInt32 PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs ); + void PtReplace( sal_uInt32 nID, sal_uInt32 nOfs ); + void PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs ); EscherPersistTable(); virtual ~EscherPersistTable(); @@ -1216,7 +1216,7 @@ public: void ReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); sal_uInt32 GetPersistOffset( sal_uInt32 nKey ); bool SeekToPersistOffset( sal_uInt32 nKey ); - bool InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ); // nValue is being inserted into the Stream where it's appropriate (overwrite modus), without that the + void InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ); // nValue is being inserted into the Stream where it's appropriate (overwrite modus), without that the // current StreamPosition changes void SetEditAs( const OUString& rEditAs ); rtl::OUString GetEditAs() { return mEditAs; } @@ -1242,8 +1242,8 @@ public: virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect = nullptr ); sal_uInt32 EnterGroup( const Rectangle* pBoundRect = nullptr ); sal_uInt32 GetGroupLevel() const { return mnGroupLevel; }; - bool SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ); - bool SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ); + void SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ); + void SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ); virtual void LeaveGroup(); // a ESCHER_Sp is being written ( a ESCHER_DgContainer has to be opened for this purpose!) @@ -1313,10 +1313,6 @@ public: private: EscherEx( const EscherEx& ) = delete; EscherEx& operator=( const EscherEx& ) = delete; - - // prevent C-style cast to former base class EscherGraphicProvider - operator EscherGraphicProvider&(); - operator EscherGraphicProvider const&(); }; diff --git a/include/filter/msfilter/mscodec.hxx b/include/filter/msfilter/mscodec.hxx index 4f5676b7f045..c6836fc612a6 100644 --- a/include/filter/msfilter/mscodec.hxx +++ b/include/filter/msfilter/mscodec.hxx @@ -252,7 +252,7 @@ public: bool InitCipher( sal_uInt32 nCounter ); /** Creates an MD5 digest of salt digest. */ - bool CreateSaltDigest( + void CreateSaltDigest( const sal_uInt8 nSaltData[16], sal_uInt8 nSaltDigest[16] ); /** Encodes a block of memory. diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index 28ae9184c443..8ba5791443b8 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -258,8 +258,6 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec SvxMSDffImportRec(const SvxMSDffImportRec& rCopy); ~SvxMSDffImportRec(); - bool operator==( const SvxMSDffImportRec& rEntry ) const - { return nShapeId == rEntry.nShapeId; } bool operator<( const SvxMSDffImportRec& rEntry ) const { return nShapeId < rEntry.nShapeId; } diff --git a/include/filter/msfilter/msocximex.hxx b/include/filter/msfilter/msocximex.hxx index 755dfe5ae8a0..e6e78e94db57 100644 --- a/include/filter/msfilter/msocximex.hxx +++ b/include/filter/msfilter/msocximex.hxx @@ -90,7 +90,7 @@ protected: // das einzige Formular css::uno::Reference< css::container::XIndexContainer > xFormComps; - virtual const css::uno::Reference< css::drawing::XDrawPage > & GetDrawPage(); + virtual void GetDrawPage(); }; #endif diff --git a/include/filter/msfilter/mstoolbar.hxx b/include/filter/msfilter/mstoolbar.hxx index d2e8531c7e51..9daa89b22631 100644 --- a/include/filter/msfilter/mstoolbar.hxx +++ b/include/filter/msfilter/mstoolbar.hxx @@ -148,7 +148,7 @@ public: #if OSL_DEBUG_LEVEL > 1 virtual void Print( FILE* ) override; #endif - bool ImportToolBarControlData( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >& ); + void ImportToolBarControlData( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >& ); OUString CustomText() { return customText.getString(); } }; diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index 46fef225ead2..9633234fd747 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -780,7 +780,7 @@ public: explicit PPTParaSheet( sal_uInt32 nInstance ); PPTParaSheet( const PPTParaSheet& rParaSheet ); - bool Read( + void Read( SdrPowerPointImport& rMan, SvStream& rIn, bool bMasterStyle, @@ -1279,7 +1279,7 @@ public: class PPTConvertOCXControls : public SvxMSConvertOCXControls { - virtual const css::uno::Reference< css::drawing::XDrawPage > & GetDrawPage() override; + virtual void GetDrawPage() override; PptPageKind ePageKind; const SdrPowerPointImport* mpPPTImporter; public: