summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-10 09:35:46 +0000
committerMichael Stahl <mstahl@redhat.com>2015-12-10 15:27:51 +0000
commitcf3acc198c804140e2dab73a0ee4df81a6ae5927 (patch)
tree577c352d367fd1c019c20fc45b025855b8cb0d0c
parentb00a3b67cc6774deb8b8d9d488b6f7b331114137 (diff)
guard against missing spacing property
(cherry picked from commit 10de96bf0fb820b38607b0c25a0d3219ad343819) Reviewed-on: https://gerrit.libreoffice.org/20569 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit cb6f34b370da1d45e1c2b945b60cbcaf7b9c3a45) Change-Id: If5c50cddfee88cc92852737c1459ebe94b7256bb Reviewed-on: https://gerrit.libreoffice.org/20571 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--lotuswordpro/source/filter/lwppara.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 7cebb589f0ea..f6f7c90f6ce6 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -413,18 +413,20 @@ void LwpPara::RegisterStyle()
case PP_LOCAL_SPACING:
{
noSpacing = false;
- if (!rParaStyle.GetSpacing())
- OverrideSpacing(NULL,static_cast<LwpParaSpacingProperty*>(pProps)->GetSpacing(),pOverStyle);
- else
+ LwpSpacingOverride *pSpacing = static_cast<LwpParaSpacingProperty*>(pProps)->GetSpacing();
+ if (pSpacing)
{
- boost::scoped_ptr<LwpSpacingOverride> const
- pSpacing(rParaStyle.GetSpacing()->clone());
- OverrideSpacing(pSpacing.get(),
- static_cast<LwpParaSpacingProperty*>(pProps)->GetSpacing(),
- pOverStyle);
+ if (!rParaStyle.GetSpacing())
+ OverrideSpacing(nullptr, pSpacing, pOverStyle);
+ else
+ {
+ std::unique_ptr<LwpSpacingOverride> const
+ pNewSpacing(rParaStyle.GetSpacing()->clone());
+ OverrideSpacing(pNewSpacing.get(), pSpacing, pOverStyle);
+ }
}
- }
break;
+ }
case PP_LOCAL_BORDER:
{
OverrideParaBorder(pProps, pOverStyle);