Commits

Anonymous committed 64612b4

#i103441# fix the crash by removing the constructor with buggy ASSERT

  • Participants
  • Parent commits dfc7c65

Comments (0)

Files changed (2)

sw/inc/rolbck.hxx

     ::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(); }

sw/source/core/undo/rolbck.cxx

 }
 
 
-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 ) )
 {
                             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(