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
This commit is contained in:
@@ -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:
|
||||
|
@@ -46,8 +46,6 @@
|
||||
#include <ucbhelper/cancelcommandexecution.hxx>
|
||||
#include <ucbhelper/content.hxx>
|
||||
#include <ucbhelper/contentidentifier.hxx>
|
||||
#include <ucbhelper/std_inputstream.hxx>
|
||||
#include <ucbhelper/std_outputstream.hxx>
|
||||
#include <ucbhelper/propertyvalueset.hxx>
|
||||
#include <ucbhelper/proxydecider.hxx>
|
||||
#include <sax/tools/converter.hxx>
|
||||
@@ -58,6 +56,8 @@
|
||||
#include "cmis_provider.hxx"
|
||||
#include "cmis_resultset.hxx"
|
||||
#include "cmis_strings.hxx"
|
||||
#include <std_inputstream.hxx>
|
||||
#include <std_outputstream.hxx>
|
||||
|
||||
#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;
|
||||
|
||||
|
@@ -11,12 +11,12 @@
|
||||
|
||||
#include <sal/log.hxx>
|
||||
|
||||
#include "ucbhelper/std_inputstream.hxx"
|
||||
#include <std_inputstream.hxx>
|
||||
|
||||
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( );
|
||||
}
|
||||
}
|
@@ -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 <boost/shared_ptr.hpp>
|
||||
#include <istream>
|
||||
@@ -20,14 +20,12 @@
|
||||
#include <com/sun/star/io/XInputStream.hpp>
|
||||
#include <com/sun/star/io/XSeekable.hpp>
|
||||
|
||||
#include <ucbhelper/ucbhelperdllapi.h>
|
||||
|
||||
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
|
@@ -11,12 +11,12 @@
|
||||
|
||||
#include <sal/log.hxx>
|
||||
|
||||
#include "ucbhelper/std_outputstream.hxx"
|
||||
#include <std_outputstream.hxx>
|
||||
|
||||
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( );
|
||||
}
|
||||
}
|
@@ -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 <boost/shared_ptr.hpp>
|
||||
#include <ostream>
|
||||
@@ -17,14 +17,13 @@
|
||||
#include <cppuhelper/weak.hxx>
|
||||
#include <cppuhelper/queryinterface.hxx>
|
||||
#include <com/sun/star/io/XOutputStream.hpp>
|
||||
#include <ucbhelper/ucbhelperdllapi.h>
|
||||
|
||||
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
|
||||
{
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user