165 std::unique_ptr<LwpIndentOverride> pNewIndent(pIndent->
clone());
166 pNewIndent->SetMFirst(0);
167 pNewIndent->SetMRest(0);
168 ApplyIndent(
nullptr, pParaStyle, pNewIndent.get());
258 pXFBorders->
SetWidth(eXFBorderSide, fWidth);
263 pXFBorders->
SetWidthOuter(eXFBorderSide,
static_cast<float>(fWidth*0.333));
264 pXFBorders->
SetWidthSpace(eXFBorderSide,
static_cast<float>(fWidth*0.334));
265 pXFBorders->
SetWidthInner(eXFBorderSide,
static_cast<float>(fWidth*0.333));
270 pXFBorders->
SetWidthOuter(eXFBorderSide,
static_cast<float>(fWidth*0.5));
271 pXFBorders->
SetWidthInner(eXFBorderSide,
static_cast<float>(fWidth*0.25));
272 pXFBorders->
SetWidthSpace(eXFBorderSide,
static_cast<float>(fWidth*0.25));
276 pXFBorders->
SetWidthInner(eXFBorderSide,
static_cast<float>(fWidth*0.7));
277 pXFBorders->
SetWidthOuter(eXFBorderSide,
static_cast<float>(fWidth*0.15));
278 pXFBorders->
SetWidthSpace(eXFBorderSide,
static_cast<float>(fWidth*0.15));
285 pXFBorders->
SetColor(eXFBorderSide, aXFColor );
299 if( offsetX && offsetY &&
color.IsValidColor() )
327 if( !(pBorderStuff && pBorderStuff->
GetSide() != 0) )
338 float pMarginValue[4] = { 0.0, 0.0, 0.0, 0.0 };
342 if (pBorderStuff->
HasSide(pType[nC]))
356 pParaStyle->
SetPadding(pMarginValue[0], pMarginValue[1], pMarginValue[2], pMarginValue[3]);
423 pParentPara =
nullptr;
431 pTotalIndent.reset(pIndent->
clone());
439 pTotalIndent->GetMAll())), pTotalIndent->GetRight());
440 pPara->
SetIndent(pTotalIndent.release());
443 sal_uInt16 relative = pParentIndent->
GetRelative();
445 sal_Int32 Amount = pParentIndent->
GetMAll();
454 pParaStyle->
SetIndent(pTotalIndent->GetFirst());
455 pParaStyle->
SetMargins(pTotalIndent->GetLeft(), pTotalIndent->GetRight());
456 pPara->
SetIndent(pTotalIndent.release());
461 pTotalIndent.reset(pIndent->
clone());
466 pPara->
SetIndent(pTotalIndent.release());
474 pPara->
SetIndent(pTotalIndent.release());
496 height = double(multiple)/65536L*100;
523 double above_val =-1;
559 if (pPrePara && above_val != -1)
566 pParaStyle->
SetMargins(-1,-1,above_val,below_val);
647 throw std::runtime_error(
"missing Foundry");
649 std::unique_ptr<XFParaStyle> xStyle(
new XFParaStyle());
653 xStyle->SetStyleName(styleName);
658 xStyle->SetFont(pFont);
void Read(LwpObjectStream *pStrm) override
AlignType GetAlignType() const
const OUString & str() const
const LwpColor & GetBackColor() const
sal_uInt16 GetSide() const
float GetSideWidth(sal_uInt16 side)
sal_uInt16 GetSideType(sal_uInt16 side)
LwpColor GetSideColor(sal_uInt16 side)
bool HasSide(sal_uInt16 side)
bool IsPageBreakAfter() const
bool IsKeepWithNext() const
bool IsColumnBreakBefore() const
bool IsColumnBreakAfter() const
bool IsPageBreakBefore() const
virtual void Read(LwpObjectStream *pStrm) override
void Read(LwpObjectStream *pStrm) override
lwpcolor class (red, green, blue, extra)
bool IsValidColor() const
sal_uInt32 To24Color()
@descr return the BGR format
LwpAtomHolder & GetName()
LwpObjectID & GetPrevious()
rtl::Reference< XFFont > CreateFont(sal_uInt32 fontID)
LwpFontManager & GetFontManager()
LwpStyleManager * GetStyleManager()
void SetMAll(sal_Int32 val)
sal_Int32 GetMFirst() const
virtual LwpIndentOverride * clone() const override
sal_Int32 GetMAll() const
bool IsUseRelative() const
sal_Int32 GetMRight() const
sal_uInt16 GetRelative() const
void Read(LwpObjectStream *pStrm) override
sal_Int32 GetMRest() const
void Read(LwpObjectStream *pStrm) override
double GetMarginsValue(sal_uInt8 nWhichSide)
virtual void Read(LwpObjectStream *pStrm) override
void ReadIndexed(LwpSvStream *pStrm)
@descr Read object id with indexed format from stream if index>0, lowid is get from time table per th...
rtl::Reference< LwpObject > obj(VO_TYPE tag=VO_INVALID) const
@descr get object from object factory per the object id
std::unique_ptr< LwpObjectStream > m_pObjStrm
LwpObjectID & GetObjectID()
LwpMargins * GetMargins()
virtual void Read(LwpObjectStream *pStrm) override
LwpBorderStuff * GetBorderStuff()
static void ApplyBreaks(XFParaStyle *pParaStyle, const LwpBreaksOverride *pBreaks)
LwpIndentOverride * GetIndent()
LwpSpacingOverride * GetSpacing()
LwpParaBorderOverride * GetParaBorder() const
static void ApplySubBorder(LwpBorderStuff *pBorderStuff, LwpBorderStuff::BorderType eType, XFBorders *pXFBorders)
LwpObjectID m_SpacingStyle
static void ApplyParaBorder(XFParaStyle *pParaStyle, LwpParaBorderOverride *pBorder)
LwpBulletOverride m_BulletOverride
LwpObjectID m_BorderStyle
LwpKinsokuOptsOverride m_KinsokuOptsOverride
LwpNumberingOverride * GetNumberingOverride() const
static void ApplyAlignment(XFParaStyle *pParaStyle, const LwpAlignmentOverride *pAlign)
LwpObjectID m_AlignmentStyle
LwpTabOverride * GetTabOverride() const
LwpObjectID m_IndentStyle
static void ApplySpacing(LwpPara *pPara, XFParaStyle *pParaStyle, LwpSpacingOverride *pSpacing)
LwpObjectID m_NumberingStyle
LwpBreaksOverride * GetBreaks() const
void RegisterStyle() override
@descr default register style function
LwpObjectID m_BreaksStyle
LwpParaStyle(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void Read() override
@descr default read function
static void ApplyIndent(LwpPara *pPara, XFParaStyle *pParaStyle, const LwpIndentOverride *pIndent)
LwpAlignmentOverride * GetAlignment()
virtual ~LwpParaStyle() override
LwpObjectID m_BackgroundStyle
void Apply(XFParaStyle *pStrm)
static void ApplyTab(XFParaStyle *pParaStyle, LwpTabOverride *pTab)
void SetIndent(LwpIndentOverride *pIndentOverride)
void SetBelowSpacing(double value)
double GetBelowSpacing() const
bool GetBulletFlag() const
LwpPara * GetParent()
get parent paragraph
LwpIndentOverride * GetIndent()
const LwpColor & GetColor() const
SpacingType GetType() const
sal_Int32 GetMultiple() const
sal_Int32 GetAmount() const
void Read(LwpObjectStream *pStrm) override
LwpSpacingCommonOverride * GetSpacing()
LwpSpacingCommonOverride * GetAboveSpacing()
LwpSpacingCommonOverride * GetBelowSpacing()
void AddStyle(LwpObjectID styleObjID, std::unique_ptr< IXFStyle > pStyle)
encapsulate XInputStream to provide SvStream like interfaces
LwpObjectID & GetTabRackID()
virtual void Read(LwpObjectStream *pStrm) override
LwpTab * Lookup(sal_uInt16 nIndex)
sal_uInt8 GetLeaderType() const
sal_uInt32 GetPosition() const
sal_uInt8 GetTabType() const
sal_uInt16 GetAlignChar() const
void Read() override
@descr default read function
sal_uInt32 m_nFinalFontID
LwpOverride * GetOverride()
Borders for object with borders.
void SetWidthSpace(enumXFBorder side, double space)
@descr Set space between two borders of border side.
void SetColor(enumXFBorder side, XFColor const &color)
@descr Set color of border side.
void SetWidthOuter(enumXFBorder side, double outer)
@descr Set outer border width of border side.
void SetDoubleLine(enumXFBorder side)
@descr Set border side as double line.
void SetWidth(enumXFBorder side, double width)
@descr Set width or border side.
void SetWidthInner(enumXFBorder side, double inner)
@descr Set inner border with of border side.
Style object for aragraph.
void SetPadding(double left, double right, double top, double bottom)
@descr Set the padding of the paragraph.
void SetIndent(double indent)
@descr Set the indent of the paragraph.
void SetBreaks(enumXFBreaks breaks)
descr You can only set one break property for every para style object.
void SetMargins(double left, double right, double top=-1, double bottom=-1)
@descr Set the Margins of the paragraph.
void SetLineHeight(enumLHType type, double value)
@descr Set line height of the paragraph.
void SetShadow(enumXFShadowPos pos, double offset, XFColor const &color)
@descr Set the shadow of the paragraph.
void AddTabStyle(enumXFTab type, double len, sal_Unicode leader, sal_Unicode delimiter)
@descr Add a tab style.
void SetNumberRight(bool bFlag)
void ClearTabStyles()
@descr for para style copy operator, sometimes you may need to override tab styles.
void SetBorders(XFBorders *pBorders)
@descr The borders is complex, so you have to create one before use.
void SetAlignType(enumXFAlignType eAlign)
@descr Set alignment property of the paragraph.
void SetBackColor(XFColor const &color)
@descr Set background color of the paragraph.
constexpr T saturating_add(T a, T b)
@ enumXFShadowRightBottom
@ enumXFBreakKeepWithNext