Kaydet (Commit) 3592f002 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) David Tardon

guard against missing alignment property

(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>
(cherry picked from commit 3b9e2bb2)

Change-Id: I1d4825c2136e516baf759f4b2c40c911547b93d7
Reviewed-on: https://gerrit.libreoffice.org/20544Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst a57ceea1
...@@ -385,19 +385,23 @@ void LwpPara::RegisterStyle() ...@@ -385,19 +385,23 @@ void LwpPara::RegisterStyle()
switch(PropType) switch(PropType)
{ {
case PP_LOCAL_ALIGN: case PP_LOCAL_ALIGN:
{
LwpAlignmentOverride *pAlignment = static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment();
if (pAlignment)
{ {
if (!rParaStyle.GetAlignment()) if (!rParaStyle.GetAlignment())
OverrideAlignment(NULL,static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment(),pOverStyle); OverrideAlignment(nullptr, pAlignment, pOverStyle);
else else
{ {
boost::scoped_ptr<LwpAlignmentOverride> const pAlign( std::unique_ptr<LwpAlignmentOverride> const pAlign(
rParaStyle.GetAlignment()->clone()); rParaStyle.GetAlignment()->clone());
OverrideAlignment(pAlign.get(), OverrideAlignment(pAlign.get(),
static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment(), pAlignment,
pOverStyle); 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