LibreOffice Module lotuswordpro (master) 1
lwpdoc.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*************************************************************************
3 *
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
6 *
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
9 *
10 * Sun Microsystems Inc., October, 2000
11 *
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
16 *
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.
20 *
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.
25 *
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,
29 * MA 02111-1307 USA
30 *
31 *
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.
38 *
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.
45 *
46 * The Initial Developer of the Original Code is: IBM Corporation
47 *
48 * Copyright: 2008 by IBM Corporation
49 *
50 * All Rights Reserved.
51 *
52 * Contributor(s): _______________________________________
53 *
54 *
55 ************************************************************************/
56#include <lwpglobalmgr.hxx>
57#include "lwpcharacterstyle.hxx"
58#include "lwpdoc.hxx"
59#include "lwpfootnote.hxx"
60#include "lwppagehint.hxx"
61#include "lwpdivinfo.hxx"
62#include "lwpholder.hxx"
63#include "lwpstory.hxx"
64#include "lwpsilverbullet.hxx"
65#include "lwpsortopt.hxx"
66#include "lwplayout.hxx"
67#include "lwppagelayout.hxx"
68#include "lwpuidoc.hxx"
69#include "lwpusrdicts.hxx"
70#include "lwpprtinfo.hxx"
71#include "lwpverdocument.hxx"
75
77 : LwpDLNFPVList(objHdr, pStrm)
78 , m_bGettingFirstDivisionWithContentsThatIsNotOLE(false)
79 , m_bGettingPreviousDivisionWithContents(false)
80 , m_bGettingGetLastDivisionWithContents(false)
81 , m_nFlags(0)
82 , m_nPersistentFlags(0)
83{
84}
85
91{
93
94 ReadPlug();
95
96 m_nPersistentFlags = m_pObjStrm->QuickReaduInt32();
97
98 //Skip the SortOption and UIDocument
99 {
100 LwpSortOption aDocSort(m_pObjStrm.get());
101 LwpUIDocument aUIDoc(m_pObjStrm.get());
102 }
103
104 m_oLnOpts.emplace(m_pObjStrm.get());
105
106 //Skip LwpUserDictFiles
107 {
108 LwpUserDictFiles aUsrDicts(m_pObjStrm.get());
109 }
110
111 if (!IsChildDoc())
112 {
113 //Skip LwpPrinterInfo
114 LwpPrinterInfo aPrtInfo(m_pObjStrm.get());
115 }
116
117 m_xOwnedFoundry.reset(new LwpFoundry(m_pObjStrm.get(), this));
118
120
121 if (!IsChildDoc())
122 {
125 }
126 else
127 {
128 //Skip the docdata used in old version
129 LwpObjectID dummyDocData;
130 dummyDocData.ReadIndexed(m_pObjStrm.get());
131 }
133 m_Epoch.Read(m_pObjStrm.get());
137}
138
143{
145 m_nFlags = m_pObjStrm->QuickReaduInt16();
146 m_pObjStrm->SkipExtra();
147}
148
152void LwpDocument::Parse(IXFStream* pOutputStream)
153{
154 //check the name and skip script division
155 if (!IsSkippedDivision())
156 {
157 //the frames which anchor are to page must output before other contents
158 ParseFrameInPage(pOutputStream);
159 ParseDocContent(pOutputStream);
160 }
161
163 if (pDocSock.is())
164 {
165 pDocSock->DoParse(pOutputStream);
166 }
167}
168
170{
171 OUString sDivName;
172 bool ret = false;
173 LwpDivInfo* pDiv = dynamic_cast<LwpDivInfo*>(GetDivInfoID().obj(VO_DIVISIONINFO).get());
174 if (pDiv == nullptr)
175 return true;
176 sDivName = pDiv->GetDivName();
177 if (!sDivName.isEmpty() && !pDiv->IsGotoable()) //including toa,scripts division
178 return true;
179 //skip endnote division
180 OUString strClassName = pDiv->GetClassName();
181 if ((strClassName == STR_DivisionEndnote) || (strClassName == STR_DivisionGroupEndnote)
182 || (strClassName == STR_DocumentEndnote))
183 {
184 LwpPageLayout* pPageLayout
185 = dynamic_cast<LwpPageLayout*>(pDiv->GetInitialLayoutID().obj(VO_PAGELAYOUT).get());
186 if (pPageLayout)
187 {
188 LwpStory* pStory
189 = dynamic_cast<LwpStory*>(pPageLayout->GetContent().obj(VO_STORY).get());
190 if (pStory)
191 {
192 //This judgement maybe have problem. If there is only one para in the story,
193 //this endnote division has no other contents except endnote table.
194 LwpObjectID& rFirst = pStory->GetFirstPara();
195 LwpObjectID& rLast = pStory->GetLastPara();
196 if (rFirst == rLast)
197 ret = true;
198 }
199 }
200 }
201 return ret;
202}
203
208{
212
216
219
220 //Register styles in other document connected with this document: next doc, children doc
222 if (pDocSock.is())
223 {
224 pDocSock->DoRegisterStyle();
225 }
226}
231{
232 //Register all text styles: para styles, character styles
233 LwpDLVListHeadHolder* pTextStyleHolder
235 ? dynamic_cast<LwpDLVListHeadHolder*>(m_xOwnedFoundry->GetTextStyleHead().obj().get())
236 : nullptr;
237 if (pTextStyleHolder)
238 {
239 LwpTextStyle* pTextStyle
240 = dynamic_cast<LwpTextStyle*>(pTextStyleHolder->GetHeadID().obj().get());
241 while (pTextStyle)
242 {
243 if (pTextStyle->GetFoundry())
244 throw std::runtime_error("loop in register text style");
245 pTextStyle->SetFoundry(m_xOwnedFoundry.get());
246 pTextStyle->RegisterStyle();
247 pTextStyle = dynamic_cast<LwpTextStyle*>(pTextStyle->GetNext().obj().get());
248 }
249 }
250 ChangeStyleName(); //for click here block
251}
257{
258 if (m_xOwnedFoundry)
259 {
260 //Register all layout styles, before register all styles in para
261 m_xOwnedFoundry->RegisterAllLayouts();
262 }
263
264 //set initial pagelayout in story for parsing pagelayout
265 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(m_DivInfo.obj(VO_DIVISIONINFO).get());
266 if (!pDivInfo)
267 return;
268
269 LwpPageLayout* pPageLayout
270 = dynamic_cast<LwpPageLayout*>(pDivInfo->GetInitialLayoutID().obj(VO_PAGELAYOUT).get());
271 if (pPageLayout)
272 {
273 //In Ole division, the content of pagelayout is VO_OLEOBJECT
274 LwpStory* pStory = dynamic_cast<LwpStory*>(pPageLayout->GetContent().obj(VO_STORY).get());
275 if (pStory)
276 {
277 //add all the pagelayout in order into the pagelayout list;
278 pStory->SortPageLayout();
279 pStory->SetCurrentLayout(pPageLayout);
280 }
281 }
282}
287{
288 //Register all automatic styles in para
290 m_xOwnedFoundry ? dynamic_cast<LwpHeadContent*>(
291 m_xOwnedFoundry->GetContentManager().GetContentList().obj().get())
292 : nullptr);
293 if (!xContent.is())
294 return;
295
297 dynamic_cast<LwpStory*>(xContent->GetChildHead().obj(VO_STORY).get()));
299 while (xStory.is())
300 {
301 bool bAlreadySeen = !aSeen.insert(xStory.get()).second;
302 if (bAlreadySeen)
303 throw std::runtime_error("loop in conversion");
304 //Register the child para
305 xStory->SetFoundry(m_xOwnedFoundry.get());
306 xStory->DoRegisterStyle();
307 xStory.set(dynamic_cast<LwpStory*>(xStory->GetNext().obj(VO_STORY).get()));
308 }
309}
314{
315 if (!m_xOwnedFoundry)
316 return;
317 //Register bullet styles
318 LwpDLVListHeadHolder* pBulletHead = dynamic_cast<LwpDLVListHeadHolder*>(
319 m_xOwnedFoundry->GetBulletManagerID().obj(VO_HEADHOLDER).get());
320 if (!pBulletHead)
321 return;
322 LwpSilverBullet* pBullet = dynamic_cast<LwpSilverBullet*>(pBulletHead->GetHeadID().obj().get());
324 while (pBullet)
325 {
326 bool bAlreadySeen = !aSeen.insert(pBullet).second;
327 if (bAlreadySeen)
328 throw std::runtime_error("loop in conversion");
329 pBullet->SetFoundry(m_xOwnedFoundry.get());
330 pBullet->RegisterStyle();
331 pBullet = dynamic_cast<LwpSilverBullet*>(pBullet->GetNext().obj().get());
332 }
333}
338{
339 if (!m_xOwnedFoundry)
340 return;
341 //Register all graphics styles, the first object should register the next;
342 rtl::Reference<LwpObject> pGraphic = m_xOwnedFoundry->GetGraphicListHead().obj(VO_GRAPHIC);
343 if (!pGraphic.is())
344 return;
345 pGraphic->SetFoundry(m_xOwnedFoundry.get());
346 pGraphic->DoRegisterStyle();
347}
352{
353 if (!m_oLnOpts)
354 return;
355 m_oLnOpts->RegisterStyle();
356}
357
362{
363 //Register footnote and endnote configuration for the entire document
364 if (!m_FootnoteOpts.IsNull())
365 {
366 LwpFootnoteOptions* pFootnoteOpts
367 = dynamic_cast<LwpFootnoteOptions*>(m_FootnoteOpts.obj().get());
368 if (pFootnoteOpts)
369 {
370 pFootnoteOpts->SetMasterPage("Endnote");
371 pFootnoteOpts->RegisterStyle();
372 }
373 }
374 //Register endnote page style for endnote configuration, use the last division that has endnote for the endnote page style
375 //This page style must register after its division default styles have registered
377 if (this != pEndnoteDiv)
378 return;
379
380 LwpDLVListHeadTailHolder* pHeadTail
381 = dynamic_cast<LwpDLVListHeadTailHolder*>(GetPageHintsID().obj().get());
382 if (!pHeadTail)
383 return;
384
385 LwpPageHint* pPageHint = dynamic_cast<LwpPageHint*>(pHeadTail->GetTail().obj().get());
386 if (pPageHint && !pPageHint->GetPageLayoutID().IsNull())
387 {
388 LwpPageLayout* pPageLayout
389 = dynamic_cast<LwpPageLayout*>(pPageHint->GetPageLayoutID().obj().get());
390 if (pPageLayout)
391 {
392 pPageLayout->SetFoundry(GetFoundry());
393 pPageLayout->RegisterEndnoteStyle();
394 }
395 }
396}
397
402{
403 if (IsChildDoc())
404 return;
405
406 //Get First Division
407 //LwpDocument* pFirstDoc = GetFirstDivision();
409 if (pFirstDoc)
410 {
411 LwpVerDocument* pVerDoc = dynamic_cast<LwpVerDocument*>(pFirstDoc->GetVerDoc().obj().get());
412 if (pVerDoc)
413 {
414 pVerDoc->RegisterStyle();
415 }
416 }
417}
418
424{
425 //Parse content in PageLayout
426 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(m_DivInfo.obj().get());
427 if (pDivInfo == nullptr)
428 return;
429
430 rtl::Reference<LwpObject> pLayoutObj = pDivInfo->GetInitialLayoutID().obj();
431 if (!pLayoutObj.is())
432 {
433 //master document not supported now.
434 return;
435 }
436 pLayoutObj->SetFoundry(m_xOwnedFoundry.get());
437 pLayoutObj->DoParse(pOutputStream);
438}
439
444{
445 LwpDocument* pRoot = GetRootDocument();
446 if (pRoot)
447 {
448 return &pRoot->GetFootnoteOpts();
449 }
450 return nullptr;
451}
452
457{
458 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(GetDivInfoID().obj().get());
459 if (!pDivInfo)
460 return FN_DONTCARE;
461 OUString strClassName = pDivInfo->GetClassName();
462 if (strClassName == STR_DivisionEndnote)
464 if (strClassName == STR_DivisionGroupEndnote)
466 if (strClassName == STR_DocumentEndnote)
468 return FN_DONTCARE;
469}
474{
475 LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
476 if (pDocSock)
477 {
478 return dynamic_cast<LwpDocument*>(pDocSock->GetPrevious().obj().get());
479 }
480 return nullptr;
481}
486{
487 LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
488 if (pDocSock)
489 {
490 return dynamic_cast<LwpDocument*>(pDocSock->GetNext().obj().get());
491 }
492 return nullptr;
493}
498{
499 LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
500 if (pDocSock)
501 {
502 return dynamic_cast<LwpDocument*>(pDocSock->GetParent().obj().get());
503 }
504 return nullptr;
505}
510{
511 LwpDocument* pPrev = nullptr;
512
513 for (pPrev = GetPreviousDivision(); pPrev; pPrev = pPrev->GetPreviousDivision())
514 {
515 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(pPrev->GetDivInfoID().obj().get());
516 if (pDivInfo && pDivInfo->HasContents())
517 return pPrev;
518 }
519 return nullptr;
520}
525{
526 LwpDocument* pNext = nullptr;
527
528 for (pNext = GetNextDivision(); pNext; pNext = pNext->GetNextDivision())
529 {
530 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(pNext->GetDivInfoID().obj().get());
531 if (pDivInfo && pDivInfo->HasContents())
532 return pNext;
533 }
534
535 return nullptr;
536}
541{
543 throw std::runtime_error("recursion in page divisions");
545 LwpDocument* pRet = nullptr;
546
549 if (!pRet && GetParentDivision())
551
553 return pRet;
554}
555
560{
562 throw std::runtime_error("recursion in page divisions");
564 LwpDocument* pRet = nullptr;
565
566 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(GetDivInfoID().obj().get());
567 if (pDivInfo && pDivInfo->HasContents())
568 pRet = this;
569
570 if (!pRet)
571 {
572 LwpDocument* pDivision = GetLastDivision();
573
575 while (pDivision && pDivision != this)
576 {
577 bool bAlreadySeen = !aSeen.insert(pDivision).second;
578 if (bAlreadySeen)
579 throw std::runtime_error("loop in conversion");
580 LwpDocument* pContentDivision = pDivision->GetLastDivisionWithContents();
581 if (pContentDivision)
582 {
583 pRet = pContentDivision;
584 break;
585 }
586 pDivision = pDivision->GetPreviousDivision();
587 }
588 }
589
591 return pRet;
592}
597{
598 LwpDocument* pLast = nullptr;
599 LwpDocument* pNext = this;
600
601 while (pNext)
602 {
603 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(pNext->GetDivInfoID().obj().get());
604 if (pDivInfo && pDivInfo->HasContents())
605 pLast = pNext;
606 pNext = pNext->GetNextInGroup();
607 }
608 if (pLast)
609 return pLast;
610 return nullptr;
611}
616{
617 LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
618 if (pDocSock)
619 return dynamic_cast<LwpDocument*>(pDocSock->GetChildTail().obj().get());
620 return nullptr;
621}
622
627{
628 LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
629 if (pDocSock)
630 return dynamic_cast<LwpDocument*>(pDocSock->GetChildHead().obj().get());
631 return nullptr;
632}
633
638{
639 LwpDocument* pRoot = this;
641 while (pRoot)
642 {
643 bool bAlreadySeen = !aSeen.insert(pRoot).second;
644 if (bAlreadySeen)
645 throw std::runtime_error("loop in conversion");
646 if (!pRoot->IsChildDoc())
647 return pRoot;
648 pRoot = pRoot->GetParentDivision();
649 }
650 return nullptr;
651}
656{
657 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(GetDivInfoID().obj().get());
658 if (pDivInfo && pDivInfo->HasContents() && !pDivInfo->IsOleDivision())
659 return this;
660
661 LwpDocument* pDivision = GetFirstDivision();
663 while (pDivision)
664 {
665 bool bAlreadySeen = !aSeen.insert(pDivision).second;
666 if (bAlreadySeen)
667 throw std::runtime_error("loop in conversion");
668 LwpDocument* pContentDivision = pDivision->GetFirstDivisionWithContentsThatIsNotOLE();
669 if (pContentDivision)
670 return pContentDivision;
671 pDivision = pDivision->GetNextDivision();
672 }
673 return nullptr;
674}
679{
680 LwpDocument* pRoot = GetRootDocument();
681 LwpDocument* pLastDoc = pRoot ? pRoot->GetLastDivisionWithContents() : nullptr;
683 while (pLastDoc)
684 {
685 bool bAlreadySeen = !aSeen.insert(pLastDoc).second;
686 if (bAlreadySeen)
687 throw std::runtime_error("loop in conversion");
688 if (pLastDoc->GetEnSuperTableLayout().is())
689 return pLastDoc;
690 pLastDoc = pLastDoc->GetPreviousDivisionWithContents();
691 }
692 return nullptr;
693}
698{
699 LwpHeadLayout* pHeadLayout
700 = dynamic_cast<LwpHeadLayout*>(GetFoundry()->GetLayout().obj().get());
701 if (pHeadLayout)
702 {
703 return pHeadLayout->FindEnSuperTableLayout();
704 }
706}
707
711bool LwpDocument::GetNumberOfPages(LwpDocument* pEndDivision, sal_uInt16& nCount)
712{
713 if (this == pEndDivision)
714 return true;
715
716 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(m_DivInfo.obj().get());
717 if (pDivInfo)
718 {
719 pDivInfo->GetNumberOfPages(nCount);
720 }
721
722 LwpDocument* pDivision = GetFirstDivision();
723 while (pDivision)
724 {
725 if (pDivision->GetNumberOfPages(pEndDivision, nCount))
726 return true;
727 pDivision = pDivision->GetNextDivision();
728 }
729 return false;
730}
735{
736 sal_uInt16 nPageNumber = 0;
737 LwpDocument* pRoot = GetRootDocument();
738 if (pRoot)
739 pRoot->GetNumberOfPages(this, nPageNumber);
740 return nPageNumber;
741}
742
748{
749 if (IsChildDoc())
750 return;
751
753 XFConvertFrameInPage(xXFContainer.get());
754 xXFContainer->ToXml(pOutputStream);
755}
756
761{
762 LwpDocument* pDivision = GetFirstDivision();
763
764 LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(GetDivInfoID().obj().get());
765 if (pDivInfo)
766 {
767 LwpPageLayout* pPageLayout
768 = dynamic_cast<LwpPageLayout*>(pDivInfo->GetInitialLayoutID().obj().get());
769 if (pPageLayout)
770 {
771 LwpStory* pStory = dynamic_cast<LwpStory*>(pPageLayout->GetContent().obj().get());
772 if (pStory)
773 pStory->XFConvertFrameInPage(pCont);
774 }
775 }
776 while (pDivision)
777 {
778 pDivision->XFConvertFrameInPage(pCont);
779 pDivision = pDivision->GetNextDivision();
780 }
781}
786{
788 XFTextStyle* pStyle = dynamic_cast<XFTextStyle*>(pXFStyleManager->FindStyle(u"ClickHere"));
789 if (pStyle)
790 {
791 pStyle->SetStyleName("Placeholder");
792 }
793}
795 : LwpDLNFVList(objHdr, pStrm)
796{
797}
798
803{
806 m_pObjStrm->SkipExtra();
807}
812{
814 if (pDoc.is())
815 pDoc->DoRegisterStyle();
816
817 pDoc = GetChildHead().obj();
818 if (pDoc.is())
819 pDoc->DoRegisterStyle();
820}
824void LwpDocSock::Parse(IXFStream* pOutputStream)
825{
827 if (pDoc.is())
828 pDoc->DoParse(pOutputStream);
829
830 pDoc = GetNext().obj();
831 if (pDoc.is())
832 pDoc->DoParse(pOutputStream);
833}
834
835/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Stream wrapper for sax writer.
Definition: ixfstream.hxx:72
void Read(LwpObjectStream *pStrm)
@descr read atomholder from object stream the default encoding used in Word Pro is 1252
Double Linked Named Family Properties Virtual List.
Definition: lwpdlvlist.hxx:119
void Read() override
@descr Read name of LwpDLNFVList from object stream
Definition: lwpdlvlist.cxx:129
Double Linked Named Family Virtual List.
Definition: lwpdlvlist.hxx:91
void Read() override
@descr Read LwpDLNFVList data from object stream
Definition: lwpdlvlist.cxx:90
LwpObjectID & GetParent()
Definition: lwpdlvlist.hxx:111
LwpObjectID & GetChildHead()
Definition: lwpdlvlist.hxx:109
LwpObjectID & GetChildTail()
Definition: lwpdlvlist.hxx:110
VO_HEADHOLDER, LwpDLVListHeadHolder, contains an id to the head of LwpDLVList.
Definition: lwpholder.hxx:71
LwpObjectID & GetHeadID()
Definition: lwpholder.hxx:75
VO_HEADTAILHOLDER, LwpDLVListHeadTailHolder, contains a LwpDLVListHeadTail (Head and tail id)
Definition: lwpholder.hxx:87
LwpObjectID & GetTail()
Definition: lwpholder.hxx:92
LwpObjectID & GetPrevious()
Definition: lwpdlvlist.hxx:76
LwpObjectID & GetNext()
Definition: lwpdlvlist.hxx:75
bool IsGotoable() const
Definition: lwpdivinfo.hxx:145
void GetNumberOfPages(sal_uInt16 &nPageno)
Definition: lwpdivinfo.cxx:141
OUString const & GetDivName() const
Definition: lwpdivinfo.hxx:79
OUString const & GetClassName() const
Definition: lwpdivinfo.hxx:81
bool IsOleDivision() const
Definition: lwpdivinfo.hxx:135
bool HasContents() const
Definition: lwpdivinfo.hxx:133
LwpObjectID & GetInitialLayoutID()
Definition: lwpdivinfo.hxx:77
DocumentSock object, divisions are embedded by document socket object.
Definition: lwpdoc.hxx:193
void Read() override
@descr read VO_DOCSOCK from file
Definition: lwpdoc.cxx:802
LwpDocSock(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwpdoc.cxx:794
void Parse(IXFStream *pOutputStream) override
@descr parse contents of documents plugged
Definition: lwpdoc.cxx:824
void RegisterStyle() override
@descr register styles in documents plugged
Definition: lwpdoc.cxx:811
LwpObjectID m_Doc
Definition: lwpdoc.hxx:198
Document object, represent document and division.
Definition: lwpdoc.hxx:76
void ParseDocContent(IXFStream *pOutputStream)
@descr Parse content in this division to IXFStream LwpDocument->LwpDivInfo->LwpPageLayout....
Definition: lwpdoc.cxx:423
LwpDocument * GetLastDivision()
@descr Get last division
Definition: lwpdoc.cxx:615
LwpObjectID & GetDivInfoID()
Definition: lwpdoc.hxx:183
void RegisterLayoutStyles()
@descr Register all layouts styles (page master and master page) All para styles used in master page ...
Definition: lwpdoc.cxx:256
bool m_bGettingGetLastDivisionWithContents
Definition: lwpdoc.hxx:85
LwpObjectID m_FootnoteOpts
Definition: lwpdoc.hxx:100
virtual ~LwpDocument() override
Definition: lwpdoc.cxx:86
sal_uInt16 GetEndnoteType()
@descr Get the endnote type
Definition: lwpdoc.cxx:456
std::optional< LwpLineNumberOptions > m_oLnOpts
Definition: lwpdoc.hxx:97
LwpDocument * GetNextDivision()
@descr Get next division
Definition: lwpdoc.cxx:485
LwpDocument * GetFirstDivisionWithContentsThatIsNotOLE()
Definition: lwpdoc.hxx:150
LwpObjectID m_VerDoc
Definition: lwpdoc.hxx:106
void ParseFrameInPage(IXFStream *pOutputStream)
@descr Parse the frame which anchor is to page before parse other contents, This method is called whe...
Definition: lwpdoc.cxx:747
bool m_bGettingPreviousDivisionWithContents
Definition: lwpdoc.hxx:84
LwpObjectID * GetValidFootnoteOpts()
@descr Get the footnoteoptions from the root document
Definition: lwpdoc.cxx:443
LwpFoundry * GetFoundry()
Definition: lwpdoc.hxx:182
LwpDocument * GetLastInGroupWithContents()
@descr Get last division in group which has contents, copy from lwp source code
Definition: lwpdoc.cxx:596
LwpDocument * GetPreviousDivisionWithContents()
@descr Get previous division which has contents, copy from lwp source code
Definition: lwpdoc.cxx:540
LwpObjectID & GetVerDoc()
Definition: lwpdoc.hxx:187
void RegisterBulletStyles()
@descr Register all bullet styles used in this division
Definition: lwpdoc.cxx:313
LwpDocument * GetParentDivision()
@descr Get parent division
Definition: lwpdoc.cxx:497
void RegisterStyle() override
@descr Register all styles in this division
Definition: lwpdoc.cxx:207
sal_uInt16 GetNumberOfPagesBefore()
@descr Get the numbers of page before current division
Definition: lwpdoc.cxx:734
LwpDocument * GetLastDivisionWithContents()
@descr Get last division which has contents, copy from lwp source code
Definition: lwpdoc.cxx:559
LwpObjectID & GetFootnoteOpts()
Definition: lwpdoc.hxx:185
LwpObjectID m_DivOpts
Definition: lwpdoc.hxx:99
LwpObjectID & GetPageHintsID()
Definition: lwpdoc.hxx:184
LwpObjectID m_DocSockID
Definition: lwpdoc.hxx:88
void ReadPlug()
@descr Read plug related data from m_pObjStram
Definition: lwpdoc.cxx:142
void Parse(IXFStream *pOutputStream) override
@descr Parse obj to IXFStream
Definition: lwpdoc.cxx:152
LwpObjectID m_WYSIWYGPageHints
Definition: lwpdoc.hxx:105
bool GetNumberOfPages(LwpDocument *pEndDivision, sal_uInt16 &nCount)
@descr Get the numbers of page before pEndDivision, copy from lwp source code
Definition: lwpdoc.cxx:711
sal_uInt32 m_nPersistentFlags
Definition: lwpdoc.hxx:90
bool IsChildDoc() const
Definition: lwpdoc.hxx:176
LwpDocument * GetLastDivisionThatHasEndnote()
@descr Get last division that has endnote
Definition: lwpdoc.cxx:678
LwpObjectID m_DocData
Definition: lwpdoc.hxx:101
LwpAtomHolder m_Epoch
Definition: lwpdoc.hxx:103
std::unique_ptr< LwpFoundry > m_xOwnedFoundry
Definition: lwpdoc.hxx:82
LwpDocument * GetPreviousDivision()
@descr Get previous division
Definition: lwpdoc.cxx:473
sal_uInt16 m_nFlags
Definition: lwpdoc.hxx:89
void XFConvertFrameInPage(XFContentContainer *pCont)
@descr Parse the frame which anchor is to page in the entire document
Definition: lwpdoc.cxx:760
void RegisterTextStyles()
@descr Register all named para styles
Definition: lwpdoc.cxx:230
rtl::Reference< LwpVirtualLayout > GetEnSuperTableLayout()
@descr Get endnote supertable layout, every division has only one endnote supertable layout.
Definition: lwpdoc.cxx:697
void RegisterFootnoteStyles()
@descr Register footnote/endnote configuration for the entire document
Definition: lwpdoc.cxx:361
static void ChangeStyleName()
@descr change click here to placeholder
Definition: lwpdoc.cxx:785
LwpObjectID m_DivInfo
Definition: lwpdoc.hxx:102
bool IsSkippedDivision()
Definition: lwpdoc.cxx:169
LwpDocument * GetNextInGroup()
@descr Get previous division in group, copy from lwp source code
Definition: lwpdoc.cxx:524
void RegisterStylesInPara()
@descr Register all styles used in para
Definition: lwpdoc.cxx:286
void RegisterLinenumberStyles()
@descr Register line number styles
Definition: lwpdoc.cxx:351
void RegisterGraphicsStyles()
@descr Register all styles used in VO_Graphic
Definition: lwpdoc.cxx:337
LwpDocument * GetRootDocument()
@descr Get root document
Definition: lwpdoc.cxx:637
void Read() override
@descr Read VO_Document from object stream
Definition: lwpdoc.cxx:90
LwpDocument * GetPreviousInGroup()
@descr Get previous division in group, copy from lwp source code
Definition: lwpdoc.cxx:509
LwpObjectID m_STXInfo
Definition: lwpdoc.hxx:107
LwpDocument(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwpdoc.cxx:76
LwpDocument * GetFirstDivision()
@descr Get first division
Definition: lwpdoc.cxx:626
void RegisterDefaultParaStyles()
@descr Register default para styles
Definition: lwpdoc.cxx:401
LwpDocument * ImplGetFirstDivisionWithContentsThatIsNotOLE()
@descr Get first division with contents that is not ole, copy from lwp-source code
Definition: lwpdoc.cxx:655
LwpObjectID & GetSocket()
Definition: lwpdoc.hxx:181
VO_FOOTNOTEOPTS object.
void SetMasterPage(const OUString &strMasterPage)
void RegisterStyle() override
@descr Register footnote options style
LwpObjectID & GetLayout()
Definition: lwpfoundry.hxx:252
XFStyleManager * GetXFStyleManager()
static LwpGlobalMgr * GetInstance(LwpSvStream *pSvStream=nullptr)
Head object of content list.
Definition: lwpcontent.hxx:146
rtl::Reference< LwpVirtualLayout > FindEnSuperTableLayout()
@descr find endnote supertable layout from the child layout list.
Definition: lwplayout.cxx:511
LwpObjectID & GetContent()
Definition: lwplayout.hxx:415
Base class of all Lwp VO objects.
Definition: lwpobjhdr.hxx:71
object id class
Definition: lwpobjid.hxx:79
void ReadIndexed(LwpSvStream *pStrm)
@descr Read object id with indexed format from stream if index>0, lowid is get from time table per th...
Definition: lwpobjid.cxx:96
rtl::Reference< LwpObject > obj(VO_TYPE tag=VO_INVALID) const
@descr get object from object factory per the object id
Definition: lwpobjid.cxx:183
bool IsNull() const
Definition: lwpobjid.hxx:110
void SetFoundry(LwpFoundry *pFoundry)
Definition: lwpobj.hxx:137
std::unique_ptr< LwpObjectStream > m_pObjStrm
Definition: lwpobj.hxx:90
LwpFoundry * GetFoundry()
Definition: lwpobj.hxx:136
LwpObjectID & GetPageLayoutID()
OUString RegisterEndnoteStyle()
@descr: Register master page for endnote which name is "endnote"
printer info used in VO_DOCUMENT not parsed yet
Definition: lwpprtinfo.hxx:70
virtual void RegisterStyle() override
: Register bullet or numbering style-list and store the returned name from XFStyleManager.
sort options in VO_DOCUMENT only for read, not parsed now
Definition: lwpsortopt.hxx:86
void SortPageLayout()
Definition: lwpstory.cxx:197
LwpObjectID & GetLastPara()
Definition: lwpstory.hxx:140
void SetCurrentLayout(LwpPageLayout *pPageLayout)
Definition: lwpstory.cxx:168
LwpObjectID & GetFirstPara()
Definition: lwpstory.hxx:139
void XFConvertFrameInPage(XFContentContainer *pCont)
Definition: lwpstory.cxx:321
encapsulate XInputStream to provide SvStream like interfaces
Definition: lwpsvstream.hxx:69
virtual void RegisterStyle() override
@descr default register style function
UIDocument structure contained in VO_DOCUMENT not parsed yet.
Definition: lwpuidoc.hxx:130
User defined words used in VO_DOCUMENT.
Definition: lwpusrdicts.hxx:70
virtual void RegisterStyle() override
@descr default register style function
A container for content.
Style manager for the filter.
IXFStyle * FindStyle(std::u16string_view name)
virtual void SetStyleName(const OUString &styleName) override
@descr set style name.
Definition: xfstyle.cxx:75
std::pair< const_iterator, bool > insert(Value &&x)
int nCount
float u
sal_Int32 m_nFlags
@ VO_PAGELAYOUT
Definition: lwpdefs.hxx:76
@ VO_HEADHOLDER
Definition: lwpdefs.hxx:79
@ VO_GRAPHIC
Definition: lwpdefs.hxx:99
@ VO_STORY
Definition: lwpdefs.hxx:72
@ VO_DIVISIONINFO
Definition: lwpdefs.hxx:78
@ VO_DOCSOCK
Definition: lwpdefs.hxx:77
constexpr OUStringLiteral STR_DocumentEndnote
Definition: lwpfootnote.hxx:96
#define FN_DIVISIONGROUP_SEPARATE
Definition: lwpfootnote.hxx:87
#define FN_DOCUMENT_SEPARATE
Definition: lwpfootnote.hxx:89
constexpr OUStringLiteral STR_DivisionGroupEndnote
Definition: lwpfootnote.hxx:95
#define FN_DIVISION_SEPARATE
Definition: lwpfootnote.hxx:85
constexpr OUStringLiteral STR_DivisionEndnote
Definition: lwpfootnote.hxx:94
#define FN_DONTCARE
Definition: lwpfootnote.hxx:82