simpleengine/xmlutils/src/simpledocument.cpp
branchRCL_3
changeset 34 2669f8761a99
parent 18 52d91a16fec3
child 35 fbd2e7cec7ef
--- a/simpleengine/xmlutils/src/simpledocument.cpp	Thu Aug 19 10:19:02 2010 +0300
+++ b/simpleengine/xmlutils/src/simpledocument.cpp	Tue Aug 31 15:35:50 2010 +0300
@@ -196,14 +196,12 @@
 void CSimpleDocument::GetDirectContentsL( 
     RPointerArray<MSimpleContent>& aContents )
     {
-    CleanupClosePushL( aContents ); 
     aContents.Reset();
     TInt myCount = iContents.Count();
     for ( TInt i = 0; i<myCount; i++ )
         {
-        aContents.AppendL( iContents[i] );
-        }
-    CleanupStack::Pop( &aContents );
+        User::LeaveIfError( aContents.Append( iContents[i] ));
+        }               
     }
     
 // ----------------------------------------------------------
@@ -655,7 +653,7 @@
     // Let's convert first ROOT element into CBodyPart
     CBodyPart* root = CBodyPart::NewL();
     // Add into cleanup array
-    aBodies.AppendL( root );     
+    aBodies.Append( root );     
     CSenElement* e = Root()->BaseElement();
     
     // externalize the document into stream
@@ -678,7 +676,7 @@
     // calculate the size of headers
     TInt headerSize = KContentTypeSize + KCIDSize;
     HBufC8* headers = HBufC8::NewL( headerSize );  
-    aBuffers.AppendL( headers );
+    aBuffers.Append( headers );
     TPtr8 pH(headers->Des());
     // append to MIME headers for the root part   
     pH.Append( NSimpleDocument::NSimpleRoot::KContentType );
@@ -691,7 +689,7 @@
         { 
         // Let's convert next element into CBodyPart
         CBodyPart* cp = CBodyPart::NewL();
-        aBodies.AppendL( cp );                
+        aBodies.Append( cp );                
          
         // Set Headers
         headerSize = NSimpleDocument::NSimpleContent::KContentTypeSize + 
@@ -702,7 +700,7 @@
         
         headers = HBufC8::NewL( headerSize );
         // Append to cleanup array  
-        aBuffers.AppendL( headers );
+        aBuffers.Append( headers );
         pH.Set( headers->Des() );
 
         // _LIT8( KMyContentType, "Content-Type: %S\r\n"); 
@@ -718,7 +716,7 @@
                     
         // BASE64 encode
         HBufC8* body64 = HBufC8::NewL( (iContents[i])->Body().Length() * KB64Expand );  
-        aBuffers.AppendL( body64 );        
+        aBuffers.Append( body64 );        
         TImCodecB64 codec64;
         codec64.Initialise();        
         TPtr8 desti8 = body64->Des();