Kaydet (Commit) d36331d6 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove unhelpful "using namespace com::sun::star;" from ucb/source/ucp/gio/

...in preparation for another change using a top-level namespace ucb

Change-Id: I3a92d64806bc570bdfd4fe06e672cb6ce2049e7e
Reviewed-on: https://gerrit.libreoffice.org/71987
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst deaddddf
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include "gio_content.hxx" #include "gio_content.hxx"
#include "gio_provider.hxx" #include "gio_provider.hxx"
using namespace com::sun::star;
using namespace gio; using namespace gio;
namespace gio namespace gio
...@@ -58,15 +56,15 @@ bool DataSupplier::getData() ...@@ -58,15 +56,15 @@ bool DataSupplier::getData()
{ {
switch ( mnOpenMode ) switch ( mnOpenMode )
{ {
case ucb::OpenMode::FOLDERS: case css::ucb::OpenMode::FOLDERS:
if (g_file_info_get_file_type(pInfo) != G_FILE_TYPE_DIRECTORY) if (g_file_info_get_file_type(pInfo) != G_FILE_TYPE_DIRECTORY)
continue; continue;
break; break;
case ucb::OpenMode::DOCUMENTS: case css::ucb::OpenMode::DOCUMENTS:
if (g_file_info_get_file_type(pInfo) != G_FILE_TYPE_REGULAR) if (g_file_info_get_file_type(pInfo) != G_FILE_TYPE_REGULAR)
continue; continue;
break; break;
case ucb::OpenMode::ALL: case css::ucb::OpenMode::ALL:
default: default:
break; break;
} }
...@@ -121,11 +119,11 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) ...@@ -121,11 +119,11 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
return OUString(); return OUString();
} }
uno::Reference< ucb::XContentIdentifier > DataSupplier::queryContentIdentifier( sal_uInt32 nIndex ) css::uno::Reference< css::ucb::XContentIdentifier > DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
{ {
if ( nIndex < maResults.size() ) if ( nIndex < maResults.size() )
{ {
uno::Reference< ucb::XContentIdentifier > xId = maResults[ nIndex ]->xId; css::uno::Reference< css::ucb::XContentIdentifier > xId = maResults[ nIndex ]->xId;
if ( xId.is() ) if ( xId.is() )
{ {
// Already cached. // Already cached.
...@@ -136,19 +134,19 @@ uno::Reference< ucb::XContentIdentifier > DataSupplier::queryContentIdentifier( ...@@ -136,19 +134,19 @@ uno::Reference< ucb::XContentIdentifier > DataSupplier::queryContentIdentifier(
OUString aId = queryContentIdentifierString( nIndex ); OUString aId = queryContentIdentifierString( nIndex );
if ( aId.getLength() ) if ( aId.getLength() )
{ {
uno::Reference< ucb::XContentIdentifier > xId = new ucbhelper::ContentIdentifier( aId ); css::uno::Reference< css::ucb::XContentIdentifier > xId = new ucbhelper::ContentIdentifier( aId );
maResults[ nIndex ]->xId = xId; maResults[ nIndex ]->xId = xId;
return xId; return xId;
} }
return uno::Reference< ucb::XContentIdentifier >(); return css::uno::Reference< css::ucb::XContentIdentifier >();
} }
uno::Reference< ucb::XContent > DataSupplier::queryContent( sal_uInt32 nIndex ) css::uno::Reference< css::ucb::XContent > DataSupplier::queryContent( sal_uInt32 nIndex )
{ {
if ( nIndex < maResults.size() ) if ( nIndex < maResults.size() )
{ {
uno::Reference< ucb::XContent > xContent = maResults[ nIndex ]->xContent; css::uno::Reference< css::ucb::XContent > xContent = maResults[ nIndex ]->xContent;
if ( xContent.is() ) if ( xContent.is() )
{ {
// Already cached. // Already cached.
...@@ -156,20 +154,20 @@ uno::Reference< ucb::XContent > DataSupplier::queryContent( sal_uInt32 nIndex ) ...@@ -156,20 +154,20 @@ uno::Reference< ucb::XContent > DataSupplier::queryContent( sal_uInt32 nIndex )
} }
} }
uno::Reference< ucb::XContentIdentifier > xId = queryContentIdentifier( nIndex ); css::uno::Reference< css::ucb::XContentIdentifier > xId = queryContentIdentifier( nIndex );
if ( xId.is() ) if ( xId.is() )
{ {
try try
{ {
uno::Reference< ucb::XContent > xContent = mxContent->getProvider()->queryContent( xId ); css::uno::Reference< css::ucb::XContent > xContent = mxContent->getProvider()->queryContent( xId );
maResults[ nIndex ]->xContent = xContent; maResults[ nIndex ]->xContent = xContent;
return xContent; return xContent;
} }
catch ( ucb::IllegalIdentifierException& ) catch ( css::ucb::IllegalIdentifierException& )
{ {
} }
} }
return uno::Reference< ucb::XContent >(); return css::uno::Reference< css::ucb::XContent >();
} }
bool DataSupplier::getResult( sal_uInt32 nIndex ) bool DataSupplier::getResult( sal_uInt32 nIndex )
...@@ -199,11 +197,11 @@ bool DataSupplier::isCountFinal() ...@@ -199,11 +197,11 @@ bool DataSupplier::isCountFinal()
return mbCountFinal; return mbCountFinal;
} }
uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( sal_uInt32 nIndex ) css::uno::Reference< css::sdbc::XRow > DataSupplier::queryPropertyValues( sal_uInt32 nIndex )
{ {
if ( nIndex < maResults.size() ) if ( nIndex < maResults.size() )
{ {
uno::Reference< sdbc::XRow > xRow = maResults[ nIndex ]->xRow; css::uno::Reference< css::sdbc::XRow > xRow = maResults[ nIndex ]->xRow;
if ( xRow.is() ) if ( xRow.is() )
{ {
// Already cached. // Already cached.
...@@ -213,33 +211,33 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( sal_uInt32 nInde ...@@ -213,33 +211,33 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( sal_uInt32 nInde
if ( getResult( nIndex ) ) if ( getResult( nIndex ) )
{ {
uno::Reference< ucb::XContent > xContent( queryContent( nIndex ) ); css::uno::Reference< css::ucb::XContent > xContent( queryContent( nIndex ) );
if ( xContent.is() ) if ( xContent.is() )
{ {
try try
{ {
uno::Reference< ucb::XCommandProcessor > xCmdProc( css::uno::Reference< css::ucb::XCommandProcessor > xCmdProc(
xContent, uno::UNO_QUERY_THROW ); xContent, css::uno::UNO_QUERY_THROW );
sal_Int32 nCmdId( xCmdProc->createCommandIdentifier() ); sal_Int32 nCmdId( xCmdProc->createCommandIdentifier() );
ucb::Command aCmd; css::ucb::Command aCmd;
aCmd.Name = "getPropertyValues"; aCmd.Name = "getPropertyValues";
aCmd.Handle = -1; aCmd.Handle = -1;
aCmd.Argument <<= getResultSet()->getProperties(); aCmd.Argument <<= getResultSet()->getProperties();
uno::Any aResult( xCmdProc->execute( css::uno::Any aResult( xCmdProc->execute(
aCmd, nCmdId, getResultSet()->getEnvironment() ) ); aCmd, nCmdId, getResultSet()->getEnvironment() ) );
uno::Reference< sdbc::XRow > xRow; css::uno::Reference< css::sdbc::XRow > xRow;
if ( aResult >>= xRow ) if ( aResult >>= xRow )
{ {
maResults[ nIndex ]->xRow = xRow; maResults[ nIndex ]->xRow = xRow;
return xRow; return xRow;
} }
} }
catch ( uno::Exception const & ) catch ( css::uno::Exception const & )
{ {
} }
} }
} }
return uno::Reference< sdbc::XRow >(); return css::uno::Reference< css::sdbc::XRow >();
} }
void DataSupplier::releasePropertyValues( sal_uInt32 nIndex ) void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
......
...@@ -28,15 +28,13 @@ ...@@ -28,15 +28,13 @@
#include "gio_inputstream.hxx" #include "gio_inputstream.hxx"
#include "gio_content.hxx" #include "gio_content.hxx"
using namespace com::sun::star;
namespace gio namespace gio
{ {
InputStream::InputStream(GFileInputStream *pStream): mpStream(pStream) InputStream::InputStream(GFileInputStream *pStream): mpStream(pStream)
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
} }
InputStream::~InputStream() InputStream::~InputStream()
...@@ -64,18 +62,18 @@ void SAL_CALL InputStream::skipBytes( sal_Int32 nBytesToSkip ) ...@@ -64,18 +62,18 @@ void SAL_CALL InputStream::skipBytes( sal_Int32 nBytesToSkip )
readBytes(data, nBytesToSkip); readBytes(data, nBytesToSkip);
} }
sal_Int32 SAL_CALL InputStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) sal_Int32 SAL_CALL InputStream::readBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
try try
{ {
aData.realloc( nBytesToRead ); aData.realloc( nBytesToRead );
} }
catch ( const uno::Exception & ) catch ( const css::uno::Exception & )
{ {
throw io::BufferSizeExceededException(); throw css::io::BufferSizeExceededException();
} }
gsize nBytesRead = 0; gsize nBytesRead = 0;
...@@ -86,7 +84,7 @@ sal_Int32 SAL_CALL InputStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal ...@@ -86,7 +84,7 @@ sal_Int32 SAL_CALL InputStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal
return nBytesRead; return nBytesRead;
} }
sal_Int32 SAL_CALL InputStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) sal_Int32 SAL_CALL InputStream::readSomeBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead )
{ {
return readBytes(aData, nMaxBytesToRead); return readBytes(aData, nMaxBytesToRead);
} }
......
...@@ -60,13 +60,11 @@ static void ooo_mount_operation_class_init (OOoMountOperationClass *klass) ...@@ -60,13 +60,11 @@ static void ooo_mount_operation_class_init (OOoMountOperationClass *klass)
mount_op_class->ask_password = ooo_mount_operation_ask_password; mount_op_class->ask_password = ooo_mount_operation_ask_password;
} }
using namespace com::sun::star;
static void ooo_mount_operation_ask_password (GMountOperation *op, static void ooo_mount_operation_ask_password (GMountOperation *op,
const char * /*message*/, const char *default_user, const char * /*message*/, const char *default_user,
const char *default_domain, GAskPasswordFlags flags) const char *default_domain, GAskPasswordFlags flags)
{ {
uno::Reference< task::XInteractionHandler > xIH; css::uno::Reference< css::task::XInteractionHandler > xIH;
OOoMountOperation *pThis = reinterpret_cast<OOoMountOperation*>(op); OOoMountOperation *pThis = reinterpret_cast<OOoMountOperation*>(op);
...@@ -130,7 +128,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op, ...@@ -130,7 +128,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op,
return; return;
} }
uno::Reference< task::XInteractionAbort > xAbort(xSelection.get(), uno::UNO_QUERY ); css::uno::Reference< css::task::XInteractionAbort > xAbort(xSelection.get(), css::uno::UNO_QUERY );
if ( xAbort.is() ) if ( xAbort.is() )
{ {
g_mount_operation_reply (op, G_MOUNT_OPERATION_ABORTED); g_mount_operation_reply (op, G_MOUNT_OPERATION_ABORTED);
...@@ -153,13 +151,13 @@ static void ooo_mount_operation_ask_password (GMountOperation *op, ...@@ -153,13 +151,13 @@ static void ooo_mount_operation_ask_password (GMountOperation *op,
switch (xSupp->getRememberPasswordMode()) switch (xSupp->getRememberPasswordMode())
{ {
default: default:
case ucb::RememberAuthentication_NO: case css::ucb::RememberAuthentication_NO:
g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_NEVER); g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_NEVER);
break; break;
case ucb::RememberAuthentication_SESSION: case css::ucb::RememberAuthentication_SESSION:
g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_FOR_SESSION); g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_FOR_SESSION);
break; break;
case ucb::RememberAuthentication_PERSISTENT: case css::ucb::RememberAuthentication_PERSISTENT:
g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_PERMANENTLY); g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_PERMANENTLY);
break; break;
} }
...@@ -173,7 +171,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op, ...@@ -173,7 +171,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op,
g_mount_operation_reply (op, G_MOUNT_OPERATION_HANDLED); g_mount_operation_reply (op, G_MOUNT_OPERATION_HANDLED);
} }
GMountOperation *ooo_mount_operation_new(const uno::Reference< ucb::XCommandEnvironment >& rEnv) GMountOperation *ooo_mount_operation_new(const css::uno::Reference< css::ucb::XCommandEnvironment >& rEnv)
{ {
OOoMountOperation *pRet = static_cast<OOoMountOperation*>(g_object_new (OOO_TYPE_MOUNT_OPERATION, nullptr)); OOoMountOperation *pRet = static_cast<OOoMountOperation*>(g_object_new (OOO_TYPE_MOUNT_OPERATION, nullptr));
pRet->pEnv = &rEnv; pRet->pEnv = &rEnv;
......
...@@ -28,15 +28,13 @@ ...@@ -28,15 +28,13 @@
#include "gio_outputstream.hxx" #include "gio_outputstream.hxx"
#include "gio_content.hxx" #include "gio_content.hxx"
using namespace com::sun::star;
namespace gio namespace gio
{ {
OutputStream::OutputStream(GFileOutputStream *pStream) : Seekable(G_SEEKABLE(pStream)), mpStream(pStream) OutputStream::OutputStream(GFileOutputStream *pStream) : Seekable(G_SEEKABLE(pStream)), mpStream(pStream)
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
} }
OutputStream::~OutputStream() OutputStream::~OutputStream()
...@@ -47,7 +45,7 @@ OutputStream::~OutputStream() ...@@ -47,7 +45,7 @@ OutputStream::~OutputStream()
void SAL_CALL OutputStream::writeBytes( const css::uno::Sequence< sal_Int8 >& rData ) void SAL_CALL OutputStream::writeBytes( const css::uno::Sequence< sal_Int8 >& rData )
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
GError *pError=nullptr; GError *pError=nullptr;
if (!g_output_stream_write_all(G_OUTPUT_STREAM(mpStream), rData.getConstArray(), rData.getLength(), nullptr, nullptr, &pError)) if (!g_output_stream_write_all(G_OUTPUT_STREAM(mpStream), rData.getConstArray(), rData.getLength(), nullptr, nullptr, &pError))
...@@ -57,7 +55,7 @@ void SAL_CALL OutputStream::writeBytes( const css::uno::Sequence< sal_Int8 >& rD ...@@ -57,7 +55,7 @@ void SAL_CALL OutputStream::writeBytes( const css::uno::Sequence< sal_Int8 >& rD
void SAL_CALL OutputStream::flush() void SAL_CALL OutputStream::flush()
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
GError *pError=nullptr; GError *pError=nullptr;
if (!g_output_stream_flush(G_OUTPUT_STREAM(mpStream), nullptr, &pError)) if (!g_output_stream_flush(G_OUTPUT_STREAM(mpStream), nullptr, &pError))
...@@ -70,9 +68,9 @@ void SAL_CALL OutputStream::closeOutput() ...@@ -70,9 +68,9 @@ void SAL_CALL OutputStream::closeOutput()
g_output_stream_close(G_OUTPUT_STREAM(mpStream), nullptr, nullptr); g_output_stream_close(G_OUTPUT_STREAM(mpStream), nullptr, nullptr);
} }
uno::Any OutputStream::queryInterface( const uno::Type &type ) css::uno::Any OutputStream::queryInterface( const css::uno::Type &type )
{ {
uno::Any aRet = ::cppu::queryInterface ( type, css::uno::Any aRet = ::cppu::queryInterface ( type,
static_cast< XOutputStream * >( this ) ); static_cast< XOutputStream * >( this ) );
return aRet.hasValue() ? aRet : Seekable::queryInterface( type ); return aRet.hasValue() ? aRet : Seekable::queryInterface( type );
......
...@@ -29,19 +29,17 @@ ...@@ -29,19 +29,17 @@
#include "gio_provider.hxx" #include "gio_provider.hxx"
#include "gio_content.hxx" #include "gio_content.hxx"
using namespace com::sun::star;
namespace gio namespace gio
{ {
uno::Reference< css::ucb::XContent > SAL_CALL css::uno::Reference< css::ucb::XContent > SAL_CALL
ContentProvider::queryContent( ContentProvider::queryContent(
const uno::Reference< css::ucb::XContentIdentifier >& Identifier ) const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier )
{ {
SAL_INFO("ucb.ucp.gio", "QueryContent: " << Identifier->getContentIdentifier()); SAL_INFO("ucb.ucp.gio", "QueryContent: " << Identifier->getContentIdentifier());
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
// Check, if a content with given id already exists... // Check, if a content with given id already exists...
uno::Reference< ucb::XContent > xContent = queryExistingContent( Identifier ).get(); css::uno::Reference< css::ucb::XContent > xContent = queryExistingContent( Identifier ).get();
if ( xContent.is() ) if ( xContent.is() )
return xContent; return xContent;
...@@ -61,7 +59,7 @@ ContentProvider::queryContent( ...@@ -61,7 +59,7 @@ ContentProvider::queryContent(
} }
ContentProvider::ContentProvider( ContentProvider::ContentProvider(
const uno::Reference< uno::XComponentContext >& rxContext ) const css::uno::Reference< css::uno::XComponentContext >& rxContext )
: ::ucbhelper::ContentProviderImplHelper( rxContext ) : ::ucbhelper::ContentProviderImplHelper( rxContext )
{ {
} }
...@@ -86,16 +84,16 @@ void SAL_CALL ContentProvider::release() ...@@ -86,16 +84,16 @@ void SAL_CALL ContentProvider::release()
css::uno::Any SAL_CALL ContentProvider::queryInterface( const css::uno::Type & rType ) css::uno::Any SAL_CALL ContentProvider::queryInterface( const css::uno::Type & rType )
{ {
css::uno::Any aRet = cppu::queryInterface( rType, css::uno::Any aRet = cppu::queryInterface( rType,
static_cast< lang::XTypeProvider* >(this), static_cast< css::lang::XTypeProvider* >(this),
static_cast< lang::XServiceInfo* >(this), static_cast< css::lang::XServiceInfo* >(this),
static_cast< css::ucb::XContentProvider* >(this) static_cast< css::ucb::XContentProvider* >(this)
); );
return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
} }
XTYPEPROVIDER_IMPL_3( ContentProvider, XTYPEPROVIDER_IMPL_3( ContentProvider,
lang::XTypeProvider, css::lang::XTypeProvider,
lang::XServiceInfo, css::lang::XServiceInfo,
css::ucb::XContentProvider ); css::ucb::XContentProvider );
XSERVICEINFO_COMMOM_IMPL( ContentProvider, XSERVICEINFO_COMMOM_IMPL( ContentProvider,
...@@ -125,9 +123,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * ucpgio1_component_getFactory( const sal_C ...@@ -125,9 +123,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * ucpgio1_component_getFactory( const sal_C
{ {
void * pRet = nullptr; void * pRet = nullptr;
uno::Reference< lang::XMultiServiceFactory > xSMgr css::uno::Reference< css::lang::XMultiServiceFactory > xSMgr
(static_cast< lang::XMultiServiceFactory * >( pServiceManager ) ); (static_cast< css::lang::XMultiServiceFactory * >( pServiceManager ) );
uno::Reference< lang::XSingleServiceFactory > xFactory; css::uno::Reference< css::lang::XSingleServiceFactory > xFactory;
#if !GLIB_CHECK_VERSION(2,36,0) #if !GLIB_CHECK_VERSION(2,36,0)
g_type_init(); g_type_init();
#endif #endif
......
...@@ -29,15 +29,13 @@ ...@@ -29,15 +29,13 @@
#include "gio_seekable.hxx" #include "gio_seekable.hxx"
#include "gio_content.hxx" #include "gio_content.hxx"
using namespace com::sun::star;
namespace gio namespace gio
{ {
Seekable::Seekable(GSeekable *pStream) : mpStream(pStream) Seekable::Seekable(GSeekable *pStream) : mpStream(pStream)
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
} }
Seekable::~Seekable() Seekable::~Seekable()
...@@ -47,10 +45,10 @@ Seekable::~Seekable() ...@@ -47,10 +45,10 @@ Seekable::~Seekable()
void SAL_CALL Seekable::truncate() void SAL_CALL Seekable::truncate()
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
if (!g_seekable_can_truncate(mpStream)) if (!g_seekable_can_truncate(mpStream))
throw io::IOException("Truncate unsupported", throw css::io::IOException("Truncate unsupported",
static_cast< cppu::OWeakObject * >(this)); static_cast< cppu::OWeakObject * >(this));
GError *pError=nullptr; GError *pError=nullptr;
...@@ -61,10 +59,10 @@ void SAL_CALL Seekable::truncate() ...@@ -61,10 +59,10 @@ void SAL_CALL Seekable::truncate()
void SAL_CALL Seekable::seek( sal_Int64 location ) void SAL_CALL Seekable::seek( sal_Int64 location )
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
if (!g_seekable_can_seek(mpStream)) if (!g_seekable_can_seek(mpStream))
throw io::IOException("Seek unsupported", throw css::io::IOException("Seek unsupported",
static_cast< cppu::OWeakObject * >(this)); static_cast< cppu::OWeakObject * >(this));
GError *pError=nullptr; GError *pError=nullptr;
...@@ -75,7 +73,7 @@ void SAL_CALL Seekable::seek( sal_Int64 location ) ...@@ -75,7 +73,7 @@ void SAL_CALL Seekable::seek( sal_Int64 location )
sal_Int64 SAL_CALL Seekable::getPosition() sal_Int64 SAL_CALL Seekable::getPosition()
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
return g_seekable_tell(mpStream); return g_seekable_tell(mpStream);
} }
...@@ -83,7 +81,7 @@ sal_Int64 SAL_CALL Seekable::getPosition() ...@@ -83,7 +81,7 @@ sal_Int64 SAL_CALL Seekable::getPosition()
sal_Int64 SAL_CALL Seekable::getLength() sal_Int64 SAL_CALL Seekable::getLength()
{ {
if (!mpStream) if (!mpStream)
throw io::NotConnectedException(); throw css::io::NotConnectedException();
bool bOk = false; bool bOk = false;
sal_uInt64 nSize = 0; sal_uInt64 nSize = 0;
...@@ -115,9 +113,9 @@ sal_Int64 SAL_CALL Seekable::getLength() ...@@ -115,9 +113,9 @@ sal_Int64 SAL_CALL Seekable::getLength()
return nSize; return nSize;
} }
uno::Any Seekable::queryInterface( const uno::Type &type ) css::uno::Any Seekable::queryInterface( const css::uno::Type &type )
{ {
uno::Any aRet = ::cppu::queryInterface ( type, css::uno::Any aRet = ::cppu::queryInterface ( type,
static_cast< XSeekable * >( this ) ); static_cast< XSeekable * >( this ) );
if (!aRet.hasValue() && g_seekable_can_truncate(mpStream)) if (!aRet.hasValue() && g_seekable_can_truncate(mpStream))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment