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
8a3a2e88
Kaydet (Commit)
8a3a2e88
authored
Agu 16, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
mtfxmldump: move XML writing into its own function
Change-Id: I82954177fe9d4934e69b33c1c985304add09e089
üst
20d8a347
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
104 deletions
+112
-104
mtfxmldump.hxx
include/test/mtfxmldump.hxx
+4
-0
mtfxmldump.cxx
test/source/mtfxmldump.cxx
+108
-104
No files found.
include/test/mtfxmldump.hxx
Dosyayı görüntüle @
8a3a2e88
...
@@ -17,10 +17,14 @@
...
@@ -17,10 +17,14 @@
#include <vcl/gdimtf.hxx>
#include <vcl/gdimtf.hxx>
#include <vector>
#include <vector>
class
XmlWriter
;
class
OOO_DLLPUBLIC_TEST
MetafileXmlDump
class
OOO_DLLPUBLIC_TEST
MetafileXmlDump
{
{
std
::
vector
<
bool
>
maFilter
;
std
::
vector
<
bool
>
maFilter
;
void
writeXml
(
GDIMetaFile
&
rMetaFile
,
XmlWriter
&
rWriter
);
public
:
public
:
MetafileXmlDump
();
MetafileXmlDump
();
virtual
~
MetafileXmlDump
();
virtual
~
MetafileXmlDump
();
...
...
test/source/mtfxmldump.cxx
Dosyayı görüntüle @
8a3a2e88
...
@@ -260,6 +260,20 @@ xmlDocPtr MetafileXmlDump::dumpAndParse(GDIMetaFile& rMetaFile, const OUString&
...
@@ -260,6 +260,20 @@ xmlDocPtr MetafileXmlDump::dumpAndParse(GDIMetaFile& rMetaFile, const OUString&
aWriter
.
startDocument
();
aWriter
.
startDocument
();
aWriter
.
startElement
(
"metafile"
);
aWriter
.
startElement
(
"metafile"
);
writeXml
(
rMetaFile
,
aWriter
);
aWriter
.
endElement
();
aWriter
.
endDocument
();
pStream
->
Seek
(
STREAM_SEEK_TO_BEGIN
);
xmlDocPtr
pDoc
=
XmlTestTools
::
parseXmlStream
(
pStream
.
get
());
return
pDoc
;
}
void
MetafileXmlDump
::
writeXml
(
GDIMetaFile
&
rMetaFile
,
XmlWriter
&
rWriter
)
{
for
(
MetaAction
*
pAction
=
rMetaFile
.
FirstAction
();
pAction
!=
NULL
;
pAction
=
rMetaFile
.
NextAction
())
for
(
MetaAction
*
pAction
=
rMetaFile
.
FirstAction
();
pAction
!=
NULL
;
pAction
=
rMetaFile
.
NextAction
())
{
{
const
sal_uInt16
nActionType
=
pAction
->
GetType
();
const
sal_uInt16
nActionType
=
pAction
->
GetType
();
...
@@ -273,281 +287,271 @@ xmlDocPtr MetafileXmlDump::dumpAndParse(GDIMetaFile& rMetaFile, const OUString&
...
@@ -273,281 +287,271 @@ xmlDocPtr MetafileXmlDump::dumpAndParse(GDIMetaFile& rMetaFile, const OUString&
case
META_LINE_ACTION
:
case
META_LINE_ACTION
:
{
{
MetaLineAction
*
pMetaLineAction
=
static_cast
<
MetaLineAction
*>
(
pAction
);
MetaLineAction
*
pMetaLineAction
=
static_cast
<
MetaLineAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
a
Writer
.
attribute
(
"startx"
,
pMetaLineAction
->
GetStartPoint
().
X
());
r
Writer
.
attribute
(
"startx"
,
pMetaLineAction
->
GetStartPoint
().
X
());
a
Writer
.
attribute
(
"starty"
,
pMetaLineAction
->
GetStartPoint
().
Y
());
r
Writer
.
attribute
(
"starty"
,
pMetaLineAction
->
GetStartPoint
().
Y
());
a
Writer
.
attribute
(
"endx"
,
pMetaLineAction
->
GetEndPoint
().
X
());
r
Writer
.
attribute
(
"endx"
,
pMetaLineAction
->
GetEndPoint
().
X
());
a
Writer
.
attribute
(
"endy"
,
pMetaLineAction
->
GetEndPoint
().
Y
());
r
Writer
.
attribute
(
"endy"
,
pMetaLineAction
->
GetEndPoint
().
Y
());
LineInfo
aLineInfo
=
pMetaLineAction
->
GetLineInfo
();
LineInfo
aLineInfo
=
pMetaLineAction
->
GetLineInfo
();
a
Writer
.
attribute
(
"style"
,
convertLineStyleToString
(
aLineInfo
.
GetStyle
()));
r
Writer
.
attribute
(
"style"
,
convertLineStyleToString
(
aLineInfo
.
GetStyle
()));
a
Writer
.
attribute
(
"width"
,
aLineInfo
.
GetWidth
());
r
Writer
.
attribute
(
"width"
,
aLineInfo
.
GetWidth
());
a
Writer
.
attribute
(
"dashlen"
,
aLineInfo
.
GetDashLen
());
r
Writer
.
attribute
(
"dashlen"
,
aLineInfo
.
GetDashLen
());
a
Writer
.
attribute
(
"dotlen"
,
aLineInfo
.
GetDotLen
());
r
Writer
.
attribute
(
"dotlen"
,
aLineInfo
.
GetDotLen
());
a
Writer
.
attribute
(
"distance"
,
aLineInfo
.
GetDistance
());
r
Writer
.
attribute
(
"distance"
,
aLineInfo
.
GetDistance
());
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_PUSH_ACTION
:
case
META_PUSH_ACTION
:
{
{
MetaPushAction
*
pMetaPushAction
=
static_cast
<
MetaPushAction
*>
(
pAction
);
MetaPushAction
*
pMetaPushAction
=
static_cast
<
MetaPushAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
a
Writer
.
attribute
(
"flags"
,
collectPushFlags
(
pMetaPushAction
->
GetFlags
()));
r
Writer
.
attribute
(
"flags"
,
collectPushFlags
(
pMetaPushAction
->
GetFlags
()));
}
}
break
;
break
;
case
META_POP_ACTION
:
case
META_POP_ACTION
:
{
{
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_RASTEROP_ACTION
:
case
META_RASTEROP_ACTION
:
{
{
MetaRasterOpAction
*
pMetaRasterOpAction
=
static_cast
<
MetaRasterOpAction
*>
(
pAction
);
MetaRasterOpAction
*
pMetaRasterOpAction
=
static_cast
<
MetaRasterOpAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
if
(
pMetaRasterOpAction
->
GetRasterOp
()
!=
ROP_OVERPAINT
)
if
(
pMetaRasterOpAction
->
GetRasterOp
()
!=
ROP_OVERPAINT
)
{
{
a
Writer
.
attribute
(
"operation"
,
convertRopToString
(
pMetaRasterOpAction
->
GetRasterOp
()));
r
Writer
.
attribute
(
"operation"
,
convertRopToString
(
pMetaRasterOpAction
->
GetRasterOp
()));
}
}
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_TEXTLINECOLOR_ACTION
:
case
META_TEXTLINECOLOR_ACTION
:
{
{
MetaTextLineColorAction
*
pMetaTextLineColorAction
=
static_cast
<
MetaTextLineColorAction
*>
(
pAction
);
MetaTextLineColorAction
*
pMetaTextLineColorAction
=
static_cast
<
MetaTextLineColorAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
a
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaTextLineColorAction
->
GetColor
()));
r
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaTextLineColorAction
->
GetColor
()));
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_TEXTFILLCOLOR_ACTION
:
case
META_TEXTFILLCOLOR_ACTION
:
{
{
MetaTextFillColorAction
*
pMetaTextFillColorAction
=
static_cast
<
MetaTextFillColorAction
*>
(
pAction
);
MetaTextFillColorAction
*
pMetaTextFillColorAction
=
static_cast
<
MetaTextFillColorAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
a
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaTextFillColorAction
->
GetColor
()));
r
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaTextFillColorAction
->
GetColor
()));
if
(
pMetaTextFillColorAction
->
IsSetting
())
if
(
pMetaTextFillColorAction
->
IsSetting
())
a
Writer
.
attribute
(
"setting"
,
OUString
(
"true"
));
r
Writer
.
attribute
(
"setting"
,
OUString
(
"true"
));
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_FONT_ACTION
:
case
META_FONT_ACTION
:
{
{
MetaFontAction
*
pMetaFontAction
=
static_cast
<
MetaFontAction
*>
(
pAction
);
MetaFontAction
*
pMetaFontAction
=
static_cast
<
MetaFontAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
Font
aFont
=
pMetaFontAction
->
GetFont
();
Font
aFont
=
pMetaFontAction
->
GetFont
();
a
Writer
.
attribute
(
"color"
,
convertColorToString
(
aFont
.
GetColor
()));
r
Writer
.
attribute
(
"color"
,
convertColorToString
(
aFont
.
GetColor
()));
a
Writer
.
attribute
(
"fillcolor"
,
convertColorToString
(
aFont
.
GetFillColor
()));
r
Writer
.
attribute
(
"fillcolor"
,
convertColorToString
(
aFont
.
GetFillColor
()));
a
Writer
.
attribute
(
"name"
,
aFont
.
GetName
());
r
Writer
.
attribute
(
"name"
,
aFont
.
GetName
());
a
Writer
.
attribute
(
"stylename"
,
aFont
.
GetStyleName
());
r
Writer
.
attribute
(
"stylename"
,
aFont
.
GetStyleName
());
a
Writer
.
attribute
(
"width"
,
aFont
.
GetSize
().
Width
());
r
Writer
.
attribute
(
"width"
,
aFont
.
GetSize
().
Width
());
a
Writer
.
attribute
(
"height"
,
aFont
.
GetSize
().
Height
());
r
Writer
.
attribute
(
"height"
,
aFont
.
GetSize
().
Height
());
a
Writer
.
attribute
(
"orientation"
,
aFont
.
GetOrientation
());
r
Writer
.
attribute
(
"orientation"
,
aFont
.
GetOrientation
());
a
Writer
.
attribute
(
"weight"
,
convertFontWeigthToString
(
aFont
.
GetWeight
()));
r
Writer
.
attribute
(
"weight"
,
convertFontWeigthToString
(
aFont
.
GetWeight
()));
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_TEXTALIGN_ACTION
:
case
META_TEXTALIGN_ACTION
:
{
{
MetaTextAlignAction
*
pMetaTextAlignAction
=
static_cast
<
MetaTextAlignAction
*>
(
pAction
);
MetaTextAlignAction
*
pMetaTextAlignAction
=
static_cast
<
MetaTextAlignAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
OUString
sAlign
=
convertTextAlignToString
(
pMetaTextAlignAction
->
GetTextAlign
());
OUString
sAlign
=
convertTextAlignToString
(
pMetaTextAlignAction
->
GetTextAlign
());
if
(
!
sAlign
.
isEmpty
())
if
(
!
sAlign
.
isEmpty
())
a
Writer
.
attribute
(
"align"
,
sAlign
);
r
Writer
.
attribute
(
"align"
,
sAlign
);
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_TEXTCOLOR_ACTION
:
case
META_TEXTCOLOR_ACTION
:
{
{
MetaTextColorAction
*
pMetaTextColorAction
=
static_cast
<
MetaTextColorAction
*>
(
pAction
);
MetaTextColorAction
*
pMetaTextColorAction
=
static_cast
<
MetaTextColorAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
a
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaTextColorAction
->
GetColor
()));
r
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaTextColorAction
->
GetColor
()));
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_TEXTARRAY_ACTION
:
case
META_TEXTARRAY_ACTION
:
{
{
MetaTextArrayAction
*
pMetaTextArrayAction
=
static_cast
<
MetaTextArrayAction
*>
(
pAction
);
MetaTextArrayAction
*
pMetaTextArrayAction
=
static_cast
<
MetaTextArrayAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
sal_Int32
aIndex
=
pMetaTextArrayAction
->
GetIndex
();
sal_Int32
aIndex
=
pMetaTextArrayAction
->
GetIndex
();
sal_Int32
aLength
=
pMetaTextArrayAction
->
GetLen
();
sal_Int32
aLength
=
pMetaTextArrayAction
->
GetLen
();
a
Writer
.
attribute
(
"x"
,
pMetaTextArrayAction
->
GetPoint
().
X
());
r
Writer
.
attribute
(
"x"
,
pMetaTextArrayAction
->
GetPoint
().
X
());
a
Writer
.
attribute
(
"y"
,
pMetaTextArrayAction
->
GetPoint
().
Y
());
r
Writer
.
attribute
(
"y"
,
pMetaTextArrayAction
->
GetPoint
().
Y
());
a
Writer
.
attribute
(
"index"
,
aIndex
);
r
Writer
.
attribute
(
"index"
,
aIndex
);
a
Writer
.
attribute
(
"length"
,
aLength
);
r
Writer
.
attribute
(
"length"
,
aLength
);
a
Writer
.
startElement
(
"dxarray"
);
r
Writer
.
startElement
(
"dxarray"
);
OUString
sDxLengthString
;
OUString
sDxLengthString
;
for
(
sal_Int32
i
=
0
;
i
<
aLength
;
++
i
)
for
(
sal_Int32
i
=
0
;
i
<
aLength
;
++
i
)
{
{
sDxLengthString
+=
OUString
::
number
(
pMetaTextArrayAction
->
GetDXArray
()[
aIndex
+
i
]);
sDxLengthString
+=
OUString
::
number
(
pMetaTextArrayAction
->
GetDXArray
()[
aIndex
+
i
]);
sDxLengthString
+=
" "
;
sDxLengthString
+=
" "
;
}
}
a
Writer
.
content
(
sDxLengthString
);
r
Writer
.
content
(
sDxLengthString
);
a
Writer
.
endElement
();
r
Writer
.
endElement
();
a
Writer
.
startElement
(
"text"
);
r
Writer
.
startElement
(
"text"
);
a
Writer
.
content
(
pMetaTextArrayAction
->
GetText
());
r
Writer
.
content
(
pMetaTextArrayAction
->
GetText
());
a
Writer
.
endElement
();
r
Writer
.
endElement
();
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_LINECOLOR_ACTION
:
case
META_LINECOLOR_ACTION
:
{
{
MetaLineColorAction
*
pMetaLineColorAction
=
static_cast
<
MetaLineColorAction
*>
(
pAction
);
MetaLineColorAction
*
pMetaLineColorAction
=
static_cast
<
MetaLineColorAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
a
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaLineColorAction
->
GetColor
()));
r
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaLineColorAction
->
GetColor
()));
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_FILLCOLOR_ACTION
:
case
META_FILLCOLOR_ACTION
:
{
{
MetaFillColorAction
*
pMetaFillColorAction
=
static_cast
<
MetaFillColorAction
*>
(
pAction
);
MetaFillColorAction
*
pMetaFillColorAction
=
static_cast
<
MetaFillColorAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
a
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaFillColorAction
->
GetColor
()));
r
Writer
.
attribute
(
"color"
,
convertColorToString
(
pMetaFillColorAction
->
GetColor
()));
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_CLIPREGION_ACTION
:
case
META_CLIPREGION_ACTION
:
{
{
const
MetaClipRegionAction
*
pA
=
static_cast
<
const
MetaClipRegionAction
*
>
(
pAction
);
const
MetaClipRegionAction
*
pA
=
static_cast
<
const
MetaClipRegionAction
*
>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
// FIXME for now we dump only the bounding box; this is
// FIXME for now we dump only the bounding box; this is
// enough for the tests we have, but may need extending to
// enough for the tests we have, but may need extending to
// dumping the real polypolygon in the future
// dumping the real polypolygon in the future
Rectangle
aRectangle
=
pA
->
GetRegion
().
GetBoundRect
();
Rectangle
aRectangle
=
pA
->
GetRegion
().
GetBoundRect
();
a
Writer
.
attribute
(
"top"
,
aRectangle
.
Top
());
r
Writer
.
attribute
(
"top"
,
aRectangle
.
Top
());
a
Writer
.
attribute
(
"left"
,
aRectangle
.
Left
());
r
Writer
.
attribute
(
"left"
,
aRectangle
.
Left
());
a
Writer
.
attribute
(
"bottom"
,
aRectangle
.
Bottom
());
r
Writer
.
attribute
(
"bottom"
,
aRectangle
.
Bottom
());
a
Writer
.
attribute
(
"right"
,
aRectangle
.
Right
());
r
Writer
.
attribute
(
"right"
,
aRectangle
.
Right
());
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_ISECTRECTCLIPREGION_ACTION
:
case
META_ISECTRECTCLIPREGION_ACTION
:
{
{
MetaISectRectClipRegionAction
*
pMetaISectRectClipRegionAction
=
static_cast
<
MetaISectRectClipRegionAction
*>
(
pAction
);
MetaISectRectClipRegionAction
*
pMetaISectRectClipRegionAction
=
static_cast
<
MetaISectRectClipRegionAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
Rectangle
aRectangle
=
pMetaISectRectClipRegionAction
->
GetRect
();
Rectangle
aRectangle
=
pMetaISectRectClipRegionAction
->
GetRect
();
a
Writer
.
attribute
(
"top"
,
aRectangle
.
Top
());
r
Writer
.
attribute
(
"top"
,
aRectangle
.
Top
());
a
Writer
.
attribute
(
"left"
,
aRectangle
.
Left
());
r
Writer
.
attribute
(
"left"
,
aRectangle
.
Left
());
a
Writer
.
attribute
(
"bottom"
,
aRectangle
.
Bottom
());
r
Writer
.
attribute
(
"bottom"
,
aRectangle
.
Bottom
());
a
Writer
.
attribute
(
"right"
,
aRectangle
.
Right
());
r
Writer
.
attribute
(
"right"
,
aRectangle
.
Right
());
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_POLYLINE_ACTION
:
case
META_POLYLINE_ACTION
:
{
{
MetaPolyLineAction
*
pMetaPolyLineAction
=
static_cast
<
MetaPolyLineAction
*>
(
pAction
);
MetaPolyLineAction
*
pMetaPolyLineAction
=
static_cast
<
MetaPolyLineAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
Polygon
aPolygon
=
pMetaPolyLineAction
->
GetPolygon
();
Polygon
aPolygon
=
pMetaPolyLineAction
->
GetPolygon
();
for
(
sal_uInt16
i
=
0
;
i
<
aPolygon
.
GetSize
();
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
aPolygon
.
GetSize
();
i
++
)
{
{
a
Writer
.
startElement
(
"point"
);
r
Writer
.
startElement
(
"point"
);
a
Writer
.
attribute
(
"x"
,
aPolygon
[
i
].
X
());
r
Writer
.
attribute
(
"x"
,
aPolygon
[
i
].
X
());
a
Writer
.
attribute
(
"y"
,
aPolygon
[
i
].
Y
());
r
Writer
.
attribute
(
"y"
,
aPolygon
[
i
].
Y
());
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
LineInfo
aLineInfo
=
pMetaPolyLineAction
->
GetLineInfo
();
LineInfo
aLineInfo
=
pMetaPolyLineAction
->
GetLineInfo
();
a
Writer
.
attribute
(
"style"
,
convertLineStyleToString
(
aLineInfo
.
GetStyle
()));
r
Writer
.
attribute
(
"style"
,
convertLineStyleToString
(
aLineInfo
.
GetStyle
()));
a
Writer
.
attribute
(
"width"
,
aLineInfo
.
GetWidth
());
r
Writer
.
attribute
(
"width"
,
aLineInfo
.
GetWidth
());
a
Writer
.
attribute
(
"dashlen"
,
aLineInfo
.
GetDashLen
());
r
Writer
.
attribute
(
"dashlen"
,
aLineInfo
.
GetDashLen
());
a
Writer
.
attribute
(
"dotlen"
,
aLineInfo
.
GetDotLen
());
r
Writer
.
attribute
(
"dotlen"
,
aLineInfo
.
GetDotLen
());
a
Writer
.
attribute
(
"distance"
,
aLineInfo
.
GetDistance
());
r
Writer
.
attribute
(
"distance"
,
aLineInfo
.
GetDistance
());
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_POLYGON_ACTION
:
case
META_POLYGON_ACTION
:
{
{
MetaPolygonAction
*
pMetaPolygonAction
=
static_cast
<
MetaPolygonAction
*>
(
pAction
);
MetaPolygonAction
*
pMetaPolygonAction
=
static_cast
<
MetaPolygonAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
Polygon
aPolygon
=
pMetaPolygonAction
->
GetPolygon
();
Polygon
aPolygon
=
pMetaPolygonAction
->
GetPolygon
();
for
(
sal_uInt16
i
=
0
;
i
<
aPolygon
.
GetSize
();
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
aPolygon
.
GetSize
();
i
++
)
{
{
a
Writer
.
startElement
(
"point"
);
r
Writer
.
startElement
(
"point"
);
a
Writer
.
attribute
(
"x"
,
aPolygon
[
i
].
X
());
r
Writer
.
attribute
(
"x"
,
aPolygon
[
i
].
X
());
a
Writer
.
attribute
(
"y"
,
aPolygon
[
i
].
Y
());
r
Writer
.
attribute
(
"y"
,
aPolygon
[
i
].
Y
());
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
case
META_COMMENT_ACTION
:
case
META_COMMENT_ACTION
:
{
{
MetaCommentAction
*
pMetaCommentAction
=
static_cast
<
MetaCommentAction
*>
(
pAction
);
MetaCommentAction
*
pMetaCommentAction
=
static_cast
<
MetaCommentAction
*>
(
pAction
);
a
Writer
.
startElement
(
sCurrentElementTag
);
r
Writer
.
startElement
(
sCurrentElementTag
);
if
(
pMetaCommentAction
->
GetDataSize
()
>
0
)
if
(
pMetaCommentAction
->
GetDataSize
()
>
0
)
{
{
a
Writer
.
attribute
(
"datasize"
,
pMetaCommentAction
->
GetDataSize
());
r
Writer
.
attribute
(
"datasize"
,
pMetaCommentAction
->
GetDataSize
());
}
}
if
(
!
pMetaCommentAction
->
GetComment
().
isEmpty
())
if
(
!
pMetaCommentAction
->
GetComment
().
isEmpty
())
{
{
a
Writer
.
startElement
(
"comment"
);
r
Writer
.
startElement
(
"comment"
);
a
Writer
.
content
(
pMetaCommentAction
->
GetComment
());
r
Writer
.
content
(
pMetaCommentAction
->
GetComment
());
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
a
Writer
.
endElement
();
r
Writer
.
endElement
();
}
}
break
;
break
;
default
:
default
:
{
{
a
Writer
.
element
(
sCurrentElementTag
);
r
Writer
.
element
(
sCurrentElementTag
);
}
}
break
;
break
;
}
}
}
}
aWriter
.
endElement
();
aWriter
.
endDocument
();
pStream
->
Seek
(
STREAM_SEEK_TO_BEGIN
);
xmlDocPtr
pDoc
=
XmlTestTools
::
parseXmlStream
(
pStream
.
get
());
return
pDoc
;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* 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