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
51bc0594
Kaydet (Commit)
51bc0594
authored
Eki 27, 2015
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_uLong to sal_uInt64/sal_Size
Change-Id: I4032b08225f1b530a43f1a8c09c5fc3515f45ced
üst
58993431
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
stgstrms.cxx
sot/source/sdstor/stgstrms.cxx
+10
-12
stgstrms.hxx
sot/source/sdstor/stgstrms.hxx
+1
-1
No files found.
sot/source/sdstor/stgstrms.cxx
Dosyayı görüntüle @
51bc0594
...
...
@@ -1111,7 +1111,7 @@ sal_Int32 StgSmallStrm::Write( const void* pBuf, sal_Int32 n )
#define THRESHOLD 32768L
StgTmpStrm
::
StgTmpStrm
(
sal_u
Long
nInitSize
)
StgTmpStrm
::
StgTmpStrm
(
sal_u
Int64
nInitSize
)
:
SvMemoryStream
(
nInitSize
>
THRESHOLD
?
16
:
(
nInitSize
?
nInitSize
:
16
),
4096
)
...
...
@@ -1125,8 +1125,8 @@ StgTmpStrm::StgTmpStrm( sal_uLong nInitSize )
bool
StgTmpStrm
::
Copy
(
StgTmpStrm
&
rSrc
)
{
sal_u
Long
n
=
rSrc
.
GetSize
();
sal_uLong
nCur
=
rSrc
.
Tell
();
sal_u
Int64
n
=
rSrc
.
GetSize
();
const
sal_uInt64
nCur
=
rSrc
.
Tell
();
SetSize
(
n
);
if
(
GetError
()
==
SVSTREAM_OK
)
{
...
...
@@ -1135,9 +1135,7 @@ bool StgTmpStrm::Copy( StgTmpStrm& rSrc )
Seek
(
0L
);
while
(
n
)
{
sal_uLong
nn
=
n
;
if
(
nn
>
4096
)
nn
=
4096
;
const
sal_uInt64
nn
=
std
::
min
<
sal_uInt64
>
(
n
,
4096
);
if
(
rSrc
.
Read
(
p
.
get
(),
nn
)
!=
nn
)
break
;
if
(
Write
(
p
.
get
(),
nn
)
!=
nn
)
...
...
@@ -1187,15 +1185,15 @@ void StgTmpStrm::SetSize(sal_uInt64 n)
{
m_aName
=
utl
::
TempFile
(
0
,
false
).
GetURL
();
SvFileStream
*
s
=
new
SvFileStream
(
m_aName
,
STREAM_READWRITE
);
sal_uLong
nCur
=
Tell
();
sal_u
Long
i
=
nEndOfData
;
const
sal_uInt64
nCur
=
Tell
();
sal_u
Int64
i
=
nEndOfData
;
std
::
unique_ptr
<
sal_uInt8
[]
>
p
(
new
sal_uInt8
[
4096
]);
if
(
i
)
{
Seek
(
0L
);
while
(
i
)
{
sal_uLong
nb
=
(
i
>
4096
)
?
4096
:
i
;
const
sal_uInt64
nb
=
std
::
min
<
sal_uInt64
>
(
i
,
4096
)
;
if
(
Read
(
p
.
get
(),
nb
)
==
nb
&&
s
->
Write
(
p
.
get
(),
nb
)
==
nb
)
i
-=
nb
;
...
...
@@ -1213,7 +1211,7 @@ void StgTmpStrm::SetSize(sal_uInt64 n)
i
=
n
-
nEndOfData
;
while
(
i
)
{
sal_uLong
const
nb
=
(
i
>
4096
)
?
4096
:
i
;
const
sal_uInt64
nb
=
std
::
min
<
sal_uInt64
>
(
i
,
4096
)
;
if
(
s
->
Write
(
p
.
get
(),
nb
)
==
nb
)
i
-=
nb
;
else
...
...
@@ -1247,7 +1245,7 @@ void StgTmpStrm::SetSize(sal_uInt64 n)
}
}
sal_
uLong
StgTmpStrm
::
GetData
(
void
*
pData
,
sal_uLong
n
)
sal_
Size
StgTmpStrm
::
GetData
(
void
*
pData
,
sal_Size
n
)
{
if
(
m_pStrm
)
{
...
...
@@ -1259,7 +1257,7 @@ sal_uLong StgTmpStrm::GetData( void* pData, sal_uLong n )
return
SvMemoryStream
::
GetData
(
pData
,
n
);
}
sal_
uLong
StgTmpStrm
::
PutData
(
const
void
*
pData
,
sal_uLong
n
)
sal_
Size
StgTmpStrm
::
PutData
(
const
void
*
pData
,
sal_Size
n
)
{
sal_uInt32
nCur
=
Tell
();
sal_uInt32
nNew
=
nCur
+
n
;
...
...
sot/source/sdstor/stgstrms.hxx
Dosyayı görüntüle @
51bc0594
...
...
@@ -151,7 +151,7 @@ class StgTmpStrm : public SvMemoryStream
virtual
void
FlushData
()
override
;
public
:
explicit
StgTmpStrm
(
sal_u
Long
=
16
);
explicit
StgTmpStrm
(
sal_u
Int64
=
16
);
virtual
~
StgTmpStrm
();
bool
Copy
(
StgTmpStrm
&
);
virtual
void
SetSize
(
sal_uInt64
)
override
;
...
...
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