From 1fb5ecdd7442247e0ed8154928b66fab0bcbe3ad Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 17 Jan 2013 14:28:41 -0500 Subject: Const correct-ness in one place... And an avalanche of changes that ensued. Change-Id: I7f882b621ba5af4cd01b2ac7f482ee3eed24e3d5 --- svtools/inc/svtools/embedhlp.hxx | 2 +- svtools/inc/svtools/embedtransfer.hxx | 4 ++-- svtools/source/misc/embedhlp.cxx | 6 +++--- svtools/source/misc/embedtransfer.cxx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'svtools') diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx index 28976c65ec66..606aad34f089 100644 --- a/svtools/inc/svtools/embedhlp.hxx +++ b/svtools/inc/svtools/embedhlp.hxx @@ -88,7 +88,7 @@ public: sal_Int64 GetViewAspect() const; void SetViewAspect( sal_Int64 nAspect ); - Graphic* GetGraphic( ::rtl::OUString* pMediaType=0 ) const; + const Graphic* GetGraphic( OUString* pMediaType = NULL ) const; // the original size of the object ( size of the icon for iconified object ) // no conversion is done if no target mode is provided diff --git a/svtools/inc/svtools/embedtransfer.hxx b/svtools/inc/svtools/embedtransfer.hxx index b63772511168..9da80b87f37a 100644 --- a/svtools/inc/svtools/embedtransfer.hxx +++ b/svtools/inc/svtools/embedtransfer.hxx @@ -42,13 +42,13 @@ protected: public: // object, replacement image, and the aspect SvEmbedTransferHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj, - Graphic* pGraphic, + const Graphic* pGraphic, sal_Int64 nAspect ); ~SvEmbedTransferHelper(); static void FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj, - Graphic* pGraphic, + const Graphic* pGraphic, sal_Int64 nAspect ); }; diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index c405e387412a..07b90d4f9b01 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -431,13 +431,13 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate ) { GraphicFilter& rGF = GraphicFilter::GetGraphicFilter(); if( mpImpl->pGraphic ) - rGF.ImportGraphic( *mpImpl->pGraphic, String(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW ); + rGF.ImportGraphic( *mpImpl->pGraphic, OUString(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW ); mpImpl->mnGraphicVersion++; delete pGraphicStream; } } -Graphic* EmbeddedObjectRef::GetGraphic( ::rtl::OUString* pMediaType ) const +const Graphic* EmbeddedObjectRef::GetGraphic( OUString* pMediaType ) const { if ( mpImpl->bNeedUpdate ) // bNeedUpdate will be set to false while retrieving new replacement @@ -457,7 +457,7 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const if ( mpImpl->nViewAspect == embed::Aspects::MSOLE_ICON ) { - Graphic* pGraphic = GetGraphic(); + const Graphic* pGraphic = GetGraphic(); if ( pGraphic ) { aSourceMapMode = pGraphic->GetPrefMapMode(); diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index af115a04c01e..4caf4fb0f663 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -39,7 +39,7 @@ using namespace ::com::sun::star; SvEmbedTransferHelper::SvEmbedTransferHelper( const uno::Reference< embed::XEmbeddedObject >& xObj, - Graphic* pGraphic, + const Graphic* pGraphic, sal_Int64 nAspect ) : m_xObj( xObj ) , m_pGraphic( pGraphic ? new Graphic( *pGraphic ) : NULL ) @@ -190,7 +190,7 @@ void SvEmbedTransferHelper::ObjectReleased() void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj, - Graphic* pGraphic, + const Graphic* pGraphic, sal_Int64 nAspect ) { //TODO/LATER: need TypeName to fill it into the Descriptor (will be shown in listbox) -- cgit v1.2.3