LibreOffice Module lotuswordpro (master) 1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
LwpDrawObj Class Referenceabstract

Lwp-base-draw object. More...

#include <lwpdrawobj.hxx>

Inheritance diagram for LwpDrawObj:
[legend]
Collaboration diagram for LwpDrawObj:
[legend]

Public Member Functions

 LwpDrawObj (SvStream *pStream, DrawingOffsetAndScale *pTransData=nullptr)
 @descr Constructor of class LwpDrawObj More...
 
virtual ~LwpDrawObj ()
 
rtl::Reference< XFFrameCreateXFDrawObject ()
 @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< XFFrameCreateDrawObj (const OUString &rStyleName)=0
 @descr create XF-draw object and assign the style name to it. More...
 
virtual rtl::Reference< XFFrameCreateStandardDrawObj (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
 
SvStreamm_pStream
 
SdwDrawObjHeader m_aObjHeader
 
SdwClosedObjStyleRec m_aClosedObjStyleRec
 
DrawingOffsetAndScalem_pTransData
 

Private Member Functions

void ReadObjHeaderRecord ()
 @descr read the header record data of lwp-sdw-object More...
 

Detailed Description

Lwp-base-draw object.

Definition at line 81 of file lwpdrawobj.hxx.

Constructor & Destructor Documentation

◆ LwpDrawObj()

LwpDrawObj::LwpDrawObj ( SvStream pStream,
DrawingOffsetAndScale pTransData = nullptr 
)

@descr Constructor of class LwpDrawObj

Parameters
pStreamThe memory stream which contains the lwp-sdw draw objects

Definition at line 92 of file lwpdrawobj.cxx.

References m_eType, m_pStream, and ReadObjHeaderRecord().

◆ ~LwpDrawObj()

virtual LwpDrawObj::~LwpDrawObj ( )
inlinevirtual

Definition at line 92 of file lwpdrawobj.hxx.

Member Function Documentation

◆ CreateDrawObj()

virtual rtl::Reference< XFFrame > LwpDrawObj::CreateDrawObj ( const OUString &  rStyleName)
protectedpure virtual

@descr create XF-draw object and assign the style name to it.

Parameters
stylename.
Returns
pointer of the created XF-draw object.

Implemented in LwpDrawGroup, LwpDrawMetafile, LwpDrawLine, LwpDrawPolyLine, LwpDrawPolygon, LwpDrawRectangle, LwpDrawEllipse, LwpDrawArc, LwpDrawTextBox, LwpDrawTextArt, and LwpDrawBitmap.

Referenced by CreateXFDrawObject().

◆ CreateStandardDrawObj()

virtual rtl::Reference< XFFrame > LwpDrawObj::CreateStandardDrawObj ( const OUString &  rStyleName)
protectedpure virtual

@descr create XF-draw object and assign the style name to it.

Parameters
stylename.
Returns
pointer of the created XF-draw object.

Implemented in LwpDrawGroup, LwpDrawMetafile, LwpDrawLine, LwpDrawPolyLine, LwpDrawPolygon, LwpDrawRectangle, LwpDrawEllipse, LwpDrawArc, LwpDrawTextBox, LwpDrawTextArt, and LwpDrawBitmap.

Referenced by CreateXFDrawObject().

◆ 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

Returns
pointer of the created completed XF-draw object.
pointer of the drawing object of 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.

◆ GetArrowName()

OUString LwpDrawObj::GetArrowName ( sal_uInt8  nArrowStyle)
staticprotected

@descr get arrow style name according to the flag.

Parameters
nArrowStylestyle of the arrowhead.
Returns
nWhichSide style name 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().

◆ Read()

virtual void LwpDrawObj::Read ( )
protectedpure virtual

◆ ReadClosedObjStyle()

void LwpDrawObj::ReadClosedObjStyle ( )
protected

◆ ReadObjHeaderRecord()

void LwpDrawObj::ReadObjHeaderRecord ( )
private

◆ RegisterStyle()

virtual OUString LwpDrawObj::RegisterStyle ( )
protectedpure virtual

@descr register styles of a draw object according to the saved records data.

Returns
the style name which has been registered.

Implemented in LwpDrawGroup, LwpDrawLine, LwpDrawPolyLine, LwpDrawPolygon, LwpDrawRectangle, LwpDrawEllipse, LwpDrawArc, LwpDrawTextBox, LwpDrawTextArt, LwpDrawMetafile, and LwpDrawBitmap.

Referenced by CreateXFDrawObject().

◆ SetArrowHead()

void LwpDrawObj::SetArrowHead ( XFDrawStyle pOpenedObjStyle,
sal_uInt8  nArrowFlag,
sal_uInt8  nLineWidth 
)
staticprotected

@descr set arrowhead of a xf-drawing object.

only opened drawing objects can be assigned arrowheads

Parameters
pOpenedObjStylethe xf-drawing object which will be set arrowhead.
nArrowFlagarrowhead 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().

◆ SetFillStyle()

void LwpDrawObj::SetFillStyle ( XFDrawStyle pStyle)
protected

◆ SetLineStyle()

void LwpDrawObj::SetLineStyle ( XFDrawStyle pStyle,
sal_uInt8  nWidth,
sal_uInt8  nLineStyle,
const SdwColor rColor 
)
staticprotected

@descr set line/border style of drawing objects.

Parameters
pStylepointer of the drawing xfstyle.
nWidthwidth of line/border.
nLineStyleflag of line/border style: none, dot or solid.
rColorcolor 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().

◆ SetObjectType()

void LwpDrawObj::SetObjectType ( DrawObjectType  eType)
inline
Parameters
typeof the object. @descr set the type to the draw object.

Definition at line 143 of file lwpdrawobj.hxx.

References eType, and m_eType.

◆ SetPosition()

void LwpDrawObj::SetPosition ( XFFrame pObj)
protected

Member Data Documentation

◆ m_aClosedObjStyleRec

SdwClosedObjStyleRec LwpDrawObj::m_aClosedObjStyleRec
protected

◆ m_aObjHeader

SdwDrawObjHeader LwpDrawObj::m_aObjHeader
protected

◆ m_eType

DrawObjectType LwpDrawObj::m_eType
protected

◆ m_pStream

SvStream* LwpDrawObj::m_pStream
protected

◆ m_pTransData

DrawingOffsetAndScale* LwpDrawObj::m_pTransData
protected

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