LibreOffice Module vcl (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MetafileXmlDump Class Referencefinal

Class that is used for testing of the decomposition into shapes. More...

#include <mtfxmldump.hxx>

Collaboration diagram for MetafileXmlDump:
[legend]

Public Member Functions

 MetafileXmlDump ()
 
void filterActionType (const MetaActionType nActionType, bool bShouldFilter)
 
void filterAllActionTypes ()
 
void dump (const GDIMetaFile &rMetaFile, SvStream &rStream)
 The actual result that will be used for testing. More...
 

Private Member Functions

void writeXml (const GDIMetaFile &rMetaFile, tools::XmlWriter &rWriter)
 

Private Attributes

o3tl::enumarray< MetaActionType, bool > maFilter
 

Detailed Description

Class that is used for testing of the decomposition into shapes.

Used like this:

std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile(); MetafileXmlDump dumper; xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile); CPPUNIT_ASSERT(pXmlDoc);

assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]", "x", "2093");

To see the dump to be able to create the assertXPath() call, use:

xMetaFile->dumpAsXml();

and check the output in /tmp/metafile.xml

Definition at line 44 of file mtfxmldump.hxx.

Constructor & Destructor Documentation

MetafileXmlDump::MetafileXmlDump ( )

Definition at line 568 of file mtfxmldump.cxx.

References o3tl::enumarray< class, class >::fill(), and maFilter.

Member Function Documentation

void MetafileXmlDump::dump ( const GDIMetaFile rMetaFile,
SvStream rStream 
)

The actual result that will be used for testing.

Definition at line 583 of file mtfxmldump.cxx.

References tools::XmlWriter::endDocument(), tools::XmlWriter::endElement(), tools::XmlWriter::startDocument(), tools::XmlWriter::startElement(), and writeXml().

Referenced by GDIMetaFile::dumpAsXml().

void MetafileXmlDump::filterActionType ( const MetaActionType  nActionType,
bool  bShouldFilter 
)

Definition at line 573 of file mtfxmldump.cxx.

References maFilter.

void MetafileXmlDump::filterAllActionTypes ( )

Definition at line 578 of file mtfxmldump.cxx.

References o3tl::enumarray< class, class >::fill(), and maFilter.

void MetafileXmlDump::writeXml ( const GDIMetaFile rMetaFile,
tools::XmlWriter rWriter 
)
private

Definition at line 595 of file mtfxmldump.cxx.

References aIndex, ARC, tools::XmlWriter::attribute(), BMP, BMPEX, BMPEXSCALE, BMPEXSCALEPART, BMPSCALE, BMPSCALEPART, CHORD, CLIPREGION, COMMENT, tools::XmlWriter::content(), tools::PolyPolygon::Count(), ELLIPSE, tools::XmlWriter::endElement(), EPS, FILLCOLOR, FLOATTRANSPARENT, FONT, o3tl::strong_int< UNDERLYING_TYPE, PHANTOM_TYPE >::get(), GDIMetaFile::GetAction(), GDIMetaFile::GetActionSize(), vcl::Region::GetAsPolyPolygon(), BitmapEx::GetBitmap(), vcl::Region::GetBoundRect(), BitmapEx::GetChecksum(), vcl::Font::GetColor(), MetaLineColorAction::GetColor(), MetaFillColorAction::GetColor(), MetaTextColorAction::GetColor(), MetaTextFillColorAction::GetColor(), MetaCommentAction::GetComment(), GfxLink::GetData(), MetaCommentAction::GetData(), GfxLink::GetDataSize(), MetaCommentAction::GetDataSize(), MetaLineAction::GetEndPoint(), vcl::Font::GetFamilyName(), vcl::Font::GetFillColor(), tools::Polygon::GetFlags(), MetaPushAction::GetFlags(), MetaFontAction::GetFont(), vcl::Font::GetFontSize(), MetaGradientAction::GetGradient(), MetaGradientExAction::GetGradient(), MetaLayoutModeAction::GetLayoutMode(), MetaLineAction::GetLineInfo(), MetaPolyLineAction::GetLineInfo(), MetaEPSAction::GetLink(), MetaMapModeAction::GetMapMode(), MapMode::GetMapUnit(), vcl::Font::GetOrientation(), MapMode::GetOrigin(), Bitmap::getPixelFormat(), MetaEPSAction::GetPoint(), MetaPolyLineAction::GetPolygon(), MetaPolygonAction::GetPolygon(), MetaPolyPolygonAction::GetPolyPolygon(), MetaGradientExAction::GetPolyPolygon(), MetaTransparentAction::GetPolyPolygon(), GfxLink::GetPrefMapMode(), GDIMetaFile::GetPrefMapMode(), GfxLink::GetPrefSize(), GDIMetaFile::GetPrefSize(), MetaRasterOpAction::GetRasterOp(), MetaRectAction::GetRect(), MetaGradientAction::GetRect(), MetaISectRectClipRegionAction::GetRect(), MetaISectRegionClipRegionAction::GetRegion(), MapMode::GetScaleX(), MapMode::GetScaleY(), tools::Polygon::GetSize(), MetaEPSAction::GetSize(), BitmapEx::GetSizePixel(), MetaLineAction::GetStartPoint(), vcl::Font::GetStyleName(), MetaEPSAction::GetSubstitute(), MetaTextAlignAction::GetTextAlign(), MetaTextLanguageAction::GetTextLanguage(), MetaTransparentAction::GetTransparence(), GfxLink::GetType(), MetaAction::GetType(), GfxLink::GetUserId(), MetaCommentAction::GetValue(), vcl::Font::GetWeight(), GRADIENT, GRADIENTEX, tools::Polygon::HasFlags(), vcl::Region::HasPolyPolygonOrB2DPolyPolygon(), HATCH, Size::Height(), i, ISECTRECTCLIPREGION, ISECTREGIONCLIPREGION, GfxLink::IsEMF(), GfxLink::IsNative(), GfxLink::IsPrefMapModeValid(), MetaTextFillColorAction::IsSetting(), vcl::Font::IsVertical(), LAYOUTMODE, LINE, LINECOLOR, maFilter, MAPMODE, MASK, MASKSCALE, MASKSCALEPART, MOVECLIPREGION, NONE, OVERLINECOLOR, OverPaint, PIE, PIXEL, POINT, POLYGON, POLYLINE, POLYPOLYGON, POP, PUSH, RASTEROP, RECT, REFPOINT, ROUNDRECT, tools::XmlWriter::startElement(), STRETCHTEXT, TEXT, TEXTALIGN, TEXTARRAY, TEXTCOLOR, TEXTFILLCOLOR, TEXTLANGUAGE, TEXTLINE, TEXTLINECOLOR, TEXTRECT, Transparent, u, WALLPAPER, and Size::Width().

Referenced by dump().

Member Data Documentation

o3tl::enumarray<MetaActionType, bool> MetafileXmlDump::maFilter
private

Definition at line 46 of file mtfxmldump.hxx.

Referenced by filterActionType(), filterAllActionTypes(), MetafileXmlDump(), and writeXml().


The documentation for this class was generated from the following files: