summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/lwppara.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro/source/filter/lwppara.cxx')
-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);