diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-29 12:05:56 +0000 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-03-30 16:49:02 +0100 |
commit | 685c847a00ee653bd0c2bd42a7f7f866885896e8 (patch) | |
tree | 206fa3aae91fb69a40c6324249ff0f98f12d7883 /cui/source | |
parent | 777a26b1802f92e26afdd147f76022ef345a393e (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>
(cherry picked from commit 6c29dbb7a1c3a04f3cbaa3dd720db482755538d7)
Reviewed-on: https://gerrit.libreoffice.org/69919
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'cui/source')
-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 009297050a59..4960f160357f 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -549,15 +549,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) |