summaryrefslogtreecommitdiff
path: root/io/source/stm/opipe.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'io/source/stm/opipe.cxx')
-rw-r--r--io/source/stm/opipe.cxx30
1 files changed, 7 insertions, 23 deletions
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index ad59a0951288..494619cf882c 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -303,33 +303,17 @@ void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData)
}
// adjust buffersize if necessary
-
- try
+ if( m_nBytesToSkip )
{
- if( m_nBytesToSkip )
- {
- Sequence< sal_Int8 > seqCopy( nLen - m_nBytesToSkip );
- memcpy( seqCopy.getArray() , &( aData.getConstArray()[m_nBytesToSkip] ) , nLen-m_nBytesToSkip );
- m_pFIFO->write( seqCopy );
- }
- else
- {
- m_pFIFO->write( aData );
- }
- m_nBytesToSkip = 0;
+ Sequence< sal_Int8 > seqCopy( nLen - m_nBytesToSkip );
+ memcpy( seqCopy.getArray() , &( aData.getConstArray()[m_nBytesToSkip] ) , nLen-m_nBytesToSkip );
+ m_pFIFO->write( seqCopy );
}
- catch ( I_FIFO_OutOfBoundsException & )
+ else
{
- throw BufferSizeExceededException(
- "Pipe::writeBytes BufferSizeExceededException",
- *this );
- }
- catch ( I_FIFO_OutOfMemoryException & )
- {
- throw BufferSizeExceededException(
- "Pipe::writeBytes BufferSizeExceededException",
- *this );
+ m_pFIFO->write( aData );
}
+ m_nBytesToSkip = 0;
// readBytes may check again if enough bytes are available
m_conditionBytesAvail.set();