diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-07-14 14:35:43 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-07-14 14:56:17 +0200 |
commit | e0cf60a4acfcb7788ebd145a1ddb7354b5d7d39a (patch) | |
tree | 7a7fc8be317a40e183f7aad44de99f03da2af07a /sw | |
parent | 7132dfe7b5030ef5a27a65e5ceaeca67dac96f13 (diff) |
sw: _SaveTable::CreateNew() fix invalid cast ...
... of SwTableFormat to SwTableBoxFormat for the temporary SwTableBox.
Change-Id: I74118b1b028bd71561f9afe6acd1cc95991a3761
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 40f9ef9c8013..f1cfb15d5aae 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -993,8 +993,9 @@ void _SaveTable::CreateNew( SwTable& rTable, bool bCreateFrms, pFormat->SetInCache( false ); } - // SwTableBox must have a format - SwTableBox aParent( static_cast<SwTableBoxFormat*>(pFormat), rTable.GetTabLines().size(), 0 ); + // SwTableBox must have a format - the SwTableBox takes ownership of it + SwTableBoxFormat *const pNewFormat(pFormat->GetDoc()->MakeTableBoxFormat()); + SwTableBox aParent(pNewFormat, rTable.GetTabLines().size(), 0); // fill FrameFormats with defaults (0) pFormat = 0; |