summaryrefslogtreecommitdiff
path: root/io/source/stm/omark.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'io/source/stm/omark.cxx')
-rw-r--r--io/source/stm/omark.cxx203
1 files changed, 56 insertions, 147 deletions
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index af4e9f248456..dc9fbb8b260a 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -78,61 +78,37 @@ public:
OMarkableOutputStream( );
public: // XOutputStream
- virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData)
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception) override;
- virtual void SAL_CALL flush()
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception) override;
- virtual void SAL_CALL closeOutput()
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception) override;
+ virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) override;
+ virtual void SAL_CALL flush() override;
+ virtual void SAL_CALL closeOutput() override;
public: // XMarkable
- virtual sal_Int32 SAL_CALL createMark()
- throw (IOException, RuntimeException, std::exception) override;
- virtual void SAL_CALL deleteMark(sal_Int32 Mark)
- throw (IOException,
- IllegalArgumentException,
- RuntimeException, std::exception) override;
- virtual void SAL_CALL jumpToMark(sal_Int32 nMark)
- throw (IOException,
- IllegalArgumentException,
- RuntimeException, std::exception) override;
- virtual void SAL_CALL jumpToFurthest()
- throw (IOException, RuntimeException, std::exception) override;
- virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark)
- throw (IOException,
- IllegalArgumentException,
- RuntimeException, std::exception) override;
+ virtual sal_Int32 SAL_CALL createMark() override;
+ virtual void SAL_CALL deleteMark(sal_Int32 Mark) override;
+ virtual void SAL_CALL jumpToMark(sal_Int32 nMark) override;
+ virtual void SAL_CALL jumpToFurthest() override;
+ virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) override;
public: // XActiveDataSource
- virtual void SAL_CALL setOutputStream(const Reference < XOutputStream > & aStream)
- throw (RuntimeException, std::exception) override;
- virtual Reference < XOutputStream > SAL_CALL getOutputStream()
- throw (RuntimeException, std::exception) override;
+ virtual void SAL_CALL setOutputStream(const Reference < XOutputStream > & aStream) override;
+ virtual Reference < XOutputStream > SAL_CALL getOutputStream() override;
public: // XConnectable
- virtual void SAL_CALL setPredecessor(const Reference < XConnectable > & aPredecessor)
- throw (RuntimeException, std::exception) override;
- virtual Reference < XConnectable > SAL_CALL getPredecessor() throw (RuntimeException, std::exception) override;
- virtual void SAL_CALL setSuccessor(const Reference < XConnectable >& aSuccessor)
- throw (RuntimeException, std::exception) override;
- virtual Reference< XConnectable > SAL_CALL getSuccessor() throw (RuntimeException, std::exception) override;
+ virtual void SAL_CALL setPredecessor(const Reference < XConnectable > & aPredecessor) override;
+ virtual Reference < XConnectable > SAL_CALL getPredecessor() override;
+ virtual void SAL_CALL setSuccessor(const Reference < XConnectable >& aSuccessor) override;
+ virtual Reference< XConnectable > SAL_CALL getSuccessor() override;
public: // XServiceInfo
- OUString SAL_CALL getImplementationName() throw (std::exception) override;
- Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (std::exception) override;
- sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) override;
+ OUString SAL_CALL getImplementationName() override;
+ Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+ sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
private:
// helper methods
/// @throws NotConnectedException
/// @throws BufferSizeExceededException
- void checkMarksAndFlush() throw( NotConnectedException, BufferSizeExceededException);
+ void checkMarksAndFlush();
Reference< XConnectable > m_succ;
Reference< XConnectable > m_pred;
@@ -158,9 +134,6 @@ OMarkableOutputStream::OMarkableOutputStream( )
// XOutputStream
void OMarkableOutputStream::writeBytes(const Sequence< sal_Int8 >& aData)
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception)
{
if( m_bValidStream ) {
if( m_mapMarks.empty() && ( m_pBuffer->getSize() == 0 ) ) {
@@ -181,9 +154,6 @@ void OMarkableOutputStream::writeBytes(const Sequence< sal_Int8 >& aData)
}
void OMarkableOutputStream::flush()
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception)
{
Reference< XOutputStream > output;
{
@@ -201,9 +171,6 @@ void OMarkableOutputStream::flush()
}
void OMarkableOutputStream::closeOutput()
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception)
{
if( m_bValidStream ) {
MutexGuard guard( m_mutex );
@@ -229,8 +196,6 @@ void OMarkableOutputStream::closeOutput()
sal_Int32 OMarkableOutputStream::createMark()
- throw ( IOException,
- RuntimeException, std::exception)
{
MutexGuard guard( m_mutex );
sal_Int32 nMark = m_nCurrentMark;
@@ -242,9 +207,6 @@ sal_Int32 OMarkableOutputStream::createMark()
}
void OMarkableOutputStream::deleteMark(sal_Int32 Mark)
- throw( IOException,
- IllegalArgumentException,
- RuntimeException, std::exception)
{
MutexGuard guard( m_mutex );
map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii = m_mapMarks.find( Mark );
@@ -263,9 +225,6 @@ void OMarkableOutputStream::deleteMark(sal_Int32 Mark)
}
void OMarkableOutputStream::jumpToMark(sal_Int32 nMark)
- throw (IOException,
- IllegalArgumentException,
- RuntimeException, std::exception)
{
MutexGuard guard( m_mutex );
map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii = m_mapMarks.find( nMark );
@@ -283,8 +242,6 @@ void OMarkableOutputStream::jumpToMark(sal_Int32 nMark)
}
void OMarkableOutputStream::jumpToFurthest()
- throw (IOException,
- RuntimeException, std::exception)
{
MutexGuard guard( m_mutex );
m_nCurrentPos = m_pBuffer->getSize();
@@ -292,9 +249,6 @@ void OMarkableOutputStream::jumpToFurthest()
}
sal_Int32 OMarkableOutputStream::offsetToMark(sal_Int32 nMark)
- throw (IOException,
- IllegalArgumentException,
- RuntimeException, std::exception)
{
MutexGuard guard( m_mutex );
@@ -314,7 +268,6 @@ sal_Int32 OMarkableOutputStream::offsetToMark(sal_Int32 nMark)
// XActiveDataSource2
void OMarkableOutputStream::setOutputStream(const Reference < XOutputStream >& aStream)
- throw (RuntimeException, std::exception)
{
if( m_output != aStream ) {
m_output = aStream;
@@ -325,14 +278,13 @@ void OMarkableOutputStream::setOutputStream(const Reference < XOutputStream >& a
m_bValidStream = m_output.is();
}
-Reference< XOutputStream > OMarkableOutputStream::getOutputStream() throw (RuntimeException, std::exception)
+Reference< XOutputStream > OMarkableOutputStream::getOutputStream()
{
return m_output;
}
void OMarkableOutputStream::setSuccessor( const Reference< XConnectable > &r )
- throw (RuntimeException, std::exception)
{
/// if the references match, nothing needs to be done
if( m_succ != r ) {
@@ -345,7 +297,7 @@ void OMarkableOutputStream::setSuccessor( const Reference< XConnectable > &r )
}
}
}
-Reference <XConnectable > OMarkableOutputStream::getSuccessor() throw (RuntimeException, std::exception)
+Reference <XConnectable > OMarkableOutputStream::getSuccessor()
{
return m_succ;
}
@@ -353,7 +305,6 @@ Reference <XConnectable > OMarkableOutputStream::getSuccessor() throw (Runti
// XDataSource
void OMarkableOutputStream::setPredecessor( const Reference< XConnectable > &r )
- throw (RuntimeException, std::exception)
{
if( r != m_pred ) {
m_pred = r;
@@ -363,7 +314,7 @@ void OMarkableOutputStream::setPredecessor( const Reference< XConnectable > &r )
}
}
}
-Reference < XConnectable > OMarkableOutputStream::getPredecessor() throw (RuntimeException, std::exception)
+Reference < XConnectable > OMarkableOutputStream::getPredecessor()
{
return m_pred;
}
@@ -371,8 +322,7 @@ Reference < XConnectable > OMarkableOutputStream::getPredecessor() throw (Runtim
// private methods
-void OMarkableOutputStream::checkMarksAndFlush() throw( NotConnectedException,
- BufferSizeExceededException)
+void OMarkableOutputStream::checkMarksAndFlush()
{
map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii;
@@ -406,19 +356,19 @@ void OMarkableOutputStream::checkMarksAndFlush() throw( NotConnectedExceptio
// XServiceInfo
-OUString OMarkableOutputStream::getImplementationName() throw (std::exception)
+OUString OMarkableOutputStream::getImplementationName()
{
return OMarkableOutputStream_getImplementationName();
}
// XServiceInfo
-sal_Bool OMarkableOutputStream::supportsService(const OUString& ServiceName) throw (std::exception)
+sal_Bool OMarkableOutputStream::supportsService(const OUString& ServiceName)
{
return cppu::supportsService(this, ServiceName);
}
// XServiceInfo
-Sequence< OUString > OMarkableOutputStream::getSupportedServiceNames() throw (std::exception)
+Sequence< OUString > OMarkableOutputStream::getSupportedServiceNames()
{
return OMarkableOutputStream_getSupportedServiceNames();
}
@@ -430,7 +380,6 @@ Sequence< OUString > OMarkableOutputStream::getSupportedServiceNames() throw (st
*------------------------*/
Reference< XInterface > SAL_CALL OMarkableOutputStream_CreateInstance(
SAL_UNUSED_PARAMETER const Reference < XComponentContext > & )
- throw(Exception)
{
OMarkableOutputStream *p = new OMarkableOutputStream( );
@@ -469,55 +418,34 @@ public:
public: // XInputStream
- virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception) override ;
- virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead)
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception) override;
- virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip)
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception) override;
-
- virtual sal_Int32 SAL_CALL available()
- throw ( NotConnectedException,
- RuntimeException, std::exception) override;
- virtual void SAL_CALL closeInput() throw (NotConnectedException, RuntimeException, std::exception) override;
+ virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) override ;
+ virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) override;
+ virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) override;
+
+ virtual sal_Int32 SAL_CALL available() override;
+ virtual void SAL_CALL closeInput() override;
public: // XMarkable
- virtual sal_Int32 SAL_CALL createMark()
- throw (IOException, RuntimeException, std::exception) override;
- virtual void SAL_CALL deleteMark(sal_Int32 Mark)
- throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override;
- virtual void SAL_CALL jumpToMark(sal_Int32 nMark)
- throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override;
- virtual void SAL_CALL jumpToFurthest()
- throw (IOException, RuntimeException, std::exception) override;
- virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark)
- throw (IOException, IllegalArgumentException,RuntimeException, std::exception) override;
+ virtual sal_Int32 SAL_CALL createMark() override;
+ virtual void SAL_CALL deleteMark(sal_Int32 Mark) override;
+ virtual void SAL_CALL jumpToMark(sal_Int32 nMark) override;
+ virtual void SAL_CALL jumpToFurthest() override;
+ virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) override;
public: // XActiveDataSink
- virtual void SAL_CALL setInputStream(const Reference < XInputStream > & aStream)
- throw (RuntimeException, std::exception) override;
- virtual Reference < XInputStream > SAL_CALL getInputStream()
- throw (RuntimeException, std::exception) override;
+ virtual void SAL_CALL setInputStream(const Reference < XInputStream > & aStream) override;
+ virtual Reference < XInputStream > SAL_CALL getInputStream() override;
public: // XConnectable
- virtual void SAL_CALL setPredecessor(const Reference < XConnectable > & aPredecessor)
- throw (RuntimeException, std::exception) override;
- virtual Reference < XConnectable > SAL_CALL getPredecessor()
- throw (RuntimeException, std::exception) override;
- virtual void SAL_CALL setSuccessor(const Reference < XConnectable > & aSuccessor)
- throw (RuntimeException, std::exception) override;
- virtual Reference < XConnectable > SAL_CALL getSuccessor() throw (RuntimeException, std::exception) override;
+ virtual void SAL_CALL setPredecessor(const Reference < XConnectable > & aPredecessor) override;
+ virtual Reference < XConnectable > SAL_CALL getPredecessor() override;
+ virtual void SAL_CALL setSuccessor(const Reference < XConnectable > & aSuccessor) override;
+ virtual Reference < XConnectable > SAL_CALL getSuccessor() override;
public: // XServiceInfo
- OUString SAL_CALL getImplementationName() throw (std::exception) override;
- Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (std::exception) override;
- sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) override;
+ OUString SAL_CALL getImplementationName() override;
+ Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+ sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
private:
void checkMarksAndFlush();
@@ -555,9 +483,6 @@ OMarkableInputStream::~OMarkableInputStream()
// XInputStream
sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception)
{
sal_Int32 nBytesRead;
@@ -603,9 +528,6 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32
sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead)
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception)
{
sal_Int32 nBytesRead;
@@ -656,9 +578,6 @@ sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_I
void OMarkableInputStream::skipBytes(sal_Int32 nBytesToSkip)
- throw ( NotConnectedException,
- BufferSizeExceededException,
- RuntimeException, std::exception)
{
if ( nBytesToSkip < 0 )
throw BufferSizeExceededException(
@@ -671,7 +590,7 @@ void OMarkableInputStream::skipBytes(sal_Int32 nBytesToSkip)
readBytes( seqDummy , nBytesToSkip );
}
-sal_Int32 OMarkableInputStream::available() throw (NotConnectedException, RuntimeException, std::exception)
+sal_Int32 OMarkableInputStream::available()
{
sal_Int32 nAvail;
if( m_bValidStream ) {
@@ -689,7 +608,7 @@ sal_Int32 OMarkableInputStream::available() throw (NotConnectedException, Runtim
}
-void OMarkableInputStream::closeInput() throw (NotConnectedException, RuntimeException, std::exception)
+void OMarkableInputStream::closeInput()
{
if( m_bValidStream ) {
MutexGuard guard( m_mutex );
@@ -714,7 +633,7 @@ void OMarkableInputStream::closeInput() throw (NotConnectedException, RuntimeExc
// XMarkable
-sal_Int32 OMarkableInputStream::createMark() throw (IOException, RuntimeException, std::exception)
+sal_Int32 OMarkableInputStream::createMark()
{
MutexGuard guard( m_mutex );
sal_Int32 nMark = m_nCurrentMark;
@@ -725,7 +644,7 @@ sal_Int32 OMarkableInputStream::createMark() throw (IOException, Runt
return nMark;
}
-void OMarkableInputStream::deleteMark(sal_Int32 Mark) throw (IOException, IllegalArgumentException, RuntimeException, std::exception)
+void OMarkableInputStream::deleteMark(sal_Int32 Mark)
{
MutexGuard guard( m_mutex );
map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii = m_mapMarks.find( Mark );
@@ -744,9 +663,6 @@ void OMarkableInputStream::deleteMark(sal_Int32 Mark) throw (IOException,
}
void OMarkableInputStream::jumpToMark(sal_Int32 nMark)
- throw (IOException,
- IllegalArgumentException,
- RuntimeException, std::exception)
{
MutexGuard guard( m_mutex );
map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii = m_mapMarks.find( nMark );
@@ -765,7 +681,7 @@ void OMarkableInputStream::jumpToMark(sal_Int32 nMark)
}
}
-void OMarkableInputStream::jumpToFurthest() throw (IOException, RuntimeException, std::exception)
+void OMarkableInputStream::jumpToFurthest()
{
MutexGuard guard( m_mutex );
m_nCurrentPos = m_pBuffer->getSize();
@@ -773,9 +689,6 @@ void OMarkableInputStream::jumpToFurthest() throw (IOException, RuntimeE
}
sal_Int32 OMarkableInputStream::offsetToMark(sal_Int32 nMark)
- throw (IOException,
- IllegalArgumentException,
- RuntimeException, std::exception)
{
MutexGuard guard( m_mutex );
map<sal_Int32,sal_Int32,less<sal_Int32> >::const_iterator ii = m_mapMarks.find( nMark );
@@ -794,7 +707,6 @@ sal_Int32 OMarkableInputStream::offsetToMark(sal_Int32 nMark)
// XActiveDataSource
void OMarkableInputStream::setInputStream(const Reference< XInputStream > & aStream)
- throw (RuntimeException, std::exception)
{
if( m_input != aStream ) {
@@ -808,7 +720,7 @@ void OMarkableInputStream::setInputStream(const Reference< XInputStream > & aStr
}
-Reference< XInputStream > OMarkableInputStream::getInputStream() throw (RuntimeException, std::exception)
+Reference< XInputStream > OMarkableInputStream::getInputStream()
{
return m_input;
}
@@ -816,7 +728,6 @@ Reference< XInputStream > OMarkableInputStream::getInputStream() throw (RuntimeE
// XDataSink
void OMarkableInputStream::setSuccessor( const Reference< XConnectable > &r )
- throw (RuntimeException, std::exception)
{
/// if the references match, nothing needs to be done
if( m_succ != r ) {
@@ -831,7 +742,7 @@ void OMarkableInputStream::setSuccessor( const Reference< XConnectable > &r )
}
}
-Reference < XConnectable > OMarkableInputStream::getSuccessor() throw (RuntimeException, std::exception)
+Reference < XConnectable > OMarkableInputStream::getSuccessor()
{
return m_succ;
}
@@ -839,7 +750,6 @@ Reference < XConnectable > OMarkableInputStream::getSuccessor() throw (RuntimeE
// XDataSource
void OMarkableInputStream::setPredecessor( const Reference < XConnectable > &r )
- throw (RuntimeException, std::exception)
{
if( r != m_pred ) {
m_pred = r;
@@ -849,7 +759,7 @@ void OMarkableInputStream::setPredecessor( const Reference < XConnectable > &r
}
}
}
-Reference< XConnectable > OMarkableInputStream::getPredecessor() throw (RuntimeException, std::exception)
+Reference< XConnectable > OMarkableInputStream::getPredecessor()
{
return m_pred;
}
@@ -884,19 +794,19 @@ void OMarkableInputStream::checkMarksAndFlush()
}
// XServiceInfo
-OUString OMarkableInputStream::getImplementationName() throw (std::exception)
+OUString OMarkableInputStream::getImplementationName()
{
return OMarkableInputStream_getImplementationName();
}
// XServiceInfo
-sal_Bool OMarkableInputStream::supportsService(const OUString& ServiceName) throw (std::exception)
+sal_Bool OMarkableInputStream::supportsService(const OUString& ServiceName)
{
return cppu::supportsService(this, ServiceName);
}
// XServiceInfo
-Sequence< OUString > OMarkableInputStream::getSupportedServiceNames() throw (std::exception)
+Sequence< OUString > OMarkableInputStream::getSupportedServiceNames()
{
return OMarkableInputStream_getSupportedServiceNames();
}
@@ -908,7 +818,6 @@ Sequence< OUString > OMarkableInputStream::getSupportedServiceNames() throw (std
*------------------------*/
Reference < XInterface > SAL_CALL OMarkableInputStream_CreateInstance(
SAL_UNUSED_PARAMETER const Reference < XComponentContext > & )
- throw(Exception)
{
OMarkableInputStream *p = new OMarkableInputStream( );
return Reference< XInterface > ( static_cast<OWeakObject *>(p) );