LibreOffice Module lotuswordpro (master) 1
lwpframelayout.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/*************************************************************************
57 * @file
58 * the class for VO_FrameLayout
59 ************************************************************************/
60
61#include <memory>
62#include <lwpfilehdr.hxx>
63#include "lwpcelllayout.hxx"
64#include "lwpframelayout.hxx"
65#include "lwppara.hxx"
69#include "lwpoleobject.hxx"
70#include <lwpglobalmgr.hxx>
71
73 : m_pLayout(pLayout)
74{
75}
76
84void LwpFrame::RegisterStyle(std::unique_ptr<XFFrameStyle>& rFrameStyle)
85{
86 ApplyWrapType(rFrameStyle.get());
87 ApplyMargins(rFrameStyle.get());
88 ApplyPadding(rFrameStyle.get());
89 ApplyBorders(rFrameStyle.get());
90 ApplyColumns(rFrameStyle.get());
91 ApplyShadow(rFrameStyle.get());
92 ApplyBackGround(rFrameStyle.get());
93 ApplyWatermark(rFrameStyle.get());
94 ApplyProtect(rFrameStyle.get());
95 ApplyTextDir(rFrameStyle.get());
96 ApplyPosType(rFrameStyle.get());
97
98 rFrameStyle->SetStyleName(m_pLayout->GetName().str());
100 m_StyleName = pXFStyleManager->AddStyle(std::move(rFrameStyle)).m_pStyle->GetStyleName();
102}
103
110void LwpFrame::Parse(XFFrame* pXFFrame, sal_Int32 nPageNo)
111{
112 //set the frame style name
113 pXFFrame->SetStyleName(m_StyleName);
114
115 //SetAnchorType and position,if it's page anchor,set the page number.
116 ParseAnchorType(pXFFrame);
117 if (nPageNo > 0)
118 {
119 pXFFrame->SetAnchorPage(nPageNo);
120 }
121
122 //Set frame Name
123 OUString aFrameName = m_pLayout->GetName().str();
124 if (!aFrameName.isEmpty())
125 {
126 //cause the bug of SODC, the linkframe name can not be "Frame1", so I change the frame name
127 /*if(aFrameName.equals("Frame1"))
128 {
129 aFrameName = "Frame1_COPY";
130 }
131 pXFFrame->SetName(aFrameName);*/
132 pXFFrame->SetName(m_StyleName);
133 }
134
135 LwpLayoutGeometry* pLayoutGeo = m_pLayout->GetGeometry();
136 //Set frame Width and height
137 if (pLayoutGeo)
138 {
139 double fWidth = m_pLayout->GetWidth();
140 double fHeight = m_pLayout->GetHeight();
141
142 pXFFrame->SetWidth(fWidth);
143 pXFFrame->SetHeight(fHeight);
144
145 //Get content obj;
146 /*LwpObject* pObj =*/m_pLayout->GetContent().obj();
148 {
149 //process grouplayout height. there is problems now
150 pXFFrame->SetHeight(fHeight);
151 }
152 /*
153 else if(m_pLayout->IsFitGraphic() && pObj && pObj->GetTag() == VO_GRAPHIC)
154 {
155 //If is graphic, get original size and set it;
156 LwpGraphicObject* pGrpObj = static_cast<LwpGraphicObject*>(pObj);
157 long nHeight =0, nWidth =0;
158 pGrpObj->GetGrafOrgSize(nWidth, nHeight);
159 //add margins to the width and height;
160 fWidth = (double)nWidth/TWIPS_PER_CM + m_pLayout->GetMarginsValue(MARGIN_LEFT) + m_pLayout->GetMarginsValue(MARGIN_RIGHT);
161 fHeight = (double)nHeight/TWIPS_PER_CM + m_pLayout->GetMarginsValue(MARGIN_TOP) + m_pLayout->GetMarginsValue(MARGIN_BOTTOM);
162 pXFFrame->SetWidth(fWidth);
163 pXFFrame->SetHeight(fHeight);
164 }
165 */
166 else if (m_pLayout->IsAutoGrow())
167 {
168 pXFFrame->SetMinHeight(fHeight);
169 }
170 }
171
172 if (m_pLayout->IsFrame())
173 {
174 //Set frame link. Only frame layout has this feature
175 LwpFrameLayout* pLayout = static_cast<LwpFrameLayout*>(m_pLayout);
176 pXFFrame->SetNextLink(pLayout->GetNextLinkName());
177 }
178}
185{
186 // parse the frame which anchor to page
188 if (!xParent.is())
189 throw std::runtime_error("missing Parent Layout");
190 if (xParent->IsPage() && xParent->GetParentLayout().is()
191 && xParent->GetParentLayout()->IsPage())
192 {
193 //for mirror page, problems exist if the parent layout is header or footer layout,
194 xParent = xParent->GetParentLayout();
195 }
196 if (m_pLayout->IsAnchorPage() && xParent->IsPage())
197 {
198 //get parent layout
199 if (m_pLayout->IsUseOnPage())
200 {
201 sal_Int32 nPageNo = xParent->GetPageNumber(m_pLayout->GetUsePage());
202 if (nPageNo > 0)
203 m_pLayout->XFConvertFrame(pCont, nPageNo);
204 }
205 else if (m_pLayout->IsUseOnAllPages())
206 {
207 sal_Int32 nFirst = xParent->GetPageNumber(FIRST_LAYOUTPAGENO);
208 sal_Int32 nLast = xParent->GetPageNumber(LAST_LAYOUTPAGENO);
209 if (nLast > 0)
210 m_pLayout->XFConvertFrame(pCont, nFirst, nLast, true);
211 }
213 {
214 sal_Int32 nFirst = xParent->GetPageNumber(FIRST_LAYOUTPAGENO);
215 sal_Int32 nLast = xParent->GetPageNumber(LAST_LAYOUTPAGENO);
216 if (nLast > 0)
217 {
218 sal_uInt16 first = static_cast<sal_uInt16>(nFirst);
221 nFirst++;
222 if (nFirst <= nLast)
223 {
224 m_pLayout->XFConvertFrame(pCont, nFirst, nLast);
225 }
226 }
227 }
228 }
229 else
230 {
232 }
233}
240{
242 switch (m_pLayout->GetWrapType())
243 {
244 case LwpPlacableLayout::LAY_WRAP_AROUND: //fall through
246 {
247 //In SODC, if Optimal wrap type is used and the distance between the frame object
248 //and page margins is less than 2cm, the text is not wrapped. While there is no this feature in Word Pro
249 //So the optimal wrap type is translated to left side or right side wrap type according to the distance
250 //between the frame object and page margins
251
252 eWrap = enumXFWrapBest;
254 LwpMiddleLayout* pParent = dynamic_cast<LwpMiddleLayout*>(xContainer.get());
255 if (pParent)
256 {
257 if (IsLeftWider())
258 eWrap = enumXFWrapLeft;
259 else
260 eWrap = enumXFWrapRight;
261 }
262 break;
263 }
265 {
266 eWrap = enumXFWrapNone;
267 break;
268 }
270 {
271 eWrap = enumXFWrapRunThrough;
273 {
274 //pFrameStyle->SetBackGround(sal_True);
275 XFColor aXFColor(0xffffff); //white color
276 pFrameStyle->SetBackColor(aXFColor);
277 pFrameStyle->SetTransparency(100); //transparency
278 }
279 break;
280 }
281 case LwpPlacableLayout::LAY_WRAP_LEFT: //fall through
283 {
284 eWrap = enumXFWrapLeft;
285 break;
286 }
287 case LwpPlacableLayout::LAY_WRAP_RIGHT: //fall through
289 {
290 eWrap = enumXFWrapRight;
291 break;
292 }
293 case LwpPlacableLayout::LAY_WRAP_BOTH: //fall through
295 {
296 eWrap = enumXFWrapParallel;
297 break;
298 }
299 default:
300 break;
301 }
302
303 //If it is the type of with para above, wrap type is enumXFWrapNone
305 {
306 eWrap = enumXFWrapNone;
307 }
308
309 pFrameStyle->SetWrapType(eWrap);
310}
317{
319 double fRight = m_pLayout->GetExtMarginsValue(MARGIN_RIGHT);
321 double fBottom = m_pLayout->GetExtMarginsValue(MARGIN_BOTTOM);
322 pFrameStyle->SetMargins(fLeft, fRight, fTop, fBottom);
323}
330{
331 double fLeft = m_pLayout->GetMarginsValue(MARGIN_LEFT);
332 double fRight = m_pLayout->GetMarginsValue(MARGIN_RIGHT);
333 double fTop = m_pLayout->GetMarginsValue(MARGIN_TOP);
334 double fBottom = m_pLayout->GetMarginsValue(MARGIN_BOTTOM);
335 pFrameStyle->SetPadding(fLeft, fRight, fTop, fBottom);
336}
343{
344 std::unique_ptr<XFBorders> pBordres = m_pLayout->GetXFBorders();
345 if (pBordres)
346 {
347 pFrameStyle->SetBorders(std::move(pBordres));
348 }
349}
356{
357 XFColumns* pColumns = m_pLayout->GetXFColumns();
358 if (pColumns)
359 {
360 pFrameStyle->SetColumns(pColumns);
361 }
362}
369{
370 XFShadow* pXFShadow = m_pLayout->GetXFShadow();
371 if (pXFShadow)
372 {
373 pFrameStyle->SetShadow(pXFShadow);
374 }
375}
382{
383 LwpColor* pColor = m_pLayout->GetBackColor();
384 if (pColor)
385 {
386 XFColor aXFColor(pColor->To24Color());
387 pFrameStyle->SetBackColor(aXFColor);
388 }
389}
396{
398 {
399 pFrameStyle->SetProtect(true, true, true);
400 }
401}
408{
409 pFrameStyle->SetTextDir(m_pLayout->GetTextDirection());
410}
417{
423 switch (nType)
424 {
427 {
428 //anchor to page, frame and cell
430 eXRel = enumXFFrameXRelPage;
431 //set vertical position
432 if (m_pLayout->IsAnchorPage()) //in page
433 {
435 if (xContainer.is() && (xContainer->IsHeader() || xContainer->IsFooter()))
436 {
437 //Only anchor to para, the frame can display in header and footer of each page
438 eYPos = enumXFFrameYPosFromTop; //from top
439 eYRel = enumXFFrameYRelPara; //from margin
440 }
441 else
442 {
444 eYRel = enumXFFrameYRelPage;
445 }
446 }
447 if (m_pLayout->IsAnchorFrame()) //in frame
448 {
450 eYRel = enumXFFrameYRelPage;
451 }
452 if (m_pLayout->IsAnchorCell())
453 {
454 //SODC has no this type, simulate this feature
455 eYPos = enumXFFrameYPosFromTop; //from top
456 eYRel = enumXFFrameYRelPara; //from margin
457 }
458 break;
459 }
460 case LwpLayoutRelativityGuts::LAY_PARA_RELATIVE: //same page as text
461 {
463 eXRel = enumXFFrameXRelPage;
464 //set vertical position
466 if (xContainer.is() && xContainer->IsPage()) //in page
467 {
468 //eYPos = enumXFFrameYPosFromTop;
469 //eYRel = enumXFFrameYRelPage;
470 eYPos = enumXFFrameYPosBelow;
471 eYRel = enumXFFrameYRelChar;
472 }
473 else if (xContainer.is() && xContainer->IsFrame()) //in frame
474 {
476 eYRel = enumXFFrameYRelPage;
477 }
478 else
479 {
480 eYPos = enumXFFrameYPosFromTop; //from top
481 eYRel = enumXFFrameYRelPara; //from margin
482 }
483 break;
484 }
486 {
487 eXPos = enumXFFrameXPosFromLeft; //need not be set
488 eXRel = enumXFFrameXRelParaContent; //need not be set
489 eYPos = enumXFFrameYPosTop; //should be from top
491 sal_Int32 nOffset = m_pLayout->GetBaseLineOffset();
492 if (nOffset > 0)
493 {
495 }
496 break;
497 }
498 case LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE: //with para above
499 {
502 //eYPos = enumXFFrameYPosTop;
503 eYPos = enumXFFrameYPosBottom;
505 break;
506 }
507 case LwpLayoutRelativityGuts::LAY_INLINE_VERTICAL: //in text - vertical
508 {
510 eXRel = enumXFFrameXRelPage;
511 eYPos = enumXFFrameYPosFromTop; //should be below position
512 eYRel = enumXFFrameYRelChar;
513 break;
514 }
515 default:
516 break;
517 }
518
519 pFrameStyle->SetXPosType(eXPos, eXRel);
520 pFrameStyle->SetYPosType(eYPos, eYRel);
521}
528{
529 std::unique_ptr<XFBGImage> xBGImage(m_pLayout->GetXFBGImage());
530 if (xBGImage)
531 {
532 pFrameStyle->SetBackImage(xBGImage);
533 //set watermark transparent
535 LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*>(xWaterMarkLayout.get());
536 LwpBackgroundStuff* pBackgroundStuff = pLay ? pLay->GetBackgroundStuff() : nullptr;
537 if (pBackgroundStuff && !pBackgroundStuff->IsTransparent())
538 {
539 pFrameStyle->SetTransparency(100);
540 }
541 }
542}
543
550{
551 std::unique_ptr<XFBGImage> xXFBGImage(m_pLayout->GetFillPattern());
552 if (xXFBGImage)
553 {
554 pFrameStyle->SetBackImage(xXFBGImage);
555 }
556}
557
564{
565 if (!m_pLayout)
566 {
567 return;
568 }
569
571 {
572 ApplyPatternFill(pFrameStyle);
573 }
574 else
575 {
576 ApplyBackColor(pFrameStyle);
577 }
578}
579
586{
587 //set position
588 double fXOffset = 0;
589 double fYOffset = 0;
590 //set anchor type
592
593 LwpLayoutGeometry* pLayoutGeo = m_pLayout->GetGeometry();
594 if (pLayoutGeo)
595 {
596 LwpPoint aPoint = pLayoutGeo->GetOrigin();
597 fXOffset = LwpTools::ConvertFromUnitsToMetric(aPoint.GetX());
598 fYOffset = LwpTools::ConvertFromUnitsToMetric(aPoint.GetY());
599 }
600 //set anchor type
601 eAnchor = enumXFAnchorNone;
603 switch (nType)
604 {
607 {
608 //anchor to page, frame and cell
609 if (m_pLayout->IsAnchorPage()) //in page
610 {
612 if (xContainer.is() && (xContainer->IsHeader() || xContainer->IsFooter()))
613 {
614 eAnchor = enumXFAnchorPara;
615 fYOffset -= xContainer->GetMarginsValue(MARGIN_TOP);
616 }
617 else
618 eAnchor = enumXFAnchorPage;
619 }
620 if (m_pLayout->IsAnchorFrame()) //in frame
621 {
622 eAnchor = enumXFAnchorFrame;
623 }
624 if (m_pLayout->IsAnchorCell()) //in cell
625 {
626 //eAnchor = enumXFAnchorChar;
627 eAnchor = enumXFAnchorPara;
629 LwpMiddleLayout* pContainer = dynamic_cast<LwpMiddleLayout*>(xContainer.get());
630 if (pContainer)
631 {
632 fYOffset -= pContainer->GetMarginsValue(MARGIN_TOP);
633 }
634 }
635 break;
636 }
637 case LwpLayoutRelativityGuts::LAY_PARA_RELATIVE: //same page as text
638 {
639 eAnchor = enumXFAnchorChar;
641 if (xContainer.is() && xContainer->IsPage()) //in page
642 {
643 //eAnchor = enumXFAnchorPage;
644 eAnchor = enumXFAnchorChar; // to character
645 }
646 else if (xContainer.is() && xContainer->IsFrame()) //in frame
647 {
648 eAnchor = enumXFAnchorFrame;
649 }
650 else if (xContainer.is() && xContainer->IsCell()) //in cell
651 {
652 //eAnchor = enumXFAnchorChar;
653 eAnchor = enumXFAnchorPara;
654 fYOffset -= xContainer->GetMarginsValue(MARGIN_TOP);
655 }
656 else if (xContainer.is()
657 && (xContainer->IsHeader() || xContainer->IsFooter())) //in header or footer
658 {
659 eAnchor = enumXFAnchorPara;
660 fYOffset -= xContainer->GetMarginsValue(MARGIN_TOP);
661 }
662 break;
663 }
665 {
666 eAnchor = enumXFAnchorAsChar;
667 sal_Int32 nOffset = m_pLayout->GetBaseLineOffset();
668 if (nOffset > 0 && pLayoutGeo)
669 {
670 //experiential value
671 fYOffset = -(m_pLayout->GetGeometryHeight()
674 }
675 break;
676 }
677 case LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE: //with para above
678 {
679 eAnchor = enumXFAnchorPara;
680 break;
681 }
682 case LwpLayoutRelativityGuts::LAY_INLINE_VERTICAL: //in text - vertical
683 {
684 eAnchor = enumXFAnchorChar;
685 //set vertical position
686 double offset = 0;
687
688 //because of the different feature between Word Pro and SODC, I simulate the vertical base offset
689 //between anchor and frame origin using the font height.
691 if (pFont.is())
692 {
693 offset = static_cast<double>(pFont->GetFontSize()) * CM_PER_INCH / POINTS_PER_INCH;
694 }
695 fYOffset = offset - fYOffset;
696 break;
697 }
698 default:
699 break;
700 }
701
702 pXFFrame->SetX(fXOffset);
703 pXFFrame->SetY(fYOffset);
704 pXFFrame->SetAnchorPage(0);
705 pXFFrame->SetAnchorType(eAnchor);
706}
707
713{
715 LwpVirtualLayout* pParent = xLayout.get();
716 if (!pParent)
717 return false;
718 LwpPoint aPoint = m_pLayout->GetOrigin();
719 double fXOffset = LwpTools::ConvertFromUnitsToMetric(aPoint.GetX());
720 double fWidth = m_pLayout->GetWidth();
721 double fWrapLeft = m_pLayout->GetExtMarginsValue(MARGIN_LEFT);
722 double fWrapRight = m_pLayout->GetExtMarginsValue(MARGIN_RIGHT);
723
724 //LwpPoint aParentPoint = pParent->GetOrigin();
725 //double fParentXOffset = LwpTools::ConvertFromUnitsToMetric(aParentPoint.GetX());
726 double fParentWidth = pParent->GetWidth();
727 if (pParent->IsCell())
728 {
729 //Get actual width of this cell layout
730 fParentWidth = static_cast<LwpCellLayout*>(pParent)->GetActualWidth();
731 }
732 double fParentMarginLeft = pParent->GetMarginsValue(MARGIN_LEFT);
733 double fParentMarginRight = pParent->GetMarginsValue(MARGIN_RIGHT);
734
735 double fLeft = fXOffset - fWrapLeft - fParentMarginLeft;
736 double fRight = fParentWidth - fParentMarginRight - (fXOffset + fWidth + fWrapRight);
737 if (fLeft > fRight)
738 return true;
739 return false;
740}
741
743
749{
752 pStrm->SkipExtra();
753}
754
756 : LwpPlacableLayout(objHdr, pStrm)
757 , m_bGettingMaxWidth(false)
758{
759}
760
762
768{
770 if (LwpFileHeader::m_nFileRevision >= 0x000B)
771 {
772 if (m_pObjStrm->QuickReaduInt16())
773 {
774 m_Link.Read(m_pObjStrm.get());
775 }
776 }
777 m_pObjStrm->SkipExtra();
778}
779
786{
787 if (!m_pFrame)
788 return;
789
790 //parse the frame which anchor to paragraph
791 if (IsRelativeAnchored())
792 {
793 XFConvertFrame(pCont);
794 }
795 else
796 {
797 m_pFrame->XFConvert(pCont);
798 }
799}
806void LwpFrameLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart, sal_Int32 nEnd,
807 bool bAll)
808{
809 if (!m_pFrame)
810 return;
811
813 if (nEnd < nStart)
814 {
815 xXFFrame.set(new XFFrame);
816 }
817 else
818 {
819 xXFFrame.set(new XFFloatFrame(nStart, nEnd, bAll));
820 }
821
822 m_pFrame->Parse(xXFFrame.get(), nStart);
823 //if it is a link frame, parse contents only once
825 {
827 if (content.is())
828 {
829 content->DoXFConvert(xXFFrame.get());
830 //set frame size according to ole size
831 ApplyGraphicSize(xXFFrame.get());
832 }
833 }
834 pCont->Add(xXFFrame.get());
835}
841{
842 //if it is for water mark, don't register style
843 if (IsForWaterMark())
844 return;
845
846 if (m_pFrame)
847 return;
848
849 //register frame style
850 std::unique_ptr<XFFrameStyle> xFrameStyle(new XFFrameStyle);
851 m_pFrame.reset(new LwpFrame(this));
852 m_pFrame->RegisterStyle(xFrameStyle);
853
854 //register content style
856 if (content.is())
857 {
858 content->SetFoundry(m_pFoundry);
859 content->DoRegisterStyle();
860 }
861
862 //register child frame style
864}
865
871{
872 OUString aName;
873 LwpObjectID& rObjectID = m_Link.GetNextLayout();
874 if (!rObjectID.IsNull())
875 {
876 LwpLayout* pLayout = dynamic_cast<LwpLayout*>(rObjectID.obj().get());
877 if (pLayout)
878 {
879 LwpAtomHolder& rHolder = pLayout->GetName();
880 aName = rHolder.str();
881 //for division name conflict
882 if (!pLayout->GetStyleName().isEmpty())
883 aName = pLayout->GetStyleName();
884 }
885 }
886 return aName;
887}
893{
894 LwpObjectID& rObjectID = m_Link.GetPreviousLayout();
895 return !rObjectID.IsNull();
896}
902{
904 {
905 if (m_Content.IsNull())
906 return false;
908 if (!content.is())
909 return false;
910 if (content->GetTag() == VO_GRAPHIC)
911 return true;
912 }
913 return false;
914}
915
921{
922 double fWidth = LwpMiddleLayout::GetWidth();
924 {
925 //for text field entry when choosing maximize field length
926 fWidth = GetMaxWidth();
927 }
928 return fWidth;
929}
930
936{
938 throw std::runtime_error("recursive GetMaxWidth");
939
940 m_bGettingMaxWidth = true;
941 double fActualWidth = 0;
943 LwpMiddleLayout* pParent = dynamic_cast<LwpMiddleLayout*>(xLayout.get());
944 if (pParent)
945 {
946 LwpPoint aPoint = GetOrigin();
947 double fXOffset = LwpTools::ConvertFromUnitsToMetric(aPoint.GetX());
948 double fWrapRight = GetExtMarginsValue(MARGIN_RIGHT);
949
950 //Get parent layout width
951 double fParentWidth = pParent->GetWidth();
952 if (pParent->IsCell())
953 {
954 //Get actual width of this cell layout
955 fParentWidth = static_cast<LwpCellLayout*>(pParent)->GetActualWidth();
956 }
957
958 double fParentMarginRight = 0;
962 {
963 fParentMarginRight = pParent->GetMarginsValue(MARGIN_RIGHT);
964 }
965
966 fActualWidth = fParentWidth - fXOffset - fParentMarginRight - fWrapRight;
967 }
968
969 m_bGettingMaxWidth = false;
970 return fActualWidth;
971}
972
978{
980 if (!(content.is() && (content->GetTag() == VO_GRAPHIC || content->GetTag() == VO_OLEOBJECT)))
981 return;
982
983 LwpGraphicOleObject* pGraOle = static_cast<LwpGraphicOleObject*>(content.get());
984 //Get frame geometry size
985 double fWidth = 0;
986 double fHeight = 0;
987 pGraOle->GetGrafScaledSize(fWidth, fHeight);
988 if (IsFitGraphic())
989 {
990 //graphic scaled sze
993 }
994 else if (IsAutoGrowDown() || IsAutoGrowUp())
995 {
996 fWidth = GetWidth();
998 }
999 else if (IsAutoGrowLeft() || IsAutoGrowRight())
1000 {
1001 fHeight = GetHeight();
1003 }
1004 else
1005 {
1006 fWidth = GetWidth();
1007 fHeight = GetHeight();
1008 }
1009 pXFFrame->SetWidth(fWidth);
1010 pXFFrame->SetHeight(fHeight);
1011}
1012
1014 : LwpPlacableLayout(objHdr, pStrm)
1015{
1016}
1017
1024{
1026 m_pObjStrm->SkipExtra();
1027}
1033{
1034 if (m_pFrame)
1035 return;
1036
1037 //register frame style
1038 std::unique_ptr<XFFrameStyle> xFrameStyle(new XFFrameStyle);
1039 m_pFrame.reset(new LwpFrame(this));
1040 m_pFrame->RegisterStyle(xFrameStyle);
1041
1042 //register child frame style
1044}
1051{
1052 if (!m_pFrame)
1053 return;
1054
1055 //parse the frame which anchor to paragraph
1056 if (IsRelativeAnchored())
1057 {
1058 XFConvertFrame(pCont);
1059 }
1060 else
1061 {
1062 m_pFrame->XFConvert(pCont);
1063 }
1064}
1071void LwpGroupLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart, sal_Int32 nEnd,
1072 bool bAll)
1073{
1074 if (!m_pFrame)
1075 return;
1076
1077 rtl::Reference<XFFrame> xXFFrame;
1078 if (nEnd < nStart)
1079 {
1080 xXFFrame.set(new XFFrame);
1081 }
1082 else
1083 {
1084 xXFFrame.set(new XFFloatFrame(nStart, nEnd, bAll));
1085 }
1086
1087 m_pFrame->Parse(xXFFrame.get(), nStart);
1088
1089 //add child frame into group
1090 LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get());
1091
1092 while (pLayout && pLayout != this)
1093 {
1094 pLayout->DoXFConvert(xXFFrame.get());
1095 pLayout = dynamic_cast<LwpVirtualLayout*>(pLayout->GetNext().obj().get());
1096 }
1097
1098 pCont->Add(xXFFrame.get());
1099}
1100
1102 : LwpContent(objHdr, pStrm)
1103{
1104}
1105
1107
1109{
1111 m_pObjStrm->SkipExtra();
1112}
1113
1115
1117
1119 : LwpFrameLayout(objHdr, pStrm)
1120 , m_nLines(3)
1121 , m_nChars(1)
1122{
1123}
1124
1126{
1128 m_nLines = m_pObjStrm->QuickReaduInt16();
1129 m_pObjStrm->SeekRel(1);
1130 m_pObjStrm->SkipExtra();
1131}
1132
1134{
1135 LwpStory* pStory = static_cast<LwpStory*>(m_Content.obj(VO_STORY).get());
1136 if (!pStory)
1137 return;
1139 if (pPara.is())
1140 {
1141 pPara->SetFoundry(m_pFoundry);
1142 pPara->DoParse(pOutputStream);
1143 }
1144}
1145
1147{
1148 LwpStory* pStory = static_cast<LwpStory*>(m_Content.obj(VO_STORY).get());
1149 if (pStory)
1150 {
1151 pStory->SetFoundry(m_pFoundry);
1152 pStory->XFConvert(pCont);
1153 }
1154}
1155
1157{
1158 LwpStory* pStory = dynamic_cast<LwpStory*>(m_Content.obj(VO_STORY).get());
1159 if (pStory)
1160 {
1161 pStory->SetDropcapFlag(true);
1162 pStory->SetFoundry(pFoundry);
1163 LwpPara* pPara = dynamic_cast<LwpPara*>(pStory->GetFirstPara().obj().get());
1164 while (pPara)
1165 {
1166 pPara->SetFoundry(pFoundry);
1167 pPara->RegisterStyle();
1168 pPara = dynamic_cast<LwpPara*>(pPara->GetNext().obj().get());
1169 }
1170 }
1171}
1172
1178
1180 : LwpFrameLayout(objHdr, pStrm)
1181 , m_nPlacement(0)
1182 , m_nAlignment(0)
1183 , m_nStateFlag(0)
1184 , m_nXOffset(0)
1185 , m_nYOffset(0)
1186{
1187}
1188
1190{
1192 m_nPlacement = m_pObjStrm->QuickReaduInt8();
1193 m_nAlignment = m_pObjStrm->QuickReaduInt8();
1194 m_nStateFlag = m_pObjStrm->QuickReaduInt16();
1195 m_nXOffset = m_pObjStrm->QuickReadInt32();
1196 m_nYOffset = m_pObjStrm->QuickReadInt32();
1198 m_pObjStrm->SkipExtra();
1199}
1200
1202{
1203 return static_cast<LwpRubyMarker*>(m_objRubyMarker.obj(VO_RUBYMARKER).get());
1204}
1205
1207{
1208 return static_cast<LwpStory*>(m_Content.obj(VO_STORY).get());
1209}
1210
1212{
1213 LwpStory* pStory = GetContentStory();
1214 LwpRubyMarker* pMarker = GetMarker();
1215 if (pStory && pMarker)
1216 pMarker->SetRubyText(pStory->GetContentText(true));
1217}
1218
1220{
1221 LwpRubyMarker* pMarker = GetMarker();
1222 if (!pMarker)
1223 throw std::runtime_error("missing Ruby Marker");
1224
1225 std::unique_ptr<XFRubyStyle> xRubyStyle(new XFRubyStyle);
1226
1228 if (m_nAlignment == LEFT)
1229 {
1231 }
1232 else if (m_nAlignment == RIGHT)
1233 {
1235 }
1236 else if (m_nAlignment == CENTER)
1237 {
1239 }
1240 xRubyStyle->SetAlignment(eType);
1241
1243 if (m_nPlacement == TOP)
1244 {
1246 }
1247 else if (m_nPlacement == BOTTOM)
1248 {
1250 }
1251 xRubyStyle->SetPosition(eType);
1252
1254 OUString rubyStyle = pXFStyleManager->AddStyle(std::move(xRubyStyle)).m_pStyle->GetStyleName();
1255 pMarker->SetRubyStyleName(rubyStyle);
1256
1257 LwpStory* pStory = GetContentStory();
1258 pStory->SetFoundry(m_pFoundry);
1259 OUString textStyle = pStory->RegisterFirstFribStyle();
1260 pMarker->SetTextStyleName(textStyle);
1261}
1262
1263/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Stream wrapper for sax writer.
Definition: ixfstream.hxx:72
virtual OUString GetStyleName()=0
@descr: return the style name.
AtomHolder class of Word Pro to hold a string.
const OUString & str() const
VO_CELLLAYOUT object.
lwpcolor class (red, green, blue, extra)
Definition: lwpcolor.hxx:71
sal_uInt32 To24Color()
@descr return the BGR format
Definition: lwpcolor.cxx:66
Base class of all Lwp content objects.
Definition: lwpcontent.hxx:74
void Read() override
@descr default read function
Definition: lwpcontent.cxx:81
LwpObjectID & GetChildHead()
Definition: lwpdlvlist.hxx:109
LwpAtomHolder & GetName()
Definition: lwpdlvlist.hxx:108
LwpObjectID & GetNext()
Definition: lwpdlvlist.hxx:75
void RegisterStyle() override
@descr do nothing
LwpDropcapLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
void Read() override
@descr read frame layout object
virtual void XFConvert(XFContentContainer *pCont) override
@descr create a xfframe and add into content container
static sal_uInt16 m_nFileRevision
Definition: lwpfilehdr.hxx:77
VO_FRAMELAYOUT object.
virtual void XFConvert(XFContentContainer *pCont) override
@descr create a xfframe and add into content container
LwpFrameLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void Read() override
@descr read frame layout object
LwpFrameLink m_Link
bool IsForWaterMark() override
@descr whether current frame is for water mark.
double GetWidth() override
@descr Get frame width
double GetMaxWidth()
@descr Get frame width when the text field chooses maximize field length
void XFConvertFrame(XFContentContainer *pCont, sal_Int32 nStart=0, sal_Int32 nEnd=0, bool bAll=false) override
@descr create a xfframe and add into content container, called by XFConvert
virtual ~LwpFrameLayout() override
OUString GetNextLinkName()
@descr get the name of the frame that current frame links
void ApplyGraphicSize(XFFrame *pXFFrame)
@descr Set frame size according to graphic size
bool HasPreviousLinkLayout()
@descr whether current frame is linked by other frame
std::unique_ptr< LwpFrame > m_pFrame
virtual void RegisterStyle() override
@descr register frame style
For register frame style and parse frame.
LwpPlacableLayout * m_pLayout
void ParseAnchorType(XFFrame *pXFFrame)
@descr: set frame size, anchor type, anchored page number
void ApplyWrapType(XFFrameStyle *pFrameStyle)
@descr: set frame wrap type style
void ApplyProtect(XFFrameStyle *pFrameStyle)
@descr: set frame protect style
void XFConvert(XFContentContainer *pCont)
@descr: parse frame relative to page, frame or cell
void Parse(XFFrame *pXFFrame, sal_Int32 nPageNo)
@descr: parse frame and set frame properties
void ApplyBackGround(XFFrameStyle *pFrameStyle)
Apply background to frame style.
void ApplyBackColor(XFFrameStyle *pFrameStyle)
@descr: set frame back color style
void RegisterStyle(std::unique_ptr< XFFrameStyle > &rFrameStyle)
@descr: parse frame
void ApplyPosType(XFFrameStyle *pFrameStyle)
@descr: set frame position type style
void ApplyPadding(XFFrameStyle *pFrameStyle)
@descr: set padding border style
void ApplyShadow(XFFrameStyle *pFrameStyle)
@descr: set frame shadow style
bool IsLeftWider()
@descr Calculate the distance between the frame object and the page margins.
OUString m_StyleName
void ApplyWatermark(XFFrameStyle *pFrameStyle)
@descr: set frame watermark style
LwpFrame(LwpPlacableLayout *pLayout)
void ApplyMargins(XFFrameStyle *pFrameStyle)
@descr: set frame margins style
void ApplyBorders(XFFrameStyle *pFrameStyle)
@descr: set frame border style
void ApplyPatternFill(XFFrameStyle *pFrameStyle)
Apply pattern fill to frame style.
void ApplyColumns(XFFrameStyle *pFrameStyle)
@descr: set frame columns style
void ApplyTextDir(XFFrameStyle *pFrameStyle)
@descr: set frame text direction style
XFStyleManager * GetXFStyleManager()
static LwpGlobalMgr * GetInstance(LwpSvStream *pSvStream=nullptr)
@descr super class of LwpOleObject and LwpGraphicObject
void GetGrafScaledSize(double &fWidth, double &fHeight)
LwpGroupFrame(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
virtual ~LwpGroupFrame() override
virtual void XFConvert(XFContentContainer *pCont) override
@descr default XFConvert function pCont is the XFContentContainer for the object conversion
void Read() override
@descr default read function
virtual void RegisterStyle() override
@descr default register style function
void XFConvertFrame(XFContentContainer *pCont, sal_Int32 nStart=0, sal_Int32 nEnd=0, bool bAll=false) override
@descr create a xfframe and add into content container, called by XFConvert
virtual ~LwpGroupLayout() override
virtual void XFConvert(XFContentContainer *pCont) override
@descr create a xfframe and add into content container
void Read() override
@descr read group layout object
virtual void RegisterStyle() override
@descr register group frame style
LwpGroupLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
std::unique_ptr< LwpFrame > m_pFrame
const LwpPoint & GetOrigin() const
Definition: lwplaypiece.hxx:87
virtual bool IsUseOnPage() override
@descr: Whether it is use on current page
Definition: lwplayout.cxx:1810
virtual bool IsUseOnAllOddPages() override
@descr: Whether it is use on all odd pages
Definition: lwplayout.cxx:1785
virtual bool IsUseOnAllEvenPages() override
@descr: Whether it is use on all even pages
Definition: lwplayout.cxx:1760
XFShadow * GetXFShadow()
@descr: create xfshadow
Definition: lwplayout.cxx:1860
virtual rtl::Reference< LwpVirtualLayout > GetContainerLayout() override
@descr get the layout that containers the current frame layout
Definition: lwplayout.cxx:1909
virtual bool IsUseOnAllPages() override
@descr: Whether it is use on all pages
Definition: lwplayout.cxx:1735
XFColumns * GetXFColumns()
@descr: Create and return XFColumns object
Definition: lwplayout.cxx:1570
sal_uInt16 GetUsePage()
@descr: Get use page
Definition: lwplayout.cxx:1689
LwpObjectID & GetContent()
Definition: lwplayout.hxx:415
virtual bool IsAutoGrow() override
@descr: Whether the height and width of layout is auto grow
Definition: lwplayout.cxx:1124
rtl::Reference< LwpVirtualLayout > GetWaterMarkLayout()
@descr: Get watermark layout
Definition: lwplayout.cxx:1356
std::unique_ptr< XFBorders > GetXFBorders()
@descr: create xfborder.
Definition: lwplayout.cxx:834
std::unique_ptr< XFBGImage > GetXFBGImage()
@descr: Create and return xfbgimage object for watermark
Definition: lwplayout.cxx:1381
virtual bool IsAutoGrowUp() override
@descr: Whether the height of layout is auto grow up
Definition: lwplayout.cxx:1169
enumXFTextDir GetTextDirection()
@descr: Get text direction settings.
Definition: lwplayout.cxx:860
virtual bool IsAutoGrowLeft() override
@descr: Whether the height of layout is auto grow down
Definition: lwplayout.cxx:1198
virtual double GetWidth() override
@descr: Get layout height
Definition: lwplayout.cxx:1067
LwpObjectID m_Content
Definition: lwplayout.hxx:401
virtual bool IsAutoGrowDown() override
@descr: Whether the height of layout is auto grow down
Definition: lwplayout.cxx:1148
std::unique_ptr< XFBGImage > GetFillPattern()
@descr: Get the fill pattern style.
Definition: lwplayout.cxx:1109
LwpPoint GetOrigin()
@descr: Get layout origin point
Definition: lwplayout.cxx:1072
virtual bool IsAutoGrowRight() override
@descr: Whether the height of layout is auto grow down
Definition: lwplayout.cxx:1219
bool IsPatternFill()
@descr: Whether the fill is pattern fill or not
Definition: lwplayout.cxx:1094
LwpBackgroundStuff * GetBackgroundStuff()
@descr: Get LwpBackgroundStuff object according to m_LayBackgroundStuff id;
Definition: lwplayout.cxx:804
LwpColor * GetBackColor()
@descr: Get background color.
Definition: lwplayout.cxx:894
LwpLayoutGeometry * GetGeometry()
@descr: Get the geometry of current layout
Definition: lwplayout.cxx:634
double GetGeometryHeight()
@descr: Get layout height, measured by "cm"
Definition: lwplayout.cxx:662
virtual double GetHeight()
@descr: Get layout height
Definition: lwplayout.cxx:1061
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
stream class for LwpObject body data provide stream like interface to read object data
Definition: lwpobjstrm.hxx:77
void SkipExtra()
@descr skip extra bytes
Definition: lwpobjstrm.cxx:258
void SetFoundry(LwpFoundry *pFoundry)
Definition: lwpobj.hxx:137
LwpFoundry * m_pFoundry
Definition: lwpobj.hxx:91
std::unique_ptr< LwpObjectStream > m_pObjStrm
Definition: lwpobj.hxx:90
void DoXFConvert(XFContentContainer *pCont)
Definition: lwpobj.hxx:127
void RegisterStyle() override
register paragraph style
Definition: lwppara.cxx:273
virtual sal_uInt8 GetRelativeType() override
@descr: Get relative type
Definition: lwplayout.cxx:2033
virtual bool IsAnchorFrame() override
@descr: whether the parent layout is frame layout
Definition: lwplayout.cxx:2090
virtual bool IsAnchorPage() override
@descr: whether the parent layout is page layout
Definition: lwplayout.cxx:2078
sal_Int32 GetBaseLineOffset()
@descr: Get offset from the baseline
Definition: lwplayout.cxx:2046
virtual bool IsAnchorCell() override
@descr: whether the parent layout is cell layout
Definition: lwplayout.cxx:2102
virtual void XFConvertFrame(XFContentContainer *, sal_Int32=0, sal_Int32=0, bool=false)
Definition: lwplayout.hxx:476
sal_uInt8 m_nBuoyancy
Definition: lwplayout.hxx:502
void Read() override
@descr Read name of LwpDLNFVList from object stream
Definition: lwplayout.cxx:1936
sal_uInt8 GetWrapType()
@descr: get wrap type
Definition: lwplayout.cxx:1981
const rtl::Reference< XFFont > & GetFont() const
@descr: Get font style for setting position of frame
Definition: lwplayout.hxx:481
point class
sal_Int32 GetY() const
sal_Int32 GetX() const
LwpStory * GetContentStory()
sal_Int32 m_nYOffset
void Read() override
@descr read frame layout object
LwpRubyMarker * GetMarker()
sal_uInt16 m_nStateFlag
void RegisterStyle() override
@descr register frame style
sal_uInt8 m_nAlignment
sal_uInt8 m_nPlacement
sal_Int32 m_nXOffset
LwpObjectID m_objRubyMarker
LwpRubyLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void SetRubyStyleName(const OUString &sName)
Definition: lwpmarker.hxx:256
void SetRubyText(const OUString &sText)
Definition: lwpmarker.hxx:252
void SetTextStyleName(const OUString &sName)
Definition: lwpmarker.hxx:254
virtual void XFConvert(XFContentContainer *pCont) override
@descr default XFConvert function pCont is the XFContentContainer for the object conversion
Definition: lwpstory.cxx:101
void SetDropcapFlag(bool bFlag)
Definition: lwpstory.hxx:148
OUString RegisterFirstFribStyle()
Definition: lwpstory.cxx:449
LwpObjectID & GetFirstPara()
Definition: lwpstory.hxx:139
OUString GetContentText(bool bAllText=false)
Definition: lwpstory.cxx:419
encapsulate XInputStream to provide SvStream like interfaces
Definition: lwpsvstream.hxx:69
static bool IsOddNumber(sal_uInt16 nNumber)
Definition: lwptools.hxx:122
static double ConvertFromUnitsToMetric(sal_Int32 nUnits)
Definition: lwptools.hxx:117
static bool IsEvenNumber(sal_uInt16 nNumber)
Definition: lwptools.hxx:126
bool IsFrame()
@descr: Whether this layout is frame layout or not
Definition: lwplayout.cxx:267
bool IsInlineToMargin() const
@descr: Determine whether the layout width is to margin
Definition: lwplayout.cxx:416
bool IsRelativeAnchored()
@descr: whether it is relative anchored layout
Definition: lwplayout.cxx:295
rtl::Reference< LwpVirtualLayout > GetParentLayout()
@descr: Get parent layout
Definition: lwplayout.cxx:317
void SetStyleName(const OUString &str)
Definition: lwplayout.hxx:212
virtual double GetWidth()
Definition: lwplayout.hxx:213
const OUString & GetStyleName() const
Definition: lwplayout.hxx:171
bool IsMinimumHeight() const
@descr: whether it is MinimumHeight layout
Definition: lwplayout.cxx:308
bool IsFitGraphic()
@descr: Whether the size of layout is fit the graphic
Definition: lwplayout.cxx:401
bool GetIsProtected()
Definition: lwplayout.hxx:126
double GetExtMarginsValue(sal_uInt8 nWhichSide)
Definition: lwplayout.hxx:162
bool IsGroupHead()
@descr: Whether this layout is group layout or not
Definition: lwplayout.cxx:284
bool IsAutoGrowWidth()
@descr: Whether the width of layout is auto grow
Definition: lwplayout.cxx:410
void RegisterChildStyle()
@descr: Register child layout style
Definition: lwplayout.cxx:327
double GetMarginsValue(sal_uInt8 nWhichSide)
Definition: lwplayout.hxx:153
bool IsCell()
@descr: Whether this layout is cell layout or not
Definition: lwplayout.cxx:272
Color object.
Definition: xfcolor.hxx:70
A container for content.
virtual void Add(XFContent *pContent)
@descr Add content.
virtual void SetStyleName(const OUString &style)
: All content except XFTextContent can have a style.
Definition: xfcontent.hxx:90
Floating frame on any page.
Style for all frame objects.
void SetYPosType(enumXFFrameYPos pos, enumXFFrameYRel rel)
@descr Set vertical position type.
void SetTransparency(sal_Int16 nTransparency)
void SetTextDir(enumXFTextDir dir)
@descr Set text dir.
void SetMargins(double left, double right, double top, double bottom)
@descr: space between frame and paragraph text.
void SetColumns(XFColumns *pColumns)
@descr: set the column property of the frame.
void SetWrapType(enumXFWrap wrap)
void SetProtect(bool content, bool size, bool pos)
@descr Set whether frame is protected.
void SetXPosType(enumXFFrameXPos pos, enumXFFrameXRel rel)
@descr Set horizontal position type.
void SetBackColor(XFColor const &color)
@descr: set the background color of the frame.
void SetShadow(XFShadow *pShadow)
@descr: set the shadow object the frame.
void SetBorders(std::unique_ptr< XFBorders > pBorders)
@descr: set the border property of the frame.
void SetBackImage(std::unique_ptr< XFBGImage > &rImage)
@descr: set the background image of the frame.
void SetPadding(double left, double right, double top, double bottom)
@descr: space between frame and text inside frame.
Base class for all frame object,include drawing,image,text-box.
Definition: xfframe.hxx:79
void SetWidth(double width)
@descr Set frame width.
Definition: xfframe.hxx:208
void SetHeight(double height)
@descr Set frame height.
Definition: xfframe.hxx:213
void SetName(const OUString &name)
@descr Set frame name.
Definition: xfframe.hxx:193
void SetY(double y)
@descr Set frame position Y.
Definition: xfframe.hxx:203
void SetAnchorPage(sal_Int32 page)
@descr: if it's page anchor,set the page number.
Definition: xfframe.hxx:244
void SetAnchorType(enumXFAnchor type)
@descr: Set the anchor type for the frame object.
Definition: xfframe.hxx:188
void SetMinHeight(double minHeight)
@descr Set frame min-height.
Definition: xfframe.hxx:220
void SetX(double x)
@descr Set frame position X.
Definition: xfframe.hxx:198
void SetNextLink(const OUString &next)
@descr: Link the text content of the two frame.
Definition: xfframe.hxx:239
Shadow object.
Definition: xfshadow.hxx:72
Style manager for the filter.
IXFStyleRet AddStyle(std::unique_ptr< IXFStyle > pStyle)
DocumentType eType
OUString aName
For LWP filter architecture prototype - cell layouts.
@ VO_OLEOBJECT
Definition: lwpdefs.hxx:125
@ VO_PARA
Definition: lwpdefs.hxx:70
@ VO_GRAPHIC
Definition: lwpdefs.hxx:99
@ VO_RUBYMARKER
Definition: lwpdefs.hxx:197
@ VO_STORY
Definition: lwpdefs.hxx:72
#define LAST_LAYOUTPAGENO
Definition: lwplayout.hxx:88
#define FIRST_LAYOUTPAGENO
Definition: lwplayout.hxx:87
#define LAY_BUOYLAYER
Definition: lwplayout.hxx:91
const sal_uInt8 MARGIN_BOTTOM
Definition: lwpmargins.hxx:66
const sal_uInt8 MARGIN_RIGHT
Definition: lwpmargins.hxx:64
const sal_uInt8 MARGIN_TOP
Definition: lwpmargins.hxx:65
const sal_uInt8 MARGIN_LEFT
Definition: lwpmargins.hxx:63
For LWP filter architecture prototype - OLE object.
const double CM_PER_INCH
Definition: lwptools.hxx:76
const double POINTS_PER_INCH
Definition: lwptools.hxx:79
constexpr OUStringLiteral first
QPRO_FUNC_TYPE nType
IXFStyle * m_pStyle
Definition: xfstylecont.hxx:71
unsigned char sal_uInt8
enumXFWrap
Definition: xfdefs.hxx:266
@ enumXFWrapBest
Definition: xfdefs.hxx:272
@ enumXFWrapNone
Definition: xfdefs.hxx:267
@ enumXFWrapLeft
Definition: xfdefs.hxx:268
@ enumXFWrapRunThrough
Definition: xfdefs.hxx:271
@ enumXFWrapRight
Definition: xfdefs.hxx:269
@ enumXFWrapParallel
Definition: xfdefs.hxx:270
enumXFFrameYPos
Definition: xfdefs.hxx:329
@ enumXFFrameYPosFromTop
Definition: xfdefs.hxx:333
@ enumXFFrameYPosMiddle
Definition: xfdefs.hxx:331
@ enumXFFrameYPosTop
Definition: xfdefs.hxx:330
@ enumXFFrameYPosBottom
Definition: xfdefs.hxx:332
@ enumXFFrameYPosBelow
Definition: xfdefs.hxx:334
enumXFFrameYRel
Definition: xfdefs.hxx:315
@ enumXFFrameYRelPage
Definition: xfdefs.hxx:321
@ enumXFFrameYRelChar
Definition: xfdefs.hxx:317
@ enumXFFrameYRelParaContent
Definition: xfdefs.hxx:324
@ enumXFFrameYRelPara
Definition: xfdefs.hxx:323
@ enumXFFrameYRelBaseLine
Definition: xfdefs.hxx:316
enumXFFrameXPos
Definition: xfdefs.hxx:307
@ enumXFFrameXPosCenter
Definition: xfdefs.hxx:310
@ enumXFFrameXPosFromLeft
Definition: xfdefs.hxx:311
enumXFRubyPosition
Definition: xfdefs.hxx:464
@ enumXFRubyRight
Definition: xfdefs.hxx:466
@ enumXFRubyLeft
Definition: xfdefs.hxx:465
@ enumXFRubyTop
Definition: xfdefs.hxx:468
@ enumXFRubyBottom
Definition: xfdefs.hxx:469
@ enumXFRubyCenter
Definition: xfdefs.hxx:467
enumXFAnchor
Definition: xfdefs.hxx:256
@ enumXFAnchorAsChar
Definition: xfdefs.hxx:261
@ enumXFAnchorChar
Definition: xfdefs.hxx:260
@ enumXFAnchorPara
Definition: xfdefs.hxx:258
@ enumXFAnchorPage
Definition: xfdefs.hxx:259
@ enumXFAnchorFrame
Definition: xfdefs.hxx:262
@ enumXFAnchorNone
Definition: xfdefs.hxx:257
enumXFFrameXRel
Definition: xfdefs.hxx:290
@ enumXFFrameXRelPage
Definition: xfdefs.hxx:291
@ enumXFFrameXRelPara
Definition: xfdefs.hxx:295
@ enumXFFrameXRelParaContent
Definition: xfdefs.hxx:296