Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / docshell / documentlinkmgr.cxx
blob2b9998f96244ccb613d1805ae830805e7a624374
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <documentlinkmgr.hxx>
11 #include <datastream.hxx>
13 #include <boost/noncopyable.hpp>
14 #include <boost/scoped_ptr.hpp>
16 namespace sc {
18 struct DocumentLinkManagerImpl : boost::noncopyable
20 boost::scoped_ptr<DataStream> mpDataStream;
22 DocumentLinkManagerImpl() : mpDataStream(NULL) {}
25 DocumentLinkManager::DocumentLinkManager() : mpImpl(new DocumentLinkManagerImpl) {}
27 void DocumentLinkManager::setDataStream( DataStream* p )
29 mpImpl->mpDataStream.reset(p);
32 DataStream* DocumentLinkManager::getDataStream()
34 return mpImpl->mpDataStream.get();
37 const DataStream* DocumentLinkManager::getDataStream() const
39 return mpImpl->mpDataStream.get();
44 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */