From 5adab0927483d039037b0f93894627e41a2c72f2 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Mon, 2 Jan 2017 21:57:23 +0100 Subject: replace C-style casts with const_cast Change-Id: Ica6522b4bfe2aa4517469e89cabe5d4d057cb6b7 Reviewed-on: https://gerrit.libreoffice.org/32657 Tested-by: Jenkins Reviewed-by: Jochen Nitschke --- svx/source/xml/xmlgrhlp.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'svx/source/xml') diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index e9271fb5ceb3..0212dc95b36b 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -134,7 +134,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId ) { pStm->SetVersion( SOFFICE_FILEFORMAT_8 ); pStm->SetCompressMode( SvStreamCompressFlags::ZBITMAP ); - ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm ); + const_cast( aGraphic.GetGDIMetaFile() ).Write( *pStm ); bRet = ( pStm->GetError() == 0 ); } } @@ -581,7 +581,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName, pStream->SetCompressMode( SvStreamCompressFlags::ZBITMAP ); // SJ: first check if this metafile is just a eps file, then we will store the eps instead of svm - GDIMetaFile& rMtf( (GDIMetaFile&)aGraphic.GetGDIMetaFile() ); + GDIMetaFile& rMtf(const_cast( aGraphic.GetGDIMetaFile() )); const MetaCommentAction* pComment = ImplCheckForEPS( rMtf ); if ( pComment ) { @@ -706,7 +706,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt else if( aGrfObject.GetType() == GraphicType::GdiMetafile ) { // SJ: first check if this metafile is just a eps file, then we will store the eps instead of svm - GDIMetaFile& rMtf( (GDIMetaFile&)aGraphic.GetGDIMetaFile() ); + GDIMetaFile& rMtf(const_cast( aGraphic.GetGDIMetaFile() )); if ( ImplCheckForEPS( rMtf ) ) aExtension = ".eps"; else -- cgit