diff options
Diffstat (limited to 'lotuswordpro/source/filter/lwpcelllayout.hxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpcelllayout.hxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwpcelllayout.hxx b/lotuswordpro/source/filter/lwpcelllayout.hxx index 4969f568e9a1..5c54b92a1ffc 100644 --- a/lotuswordpro/source/filter/lwpcelllayout.hxx +++ b/lotuswordpro/source/filter/lwpcelllayout.hxx @@ -89,7 +89,15 @@ public: LwpCellLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm); virtual ~LwpCellLayout() override; virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_CELL_LAYOUT;} - virtual rtl::Reference<XFCell> ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol); + rtl::Reference<XFCell> DoConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) + { + if (m_bConvertCell) + throw std::runtime_error("recursion in page divisions"); + m_bConvertCell = true; + rtl::Reference<XFCell> aRet = ConvertCell(aTableID, nRow, nCol); + m_bConvertCell = false; + return aRet; + } sal_uInt16 GetRowID(){return crowid;} sal_uInt8 GetColID(){return ccolid;} void RegisterStyle() override; @@ -114,10 +122,12 @@ protected: OUString const & GetCellStyleName(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout); void RegisterDefaultCell(); virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout); + virtual rtl::Reference<XFCell> ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol); static LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout); static sal_uInt16 GetLeftColID(sal_uInt16 nCol){return nCol - 1; }; virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow){return nRow + 1; }; + bool m_bConvertCell; sal_uInt16 crowid; sal_uInt8 ccolid; LwpObjectID cLayNumerics; @@ -147,11 +157,11 @@ public: virtual ~LwpHiddenCellLayout() override; virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_HIDDEN_CELL_LAYOUT;} virtual void Parse(IXFStream* pOutputStream) override; - virtual rtl::Reference<XFCell> ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) override; void RegisterStyle() override {} virtual void SetCellMap() override; private: void Read() override; + virtual rtl::Reference<XFCell> ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) override; LwpObjectID cconnectedlayout; }; @@ -166,7 +176,6 @@ public: virtual ~LwpConnectedCellLayout() override; virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_CONNECTED_CELL_LAYOUT;} virtual void Parse(IXFStream* pOutputStream) override; - virtual rtl::Reference<XFCell> ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) override; sal_uInt16 GetNumrows(){return m_nRealrowspan;} sal_uInt8 GetNumcols(){return m_nRealcolspan;} virtual void SetCellMap() override; @@ -175,6 +184,7 @@ protected: void Read() override; virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow) override {return nRow + m_nRealrowspan; }; virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout) override; + virtual rtl::Reference<XFCell> ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) override; sal_uInt16 cnumrows; sal_uInt8 cnumcols; sal_uInt16 m_nRealrowspan; |