[Libreoffice-commits] core.git: Branch 'libreoffice-5-0-4' - lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Thu Dec 10 07:28:18 PST 2015
lotuswordpro/source/filter/lwppara.cxx | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
New commits:
commit cf3acc198c804140e2dab73a0ee4df81a6ae5927
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 10 09:35:46 2015 +0000
guard against missing spacing property
(cherry picked from commit 10de96bf0fb820b38607b0c25a0d3219ad343819)
Reviewed-on: https://gerrit.libreoffice.org/20569
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit cb6f34b370da1d45e1c2b945b60cbcaf7b9c3a45)
Change-Id: If5c50cddfee88cc92852737c1459ebe94b7256bb
Reviewed-on: https://gerrit.libreoffice.org/20571
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 7cebb58..f6f7c90 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);
More information about the Libreoffice-commits
mailing list