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
46297bb4
Kaydet (Commit)
46297bb4
authored
May 16, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
test: write to stream directly in MetafileXmlDump
Change-Id: If62a29af473f602f89e6e0e4a06772a320a23b9a
üst
ee43de69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
mtfxmldump.cxx
test/source/mtfxmldump.cxx
+7
-8
No files found.
test/source/mtfxmldump.cxx
Dosyayı görüntüle @
46297bb4
...
...
@@ -17,15 +17,17 @@
namespace
{
int
w
riteCallback
(
void
*
pContext
,
const
char
*
sBuffer
,
int
nLen
)
int
lclW
riteCallback
(
void
*
pContext
,
const
char
*
sBuffer
,
int
nLen
)
{
OStringBuffer
*
pBuffer
=
static_cast
<
OStringBuffer
*>
(
pContext
);
p
Buffer
->
append
(
sBuffer
);
SvStream
*
pStream
=
static_cast
<
SvStream
*>
(
pContext
);
p
Stream
->
Write
(
sBuffer
,
nLen
);
return
nLen
;
}
int
closeCallback
(
void
*
)
int
lclCloseCallback
(
void
*
pContext
)
{
SvStream
*
pStream
=
static_cast
<
SvStream
*>
(
pContext
);
pStream
->
WriteChar
(
0
);
return
0
;
}
...
...
@@ -162,8 +164,7 @@ void MetafileXmlDump::dump(GDIMetaFile& rMetaFile)
{
std
::
vector
<
bool
>
usedIds
(
512
,
false
);
OStringBuffer
aString
;
xmlOutputBufferPtr
xmlOutBuffer
=
xmlOutputBufferCreateIO
(
writeCallback
,
closeCallback
,
&
aString
,
NULL
);
xmlOutputBufferPtr
xmlOutBuffer
=
xmlOutputBufferCreateIO
(
lclWriteCallback
,
lclCloseCallback
,
&
mrStream
,
NULL
);
xmlTextWriterPtr
xmlWriter
=
xmlNewTextWriter
(
xmlOutBuffer
);
xmlTextWriterSetIndent
(
xmlWriter
,
1
);
...
...
@@ -395,8 +396,6 @@ void MetafileXmlDump::dump(GDIMetaFile& rMetaFile)
aWriter
.
endElement
();
aWriter
.
endDocument
();
mrStream
.
WriteOString
(
aString
.
makeStringAndClear
());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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