LibreOffice Module emfio (master) 1
|
#include <wmfreader.hxx>
Public Member Functions | |
WmfReader (SvStream &rStreamWMF, GDIMetaFile &rGDIMetaFile, const WmfExternal *pExternalHeader) | |
void | ReadWMF () |
void | SetEnableEMFPlus (bool bEnableEMFPlus) |
![]() | |
void | SetDevByWin () |
void | SetDevOrg (const Point &rPoint) |
void | SetDevOrgOffset (sal_Int32 nXAdd, sal_Int32 nYAdd) |
void | SetDevExt (const Size &rSize, bool regular=true) |
void | ScaleDevExt (double fX, double fY) |
void | SetWinOrg (const Point &rPoint, bool bIsEMF=false) |
Point | GetWinOrg () |
void | SetWinOrgOffset (sal_Int32 nX, sal_Int32 nY) |
void | SetWinExt (const Size &rSize, bool bIsEMF=false) |
void | ScaleWinExt (double fX, double fY) |
void | SetrclBounds (const tools::Rectangle &rRect) |
void | SetrclFrame (const tools::Rectangle &rRect) |
void | SetRefPix (const Size &rSize) |
void | SetRefMill (const Size &rSize) |
void | SetMapMode (MappingMode mnMapMode) |
void | SetWorldTransform (const XForm &rXForm) |
void | ModifyWorldTransform (const XForm &rXForm, ModifyWorldTransformMode nMode) |
void | Push () |
void | Pop (const sal_Int32 nSavedDC=-1) |
WMFRasterOp | SetRasterOp (WMFRasterOp nRasterOp) |
void | StrokeAndFillPath (bool bStroke, bool bFill) |
void | SetArcDirection (bool bCounterClockWise) |
bool | IsArcDirectionClockWise () |
void | SetGfxMode (GraphicsMode nGfxMode) |
GraphicsMode | GetGfxMode () const |
void | SetBkMode (BackgroundMode nMode) |
void | SetBkColor (const Color &rColor) |
void | SetTextColor (const Color &rColor) |
void | SetTextAlign (sal_uInt32 nAlign) |
void | CreateObject (std::unique_ptr< GDIObj > pObject) |
void | CreateObjectIndexed (sal_uInt32 nIndex, std::unique_ptr< GDIObj > pObject) |
void | CreateObject () |
void | DeleteObject (sal_uInt32 nIndex) |
void | SelectObject (sal_uInt32 nIndex) |
rtl_TextEncoding | GetCharSet () const |
const vcl::Font & | GetFont () const |
void | SetTextLayoutMode (vcl::text::ComplexTextLayoutFlags nLayoutMode) |
void | ClearPath () |
void | ClosePath () |
const tools::PolyPolygon & | GetPathObj () const |
void | MoveTo (const Point &rPoint, bool bRecordPath=false) |
void | LineTo (const Point &rPoint, bool bRecordPath=false) |
void | DrawPixel (const Point &rSource, const Color &rColor) |
void | DrawRect (const tools::Rectangle &rRect, bool bEdge=true) |
void | DrawRectWithBGColor (const tools::Rectangle &rRect) |
void | DrawRoundRect (const tools::Rectangle &rRect, const Size &rSize) |
void | DrawEllipse (const tools::Rectangle &rRect) |
void | DrawArc (const tools::Rectangle &rRect, const Point &rStartAngle, const Point &rEndAngle, bool bDrawTo=false) |
void | DrawPie (const tools::Rectangle &rRect, const Point &rStartAngle, const Point &rEndAngle) |
void | DrawChord (const tools::Rectangle &rRect, const Point &rStartAngle, const Point &rEndAngle) |
void | DrawPolygon (tools::Polygon rPolygon, bool bRecordPath) |
void | DrawPolyPolygon (tools::PolyPolygon &rPolyPolygon, bool bRecordPath=false) |
void | DrawPolyLine (tools::Polygon rPolygon, bool bDrawTo=false, bool bRecordPath=false) |
void | DrawPolyBezier (tools::Polygon rPolygon, bool bDrawTo, bool bRecordPath) |
void | DrawText (Point &rPosition, OUString const &rString, KernArray *pDXArry=nullptr, tools::Long *pDYArry=nullptr, bool bRecordPath=false, GraphicsMode nGraphicsMode=GraphicsMode::GM_COMPATIBLE) |
void | ResolveBitmapActions (std::vector< BSaveStruct > &rSaveList) |
void | IntersectClipRect (const tools::Rectangle &rRect) |
void | ExcludeClipRect (const tools::Rectangle &rRect) |
void | MoveClipRegion (const Size &rSize) |
void | SetClipPath (const tools::PolyPolygon &rPolyPoly, RegionMode nClippingMode, bool bIsMapped) |
void | SetDefaultClipPath () |
void | UpdateClipRegion () |
void | AddFromGDIMetaFile (GDIMetaFile &rGDIMetaFile) |
void | PassEMFPlus (void const *pBuffer, sal_uInt32 nLength) |
void | PassEMFPlusHeaderInfo () |
Color | ReadColor () |
MtfTools (GDIMetaFile &rGDIMetaFile, SvStream &rStreamWMF) | |
~MtfTools () COVERITY_NOEXCEPT_FALSE | |
Private Member Functions | |
bool | ReadHeader () |
void | ReadRecordParams (sal_uInt32 nRecordSize, sal_uInt16 nFunction) |
Point | ReadPoint () |
Point | ReadYX () |
tools::Rectangle | ReadRectangle () |
Size | ReadYXExt () |
void | GetPlaceableBound (tools::Rectangle &rSize, SvStream *pStrm) |
Private Attributes | |
sal_uInt16 | mnUnitsPerInch |
sal_uInt32 | mnRecSize |
bool | mbPlaceable |
std::optional< std::vector< sal_uInt8 > > | mpEMFStream |
sal_uInt32 | mnEMFRecCount |
sal_uInt32 | mnEMFRec |
sal_uInt32 | mnEMFSize |
sal_uInt32 | mnSkipActions |
const WmfExternal * | mpExternalHeader |
bool | mbEnableEMFPlus = true |
Definition at line 30 of file wmfreader.hxx.
emfio::WmfReader::WmfReader | ( | SvStream & | rStreamWMF, |
GDIMetaFile & | rGDIMetaFile, | ||
const WmfExternal * | pExternalHeader | ||
) |
Definition at line 2002 of file wmfreader.cxx.
|
private |
Definition at line 1592 of file wmfreader.cxx.
References emfio::aMaxWidth, tools::Rectangle::Bottom(), SvStream::eof(), SvStream::GetError(), tools::Rectangle::GetHeight(), tools::Rectangle::GetWidth(), SvStream::good(), Size::Height(), i, tools::Rectangle::Left(), mbPlaceable, emfio::MM_ANISOTROPIC, mnUnitsPerInch, emfio::MtfTools::mpInputStream, nLength, nPos, emfio::MtfTools::ReadColor(), SvStream::ReadInt16(), ReadPoint(), ReadRectangle(), SvStream::ReadUInt16(), SvStream::ReadUInt32(), ReadYX(), ReadYXExt(), RECT_MAX, RECT_MIN, SvStream::remainingSize(), tools::Rectangle::Right(), SAL_INFO, SAL_MAX_UINT16, SAL_WARN_IF, SvStream::Seek(), SvStream::SeekRel(), tools::Rectangle::SetBottom(), SvStream::SetError(), tools::Rectangle::SetLeft(), tools::Rectangle::SetRight(), tools::Rectangle::SetTop(), SVSTREAM_FILEFORMAT_ERROR, SVSTREAM_GENERALERROR, SvStream::Tell(), tools::Rectangle::Top(), W_META_ARC, W_META_CHORD, W_META_ELLIPSE, W_META_EXTTEXTOUT, W_META_INTERSECTCLIPRECT, W_META_LINETO, W_META_MOVETO, W_META_PIE, W_META_POLYGON, W_META_POLYLINE, W_META_POLYPOLYGON, W_META_RECTANGLE, W_META_ROUNDRECT, W_META_SETPIXEL, W_META_SETWINDOWEXT, W_META_SETWINDOWORG, W_META_STRETCHDIB, W_META_TEXTOUT, and Size::Width().
Referenced by ReadHeader().
|
private |
Definition at line 1343 of file wmfreader.cxx.
References emfio::aMaxWidth, tools::Rectangle::Bottom(), o3tl::convert(), tools::Rectangle::GetHeight(), GetPlaceableBound(), tools::Rectangle::GetWidth(), SvStream::good(), Size::Height(), tools::Rectangle::Left(), OutputDevice::LogicToLogic(), WmfExternal::mapMode, mbPlaceable, o3tl::mm100, emfio::MM_ISOTROPIC, mnUnitsPerInch, mpExternalHeader, emfio::MtfTools::mpInputStream, o3tl::px, SvStream::ReadInt16(), SvStream::ReadUInt16(), SvStream::ReadUInt32(), tools::Rectangle::Right(), SAL_INFO, SvStream::Seek(), SvStream::SeekRel(), tools::Rectangle::SetBottom(), emfio::MtfTools::SetDevExt(), SvStream::SetError(), tools::Rectangle::SetLeft(), emfio::MtfTools::SetMapMode(), tools::Rectangle::SetRight(), tools::Rectangle::SetTop(), emfio::MtfTools::SetWinExt(), emfio::MtfTools::SetWinOrg(), SVSTREAM_FILEFORMAT_ERROR, SvStream::Tell(), tools::Rectangle::Top(), tools::Rectangle::TopLeft(), Size::Width(), WmfExternal::xExt, and WmfExternal::yExt.
Referenced by ReadWMF().
|
inlineprivate |
Definition at line 251 of file wmfreader.cxx.
References emfio::MtfTools::mpInputStream, and SvStream::ReadInt16().
Referenced by GetPlaceableBound(), and ReadRecordParams().
|
private |
Definition at line 287 of file wmfreader.cxx.
References a, aBuf, emfio::LOGFONTW::alfFaceName, emfio::ScaledFontDetectCorrectHelper::applyAlternativeFontScale(), vcl::text::BiDiRtl, emfio::BS_NULL, emfio::BS_PATTERN, emfio::BS_SOLID, COL_WHITE(), vcl::bitmap::CreateFromData(), emfio::MtfTools::CreateObject(), Bitmap::Crop(), BitmapEx::Crop(), vcl::text::Default, emfio::DEFAULT_CHARSET, emfio::MtfTools::DeleteObject(), emfio::MtfTools::DrawArc(), emfio::MtfTools::DrawChord(), emfio::MtfTools::DrawEllipse(), emfio::MtfTools::DrawPie(), emfio::MtfTools::DrawPixel(), emfio::MtfTools::DrawPolygon(), emfio::MtfTools::DrawPolyLine(), emfio::MtfTools::DrawPolyPolygon(), emfio::MtfTools::DrawRect(), emfio::MtfTools::DrawRectWithBGColor(), emfio::MtfTools::DrawRoundRect(), emfio::MtfTools::DrawText(), KernArray::empty(), emfio::ETO_CLIPPED, emfio::ETO_GLYPH_INDEX, emfio::ETO_OPAQUE, emfio::ETO_PDY, emfio::ETO_RTLREADING, emfio::MtfTools::ExcludeClipRect(), KernArray::get(), emfio::MtfTools::GetCharSet(), Application::GetDefaultDevice(), emfio::MtfTools::GetFont(), Bitmap::GetSizePixel(), Point::getX(), Point::getY(), SvStream::good(), Size::Height(), i, tools::PolyPolygon::Insert(), emfio::MtfTools::IntersectClipRect(), Bitmap::IsEmpty(), emfio::LF_FACESIZE, emfio::LOGFONTW::lfCharSet, emfio::LOGFONTW::lfClipPrecision, emfio::LOGFONTW::lfEscapement, emfio::LOGFONTW::lfHeight, emfio::LOGFONTW::lfItalic, emfio::LOGFONTW::lfOrientation, emfio::LOGFONTW::lfOutPrecision, emfio::LOGFONTW::lfPitchAndFamily, emfio::LOGFONTW::lfQuality, emfio::LOGFONTW::lfStrikeOut, emfio::LOGFONTW::lfUnderline, emfio::LOGFONTW::lfWeight, emfio::LOGFONTW::lfWidth, emfio::MtfTools::LineTo(), emfio::MtfTools::maBmpSaveList, o3tl::make_unsigned(), emfio::MtfTools::maScaledFontHelper, mnEMFRec, mnEMFRecCount, mnEMFSize, emfio::MtfTools::mnEndPos, mnRecSize, mnSkipActions, emfio::MtfTools::MoveClipRegion(), emfio::MtfTools::MoveTo(), mpEMFStream, emfio::MtfTools::mpInputStream, nBitCount, nCount, nIndex, nLength, tools::Rectangle::Normalize(), nVersion, emfio::OEM_CHARSET, pChar, pData, emfio::MtfTools::Pop(), emfio::PRIVATE_ESCAPE_UNICODE, emfio::MtfTools::Push(), read_uInt16s_ToOUString(), SvStream::ReadBytes(), emfio::MtfTools::ReadColor(), ReadDIB(), SvStream::ReadInt16(), SvStream::ReadInt32(), ReadPoint(), ReadRectangle(), SvStream::ReadUChar(), SvStream::ReadUInt16(), SvStream::ReadUInt32(), ReadYX(), ReadYXExt(), SvStream::remainingSize(), KernArray::resize(), emfio::RGN_COPY, SAL_INFO, SAL_MAX_UINT16, SAL_WARN, SAL_WARN_IF, emfio::MtfTools::ScaleDevExt(), emfio::MtfTools::ScaleWinExt(), SvStream::Seek(), SvStream::SeekRel(), emfio::MtfTools::SelectObject(), KernArray::set(), emfio::MtfTools::SetBkColor(), emfio::MtfTools::SetBkMode(), emfio::MtfTools::SetClipPath(), emfio::MtfTools::SetDevOrgOffset(), SvStream::SetError(), emfio::MtfTools::SetMapMode(), emfio::MtfTools::SetRasterOp(), emfio::MtfTools::SetTextAlign(), emfio::MtfTools::SetTextColor(), emfio::MtfTools::SetTextLayoutMode(), emfio::MtfTools::SetWinExt(), emfio::MtfTools::SetWinOrg(), emfio::MtfTools::SetWinOrgOffset(), Point::setX(), Point::setY(), STREAM_SEEK_TO_BEGIN, SVSTREAM_FILEFORMAT_ERROR, SvStream::Tell(), vcl::text::TextOriginLeft, W_META_ARC, W_META_CHORD, W_META_CREATEBRUSHINDIRECT, W_META_CREATEFONTINDIRECT, W_META_CREATEPENINDIRECT, W_META_DELETEOBJECT, W_META_ELLIPSE, W_META_ESCAPE, W_META_EXTTEXTOUT, W_META_INTERSECTCLIPRECT, W_META_LINETO, W_META_MOVETO, W_META_PIE, W_META_POLYGON, W_META_POLYLINE, W_META_POLYPOLYGON, W_META_RECTANGLE, W_META_RESTOREDC, W_META_ROUNDRECT, W_META_SAVEDC, W_META_SELECTOBJECT, W_META_SETBKMODE, W_META_SETPIXEL, W_META_SETROP2, W_META_SETSTRETCHBLTMODE, W_META_SETTEXTALIGN, W_META_SETTEXTCOLOR, W_META_SETWINDOWEXT, W_META_SETWINDOWORG, W_META_STRETCHDIB, W_META_TEXTOUT, emfio::W_MFCOMMENT, Size::Width(), SvStream::WriteBytes(), x, and y.
Referenced by ReadWMF().
|
private |
Definition at line 265 of file wmfreader.cxx.
References Point::AdjustX(), Point::AdjustY(), tools::Rectangle::Normalize(), ReadYX(), SAL_WARN, Point::X(), and Point::Y().
Referenced by GetPlaceableBound(), and ReadRecordParams().
void emfio::WmfReader::ReadWMF | ( | ) |
Definition at line 1483 of file wmfreader.cxx.
References emfio::MtfTools::AddFromGDIMetaFile(), SvStream::eof(), SvStream::GetError(), GDIMetaFile::GetPrefSize(), SvStream::good(), emfio::MtfTools::maBmpSaveList, mbEnableEMFPlus, mnEMFRec, mnEMFRecCount, mnEMFSize, emfio::MtfTools::mnEndPos, mnRecSize, mnSkipActions, emfio::MtfTools::mnStartPos, mpEMFStream, emfio::MtfTools::mpInputStream, nPos, ReadHeader(), ReadRecordParams(), SvStream::ReadUInt16(), SvStream::ReadUInt32(), emfio::MtfTools::ResolveBitmapActions(), SvStream::Seek(), emfio::MtfTools::SetDevExt(), SvStream::SetError(), emfio::MtfTools::SetMapMode(), emfio::MtfTools::SetrclFrame(), emfio::MtfTools::SetWinExt(), emfio::MtfTools::SetWinOrg(), SVSTREAM_FILEFORMAT_ERROR, SVSTREAM_GENERALERROR, SvStream::Tell(), SvStream::TellEnd(), and W_META_STRETCHDIB.
|
inlineprivate |
Definition at line 258 of file wmfreader.cxx.
References emfio::MtfTools::mpInputStream, and SvStream::ReadInt16().
Referenced by GetPlaceableBound(), ReadRecordParams(), and ReadRectangle().
|
private |
Definition at line 280 of file wmfreader.cxx.
References emfio::MtfTools::mpInputStream, and SvStream::ReadInt16().
Referenced by GetPlaceableBound(), and ReadRecordParams().
|
inline |
Definition at line 75 of file wmfreader.hxx.
References mbEnableEMFPlus.
|
private |
Definition at line 54 of file wmfreader.hxx.
Referenced by ReadWMF(), and SetEnableEMFPlus().
|
private |
Definition at line 35 of file wmfreader.hxx.
Referenced by GetPlaceableBound(), and ReadHeader().
|
private |
Definition at line 44 of file wmfreader.hxx.
Referenced by ReadRecordParams(), and ReadWMF().
|
private |
Definition at line 41 of file wmfreader.hxx.
Referenced by ReadRecordParams(), and ReadWMF().
|
private |
Definition at line 47 of file wmfreader.hxx.
Referenced by ReadRecordParams(), and ReadWMF().
|
private |
Definition at line 34 of file wmfreader.hxx.
Referenced by ReadRecordParams(), and ReadWMF().
|
private |
Definition at line 49 of file wmfreader.hxx.
Referenced by ReadRecordParams(), and ReadWMF().
|
private |
Definition at line 33 of file wmfreader.hxx.
Referenced by GetPlaceableBound(), and ReadHeader().
|
private |
Definition at line 38 of file wmfreader.hxx.
Referenced by ReadRecordParams(), and ReadWMF().
|
private |
Definition at line 52 of file wmfreader.hxx.
Referenced by ReadHeader().