79 , m_bConvertCell(false)
140 if (pTableLayout ==
nullptr)
168 pCellStyle->
SetPadding(
static_cast<float>(fLeft),
static_cast<float>(fRight),
static_cast<float>(fTop),
static_cast<float>(fBottom));
272 if (!pLayoutNumerics)
341 xXFCell->SetStyleName(aStyleName);
348 if (pPreStoryID && !(pPreStoryID->
IsNull()))
353 SAL_WARN(
"lwp",
"unexpected null VO_STORY");
438 XFBorder& rLeftBorder = xBorders->GetLeft();
439 XFBorder& rBottomBorder = xBorders->GetBottom();
440 bool bNoLeftBorder =
false;
441 bool bNoBottomBorder =
false;
446 std::unique_ptr<XFBorders> pNeighbourBorders = pLeftNeighbour->
GetXFBorders();
447 if (pNeighbourBorders)
449 XFBorder& rRightBorder = pNeighbourBorders->GetRight();
450 if (rLeftBorder == rRightBorder)
455 bNoLeftBorder =
true;
464 std::unique_ptr<XFBorders> pBelowBorders = pBelowNeighbour->
GetXFBorders();
467 XFBorder& rTopBorder = pBelowBorders->GetTop();
468 if (rTopBorder == rBottomBorder)
473 bNoBottomBorder =
true;
516 std::unique_ptr<XFCellStyle> xCellStyle(
new XFCellStyle());
560 xCellStyle->SetBorders(xBorders.release());
583 std::unique_ptr<XFCellStyle> xCellStyle(
new XFCellStyle);
601 pObj->DoRegisterStyle();
649 bool bProtected =
false;
668 LwpSuperTableLayout * pSuper = xTableLayout.is() ? xTableLayout->GetSuperTableLayout() :
nullptr;
703 for (sal_uInt16 iLoop = 0; iLoop < nRowSpan; iLoop ++)
705 for (sal_uInt16 jLoop = 0; jLoop <
cnumcols; jLoop ++)
720 throw std::runtime_error(
"missing table layout");
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++)
746 std::unique_ptr<XFBorders> pNeighbourBorders(pLeftNeighbour->
GetXFBorders());
747 if (pNeighbourBorders)
749 XFBorder& rRightBorder = pNeighbourBorders->GetRight();
750 if (rLeftBorder != rRightBorder)
754 bNoLeftBorder =
false;
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 ++)
777 std::unique_ptr<XFBorders> pBelowBorders(pBelowNeighbour->
GetXFBorders());
780 XFBorder& rTopBorder = pBelowBorders->GetTop();
781 if (rTopBorder != rBottomBorder)
785 bNoBottomBorder =
false;
819 sal_uInt16 numcols =
m_pObjStrm->QuickReaduInt16();
902 xXFCell->SetColumnSpaned(pConnCell->
GetNumcols());
Stream wrapper for sax writer.
virtual OUString GetStyleName()=0
@descr: return the style name.
virtual ~LwpCellLayout() override
LwpTableLayout * GetTableLayout()
Get table layout pointer, if default cell layout, return NULL.
virtual void SetCellMap()
Set current cell layout to cell layout map.
void ApplyBorders(XFCellStyle *pCellStyle)
Apply border to cell style according to cell position, default cell layout won't use this function.
static sal_uInt16 GetLeftColID(sal_uInt16 nCol)
LwpObjectID * GetPreviousCellStory()
Get previous cell which used for bullet inside cell.
LwpObjectID cLayDiagonalLine
void Read() override
Read cell layout.
void ApplyPadding(XFCellStyle *pCellStyle)
Apply padding to cell style.
void RegisterDefaultCell()
Register table's default cell layout.
rtl::Reference< XFCell > DoConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol)
void ApplyPatternFill(XFCellStyle *pCellStyle)
Apply pattern fill to cell style.
void ApplyProtect(XFCell *pCell, LwpObjectID aTableID)
Apply protect attribute to cell of table.
void RegisterStyle() override
Register 4 types of cell style and register content styles.
virtual LwpPara * GetLastParaOfPreviousStory() override
OUString const & GetCellStyleName(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout *pTableLayout)
get style name according to cell position, only table default cells use this function
void ApplyFmtStyle(XFCellStyle *pCellStyle)
register style of cell layout
virtual rtl::Reference< XFCell > ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol)
Make the XFCell.
sal_uInt16 GetRowID() const
OUString m_CellStyleNames[enumCellBorderTopLimit]
LwpObjectID & GetNumericsObject()
virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout *pTableLayout)
judge border type by cell neighbour
double GetActualWidth()
Get actual width of this cell layout.
static LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout *pTableLayout)
Get neighbour cell by specifying ROW+COL.
LwpCellLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void ApplyWatermark(XFCellStyle *pCellStyle)
Apply watermark to cell style.
void ApplyBackColor(XFCellStyle *pCellStyle)
Apply back color to cell style.
virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow)
void ApplyBackGround(XFCellStyle *pCellStyle)
Apply background to cell style.
LwpTable * GetTable()
Get table pointer, if default cell layout, return NULL.
lwpcolor class (red, green, blue, extra)
bool IsValidColor() const
sal_uInt32 To24Color()
@descr return the BGR format
VO_CONNECTEDCELLLAYOUT object.
void Read() override
Read connected cell layout.
LwpConnectedCellLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
virtual ~LwpConnectedCellLayout() override
virtual void Parse(IXFStream *pOutputStream) override
parse connected cell layout
virtual rtl::Reference< XFCell > ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) override
Make the XFCell.
sal_uInt16 m_nRealrowspan
sal_uInt8 GetNumcols() const
virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout *pTableLayout) override
judge border type by cell neighbour
virtual void SetCellMap() override
Set current connected cell layout to cell layout map.
sal_uInt16 GetNumrows() const
LwpObjectID & GetParent()
XFStyleManager * GetXFStyleManager()
static LwpGlobalMgr * GetInstance(LwpSvStream *pSvStream=nullptr)
virtual ~LwpHiddenCellLayout() override
void Read() override
Read hidden cell layout.
LwpHiddenCellLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
virtual void Parse(IXFStream *pOutputStream) override
parse hidden cell layout
virtual void SetCellMap() override
Set current hidden cell layout to cell layout map.
virtual rtl::Reference< XFCell > ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) override
Convert hidden cell layout.
LwpObjectID cconnectedlayout
void Read() override
@descr Read name of LwpDLNFVList from object stream
std::unique_ptr< XFBorders > GetXFBorders()
@descr: create xfborder.
std::unique_ptr< XFBGImage > GetXFBGImage()
@descr: Create and return xfbgimage object for watermark
std::unique_ptr< XFBGImage > GetFillPattern()
@descr: Get the fill pattern style.
double GetGeometryWidth()
@descr: Get layout width, measured by "cm"
bool IsPatternFill()
@descr: Whether the fill is pattern fill or not
LwpColor * GetBackColor()
@descr: Get background color.
rtl::Reference< LwpObject > GetBasedOnStyle() const
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
std::unique_ptr< LwpObjectStream > m_pObjStrm
LwpObjectID & GetObjectID()
virtual ~LwpParallelColumnsBlock() override
LwpParallelColumnsBlock(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void Read() override
Read cell layout.
LwpTableLayout * GetParentTableLayout()
virtual void XFConvert(XFContentContainer *pCont) override
@descr default XFConvert function pCont is the XFContentContainer for the object conversion
LwpObjectID & GetLastPara()
VO_SUPERTABLELAYOUT object.
encapsulate XInputStream to provide SvStream like interfaces
VO_TABLELAYOUT object and functions for registering styles and converting tables.
LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol)
Get neighbour cell by specifying ROW+COL.
void SetWordProCellMap(sal_uInt16 nRow, sal_uInt16 nCol, LwpCellLayout *pCell)
LwpObjectID * SearchCellStoryMap(sal_uInt16 nRow, sal_uInt16 nCol)
search the cell map
LwpTable * GetTable()
Get table pointer.
OUString GetColumnWidth(sal_uInt16 nCol)
Get column style name by column ID.
rtl::Reference< LwpTableLayout > GetTableLayout()
bool IsNumberDown() const
sal_uInt16 GetRow() const
sal_uInt16 GetColumn() const
LwpObjectID & GetDefaultCellStyle()
enumXFAlignType GetVerticalAlignmentType() const
void RegisterChildStyle()
@descr: Register child layout style
double GetMarginsValue(sal_uInt8 nWhichSide)
Single border object for all objects with borders.
@descr Style object for cell.
void SetBackImage(std::unique_ptr< XFBGImage > &rImage)
descr: set cell background image.
void SetBackColor(XFColor const &color)
@descr: Set background color of the cell.
void SetBorders(XFBorders *pBorders)
@descr: The borders are complex, so you have to create one before use.
void SetDataStyle(const OUString &style)
@descr Set cell data format style name.
void SetPadding(double left, double right, double top, double bottom)
@descr: Set the padding of the paragraph.This is the distance between the border and the top of the t...
@descr Table cell object.
void SetProtect(bool protect)
@descr Set cell protected.
Column style, it has only one property-the column width.
double GetWidth() const
@descr return column width.
Style manager for the filter.
IXFStyle * FindStyle(std::u16string_view name)
IXFStyleRet AddStyle(std::unique_ptr< IXFStyle > pStyle)
implements ixfstyle interface.
#define SAL_WARN(area, stream)
For LWP filter architecture prototype - cell layouts.
@ enumNoLeftNoBottomBorder
const sal_uInt8 MARGIN_BOTTOM
const sal_uInt8 MARGIN_RIGHT
const sal_uInt8 MARGIN_TOP
const sal_uInt8 MARGIN_LEFT
For LWP filter architecture prototype - table object.
For LWP filter architecture prototype - row layouts.
For LWP filter architecture prototype - table object.
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)