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
4bc78704
Kaydet (Commit)
4bc78704
authored
Eki 08, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sot: prefix members of StgTmpStrm
Change-Id: I08698db954f33d934f601bf25e510e6f4bea8d78
üst
6759a5a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
30 deletions
+30
-30
stgstrms.cxx
sot/source/sdstor/stgstrms.cxx
+28
-28
stgstrms.hxx
sot/source/sdstor/stgstrms.hxx
+2
-2
No files found.
sot/source/sdstor/stgstrms.cxx
Dosyayı görüntüle @
4bc78704
...
...
@@ -1116,7 +1116,7 @@ StgTmpStrm::StgTmpStrm( sal_uLong nInitSize )
?
16
:
(
nInitSize
?
nInitSize
:
16
),
4096
)
{
pStrm
=
NULL
;
m_
pStrm
=
NULL
;
// this calls FlushData, so all members should be set by this time
SetBufferSize
(
0
);
if
(
nInitSize
>
THRESHOLD
)
...
...
@@ -1155,22 +1155,22 @@ bool StgTmpStrm::Copy( StgTmpStrm& rSrc )
StgTmpStrm
::~
StgTmpStrm
()
{
if
(
pStrm
)
if
(
m_
pStrm
)
{
pStrm
->
Close
();
osl
::
File
::
remove
(
aName
);
delete
pStrm
;
m_
pStrm
->
Close
();
osl
::
File
::
remove
(
m_
aName
);
delete
m_
pStrm
;
}
}
sal_uLong
StgTmpStrm
::
GetSize
()
const
{
sal_uLong
n
;
if
(
pStrm
)
if
(
m_
pStrm
)
{
sal_uLong
old
=
pStrm
->
Tell
();
n
=
pStrm
->
Seek
(
STREAM_SEEK_TO_END
);
pStrm
->
Seek
(
old
);
sal_uLong
old
=
m_
pStrm
->
Tell
();
n
=
m_
pStrm
->
Seek
(
STREAM_SEEK_TO_END
);
m_
pStrm
->
Seek
(
old
);
}
else
n
=
nEndOfData
;
...
...
@@ -1179,14 +1179,14 @@ sal_uLong StgTmpStrm::GetSize() const
void
StgTmpStrm
::
SetSize
(
sal_uInt64
n
)
{
if
(
pStrm
)
pStrm
->
SetStreamSize
(
n
);
if
(
m_
pStrm
)
m_
pStrm
->
SetStreamSize
(
n
);
else
{
if
(
n
>
THRESHOLD
)
{
aName
=
utl
::
TempFile
(
0
,
false
).
GetURL
();
SvFileStream
*
s
=
new
SvFileStream
(
aName
,
STREAM_READWRITE
);
m_
aName
=
utl
::
TempFile
(
0
,
false
).
GetURL
();
SvFileStream
*
s
=
new
SvFileStream
(
m_
aName
,
STREAM_READWRITE
);
sal_uLong
nCur
=
Tell
();
sal_uLong
i
=
nEndOfData
;
std
::
unique_ptr
<
sal_uInt8
[]
>
p
(
new
sal_uInt8
[
4096
]);
...
...
@@ -1231,7 +1231,7 @@ void StgTmpStrm::SetSize(sal_uInt64 n)
delete
s
;
return
;
}
pStrm
=
s
;
m_
pStrm
=
s
;
// Shrink the memory to 16 bytes, which seems to be the minimum
ReAllocateMemory
(
-
(
(
long
)
nEndOfData
-
16
)
);
}
...
...
@@ -1249,10 +1249,10 @@ void StgTmpStrm::SetSize(sal_uInt64 n)
sal_uLong
StgTmpStrm
::
GetData
(
void
*
pData
,
sal_uLong
n
)
{
if
(
pStrm
)
if
(
m_
pStrm
)
{
n
=
pStrm
->
Read
(
pData
,
n
);
SetError
(
pStrm
->
GetError
()
);
n
=
m_
pStrm
->
Read
(
pData
,
n
);
SetError
(
m_
pStrm
->
GetError
()
);
return
n
;
}
else
...
...
@@ -1263,16 +1263,16 @@ sal_uLong StgTmpStrm::PutData( const void* pData, sal_uLong n )
{
sal_uInt32
nCur
=
Tell
();
sal_uInt32
nNew
=
nCur
+
n
;
if
(
nNew
>
THRESHOLD
&&
!
pStrm
)
if
(
nNew
>
THRESHOLD
&&
!
m_
pStrm
)
{
SetSize
(
nNew
);
if
(
GetError
()
!=
SVSTREAM_OK
)
return
0
;
}
if
(
pStrm
)
if
(
m_
pStrm
)
{
nNew
=
pStrm
->
Write
(
pData
,
n
);
SetError
(
pStrm
->
GetError
()
);
nNew
=
m_
pStrm
->
Write
(
pData
,
n
);
SetError
(
m_
pStrm
->
GetError
()
);
}
else
nNew
=
SvMemoryStream
::
PutData
(
pData
,
n
);
...
...
@@ -1285,7 +1285,7 @@ sal_uInt64 StgTmpStrm::SeekPos(sal_uInt64 n)
assert
(
n
!=
SAL_MAX_UINT32
);
if
(
n
==
STREAM_SEEK_TO_END
)
n
=
GetSize
();
if
(
n
&&
n
>
THRESHOLD
&&
!
pStrm
)
if
(
n
&&
n
>
THRESHOLD
&&
!
m_
pStrm
)
{
SetSize
(
n
);
if
(
GetError
()
!=
SVSTREAM_OK
)
...
...
@@ -1293,10 +1293,10 @@ sal_uInt64 StgTmpStrm::SeekPos(sal_uInt64 n)
else
return
n
;
}
else
if
(
pStrm
)
else
if
(
m_
pStrm
)
{
n
=
pStrm
->
Seek
(
n
);
SetError
(
pStrm
->
GetError
()
);
n
=
m_
pStrm
->
Seek
(
n
);
SetError
(
m_
pStrm
->
GetError
()
);
return
n
;
}
else
...
...
@@ -1305,10 +1305,10 @@ sal_uInt64 StgTmpStrm::SeekPos(sal_uInt64 n)
void
StgTmpStrm
::
FlushData
()
{
if
(
pStrm
)
if
(
m_
pStrm
)
{
pStrm
->
Flush
();
SetError
(
pStrm
->
GetError
()
);
m_
pStrm
->
Flush
();
SetError
(
m_
pStrm
->
GetError
()
);
}
else
SvMemoryStream
::
FlushData
();
...
...
sot/source/sdstor/stgstrms.hxx
Dosyayı görüntüle @
4bc78704
...
...
@@ -142,8 +142,8 @@ public:
class
StgTmpStrm
:
public
SvMemoryStream
{
OUString
aName
;
SvFileStream
*
pStrm
;
OUString
m_
aName
;
SvFileStream
*
m_
pStrm
;
using
SvMemoryStream
::
GetData
;
virtual
sal_uLong
GetData
(
void
*
pData
,
sal_uLong
nSize
)
SAL_OVERRIDE
;
virtual
sal_uLong
PutData
(
const
void
*
pData
,
sal_uLong
nSize
)
SAL_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