Kaydet (Commit) 3b9e2bb2 authored tarafından Caolán McNamara's avatar Caolán McNamara

guard against missing alignment property

Change-Id: I1d4825c2136e516baf759f4b2c40c911547b93d7
(cherry picked from commit 7e341379)
Reviewed-on: https://gerrit.libreoffice.org/20543Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 4d21f86a
...@@ -380,18 +380,22 @@ void LwpPara::RegisterStyle() ...@@ -380,18 +380,22 @@ void LwpPara::RegisterStyle()
{ {
case PP_LOCAL_ALIGN: case PP_LOCAL_ALIGN:
{ {
if (!rParaStyle.GetAlignment()) LwpAlignmentOverride *pAlignment = static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment();
OverrideAlignment(nullptr,static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment(),pOverStyle); if (pAlignment)
else
{ {
std::unique_ptr<LwpAlignmentOverride> const pAlign( if (!rParaStyle.GetAlignment())
rParaStyle.GetAlignment()->clone()); OverrideAlignment(nullptr, pAlignment, pOverStyle);
OverrideAlignment(pAlign.get(), else
static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment(), {
pOverStyle); std::unique_ptr<LwpAlignmentOverride> const pAlign(
rParaStyle.GetAlignment()->clone());
OverrideAlignment(pAlign.get(),
pAlignment,
pOverStyle);
}
} }
}
break; break;
}
case PP_LOCAL_INDENT: case PP_LOCAL_INDENT:
{ {
noIndent = false; noIndent = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment