From 381677690ca0f7f071cb998ec457f7b79e87c0f2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 9 Dec 2015 16:21:38 +0000 Subject: guard against missing indent property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit ae94fc5b28105c920b2e9d336f463b27cae5b0e1) Reviewed-on: https://gerrit.libreoffice.org/20535 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit d9f6f9063d34f29eb44d82159c411646dc19c83f) Change-Id: I2d3369aed4b242acc936a71ee9be573c1ebc7a8f Reviewed-on: https://gerrit.libreoffice.org/20537 Reviewed-by: David Tardon Tested-by: David Tardon Reviewed-by: Miklos Vajna Reviewed-by: Michael Stahl --- lotuswordpro/source/filter/lwppara.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx index f6f7c90f6ce6..13845f4b610e 100644 --- a/lotuswordpro/source/filter/lwppara.cxx +++ b/lotuswordpro/source/filter/lwppara.cxx @@ -401,15 +401,16 @@ void LwpPara::RegisterStyle() case PP_LOCAL_INDENT: { noIndent = false; - if (!rParaStyle.GetIndent()) - OverrideIndent(NULL,static_cast(pProps)->GetIndent(),pOverStyle); - - else + LwpIndentOverride *pIndent = static_cast(pProps)->GetIndent(); + if (pIndent) { - OverrideIndent(m_pIndentOverride,static_cast(pProps)->GetIndent(),pOverStyle); + if (!rParaStyle.GetIndent()) + OverrideIndent(nullptr, pIndent, pOverStyle); + else + OverrideIndent(m_pIndentOverride, pIndent, pOverStyle); } - } break; + } case PP_LOCAL_SPACING: { noSpacing = false; -- cgit