1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
10 * Sun Microsystems Inc., October, 2000
12 * GNU Lesser General Public License Version 2.1
13 * =============================================
14 * Copyright 2000 by Sun Microsystems, Inc.
15 * 901 San Antonio Road, Palo Alto, CA 94303, USA
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License version 2.1, as published by the Free Software Foundation.
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 * Sun Industry Standards Source License Version 1.1
33 * =================================================
34 * The contents of this file are subject to the Sun Industry Standards
35 * Source License Version 1.1 (the "License"); You may not use this file
36 * except in compliance with the License. You may obtain a copy of the
37 * License at http://www.openoffice.org/license.html.
39 * Software provided under this License is provided on an "AS IS" basis,
40 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
41 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
42 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
43 * See the License for the specific provisions governing your rights and
44 * obligations concerning the Software.
46 * The Initial Developer of the Original Code is: IBM Corporation
48 * Copyright: 2008 by IBM Corporation
50 * All Rights Reserved.
52 * Contributor(s): _______________________________________
55 ************************************************************************/
58 * For LWP filter architecture prototype - cell layouts
62 #include "lwpcelllayout.hxx"
63 #include <lwpfoundry.hxx>
64 #include <lwpobjfactory.hxx>
65 #include "lwptblcell.hxx"
66 #include "lwptblformula.hxx"
67 #include "lwpholder.hxx"
68 #include "lwpnumericfmt.hxx"
69 #include "lwptable.hxx"
70 #include <lwpglobalmgr.hxx>
72 #include <xfilter/xfstylemanager.hxx>
73 #include <xfilter/xfcell.hxx>
74 #include <xfilter/xfcellstyle.hxx>
75 #include <xfilter/xfcolstyle.hxx>
77 LwpCellLayout::LwpCellLayout(LwpObjectHeader
const &objHdr
, LwpSvStream
* pStrm
)
78 : LwpMiddleLayout(objHdr
, pStrm
)
79 , m_bConvertCell(false)
86 LwpCellLayout::~LwpCellLayout()
90 * @short Get table layout pointer, if default cell layout, return NULL
91 * @param LwpTableLayout *
94 LwpTableLayout
* LwpCellLayout::GetTableLayout()
96 LwpRowLayout
* pRow
= dynamic_cast<LwpRowLayout
*>(GetParent().obj().get());
101 LwpTableLayout
* pTableLayout
= pRow
->GetParentTableLayout();
105 * @short Get table pointer, if default cell layout, return NULL
109 LwpTable
* LwpCellLayout::GetTable()
111 LwpTableLayout
* pTableLayout
= GetTableLayout();
116 LwpTable
*pTable
= pTableLayout
->GetTable();
120 * @short Set current cell layout to cell layout map
124 void LwpCellLayout::SetCellMap()
126 LwpTableLayout
* pTableLayout
= GetTableLayout();
128 pTableLayout
->SetWordProCellMap(crowid
, ccolid
, this);
131 * @short Get actual width of this cell layout
135 double LwpCellLayout::GetActualWidth()
138 LwpTableLayout
* pTableLayout
= GetTableLayout();
140 if (pTableLayout
== nullptr)
142 return GetGeometryWidth();
145 OUString strColStyle
= pTableLayout
->GetColumnWidth(ccolid
);
147 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
148 XFColStyle
*pStyle
= static_cast<XFColStyle
*>(pXFStyleManager
->FindStyle(strColStyle
));
151 return pStyle
->GetWidth();
154 return GetGeometryWidth();
158 * @short Apply padding to cell style
159 * @param pCellStyle - pointer of XFCellStyle
162 void LwpCellLayout::ApplyPadding(XFCellStyle
*pCellStyle
)
164 double fLeft
= GetMarginsValue(MARGIN_LEFT
);
165 double fRight
= GetMarginsValue(MARGIN_RIGHT
);
166 double fTop
= GetMarginsValue(MARGIN_TOP
);
167 double fBottom
= GetMarginsValue(MARGIN_BOTTOM
);
168 pCellStyle
->SetPadding(static_cast<float>(fLeft
),static_cast<float>(fRight
),static_cast<float>(fTop
),static_cast<float>(fBottom
));
171 * @short Apply border to cell style according to cell position, default cell layout won't use this function
173 * @return pCellStyle - pointer of XFCellStyle
175 void LwpCellLayout::ApplyBorders(XFCellStyle
*pCellStyle
)
177 // judge cell border type
178 LwpCellBorderType eType
= GetCellBorderType(crowid
, ccolid
, GetTableLayout());
180 // get left cell and judge if neighbour border is different
181 std::unique_ptr
<XFBorders
> xBorders(GetXFBorders());
189 case enumNoBottomBorder
:
190 xBorders
->SetWidth(enumXFBorderBottom
, 0);
192 case enumNoLeftBorder
:
193 xBorders
->SetWidth(enumXFBorderLeft
, 0);
195 case enumNoLeftNoBottomBorder
:
196 xBorders
->SetWidth(enumXFBorderBottom
, 0);
197 xBorders
->SetWidth(enumXFBorderLeft
, 0);
199 case enumWholeBorder
:
204 pCellStyle
->SetBorders(xBorders
.release());
207 * @short Apply watermark to cell style
208 * @param pCellStyle - pointer of XFCellStyle
211 void LwpCellLayout::ApplyWatermark(XFCellStyle
*pCellStyle
)
213 std::unique_ptr
<XFBGImage
> xBGImage(GetXFBGImage());
216 pCellStyle
->SetBackImage(xBGImage
);
221 * @short Apply pattern fill to cell style
222 * @param pCellStyle - pointer of XFCellStyle
225 void LwpCellLayout::ApplyPatternFill(XFCellStyle
* pCellStyle
)
227 std::unique_ptr
<XFBGImage
> xXFBGImage(GetFillPattern());
230 pCellStyle
->SetBackImage(xXFBGImage
);
235 * @short Apply background to cell style
236 * @param pCellStyle - pointer of XFCellStyle
239 void LwpCellLayout::ApplyBackGround(XFCellStyle
* pCellStyle
)
243 ApplyPatternFill(pCellStyle
);
247 ApplyBackColor(pCellStyle
);
251 * @short Apply back color to cell style
252 * @param pCellStyle - pointer of XFCellStyle
255 void LwpCellLayout::ApplyBackColor(XFCellStyle
*pCellStyle
)
257 LwpColor
* pColor
= GetBackColor();
258 if(pColor
&& pColor
->IsValidColor())
260 XFColor
aXFColor(pColor
->To24Color());
261 pCellStyle
->SetBackColor(aXFColor
);
265 * @short register style of cell layout
266 * @param pCellStyle The style of the cell, which would be applied to the cell.
269 void LwpCellLayout::ApplyFmtStyle(XFCellStyle
*pCellStyle
)
271 LwpLayoutNumerics
* pLayoutNumerics
= dynamic_cast<LwpLayoutNumerics
*>(cLayNumerics
.obj().get());
272 if (!pLayoutNumerics
)
274 // if current layout doesn't have format, go to based on layout
275 LwpCellLayout
* pCellLayout
= dynamic_cast<LwpCellLayout
*>(GetBasedOnStyle().get());
278 pLayoutNumerics
= dynamic_cast<LwpLayoutNumerics
*>(pCellLayout
->GetNumericsObject().obj().get());
282 // apply format style
285 XFStyle
* pStyle
= pLayoutNumerics
->Convert();
288 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
289 m_NumfmtName
= pXFStyleManager
->AddStyle(std::unique_ptr
<XFStyle
>(pStyle
)).m_pStyle
->GetStyleName();
290 pCellStyle
->SetDataStyle(m_NumfmtName
);
295 * @short get style name according to cell position, only table default cells use this function
296 * @param nRow - default cell position row number
297 * @param nCol - default cell position col number
298 * @return OUString - registered cell style name
300 OUString
const & LwpCellLayout::GetCellStyleName(sal_uInt16 nRow
, sal_uInt16 nCol
, LwpTableLayout
* pTableLayout
)
302 // judge cell border type
303 LwpCellBorderType eType
= GetCellBorderType(nRow
, nCol
, pTableLayout
);
304 return m_CellStyleNames
[eType
];
308 * @param aTableID - ID of the table which this cell belongs to
309 * @param bIsTopRow - whether current cell is top row
310 * @param bIsRightCol - whether current cell is the rightest column
313 rtl::Reference
<XFCell
> LwpCellLayout::ConvertCell(LwpObjectID aTableID
, sal_uInt16 nRow
, sal_uInt16 nCol
)
315 // if cell layout is aTableID's default cell layout
316 // it can't have any content, bypass these code
317 LwpTable
* pTable
= dynamic_cast<LwpTable
*>(aTableID
.obj().get());
323 rtl::Reference
<XFCell
> xXFCell(new XFCell
);
324 OUString aStyleName
= m_StyleName
;
326 // if cell layout is aTableID's default cell layout
327 // we should adjust its style by current position
328 if (pTable
->GetDefaultCellStyle() == GetObjectID())
330 aStyleName
= GetCellStyleName(nRow
, nCol
, pTable
->GetTableLayout().get());
334 LwpStory
* pStory
= dynamic_cast<LwpStory
*>(m_Content
.obj().get());
337 pStory
->XFConvert(xXFCell
.get());
340 ApplyProtect(xXFCell
.get(), aTableID
);
341 xXFCell
->SetStyleName(aStyleName
);
345 LwpPara
* LwpCellLayout::GetLastParaOfPreviousStory()
347 LwpObjectID
* pPreStoryID
= GetPreviousCellStory();
348 if (pPreStoryID
&& !(pPreStoryID
->IsNull()))
350 LwpStory
* pPreStory
= dynamic_cast<LwpStory
*>(pPreStoryID
->obj(VO_STORY
).get());
351 return dynamic_cast<LwpPara
*>(pPreStory
->GetLastPara().obj(VO_PARA
).get());
360 * @short Get previous cell which used for bullet inside cell
362 * @return LwpObjectID * - object ID of cell content story
364 LwpObjectID
* LwpCellLayout::GetPreviousCellStory()
366 LwpTable
*pTable
= GetTable();
372 sal_uInt16 nRow
= crowid
;
373 sal_uInt16 nCol
= ccolid
;
375 // if table is reset paragraph in columns, get cell on the top side of current cell
376 if (pTable
->IsNumberDown())
386 // if not, get cell on the left side of current cell
396 nCol
= pTable
->GetColumn() - 1;
405 // get the object id pointer of previous cell story
406 LwpTableLayout
* pTableLayout
= GetTableLayout();
412 return pTableLayout
->SearchCellStoryMap(nRow
, nCol
);
416 * @short judge border type by cell neighbour
419 * @param pTableLayout
420 * @return LwpCellBorderType
422 LwpCellBorderType
LwpCellLayout::GetCellBorderType(sal_uInt16 nRow
, sal_uInt16 nCol
, LwpTableLayout
* pTableLayout
)
425 return enumWholeBorder
;
427 // get left cell and judge if neighbour border is different
428 std::unique_ptr
<XFBorders
> xBorders(GetXFBorders());
431 return enumWholeBorder
;
433 XFBorder
& rLeftBorder
= xBorders
->GetLeft();
434 XFBorder
& rBottomBorder
= xBorders
->GetBottom();
435 bool bNoLeftBorder
= false;
436 bool bNoBottomBorder
= false;
438 LwpCellLayout
* pLeftNeighbour
= GetCellByRowCol(nRow
, GetLeftColID(nCol
), pTableLayout
);
441 XFBorders
* pNeighbourBorders
= pLeftNeighbour
->GetXFBorders();
442 if (pNeighbourBorders
)
444 XFBorder
& rRightBorder
= pNeighbourBorders
->GetRight();
445 if (rLeftBorder
== rRightBorder
)
447 // for these 2 types cell, left border should be ignored for sake of avoiding duplication border
448 // but if left border is different with right border of left cell
449 // we should not ignored it
450 bNoLeftBorder
= true;
452 delete pNeighbourBorders
;
457 LwpCellLayout
* pBelowNeighbour
= GetCellByRowCol(GetBelowRowID(nRow
), nCol
, pTableLayout
);
458 if (pBelowNeighbour
) //&& (eType == enumRightNotLastCellBorder || eType == enumLeftNotLastCellBorder) )
460 XFBorders
* pBelowBorders
= pBelowNeighbour
->GetXFBorders();
463 XFBorder
& rTopBorder
= pBelowBorders
->GetTop();
464 if (rTopBorder
== rBottomBorder
)
466 // for these 2 types cell, bottom border should be ignored for sake of avoiding duplication border
467 // but if bottom border is different with right border of left cell
468 // we should not ignored it
469 bNoBottomBorder
= true;
471 delete pBelowBorders
;
481 return enumNoLeftNoBottomBorder
;
483 return enumNoBottomBorder
;
487 return enumNoLeftBorder
;
489 return enumWholeBorder
;
493 * @short Get neighbour cell by specifying ROW+COL
496 * @return LwpCellLayout *
498 LwpCellLayout
* LwpCellLayout::GetCellByRowCol(sal_uInt16 nRow
, sal_uInt16 nCol
, LwpTableLayout
* pTableLayout
)
500 return pTableLayout
->GetCellByRowCol(nRow
, nCol
);
503 * @short Register table's default cell layout
507 void LwpCellLayout::RegisterDefaultCell()
509 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
510 for (sal_uInt16 eLoop
= enumWholeBorder
; eLoop
< enumCellBorderTopLimit
; eLoop
++)
512 // register cell style
513 std::unique_ptr
<XFCellStyle
> xCellStyle(new XFCellStyle());
515 ApplyPadding(xCellStyle
.get());
516 ApplyBackColor(xCellStyle
.get());
517 ApplyWatermark(xCellStyle
.get());
518 ApplyFmtStyle(xCellStyle
.get());
519 xCellStyle
->SetAlignType(enumXFAlignNone
, GetVerticalAlignmentType());
521 std::unique_ptr
<XFBorders
> xBorders(GetXFBorders());
526 case enumNoBottomBorder
:
530 // remove bottom line
531 xBorders
->SetWidth(enumXFBorderBottom
, 0);
533 case enumNoLeftNoBottomBorder
:
537 // remove left and bottom
538 xBorders
->SetWidth(enumXFBorderLeft
, 0);
539 xBorders
->SetWidth(enumXFBorderBottom
, 0);
541 case enumWholeBorder
:
547 case enumNoLeftBorder
:
552 xBorders
->SetWidth(enumXFBorderLeft
, 0);
557 xCellStyle
->SetBorders(xBorders
.release());
559 m_CellStyleNames
[eLoop
] = pXFStyleManager
->AddStyle(std::move(xCellStyle
)).m_pStyle
->GetStyleName();
563 * @short Register 4 types of cell style and register content styles
569 void LwpCellLayout::RegisterStyle()
571 rtl::Reference
<LwpVirtualLayout
> xParent(dynamic_cast<LwpVirtualLayout
*>(GetParent().obj().get()));
572 if (!xParent
.is() || xParent
->GetLayoutType() != LWP_ROW_LAYOUT
)
574 // default cell layout, we must register 4 styles for it
575 RegisterDefaultCell();
579 // register cell style
580 std::unique_ptr
<XFCellStyle
> xCellStyle(new XFCellStyle
);
582 ApplyPadding(xCellStyle
.get());
583 ApplyBackGround(xCellStyle
.get());
584 ApplyWatermark(xCellStyle
.get());
585 ApplyFmtStyle(xCellStyle
.get());
586 ApplyBorders(xCellStyle
.get());
588 xCellStyle
->SetAlignType(enumXFAlignNone
, GetVerticalAlignmentType());
590 XFStyleManager
* pXFStyleManager
= LwpGlobalMgr::GetInstance()->GetXFStyleManager();
591 m_StyleName
= pXFStyleManager
->AddStyle(std::move(xCellStyle
)).m_pStyle
->GetStyleName();
593 // content object register styles
594 rtl::Reference
<LwpObject
> pObj
= m_Content
.obj();
597 pObj
->SetFoundry(m_pFoundry
);
598 pObj
->DoRegisterStyle();
601 //register child layout style
602 RegisterChildStyle();
605 * @short Read cell layout
609 void LwpCellLayout::Read()
611 LwpObjectStream
* pStrm
= m_pObjStrm
.get();
613 LwpMiddleLayout::Read();
615 // before the layout hierarchy rework
616 if (LwpFileHeader::m_nFileRevision
< 0x000b)
622 crowid
= pStrm
->QuickReaduInt16();
623 ccolid
= static_cast<sal_uInt8
>(pStrm
->QuickReaduInt16()); // written as a lushort
627 type
= pStrm
->QuickReaduInt16();
629 cType
= static_cast<LeaderDotType
>(type
);
631 cLayNumerics
.ReadIndexed(pStrm
);
632 cLayDiagonalLine
.ReadIndexed(pStrm
);
639 * Apply protect attribute to cell of table
640 * @param aTableID - ID of the table which the cell belongs to
644 void LwpCellLayout::ApplyProtect(XFCell
* pCell
, LwpObjectID aTableID
)
646 bool bProtected
= false;
647 // judge current cell
648 if (GetIsProtected())
655 LwpCellLayout
* pBase
= dynamic_cast<LwpCellLayout
*>(GetBasedOnStyle().get());
656 if (pBase
&& pBase
->GetIsProtected())
663 LwpTable
* pTable
= dynamic_cast<LwpTable
*>(aTableID
.obj().get());
664 rtl::Reference
<LwpTableLayout
> xTableLayout(pTable
? pTable
->GetTableLayout() : nullptr);
665 LwpSuperTableLayout
* pSuper
= xTableLayout
.is() ? xTableLayout
->GetSuperTableLayout() : nullptr;
666 if (pSuper
&& pSuper
->GetIsProtected())
673 pCell
->SetProtect(bProtected
);
676 LwpConnectedCellLayout::LwpConnectedCellLayout(LwpObjectHeader
const &objHdr
, LwpSvStream
* pStrm
)
677 : LwpCellLayout(objHdr
, pStrm
)
685 LwpConnectedCellLayout::~LwpConnectedCellLayout()
688 * @short Set current connected cell layout to cell layout map
689 * @param pCellLayoutMap - cell layout map reference
692 void LwpConnectedCellLayout::SetCellMap()
694 LwpTableLayout
* pTableLayout
= GetTableLayout();
698 sal_uInt16 nRowSpan
= m_nRealrowspan
;
700 for (sal_uInt16 iLoop
= 0; iLoop
< nRowSpan
; iLoop
++)
702 for (sal_uInt16 jLoop
= 0; jLoop
< cnumcols
; jLoop
++)
703 pTableLayout
->SetWordProCellMap(iLoop
+ crowid
, jLoop
+ ccolid
, this);
708 * @short judge border type by cell neighbour
711 * @param pTableLayout
712 * @return LwpCellBorderType
714 LwpCellBorderType
LwpConnectedCellLayout::GetCellBorderType(sal_uInt16 nRow
, sal_uInt16 nCol
, LwpTableLayout
* pTableLayout
)
719 return enumWholeBorder
;
722 sal_uInt16 nRowSpan
= m_nRealrowspan
;
724 // get left cell and judge if neighbour border is different
725 std::unique_ptr
<XFBorders
> xBorders(GetXFBorders());
728 return enumWholeBorder
;
730 XFBorder
& rLeftBorder
= xBorders
->GetLeft();
731 XFBorder
& rBottomBorder
= xBorders
->GetBottom();
732 bool bNoLeftBorder
= true;
733 bool bNoBottomBorder
= true;
737 bNoLeftBorder
= false;
741 for (sal_uInt16 iLoop
=0; iLoop
< nRowSpan
; iLoop
++)
743 LwpCellLayout
* pLeftNeighbour
= GetCellByRowCol(nRow
+iLoop
, GetLeftColID(nCol
), pTableLayout
);
746 std::unique_ptr
<XFBorders
> pNeighbourBorders(pLeftNeighbour
->GetXFBorders());
747 if (pNeighbourBorders
)
749 XFBorder
& rRightBorder
= pNeighbourBorders
->GetRight();
750 if (rLeftBorder
!= rRightBorder
)
752 // if left border is different with right border of left cell
753 // we should not ignored it
754 bNoLeftBorder
= false;
762 LwpTable
* pTable
= pTableLayout
->GetTable();
764 throw std::runtime_error("missing table");
766 if ( (nRow
+ nRowSpan
) == pTable
->GetRow())
768 bNoBottomBorder
= false;
772 for (sal_uInt16 iLoop
= 0; iLoop
< cnumcols
; iLoop
++)
774 LwpCellLayout
* pBelowNeighbour
= GetCellByRowCol(nRow
+ nRowSpan
, nCol
+iLoop
, pTableLayout
);
777 std::unique_ptr
<XFBorders
> pBelowBorders(pBelowNeighbour
->GetXFBorders());
780 XFBorder
& rTopBorder
= pBelowBorders
->GetTop();
781 if (rTopBorder
!= rBottomBorder
)
783 // if bottom border is different with right border of left cell
784 // we should not ignored it
785 bNoBottomBorder
= false;
799 return enumNoLeftNoBottomBorder
;
801 return enumNoBottomBorder
;
805 return enumNoLeftBorder
;
807 return enumWholeBorder
;
810 * @short Read connected cell layout
814 void LwpConnectedCellLayout::Read()
816 LwpCellLayout::Read();
819 cnumrows
= m_pObjStrm
->QuickReaduInt16();
820 numcols
= m_pObjStrm
->QuickReaduInt16(); // written as a lushort
821 cnumcols
= static_cast<sal_uInt8
>(numcols
);
823 m_nRealrowspan
= cnumrows
;
824 m_nRealcolspan
= cnumcols
;
826 m_pObjStrm
->SkipExtra();
829 rtl::Reference
<XFCell
> LwpConnectedCellLayout::ConvertCell(LwpObjectID aTableID
, sal_uInt16 nRow
, sal_uInt16 nCol
)
831 rtl::Reference
<XFCell
> xXFCell
= LwpCellLayout::ConvertCell(aTableID
, nRow
, nCol
);
832 xXFCell
->SetColumnSpaned(cnumcols
);
837 * @short parse connected cell layout
838 * @param pOutputStream - output stream
841 void LwpConnectedCellLayout::Parse(IXFStream
* /*pOutputStream*/)
845 LwpHiddenCellLayout::LwpHiddenCellLayout(LwpObjectHeader
const &objHdr
, LwpSvStream
* pStrm
)
846 : LwpCellLayout(objHdr
, pStrm
)
849 LwpHiddenCellLayout::~LwpHiddenCellLayout()
852 * @short Set current hidden cell layout to cell layout map
856 void LwpHiddenCellLayout::SetCellMap()
860 * @short Read hidden cell layout
864 void LwpHiddenCellLayout::Read()
866 LwpCellLayout::Read();
868 cconnectedlayout
.ReadIndexed(m_pObjStrm
.get());
869 m_pObjStrm
->SkipExtra();
873 * @short Convert hidden cell layout
874 * @param aTableID - Object ID of table
875 * @return XFCell * - pointer to converted cell
878 rtl::Reference
<XFCell
> LwpHiddenCellLayout::ConvertCell(LwpObjectID aTableID
, sal_uInt16 nRow
, sal_uInt16 nCol
)
880 if (!cconnectedlayout
.obj().is())
882 LwpConnectedCellLayout
* pConnCell
= dynamic_cast<LwpConnectedCellLayout
* >(cconnectedlayout
.obj().get());
884 if (!pConnCell
|| nRow
< (pConnCell
->GetNumrows()+pConnCell
->GetRowID()))
886 // if the hidden cell should be displayed for limit of SODC
887 // use the default cell layout
888 rtl::Reference
<XFCell
> xXFCell
;
889 LwpTable
*pTable
= dynamic_cast<LwpTable
*>(aTableID
.obj().get());
892 LwpCellLayout
*pDefault
= dynamic_cast<LwpCellLayout
*>(pTable
->GetDefaultCellStyle().obj().get());
895 xXFCell
= pDefault
->DoConvertCell(aTableID
, nRow
, nCol
);
899 xXFCell
= pConnCell
->DoConvertCell(aTableID
, nRow
, nCol
);
901 xXFCell
->SetColumnSpaned(pConnCell
->GetNumcols());
910 * @short parse hidden cell layout
911 * @param pOutputStream - output stream
914 void LwpHiddenCellLayout::Parse(IXFStream
* /*pOutputStream*/)
918 LwpParallelColumnsBlock::LwpParallelColumnsBlock(LwpObjectHeader
const &objHdr
, LwpSvStream
* pStrm
):LwpCellLayout(objHdr
, pStrm
)
921 LwpParallelColumnsBlock::~LwpParallelColumnsBlock()
924 void LwpParallelColumnsBlock::Read()
926 LwpCellLayout::Read();
927 m_pObjStrm
->SkipExtra();
930 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */