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

Stephan Bergmann sbergman at redhat.com
Tue Feb 13 17:57:43 UTC 2018


 sw/source/ui/frmdlg/frmpage.cxx |    2 +-
 sw/source/ui/frmdlg/wrap.cxx    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8ba59842236056fd008965e6e1f72fd166151e63
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Feb 13 18:55:38 2018 +0100

    Avoid needless, wrong downcast from SfxItemSet to SwAttrSet
    
    ...as seen in UBSan builds when, on an image in Writer, selecting context menu's
    "Properties..." to open the "Image" dialog
    
    Change-Id: I6e5bb6835dacf24d47e47c9185f11fa6ad0edc4d

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 7abd90d9ae98..cdcbc6744ff7 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1812,7 +1812,7 @@ void SwFramePage::RangeModifyHdl()
     SwWrtShell* pSh = m_bFormat ? ::GetActiveWrtShell()
                         : getFrameDlgParentShell();
     OSL_ENSURE(pSh , "shell not found");
-    SwFlyFrameAttrMgr aMgr( m_bNew, pSh, static_cast<const SwAttrSet&>(GetItemSet()) );
+    SwFlyFrameAttrMgr aMgr( m_bNew, pSh, GetItemSet() );
     SvxSwFrameValidation        aVal;
 
     aVal.nAnchorType = GetAnchor();
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 884512955450..d70894f38649 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -390,7 +390,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
     if (!m_bDrawMode)
     {
         SwWrtShell* pSh = m_bFormat ? ::GetActiveWrtShell() : m_pWrtSh;
-        SwFlyFrameAttrMgr aMgr( m_bNew, pSh, static_cast<const SwAttrSet&>(GetItemSet()) );
+        SwFlyFrameAttrMgr aMgr( m_bNew, pSh, GetItemSet() );
         SvxSwFrameValidation aVal;
 
         // size


More information about the Libreoffice-commits mailing list