diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-29 12:05:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-29 14:43:11 +0100 |
commit | 6c29dbb7a1c3a04f3cbaa3dd720db482755538d7 (patch) | |
tree | b6b8bba30888212db7bdca46fe818fb50590efce /cui/source/tabpages/border.cxx | |
parent | f1c27ccc7ece38cc5395c14d01d634fd4bb77c11 (diff) |
Resolves: tdf#124410 crash cell border page with diagonal borders
Change-Id: I0fd8738d42ad33f029381dae0ec9f41e7912b72c
Reviewed-on: https://gerrit.libreoffice.org/69918
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/tabpages/border.cxx')
-rw-r--r-- | cui/source/tabpages/border.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index e8169f2cb0e0..eefb6a6a50d0 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -540,15 +540,19 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet ) if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::TLBR)) { sal_uInt16 nBorderDiagId = pPool->GetWhich(SID_ATTR_BORDER_DIAG_TLBR); - const SvxLineItem& rLineItem(*static_cast<const SvxLineItem*>(rSet->GetItem(nBorderDiagId))); - m_aFrameSel.ShowBorder(svx::FrameBorderType::TLBR, rLineItem.GetLine()); + if (const SvxLineItem* pLineItem = static_cast<const SvxLineItem*>(rSet->GetItem(nBorderDiagId))) + m_aFrameSel.ShowBorder(svx::FrameBorderType::TLBR, pLineItem->GetLine()); + else + m_aFrameSel.SetBorderDontCare(svx::FrameBorderType::TLBR); } if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::BLTR)) { sal_uInt16 nBorderDiagId = pPool->GetWhich(SID_ATTR_BORDER_DIAG_BLTR); - const SvxLineItem& rLineItem(*static_cast<const SvxLineItem*>(rSet->GetItem(nBorderDiagId))); - m_aFrameSel.ShowBorder(svx::FrameBorderType::BLTR, rLineItem.GetLine()); + if (const SvxLineItem* pLineItem = static_cast<const SvxLineItem*>(rSet->GetItem(nBorderDiagId))) + m_aFrameSel.ShowBorder(svx::FrameBorderType::BLTR, pLineItem->GetLine()); + else + m_aFrameSel.SetBorderDontCare(svx::FrameBorderType::BLTR); } if (m_xShadowControls) |