|
1 /* |
|
2 * Copyright (c) 2006,2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Provides CUniEditorProcessImageOperation methods. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // ========== INCLUDE FILES ================================ |
|
21 |
|
22 #include <apmstd.h> |
|
23 |
|
24 #include <icl/imagedata.h> |
|
25 |
|
26 #include <centralrepository.h> |
|
27 |
|
28 #include <messagingvariant.hrh> |
|
29 #include <messaginginternalcrkeys.h> // for Central Repository keys |
|
30 |
|
31 #include <MsgMediaResolver.h> |
|
32 #include <MsgImageInfo.h> |
|
33 #include <MmsConformance.h> |
|
34 #include <MsgMimeTypes.h> |
|
35 |
|
36 #include <uniimageprocessor.h> |
|
37 #include <unimsventry.h> |
|
38 |
|
39 #include <mmsvattachmentmanager.h> |
|
40 #include <mmsvattachmentmanagersync.h> |
|
41 #include <cmsvattachment.h> |
|
42 |
|
43 #include <msgtextutils.h> |
|
44 |
|
45 #include <mmssettingsdefs.h> |
|
46 |
|
47 #include "UniClientMtm.h" |
|
48 #include "UniEditorEnum.h" |
|
49 #include "UniEditorDocument.h" |
|
50 #include "UniEditorProcessImageOperation.h" |
|
51 |
|
52 // ========== CONSTANTS ==================================== |
|
53 |
|
54 // Leave some space after compression so that text can be inserted to the |
|
55 // message. |
|
56 const TInt KUniCompressionMargin = 10 * 1024; // 10 kB |
|
57 |
|
58 const TInt KUniMmsUploadImageWidth = 1600; |
|
59 const TInt KUniMmsUploadImageHeight = 1200; |
|
60 |
|
61 |
|
62 _LIT8( KUniExtImageJpeg_8, ".jpg" ); |
|
63 _LIT8( KUniExtImageGif_8, ".gif" ); |
|
64 |
|
65 // ========== MEMBER FUNCTIONS ============================= |
|
66 |
|
67 // --------------------------------------------------------- |
|
68 // CUniEditorProcessImageOperation::NewL |
|
69 // |
|
70 // Factory method. |
|
71 // --------------------------------------------------------- |
|
72 // |
|
73 CUniEditorProcessImageOperation* CUniEditorProcessImageOperation::NewL( |
|
74 MUniEditorOperationObserver& aObserver, |
|
75 CUniEditorDocument& aDocument, |
|
76 RFs& aFs ) |
|
77 { |
|
78 CUniEditorProcessImageOperation* self = new ( ELeave ) CUniEditorProcessImageOperation( |
|
79 aObserver, |
|
80 aDocument, |
|
81 aFs ); |
|
82 |
|
83 CleanupStack::PushL( self ); |
|
84 self->ConstructL(); |
|
85 CleanupStack::Pop( self ); |
|
86 |
|
87 return self; |
|
88 } |
|
89 |
|
90 // --------------------------------------------------------- |
|
91 // CUniEditorProcessImageOperation::CUniEditorProcessImageOperation. |
|
92 // --------------------------------------------------------- |
|
93 // |
|
94 CUniEditorProcessImageOperation::CUniEditorProcessImageOperation( |
|
95 MUniEditorOperationObserver& aObserver, |
|
96 CUniEditorDocument& aDocument, |
|
97 RFs& aFs ) : |
|
98 CUniEditorOperation( aObserver, aDocument, aFs, EUniEditorOperationProcessImage ), |
|
99 iNewAttaId( KMsvNullIndexEntryId ) |
|
100 { |
|
101 } |
|
102 |
|
103 // --------------------------------------------------------- |
|
104 // CUniEditorProcessImageOperation::ConstructL |
|
105 // |
|
106 // 2nd phase constructor. |
|
107 // --------------------------------------------------------- |
|
108 // |
|
109 void CUniEditorProcessImageOperation::ConstructL() |
|
110 { |
|
111 BaseConstructL(); |
|
112 |
|
113 TInt featureBitmask( 0 ); |
|
114 |
|
115 CRepository* repository = CRepository::NewL( KCRUidMuiuVariation ); |
|
116 repository->Get( KMuiuMmsFeatures, featureBitmask ); |
|
117 |
|
118 iExactImageScaling = ( featureBitmask & KMmsFeatureIdExactImageScaling ); |
|
119 |
|
120 delete repository; |
|
121 } |
|
122 |
|
123 // --------------------------------------------------------- |
|
124 // CUniEditorProcessImageOperation::~CUniEditorProcessImageOperation |
|
125 // --------------------------------------------------------- |
|
126 // |
|
127 CUniEditorProcessImageOperation::~CUniEditorProcessImageOperation() |
|
128 { |
|
129 Cancel(); |
|
130 |
|
131 delete iNewImageInfo; |
|
132 iNewImageFile.Close(); |
|
133 delete iEditStore; |
|
134 delete iImageProcessor; |
|
135 } |
|
136 |
|
137 // --------------------------------------------------------- |
|
138 // CUniEditorProcessImageOperation::Process |
|
139 // --------------------------------------------------------- |
|
140 // |
|
141 void CUniEditorProcessImageOperation::Process( CMsgImageInfo* aImageInfo, |
|
142 TMsvAttachmentId aAttachmentId, |
|
143 TInt aMessageSize ) |
|
144 { |
|
145 ResetErrors(); |
|
146 |
|
147 iImageInfo = aImageInfo; |
|
148 iAttachmentId = aAttachmentId; |
|
149 iMessageSize = aMessageSize; |
|
150 iOperationState = EUniProcessImgCheck; |
|
151 |
|
152 CompleteSelf( KErrNone ); |
|
153 } |
|
154 |
|
155 // --------------------------------------------------------- |
|
156 // CUniEditorProcessImageOperation::DetachAttachmentId |
|
157 // --------------------------------------------------------- |
|
158 // |
|
159 void CUniEditorProcessImageOperation::DetachAttachmentId( TMsvAttachmentId& aAttachmentId ) |
|
160 { |
|
161 // iNewImageInfo may be already detached in DetachImageInfo |
|
162 aAttachmentId = iNewAttaId; |
|
163 iNewAttaId = KMsvNullIndexEntryId; |
|
164 } |
|
165 |
|
166 // --------------------------------------------------------- |
|
167 // CUniEditorProcessImageOperation::RunL |
|
168 // --------------------------------------------------------- |
|
169 // |
|
170 void CUniEditorProcessImageOperation::RunL() |
|
171 { |
|
172 PrintOperationAndState(); |
|
173 if ( iStatus.Int() != KErrNone ) |
|
174 { |
|
175 SetError( iStatus.Int() ); |
|
176 iOperationState = EUniProcessImgError; |
|
177 } |
|
178 |
|
179 switch ( iOperationState ) |
|
180 { |
|
181 case EUniProcessImgCheck: |
|
182 { |
|
183 DoStartCheck(); |
|
184 break; |
|
185 } |
|
186 case EUniProcessImgProcess: |
|
187 { |
|
188 DoStartProcessL(); |
|
189 break; |
|
190 } |
|
191 case EUniProcessImgResolve: |
|
192 { |
|
193 DoStartResolveL(); |
|
194 break; |
|
195 } |
|
196 case EUniProcessImgReady: |
|
197 { |
|
198 iObserver.EditorOperationEvent( EUniEditorOperationProcessImage, |
|
199 EUniEditorOperationComplete ); |
|
200 break; |
|
201 } |
|
202 case EUniProcessImgError: |
|
203 { |
|
204 DoErrorWithoutStateChange(); |
|
205 iObserver.EditorOperationEvent( EUniEditorOperationProcessImage, |
|
206 EUniEditorOperationError ); |
|
207 break; |
|
208 } |
|
209 default: |
|
210 { |
|
211 iObserver.EditorOperationEvent( EUniEditorOperationProcessImage, |
|
212 EUniEditorOperationError ); |
|
213 break; |
|
214 } |
|
215 } |
|
216 } |
|
217 |
|
218 // --------------------------------------------------------- |
|
219 // CUniEditorProcessImageOperation::DoCancelCleanup |
|
220 // --------------------------------------------------------- |
|
221 // |
|
222 void CUniEditorProcessImageOperation::DoCancelCleanup() |
|
223 { |
|
224 if ( iImageProcessor ) |
|
225 { |
|
226 iImageProcessor->Cancel(); |
|
227 } |
|
228 |
|
229 DoErrorWithoutStateChange(); |
|
230 } |
|
231 |
|
232 // --------------------------------------------------------- |
|
233 // CUniEditorProcessImageOperation::DoStartCheck |
|
234 // --------------------------------------------------------- |
|
235 // |
|
236 void CUniEditorProcessImageOperation::DoStartCheck() |
|
237 { |
|
238 if ( !CheckNeedToProcess() ) |
|
239 { |
|
240 iOperationState = EUniProcessImgError; |
|
241 } |
|
242 else if ( iProcessMethod == EUniProcessImgMethodNone ) |
|
243 { |
|
244 iOperationState = EUniProcessImgReady; |
|
245 } |
|
246 else |
|
247 { |
|
248 iOperationState = EUniProcessImgProcess; |
|
249 } |
|
250 CompleteSelf( KErrNone ); |
|
251 } |
|
252 |
|
253 // --------------------------------------------------------- |
|
254 // CUniEditorProcessImageOperation::DoStartProcessL |
|
255 // --------------------------------------------------------- |
|
256 // |
|
257 void CUniEditorProcessImageOperation::DoStartProcessL() |
|
258 { |
|
259 CreateEmptyAttachmentL(); |
|
260 |
|
261 if ( !iImageProcessor ) |
|
262 { |
|
263 iImageProcessor = new( ELeave )CUniImageProcessor( this ); |
|
264 } |
|
265 |
|
266 RFile sourceFile = OpenFileForReadingL(); |
|
267 |
|
268 CleanupClosePushL( sourceFile ); |
|
269 |
|
270 iImageProcessor->ProcessImageL( sourceFile, |
|
271 iNewImageFile, |
|
272 iScaleSize, |
|
273 iTargetType.Des8(), |
|
274 ETrue, // Always maintain aspect ratio |
|
275 iDocument.MaxMessageSize() - KUniCompressionMargin ); |
|
276 SetPending(); |
|
277 |
|
278 CleanupStack::PopAndDestroy(); // sourceFile; |
|
279 } |
|
280 |
|
281 // --------------------------------------------------------- |
|
282 // CUniEditorProcessImageOperation::DoStartResolveL |
|
283 // --------------------------------------------------------- |
|
284 // |
|
285 void CUniEditorProcessImageOperation::DoStartResolveL() |
|
286 { |
|
287 iNewImageInfo = static_cast<CMsgImageInfo*>(iDocument.DataModel()->MediaResolver().CreateMediaInfoL( iNewImageFile ) ); |
|
288 iDocument.DataModel()->MediaResolver().ParseInfoDetailsL( iNewImageInfo, iNewImageFile ); |
|
289 |
|
290 iOperationState = EUniProcessImgReady; |
|
291 |
|
292 iNewImageFile.Close(); |
|
293 |
|
294 __ASSERT_DEBUG( iEditStore, Panic( EUniNullPointer ) ); |
|
295 |
|
296 iEditStore->CommitL(); |
|
297 delete iEditStore; |
|
298 iEditStore = NULL; |
|
299 |
|
300 CompleteSelf( KErrNone ); |
|
301 } |
|
302 |
|
303 // --------------------------------------------------------- |
|
304 // CUniEditorProcessImageOperation::DoErrorWithoutStateChange |
|
305 // --------------------------------------------------------- |
|
306 // |
|
307 void CUniEditorProcessImageOperation::DoErrorWithoutStateChange() |
|
308 { |
|
309 iNewImageFile.Close(); |
|
310 delete iNewImageInfo; |
|
311 iNewImageInfo = NULL; |
|
312 |
|
313 delete iEditStore; |
|
314 iEditStore = NULL; |
|
315 } |
|
316 |
|
317 // --------------------------------------------------------- |
|
318 // CUniEditorProcessImageOperation::ImageProcessingReady |
|
319 // |
|
320 // Image Compressor callback implementation. |
|
321 // --------------------------------------------------------- |
|
322 // |
|
323 void CUniEditorProcessImageOperation::ImageProcessingReady( TSize aBitmapSize, TInt aFileSize, TBool aCompressed ) |
|
324 { |
|
325 TInt err = iImageProcessor->Error(); |
|
326 |
|
327 if ( err == KErrNone && |
|
328 ( aBitmapSize.iWidth == 0 || aBitmapSize.iHeight == 0 || |
|
329 ( aCompressed && |
|
330 ( aFileSize == 0 || |
|
331 aFileSize > ( iDocument.MaxMessageSize() - KUniCompressionMargin ) ) ) ) ) |
|
332 { |
|
333 err = KErrGeneral; |
|
334 } |
|
335 |
|
336 switch ( err ) |
|
337 { |
|
338 case KErrNone: |
|
339 { |
|
340 iOperationState = EUniProcessImgResolve; |
|
341 if ( aCompressed ) |
|
342 { |
|
343 SetError( EUniProcessImgCompressSuccessful ); |
|
344 } |
|
345 break; |
|
346 } |
|
347 case KErrNoMemory: |
|
348 { |
|
349 iOperationState = EUniProcessImgError; |
|
350 SetError( EUniProcessImgOutOfMemory ); |
|
351 break; |
|
352 } |
|
353 case KErrDiskFull: |
|
354 { |
|
355 iOperationState = EUniProcessImgError; |
|
356 SetError( EUniProcessImgOutOfDisk ); |
|
357 break; |
|
358 } |
|
359 case KErrNotFound: |
|
360 { |
|
361 iOperationState = EUniProcessImgError; |
|
362 SetError( EUniProcessImgNotFound ); |
|
363 break; |
|
364 } |
|
365 default: |
|
366 { |
|
367 iOperationState = EUniProcessImgError; |
|
368 if ( aCompressed ) |
|
369 { |
|
370 SetError( EUniProcessImgCompressFailed ); |
|
371 } |
|
372 else |
|
373 { |
|
374 SetError( EUniProcessImgScalingFailed ); |
|
375 } |
|
376 break; |
|
377 } |
|
378 } |
|
379 |
|
380 if ( err == KErrCancel ) |
|
381 { |
|
382 CompleteOperation( KErrCancel ); |
|
383 } |
|
384 else |
|
385 { |
|
386 CompleteOperation( KErrNone ); |
|
387 } |
|
388 } |
|
389 |
|
390 // --------------------------------------------------------- |
|
391 // CUniEditorProcessImageOperation::CheckNeedToProcess |
|
392 // |
|
393 // Checks if scaling/converting/compression is needed. |
|
394 // --------------------------------------------------------- |
|
395 // |
|
396 TBool CUniEditorProcessImageOperation::CheckNeedToProcess() |
|
397 { |
|
398 iProcessMethod = EUniProcessImgMethodNone; |
|
399 |
|
400 TMmsConformance conformance = |
|
401 iDocument.DataModel()->MmsConformance().MediaConformance( *iImageInfo ); |
|
402 |
|
403 if ( conformance.iCanAdapt == EFalse ) |
|
404 { |
|
405 return ETrue; |
|
406 } |
|
407 |
|
408 TSize origSize = iImageInfo->Dimensions(); |
|
409 |
|
410 if ( origSize.iWidth == 0 || origSize.iHeight == 0 ) |
|
411 { |
|
412 // Cannot get size -> corrupted |
|
413 SetError( EUniProcessImgCorrupted ); |
|
414 return ETrue; |
|
415 } |
|
416 |
|
417 TSize scaleSize = ImageSendSize(); |
|
418 TSize optimizedSize = origSize; |
|
419 |
|
420 while ( optimizedSize.iWidth > scaleSize.iWidth || |
|
421 optimizedSize.iHeight > scaleSize.iHeight ) |
|
422 { |
|
423 // Largest possible (1/2)^n size |
|
424 optimizedSize.iWidth >>= 1; |
|
425 optimizedSize.iHeight >>= 1; |
|
426 } |
|
427 |
|
428 if ( scaleSize.iWidth < origSize.iWidth || |
|
429 scaleSize.iHeight < origSize.iHeight ) |
|
430 { |
|
431 if ( !iExactImageScaling && |
|
432 ( scaleSize.iWidth > KMmsUniImageSmallWidth || |
|
433 scaleSize.iHeight > KMmsUniImageSmallHeight ) ) |
|
434 { |
|
435 // Use optimized (1/2^n) size when scaling |
|
436 // to larger than "Small" |
|
437 scaleSize = optimizedSize; |
|
438 } |
|
439 // else -> scale to exact (non-optimized) size |
|
440 |
|
441 iProcessMethod |= EUniProcessImgMethodScale; |
|
442 } |
|
443 else |
|
444 { |
|
445 // Scaling not needed. Check possible conversion need. |
|
446 scaleSize = origSize; |
|
447 |
|
448 if ( conformance.iConfStatus & EMmsConfNokConversionNeeded ) |
|
449 { |
|
450 // Conversion needed. |
|
451 iProcessMethod |= EUniProcessImgMethodConvert; |
|
452 } |
|
453 } |
|
454 |
|
455 if ( !( iProcessMethod & EUniProcessImgMethodScale ) && |
|
456 ( iImageInfo->FileSize() + iMessageSize ) > iDocument.MaxMessageSize() && |
|
457 iImageInfo->MimeType().CompareF( KMsgMimeImageJpeg ) == 0 && |
|
458 iMessageSize < KUniCompressionMargin ) |
|
459 { |
|
460 // Only compression needed as image is JPEG that is larger than can be fitted |
|
461 // into the message and scaling is not performed. Also current message size |
|
462 // is under comression margin. |
|
463 iProcessMethod |= EUniProcessImgMethodCompress; |
|
464 } |
|
465 |
|
466 TBool largeImageQuery = EFalse; |
|
467 |
|
468 if ( iProcessMethod == EUniProcessImgMethodNone ) |
|
469 { |
|
470 // Image won't be processed |
|
471 if ( ( origSize.iWidth > KImageRichWidth || |
|
472 origSize.iHeight > KImageRichHeight ) && |
|
473 ( iImageInfo->FileSize() + iMessageSize ) < iDocument.MaxMessageSize() ) |
|
474 { |
|
475 // Original image width or height is "non-conformant" and original image would |
|
476 // fit to into the message without any processing. |
|
477 largeImageQuery = ETrue; |
|
478 } |
|
479 } |
|
480 else |
|
481 { |
|
482 // Image will be processed |
|
483 if ( scaleSize.iWidth > KImageRichWidth || |
|
484 scaleSize.iHeight > KImageRichHeight ) |
|
485 { |
|
486 // Processed image is "non-conformant" after processing. |
|
487 largeImageQuery = ETrue; |
|
488 } |
|
489 } |
|
490 |
|
491 if ( largeImageQuery && iDocument.CreationMode() == EMmsCreationModeWarning ) |
|
492 { |
|
493 // Observer will make the final decision whether it will show the query or not. |
|
494 if ( !iObserver.EditorOperationQuery( EUniEditorOperationProcessImage, |
|
495 EMEOQueryGuidedInsertLarge ) ) |
|
496 { |
|
497 SetError( EUniProcessImgUserAbort ); |
|
498 return EFalse; // Abort |
|
499 } |
|
500 } |
|
501 |
|
502 iScaleSize = scaleSize; |
|
503 return ETrue; |
|
504 } |
|
505 |
|
506 // --------------------------------------------------------- |
|
507 // CUniEditorProcessImageOperation::CreateEmptyAttachmentL |
|
508 // --------------------------------------------------------- |
|
509 // |
|
510 void CUniEditorProcessImageOperation::CreateEmptyAttachmentL() |
|
511 { |
|
512 iNewAttaId = KMsvNullIndexEntryId; |
|
513 |
|
514 // Get the file name from original full path name. |
|
515 TParsePtrC parser( iImageInfo->FullFilePath() ); |
|
516 |
|
517 TFileName ext( parser.Ext() ); |
|
518 iTargetType = iImageInfo->MimeType(); |
|
519 |
|
520 if ( iTargetType.Des8().CompareF( KMsgMimeImagePng ) == 0 ) |
|
521 { |
|
522 //png is non-conformant image type |
|
523 //->convert to jpeg |
|
524 iTargetType = TDataType( KMsgMimeImageJpeg ); |
|
525 ext.Zero(); |
|
526 ext.Copy( KUniExtImageJpeg_8 ); |
|
527 } |
|
528 else if ( iTargetType.Des8().CompareF( KMsgMimeImageWbmp ) == 0 ) |
|
529 { |
|
530 //no wbmp encoder |
|
531 //->convert to gif if scaling is needed |
|
532 iTargetType = TDataType( KMsgMimeImageGif ); |
|
533 ext.Zero(); |
|
534 ext.Copy( KUniExtImageGif_8 ); |
|
535 } |
|
536 |
|
537 TFileName newFileName( parser.Name() ); |
|
538 newFileName.Append( ext ); |
|
539 |
|
540 iEditStore = iDocument.Mtm().Entry().EditStoreL(); |
|
541 MMsvAttachmentManagerSync& managerSync = iEditStore->AttachmentManagerExtensionsL(); |
|
542 CMsvAttachment* attachment = CMsvAttachment::NewL( CMsvAttachment::EMsvFile ); |
|
543 CleanupStack::PushL( attachment ); |
|
544 |
|
545 attachment->SetMimeTypeL( iTargetType.Des8() ); |
|
546 |
|
547 managerSync.CreateAttachmentL( newFileName, iNewImageFile, attachment ); |
|
548 CleanupStack::Pop( attachment ); // ownership transferred |
|
549 |
|
550 iNewAttaId = attachment->Id(); |
|
551 } |
|
552 |
|
553 // --------------------------------------------------------- |
|
554 // CUniEditorProcessImageOperation::ImageSendSize |
|
555 // --------------------------------------------------------- |
|
556 // |
|
557 TSize CUniEditorProcessImageOperation::ImageSendSize() const |
|
558 { |
|
559 TSize size; |
|
560 if( TUniMsvEntry::IsMmsUpload( iDocument.Entry() ) ) |
|
561 { |
|
562 size.iWidth = KUniMmsUploadImageWidth; |
|
563 size.iHeight = KUniMmsUploadImageHeight; |
|
564 } |
|
565 else |
|
566 { |
|
567 size = iDocument.MaxImageSize(); |
|
568 } |
|
569 return size; |
|
570 } |
|
571 |
|
572 // --------------------------------------------------------- |
|
573 // CUniEditorProcessImageOperation::OpenFileForReadingL |
|
574 // --------------------------------------------------------- |
|
575 // |
|
576 RFile CUniEditorProcessImageOperation::OpenFileForReadingL() |
|
577 { |
|
578 RFile sourceFile; |
|
579 if ( iAttachmentId != KMsvNullIndexEntryId ) |
|
580 { |
|
581 __ASSERT_DEBUG( iEditStore, Panic( EUniNullPointer ) ); |
|
582 sourceFile = iEditStore->AttachmentManagerL().GetAttachmentFileL( iAttachmentId ); |
|
583 } |
|
584 else |
|
585 { |
|
586 TInt err = sourceFile.Open( |
|
587 iFs, iImageInfo->FullFilePath(), EFileRead | EFileShareAny ); |
|
588 if ( err ) |
|
589 { |
|
590 err = sourceFile.Open( |
|
591 iFs, iImageInfo->FullFilePath(), EFileRead | EFileShareReadersOnly ); |
|
592 |
|
593 User::LeaveIfError( err ); |
|
594 } |
|
595 } |
|
596 return sourceFile; |
|
597 } |
|
598 |
|
599 // --------------------------------------------------------- |
|
600 // CUniEditorProcessImageOperation::RunError |
|
601 // --------------------------------------------------------- |
|
602 // |
|
603 TInt CUniEditorProcessImageOperation::RunError( TInt aError ) |
|
604 { |
|
605 delete iImageProcessor; |
|
606 iImageProcessor = NULL; |
|
607 |
|
608 if ( aError == KErrNotFound ) |
|
609 { |
|
610 aError = EUniProcessImgNotFound; |
|
611 } |
|
612 else if ( aError == KErrNoMemory ) |
|
613 { |
|
614 aError = EUniProcessImgOutOfMemory; |
|
615 } |
|
616 else if ( aError == KErrDiskFull ) |
|
617 { |
|
618 aError = EUniProcessImgOutOfDisk; |
|
619 } |
|
620 else if ( aError == KErrCorrupt ) |
|
621 { |
|
622 aError = EUniProcessImgCorrupted; |
|
623 } |
|
624 |
|
625 return CUniEditorOperation::RunError( aError ); |
|
626 } |
|
627 |
|
628 // --------------------------------------------------------- |
|
629 // CUniEditorProcessImageOperation::DetachImageInfo |
|
630 // --------------------------------------------------------- |
|
631 // |
|
632 CMsgImageInfo* CUniEditorProcessImageOperation::DetachImageInfo() |
|
633 { |
|
634 // ownership transferred |
|
635 CMsgImageInfo* tempInfo = iNewImageInfo; |
|
636 iNewImageInfo = NULL; |
|
637 return tempInfo; |
|
638 } |
|
639 |
|
640 // End of file |