diff --git a/ucb/Library_ucpcmis1.mk b/ucb/Library_ucpcmis1.mk index ee76827ce24e..0b468154400f 100644 --- a/ucb/Library_ucpcmis1.mk +++ b/ucb/Library_ucpcmis1.mk @@ -43,6 +43,8 @@ $(eval $(call gb_Library_add_exception_objects,ucpcmis1,\ ucb/source/ucp/cmis/cmis_provider \ ucb/source/ucp/cmis/cmis_resultset \ ucb/source/ucp/cmis/cmis_url \ + ucb/source/ucp/cmis/std_inputstream \ + ucb/source/ucp/cmis/std_outputstream \ )) # vim: set noet sw=4 ts=4: diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index b9deccbefb15..14af01cc9ef6 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -46,8 +46,6 @@ #include #include #include -#include -#include #include #include #include @@ -58,6 +56,8 @@ #include "cmis_provider.hxx" #include "cmis_resultset.hxx" #include "cmis_strings.hxx" +#include +#include #define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() ) #define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 ) @@ -1066,7 +1066,7 @@ namespace cmis } boost::shared_ptr< ostream > pOut( new ostringstream ( ios_base::binary | ios_base::in | ios_base::out ) ); - uno::Reference < io::XOutputStream > xOutput = new ucbhelper::StdOutputStream( pOut ); + uno::Reference < io::XOutputStream > xOutput = new StdOutputStream( pOut ); copyData( xIn, xOutput ); map< string, libcmis::PropertyPtr > newProperties; @@ -1341,7 +1341,7 @@ namespace cmis if ( nullptr != document ) { boost::shared_ptr< ostream > pOut( new ostringstream ( ios_base::binary | ios_base::in | ios_base::out ) ); - uno::Reference < io::XOutputStream > xOutput = new ucbhelper::StdOutputStream( pOut ); + uno::Reference < io::XOutputStream > xOutput = new StdOutputStream( pOut ); copyData( xInputStream, xOutput ); try { @@ -1380,7 +1380,7 @@ namespace cmis else { boost::shared_ptr< ostream > pOut( new ostringstream ( ios_base::binary | ios_base::in | ios_base::out ) ); - uno::Reference < io::XOutputStream > xOutput = new ucbhelper::StdOutputStream( pOut ); + uno::Reference < io::XOutputStream > xOutput = new StdOutputStream( pOut ); copyData( xInputStream, xOutput ); try { @@ -1548,7 +1548,7 @@ namespace cmis boost::shared_ptr< istream > aIn = document->getContentStream( ); - uno::Reference< io::XInputStream > xIn = new ucbhelper::StdInputStream( aIn ); + uno::Reference< io::XInputStream > xIn = new StdInputStream( aIn ); if( !xIn.is( ) ) return false; diff --git a/ucbhelper/source/provider/std_inputstream.cxx b/ucb/source/ucp/cmis/std_inputstream.cxx similarity index 93% rename from ucbhelper/source/provider/std_inputstream.cxx rename to ucb/source/ucp/cmis/std_inputstream.cxx index 506e953e9e48..4a6b1c468d34 100644 --- a/ucbhelper/source/provider/std_inputstream.cxx +++ b/ucb/source/ucp/cmis/std_inputstream.cxx @@ -11,12 +11,12 @@ #include -#include "ucbhelper/std_inputstream.hxx" +#include using namespace std; using namespace com::sun::star; -namespace ucbhelper +namespace cmis { StdInputStream::StdInputStream( boost::shared_ptr< istream > const & pStream ) : m_pStream( pStream ), @@ -76,7 +76,7 @@ namespace ucbhelper } catch ( const ios_base::failure& e ) { - SAL_INFO( "ucbhelper", "StdInputStream::readBytes() error: " << e.what() ); + SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() ); throw io::IOException( ); } @@ -103,7 +103,7 @@ namespace ucbhelper } catch ( const ios_base::failure& e ) { - SAL_INFO( "ucbhelper", "StdInputStream::readBytes() error: " << e.what() ); + SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() ); throw io::IOException( ); } return nRead; @@ -124,7 +124,7 @@ namespace ucbhelper } catch ( const ios_base::failure& e ) { - SAL_INFO( "ucbhelper", "StdInputStream::readBytes() error: " << e.what() ); + SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() ); throw io::IOException( ); } } @@ -161,7 +161,7 @@ namespace ucbhelper } catch ( const ios_base::failure& e ) { - SAL_INFO( "ucbhelper", "StdInputStream::readBytes() error: " << e.what() ); + SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() ); throw io::IOException( ); } } diff --git a/include/ucbhelper/std_inputstream.hxx b/ucb/source/ucp/cmis/std_inputstream.hxx similarity index 94% rename from include/ucbhelper/std_inputstream.hxx rename to ucb/source/ucp/cmis/std_inputstream.hxx index 569713366d9c..664fa0ad9810 100644 --- a/include/ucbhelper/std_inputstream.hxx +++ b/ucb/source/ucp/cmis/std_inputstream.hxx @@ -7,8 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_UCBHELPER_STD_INPUTSTREAM_HXX -#define INCLUDED_UCBHELPER_STD_INPUTSTREAM_HXX +#ifndef INCLUDED_UCB_SOURCE_UCP_CMIS_STD_INPUTSTREAM_HXX +#define INCLUDED_UCB_SOURCE_UCP_CMIS_STD_INPUTSTREAM_HXX #include #include @@ -20,14 +20,12 @@ #include #include -#include - -namespace ucbhelper +namespace cmis { /** Implements a seekable InputStream * working on an std::istream */ - class UCBHELPER_DLLPUBLIC StdInputStream + class StdInputStream : public cppu::OWeakObject, public css::io::XInputStream, public css::io::XSeekable diff --git a/ucbhelper/source/provider/std_outputstream.cxx b/ucb/source/ucp/cmis/std_outputstream.cxx similarity index 91% rename from ucbhelper/source/provider/std_outputstream.cxx rename to ucb/source/ucp/cmis/std_outputstream.cxx index bfe5efa0ea39..c26f0ef30885 100644 --- a/ucbhelper/source/provider/std_outputstream.cxx +++ b/ucb/source/ucp/cmis/std_outputstream.cxx @@ -11,12 +11,12 @@ #include -#include "ucbhelper/std_outputstream.hxx" +#include using namespace std; using namespace com::sun::star; -namespace ucbhelper +namespace cmis { StdOutputStream::StdOutputStream( boost::shared_ptr< ostream > const & pStream ) : m_pStream( pStream ) @@ -61,7 +61,7 @@ namespace ucbhelper } catch ( const ios_base::failure& e ) { - SAL_INFO( "ucbhelper", "Exception caught when calling write: " << e.what() ); + SAL_INFO( "ucb.ucp.cmis", "Exception caught when calling write: " << e.what() ); throw io::IOException( ); } } @@ -81,7 +81,7 @@ namespace ucbhelper } catch ( const ios_base::failure& e ) { - SAL_INFO( "ucbhelper", "Exception caught when calling flush: " << e.what() ); + SAL_INFO( "ucb.ucp.cmis", "Exception caught when calling flush: " << e.what() ); throw io::IOException( ); } } diff --git a/include/ucbhelper/std_outputstream.hxx b/ucb/source/ucp/cmis/std_outputstream.hxx similarity index 91% rename from include/ucbhelper/std_outputstream.hxx rename to ucb/source/ucp/cmis/std_outputstream.hxx index 0537ee700fef..84d79ba41cc8 100644 --- a/include/ucbhelper/std_outputstream.hxx +++ b/ucb/source/ucp/cmis/std_outputstream.hxx @@ -7,8 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_UCBHELPER_STD_OUTPUTSTREAM_HXX -#define INCLUDED_UCBHELPER_STD_OUTPUTSTREAM_HXX +#ifndef INCLUDED_UCB_SOURCE_UCP_CMIS_STD_OUTPUTSTREAM_HXX +#define INCLUDED_UCB_SOURCE_UCP_CMIS_STD_OUTPUTSTREAM_HXX #include #include @@ -17,14 +17,13 @@ #include #include #include -#include -namespace ucbhelper +namespace cmis { /** Implements a OutputStream * working on an std::ostream */ - class UCBHELPER_DLLPUBLIC StdOutputStream : + class StdOutputStream : public cppu::OWeakObject, public css::io::XOutputStream { diff --git a/ucbhelper/Library_ucbhelper.mk b/ucbhelper/Library_ucbhelper.mk index 6c338507e5d0..5226d9e76528 100644 --- a/ucbhelper/Library_ucbhelper.mk +++ b/ucbhelper/Library_ucbhelper.mk @@ -11,8 +11,6 @@ $(eval $(call gb_Library_Library,ucbhelper)) $(eval $(call gb_Library_use_sdk_api,ucbhelper)) -$(eval $(call gb_Library_use_external,ucbhelper,boost_headers)) - $(eval $(call gb_Library_use_libraries,ucbhelper,\ cppu \ cppuhelper \ @@ -51,8 +49,6 @@ $(eval $(call gb_Library_add_exception_objects,ucbhelper,\ ucbhelper/source/provider/simpleinteractionrequest \ ucbhelper/source/provider/simpleioerrorrequest \ ucbhelper/source/provider/simplenameclashresolverequest \ - ucbhelper/source/provider/std_inputstream \ - ucbhelper/source/provider/std_outputstream \ )) # vim: set noet sw=4 ts=4: