100 bool bAlreadySeen = !aSeen.
insert(pCellLayout).second;
102 throw std::runtime_error(
"loop in conversion");
106 pCellID = &pCellLayout->
GetNext();
120 std::unique_ptr<XFRowStyle> pRowStyle(
new XFRowStyle());
145 bool bAlreadySeen = !aSeen.
insert(pCellLayout).second;
147 throw std::runtime_error(
"loop in conversion");
151 pCellID = &pCellLayout->
GetNext();
165 #define MAXUNIT (0x7fffffffL)
172 ContentClass.
Read(pStrm);
193 throw std::runtime_error(
"missing TableLayout");
196 throw std::runtime_error(
"missing Table");
202 if (nMarkConnCell == -1)
219 if (nMarkConnCell == -1)
227 xXFCell->SetColumnSpaned(nColMark-
i);
230 xXFCell->Add(xSubTable.get());
250 xXFRow->AddCell(xXFCell);
252 pXFTable->AddRow(xXFRow);
268 std::unique_ptr<XFRowStyle> pNewStyle(
new XFRowStyle);
269 *pNewStyle = *pRowStyle;
275 std::map<sal_uInt16,LwpRowLayout*> RowsMap = pTableLayout->
GetRowsMap();
277 for (sal_uInt16
i=
crowid+1;
i<nRowMark;
i++)
279 std::map<sal_uInt16,LwpRowLayout*>::iterator iter = RowsMap.find(
i);
280 if (iter == RowsMap.end())
288 pXFStyleManager->
FindStyle(iter->second->GetStyleName()));
291 throw std::runtime_error(
"missing RowStyle");
297 pNewStyle->SetMinRowHeight(
static_cast<float>(fHeight));
301 pNewStyle->SetRowHeight(
static_cast<float>(fHeight));
317 sal_uInt16 nSpannRows = 1;
318 sal_Int32 nMarkConnCell = -1;
333 return nMarkConnCell;
343 sal_uInt16 nMaxRows =
m_ConnCellList[nMarkConnCell]->GetNumrows();
364 if (nMarkConnCell == -1)
389 for (sal_uInt16
i = nStartCol;
i < nEndCol;
i++)
406 throw std::runtime_error(
"loop in conversion");
407 auto nNewEndCol =
i + nNumCols - 1;
408 if (nNewEndCol > std::numeric_limits<sal_uInt8>::max())
409 throw std::range_error(
"column index too large");
410 nCellEndCol = nNewEndCol;
416 pCellID = &pCellLayout->
GetNext();
434 xRow->AddCell(xCell);
439 pXFTable->AddRow(xRow);
456 pCellID = &pCellLayout->
GetNext();
470 throw std::range_error(
"bad span");
471 if (nRowSpan > nEffectRows)
474 throw std::range_error(
"bad span");
475 pConnCell->SetNumrows(nRowSpan);
virtual OUString GetStyleName()=0
@descr: return the style name.
AtomHolder class of Word Pro to hold a string.
void Read(LwpObjectStream *pStrm)
@descr read atomholder from object stream the default encoding used in Word Pro is 1252
virtual void SetCellMap()
Set current cell layout to cell layout map.
rtl::Reference< XFCell > DoConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol)
void RegisterStyle() override
Register 4 types of cell style and register content styles.
sal_uInt8 GetColID() const
virtual LWP_LAYOUT_TYPE GetLayoutType() override
VO_CONNECTEDCELLLAYOUT object.
sal_uInt8 GetNumcols() const
LwpObjectID & GetChildHead()
XFStyleManager * GetXFStyleManager()
static LwpGlobalMgr * GetInstance(LwpSvStream *pSvStream=nullptr)
void ReadIndexed(LwpSvStream *pStrm)
@descr Read object id with indexed format from stream if index>0, lowid is get from time table per th...
rtl::Reference< LwpObject > obj(VO_TYPE tag=VO_INVALID) const
@descr get object from object factory per the object id
stream class for LwpObject body data provide stream like interface to read object data
sal_uInt16 QuickReaduInt16(bool *pFailure=nullptr)
@descr Quick read sal_uInt32
void SkipExtra()
@descr skip extra bytes
sal_Int32 QuickReadInt32()
@descr Quick read sal_Int32
void SetFoundry(LwpFoundry *pFoundry)
std::unique_ptr< LwpObjectStream > m_pObjStrm
LwpObjectID & GetObjectID()
LwpRowHeadingLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
virtual ~LwpRowHeadingLayout() override
void Read() override
register row style
void Read() override
register row style
LwpRowLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
sal_Int32 FindNextMarkConnCell(sal_uInt16 nMarkConnCell, sal_uInt8 nEndCol)
find next merge cell with the same spanned row number with current merge cell
void CollectMergeInfo()
collect merge cell info when register row styles
void SetRowMap()
register row style
void ConvertRow(rtl::Reference< XFTable > const &pXFTable, sal_uInt8 nStartCol, sal_uInt8 nEndCol)
Parse rows with connect cell.
LwpTableLayout * GetParentTableLayout()
void ConvertCommonRow(rtl::Reference< XFTable > const &pXFTable, sal_uInt8 nStartCol, sal_uInt8 nEndCol)
convert row with rowlayout,but no merge cells
void SetCellSplit(sal_uInt16 nEffectRows)
split merge cells in this row
std::vector< LwpConnectedCellLayout * > m_ConnCellList
sal_Int32 FindMarkConnCell(sal_uInt8 nStartCol, sal_uInt8 nEndCol)
find max merge cell in a given column range
bool GetMergeCellFlag() const
check if the row has merge cell
virtual ~LwpRowLayout() override
void RegisterCurRowStyle(XFRow *pXFRow, sal_uInt16 nRowMark)
register row style in SODC table
sal_uInt8 cLeaderDotCount
virtual void RegisterStyle() override
register row style
sal_uInt16 GetCurMaxSpannedRows(sal_uInt8 nStartCol, sal_uInt8 nEndCol)
get max spanned row numbers in a given column range
encapsulate XInputStream to provide SvStream like interfaces
VO_TABLELAYOUT object and functions for registering styles and converting tables.
void ConvertTable(rtl::Reference< XFTable > const &pXFTable, sal_uInt16 nStartRow, sal_uInt16 nEndRow, sal_uInt8 nStartCol, sal_uInt8 nEndCol)
convert word pro table to SODC table
const std::map< sal_uInt16, LwpRowLayout * > & GetRowsMap() const
void SetCellsMap(sal_uInt16 nRow1, sal_uInt8 nCol1, sal_uInt16 nRow2, sal_uInt8 nCol2, XFCell *pXFCell)
set cell map info
LwpTable * GetTable()
Get table pointer.
LwpCellLayout * GetDefaultCellLayout()
const OUString & GetDefaultRowStyleName() const
void Read() override
@descr Read name of LwpDLNFVList from object stream
@ LWP_CONNECTED_CELL_LAYOUT
@descr Table cell object.
virtual void SetStyleName(const OUString &style)
: All content except XFTextContent can have a style.
double GetRowHeight() const
Style manager for the filter.
IXFStyle * FindStyle(std::u16string_view name)
IXFStyleRet AddStyle(std::unique_ptr< IXFStyle > pStyle)
std::pair< const_iterator, bool > insert(Value &&x)
For LWP filter architecture prototype - row layouts.
For LWP filter architecture prototype - table object.
std::enable_if< std::is_signed< T >::value, bool >::type checked_add(T a, T b, T &result)
std::enable_if< std::is_signed< T >::value, bool >::type checked_sub(T a, T b, T &result)