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
cb347ddc
Kaydet (Commit)
cb347ddc
authored
Agu 20, 2014
tarafından
Thomas Arnhold
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
stario -> css::io
Change-Id: Iad96e0a2bfd6c126c696f14919dbfd8e072dd230
üst
edda7dba
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
80 deletions
+74
-80
basicio.cxx
comphelper/source/streaming/basicio.cxx
+16
-16
oslfile2streamwrap.cxx
comphelper/source/streaming/oslfile2streamwrap.cxx
+23
-23
streamsection.cxx
comphelper/source/streaming/streamsection.cxx
+2
-2
basicio.hxx
include/comphelper/basicio.hxx
+16
-19
oslfile2streamwrap.hxx
include/comphelper/oslfile2streamwrap.hxx
+12
-13
streamsection.hxx
include/comphelper/streamsection.hxx
+5
-7
No files found.
comphelper/source/streaming/basicio.cxx
Dosyayı görüntüle @
cb347ddc
...
...
@@ -25,8 +25,8 @@ namespace comphelper
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
const
css
::
awt
::
FontDescriptor
&
_rFont
)
{
_rxOutStream
->
writeUTF
(
_rFont
.
Name
);
...
...
@@ -50,8 +50,8 @@ const css::uno::Reference<stario::XObjectOutputStream>& operator << (
// FontDescriptor
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
css
::
awt
::
FontDescriptor
&
_rFont
)
{
// schreiben des Fontdescriptors
...
...
@@ -75,84 +75,84 @@ const css::uno::Reference<stario::XObjectInputStream>& operator >> (
}
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
bool
&
_rVal
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
bool
&
_rVal
)
{
_rVal
=
_rxInStream
->
readBoolean
();
return
_rxInStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
bool
_bVal
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
bool
_bVal
)
{
_rxOutStream
->
writeBoolean
(
_bVal
);
return
_rxOutStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
OUString
&
rStr
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
OUString
&
rStr
)
{
rStr
=
_rxInStream
->
readUTF
();
return
_rxInStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
const
OUString
&
rStr
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
const
OUString
&
rStr
)
{
_rxOutStream
->
writeUTF
(
rStr
);
return
_rxOutStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
sal_Int16
&
_rValue
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
sal_Int16
&
_rValue
)
{
_rValue
=
_rxInStream
->
readShort
();
return
_rxInStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_Int16
_nValue
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_Int16
_nValue
)
{
_rxOutStream
->
writeShort
(
_nValue
);
return
_rxOutStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
sal_uInt16
&
_rValue
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
sal_uInt16
&
_rValue
)
{
_rValue
=
_rxInStream
->
readShort
();
return
_rxInStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_uInt16
_nValue
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_uInt16
_nValue
)
{
_rxOutStream
->
writeShort
(
_nValue
);
return
_rxOutStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
sal_uInt32
&
_rValue
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
sal_uInt32
&
_rValue
)
{
_rValue
=
_rxInStream
->
readLong
();
return
_rxInStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_uInt32
_nValue
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_uInt32
_nValue
)
{
_rxOutStream
->
writeLong
(
_nValue
);
return
_rxOutStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
sal_Int32
&
_rValue
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
sal_Int32
&
_rValue
)
{
_rValue
=
_rxInStream
->
readLong
();
return
_rxInStream
;
}
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_Int32
_nValue
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_Int32
_nValue
)
{
_rxOutStream
->
writeLong
(
_nValue
);
return
_rxOutStream
;
...
...
comphelper/source/streaming/oslfile2streamwrap.cxx
Dosyayı görüntüle @
cb347ddc
...
...
@@ -38,13 +38,13 @@ OSLInputStreamWrapper::~OSLInputStreamWrapper()
sal_Int32
SAL_CALL
OSLInputStreamWrapper
::
readBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
!
m_pFile
)
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
if
(
nBytesToRead
<
0
)
throw
star
io
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
...
...
@@ -53,7 +53,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8
sal_uInt64
nRead
=
0
;
FileBase
::
RC
eError
=
m_pFile
->
read
((
void
*
)
aData
.
getArray
(),
nBytesToRead
,
nRead
);
if
(
eError
!=
FileBase
::
E_None
)
throw
star
io
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
// Wenn gelesene Zeichen < MaxLength, css::uno::Sequence anpassen
if
(
nRead
<
(
sal_uInt32
)
nBytesToRead
)
...
...
@@ -63,23 +63,23 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8
}
sal_Int32
SAL_CALL
OSLInputStreamWrapper
::
readSomeBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
sal_Int32
SAL_CALL
OSLInputStreamWrapper
::
readSomeBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
!
m_pFile
)
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
if
(
nMaxBytesToRead
<
0
)
throw
star
io
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
return
readBytes
(
aData
,
nMaxBytesToRead
);
}
void
SAL_CALL
OSLInputStreamWrapper
::
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OSLInputStreamWrapper
::
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
if
(
!
m_pFile
)
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
sal_uInt64
nCurrentPos
;
m_pFile
->
getPos
(
nCurrentPos
);
...
...
@@ -88,45 +88,45 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( st
FileBase
::
RC
eError
=
m_pFile
->
setPos
(
osl_Pos_Absolut
,
nNewPos
);
if
(
eError
!=
FileBase
::
E_None
)
{
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
}
}
sal_Int32
SAL_CALL
OSLInputStreamWrapper
::
available
()
throw
(
star
io
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
sal_Int32
SAL_CALL
OSLInputStreamWrapper
::
available
()
throw
(
css
::
io
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
if
(
!
m_pFile
)
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
sal_uInt64
nPos
;
FileBase
::
RC
eError
=
m_pFile
->
getPos
(
nPos
);
if
(
eError
!=
FileBase
::
E_None
)
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
sal_uInt64
nDummy
=
0
;
eError
=
m_pFile
->
setPos
(
osl_Pos_End
,
nDummy
);
if
(
eError
!=
FileBase
::
E_None
)
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
sal_uInt64
nAvailable
;
eError
=
m_pFile
->
getPos
(
nAvailable
);
if
(
eError
!=
FileBase
::
E_None
)
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
nAvailable
=
nAvailable
-
nPos
;
eError
=
m_pFile
->
setPos
(
osl_Pos_Absolut
,
nPos
);
if
(
eError
!=
FileBase
::
E_None
)
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
return
sal
::
static_int_cast
<
sal_Int32
>
(
std
::
max
(
nAvailable
,
sal
::
static_int_cast
<
sal_uInt64
>
(
SAL_MAX_INT32
)));
}
void
SAL_CALL
OSLInputStreamWrapper
::
closeInput
()
throw
(
star
io
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OSLInputStreamWrapper
::
closeInput
()
throw
(
css
::
io
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
!
m_pFile
)
throw
star
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
NotConnectedException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
m_pFile
->
close
();
...
...
@@ -134,7 +134,7 @@ void SAL_CALL OSLInputStreamWrapper::closeInput() throw( stario::NotConnectedExc
}
/*************************************************************************/
//
star
io::XOutputStream
//
css::
io::XOutputStream
OSLOutputStreamWrapper
::
OSLOutputStreamWrapper
(
osl
::
File
&
_rFile
)
:
...
...
@@ -143,24 +143,24 @@ OSLOutputStreamWrapper::OSLOutputStreamWrapper(osl::File & _rFile):
OSLOutputStreamWrapper
::~
OSLOutputStreamWrapper
()
{}
void
SAL_CALL
OSLOutputStreamWrapper
::
writeBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OSLOutputStreamWrapper
::
writeBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
sal_uInt64
nWritten
;
FileBase
::
RC
eError
=
rFile
.
write
(
aData
.
getConstArray
(),
aData
.
getLength
(),
nWritten
);
if
(
eError
!=
FileBase
::
E_None
||
nWritten
!=
sal
::
static_int_cast
<
sal_uInt32
>
(
aData
.
getLength
()))
{
throw
star
io
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
throw
css
::
io
::
BufferSizeExceededException
(
OUString
(),
static_cast
<
css
::
uno
::
XWeak
*>
(
this
));
}
}
void
SAL_CALL
OSLOutputStreamWrapper
::
flush
()
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OSLOutputStreamWrapper
::
flush
()
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
}
void
SAL_CALL
OSLOutputStreamWrapper
::
closeOutput
()
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OSLOutputStreamWrapper
::
closeOutput
()
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
rFile
.
close
();
}
...
...
comphelper/source/streaming/streamsection.cxx
Dosyayı görüntüle @
cb347ddc
...
...
@@ -24,7 +24,7 @@ namespace comphelper
{
OStreamSection
::
OStreamSection
(
const
css
::
uno
::
Reference
<
star
io
::
XDataInputStream
>&
_rxInput
)
OStreamSection
::
OStreamSection
(
const
css
::
uno
::
Reference
<
css
::
io
::
XDataInputStream
>&
_rxInput
)
:
m_xMarkStream
(
_rxInput
,
::
com
::
sun
::
star
::
uno
::
UNO_QUERY
)
,
m_xInStream
(
_rxInput
)
,
m_nBlockStart
(
-
1
)
...
...
@@ -39,7 +39,7 @@ OStreamSection::OStreamSection(const css::uno::Reference< stario::XDataInputStre
}
OStreamSection
::
OStreamSection
(
const
css
::
uno
::
Reference
<
star
io
::
XDataOutputStream
>&
_rxOutput
,
sal_Int32
_nPresumedLength
)
OStreamSection
::
OStreamSection
(
const
css
::
uno
::
Reference
<
css
::
io
::
XDataOutputStream
>&
_rxOutput
,
sal_Int32
_nPresumedLength
)
:
m_xMarkStream
(
_rxOutput
,
::
com
::
sun
::
star
::
uno
::
UNO_QUERY
)
,
m_xOutStream
(
_rxOutput
)
,
m_nBlockStart
(
-
1
)
...
...
include/comphelper/basicio.hxx
Dosyayı görüntüle @
cb347ddc
...
...
@@ -28,43 +28,40 @@
namespace
comphelper
{
namespace
stario
=
::
com
::
sun
::
star
::
io
;
// bool
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
bool
&
_rVal
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
bool
_bVal
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
bool
&
_rVal
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
bool
_bVal
);
void
operator
<<
(
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>
const
&
,
sal_Bool
)
SAL_DELETED_FUNCTION
;
// OUString
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
OUString
&
_rStr
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
const
OUString
&
_rStr
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
OUString
&
_rStr
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
const
OUString
&
_rStr
);
// sal_Int16
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
sal_Int16
&
_rValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_Int16
_nValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
sal_Int16
&
_rValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_Int16
_nValue
);
// sal_uInt16
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
sal_uInt16
&
_rValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_uInt16
_nValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
sal_uInt16
&
_rValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_uInt16
_nValue
);
// sal_uInt32
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
sal_uInt32
&
_rValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_uInt32
_nValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
sal_uInt32
&
_rValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_uInt32
_nValue
);
// sal_Int16
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
sal_Int32
&
_rValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_Int32
_nValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
sal_Int32
&
_rValue
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
sal_Int32
_nValue
);
// FontDescriptor
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
InStream
,
css
::
awt
::
FontDescriptor
&
rVal
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
OutStream
,
const
css
::
awt
::
FontDescriptor
&
rVal
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
InStream
,
css
::
awt
::
FontDescriptor
&
rVal
);
COMPHELPER_DLLPUBLIC
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
OutStream
,
const
css
::
awt
::
FontDescriptor
&
rVal
);
// sequences
template
<
class
ELEMENT
>
const
css
::
uno
::
Reference
<
stario
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectInputStream
>&
_rxInStream
,
css
::
uno
::
Sequence
<
ELEMENT
>&
_rSeq
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
operator
>>
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectInputStream
>&
_rxInStream
,
css
::
uno
::
Sequence
<
ELEMENT
>&
_rSeq
)
{
sal_Int32
nLen
=
_rxInStream
->
readLong
();
_rSeq
.
realloc
(
nLen
);
...
...
@@ -78,7 +75,7 @@ const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::u
}
template
<
class
ELEMENT
>
const
css
::
uno
::
Reference
<
stario
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
star
io
::
XObjectOutputStream
>&
_rxOutStream
,
const
css
::
uno
::
Sequence
<
ELEMENT
>&
_rSeq
)
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
operator
<<
(
const
css
::
uno
::
Reference
<
css
::
io
::
XObjectOutputStream
>&
_rxOutStream
,
const
css
::
uno
::
Sequence
<
ELEMENT
>&
_rSeq
)
{
sal_Int32
nLen
=
_rSeq
.
getLength
();
_rxOutStream
->
writeLong
(
nLen
);
...
...
include/comphelper/oslfile2streamwrap.hxx
Dosyayı görüntüle @
cb347ddc
...
...
@@ -28,12 +28,11 @@
namespace
comphelper
{
namespace
stario
=
::
com
::
sun
::
star
::
io
;
// FmUnoIOStream,
// Stream to read and write data, based on File
class
COMPHELPER_DLLPUBLIC
OSLInputStreamWrapper
:
public
::
cppu
::
WeakImplHelper1
<
star
io
::
XInputStream
>
class
COMPHELPER_DLLPUBLIC
OSLInputStreamWrapper
:
public
::
cppu
::
WeakImplHelper1
<
css
::
io
::
XInputStream
>
{
::
osl
::
Mutex
m_aMutex
;
::
osl
::
File
*
m_pFile
;
...
...
@@ -42,19 +41,19 @@ public:
OSLInputStreamWrapper
(
::
osl
::
File
&
_rStream
);
virtual
~
OSLInputStreamWrapper
();
//
star
io::XInputStream
virtual
sal_Int32
SAL_CALL
readBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
stario
::
NotConnectedException
,
star
io
::
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
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
available
()
throw
(
star
io
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeInput
()
throw
(
star
io
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
//
css::
io::XInputStream
virtual
sal_Int32
SAL_CALL
readBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nBytesToRead
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
readSomeBytes
(
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
,
sal_Int32
nMaxBytesToRead
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
available
()
throw
(
css
::
io
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeInput
()
throw
(
css
::
io
::
NotConnectedException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
};
// FmUnoOutStream,
// data sink for the files
class
OSLOutputStreamWrapper
:
public
::
cppu
::
WeakImplHelper1
<
star
io
::
XOutputStream
>
class
OSLOutputStreamWrapper
:
public
::
cppu
::
WeakImplHelper1
<
css
::
io
::
XOutputStream
>
{
public
:
COMPHELPER_DLLPUBLIC
OSLOutputStreamWrapper
(
::
osl
::
File
&
_rFile
);
...
...
@@ -62,10 +61,10 @@ public:
private
:
virtual
~
OSLOutputStreamWrapper
();
//
star
io::XOutputStream
virtual
void
SAL_CALL
writeBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
flush
()
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeOutput
()
throw
(
stario
::
NotConnectedException
,
star
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
//
css::
io::XOutputStream
virtual
void
SAL_CALL
writeBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aData
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
flush
()
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeOutput
()
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
::
osl
::
File
&
rFile
;
};
...
...
include/comphelper/streamsection.hxx
Dosyayı görüntüle @
cb347ddc
...
...
@@ -28,8 +28,6 @@
namespace
comphelper
{
namespace
stario
=
::
com
::
sun
::
star
::
io
;
/** 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
use the same mechanism.
...
...
@@ -40,9 +38,9 @@ namespace comphelper
class
COMPHELPER_DLLPUBLIC
OStreamSection
{
css
::
uno
::
Reference
<
star
io
::
XMarkableStream
>
m_xMarkStream
;
css
::
uno
::
Reference
<
star
io
::
XDataInputStream
>
m_xInStream
;
css
::
uno
::
Reference
<
star
io
::
XDataOutputStream
>
m_xOutStream
;
css
::
uno
::
Reference
<
css
::
io
::
XMarkableStream
>
m_xMarkStream
;
css
::
uno
::
Reference
<
css
::
io
::
XDataInputStream
>
m_xInStream
;
css
::
uno
::
Reference
<
css
::
io
::
XDataOutputStream
>
m_xOutStream
;
sal_Int32
m_nBlockStart
;
sal_Int32
m_nBlockLen
;
...
...
@@ -52,7 +50,7 @@ public:
@param _rxInput the stream to read from. Must support the
com::sun::star::io::XMarkableStream interface
*/
OStreamSection
(
const
css
::
uno
::
Reference
<
star
io
::
XDataInputStream
>&
_rxInput
);
OStreamSection
(
const
css
::
uno
::
Reference
<
css
::
io
::
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 +60,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
css
::
uno
::
Reference
<
star
io
::
XDataOutputStream
>&
_rxOutput
,
sal_Int32
_nPresumedLength
=
0
);
OStreamSection
(
const
css
::
uno
::
Reference
<
css
::
io
::
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.
...
...
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