[Libreoffice-commits] core.git: cui/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Mar 29 13:43:38 UTC 2019


 cui/source/tabpages/border.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 6c29dbb7a1c3a04f3cbaa3dd720db482755538d7
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 29 12:05:56 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Mar 29 14:43:11 2019 +0100

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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)


More information about the Libreoffice-commits mailing list