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
79c1b055
Kaydet (Commit)
79c1b055
authored
Kas 24, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove not used SvLockBytesInputStream
Change-Id: Id4e0852f6d204b3a1d2a7f5ce281730f5fcad8fd
üst
09186fce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
237 deletions
+3
-237
strmadpt.hxx
include/svl/strmadpt.hxx
+0
-61
strmadpt.cxx
svl/source/misc/strmadpt.cxx
+3
-176
No files found.
include/svl/strmadpt.hxx
Dosyayı görüntüle @
79c1b055
...
@@ -21,10 +21,7 @@
...
@@ -21,10 +21,7 @@
#define INCLUDED_SVL_STRMADPT_HXX
#define INCLUDED_SVL_STRMADPT_HXX
#include <svl/svldllapi.h>
#include <svl/svldllapi.h>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <cppuhelper/weak.hxx>
#include <tools/stream.hxx>
#include <tools/stream.hxx>
...
@@ -64,64 +61,6 @@ public:
...
@@ -64,64 +61,6 @@ public:
virtual
void
Terminate
()
SAL_OVERRIDE
;
virtual
void
Terminate
()
SAL_OVERRIDE
;
};
};
class
SVL_DLLPUBLIC
SvLockBytesInputStream
:
public
cppu
::
OWeakObject
,
public
com
::
sun
::
star
::
io
::
XInputStream
,
public
com
::
sun
::
star
::
io
::
XSeekable
{
SvLockBytesRef
m_xLockBytes
;
sal_Int64
m_nPosition
;
public
:
SvLockBytesInputStream
(
SvLockBytes
*
pTheLockBytes
)
:
m_xLockBytes
(
pTheLockBytes
),
m_nPosition
(
0
)
{}
virtual
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
queryInterface
(
const
com
::
sun
::
star
::
uno
::
Type
&
rType
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
acquire
()
throw
()
SAL_OVERRIDE
;
virtual
void
SAL_CALL
release
()
throw
()
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
readBytes
(
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
&
rData
,
sal_Int32
nBytesToRead
)
throw
(
com
::
sun
::
star
::
io
::
IOException
,
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
readSomeBytes
(
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
&
rData
,
sal_Int32
nMaxBytesToRead
)
throw
(
com
::
sun
::
star
::
io
::
IOException
,
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
com
::
sun
::
star
::
io
::
IOException
,
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
sal_Int32
SAL_CALL
available
()
throw
(
com
::
sun
::
star
::
io
::
IOException
,
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
closeInput
()
throw
(
com
::
sun
::
star
::
io
::
IOException
,
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
seek
(
sal_Int64
nLocation
)
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
;
virtual
sal_Int64
SAL_CALL
getLength
()
throw
(
com
::
sun
::
star
::
io
::
IOException
,
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
};
#endif // INCLUDED_SVL_STRMADPT_HXX
#endif // INCLUDED_SVL_STRMADPT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svl/source/misc/strmadpt.cxx
Dosyayı görüntüle @
79c1b055
...
@@ -25,6 +25,9 @@
...
@@ -25,6 +25,9 @@
#include <set>
#include <set>
#include <string.h>
#include <string.h>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <osl/diagnose.h>
#include <osl/diagnose.h>
#include <rtl/alloc.h>
#include <rtl/alloc.h>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/queryinterface.hxx>
...
@@ -235,182 +238,6 @@ void SvOutputStreamOpenLockBytes::Terminate()
...
@@ -235,182 +238,6 @@ void SvOutputStreamOpenLockBytes::Terminate()
}
}
// SvLockBytesInputStream
// virtual
uno
::
Any
SAL_CALL
SvLockBytesInputStream
::
queryInterface
(
uno
::
Type
const
&
rType
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
uno
::
Any
aReturn
(
cppu
::
queryInterface
(
rType
,
static_cast
<
io
::
XInputStream
*
>
(
this
),
static_cast
<
io
::
XSeekable
*
>
(
this
)));
return
aReturn
.
hasValue
()
?
aReturn
:
OWeakObject
::
queryInterface
(
rType
);
}
// virtual
void
SAL_CALL
SvLockBytesInputStream
::
acquire
()
throw
()
{
OWeakObject
::
acquire
();
}
// virtual
void
SAL_CALL
SvLockBytesInputStream
::
release
()
throw
()
{
OWeakObject
::
release
();
}
// virtual
sal_Int32
SAL_CALL
SvLockBytesInputStream
::
readBytes
(
uno
::
Sequence
<
sal_Int8
>
&
rData
,
sal_Int32
nBytesToRead
)
throw
(
io
::
IOException
,
uno
::
RuntimeException
,
std
::
exception
)
{
OSL_ASSERT
(
m_nPosition
>=
0
);
if
(
!
m_xLockBytes
.
Is
())
throw
io
::
NotConnectedException
();
if
(
nBytesToRead
<
0
||
(
static_cast
<
sal_uInt64
>
(
m_nPosition
)
>
SAL_MAX_SIZE
&&
nBytesToRead
>
0
)
)
{
throw
io
::
IOException
();
}
rData
.
realloc
(
nBytesToRead
);
sal_Int32
nSize
=
0
;
while
(
nSize
<
nBytesToRead
)
{
sal_Size
nCount
;
ErrCode
nError
=
m_xLockBytes
->
ReadAt
(
m_nPosition
,
rData
.
getArray
()
+
nSize
,
nBytesToRead
-
nSize
,
&
nCount
);
if
(
nError
!=
ERRCODE_NONE
&&
nError
!=
ERRCODE_IO_PENDING
)
throw
io
::
IOException
();
m_nPosition
+=
nCount
;
nSize
+=
nCount
;
if
(
nError
==
ERRCODE_NONE
&&
nCount
==
0
)
break
;
}
rData
.
realloc
(
nSize
);
return
nSize
;
}
// virtual
sal_Int32
SAL_CALL
SvLockBytesInputStream
::
readSomeBytes
(
uno
::
Sequence
<
sal_Int8
>
&
rData
,
sal_Int32
nMaxBytesToRead
)
throw
(
io
::
IOException
,
uno
::
RuntimeException
,
std
::
exception
)
{
OSL_ASSERT
(
m_nPosition
>=
0
);
if
(
!
m_xLockBytes
.
Is
())
throw
io
::
NotConnectedException
();
if
(
static_cast
<
sal_uInt64
>
(
m_nPosition
)
>
SAL_MAX_SIZE
&&
nMaxBytesToRead
>
0
)
throw
io
::
IOException
();
rData
.
realloc
(
nMaxBytesToRead
);
sal_Size
nCount
=
0
;
if
(
nMaxBytesToRead
>
0
)
{
ErrCode
nError
;
do
{
nError
=
m_xLockBytes
->
ReadAt
(
m_nPosition
,
rData
.
getArray
(),
nMaxBytesToRead
,
&
nCount
);
if
(
nError
!=
ERRCODE_NONE
&&
nError
!=
ERRCODE_IO_PENDING
)
throw
io
::
IOException
();
m_nPosition
+=
nCount
;
}
while
(
nCount
==
0
&&
nError
==
ERRCODE_IO_PENDING
);
}
rData
.
realloc
(
sal_Int32
(
nCount
));
return
sal_Int32
(
nCount
);
}
// virtual
void
SAL_CALL
SvLockBytesInputStream
::
skipBytes
(
sal_Int32
nBytesToSkip
)
throw
(
io
::
IOException
,
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
!
m_xLockBytes
.
Is
())
throw
io
::
NotConnectedException
();
if
(
nBytesToSkip
<
0
)
throw
io
::
IOException
();
if
(
nBytesToSkip
>
SAL_MAX_INT64
-
m_nPosition
)
throw
io
::
BufferSizeExceededException
();
m_nPosition
+=
nBytesToSkip
;
}
// virtual
sal_Int32
SAL_CALL
SvLockBytesInputStream
::
available
()
throw
(
io
::
IOException
,
uno
::
RuntimeException
,
std
::
exception
)
{
OSL_ASSERT
(
m_nPosition
>=
0
);
if
(
!
m_xLockBytes
.
Is
())
throw
io
::
NotConnectedException
();
SvLockBytesStat
aStat
;
if
(
m_xLockBytes
->
Stat
(
&
aStat
,
SVSTATFLAG_DEFAULT
)
!=
ERRCODE_NONE
)
throw
io
::
IOException
();
return
aStat
.
nSize
<=
static_cast
<
sal_uInt64
>
(
m_nPosition
)
?
0
:
static_cast
<
sal_Size
>
(
aStat
.
nSize
-
m_nPosition
)
<=
static_cast
<
sal_uInt32
>
(
SAL_MAX_INT32
)
?
static_cast
<
sal_Int32
>
(
aStat
.
nSize
-
m_nPosition
)
:
SAL_MAX_INT32
;
}
// virtual
void
SAL_CALL
SvLockBytesInputStream
::
closeInput
()
throw
(
io
::
IOException
,
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
!
m_xLockBytes
.
Is
())
throw
io
::
NotConnectedException
();
m_xLockBytes
=
0
;
}
// virtual
void
SAL_CALL
SvLockBytesInputStream
::
seek
(
sal_Int64
nLocation
)
throw
(
lang
::
IllegalArgumentException
,
io
::
IOException
,
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
nLocation
<
0
)
throw
lang
::
IllegalArgumentException
();
if
(
!
m_xLockBytes
.
Is
())
throw
io
::
NotConnectedException
();
m_nPosition
=
nLocation
;
}
// virtual
sal_Int64
SAL_CALL
SvLockBytesInputStream
::
getPosition
()
throw
(
io
::
IOException
,
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
!
m_xLockBytes
.
Is
())
throw
io
::
NotConnectedException
();
return
m_nPosition
;
}
// virtual
sal_Int64
SAL_CALL
SvLockBytesInputStream
::
getLength
()
throw
(
io
::
IOException
,
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
!
m_xLockBytes
.
Is
())
throw
io
::
NotConnectedException
();
SvLockBytesStat
aStat
;
if
(
m_xLockBytes
->
Stat
(
&
aStat
,
SVSTATFLAG_DEFAULT
)
!=
ERRCODE_NONE
)
throw
io
::
IOException
();
#if SAL_TYPES_SIZEOFPOINTER > 4 // avoid warnings if sal_Size < sal_Int64
if
(
aStat
.
nSize
>
static_cast
<
sal_uInt64
>
(
SAL_MAX_INT64
))
throw
io
::
IOException
();
#endif
return
aStat
.
nSize
;
}
// SvInputStream
// SvInputStream
...
...
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