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
87ccec22
Kaydet (Commit)
87ccec22
authored
May 25, 2012
tarafından
Fridrich Štrba
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Trying to wrap the tools references inside a struct
Change-Id: Ie4d9a1d2c131f14928d7cc47f1b6314cf7e7f41d
üst
c77918bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
11 deletions
+25
-11
WPXSvStream.cxx
writerperfect/source/stream/WPXSvStream.cxx
+13
-9
WPXSvStream.h
writerperfect/source/stream/WPXSvStream.h
+12
-2
No files found.
writerperfect/source/stream/WPXSvStream.cxx
Dosyayı görüntüle @
87ccec22
...
@@ -163,17 +163,20 @@ WPXInputStream *WPXSvInputStream::getDocumentOLEStream(const char *name)
...
@@ -163,17 +163,20 @@ WPXInputStream *WPXSvInputStream::getDocumentOLEStream(const char *name)
return
0
;
return
0
;
}
}
mxChildrenStorages
.
push_back
(
new
SotStorage
(
pStream
,
sal_True
));
SotStorageRefWrapper
storageRefWrapper
;
storageRefWrapper
.
ref
=
new
SotStorage
(
pStream
,
sal_True
);
mxChildrenStorages
.
push_back
(
storageRefWrapper
);
unsigned
i
=
0
;
unsigned
i
=
0
;
while
(
i
<
aElems
.
size
())
while
(
i
<
aElems
.
size
())
{
{
if
(
mxChildrenStorages
.
back
()
->
IsStream
(
aElems
[
i
]))
if
(
mxChildrenStorages
.
back
()
.
ref
->
IsStream
(
aElems
[
i
]))
break
;
break
;
else
if
(
mxChildrenStorages
.
back
()
->
IsStorage
(
aElems
[
i
]))
else
if
(
mxChildrenStorages
.
back
()
.
ref
->
IsStorage
(
aElems
[
i
]))
{
{
SotStorageRef
&
tmpParent
(
mxChildrenStorages
.
back
());
SotStorageRef
tmpParent
(
mxChildrenStorages
.
back
().
ref
);
mxChildrenStorages
.
push_back
(
tmpParent
->
OpenSotStorage
(
aElems
[
i
++
],
STREAM_STD_READ
));
storageRefWrapper
.
ref
=
tmpParent
->
OpenSotStorage
(
aElems
[
i
++
],
STREAM_STD_READ
);
mxChildrenStorages
.
push_back
(
storageRefWrapper
);
}
}
else
else
// should not happen
// should not happen
...
@@ -186,18 +189,19 @@ WPXInputStream *WPXSvInputStream::getDocumentOLEStream(const char *name)
...
@@ -186,18 +189,19 @@ WPXInputStream *WPXSvInputStream::getDocumentOLEStream(const char *name)
if
(
i
>=
aElems
.
size
())
if
(
i
>=
aElems
.
size
())
return
0
;
return
0
;
mxChildrenStreams
.
push_back
(
mxChildrenStorages
.
back
()
->
OpenSotStream
(
SotStorageStreamRefWrapper
storageStreamRefWrapper
;
aElems
[
i
],
STREAM_STD_READ
));
storageStreamRefWrapper
.
ref
=
mxChildrenStorages
.
back
().
ref
->
OpenSotStream
(
aElems
[
i
],
STREAM_STD_READ
);
mxChildrenStreams
.
push_back
(
storageStreamRefWrapper
);
mxSeekable
->
seek
(
tmpPosition
);
mxSeekable
->
seek
(
tmpPosition
);
if
(
!
mxChildrenStreams
.
back
().
Is
()
||
mxChildrenStreams
.
back
()
->
GetError
()
)
if
(
!
mxChildrenStreams
.
back
().
ref
.
Is
()
||
mxChildrenStreams
.
back
().
ref
->
GetError
()
)
{
{
mxSeekable
->
seek
(
tmpPosition
);
mxSeekable
->
seek
(
tmpPosition
);
return
0
;
return
0
;
}
}
Reference
<
XInputStream
>
xContents
(
new
utl
::
OSeekableInputStreamWrapper
(
mxChildrenStreams
.
back
()
));
Reference
<
XInputStream
>
xContents
(
new
utl
::
OSeekableInputStreamWrapper
(
mxChildrenStreams
.
back
()
.
ref
));
mxSeekable
->
seek
(
tmpPosition
);
mxSeekable
->
seek
(
tmpPosition
);
if
(
xContents
.
is
())
if
(
xContents
.
is
())
return
new
WPXSvInputStream
(
xContents
);
return
new
WPXSvInputStream
(
xContents
);
...
...
writerperfect/source/stream/WPXSvStream.h
Dosyayı görüntüle @
87ccec22
...
@@ -18,6 +18,16 @@
...
@@ -18,6 +18,16 @@
#pragma warning( pop )
#pragma warning( pop )
#endif
#endif
typedef
struct
{
SotStorageRef
ref
;
}
SotStorageRefWrapper
;
typedef
struct
{
SotStorageStreamRef
ref
;
}
SotStorageStreamRefWrapper
;
class
WPXSvInputStream
:
public
WPXInputStream
class
WPXSvInputStream
:
public
WPXInputStream
{
{
public
:
public
:
...
@@ -34,8 +44,8 @@ public:
...
@@ -34,8 +44,8 @@ public:
virtual
bool
atEOS
();
virtual
bool
atEOS
();
private
:
private
:
std
::
vector
<
SotStorageRef
>
mxChildrenStorages
;
std
::
vector
<
SotStorageRef
Wrapper
>
mxChildrenStorages
;
std
::
vector
<
SotStorageStreamRef
>
mxChildrenStreams
;
std
::
vector
<
SotStorageStreamRef
Wrapper
>
mxChildrenStreams
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XInputStream
>
mxStream
;
::
com
::
sun
::
star
::
io
::
XInputStream
>
mxStream
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
Reference
<
...
...
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