lotuswordpro/source/filter/lwptable.hxx | 3 +++ lotuswordpro/source/filter/lwptablelayout.cxx | 8 ++++++++ 2 files changed, 11 insertions(+)
New commits: commit 7d2ec4c0136c054923947093e35f4ab074f2b550 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Mar 2 11:22:21 2017 +0000 dig out lotuswordpros table limits Change-Id: Iea7d436a78336de150b3d3ae317b99b554fb8657 diff --git a/lotuswordpro/source/filter/lwptable.hxx b/lotuswordpro/source/filter/lwptable.hxx index 6c88471..fce2172 100644 --- a/lotuswordpro/source/filter/lwptable.hxx +++ b/lotuswordpro/source/filter/lwptable.hxx @@ -170,7 +170,10 @@ protected: LwpObjectID cDefaultLeftColumnStyle; LwpObjectID cDefaultRightColumnStyle; }; + #define MAX_NUM_ROWS 8192 +#define MAX_NUM_COLS 255 + class LwpGlossary : public LwpParallelColumns { public: diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index 5e42c10..f44544f 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -700,6 +700,14 @@ void LwpTableLayout::RegisterStyle() // get row/column number of this table m_nRows = pTable->GetRow(); m_nCols = pTable->GetColumn(); + //http://www.danielsays.com/ss-gallery-win1x2x3x-lotus-word-pro-96.html + //tables with up to 255 rows and 8192 columns + //the row limit tallies with the casting of m_nCols to an unsigned char + //elsewhere + if (m_nRows > MAX_NUM_ROWS) + throw std::runtime_error("max legal row exceeded"); + if (m_nCols > MAX_NUM_COLS) + throw std::runtime_error("max legal column exceeded"); // get default cell layout of current table LwpObjectID& rID= pTable->GetDefaultCellStyle();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits