diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-13 14:01:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-13 14:56:24 +0000 |
commit | 67e1559fbe48e3af5eec04d413b8a2f3b487640d (patch) | |
tree | d4c9cdcb7f405eb1b0631b18e994039a434bacd0 | |
parent | 4c51f320baf38e07453e8fc991bf47ad6444cff0 (diff) |
coverity#708498 Uninitialized pointer field
Change-Id: I9da49c0dba434ea59eb30162fdd5ce4a649dd4d9
-rw-r--r-- | sw/source/filter/ww8/rtfexportfilter.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexportfilter.hxx | 1 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index d7d86f915e2e..7ce6d97dbd67 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -29,8 +29,8 @@ using namespace ::com::sun::star; -RtfExportFilter::RtfExportFilter( const uno::Reference< uno::XComponentContext >& xCtx) : - m_xCtx( xCtx ) +RtfExportFilter::RtfExportFilter( const uno::Reference< uno::XComponentContext >& xCtx) + : m_xCtx(xCtx) { } @@ -46,8 +46,8 @@ sal_Bool RtfExportFilter::filter( const uno::Sequence< beans::PropertyValue >& a utl::MediaDescriptor aMediaDesc = aDescriptor; ::uno::Reference< io::XStream > xStream = aMediaDesc.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_STREAMFOROUTPUT(), uno::Reference< io::XStream >() ); - m_pStream = utl::UcbStreamHelper::CreateStream( xStream, sal_True ); - m_aWriter.SetStream(m_pStream); + SvStream* pStream = utl::UcbStreamHelper::CreateStream( xStream, sal_True ); + m_aWriter.SetStream(pStream); // get SwDoc* uno::Reference< uno::XInterface > xIfc( m_xSrcDoc, uno::UNO_QUERY ); @@ -89,7 +89,7 @@ sal_Bool RtfExportFilter::filter( const uno::Sequence< beans::PropertyValue >& a delete pCurPam->GetNext(); delete pCurPam; } - delete m_pStream; + delete pStream; return sal_True; } diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx index 33552c232150..245596fe3882 100644 --- a/sw/source/filter/ww8/rtfexportfilter.hxx +++ b/sw/source/filter/ww8/rtfexportfilter.hxx @@ -43,7 +43,6 @@ class RtfExportFilter : public cppu::WeakImplHelper2 protected: ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc; - SvStream* m_pStream; public: RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx ); virtual ~RtfExportFilter(); |