1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
10 * Sun Microsystems Inc., October, 2000
12 * GNU Lesser General Public License Version 2.1
13 * =============================================
14 * Copyright 2000 by Sun Microsystems, Inc.
15 * 901 San Antonio Road, Palo Alto, CA 94303, USA
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License version 2.1, as published by the Free Software Foundation.
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 * Sun Industry Standards Source License Version 1.1
33 * =================================================
34 * The contents of this file are subject to the Sun Industry Standards
35 * Source License Version 1.1 (the "License"); You may not use this file
36 * except in compliance with the License. You may obtain a copy of the
37 * License at http://www.openoffice.org/license.html.
39 * Software provided under this License is provided on an "AS IS" basis,
40 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
41 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
42 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
43 * See the License for the specific provisions governing your rights and
44 * obligations concerning the Software.
46 * The Initial Developer of the Original Code is: IBM Corporation
48 * Copyright: 2008 by IBM Corporation
50 * All Rights Reserved.
52 * Contributor(s): _______________________________________
55 ************************************************************************/
56 /*************************************************************************
58 * For LWP filter architecture prototype
59 ************************************************************************/
61 #include "lwppara.hxx"
62 #include <lwpglobalmgr.hxx>
63 #include <lwpfilehdr.hxx>
64 #include "lwppagelayout.hxx"
65 #include "lwpparaproperty.hxx"
66 #include "lwpparastyle.hxx"
67 #include <xfilter/xfstylemanager.hxx>
68 #include <xfilter/xfparagraph.hxx>
69 #include <xfilter/xfmargins.hxx>
70 #include <xfilter/xfsection.hxx>
71 #include <xfilter/xfsectionstyle.hxx>
72 #include <xfilter/xfcolor.hxx>
73 #include <xfilter/xfliststyle.hxx>
74 #include "lwpfribheader.hxx"
75 #include "lwplayout.hxx"
76 #include "lwpbulletstylemgr.hxx"
77 #include "lwpstory.hxx"
78 #include "lwpsilverbullet.hxx"
80 #include <lwpdropcapmgr.hxx>
82 #include <o3tl/sorted_vector.hxx>
84 LwpPara::LwpPara(LwpObjectHeader
const & objHdr
, LwpSvStream
* pStrm
)
85 : LwpDLVList(objHdr
, pStrm
)
92 , m_pSilverBullet(nullptr)
93 , m_bBullContinue(false)
94 , m_SectionStyleName(u
""_ustr
)
95 , m_bHasDropcap(false)
98 , m_pDropcapLayout(nullptr)
113 if(LwpFileHeader::m_nFileRevision
<0x0006)
115 else if(LwpFileHeader::m_nFileRevision
<0x000B)
116 Simple
= m_pObjStrm
->QuickReaduInt8() != 0;
119 sal_uInt8 Flag
= m_pObjStrm
->QuickReaduInt8();
121 const int DISK_SIMPLE
= 1;
122 const int DISK_NOTIFY
= 2;
124 Simple
= (Flag
& DISK_SIMPLE
) != 0;
125 Notify
= (Flag
& DISK_NOTIFY
) != 0;
130 m_nOrdinal
= m_pObjStrm
->QuickReaduInt32();
131 if(LwpFileHeader::m_nFileRevision
<0x000B)
139 LwpForked3NotifyList aNotifyList
;
140 aNotifyList
.GetExtraList().Read(m_pObjStrm
.get());
141 aNotifyList
.Read(m_pObjStrm
.get());
148 m_nFlags
= m_pObjStrm
->QuickReaduInt16();
149 m_ParaStyle
.ReadIndexed(m_pObjStrm
.get());
153 m_Hint
.Read(m_pObjStrm
.get());
156 m_Story
.ReadIndexed(m_pObjStrm
.get());
159 if(LwpFileHeader::m_nFileRevision
<0x000B)
164 m_nLevel
= m_pObjStrm
->QuickReaduInt16();
174 m_Fribs
.SetPara(this);// for silver bullet
175 m_Fribs
.ReadPara(m_pObjStrm
.get());
177 ReadPropertyList(m_pObjStrm
.get());
180 void LwpPara::Parse(IXFStream
* pOutputStream
)
182 m_xXFContainer
.set(new XFContentContainer
);
183 XFConvert(m_xXFContainer
.get());
186 m_xXFContainer
->ToXml(pOutputStream
);
187 m_xXFContainer
->Reset();
188 m_xXFContainer
.clear();
191 void LwpPara::XFConvert(XFContentContainer
* pCont
)
193 m_xXFContainer
.set(pCont
);
195 LwpStory
*pStory
= dynamic_cast<LwpStory
*>(m_Story
.obj().get());
197 if (pStory
&& pStory
->GetDropcapFlag())
199 ParseDropcapContent();
203 //Add the break before para
204 if (m_pBreaks
&& m_nOrdinal
!=0)
205 AddBreakBefore(pCont
);
207 //Create an XFPara for this VO_PARA
208 rtl::Reference
<XFParagraph
> xPara(new XFParagraph
);
209 xPara
->SetStyleName(m_StyleName
);
211 if(!m_SectionStyleName
.isEmpty())
213 rtl::Reference
<XFSection
> xSection(CreateXFSection());
215 pStory
->AddXFContent(xSection
.get());
216 m_xXFContainer
= xSection
;
219 if (m_bHasBullet
&& m_pSilverBullet
)
221 rtl::Reference
<XFContentContainer
> xListItem
= AddBulletList(m_xXFContainer
.get());
224 xListItem
->Add(xPara
.get());
227 else if (m_xXFContainer
)
229 LwpBulletStyleMgr
* pBulletStyleMgr
= GetBulletStyleMgr();
232 pBulletStyleMgr
->SetCurrentSilverBullet(LwpObjectID());
233 pBulletStyleMgr
->SetContinueFlag(false);
235 m_xXFContainer
->Add(xPara
.get());
238 m_Fribs
.SetXFPara(xPara
.get());
241 if (m_pBreaks
&& m_xXFContainer
)
242 AddBreakAfter(m_xXFContainer
.get());
245 void LwpPara::RegisterMasterPage(XFParaStyle
const * pBaseStyle
)
248 LwpStory
* pStory
= dynamic_cast<LwpStory
*>(m_Story
.obj().get());
249 //if pagelayout is modified, register the pagelayout
250 if(!(pStory
&& pStory
->IsPMModified()))
253 bool bNewSection
= pStory
->IsNeedSection();
254 LwpPageLayout
* pLayout
= pStory
->GetCurrentLayout();
257 RegisterNewSectionStyle(pLayout
);
260 //register master page style
261 std::unique_ptr
<XFParaStyle
> xOverStyle(new XFParaStyle
);
262 *xOverStyle
= *pBaseStyle
;
263 xOverStyle
->SetStyleName( u
""_ustr
);
264 xOverStyle
->SetMasterPage(pLayout
->GetStyleName());
265 if (!m_ParentStyleName
.isEmpty())
266 xOverStyle
->SetParentStyleName(m_ParentStyleName
);
267 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
268 m_StyleName
= pXFStyleManager
->AddStyle(std::move(xOverStyle
)).m_pStyle
->GetStyleName();
271 * @short register paragraph style
273 void LwpPara::RegisterStyle()
275 // m_Fribs.SetPara(this);
276 // m_Fribs.RegisterStyle();
281 XFParaStyle
* pBaseStyle
= dynamic_cast<XFParaStyle
*>(m_pFoundry
->GetStyleManager()->GetStyle(m_ParaStyle
));
282 if (pBaseStyle
== nullptr) return;
283 m_StyleName
= pBaseStyle
->GetStyleName();//such intf to be added
284 m_ParentStyleName
= m_StyleName
;
285 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
287 LwpParaStyle
* pParaStyle
= GetParaStyle();
288 if (pParaStyle
&& pParaStyle
->GetIndent())
290 std::unique_ptr
<LwpIndentOverride
> pIndentOverride(GetParaStyle()->GetIndent()->clone());
291 m_pIndentOverride
= std::move(pIndentOverride
);
294 std::unique_ptr
<XFParaStyle
> xOverStyle
;
295 bool noSpacing
= true;
296 LwpParaProperty
* pBulletProps
= nullptr, *pNumberingProps
= nullptr;
298 if (!m_vProps
.empty())
300 bool noIndent
= true;
301 xOverStyle
.reset(new XFParaStyle
);
302 *xOverStyle
= *pBaseStyle
;
303 xOverStyle
->SetStyleName(u
""_ustr
);
305 LwpParaStyle
& rParaStyle
= dynamic_cast<LwpParaStyle
&>(*m_ParaStyle
.obj());
306 for (auto & pProps
: m_vProps
)
308 PropType
= pProps
->GetType();
313 LwpAlignmentOverride
*pAlignment
= static_cast<LwpParaAlignProperty
*>(pProps
.get())->GetAlignment();
316 if (!rParaStyle
.GetAlignment())
317 OverrideAlignment(nullptr, pAlignment
, xOverStyle
.get());
320 std::unique_ptr
<LwpAlignmentOverride
> const pAlign(
321 rParaStyle
.GetAlignment()->clone());
322 OverrideAlignment(pAlign
.get(),
329 case PP_LOCAL_INDENT
:
332 LwpIndentOverride
*pIndent
= static_cast<LwpParaIndentProperty
*>(pProps
.get())->GetIndent();
335 if (!rParaStyle
.GetIndent())
336 OverrideIndent(nullptr, pIndent
, xOverStyle
.get());
338 OverrideIndent(m_pIndentOverride
.get(), pIndent
, xOverStyle
.get());
342 case PP_LOCAL_SPACING
:
345 LwpSpacingOverride
*pSpacing
= static_cast<LwpParaSpacingProperty
*>(pProps
.get())->GetSpacing();
348 if (!rParaStyle
.GetSpacing())
349 OverrideSpacing(nullptr, pSpacing
, xOverStyle
.get());
352 std::unique_ptr
<LwpSpacingOverride
> const
353 pNewSpacing(rParaStyle
.GetSpacing()->clone());
354 OverrideSpacing(pNewSpacing
.get(), pSpacing
, xOverStyle
.get());
359 case PP_LOCAL_BORDER
:
361 OverrideParaBorder(pProps
.get(), xOverStyle
.get());
364 case PP_LOCAL_BREAKS
:
366 OverrideParaBreaks(pProps
.get(), xOverStyle
.get());
369 case PP_LOCAL_BULLET
:
371 pBulletProps
= pProps
.get();
374 case PP_LOCAL_NUMBERING
:
376 pNumberingProps
= pProps
.get();
379 case PP_LOCAL_TABRACK
:
383 case PP_LOCAL_BACKGROUND
:
385 LwpBackgroundOverride
* pBGOver
= static_cast<LwpParaBackGroundProperty
*>(pProps
.get())->GetBackground();
388 LwpBackgroundStuff
& rBGStuff
= pBGOver
->GetBGStuff();
389 if (!rBGStuff
.IsTransparent() )
391 if (rBGStuff
.IsPatternFill())
393 std::unique_ptr
<XFBGImage
> xXFBGImage(rBGStuff
.GetFillPattern());
394 xOverStyle
->SetBackImage(xXFBGImage
);
398 LwpColor
* pColor
= rBGStuff
.GetFillColor();
399 if (pColor
&& pColor
->IsValidColor())
401 XFColor
aXFColor( pColor
->To24Color());
402 xOverStyle
->SetBackColor( aXFColor
);
414 if (noIndent
&& m_pIndentOverride
)
416 if (m_pIndentOverride
->IsUseRelative() && GetParent())
418 OverrideIndent(nullptr,m_pIndentOverride
.get(),xOverStyle
.get());
421 if (!m_ParentStyleName
.isEmpty())
422 xOverStyle
->SetParentStyleName(m_ParentStyleName
);
423 m_StyleName
= pXFStyleManager
->AddStyle(std::move(xOverStyle
)).m_pStyle
->GetStyleName();
426 else //use named style
428 if (m_pIndentOverride
)
430 if (m_pIndentOverride
->IsUseRelative() && GetParent())
432 xOverStyle
.reset(new XFParaStyle
);
433 *xOverStyle
= *pBaseStyle
;
434 OverrideIndent(nullptr,m_pIndentOverride
.get(),xOverStyle
.get());
435 if (!m_ParentStyleName
.isEmpty())
436 xOverStyle
->SetParentStyleName(m_ParentStyleName
);
437 m_StyleName
= pXFStyleManager
->AddStyle(std::move(xOverStyle
)).m_pStyle
->GetStyleName();
444 XFParaStyle
* pOldStyle
= pXFStyleManager
->FindParaStyle(m_StyleName
);
445 if (pOldStyle
->GetNumberRight())
447 xOverStyle
.reset(new XFParaStyle
);
448 *xOverStyle
= *pOldStyle
;
449 xOverStyle
->SetAlignType(enumXFAlignStart
);
450 if (!m_ParentStyleName
.isEmpty())
451 xOverStyle
->SetParentStyleName(m_ParentStyleName
);
452 m_StyleName
= pXFStyleManager
->AddStyle(std::move(xOverStyle
)).m_pStyle
->GetStyleName();
456 // override bullet and numbering
457 OverrideParaBullet(pBulletProps
);
458 OverrideParaNumbering(pNumberingProps
);
460 //register bullet style
461 LwpBulletStyleMgr
* pBulletStyleMgr
= GetBulletStyleMgr();
464 // if has bullet or numbering
467 //if it's normal bullet
470 if (m_pSilverBullet
->HasName())
472 m_aBulletStyleName
= m_pSilverBullet
->GetBulletStyleName();
474 else if (!m_xBullOver
->IsEditable())
476 m_aBulletStyleName
= pBulletStyleMgr
->RegisterBulletStyle(this, m_xBullOver
.get(), m_pIndentOverride
.get());
480 if (m_pSilverBullet
->IsBulletOrdered())
482 OUString aPreBullStyleName
;
483 LwpNumberingOverride
* pNumbering
= GetParaNumbering();
484 sal_uInt16 nPosition
= pNumbering
->GetPosition();
485 bool bLesser
= m_pSilverBullet
->IsLesserLevel(nPosition
);
486 LwpPara
* pPara
= this;
487 LwpPara
* pPrePara
= nullptr;
488 sal_uInt16 nNum
= 0, nLevel
= 0, nFoundLevel
= 0xffff, nFoundBound
= 0;
490 nFoundBound
= nLevel
= pNumbering
->GetLevel();
491 if (nPosition
== pNumbering
->GetPosition())
495 bool bHeading
= pNumbering
->IsHeading();
497 o3tl::sorted_vector
<LwpPara
*> aSeen
;
500 bool bAlreadySeen
= !aSeen
.insert(pPara
).second
;
502 throw std::runtime_error("loop in conversion");
503 LwpSilverBullet
* pParaSilverBullet
= pPara
->GetSilverBullet();
504 pNumbering
= pPara
->GetParaNumbering();
506 if (pPara
->GetObjectID() != GetObjectID())
508 if (!pParaSilverBullet
)
513 /* If lesser, stop when we hit an outline style whose level is
514 * higher than our current level.
516 // restart based on Outline level?
517 if (pNumbering
&& bLesser
&& (!bHeading
|| pNumbering
->IsHeading()))
519 if (nFoundLevel
!= 0xffff)
521 if (pNumbering
->GetLevel() < nFoundLevel
)
525 if ((pNumbering
->GetLevel() == nFoundLevel
)
526 && (pParaSilverBullet
->GetObjectID() != m_pSilverBullet
->GetObjectID()
527 || pNumbering
->GetPosition() != nPosition
))
534 if (pNumbering
->GetLevel() < nFoundBound
535 && (pParaSilverBullet
->GetObjectID() != m_pSilverBullet
->GetObjectID()
536 || pNumbering
->GetPosition() != nPosition
))
538 nFoundBound
= pNumbering
->GetLevel();
544 // Don't bump the number if this bullet is skipped
545 if (m_xBullOver
->IsSkip())
547 else if ( pParaSilverBullet
548 && pParaSilverBullet
->GetObjectID() == m_pSilverBullet
->GetObjectID()
549 && pNumbering
&& nPosition
== pNumbering
->GetPosition())
553 if (nFoundLevel
!= 0xffff)
555 if (nFoundLevel
== pNumbering
->GetLevel())
557 aPreBullStyleName
= pPara
->GetBulletStyleName();
561 else if (pNumbering
->GetLevel() <= nLevel
)
563 if (pNumbering
->GetLevel() >= nFoundBound
)
567 nFoundLevel
= pNumbering
->GetLevel();
568 aPreBullStyleName
= pPara
->GetBulletStyleName();
574 aPreBullStyleName
= pPara
->GetBulletStyleName();
579 pPrePara
= dynamic_cast<LwpPara
*>(pPara
->GetPrevious().obj(VO_PARA
).get());
583 LwpStory
* pStory
= pPara
->GetStory();
584 pPrePara
= pStory
? pStory
->GetLastParaOfPreviousStory() : nullptr;
593 nNum
= nNum
? nNum
: 1;
597 m_aBulletStyleName
= aPreBullStyleName
;
598 m_bBullContinue
= true;
602 m_bBullContinue
= false;
605 XFListStyle
* pOldStyle
= static_cast<XFListStyle
*>(pXFStyleManager
->FindStyle(m_aBulletStyleName
));
608 std::unique_ptr
<XFListStyle
> xNewStyle(new XFListStyle(*pOldStyle
));
609 m_aBulletStyleName
= pXFStyleManager
->AddStyle(std::move(xNewStyle
)).m_pStyle
->GetStyleName();
614 LwpStory
* pMyStory
= GetStory();
617 if (pMyStory
->IsBullStyleUsedBefore(m_aBulletStyleName
, m_xParaNumbering
->GetPosition()))
619 //m_bBullContinue = sal_True;
623 pMyStory
->AddBullStyleName2List(m_aBulletStyleName
, m_xParaNumbering
->GetPosition());
635 LwpPara
* pPrePara
= dynamic_cast<LwpPara
*>(GetPrevious().obj().get());
636 if (pPrePara
&& pPrePara
->GetBelowSpacing()!=0)
638 xOverStyle
.reset(new XFParaStyle
);
639 *xOverStyle
= *GetXFParaStyle();
640 XFMargins
* pMargin
= &xOverStyle
->GetMargins();
641 pMargin
->SetTop(pMargin
->GetTop()+pPrePara
->GetBelowSpacing());
642 if (!m_ParentStyleName
.isEmpty())
643 xOverStyle
->SetParentStyleName(m_ParentStyleName
);
644 m_StyleName
= pXFStyleManager
->AddStyle(std::move(xOverStyle
)).m_pStyle
->GetStyleName();
649 if(m_Fribs
.HasFrib(FRIB_TAG_TAB
))
651 std::unique_ptr
<XFParaStyle
> xNewParaStyle(new XFParaStyle
);
652 *xNewParaStyle
= *GetXFParaStyle();
653 //xOverStyle->SetStyleName("");
654 RegisterTabStyle(xNewParaStyle
.get());
655 if (!m_ParentStyleName
.isEmpty())
656 xNewParaStyle
->SetParentStyleName(m_ParentStyleName
);
657 m_StyleName
= pXFStyleManager
->AddStyle(std::move(xNewParaStyle
)).m_pStyle
->GetStyleName();
660 //register master page;
661 RegisterMasterPage(GetXFParaStyle());
663 // reg auto style,lay here for pagebreak need overridden para style
664 m_Fribs
.SetPara(this);
665 m_Fribs
.RegisterStyle();
670 std::unique_ptr
<XFParaStyle
> xStyle(new XFParaStyle
);
671 *xStyle
= *GetXFParaStyle();
672 xStyle
->SetDropCap(m_nChars
-1,m_nLines
);
673 if (!m_ParentStyleName
.isEmpty())
674 xStyle
->SetParentStyleName(m_ParentStyleName
);
675 m_StyleName
= pXFStyleManager
->AddStyle(std::move(xStyle
)).m_pStyle
->GetStyleName();
677 // maybe useful for further version
678 // deleted because Leader of Table is not supported in this version
679 //AddTabStyleForTOC();
682 void LwpPara::RegisterNewSectionStyle(LwpPageLayout
*pLayout
)
687 std::unique_ptr
<XFSectionStyle
> xSectStyle(new XFSectionStyle
);
688 XFColumns
* pColumns
= pLayout
->GetXFColumns();
691 xSectStyle
->SetColumns(pColumns
);
693 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
694 m_SectionStyleName
= pXFStyleManager
->AddStyle(std::move(xSectStyle
)).m_pStyle
->GetStyleName();
697 rtl::Reference
<XFSection
> LwpPara::CreateXFSection()
699 rtl::Reference
<XFSection
> xXFSection(new XFSection
);
700 xXFSection
->SetStyleName(m_SectionStyleName
);
701 m_SectionStyleName
.clear();
705 /**************************************************************************
706 * @descr: register tab style
707 **************************************************************************/
708 void LwpPara::RegisterTabStyle(XFParaStyle
* pXFParaStyle
)
710 LwpTabOverride aFinaOverride
;
711 LwpTabOverride
* pBase
= nullptr;
712 //get the tabrack from the current layout
713 LwpStory
* pStory
= dynamic_cast<LwpStory
*>(m_Story
.obj().get());
714 LwpMiddleLayout
* pLayout
= pStory
? pStory
->GetTabLayout() : nullptr;
717 pBase
= pLayout
->GetTabOverride();
720 pBase
->Override(&aFinaOverride
);
724 //get the tabrack from the base parastyle
725 LwpParaStyle
* pParaStyle
= GetParaStyle();
726 pBase
= pParaStyle
->GetTabOverride();
729 pBase
->Override(&aFinaOverride
);
731 //get the tabrack from the local property
732 pBase
= GetLocalTabOverride();
735 pBase
->Override(&aFinaOverride
);
738 LwpParaStyle::ApplyTab(pXFParaStyle
, &aFinaOverride
);
741 * @short parse dropcap text
743 void LwpPara::ParseDropcapContent()
747 XFParagraph
* pDropcap
= GetFoundry()->GetDropcapMgr().GetXFPara();
750 m_Fribs
.SetXFPara(pDropcap
);
755 * @short add paragraph break attribute
757 void LwpPara::AddBreakBefore(XFContentContainer
* pCont
)
759 if (!m_pBreaks
|| !pCont
)
761 if (m_pBreaks
->IsPageBreakBefore())
763 rtl::Reference
<XFParagraph
> xPara(new XFParagraph
);
764 xPara
->SetStyleName(m_BefPageBreakName
);
765 pCont
->Add(xPara
.get());
767 else if (m_pBreaks
->IsColumnBreakBefore())
769 rtl::Reference
<XFParagraph
> xPara(new XFParagraph
);
770 xPara
->SetStyleName(m_BefColumnBreakName
);
771 pCont
->Add(xPara
.get());
775 void LwpPara::AddBreakAfter(XFContentContainer
* pCont
)
779 if (m_pBreaks
->IsPageBreakAfter())
781 rtl::Reference
<XFParagraph
> xPara(new XFParagraph
);
782 xPara
->SetStyleName(m_AftPageBreakName
);
783 pCont
->Add(xPara
.get());
785 else if (m_pBreaks
->IsColumnBreakAfter())
787 rtl::Reference
<XFParagraph
> xPara(new XFParagraph
);
788 xPara
->SetStyleName(m_AftColumnBreakName
);
789 pCont
->Add(xPara
.get());
793 LwpBulletStyleMgr
* LwpPara::GetBulletStyleMgr()
797 return m_pFoundry
->GetBulletStyleMgr();
803 rtl::Reference
<XFContentContainer
> LwpPara::AddBulletList(XFContentContainer
* pCont
)
805 LwpBulletStyleMgr
* pBulletStyleMgr
= GetBulletStyleMgr();
806 if (!pBulletStyleMgr
)
809 return rtl::Reference
<XFContentContainer
>();
812 sal_uInt16 nLevel
= m_nLevel
;
813 bool bOrdered
= false;
814 /*LwpStory* pMyStory =*/ GetStory();
816 pBulletStyleMgr
->SetContinueFlag(m_bBullContinue
);
818 if (m_pSilverBullet
->IsBulletOrdered())
822 if (m_pSilverBullet
->HasName())
824 nLevel
= m_xParaNumbering
->GetPosition();
825 m_nLevel
= nLevel
;//for get para level
828 return pBulletStyleMgr
->AddBulletList(pCont
, bOrdered
, m_aBulletStyleName
,
829 nLevel
, m_xBullOver
->IsSkip());
832 LwpNumberingOverride
* LwpPara::GetParaNumbering()
834 return m_xParaNumbering
.get();
837 void LwpForked3NotifyList::Read(LwpObjectStream
* pObjStrm
)
839 m_PersistentList
.Read(pObjStrm
);
842 void LwpNotifyListPersistent::Read(LwpObjectStream
* pObjStrm
)
844 m_Head
.ReadIndexed(pObjStrm
);
845 pObjStrm
->SkipExtra();
848 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */