LibreOffice Module lotuswordpro (master) 1
|
Style object for aragraph. More...
#include <xfparastyle.hxx>
Public Member Functions | |
XFParaStyle () | |
XFParaStyle (const XFParaStyle &other) | |
XFParaStyle & | operator= (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... | |
XFMargins & | GetMargins () |
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 | |
XFStyle & | operator= (XFStyle const &)=default |
XFStyle & | operator= (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 | |
IXFStyle & | operator= (IXFStyle const &)=default |
IXFStyle & | operator= (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< XFFont > | m_pFont |
XFShadow | m_aShadow |
std::unique_ptr< XFBorders > | m_pBorders |
std::unique_ptr< XFBGImage > | m_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 |
Style object for aragraph.
Definition at line 92 of file xfparastyle.hxx.
XFParaStyle::XFParaStyle | ( | ) |
Definition at line 69 of file xfparastyle.cxx.
XFParaStyle::XFParaStyle | ( | const XFParaStyle & | other | ) |
Definition at line 78 of file xfparastyle.cxx.
References XFStyleContainer::AddStyle(), XFStyleContainer::GetCount(), i, XFStyleContainer::Item(), m_aTabs, m_pBGImage, and m_pBorders.
|
overridevirtual |
Definition at line 165 of file xfparastyle.cxx.
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().
|
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().
|
overridevirtual |
Affirm whether two XFParaStyle objects are equal.
Reimplemented from XFStyle.
Definition at line 271 of file xfparastyle.cxx.
References enumXFStylePara, IXFStyle::GetStyleFamily(), m_aBreaks, m_aDropcap, m_aLineHeight, m_aMargin, m_aPadding, m_aShadow, m_aTabs, m_bNumberRight, m_eAlignType, m_fTextIndent, m_nFlag, m_pBGImage, m_pBorders, m_pFont, m_strMasterPage, and XFStyle::m_strParentStyleName.
|
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().
|
inline |
Definition at line 209 of file xfparastyle.hxx.
References m_aMargin.
Referenced by LwpParaStyle::ApplyTab().
|
inline |
Definition at line 278 of file xfparastyle.hxx.
References m_strMasterPage.
Referenced by LwpFribPageBreak::RegisterBreakStyle(), LwpFribTable::RegisterNewStyle(), and LwpFribFrame::RegisterStyle().
|
inline |
Definition at line 218 of file xfparastyle.hxx.
References m_bNumberRight.
Referenced by LwpTableLayout::PostProcessParagraph(), and LwpPara::RegisterStyle().
|
overridevirtual |
@descr get style family.
Reimplemented from XFStyle.
Definition at line 169 of file xfparastyle.cxx.
References enumXFStylePara.
XFParaStyle & XFParaStyle::operator= | ( | const XFParaStyle & | other | ) |
Definition at line 114 of file xfparastyle.cxx.
References XFStyleContainer::AddStyle(), XFStyleContainer::GetCount(), i, XFStyleContainer::Item(), m_aBackColor, m_aBreaks, m_aDropcap, m_aLineHeight, m_aMargin, m_aPadding, m_aShadow, m_aTabs, m_bNumberRight, m_eAlignType, m_fTextIndent, m_nFlag, m_pBGImage, m_pBorders, m_pFont, XFStyle::m_strParentStyleName, and XFStyleContainer::Reset().
|
inline |
@descr Set alignment property of the paragraph.
eAlign | alignment 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().
void XFParaStyle::SetBackColor | ( | XFColor const & | color | ) |
@descr Set background color of the paragraph.
color | value 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().
void XFParaStyle::SetBackImage | ( | std::unique_ptr< XFBGImage > & | rImage | ) |
@descr Set background image of the paragraph.
image | the background image to set. |
Definition at line 209 of file xfparastyle.cxx.
References m_pBGImage.
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.
pBorders | borders of the paragraph, please reference the XFBorders. |
Definition at line 214 of file xfparastyle.cxx.
References m_pBorders.
Referenced by LwpParaStyle::ApplyParaBorder().
|
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().
void XFParaStyle::SetDropCap | ( | sal_Int16 | nLength, |
sal_Int16 | nLines, | ||
double | fDistance = 0 |
||
) |
@descr Set drop caption of the paragraph.
nLength | number of chars to be dropped. |
nLines | line 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().
void XFParaStyle::SetFont | ( | rtl::Reference< XFFont > const & | font | ) |
@descr set the paragraph default font.
font | object 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().
void XFParaStyle::SetIndent | ( | double | indent | ) |
@descr Set the indent of the paragraph.
This is the indent for the first line.
indent | value of the first-line indent. |
Definition at line 179 of file xfparastyle.cxx.
References m_fTextIndent.
Referenced by LwpParaStyle::ApplyIndent().
void XFParaStyle::SetLineHeight | ( | enumLHType | type, |
double | value | ||
) |
@descr Set line height of the paragraph.
type | type of line height,fixed,space,percent or cm. |
value | value 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().
void XFParaStyle::SetMargins | ( | double | left, |
double | right, | ||
double | top = -1 , |
||
double | bottom = -1 |
||
) |
@descr Set the Margins of the paragraph.
-1 | don'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().
|
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.
|
inline |
Definition at line 217 of file xfparastyle.hxx.
References m_bNumberRight.
Referenced by LwpParaStyle::ApplyAlignment().
|
inline |
@descr Set the padding of the paragraph.
This is the distance between the border and the top of the text.
indent | value 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().
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.
pos | |
offset | the distance between the paragraph border and the shadow. |
color | color 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().
|
overridevirtual |
Implements IXFStyle.
Definition at line 353 of file xfparastyle.cxx.
References IXFAttrList::AddAttribute(), IXFAttrList::Clear(), IXFStream::EndElement(), enumXFAlignNone, GetAlignName(), IXFStream::GetAttrList(), XFStyleContainer::GetCount(), XFStyle::GetParentStyleName(), XFStyle::GetStyleName(), XFColor::IsValid(), m_aBackColor, m_aBreaks, m_aDropcap, m_aLineHeight, m_aMargin, m_aPadding, m_aShadow, m_aTabs, m_eAlignType, m_fTextIndent, m_nFlag, m_pBGImage, m_pBorders, m_pFont, m_strMasterPage, IXFStream::StartElement(), XFColor::ToString(), XFBreaks::ToXml(), XFDropcap::ToXml(), XFLineHeight::ToXml(), XFMargins::ToXml(), XFPadding::ToXml(), XFShadow::ToXml(), XFStyleContainer::ToXml(), and XFPARA_FLAG_BACKCOLOR.
|
private |
Definition at line 225 of file xfparastyle.hxx.
Referenced by operator=(), SetBackColor(), and ToXml().
|
private |
Definition at line 235 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetBreaks(), and ToXml().
|
private |
Definition at line 233 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetDropCap(), and ToXml().
|
private |
Definition at line 234 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetLineHeight(), and ToXml().
|
private |
Definition at line 226 of file xfparastyle.hxx.
Referenced by Equal(), GetMargins(), operator=(), SetMargins(), and ToXml().
|
private |
Definition at line 227 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetPadding(), and ToXml().
|
private |
Definition at line 230 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetShadow(), and ToXml().
|
private |
Definition at line 228 of file xfparastyle.hxx.
Referenced by AddTabStyle(), ClearTabStyles(), Equal(), operator=(), ToXml(), and XFParaStyle().
|
private |
Definition at line 238 of file xfparastyle.hxx.
Referenced by Equal(), GetNumberRight(), operator=(), and SetNumberRight().
|
private |
Definition at line 222 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetAlignType(), and ToXml().
|
private |
Definition at line 224 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetIndent(), and ToXml().
|
private |
Definition at line 237 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetBackColor(), and ToXml().
|
private |
Definition at line 232 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetBackImage(), ToXml(), and XFParaStyle().
|
private |
Definition at line 231 of file xfparastyle.hxx.
Referenced by Equal(), operator=(), SetBorders(), ToXml(), and XFParaStyle().
|
private |
Definition at line 229 of file xfparastyle.hxx.
Referenced by Equal(), GetFont(), operator=(), SetFont(), and ToXml().
|
private |
Definition at line 221 of file xfparastyle.hxx.
Referenced by Equal(), GetMasterPage(), SetMasterPage(), and ToXml().