diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-01 15:37:54 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-01 15:37:54 +0100 |
commit | 59394867bba4bb511c6574f22f553fda819e81ae (patch) | |
tree | bb6b0d4c091a6465bda4accede8f6eb52091f85d | |
parent | 58f48448cfb24bd6baa95a8e09e9739fcd3cb485 (diff) |
Use std::make_shared to create RTFDocumentImpl
Change-Id: I5a4fc60b30829cf8d9e8e7f142331dbb0007ac9b
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentfactory.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentfactory.cxx b/writerfilter/source/rtftok/rtfdocumentfactory.cxx index 63cf33f42aab..ace9ad3f9a96 100644 --- a/writerfilter/source/rtftok/rtfdocumentfactory.cxx +++ b/writerfilter/source/rtftok/rtfdocumentfactory.cxx @@ -20,7 +20,7 @@ RTFDocument::Pointer_t RTFDocumentFactory::createDocument(css::uno::Reference< c css::uno::Reference< css::frame::XFrame > const& xFrame, css::uno::Reference< css::task::XStatusIndicator > const& xStatusIndicator) { - return RTFDocument::Pointer_t(new RTFDocumentImpl(xContext, xInputStream, xDstDoc, xFrame, xStatusIndicator)); + return std::make_shared<RTFDocumentImpl>(xContext, xInputStream, xDstDoc, xFrame, xStatusIndicator); } } // namespace rtftok diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 5cae015aec85..9357df9c5103 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -341,7 +341,7 @@ void RTFDocumentImpl::resolveSubstream(sal_Size nPos, Id nId, OUString& rIgnoreF { sal_Size nCurrent = Strm().Tell(); // Seek to header position, parse, then seek back. - RTFDocumentImpl::Pointer_t pImpl(new RTFDocumentImpl(m_xContext, m_xInputStream, m_xDstDoc, m_xFrame, m_xStatusIndicator)); + auto pImpl = std::make_shared<RTFDocumentImpl>(m_xContext, m_xInputStream, m_xDstDoc, m_xFrame, m_xStatusIndicator); pImpl->setSuperstream(this); pImpl->setStreamType(nId); pImpl->setIgnoreFirst(rIgnoreFirst); |