Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
091fc82b
Kaydet (Commit)
091fc82b
authored
Agu 20, 2014
tarafından
Thomas Arnhold
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
unotools: staruno -> css::uno
Change-Id: I20a470fe654bfd1eec23dd2e0c13162a0b432a32
üst
e189fa40
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
60 deletions
+57
-60
streamhelper.hxx
include/unotools/streamhelper.hxx
+6
-7
streamsection.hxx
include/unotools/streamsection.hxx
+5
-6
streamwrap.hxx
include/unotools/streamwrap.hxx
+11
-12
streamhelper.cxx
unotools/source/streaming/streamhelper.cxx
+14
-14
streamwrap.cxx
unotools/source/streaming/streamwrap.cxx
+21
-21
No files found.
include/unotools/streamhelper.hxx
Dosyayı görüntüle @
091fc82b
...
...
@@ -29,7 +29,6 @@
namespace
utl
{
namespace
stario
=
::
com
::
sun
::
star
::
io
;
namespace
staruno
=
::
com
::
sun
::
star
::
uno
;
/**
* The helper implementation for a using input streams based on SvLockBytes.
...
...
@@ -54,16 +53,16 @@ public:
,
m_nActPos
(
_nPos
)
,
m_nAvailable
(
_nAvailable
){}
//
star
uno::XInterface
//
css::
uno::XInterface
virtual
void
SAL_CALL
acquire
()
throw
()
SAL_OVERRIDE
;
virtual
void
SAL_CALL
release
()
throw
()
SAL_OVERRIDE
;
// stario::XInputStream
virtual
sal_Int32
SAL_CALL
readBytes
(
staruno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
readSomeBytes
(
staruno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
available
(
)
throw
(
stario
::
NotConnectedException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeInput
(
)
throw
(
stario
::
NotConnectedException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
readBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
readSomeBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
available
(
)
throw
(
stario
::
NotConnectedException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeInput
(
)
throw
(
stario
::
NotConnectedException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
seek
(
sal_Int64
location
)
throw
(
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
io
::
IOException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int64
SAL_CALL
getPosition
(
)
throw
(
::
com
::
sun
::
star
::
io
::
IOException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
...
...
include/unotools/streamsection.hxx
Dosyayı görüntüle @
091fc82b
...
...
@@ -28,7 +28,6 @@ namespace utl
{
namespace
stario
=
::
com
::
sun
::
star
::
io
;
namespace
staruno
=
::
com
::
sun
::
star
::
uno
;
/** implements handling for compatibly reading/writing data from/into an input/output stream.
data written in a block secured by this class should be readable by older versions which
...
...
@@ -40,9 +39,9 @@ namespace utl
class
OStreamSection
{
star
uno
::
Reference
<
stario
::
XMarkableStream
>
m_xMarkStream
;
star
uno
::
Reference
<
stario
::
XDataInputStream
>
m_xInStream
;
star
uno
::
Reference
<
stario
::
XDataOutputStream
>
m_xOutStream
;
css
::
uno
::
Reference
<
stario
::
XMarkableStream
>
m_xMarkStream
;
css
::
uno
::
Reference
<
stario
::
XDataInputStream
>
m_xInStream
;
css
::
uno
::
Reference
<
stario
::
XDataOutputStream
>
m_xOutStream
;
sal_Int32
m_nBlockStart
;
sal_Int32
m_nBlockLen
;
...
...
@@ -52,7 +51,7 @@ public:
@param _rxInput the stream to read from. Must support the
com::sun::star::io::XMarkableStream interface
*/
OStreamSection
(
const
star
uno
::
Reference
<
stario
::
XDataInputStream
>&
_rxInput
);
OStreamSection
(
const
css
::
uno
::
Reference
<
stario
::
XDataInputStream
>&
_rxInput
);
/** starts writing of a "skippable" section of data into the given output stream
@param _rxOutput the stream the stream to write to. Must support the
...
...
@@ -62,7 +61,7 @@ public:
needed. If you know how much bytes you are about to write, you may
want to use this param, saving some stream operations this way.
*/
OStreamSection
(
const
star
uno
::
Reference
<
stario
::
XDataOutputStream
>&
_rxOutput
,
sal_Int32
_nPresumedLength
=
0
);
OStreamSection
(
const
css
::
uno
::
Reference
<
stario
::
XDataOutputStream
>&
_rxOutput
,
sal_Int32
_nPresumedLength
=
0
);
/** dtor. <BR>If constructed for writing, the section "opened" by this object will be "closed".<BR>
If constructed for reading, any remaining bytes 'til the end of the section will be skipped.
...
...
include/unotools/streamwrap.hxx
Dosyayı görüntüle @
091fc82b
...
...
@@ -35,7 +35,6 @@ class SvStream;
namespace
utl
{
namespace
stario
=
::
com
::
sun
::
star
::
io
;
namespace
staruno
=
::
com
::
sun
::
star
::
uno
;
//= OInputStreamWrapper
...
...
@@ -60,11 +59,11 @@ public:
virtual
~
OInputStreamWrapper
();
// stario::XInputStream
virtual
sal_Int32
SAL_CALL
readBytes
(
staruno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
readSomeBytes
(
staruno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
available
()
throw
(
stario
::
NotConnectedException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeInput
()
throw
(
stario
::
NotConnectedException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
readBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
readSomeBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
available
()
throw
(
stario
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeInput
()
throw
(
stario
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
protected
:
/// throws a NotConnectedException if the object is not connected anymore
...
...
@@ -107,9 +106,9 @@ protected:
virtual
~
OOutputStreamWrapper
();
// stario::XOutputStream
virtual
void
SAL_CALL
writeBytes
(
const
staruno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
flush
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeOutput
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
writeBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
flush
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeOutput
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
/// throws an exception according to the error flag of m_pSvStream
void
checkError
()
const
;
...
...
@@ -156,9 +155,9 @@ public:
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XOutputStream
>
SAL_CALL
getOutputStream
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// stario::XOutputStream
virtual
void
SAL_CALL
writeBytes
(
const
staruno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
flush
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeOutput
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
writeBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
flush
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeOutput
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
truncate
()
throw
(
::
com
::
sun
::
star
::
io
::
IOException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
};
...
...
unotools/source/streaming/streamhelper.cxx
Dosyayı görüntüle @
091fc82b
...
...
@@ -32,14 +32,14 @@ void SAL_CALL OInputStreamHelper::release() throw ()
InputStreamHelper_Base
::
release
();
}
sal_Int32
SAL_CALL
OInputStreamHelper
::
readBytes
(
star
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
sal_Int32
SAL_CALL
OInputStreamHelper
::
readBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
!
m_xLockBytes
.
Is
())
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
if
(
nBytesToRead
<
0
)
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
aData
.
realloc
(
nBytesToRead
);
...
...
@@ -49,7 +49,7 @@ sal_Int32 SAL_CALL OInputStreamHelper::readBytes(staruno::Sequence< sal_Int8 >&
m_nActPos
+=
nRead
;
if
(
nError
!=
ERRCODE_NONE
)
throw
stario
::
IOException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
IOException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
// adjust sequence if data read is lower than the desired data
if
(
nRead
<
(
sal_uInt32
)
nBytesToRead
)
...
...
@@ -80,43 +80,43 @@ sal_Int64 SAL_CALL OInputStreamHelper::getLength( ) throw(::com::sun::star::io:
return
aStat
.
nSize
;
}
sal_Int32
SAL_CALL
OInputStreamHelper
::
readSomeBytes
(
star
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
SAL_CALL
OInputStreamHelper
::
readSomeBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
// read all data desired
return
readBytes
(
aData
,
nMaxBytesToRead
);
}
void
SAL_CALL
OInputStreamHelper
::
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
if
(
!
m_xLockBytes
.
Is
())
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
if
(
nBytesToSkip
<
0
)
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
m_nActPos
+=
nBytesToSkip
;
}
sal_Int32
SAL_CALL
OInputStreamHelper
::
available
()
throw
(
stario
::
NotConnectedException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
throw
(
stario
::
NotConnectedException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
if
(
!
m_xLockBytes
.
Is
())
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
return
m_nAvailable
;
}
void
SAL_CALL
OInputStreamHelper
::
closeInput
()
throw
(
stario
::
NotConnectedException
,
stario
::
IOException
,
star
uno
::
RuntimeException
,
std
::
exception
)
throw
(
stario
::
NotConnectedException
,
stario
::
IOException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
if
(
!
m_xLockBytes
.
Is
())
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
m_xLockBytes
=
NULL
;
}
...
...
unotools/source/streaming/streamwrap.cxx
Dosyayı görüntüle @
091fc82b
...
...
@@ -45,13 +45,13 @@ OInputStreamWrapper::~OInputStreamWrapper()
delete
m_pSvStream
;
}
sal_Int32
SAL_CALL
OInputStreamWrapper
::
readBytes
(
star
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
sal_Int32
SAL_CALL
OInputStreamWrapper
::
readBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
checkConnected
();
if
(
nBytesToRead
<
0
)
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
...
...
@@ -60,19 +60,19 @@ sal_Int32 SAL_CALL OInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 >&
sal_uInt32
nRead
=
m_pSvStream
->
Read
((
void
*
)
aData
.
getArray
(),
nBytesToRead
);
checkError
();
// Wenn gelesene Zeichen < MaxLength,
star
uno::Sequence anpassen
// Wenn gelesene Zeichen < MaxLength,
css::
uno::Sequence anpassen
if
(
nRead
<
(
sal_uInt32
)
nBytesToRead
)
aData
.
realloc
(
nRead
);
return
nRead
;
}
sal_Int32
SAL_CALL
OInputStreamWrapper
::
readSomeBytes
(
staruno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
sal_Int32
SAL_CALL
OInputStreamWrapper
::
readSomeBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
checkError
();
if
(
nMaxBytesToRead
<
0
)
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
if
(
m_pSvStream
->
IsEof
())
{
...
...
@@ -83,7 +83,7 @@ sal_Int32 SAL_CALL OInputStreamWrapper::readSomeBytes(staruno::Sequence< sal_Int
return
readBytes
(
aData
,
nMaxBytesToRead
);
}
void
SAL_CALL
OInputStreamWrapper
::
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OInputStreamWrapper
::
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
checkError
();
...
...
@@ -92,7 +92,7 @@ void SAL_CALL OInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( star
checkError
();
}
sal_Int32
SAL_CALL
OInputStreamWrapper
::
available
()
throw
(
stario
::
NotConnectedException
,
star
uno
::
RuntimeException
,
std
::
exception
)
sal_Int32
SAL_CALL
OInputStreamWrapper
::
available
()
throw
(
stario
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
checkConnected
();
...
...
@@ -110,7 +110,7 @@ sal_Int32 SAL_CALL OInputStreamWrapper::available() throw( stario::NotConnectedE
return
nAvailable
;
}
void
SAL_CALL
OInputStreamWrapper
::
closeInput
()
throw
(
stario
::
NotConnectedException
,
star
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OInputStreamWrapper
::
closeInput
()
throw
(
stario
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
checkConnected
();
...
...
@@ -124,7 +124,7 @@ void SAL_CALL OInputStreamWrapper::closeInput() throw( stario::NotConnectedExcep
void
OInputStreamWrapper
::
checkConnected
()
const
{
if
(
!
m_pSvStream
)
throw
stario
::
NotConnectedException
(
OUString
(),
const_cast
<
staruno
::
XWeak
*>
(
static_cast
<
const
star
uno
::
XWeak
*>
(
this
)));
throw
stario
::
NotConnectedException
(
OUString
(),
const_cast
<
css
::
uno
::
XWeak
*>
(
static_cast
<
const
css
::
uno
::
XWeak
*>
(
this
)));
}
void
OInputStreamWrapper
::
checkError
()
const
...
...
@@ -133,7 +133,7 @@ void OInputStreamWrapper::checkError() const
if
(
m_pSvStream
->
SvStream
::
GetError
()
!=
ERRCODE_NONE
)
// TODO: really evaluate the error
throw
stario
::
NotConnectedException
(
OUString
(),
const_cast
<
staruno
::
XWeak
*>
(
static_cast
<
const
star
uno
::
XWeak
*>
(
this
)));
throw
stario
::
NotConnectedException
(
OUString
(),
const_cast
<
css
::
uno
::
XWeak
*>
(
static_cast
<
const
css
::
uno
::
XWeak
*>
(
this
)));
}
//= OSeekableInputStreamWrapper
...
...
@@ -192,7 +192,7 @@ OOutputStreamWrapper::OOutputStreamWrapper(SvStream& _rStream):
OOutputStreamWrapper
::~
OOutputStreamWrapper
()
{}
void
SAL_CALL
OOutputStreamWrapper
::
writeBytes
(
const
staruno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OOutputStreamWrapper
::
writeBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
sal_uInt32
nWritten
=
rStream
.
Write
(
aData
.
getConstArray
(),
aData
.
getLength
());
ErrCode
err
=
rStream
.
GetError
();
...
...
@@ -200,17 +200,17 @@ void SAL_CALL OOutputStreamWrapper::writeBytes(const staruno::Sequence< sal_Int8
||
(
nWritten
!=
(
sal_uInt32
)
aData
.
getLength
())
)
{
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
}
}
void
SAL_CALL
OOutputStreamWrapper
::
flush
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OOutputStreamWrapper
::
flush
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
rStream
.
Flush
();
checkError
();
}
void
SAL_CALL
OOutputStreamWrapper
::
closeOutput
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OOutputStreamWrapper
::
closeOutput
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
}
...
...
@@ -218,7 +218,7 @@ void OOutputStreamWrapper::checkError() const
{
if
(
rStream
.
GetError
()
!=
ERRCODE_NONE
)
// TODO: really evaluate the error
throw
stario
::
NotConnectedException
(
OUString
(),
const_cast
<
staruno
::
XWeak
*>
(
static_cast
<
const
star
uno
::
XWeak
*>
(
this
)));
throw
stario
::
NotConnectedException
(
OUString
(),
const_cast
<
css
::
uno
::
XWeak
*>
(
static_cast
<
const
css
::
uno
::
XWeak
*>
(
this
)));
}
//= OSeekableOutputStreamWrapper
...
...
@@ -290,7 +290,7 @@ OStreamWrapper::OStreamWrapper(SvStream& _rStream)
return
this
;
}
void
SAL_CALL
OStreamWrapper
::
writeBytes
(
const
staruno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OStreamWrapper
::
writeBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
sal_uInt32
nWritten
=
m_pSvStream
->
Write
(
aData
.
getConstArray
(),
aData
.
getLength
());
ErrCode
err
=
m_pSvStream
->
GetError
();
...
...
@@ -298,18 +298,18 @@ void SAL_CALL OStreamWrapper::writeBytes(const staruno::Sequence< sal_Int8 >& aD
||
(
nWritten
!=
(
sal_uInt32
)
aData
.
getLength
())
)
{
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
}
}
void
SAL_CALL
OStreamWrapper
::
flush
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OStreamWrapper
::
flush
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
m_pSvStream
->
Flush
();
if
(
m_pSvStream
->
GetError
()
!=
ERRCODE_NONE
)
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
star
uno
::
XWeak
*>
(
this
));
throw
stario
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
}
void
SAL_CALL
OStreamWrapper
::
closeOutput
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
star
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OStreamWrapper
::
closeOutput
()
throw
(
stario
::
NotConnectedException
,
stario
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment