[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Sun Jan 21 23:45:13 UTC 2018
sw/source/core/doc/tblrwcl.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 8aa37ca1b94a340c0ca3dc4edebdc501edc25cf5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jan 21 21:23:11 2018 +0000
ubsan SwTableBoxFormat is really SwTableLineFormat
/sw/source/core/doc/tblrwcl.cxx:1937:29: runtime error: downcast of address 0x2b328cff7da8 which does not point to an object of type ´SwTableBoxFormat´
0x2b328cff7da8: note: object is of type ´SwTableLineFormat´
00 00 00 00 f0 ea dd 46 32 2b 00 00 b8 80 ff 8c 32 2b 00 00 e8 43 f5 00 90 61 00 00 58 79 65 80
^~~~~~~~~~~~~~~~~~~~~~~
vptr for ´SwTableLineFormat´
#0 0x2b323c386daf in lcl_CopyLineToDoc(FndLine_ const&, CpyPara*) /sw/source/core/doc/tblrwcl.cxx:1937:29
Change-Id: I16f7b61a3561de3e599818aba538c72c631511ca
Reviewed-on: https://gerrit.libreoffice.org/48282
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 505ecc7c92eb..dd1856646ed4 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -79,12 +79,12 @@ using namespace com::sun::star::uno;
struct CpyTabFrame
{
union {
- SwTableBoxFormat *pFrameFormat; // for CopyCol
- SwTwips nSize; // for DelCol
+ SwFrameFormat* pFrameFormat; // for CopyCol
+ SwTwips nSize; // for DelCol
} Value;
SwTableBoxFormat *pNewFrameFormat;
- explicit CpyTabFrame( SwTableBoxFormat* pAktFrameFormat ) : pNewFrameFormat( nullptr )
+ explicit CpyTabFrame(SwFrameFormat* pAktFrameFormat) : pNewFrameFormat( nullptr )
{ Value.pFrameFormat = pAktFrameFormat; }
bool operator==( const CpyTabFrame& rCpyTabFrame ) const
@@ -279,7 +279,7 @@ static void lcl_CopyCol( FndBox_ & rFndBox, CpyPara *const pCpyPara)
{
// Look up the Frame Format in the Frame Format Array
SwTableBox* pBox = rFndBox.GetBox();
- CpyTabFrame aFindFrame( static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()) );
+ CpyTabFrame aFindFrame(pBox->GetFrameFormat());
sal_uInt16 nFndPos;
if( pCpyPara->nCpyCnt )
@@ -379,7 +379,7 @@ static void lcl_CopyCol( FndBox_ & rFndBox, CpyPara *const pCpyPara)
? rBoxItem.GetTop()
: rBoxItem.GetRight() )
{
- aFindFrame.Value.pFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat());
+ aFindFrame.Value.pFrameFormat = pBox->GetFrameFormat();
SvxBoxItem aNew( rBoxItem );
if( 8 > pCpyPara->nDelBorderFlag )
More information about the Libreoffice-commits
mailing list