[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Thu Dec 10 01:36:20 PST 2015
lotuswordpro/source/filter/lwppara.cxx | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
New commits:
commit 10de96bf0fb820b38607b0c25a0d3219ad343819
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 10 09:35:46 2015 +0000
guard against missing spacing property
Change-Id: If5c50cddfee88cc92852737c1459ebe94b7256bb
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 6226e0d..17454b6 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -412,18 +412,20 @@ void LwpPara::RegisterStyle()
case PP_LOCAL_SPACING:
{
noSpacing = false;
- if (!rParaStyle.GetSpacing())
- OverrideSpacing(nullptr,static_cast<LwpParaSpacingProperty*>(pProps)->GetSpacing(),pOverStyle);
- else
+ LwpSpacingOverride *pSpacing = static_cast<LwpParaSpacingProperty*>(pProps)->GetSpacing();
+ if (pSpacing)
{
- std::unique_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);
More information about the Libreoffice-commits
mailing list