1 /*************************************************************************
3 * The Contents of this file are made available subject to the terms of
4 * either of the following licenses
6 * - GNU Lesser General Public License Version 2.1
7 * - Sun Industry Standards Source License Version 1.1
9 * Sun Microsystems Inc., October, 2000
11 * GNU Lesser General Public License Version 2.1
12 * =============================================
13 * Copyright 2000 by Sun Microsystems, Inc.
14 * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License version 2.1, as published by the Free Software Foundation.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
31 * Sun Industry Standards Source License Version 1.1
32 * =================================================
33 * The contents of this file are subject to the Sun Industry Standards
34 * Source License Version 1.1 (the "License"); You may not use this file
35 * except in compliance with the License. You may obtain a copy of the
36 * License at http://www.openoffice.org/license.html.
38 * Software provided under this License is provided on an "AS IS" basis,
39 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
40 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
41 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
42 * See the License for the specific provisions governing your rights and
43 * obligations concerning the Software.
45 * The Initial Developer of the Original Code is: IBM Corporation
47 * Copyright: 2008 by IBM Corporation
49 * All Rights Reserved.
51 * Contributor(s): _______________________________________
54 ************************************************************************/
57 * For LWP filter architecture prototype - cell layouts
59 /*************************************************************************
62 ************************************************************************/
63 #include "lwpcelllayout.hxx"
64 #include "lwpfoundry.hxx"
65 #include "lwpobjfactory.hxx"
66 #include "lwptblcell.hxx"
67 #include "lwptblformula.hxx"
68 #include "lwpholder.hxx"
69 #include "lwpnumericfmt.hxx"
70 #include "lwptable.hxx"
71 #include "lwpglobalmgr.hxx"
73 #include "xfilter/xfstylemanager.hxx"
74 #include "xfilter/xfcell.hxx"
75 #include "xfilter/xfcellstyle.hxx"
76 #include "xfilter/xfcolstyle.hxx"
78 LwpCellLayout::LwpCellLayout(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
)
79 : LwpMiddleLayout(objHdr
, pStrm
)
82 LwpCellLayout::~LwpCellLayout()
86 * @short Get table layout pointer, if default cell layout, return NULL
87 * @param LwpTableLayout *
90 LwpTableLayout
* LwpCellLayout::GetTableLayout()
92 LwpRowLayout
* pRow
= static_cast<LwpRowLayout
*>(GetParent()->obj());
97 LwpTableLayout
* pTableLayout
= pRow
->GetParentTableLayout();
101 * @short Get table pointer, if default cell layout, return NULL
105 LwpTable
* LwpCellLayout::GetTable()
107 LwpTableLayout
* pTableLayout
= GetTableLayout();
112 LwpTable
*pTable
= pTableLayout
->GetTable();
116 * @short Set current cell layout to cell layout map
120 void LwpCellLayout::SetCellMap()
122 // this function is called from LwpTableLayout, so it can't be NULL
123 GetTableLayout()->SetWordProCellMap(crowid
, ccolid
, this);
126 * @short Get actual width of this cell layout
130 double LwpCellLayout::GetActualWidth()
133 LwpTableLayout
* pTableLayout
= GetTableLayout();
135 if (pTableLayout
== NULL
)
137 return GetGeometryWidth();
140 OUString strColStyle
= pTableLayout
->GetColumnWidth(ccolid
);
142 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
143 XFColStyle
*pStyle
= static_cast<XFColStyle
*>(pXFStyleManager
->FindStyle(strColStyle
));
146 return pStyle
->GetWidth();
149 return GetGeometryWidth();
153 * @short Apply padding to cell style
154 * @param pCellStyle - pointer of XFCellStyle
157 void LwpCellLayout::ApplyPadding(XFCellStyle
*pCellStyle
)
159 double fLeft
= GetMarginsValue(MARGIN_LEFT
);
160 double fRight
= GetMarginsValue(MARGIN_RIGHT
);
161 double fTop
= GetMarginsValue(MARGIN_TOP
);
162 double fBottom
= GetMarginsValue(MARGIN_BOTTOM
);
163 pCellStyle
->SetPadding((float)fLeft
,(float)fRight
,(float)fTop
,(float)fBottom
);
166 * @short Apply border to cell style according to cell position, default cell layout won't use this function
168 * @return pCellStyle - pointer of XFCellStyle
170 void LwpCellLayout::ApplyBorders(XFCellStyle
*pCellStyle
)
172 // judge cell border type
173 LwpCellBorderType eType
= GetCellBorderType(crowid
, ccolid
, GetTableLayout());
175 // get left cell and judge if neighbour border is different
176 XFBorders
* pBorders
= GetXFBorders();
184 case enumNoBottomBorder
:
185 pBorders
->SetWidth(enumXFBorderBottom
, 0);
187 case enumNoLeftBorder
:
188 pBorders
->SetWidth(enumXFBorderLeft
, 0);
190 case enumNoLeftNoBottomBorder
:
191 pBorders
->SetWidth(enumXFBorderBottom
, 0);
192 pBorders
->SetWidth(enumXFBorderLeft
, 0);
194 case enumWholeBorder
:
199 pCellStyle
->SetBorders(pBorders
);
202 * @short Apply watermark to cell style
203 * @param pCellStyle - pointer of XFCellStyle
206 void LwpCellLayout::ApplyWatermark(XFCellStyle
*pCellStyle
)
208 XFBGImage
* pBGImage
= GetXFBGImage();
211 pCellStyle
->SetBackImage(pBGImage
);
216 * @short Apply pattern fill to cell style
217 * @param pCellStyle - pointer of XFCellStyle
220 void LwpCellLayout::ApplyPatternFill(XFCellStyle
* pCellStyle
)
222 XFBGImage
* pXFBGImage
= this->GetFillPattern();
225 pCellStyle
->SetBackImage(pXFBGImage
);
230 * @short Apply background to cell style
231 * @param pCellStyle - pointer of XFCellStyle
234 void LwpCellLayout::ApplyBackGround(XFCellStyle
* pCellStyle
)
236 if (this->IsPatternFill())
238 ApplyPatternFill(pCellStyle
);
242 ApplyBackColor(pCellStyle
);
246 * @short Apply back color to cell style
247 * @param pCellStyle - pointer of XFCellStyle
250 void LwpCellLayout::ApplyBackColor(XFCellStyle
*pCellStyle
)
252 LwpColor
* pColor
= GetBackColor();
253 if(pColor
&& pColor
->IsValidColor())
255 XFColor
aXFColor(pColor
->To24Color());
256 pCellStyle
->SetBackColor(aXFColor
);
260 * @short register style of cell layout
261 * @param pCellStyle The style of the cell, which would be applied to the cell.
264 void LwpCellLayout::ApplyFmtStyle(XFCellStyle
*pCellStyle
)
266 LwpLayoutNumerics
* pLayoutNumerics
=(LwpLayoutNumerics
*)cLayNumerics
.obj();
267 if (!pLayoutNumerics
)
269 // if current layout doesn't have format, go to based on layout
270 LwpCellLayout
* pCellLayout
= (LwpCellLayout
*)m_BasedOnStyle
.obj();
273 pLayoutNumerics
= (LwpLayoutNumerics
*)pCellLayout
->GetNumericsObject()->obj();
277 // apply format style
280 XFStyle
* pStyle
= pLayoutNumerics
->Convert();
283 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
284 m_NumfmtName
= pXFStyleManager
->AddStyle(pStyle
)->GetStyleName();
285 pCellStyle
->SetDataStyle(m_NumfmtName
);//modified by ,2005/11/30
292 * @short get style name according to cell position, only table default cells use this function
293 * @param nRow - default cell position row number
294 * @param nCol - default cell position col number
295 * @return OUString - registered cell style name
297 OUString
LwpCellLayout::GetCellStyleName(sal_uInt16 nRow
, sal_uInt16 nCol
, LwpTableLayout
* pTableLayout
)
299 // judge cell border type
300 LwpCellBorderType eType
= GetCellBorderType(nRow
, nCol
, pTableLayout
);
301 return m_CellStyleNames
[eType
];
306 * @param aTableID - ID of the table which this cell belongs to
307 * @param bIsTopRow - whether current cell is top row
308 * @param bIsRightCol - whether current cell is the rightest column
311 XFCell
* LwpCellLayout::ConvertCell(LwpObjectID aTableID
, sal_uInt16 nRow
, sal_uInt16 nCol
)
313 // if cell layout is aTableID's default cell layout
314 // it can't have any content, bypass these code
315 LwpTable
* pTable
= static_cast<LwpTable
*>(aTableID
.obj());
321 XFCell
* pXFCell
= new XFCell();
322 OUString aStyleName
= m_StyleName
;
324 // if cell layout is aTableID's default cell layout
325 // we should judt its style by current positon
326 if (*pTable
->GetDefaultCellStyle() == *GetObjectID())
328 aStyleName
= GetCellStyleName(nRow
, nCol
, pTable
->GetTableLayout());
332 LwpStory
* pStory
=(LwpStory
*) m_Content
.obj();
335 pStory
->XFConvert(pXFCell
);
338 ApplyProtect(pXFCell
, aTableID
);
339 pXFCell
->SetStyleName(aStyleName
);
343 LwpPara
* LwpCellLayout::GetLastParaOfPreviousStory()
345 LwpObjectID
* pPreStoryID
= this->GetPreviousCellStory();
346 if (pPreStoryID
&& !(pPreStoryID
->IsNull()))
348 LwpStory
* pPreStory
= static_cast<LwpStory
*>(pPreStoryID
->obj(VO_STORY
));
349 return static_cast<LwpPara
*>(pPreStory
->GetLastPara()->obj(VO_PARA
));
358 * @short Get previous cell which used for bullet inside cell
360 * @return LwpObjectID * - object ID of cell content story
362 LwpObjectID
* LwpCellLayout::GetPreviousCellStory()
364 LwpTable
*pTable
= GetTable();
370 sal_uInt16 nRow
= crowid
;
371 sal_uInt16 nCol
= ccolid
;
373 // if table is reset paragraph in columns, get cell on the top side of current cell
374 if (pTable
->IsNumberDown())
384 // if not, get cell on the left side of current cell
394 nCol
= pTable
->GetColumn() - 1;
403 // get the object id pointer of previous cell story
404 LwpTableLayout
* pTableLayout
= GetTableLayout();
410 return pTableLayout
->SearchCellStoryMap(nRow
, nCol
);
414 * @short judge border type by cell neighbour
417 * @param pTableLayout
418 * @return LwpCellBorderType
420 LwpCellBorderType
LwpCellLayout::GetCellBorderType(sal_uInt16 nRow
, sal_uInt16 nCol
, LwpTableLayout
* pTableLayout
)
425 return enumWholeBorder
;
428 // get left cell and judge if neighbour border is different
429 XFBorders
* pBorders
= GetXFBorders();
432 return enumWholeBorder
;
434 XFBorder
*pLeftBorder
= pBorders
->GetLeft();
435 XFBorder
*pBottomBorder
= pBorders
->GetBottom();
436 sal_Bool bNoLeftBorder
= sal_False
;
437 sal_Bool bNoBottomBorder
= sal_False
;
439 LwpCellLayout
* pLeftNeighbour
= GetCellByRowCol(nRow
, GetLeftColID(nCol
), pTableLayout
);
442 XFBorders
* pNeighbourBorders
= pLeftNeighbour
->GetXFBorders();
443 if (pNeighbourBorders
)
445 XFBorder
* pRightBorder
= pNeighbourBorders
->GetRight();
446 if (*pLeftBorder
== *pRightBorder
)
448 // for these 2 types cell, left border should be ignored for sake of avoiding duplication border
449 // but if left border is different with right border of left cell
450 // we should not ignored it
451 bNoLeftBorder
= sal_True
;
453 delete pNeighbourBorders
;
458 LwpCellLayout
* pBelowNeighbour
= GetCellByRowCol(GetBelowRowID(nRow
), nCol
, pTableLayout
);
459 if (pBelowNeighbour
) //&& (eType == enumRightNotLastCellBorder || eType == enumLeftNotLastCellBorder) )
461 XFBorders
* pBelowBorders
= pBelowNeighbour
->GetXFBorders();
464 XFBorder
* pTopBorder
= pBelowBorders
->GetTop();
465 if (*pTopBorder
== *pBottomBorder
)
467 // for these 2 types cell, bottom border should be ignored for sake of avoiding duplication border
468 // but if bottom border is different with right border of left cell
469 // we should not ignored it
470 bNoBottomBorder
= sal_True
;
472 delete pBelowBorders
;
482 return enumNoLeftNoBottomBorder
;
484 return enumNoBottomBorder
;
488 return enumNoLeftBorder
;
490 return enumWholeBorder
;
494 * @short Get neighbour cell by specifying ROW+COL
497 * @return LwpCellLayout *
499 LwpCellLayout
* LwpCellLayout::GetCellByRowCol(sal_uInt16 nRow
, sal_uInt16 nCol
, LwpTableLayout
* pTableLayout
)
501 return pTableLayout
->GetCellByRowCol(nRow
, nCol
);
504 * @short Register table's default cell layout
508 void LwpCellLayout::RegisterDefaultCell()
510 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
511 for (sal_uInt16 eLoop
= enumWholeBorder
; eLoop
< enumCellBorderTopLimit
; eLoop
++)
513 // register cell style
514 XFCellStyle
*pCellStyle
= new XFCellStyle();
516 ApplyPadding(pCellStyle
);
517 ApplyBackColor(pCellStyle
);
518 ApplyWatermark(pCellStyle
);
519 ApplyFmtStyle(pCellStyle
);
520 pCellStyle
->SetAlignType(enumXFAlignNone
, GetVerticalAlignmentType());
522 XFBorders
* pBorders
= GetXFBorders();
527 case enumNoBottomBorder
:
531 // remove bottom line
532 pBorders
->SetWidth(enumXFBorderBottom
, 0);
534 case enumNoLeftNoBottomBorder
:
538 // remove left and bottom
539 pBorders
->SetWidth(enumXFBorderLeft
, 0);
540 pBorders
->SetWidth(enumXFBorderBottom
, 0);
542 case enumWholeBorder
:
548 case enumNoLeftBorder
:
553 pBorders
->SetWidth(enumXFBorderLeft
, 0);
558 pCellStyle
->SetBorders(pBorders
);
560 m_CellStyleNames
[eLoop
] = pXFStyleManager
->AddStyle(pCellStyle
)->GetStyleName();
564 * @short Register 4 types of cell style and register content styles
570 void LwpCellLayout::RegisterStyle()
572 LwpVirtualLayout
* pParent
= static_cast<LwpVirtualLayout
*>(GetParent()->obj());
573 if (!pParent
|| pParent
->GetLayoutType() != LWP_ROW_LAYOUT
)
575 // default cell layout, we must register 4 styles for it
576 RegisterDefaultCell();
580 // register cell style
581 XFCellStyle
*pCellStyle
= new XFCellStyle();
583 ApplyPadding(pCellStyle
);
584 // ApplyBackColor(pCellStyle);
585 ApplyBackGround(pCellStyle
);
586 ApplyWatermark(pCellStyle
);
587 ApplyFmtStyle(pCellStyle
);
588 ApplyBorders(pCellStyle
);
590 pCellStyle
->SetAlignType(enumXFAlignNone
, GetVerticalAlignmentType());
592 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
593 m_StyleName
= pXFStyleManager
->AddStyle(pCellStyle
)->GetStyleName();
595 // content object register styles
596 LwpObject
* pObj
= m_Content
.obj();
599 pObj
->SetFoundry(m_pFoundry
);
600 pObj
->RegisterStyle();
603 //register child layout style
604 RegisterChildStyle();
606 LwpVirtualLayout* pLayout = static_cast<LwpVirtualLayout*>(GetChildHead()->obj());
609 pLayout->SetFoundry(m_pFoundry);
610 pLayout->RegisterStyle();
611 pLayout = static_cast<LwpVirtualLayout*>(pLayout->GetNext()->obj());
616 * @short Read cell layout
620 void LwpCellLayout::Read()
622 LwpObjectStream
* pStrm
= m_pObjStrm
;
624 LwpMiddleLayout::Read();
626 // before the layout hierarchy rework
627 if (LwpFileHeader::m_nFileRevision
< 0x000b)
633 crowid
= pStrm
->QuickReaduInt16();
634 ccolid
= (sal_uInt8
) pStrm
->QuickReaduInt16(); // written as a lushort
638 type
= pStrm
->QuickReaduInt16();
640 cType
= (LeaderDotType
)type
;
642 cLayNumerics
.ReadIndexed(pStrm
);
643 cLayDiagonalLine
.ReadIndexed(pStrm
);
649 * @short Get leader char
651 * @return char ascii, if none, return 0
653 sal_uInt8
LwpCellLayout::GetLeaderChar()
663 case LDT_UNDERSCORES
:
671 * Apply protect attribute to cell of table
673 * @param aTableID - ID of the table which the cell belongs to
677 void LwpCellLayout::ApplyProtect(XFCell
* pCell
, LwpObjectID aTableID
)
679 sal_Bool bProtected
= sal_False
;
680 // judge current cell
683 bProtected
= sal_True
;
688 LwpCellLayout
* pBase
= static_cast<LwpCellLayout
*>(m_BasedOnStyle
.obj());
689 if (pBase
&& pBase
->IsProtected())
691 bProtected
= sal_True
;
696 LwpTable
* pTable
= static_cast<LwpTable
*>(aTableID
.obj());
697 LwpTableLayout
* pTableLayout
= static_cast<LwpTableLayout
*>(pTable
->GetTableLayout());
698 LwpSuperTableLayout
* pSuper
= pTableLayout
->GetSuperTableLayout();
699 if (pSuper
&& pSuper
->IsProtected())
701 bProtected
= sal_True
;
706 pCell
->SetProtect(bProtected
);
710 LwpConnectedCellLayout::LwpConnectedCellLayout(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
)
711 : LwpCellLayout(objHdr
, pStrm
)
714 LwpConnectedCellLayout::~LwpConnectedCellLayout()
717 * @short Set current connected cell layout to cell layout map
718 * @param pCellLayoutMap - cell layout map reference
721 void LwpConnectedCellLayout::SetCellMap()
723 // this function is called from LwpTableLayout, so it can't be NULL
724 LwpTableLayout
* pTableLayout
= GetTableLayout();
725 sal_uInt16 nRowSpan
= m_nRealrowspan
;
727 for (sal_uInt16 iLoop
= 0; iLoop
< nRowSpan
; iLoop
++)
729 for (sal_uInt16 jLoop
= 0; jLoop
< cnumcols
; jLoop
++)
730 pTableLayout
->SetWordProCellMap(iLoop
+ crowid
, jLoop
+ ccolid
, this);
735 * @short judge border type by cell neighbour
738 * @param pTableLayout
739 * @return LwpCellBorderType
741 LwpCellBorderType
LwpConnectedCellLayout::GetCellBorderType(sal_uInt16 nRow
, sal_uInt16 nCol
, LwpTableLayout
* pTableLayout
)
746 return enumWholeBorder
;
749 sal_uInt16 nRowSpan
= m_nRealrowspan
;
751 // get left cell and judge if neighbour border is different
752 XFBorders
* pBorders
= GetXFBorders();
755 return enumWholeBorder
;
757 XFBorder
*pLeftBorder
= pBorders
->GetLeft();
758 XFBorder
*pBottomBorder
= pBorders
->GetBottom();
759 sal_Bool bNoLeftBorder
= sal_True
;
760 sal_Bool bNoBottomBorder
= sal_True
;
764 bNoLeftBorder
= sal_False
;
768 for (sal_uInt16 iLoop
=0; iLoop
< nRowSpan
; iLoop
++)
770 LwpCellLayout
* pLeftNeighbour
= GetCellByRowCol(nRow
+iLoop
, GetLeftColID(nCol
), pTableLayout
);
773 XFBorders
* pNeighbourBorders
= pLeftNeighbour
->GetXFBorders();
774 if (pNeighbourBorders
)
776 XFBorder
* pRightBorder
= pNeighbourBorders
->GetRight();
777 if (*pLeftBorder
!= *pRightBorder
)
779 // if left border is different with right border of left cell
780 // we should not ignored it
781 bNoLeftBorder
= sal_False
;
784 delete pNeighbourBorders
;
790 if ( (nRow
+ nRowSpan
) == pTableLayout
->GetTable()->GetRow() )
792 bNoBottomBorder
= sal_False
;
796 for (sal_uInt16 iLoop
= 0; iLoop
< cnumcols
; iLoop
++)
798 LwpCellLayout
* pBelowNeighbour
= GetCellByRowCol(nRow
+ nRowSpan
, nCol
+iLoop
, pTableLayout
);
801 XFBorders
* pBelowBorders
= pBelowNeighbour
->GetXFBorders();
804 XFBorder
* pTopBorder
= pBelowBorders
->GetTop();
805 if (*pTopBorder
!= *pBottomBorder
)
807 // if bottom border is different with right border of left cell
808 // we should not ignored it
809 bNoBottomBorder
= sal_False
;
812 delete pBelowBorders
;
823 return enumNoLeftNoBottomBorder
;
825 return enumNoBottomBorder
;
829 return enumNoLeftBorder
;
831 return enumWholeBorder
;
834 * @short Read connected cell layout
838 void LwpConnectedCellLayout::Read()
840 LwpCellLayout::Read();
843 cnumrows
= m_pObjStrm
->QuickReaduInt16();
844 numcols
= m_pObjStrm
->QuickReaduInt16(); // written as a lushort
845 cnumcols
= (sal_uInt8
)numcols
;
847 m_nRealrowspan
= cnumrows
;
848 m_nRealcolspan
= cnumcols
;
850 m_pObjStrm
->SkipExtra();
852 XFCell
* LwpConnectedCellLayout::ConvertCell(LwpObjectID aTableID
, sal_uInt16 nRow
, sal_uInt16 nCol
)
854 XFCell
* pXFCell
= LwpCellLayout::ConvertCell(aTableID
, nRow
, nCol
);
855 pXFCell
->SetColumnSpaned(cnumcols
);
862 * @short parse connected cell layout
863 * @param pOutputStream - output stream
866 void LwpConnectedCellLayout::Parse(IXFStream
* pOutputStream
)
870 LwpHiddenCellLayout::LwpHiddenCellLayout(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
)
871 : LwpCellLayout(objHdr
, pStrm
)
874 LwpHiddenCellLayout::~LwpHiddenCellLayout()
877 * @short Set current hidden cell layout to cell layout map
881 void LwpHiddenCellLayout::SetCellMap()
886 * @short Read hidden cell layout
890 void LwpHiddenCellLayout::Read()
892 LwpCellLayout::Read();
894 cconnectedlayout
.ReadIndexed(m_pObjStrm
);
895 m_pObjStrm
->SkipExtra();
899 * @short Convert hidden cell layout
900 * @param aTableID - Object ID of table
901 * @return XFCell * - pointer to converted cell
904 XFCell
* LwpHiddenCellLayout::ConvertCell(LwpObjectID aTableID
, sal_uInt16 nRow
, sal_uInt16 nCol
)
906 if (!cconnectedlayout
.obj())
908 LwpConnectedCellLayout
* pConnCell
= static_cast<LwpConnectedCellLayout
* >(cconnectedlayout
.obj());
910 if (nRow
< (pConnCell
->GetNumrows()+pConnCell
->GetRowID()))
912 // if the hidden cell should be displayed for limit of SODC
913 // use the default cell layout
914 XFCell
* pXFCell
= NULL
;
915 LwpTable
*pTable
= static_cast<LwpTable
*>(aTableID
.obj());
918 LwpCellLayout
*pDefault
= static_cast<LwpCellLayout
*>(pTable
->GetDefaultCellStyle()->obj());
921 pXFCell
= pDefault
->ConvertCell(aTableID
, nRow
, nCol
);
925 pXFCell
= pConnCell
->ConvertCell(aTableID
, nRow
, nCol
);
927 pXFCell
->SetColumnSpaned(pConnCell
->GetNumcols());
936 * @short parse hidden cell layout
937 * @param pOutputStream - output stream
940 void LwpHiddenCellLayout::Parse(IXFStream
* pOutputStream
)
945 LwpParallelColumnsBlock::LwpParallelColumnsBlock(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
):LwpCellLayout(objHdr
, pStrm
)
948 LwpParallelColumnsBlock::~LwpParallelColumnsBlock()
951 void LwpParallelColumnsBlock::Read()
953 LwpCellLayout::Read();
954 m_pObjStrm
->SkipExtra();