70#include <rtl/ustrbuf.hxx>
78 , m_bPMModified(false)
79 , m_pCurrentLayout(nullptr)
80 , m_pTabLayout(nullptr)
111 bool bAlreadySeen = !aSeen.
insert(xPara.get()).second;
113 throw std::runtime_error(
"loop in conversion");
116 xPara->XFConvert(pParaCont);
119 pParaCont = xPara->GetXFContainer();
133 xNext.set(
dynamic_cast<LwpPara*
>(xCur->GetNext().obj().get()));
147 bool bAlreadySeen = !aSeen.
insert(xPara.get()).second;
149 throw std::runtime_error(
"loop in register style");
151 xPara->DoRegisterStyle();
152 xPara.set(
dynamic_cast<LwpPara*
>(xPara->GetNext().obj().get()));
200 std::vector<LwpPageLayout*> aLayoutList;
214 aLayoutList.push_back(pLayout);
220 if (!aLayoutList.empty())
222 for( std::vector<LwpPageLayout*>::iterator aIt = aLayoutList.begin(); aIt != aLayoutList.end() -1; ++aIt)
224 for( std::vector<LwpPageLayout*>::iterator bIt = aIt +1; bIt != aLayoutList.end(); ++bIt )
228 std::swap(*aIt, *bIt);
237 for (
auto const& layout : aLayoutList)
248 bool bNewSection =
false;
254 bool bColumns =
true;
301 while (xFrameLayout.is())
303 if (xFrameLayout->IsAnchorCell() && xFrameLayout->HasContent())
310 xFrameLayout->DoXFConvert(pXFFirtPara);
312 xFrameLayout.set(
dynamic_cast<LwpVirtualLayout*
>(xFrameLayout->GetNext().obj().get()));
328 while (xFrameLayout.is())
330 bool bAlreadySeen = !aSeen.
insert(xFrameLayout.get()).second;
332 throw std::runtime_error(
"loop in conversion");
333 if( xFrameLayout->IsAnchorPage()
334 && (xFrameLayout->IsFrame()
335 || xFrameLayout->IsSuperTable()
336 || xFrameLayout->IsGroupHead()) )
338 xFrameLayout->DoXFConvert(pCont);
340 xFrameLayout.set(
dynamic_cast<LwpVirtualLayout*
>(xFrameLayout->GetNext().obj().get()));
355 while (xFrameLayout.is())
357 bool bAlreadySeen = !aSeen.
insert(xFrameLayout.get()).second;
359 throw std::runtime_error(
"loop in register style");
360 if (xFrameLayout->IsAnchorFrame())
362 xFrameLayout->DoXFConvert(pCont);
364 xFrameLayout.set(
dynamic_cast<LwpVirtualLayout*
>(xFrameLayout->GetNext().obj().get()));
378 while (xFrameLayout.is())
380 if (xFrameLayout->IsAnchorPage() && (xLayout->IsHeader() || xLayout->IsFooter()))
387 xFrameLayout->DoXFConvert(pXFFirtPara);
389 xFrameLayout.set(
dynamic_cast<LwpVirtualLayout*
>(xFrameLayout->GetNext().obj().get()));
411 return xVLayout->GetLastParaOfPreviousStory();
423 OUStringBuffer sText;
432 return sText.makeStringAndClear();
440 if (!pPara || pPara->
GetNext().
obj() !=
nullptr)
460 if (pBaseStyle ==
nullptr)
462 std::unique_ptr<XFTextStyle> pStyle(
new XFTextStyle);
463 *pStyle = *pBaseStyle;
465 pStyle->SetStyleName(
sName);
466 pXFStyleManager->
AddStyle(std::move(pStyle));
473 [&rStyleName, &
nPos](
const NamePosPair& rPair) { return rPair.first == rStyleName && rPair.second == nPos; });
Stream wrapper for sax writer.
Base class of all Lwp content objects.
void Read() override
@descr default read function
rtl::Reference< LwpVirtualLayout > GetLayout(LwpVirtualLayout const *pStartLayout)
void Read(LwpObjectStream *pObjStrm)
@descr Read head id and tail id
const OUString & GetStyleName() const
virtual void RegisterStyle(LwpFoundry *pFoundry)
XFStyleManager * GetXFStyleManager()
static LwpGlobalMgr * GetInstance(LwpSvStream *pSvStream=nullptr)
LwpObjectFactory * GetLwpObjFactory()
UseWhenType GetUseWhenType()
@descr: Get use when type
object factory used for lwp object creation and maintenance
void ReleaseObject(const LwpObjectID &objID)
@descr release object in the factory per the object id
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
void SetFoundry(LwpFoundry *pFoundry)
std::unique_ptr< LwpObjectStream > m_pObjStrm
bool HasColumns()
@descr: Whether current page layout has columns
LwpPageLayout * GetOddChildLayout()
@descr: Get the odd layout if current page layout is mirror page
void ResetXFColumns()
@descr: Clear columns style in page layout
OUString const & GetContentText(bool bAllText=false)
get text of paragraph
rtl::Reference< XFContentContainer > m_xXFContainer
void XFConvertFrameInHeaderFooter(XFContentContainer *pCont)
bool IsBullStyleUsedBefore(const OUString &rStyleName, sal_uInt8 nPos)
virtual void XFConvert(XFContentContainer *pCont) override
@descr default XFConvert function pCont is the XFContentContainer for the object conversion
void XFConvertFrameInCell(XFContentContainer *pCont)
LwpStory(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
LwpDLVListHeadTail m_ParaList
LwpPageLayout * m_pCurrentLayout
XFContentContainer * GetXFContent()
void Read() override
@descr default read function
void SetCurrentLayout(LwpPageLayout *pPageLayout)
void RegisterStyle() override
@descr default register style function
LwpObjectID m_FirstParaStyle
void SetPMModified(bool bPMModified)
void AddXFContent(XFContent *pContent)
OUString RegisterFirstFribStyle()
void Parse(IXFStream *pOutputStream) override
@descr default parse function
LwpObjectID & GetFirstPara()
OUString GetContentText(bool bAllText=false)
void XFConvertFrameInFrame(XFContentContainer *pCont)
std::vector< LwpPageLayout * > m_LayoutList
virtual ~LwpStory() override
std::pair< OUString, sal_uInt8 > NamePosPair
LwpPara * GetLastParaOfPreviousStory()
LwpPageLayout * GetNextPageLayout()
std::vector< NamePosPair > m_vBulletStyleNameList
void XFConvertFrameInPage(XFContentContainer *pCont)
encapsulate XInputStream to provide SvStream like interfaces
rtl::Reference< XFContent > FindFirstContent(enumXFContent type)
@descr helper function, find first content by type.
@descr Base class for all content object.
Style manager for the filter.
IXFStyleRet AddStyle(std::unique_ptr< IXFStyle > pStyle)
XFTextStyle * FindTextStyle(std::u16string_view name)
std::pair< const_iterator, bool > insert(Value &&x)
constexpr OUStringLiteral first
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)