LibreOffice Module vcl (master) 1
|
Class that is used for testing of the decomposition into shapes. More...
#include <mtfxmldump.hxx>
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 |
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.
MetafileXmlDump::MetafileXmlDump | ( | ) |
Definition at line 617 of file mtfxmldump.cxx.
References o3tl::enumarray< typename E, typename V >::fill(), and maFilter.
void MetafileXmlDump::dump | ( | const GDIMetaFile & | rMetaFile, |
SvStream & | rStream | ||
) |
The actual result that will be used for testing.
Definition at line 632 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 622 of file mtfxmldump.cxx.
References maFilter.
void MetafileXmlDump::filterAllActionTypes | ( | ) |
Definition at line 627 of file mtfxmldump.cxx.
References o3tl::enumarray< typename E, typename V >::fill(), and maFilter.
|
private |
Definition at line 644 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, KernArray::empty(), tools::XmlWriter::endElement(), EPS, FILLCOLOR, FLOATTRANSPARENT, FONT, o3tl::strong_int< typename UNDERLYING_TYPE, typename 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(), MetaTextArrayAction::GetDXArray(), MetaLineAction::GetEndPoint(), vcl::Font::GetFamilyName(), vcl::Font::GetFillColor(), MetaPushAction::GetFlags(), tools::Polygon::GetFlags(), MetaFontAction::GetFont(), vcl::Font::GetFontSize(), MetaGradientAction::GetGradient(), MetaGradientExAction::GetGradient(), MetaTextArrayAction::GetIndex(), MetaLayoutModeAction::GetLayoutMode(), MetaTextArrayAction::GetLen(), MetaLineAction::GetLineInfo(), MetaPolyLineAction::GetLineInfo(), MetaEPSAction::GetLink(), MetaMapModeAction::GetMapMode(), MapMode::GetMapUnit(), vcl::Font::GetOrientation(), MapMode::GetOrigin(), Bitmap::getPixelFormat(), MetaTextArrayAction::GetPoint(), MetaEPSAction::GetPoint(), MetaPolyLineAction::GetPolygon(), MetaPolygonAction::GetPolygon(), MetaPolyPolygonAction::GetPolyPolygon(), MetaGradientExAction::GetPolyPolygon(), MetaTransparentAction::GetPolyPolygon(), GDIMetaFile::GetPrefMapMode(), GfxLink::GetPrefMapMode(), GDIMetaFile::GetPrefSize(), GfxLink::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(), MetaTextArrayAction::GetText(), 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, Size::Width(), and writeXml().
Referenced by dump(), and writeXml().
|
private |
Definition at line 46 of file mtfxmldump.hxx.
Referenced by filterActionType(), filterAllActionTypes(), MetafileXmlDump(), and writeXml().