summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-21 21:23:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-22 00:44:47 +0100
commit8aa37ca1b94a340c0ca3dc4edebdc501edc25cf5 (patch)
treed521647d5fc78d804adcf2eacaa9f539ad19948a
parentff8826d438a9fd080e8e61f8e66b3d3b2c8d752b (diff)
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@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/doc/tblrwcl.cxx10
1 files changed, 5 insertions, 5 deletions
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 )