LibreOffice Module lotuswordpro (master) 1
|
Lwp-base-draw object. More...
#include <lwpdrawobj.hxx>
Public Member Functions | |
LwpDrawObj (SvStream *pStream, DrawingOffsetAndScale *pTransData=nullptr) | |
@descr Constructor of class LwpDrawObj More... | |
virtual | ~LwpDrawObj () |
rtl::Reference< XFFrame > | CreateXFDrawObject () |
@descr create a completed XF-draw object(read data, register styles and create XF-draw object) More... | |
void | SetObjectType (DrawObjectType eType) |
Protected Member Functions | |
void | ReadClosedObjStyle () |
@descr read the style of closed lwp-sdw-object like: rectangle, ellipse and so on. More... | |
void | SetFillStyle (XFDrawStyle *pStyle) |
@descr set fill style of drawing objects More... | |
void | SetPosition (XFFrame *pObj) |
@descr set position of a drawing object in the frame. More... | |
virtual void | Read ()=0 |
@descr read out the record of a draw object. More... | |
virtual OUString | RegisterStyle ()=0 |
@descr register styles of a draw object according to the saved records data. More... | |
virtual rtl::Reference< XFFrame > | CreateDrawObj (const OUString &rStyleName)=0 |
@descr create XF-draw object and assign the style name to it. More... | |
virtual rtl::Reference< XFFrame > | CreateStandardDrawObj (const OUString &rStyleName)=0 |
@descr create XF-draw object and assign the style name to it. More... | |
Static Protected Member Functions | |
static void | SetLineStyle (XFDrawStyle *pStyle, sal_uInt8 nWidth, sal_uInt8 nLineStyle, const SdwColor &rColor) |
@descr set line/border style of drawing objects. More... | |
static void | SetArrowHead (XFDrawStyle *pOpenedObjStyle, sal_uInt8 nArrowFlag, sal_uInt8 nLineWidth) |
@descr set arrowhead of a xf-drawing object. More... | |
static OUString | GetArrowName (sal_uInt8 nArrowStyle) |
@descr get arrow style name according to the flag. More... | |
Protected Attributes | |
DrawObjectType | m_eType |
SvStream * | m_pStream |
SdwDrawObjHeader | m_aObjHeader |
SdwClosedObjStyleRec | m_aClosedObjStyleRec |
DrawingOffsetAndScale * | m_pTransData |
Private Member Functions | |
void | ReadObjHeaderRecord () |
@descr read the header record data of lwp-sdw-object More... | |
Lwp-base-draw object.
Definition at line 81 of file lwpdrawobj.hxx.
LwpDrawObj::LwpDrawObj | ( | SvStream * | pStream, |
DrawingOffsetAndScale * | pTransData = nullptr |
||
) |
@descr Constructor of class LwpDrawObj
pStream | The memory stream which contains the lwp-sdw draw objects |
Definition at line 92 of file lwpdrawobj.cxx.
References m_eType, m_pStream, and ReadObjHeaderRecord().
|
inlinevirtual |
Definition at line 92 of file lwpdrawobj.hxx.
|
protectedpure virtual |
@descr create XF-draw object and assign the style name to it.
style | name. |
Implemented in LwpDrawGroup, LwpDrawMetafile, LwpDrawLine, LwpDrawPolyLine, LwpDrawPolygon, LwpDrawRectangle, LwpDrawEllipse, LwpDrawArc, LwpDrawTextBox, LwpDrawTextArt, and LwpDrawBitmap.
Referenced by CreateXFDrawObject().
|
protectedpure virtual |
@descr create XF-draw object and assign the style name to it.
style | name. |
Implemented in LwpDrawGroup, LwpDrawMetafile, LwpDrawLine, LwpDrawPolyLine, LwpDrawPolygon, LwpDrawRectangle, LwpDrawEllipse, LwpDrawArc, LwpDrawTextBox, LwpDrawTextArt, and LwpDrawBitmap.
Referenced by CreateXFDrawObject().
rtl::Reference< XFFrame > LwpDrawObj::CreateXFDrawObject | ( | ) |
@descr create a completed XF-draw object(read data, register styles and create XF-draw object)
@descr template method of creating drawing object from Lwp-Model to XF-Model
Definition at line 378 of file lwpdrawobj.cxx.
References CreateDrawObj(), CreateStandardDrawObj(), enumXFAnchorFrame, FABS, DrawingOffsetAndScale::fLeftMargin, DrawingOffsetAndScale::fOffsetX, DrawingOffsetAndScale::fOffsetY, DrawingOffsetAndScale::fScaleX, DrawingOffsetAndScale::fScaleY, DrawingOffsetAndScale::fTopMargin, m_pTransData, Read(), RegisterStyle(), and THRESHOLD.
|
staticprotected |
@descr get arrow style name according to the flag.
nArrowStyle | style of the arrowhead. |
Definition at line 334 of file lwpdrawobj.cxx.
References AH_ARROW_CIRCLE, AH_ARROW_FULLARROW, AH_ARROW_HALFARROW, AH_ARROW_INVFULLARROW, AH_ARROW_INVHALFARROW, AH_ARROW_INVLINEARROW, AH_ARROW_LINEARROW, AH_ARROW_SQUARE, and AH_ARROW_TEE.
Referenced by SetArrowHead().
|
protectedpure virtual |
@descr read out the record of a draw object.
Implemented in LwpDrawGroup, LwpDrawLine, LwpDrawPolyLine, LwpDrawPolygon, LwpDrawRectangle, LwpDrawEllipse, LwpDrawArc, LwpDrawTextBox, LwpDrawTextArt, LwpDrawMetafile, and LwpDrawBitmap.
Referenced by CreateXFDrawObject().
|
protected |
@descr read the style of closed lwp-sdw-object like: rectangle, ellipse and so on.
Definition at line 124 of file lwpdrawobj.cxx.
References SdwClosedObjStyleRec::aBackColor, SdwClosedObjStyleRec::aForeColor, SdwClosedObjStyleRec::aPenColor, m_aClosedObjStyleRec, m_eType, m_pStream, SdwColor::nB, SdwClosedObjStyleRec::nFillType, SdwColor::nG, SdwClosedObjStyleRec::nLineStyle, SdwClosedObjStyleRec::nLineWidth, SdwColor::nR, OT_POLYGON, OT_TEXTART, SdwClosedObjStyleRec::pFillPattern, SvStream::ReadBytes(), SvStream::ReadUChar(), SvStream::ReadUInt16(), SvStream::SeekRel(), and SdwColor::unused.
Referenced by LwpDrawPolygon::Read(), LwpDrawRectangle::Read(), LwpDrawEllipse::Read(), and LwpDrawTextArt::Read().
|
private |
@descr read the header record data of lwp-sdw-object
Definition at line 103 of file lwpdrawobj.cxx.
References m_aObjHeader, m_pStream, SdwDrawObjHeader::nBottom, SdwDrawObjHeader::nLeft, SdwDrawObjHeader::nRecLen, SdwDrawObjHeader::nRight, SdwDrawObjHeader::nTop, SvStream::ReadInt16(), SvStream::ReadUInt16(), and SvStream::SeekRel().
Referenced by LwpDrawObj().
|
protectedpure virtual |
@descr register styles of a draw object according to the saved records data.
Implemented in LwpDrawGroup, LwpDrawLine, LwpDrawPolyLine, LwpDrawPolygon, LwpDrawRectangle, LwpDrawEllipse, LwpDrawArc, LwpDrawTextBox, LwpDrawTextArt, LwpDrawMetafile, and LwpDrawBitmap.
Referenced by CreateXFDrawObject().
|
staticprotected |
@descr set arrowhead of a xf-drawing object.
only opened drawing objects can be assigned arrowheads
pOpenedObjStyle | the xf-drawing object which will be set arrowhead. |
nArrowFlag | arrowhead flags of the object. |
Definition at line 294 of file lwpdrawobj.cxx.
References CM_PER_INCH, GetArrowName(), nLineWidth, XFDrawStyle::SetArrowEnd(), XFDrawStyle::SetArrowStart(), and TWIPS_PER_CM.
Referenced by LwpDrawLine::RegisterStyle(), LwpDrawPolyLine::RegisterStyle(), and LwpDrawArc::RegisterStyle().
|
protected |
@descr set fill style of drawing objects
pStyle | pointer of the drawing xfstyle. |
Definition at line 162 of file lwpdrawobj.cxx.
References SdwClosedObjStyleRec::aBackColor, SdwClosedObjStyleRec::aForeColor, enumXFAreaLineCrossed, enumXFAreaLineSingle, FT_BDIAGHATCH, FT_CROSSHATCH, FT_DIAGCROSSHATCH, FT_FDIAGHATCH, FT_HORZHATCH, FT_SOLID, FT_TRANSPARENT, FT_VERTHATCH, m_aClosedObjStyleRec, SdwColor::nB, SdwClosedObjStyleRec::nFillType, SdwColor::nG, SdwColor::nR, XFDrawStyle::SetAreaColor(), and XFDrawStyle::SetAreaLineStyle().
Referenced by LwpDrawPolygon::RegisterStyle(), LwpDrawRectangle::RegisterStyle(), and LwpDrawEllipse::RegisterStyle().
|
staticprotected |
@descr set line/border style of drawing objects.
pStyle | pointer of the drawing xfstyle. |
nWidth | width of line/border. |
nLineStyle | flag of line/border style: none, dot or solid. |
rColor | color of line/border. |
Definition at line 234 of file lwpdrawobj.cxx.
References enumXFLineDash, LS_DOT, LS_NULL, SdwColor::nB, SdwColor::nG, SdwColor::nR, XFDrawStyle::SetLineDashStyle(), XFDrawStyle::SetLineStyle(), and TWIPS_PER_CM.
Referenced by LwpDrawLine::RegisterStyle(), LwpDrawPolyLine::RegisterStyle(), LwpDrawPolygon::RegisterStyle(), LwpDrawRectangle::RegisterStyle(), LwpDrawEllipse::RegisterStyle(), and LwpDrawArc::RegisterStyle().
|
inline |
type | of the object. @descr set the type to the draw object. |
Definition at line 143 of file lwpdrawobj.hxx.
|
protected |
@descr set position of a drawing object in the frame.
pObj | pointer of the xf-drawing object |
Definition at line 271 of file lwpdrawobj.cxx.
References DrawingOffsetAndScale::fOffsetX, DrawingOffsetAndScale::fOffsetY, DrawingOffsetAndScale::fScaleX, DrawingOffsetAndScale::fScaleY, m_aObjHeader, m_pTransData, SdwDrawObjHeader::nBottom, SdwDrawObjHeader::nLeft, SdwDrawObjHeader::nRight, SdwDrawObjHeader::nTop, XFFrame::SetPosition(), and TWIPS_PER_CM.
Referenced by LwpDrawLine::CreateDrawObj(), LwpDrawPolyLine::CreateDrawObj(), LwpDrawPolygon::CreateDrawObj(), LwpDrawRectangle::CreateDrawObj(), LwpDrawEllipse::CreateDrawObj(), LwpDrawArc::CreateDrawObj(), LwpDrawTextBox::CreateDrawObj(), LwpDrawTextArt::CreateDrawObj(), LwpDrawBitmap::CreateDrawObj(), and LwpDrawRectangle::CreateRoundedRect().
|
protected |
Definition at line 87 of file lwpdrawobj.hxx.
Referenced by LwpDrawTextArt::Read(), ReadClosedObjStyle(), LwpDrawPolygon::RegisterStyle(), LwpDrawRectangle::RegisterStyle(), LwpDrawEllipse::RegisterStyle(), and SetFillStyle().
|
protected |
Definition at line 86 of file lwpdrawobj.hxx.
Referenced by LwpDrawTextBox::CreateDrawObj(), LwpDrawTextBox::Read(), LwpDrawTextArt::Read(), LwpDrawMetafile::Read(), LwpDrawBitmap::Read(), ReadObjHeaderRecord(), and SetPosition().
|
protected |
Definition at line 84 of file lwpdrawobj.hxx.
Referenced by LwpDrawRectangle::CreateDrawObj(), LwpDrawRectangle::CreateStandardDrawObj(), LwpDrawRectangle::Read(), ReadClosedObjStyle(), and SetObjectType().
|
protected |
Definition at line 85 of file lwpdrawobj.hxx.
Referenced by LwpDrawLine::Read(), LwpDrawPolyLine::Read(), LwpDrawPolygon::Read(), LwpDrawRectangle::Read(), LwpDrawEllipse::Read(), LwpDrawArc::Read(), LwpDrawTextBox::Read(), LwpDrawTextArt::Read(), LwpDrawMetafile::Read(), LwpDrawBitmap::Read(), ReadClosedObjStyle(), and ReadObjHeaderRecord().
|
protected |
Definition at line 88 of file lwpdrawobj.hxx.
Referenced by LwpDrawLine::CreateDrawObj(), LwpDrawPolyLine::CreateDrawObj(), LwpDrawPolygon::CreateDrawObj(), LwpDrawRectangle::CreateDrawObj(), LwpDrawEllipse::CreateDrawObj(), LwpDrawArc::CreateDrawObj(), LwpDrawTextArt::CreateFWPath(), LwpDrawRectangle::CreateRoundedRect(), LwpDrawRectangle::CreateStandardDrawObj(), CreateXFDrawObject(), and SetPosition().