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
......@@ -386,18 +386,22 @@ void LwpPara::RegisterStyle()
{
case PP_LOCAL_ALIGN:
{
if (!rParaStyle.GetAlignment())
OverrideAlignment(NULL,static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment(),pOverStyle);
else
LwpAlignmentOverride *pAlignment = static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment();
if (pAlignment)
{
boost::scoped_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;
......
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