diff options
author | Release Engineers <releng@openoffice.org> | 2009-07-10 09:34:54 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2009-07-10 09:34:54 +0000 |
commit | 54228cba143a91aad9d143009774bf453ac0595b (patch) | |
tree | 646578ad4b1b382bcf5de23b0cb24c17d09c4fcc /sw | |
parent | 923ee6026a02b3f2d7a370d5e038958940824e7c (diff) |
#i103441# fix the crash by removing the constructor with buggy ASSERT
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/rolbck.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/undo/rolbck.cxx | 15 |
2 files changed, 4 insertions, 14 deletions
diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx index fabe23403ac1..6dd6a90ad640 100644 --- a/sw/inc/rolbck.hxx +++ b/sw/inc/rolbck.hxx @@ -263,8 +263,7 @@ class SwHistoryTxtFlyCnt : public SwHistoryHint ::std::auto_ptr<SwUndoDelLayFmt> m_pUndo; public: - SwHistoryTxtFlyCnt( SwTxtFlyCnt* pTxtFly ); // for character-bound - SwHistoryTxtFlyCnt( SwFlyFrmFmt* pFlyFmt ); // for paragraph-bound + SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt ); virtual ~SwHistoryTxtFlyCnt(); virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); SwUndoDelLayFmt* GetUDelLFmt() { return m_pUndo.get(); } diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index fe8f375f09b6..aee144900959 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -566,17 +566,7 @@ void SwHistoryChangeFmtColl::SetInDoc( SwDoc* pDoc, bool ) } -SwHistoryTxtFlyCnt::SwHistoryTxtFlyCnt( SwTxtFlyCnt* pTxtFly ) - : SwHistoryHint( HSTRY_FLYCNT ) - , m_pUndo( new SwUndoDelLayFmt( pTxtFly->GetFlyCnt().GetFrmFmt() ) ) -{ - ASSERT( pTxtFly->GetFlyCnt().GetFrmFmt(), - "SwHistoryTxtFlyCnt: FlyCntnt without Format" ); - m_pUndo->ChgShowSel( FALSE ); -} - - -SwHistoryTxtFlyCnt::SwHistoryTxtFlyCnt( SwFlyFrmFmt* pFlyFmt ) +SwHistoryTxtFlyCnt::SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt ) : SwHistoryHint( HSTRY_FLYCNT ) , m_pUndo( new SwUndoDelLayFmt( pFlyFmt ) ) { @@ -1065,7 +1055,8 @@ void SwHistory::Add( SwTxtAttr* pHint, ULONG nNodeIdx, bool bNewAttr ) static_cast<SwTxtFtn*>(pHint), nNodeIdx ); break; case RES_TXTATR_FLYCNT: - pHt = new SwHistoryTxtFlyCnt( static_cast<SwTxtFlyCnt*>(pHint) ); + pHt = new SwHistoryTxtFlyCnt( static_cast<SwTxtFlyCnt*>(pHint) + ->GetFlyCnt().GetFrmFmt() ); break; case RES_TXTATR_FIELD: pHt = new SwHistorySetTxtFld( |