[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Wed Dec 9 08:50:09 PST 2015
lotuswordpro/source/filter/lwppara.cxx | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
New commits:
commit 3b9e2bb22e782d073d8e67ae975ebb8ca5eea552
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 9 16:48:29 2015 +0000
guard against missing alignment property
Change-Id: I1d4825c2136e516baf759f4b2c40c911547b93d7
(cherry picked from commit 7e341379ecec218c0ff2ff0e8db9f14468b125f6)
Reviewed-on: https://gerrit.libreoffice.org/20543
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index f42c030..6226e0d 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -380,18 +380,22 @@ void LwpPara::RegisterStyle()
{
case PP_LOCAL_ALIGN:
{
- if (!rParaStyle.GetAlignment())
- OverrideAlignment(nullptr,static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment(),pOverStyle);
- else
+ LwpAlignmentOverride *pAlignment = static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment();
+ if (pAlignment)
{
- std::unique_ptr<LwpAlignmentOverride> const pAlign(
- rParaStyle.GetAlignment()->clone());
- OverrideAlignment(pAlign.get(),
- static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment(),
- pOverStyle);
+ if (!rParaStyle.GetAlignment())
+ OverrideAlignment(nullptr, pAlignment, pOverStyle);
+ else
+ {
+ std::unique_ptr<LwpAlignmentOverride> const pAlign(
+ rParaStyle.GetAlignment()->clone());
+ OverrideAlignment(pAlign.get(),
+ pAlignment,
+ pOverStyle);
+ }
}
- }
break;
+ }
case PP_LOCAL_INDENT:
{
noIndent = false;
More information about the Libreoffice-commits
mailing list