diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-10 09:49:07 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-12-10 16:14:49 +0100 |
commit | 70ba21c385c9afb65c2183a26c5b7af2a8dfd477 (patch) | |
tree | 4f994eac38b1b4b8b1ebd52c60dd2592e45d8c35 /lotuswordpro | |
parent | 44582512701e97f5f23ad86e904c9faa4c2953ce (diff) |
guard against missing table layout
(cherry picked from commit 0c876483d278e3e5ba43e9eaf40ca713b6099703)
Reviewed-on: https://gerrit.libreoffice.org/20576
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 4bc26e006dd4bde95eef706de43228679a41c4f7)
Change-Id: I4bc7a7283f63124ccb50957ea64791644e01e267
Reviewed-on: https://gerrit.libreoffice.org/20577
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
(cherry picked from commit e81d193d56f219610da5b8b10717741d8c5dc63c)
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpcelllayout.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwprowlayout.cxx | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx index a587ec91febe..13d7307cf8f1 100644 --- a/lotuswordpro/source/filter/lwpcelllayout.cxx +++ b/lotuswordpro/source/filter/lwpcelllayout.cxx @@ -696,8 +696,10 @@ LwpConnectedCellLayout::~LwpConnectedCellLayout() */ void LwpConnectedCellLayout::SetCellMap() { - // this function is called from LwpTableLayout, so it can't be NULL LwpTableLayout * pTableLayout = GetTableLayout(); + if (!pTableLayout) + return; + sal_uInt16 nRowSpan = m_nRealrowspan; for (sal_uInt16 iLoop = 0; iLoop < nRowSpan; iLoop ++) diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx index e7bae0f15dfc..1f8265e370c5 100644 --- a/lotuswordpro/source/filter/lwprowlayout.cxx +++ b/lotuswordpro/source/filter/lwprowlayout.cxx @@ -366,11 +366,14 @@ sal_uInt16 LwpRowLayout::GetCurMaxSpannedRows(sal_uInt8 nStartCol,sal_uInt8 nEnd */ void LwpRowLayout::ConvertCommonRow(XFTable* pXFTable,sal_uInt8 nStartCol,sal_uInt8 nEndCol) { + LwpTableLayout* pTableLayout = GetParentTableLayout(); + if (!pTableLayout) + return; + XFRow* pRow = new XFRow; pRow->SetStyleName(m_StyleName); - XFCell * pCell = NULL; - LwpTableLayout* pTableLayout = GetParentTableLayout(); + XFCell * pCell = nullptr; LwpTable* pTable = pTableLayout->GetTable(); sal_uInt8 nCellStartCol,nCellEndCol; |