Kaydet (Commit) 8a3f61c4 authored tarafından Caolán McNamara's avatar Caolán McNamara

Revert "Check pointer before deferenging"

these are all exception enabled .o's new doesn't return NULL on failure, it
throws bad_alloc

This reverts commit 6b379300.
üst 6b379300
......@@ -78,17 +78,12 @@ sal_Bool SwServerObject::GetData( uno::Any & rData,
case SECTION_SERVER:
pPam = new SwPaM( SwPosition( *CNTNT_TYPE.pSectNd ) );
if (!pPam)
{
break;
}
pPam->Move( fnMoveForward );
pPam->SetMark();
pPam->GetPoint()->nNode = *CNTNT_TYPE.pSectNd->EndOfSectionNode();
pPam->Move( fnMoveBackward );
break;
case NONE_SERVER:
break;
case NONE_SERVER: break;
}
if( pPam )
......
......@@ -830,14 +830,11 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
else
{
pPam = new SwPaM( *pPam );
if (pPam)
{
pPam->Move( fnMoveBackward, fnGoDoc );
pPam->SetMark();
pPam->Move( fnMoveForward, fnGoDoc );
}
}
}
// pPam ist immer noch der akt. Cursor !!
}
else
......@@ -845,8 +842,6 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
// keine Shell oder alles schreiben -> eigenen Pam erzeugen
SwDoc* pOutDoc = pDoc ? pDoc : &rDoc;
pPam = new SwPaM( pOutDoc->GetNodes().GetEndOfContent() );
if (pPam)
{
if( pOutDoc->IsClipBoard() )
{
pPam->Move( fnMoveBackward, fnGoDoc );
......@@ -859,7 +854,6 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
pPam->Move( fnMoveBackward, fnGoDoc );
}
}
}
rxWriter->bWriteAll = bWriteAll;
SwDoc* pOutDoc = pDoc ? pDoc : &rDoc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment