LibreOffice Module lotuswordpro (master) 1
Public Member Functions | Private Attributes | List of all members
XFParaStyle Class Reference

Style object for aragraph. More...

#include <xfparastyle.hxx>

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

Public Member Functions

 XFParaStyle ()
 
 XFParaStyle (const XFParaStyle &other)
 
XFParaStyleoperator= (const XFParaStyle &other)
 
virtual ~XFParaStyle () override
 
void SetMasterPage (const OUString &master)
 @descr Set layout for the paragraph. More...
 
const OUString & GetMasterPage () const
 
void SetFont (rtl::Reference< XFFont > const &font)
 @descr set the paragraph default font. More...
 
const rtl::Reference< XFFont > & GetFont () const
 @descr get the font object. More...
 
void SetIndent (double indent)
 @descr Set the indent of the paragraph. More...
 
void SetPadding (double left, double right, double top, double bottom)
 @descr Set the padding of the paragraph. More...
 
void SetMargins (double left, double right, double top=-1, double bottom=-1)
 @descr Set the Margins of the paragraph. More...
 
void SetAlignType (enumXFAlignType eAlign)
 @descr Set alignment property of the paragraph. More...
 
void SetShadow (enumXFShadowPos pos, double offset, XFColor const &color)
 @descr Set the shadow of the paragraph. More...
 
void SetBorders (XFBorders *pBorders)
 @descr The borders is complex, so you have to create one before use. More...
 
void SetDropCap (sal_Int16 nLength, sal_Int16 nLines, double fDistance=0)
 @descr Set drop caption of the paragraph. More...
 
void SetLineHeight (enumLHType type, double value)
 @descr Set line height of the paragraph. More...
 
void SetBackColor (XFColor const &color)
 @descr Set background color of the paragraph. More...
 
void SetBackImage (std::unique_ptr< XFBGImage > &rImage)
 @descr Set background image of the paragraph. More...
 
void SetBreaks (enumXFBreaks breaks)
 descr You can only set one break property for every para style object. More...
 
void AddTabStyle (enumXFTab type, double len, sal_Unicode leader, sal_Unicode delimiter)
 @descr Add a tab style. More...
 
void ClearTabStyles ()
 @descr for para style copy operator, sometimes you may need to override tab styles. More...
 
XFMarginsGetMargins ()
 
virtual enumXFStyle GetStyleFamily () override
 @descr get style family. More...
 
virtual bool Equal (IXFStyle *pStyle) override
 Affirm whether two XFParaStyle objects are equal. More...
 
virtual void ToXml (IXFStream *strm) override
 
void SetNumberRight (bool bFlag)
 
bool GetNumberRight () const
 
- Public Member Functions inherited from XFStyle
 XFStyle ()
 
virtual ~XFStyle () override
 
 XFStyle (XFStyle const &)=default
 
 XFStyle (XFStyle &&)=default
 
XFStyleoperator= (XFStyle const &)=default
 
XFStyleoperator= (XFStyle &&)=default
 
virtual OUString GetStyleName () override
 @descr get style name. More...
 
virtual void SetStyleName (const OUString &styleName) override
 @descr set style name. More...
 
virtual OUString GetParentStyleName () override
 @descr set parent style name. More...
 
virtual void SetParentStyleName (const OUString &styleName) override
 @descr return parent style name. More...
 
virtual enumXFStyle GetStyleFamily () override
 @descr get style family. More...
 
virtual bool Equal (IXFStyle *pStyle) override
 @descr decide whether two style are equal. More...
 
- Public Member Functions inherited from IXFStyle
 IXFStyle ()=default
 
 IXFStyle (IXFStyle const &)=default
 
 IXFStyle (IXFStyle &&)=default
 
IXFStyleoperator= (IXFStyle const &)=default
 
IXFStyleoperator= (IXFStyle &&)=default
 
virtual ~IXFStyle ()
 
virtual OUString GetStyleName ()=0
 @descr: return the style name. More...
 
virtual void SetStyleName (const OUString &styleName)=0
 @descr: set the name of the style. More...
 
virtual OUString GetParentStyleName ()=0
 @descr return the parent style name. More...
 
virtual void SetParentStyleName (const OUString &parent)=0
 @descr: Parent paragraph style. More...
 
virtual enumXFStyle GetStyleFamily ()=0
 @descr: return the style family. More...
 
virtual bool Equal (IXFStyle *pStyle)=0
 @descr: Compare whatever two style object are the same. More...
 
virtual void ToXml (IXFStream *stream)=0
 

Private Attributes

OUString m_strMasterPage
 
enumXFAlignType m_eAlignType
 
double m_fTextIndent
 
XFColor m_aBackColor
 
XFMargins m_aMargin
 
XFPadding m_aPadding
 
XFStyleContainer m_aTabs
 
rtl::Reference< XFFontm_pFont
 
XFShadow m_aShadow
 
std::unique_ptr< XFBordersm_pBorders
 
std::unique_ptr< XFBGImagem_pBGImage
 
XFDropcap m_aDropcap
 
XFLineHeight m_aLineHeight
 
XFBreaks m_aBreaks
 
sal_uInt32 m_nFlag
 
bool m_bNumberRight
 

Additional Inherited Members

- Protected Attributes inherited from XFStyle
OUString m_strStyleName
 
OUString m_strParentStyleName
 

Detailed Description

Style object for aragraph.

Definition at line 92 of file xfparastyle.hxx.

Constructor & Destructor Documentation

◆ XFParaStyle() [1/2]

XFParaStyle::XFParaStyle ( )

Definition at line 69 of file xfparastyle.cxx.

◆ XFParaStyle() [2/2]

XFParaStyle::XFParaStyle ( const XFParaStyle other)

◆ ~XFParaStyle()

XFParaStyle::~XFParaStyle ( )
overridevirtual

Definition at line 165 of file xfparastyle.cxx.

Member Function Documentation

◆ AddTabStyle()

void XFParaStyle::AddTabStyle ( enumXFTab  type,
double  len,
sal_Unicode  leader,
sal_Unicode  delimiter 
)

@descr Add a tab style.

Definition at line 258 of file xfparastyle.cxx.

References XFStyleContainer::AddStyle(), m_aTabs, and type.

Referenced by LwpParaStyle::ApplyTab().

◆ ClearTabStyles()

void XFParaStyle::ClearTabStyles ( )
inline

@descr for para style copy operator, sometimes you may need to override tab styles.

Definition at line 273 of file xfparastyle.hxx.

References m_aTabs, and XFStyleContainer::Reset().

Referenced by LwpParaStyle::ApplyTab().

◆ Equal()

bool XFParaStyle::Equal ( IXFStyle pStyle)
overridevirtual

◆ GetFont()

const rtl::Reference< XFFont > & XFParaStyle::GetFont ( ) const
inline

@descr get the font object.

Definition at line 122 of file xfparastyle.hxx.

References m_pFont.

Referenced by LwpFrib::GetFont(), XFStyleContainer::ManageStyleFont(), and LwpTocSuperLayout::RegisterStyle().

◆ GetMargins()

XFMargins & XFParaStyle::GetMargins ( )
inline

Definition at line 209 of file xfparastyle.hxx.

References m_aMargin.

Referenced by LwpParaStyle::ApplyTab().

◆ GetMasterPage()

const OUString & XFParaStyle::GetMasterPage ( ) const
inline

◆ GetNumberRight()

bool XFParaStyle::GetNumberRight ( ) const
inline

Definition at line 218 of file xfparastyle.hxx.

References m_bNumberRight.

Referenced by LwpTableLayout::PostProcessParagraph(), and LwpPara::RegisterStyle().

◆ GetStyleFamily()

enumXFStyle XFParaStyle::GetStyleFamily ( )
overridevirtual

@descr get style family.

Reimplemented from XFStyle.

Definition at line 169 of file xfparastyle.cxx.

References enumXFStylePara.

◆ operator=()

XFParaStyle & XFParaStyle::operator= ( const XFParaStyle other)

◆ SetAlignType()

void XFParaStyle::SetAlignType ( enumXFAlignType  eAlign)
inline

@descr Set alignment property of the paragraph.

Parameters
eAlignalignment type,left,right,center or justify.

Definition at line 268 of file xfparastyle.hxx.

References m_eAlignType.

Referenced by LwpParaStyle::ApplyAlignment(), LwpTableLayout::PostProcessParagraph(), and LwpPara::RegisterStyle().

◆ SetBackColor()

void XFParaStyle::SetBackColor ( XFColor const &  color)

@descr Set background color of the paragraph.

Parameters
colorvalue of the back color.

Definition at line 203 of file xfparastyle.cxx.

References m_aBackColor, m_nFlag, and XFPARA_FLAG_BACKCOLOR.

Referenced by LwpParaStyle::Apply().

◆ SetBackImage()

void XFParaStyle::SetBackImage ( std::unique_ptr< XFBGImage > &  rImage)

@descr Set background image of the paragraph.

Parameters
imagethe background image to set.

Definition at line 209 of file xfparastyle.cxx.

References m_pBGImage.

◆ SetBorders()

void XFParaStyle::SetBorders ( XFBorders pBorders)

@descr The borders is complex, so you have to create one before use.

Very few paragraphs will already have borders property, this way we can save much memory.

Parameters
pBordersborders of the paragraph, please reference the XFBorders.

Definition at line 214 of file xfparastyle.cxx.

References m_pBorders.

Referenced by LwpParaStyle::ApplyParaBorder().

◆ SetBreaks()

void XFParaStyle::SetBreaks ( enumXFBreaks  breaks)
inline

descr You can only set one break property for every para style object.

Definition at line 246 of file xfparastyle.hxx.

References m_aBreaks, and XFBreaks::SetBreakType().

Referenced by LwpParaStyle::ApplyBreaks(), and LwpPara::OverrideParaBreaks().

◆ SetDropCap()

void XFParaStyle::SetDropCap ( sal_Int16  nLength,
sal_Int16  nLines,
double  fDistance = 0 
)

@descr Set drop caption of the paragraph.

Parameters
nLengthnumber of chars to be dropped.
nLinesline of which the dropped chars will occupy.

Definition at line 219 of file xfparastyle.cxx.

References m_aDropcap, nLength, XFDropcap::SetCharCount(), XFDropcap::SetDistance(), and XFDropcap::SetLines().

◆ SetFont()

void XFParaStyle::SetFont ( rtl::Reference< XFFont > const &  font)

@descr set the paragraph default font.

Parameters
fontobject to be set. Font object is deleted by font-factory, so don't delete it in the destructure function of para style.

Definition at line 174 of file xfparastyle.cxx.

References m_pFont.

Referenced by XFStyleContainer::ManageStyleFont().

◆ SetIndent()

void XFParaStyle::SetIndent ( double  indent)

@descr Set the indent of the paragraph.

This is the indent for the first line.

Parameters
indentvalue of the first-line indent.

Definition at line 179 of file xfparastyle.cxx.

References m_fTextIndent.

Referenced by LwpParaStyle::ApplyIndent().

◆ SetLineHeight()

void XFParaStyle::SetLineHeight ( enumLHType  type,
double  value 
)

@descr Set line height of the paragraph.

Parameters
typetype of line height,fixed,space,percent or cm.
valuevalue of the line height

Definition at line 233 of file xfparastyle.cxx.

References enumLHHeight, enumLHLeast, enumLHNone, enumLHPercent, enumLHSpace, m_aLineHeight, XFLineHeight::SetHeight(), XFLineHeight::SetLeastHeight(), XFLineHeight::SetPercent(), XFLineHeight::SetSpace(), type, and value.

Referenced by LwpParaStyle::ApplySpacing().

◆ SetMargins()

void XFParaStyle::SetMargins ( double  left,
double  right,
double  top = -1,
double  bottom = -1 
)

@descr Set the Margins of the paragraph.

Parameters
-1don't change. other: set value.

Definition at line 184 of file xfparastyle.cxx.

References bottom, left, m_aMargin, right, XFMargins::SetBottom(), XFMargins::SetLeft(), XFMargins::SetRight(), XFMargins::SetTop(), and top.

Referenced by LwpParaStyle::ApplyIndent(), and LwpParaStyle::ApplySpacing().

◆ SetMasterPage()

void XFParaStyle::SetMasterPage ( const OUString &  master)
inline

@descr Set layout for the paragraph.

When such property was set, this paragraph will start at a new page.

Definition at line 241 of file xfparastyle.hxx.

References m_strMasterPage, and master.

◆ SetNumberRight()

void XFParaStyle::SetNumberRight ( bool  bFlag)
inline

Definition at line 217 of file xfparastyle.hxx.

References m_bNumberRight.

Referenced by LwpParaStyle::ApplyAlignment().

◆ SetPadding()

void XFParaStyle::SetPadding ( double  left,
double  right,
double  top,
double  bottom 
)
inline

@descr Set the padding of the paragraph.

This is the distance between the border and the top of the text.

Parameters
indentvalue of the padding.

Definition at line 251 of file xfparastyle.hxx.

References bottom, left, m_aPadding, right, XFPadding::SetBottom(), XFPadding::SetLeft(), XFPadding::SetRight(), XFPadding::SetTop(), and top.

Referenced by LwpParaStyle::ApplyParaBorder().

◆ SetShadow()

void XFParaStyle::SetShadow ( enumXFShadowPos  pos,
double  offset,
XFColor const &  color 
)

@descr Set the shadow of the paragraph.

There are 4 positions, you can find it in the definition of enumShadowPos.

Parameters
pos
offsetthe distance between the paragraph border and the shadow.
colorcolor to fill the shadow.

Definition at line 196 of file xfparastyle.cxx.

References m_aShadow, pos, XFShadow::SetColor(), XFShadow::SetOffset(), and XFShadow::SetPosition().

Referenced by LwpParaStyle::ApplyParaBorder().

◆ ToXml()

void XFParaStyle::ToXml ( IXFStream strm)
overridevirtual

Member Data Documentation

◆ m_aBackColor

XFColor XFParaStyle::m_aBackColor
private

Definition at line 225 of file xfparastyle.hxx.

Referenced by operator=(), SetBackColor(), and ToXml().

◆ m_aBreaks

XFBreaks XFParaStyle::m_aBreaks
private

Definition at line 235 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetBreaks(), and ToXml().

◆ m_aDropcap

XFDropcap XFParaStyle::m_aDropcap
private

Definition at line 233 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetDropCap(), and ToXml().

◆ m_aLineHeight

XFLineHeight XFParaStyle::m_aLineHeight
private

Definition at line 234 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetLineHeight(), and ToXml().

◆ m_aMargin

XFMargins XFParaStyle::m_aMargin
private

Definition at line 226 of file xfparastyle.hxx.

Referenced by Equal(), GetMargins(), operator=(), SetMargins(), and ToXml().

◆ m_aPadding

XFPadding XFParaStyle::m_aPadding
private

Definition at line 227 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetPadding(), and ToXml().

◆ m_aShadow

XFShadow XFParaStyle::m_aShadow
private

Definition at line 230 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetShadow(), and ToXml().

◆ m_aTabs

XFStyleContainer XFParaStyle::m_aTabs
private

Definition at line 228 of file xfparastyle.hxx.

Referenced by AddTabStyle(), ClearTabStyles(), Equal(), operator=(), ToXml(), and XFParaStyle().

◆ m_bNumberRight

bool XFParaStyle::m_bNumberRight
private

Definition at line 238 of file xfparastyle.hxx.

Referenced by Equal(), GetNumberRight(), operator=(), and SetNumberRight().

◆ m_eAlignType

enumXFAlignType XFParaStyle::m_eAlignType
private

Definition at line 222 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetAlignType(), and ToXml().

◆ m_fTextIndent

double XFParaStyle::m_fTextIndent
private

Definition at line 224 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetIndent(), and ToXml().

◆ m_nFlag

sal_uInt32 XFParaStyle::m_nFlag
private

Definition at line 237 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetBackColor(), and ToXml().

◆ m_pBGImage

std::unique_ptr<XFBGImage> XFParaStyle::m_pBGImage
private

Definition at line 232 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetBackImage(), ToXml(), and XFParaStyle().

◆ m_pBorders

std::unique_ptr<XFBorders> XFParaStyle::m_pBorders
private

Definition at line 231 of file xfparastyle.hxx.

Referenced by Equal(), operator=(), SetBorders(), ToXml(), and XFParaStyle().

◆ m_pFont

rtl::Reference<XFFont> XFParaStyle::m_pFont
private

Definition at line 229 of file xfparastyle.hxx.

Referenced by Equal(), GetFont(), operator=(), SetFont(), and ToXml().

◆ m_strMasterPage

OUString XFParaStyle::m_strMasterPage
private

Definition at line 221 of file xfparastyle.hxx.

Referenced by Equal(), GetMasterPage(), SetMasterPage(), and ToXml().


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