From 2d8911d9396a10ad794eb42b6d5a44e8f5af4d91 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 22 Aug 2016 14:52:28 +0200 Subject: ucbhelper::Std{In,Out}putStream are only used in ucb/source/ucb/cmis/ ...where their use of boost::shared_ptr (instead of std::shared_ptr) matches the use in libcmis, but makes them unlikely to be useful anywhere else. So move them into ucb/source/ucb/cmis/. Change-Id: I68359be6b43d6889af4f241dcdcbdc0d9d70d717 --- include/ucbhelper/std_inputstream.hxx | 115 --------------------------------- include/ucbhelper/std_outputstream.hxx | 71 -------------------- 2 files changed, 186 deletions(-) delete mode 100644 include/ucbhelper/std_inputstream.hxx delete mode 100644 include/ucbhelper/std_outputstream.hxx (limited to 'include/ucbhelper') diff --git a/include/ucbhelper/std_inputstream.hxx b/include/ucbhelper/std_inputstream.hxx deleted file mode 100644 index 569713366d9c..000000000000 --- a/include/ucbhelper/std_inputstream.hxx +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_UCBHELPER_STD_INPUTSTREAM_HXX -#define INCLUDED_UCBHELPER_STD_INPUTSTREAM_HXX - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -namespace ucbhelper -{ - /** Implements a seekable InputStream - * working on an std::istream - */ - class UCBHELPER_DLLPUBLIC StdInputStream - : public cppu::OWeakObject, - public css::io::XInputStream, - public css::io::XSeekable - { - public: - - StdInputStream( boost::shared_ptr< std::istream > const & pStream ); - - virtual ~StdInputStream(); - - virtual css::uno::Any SAL_CALL queryInterface ( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL acquire( ) throw ( ) override; - - virtual void SAL_CALL release( ) throw ( ) override; - - virtual sal_Int32 SAL_CALL - readBytes ( css::uno::Sequence< sal_Int8 >& aData, - sal_Int32 nBytesToRead ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual sal_Int32 SAL_CALL - readSomeBytes ( css::uno::Sequence< sal_Int8 >& aData, - sal_Int32 nMaxBytesToRead ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL - skipBytes ( sal_Int32 nBytesToSkip ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual sal_Int32 SAL_CALL - available ( ) - throw ( css::io::NotConnectedException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL - closeInput ( ) - throw ( css::io::NotConnectedException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - - /** XSeekable - */ - - virtual void SAL_CALL - seek ( sal_Int64 location ) - throw ( css::lang::IllegalArgumentException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - - virtual sal_Int64 SAL_CALL - getPosition ( ) - throw ( css::io::IOException, css::uno::RuntimeException, std::exception ) override; - - - virtual sal_Int64 SAL_CALL - getLength ( ) - throw ( css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - private: - - osl::Mutex m_aMutex; - boost::shared_ptr< std::istream > m_pStream; - sal_Int64 m_nLength; - }; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/ucbhelper/std_outputstream.hxx b/include/ucbhelper/std_outputstream.hxx deleted file mode 100644 index 0537ee700fef..000000000000 --- a/include/ucbhelper/std_outputstream.hxx +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_UCBHELPER_STD_OUTPUTSTREAM_HXX -#define INCLUDED_UCBHELPER_STD_OUTPUTSTREAM_HXX - -#include -#include - -#include -#include -#include -#include -#include - -namespace ucbhelper -{ - /** Implements a OutputStream - * working on an std::ostream - */ - class UCBHELPER_DLLPUBLIC StdOutputStream : - public cppu::OWeakObject, - public css::io::XOutputStream - { - public: - - StdOutputStream( boost::shared_ptr< std::ostream > const & pStream ); - - virtual ~StdOutputStream( ); - - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL acquire ( ) throw ( ) override; - - virtual void SAL_CALL release ( ) throw ( ) override; - - virtual void SAL_CALL writeBytes ( const css::uno::Sequence< sal_Int8 >& aData ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL flush ( ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL closeOutput ( ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - private: - - osl::Mutex m_aMutex; - boost::shared_ptr< std::ostream > m_pStream; - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit