|
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: CUniEditorLaunchOperation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // ========== INCLUDE FILES ================================ |
|
21 |
|
22 #include <AknsConstants.h> |
|
23 #include <data_caging_path_literals.hrh> |
|
24 #include <aknlayoutscalable_apps.cdl.h> |
|
25 |
|
26 // Features |
|
27 #include <featmgr.h> |
|
28 #include <bldvariant.hrh> |
|
29 #include <centralrepository.h> // link against centralrepository.lib |
|
30 #include <messaginginternalcrkeys.h> // for Central Repository keys |
|
31 |
|
32 #include <mmsconst.h> |
|
33 |
|
34 #include <MsgEditorView.h> // for CMsgEditorView |
|
35 #include <MsgEditorAppUi.h> |
|
36 #include <MsgEditorCommon.h> |
|
37 #include <msgimagecontrol.h> |
|
38 #include <MuiuMsgEditorLauncher.h> |
|
39 |
|
40 #include <msgasynccontrolobserver.h> |
|
41 |
|
42 #include <uniutils.mbg> |
|
43 #include <UniEditor.rsg> |
|
44 |
|
45 #include "UniPluginApi.h" |
|
46 #include "UniSendingSettings.h" |
|
47 #include <unidatamodel.h> |
|
48 #include <unismilmodel.h> |
|
49 #include <unislideloader.h> |
|
50 #include <unimsventry.h> |
|
51 |
|
52 #include "UniEditorDocument.h" |
|
53 #include "UniEditorHeader.h" |
|
54 #include "UniEditorLaunchOperation.h" |
|
55 |
|
56 _LIT( KUniEditorMbmFile, "uniutils.mbm" ); |
|
57 |
|
58 // ========== EXTERNAL DATA STRUCTURES ===================== |
|
59 |
|
60 // ========== EXTERNAL FUNCTION PROTOTYPES ================= |
|
61 |
|
62 // ========== CONSTANTS ==================================== |
|
63 |
|
64 const TInt KMaxSubjectLength = 40; // From MMS Conformance Document |
|
65 |
|
66 // ========== MACROS ======================================= |
|
67 |
|
68 // ========== LOCAL CONSTANTS AND MACROS =================== |
|
69 |
|
70 // ========== MODULE DATA STRUCTURES ======================= |
|
71 |
|
72 // ========== LOCAL FUNCTION PROTOTYPES ==================== |
|
73 |
|
74 // ========== LOCAL FUNCTIONS ============================== |
|
75 |
|
76 // ========== MEMBER FUNCTIONS ============================= |
|
77 |
|
78 // --------------------------------------------------------- |
|
79 // CUniEditorLaunchOperation::NewL |
|
80 // |
|
81 // Factory method. |
|
82 // --------------------------------------------------------- |
|
83 // |
|
84 CUniEditorLaunchOperation* CUniEditorLaunchOperation::NewL( |
|
85 MMsgAsyncControlObserver& aControlObserver, |
|
86 MUniEditorOperationObserver& aOperationObserver, |
|
87 CUniEditorDocument& aDocument, |
|
88 CMsgEditorView& aView, |
|
89 CMsgEditorAppUi& aAppUi, |
|
90 RFs& aFs ) |
|
91 { |
|
92 CUniEditorLaunchOperation* self = |
|
93 new ( ELeave ) CUniEditorLaunchOperation( aControlObserver, aOperationObserver, aDocument, aView, aAppUi, aFs ); |
|
94 |
|
95 CleanupStack::PushL( self ); |
|
96 self->ConstructL(); |
|
97 CleanupStack::Pop( self ); |
|
98 |
|
99 return self; |
|
100 } |
|
101 |
|
102 // --------------------------------------------------------- |
|
103 // CUniEditorLaunchOperation::CUniEditorLaunchOperation |
|
104 // |
|
105 // Constructor. |
|
106 // --------------------------------------------------------- |
|
107 // |
|
108 CUniEditorLaunchOperation::CUniEditorLaunchOperation( |
|
109 MMsgAsyncControlObserver& aControlObserver, |
|
110 MUniEditorOperationObserver& aOperationObserver, |
|
111 CUniEditorDocument& aDocument, |
|
112 CMsgEditorView& aView, |
|
113 CMsgEditorAppUi& aAppUi, |
|
114 RFs& aFs ) : |
|
115 CUniEditorOperation( aOperationObserver, aDocument, aFs, EUniEditorOperationLaunch ), |
|
116 iControlObserver( aControlObserver ), |
|
117 iView( aView ), |
|
118 iAppUi( aAppUi ) |
|
119 { |
|
120 } |
|
121 |
|
122 // --------------------------------------------------------- |
|
123 // CUniEditorLaunchOperation::ConstructL |
|
124 // |
|
125 // 2nd phase constructor. |
|
126 // --------------------------------------------------------- |
|
127 // |
|
128 void CUniEditorLaunchOperation::ConstructL() |
|
129 { |
|
130 BaseConstructL(); |
|
131 FeatureManager::InitializeLibL(); |
|
132 iSmilEditorSupported = FeatureManager::FeatureSupported( KFeatureIdSmilEditor ); |
|
133 FeatureManager::UnInitializeLib(); |
|
134 } |
|
135 |
|
136 // --------------------------------------------------------- |
|
137 // CUniEditorLaunchOperation::CUniEditorLaunchOperation |
|
138 // |
|
139 // Destructor. |
|
140 // --------------------------------------------------------- |
|
141 // |
|
142 CUniEditorLaunchOperation::~CUniEditorLaunchOperation() |
|
143 { |
|
144 Cancel(); |
|
145 delete iSendUiOperation; |
|
146 delete iHeader; |
|
147 delete iSlideLoader; |
|
148 |
|
149 #ifdef RD_MSG_XHTML_SUPPORT |
|
150 delete iTextOperation; |
|
151 #endif |
|
152 } |
|
153 |
|
154 // --------------------------------------------------------- |
|
155 // CUniEditorLaunchOperation::Launch |
|
156 // --------------------------------------------------------- |
|
157 // |
|
158 void CUniEditorLaunchOperation::Launch() |
|
159 { |
|
160 iParseResultTemp= 0; |
|
161 ResetErrors(); |
|
162 iOperationState = EUniLaunchInitializeDoc; |
|
163 CompleteSelf( KErrNone ); |
|
164 } |
|
165 |
|
166 // --------------------------------------------------------- |
|
167 // CUniEditorLaunchOperation::DoLaunchStepL |
|
168 // --------------------------------------------------------- |
|
169 // |
|
170 void CUniEditorLaunchOperation::DoLaunchStepL() |
|
171 { |
|
172 switch ( iOperationState ) |
|
173 { |
|
174 case EUniLaunchInitializeDoc: |
|
175 { |
|
176 DoInitializeDocL(); |
|
177 break; |
|
178 } |
|
179 case EUniLaunchInitializeModel: |
|
180 { |
|
181 DoInitializeModelL(); |
|
182 break; |
|
183 } |
|
184 case EUniLaunchHandleMessage: |
|
185 { |
|
186 DoHandleMessageL(); |
|
187 break; |
|
188 } |
|
189 case EUniLaunchPrepareHeader: |
|
190 { |
|
191 DoPrepareHeaderL(); |
|
192 break; |
|
193 } |
|
194 case EUniLaunchPrepareBody: |
|
195 { |
|
196 DoPrepareBodyL(); |
|
197 break; |
|
198 } |
|
199 case EUniLaunchEnd: |
|
200 { |
|
201 iObserver.EditorOperationEvent( |
|
202 EUniEditorOperationLaunch, |
|
203 EUniEditorOperationComplete ); |
|
204 break; |
|
205 } |
|
206 default: |
|
207 iObserver.EditorOperationEvent( |
|
208 EUniEditorOperationLaunch, |
|
209 EUniEditorOperationError ); |
|
210 break; |
|
211 } |
|
212 |
|
213 iOperationState++; |
|
214 } |
|
215 |
|
216 // --------------------------------------------------------- |
|
217 // CUniEditorLaunchOperation::DoInitializeDocL |
|
218 // --------------------------------------------------------- |
|
219 // |
|
220 void CUniEditorLaunchOperation::DoInitializeDocL() |
|
221 { |
|
222 TUniMessageCharSetSupport charSet = EUniMessageCharSetFull; |
|
223 |
|
224 iDocument.LaunchPlugings(); |
|
225 |
|
226 CMsvStore* readStore = NULL; |
|
227 if ( iDocument.Mtm().Entry().HasStoreL() ) |
|
228 { |
|
229 readStore = iDocument.Mtm().Entry().ReadStoreL(); |
|
230 } |
|
231 CleanupStack::PushL( readStore ); |
|
232 |
|
233 if( iDocument.SmsPlugin() ) |
|
234 { |
|
235 iDocument.SmsPlugin()->LoadHeadersL( readStore ); |
|
236 |
|
237 // Check the valid charsupport setting |
|
238 if( iDocument.MessageType() == EUniOpenFromDraft ) |
|
239 { |
|
240 charSet = TUniMsvEntry::CharSetSupport( iDocument.Mtm().Entry().Entry() ); |
|
241 } |
|
242 else |
|
243 { |
|
244 TInt features = 0; |
|
245 CRepository* storage = CRepository::NewLC( KCRUidSmum ); |
|
246 |
|
247 if ( storage->Get( KSmumCharSupport, features ) == KErrNone ) |
|
248 { |
|
249 if( features == EUniMessageCharSetReduced ) |
|
250 { |
|
251 charSet = EUniMessageCharSetReduced; |
|
252 } |
|
253 else if( features == EUniMessageCharSetFullLocked ) |
|
254 { |
|
255 charSet = EUniMessageCharSetFullLocked; |
|
256 } |
|
257 else if( features == EUniMessageCharSetReducedLocked ) |
|
258 { |
|
259 charSet = EUniMessageCharSetReducedLocked; |
|
260 } |
|
261 else |
|
262 { |
|
263 charSet = EUniMessageCharSetFull; |
|
264 } |
|
265 } |
|
266 |
|
267 CleanupStack::PopAndDestroy( storage ); |
|
268 } |
|
269 } |
|
270 |
|
271 if( iDocument.MmsPlugin() ) |
|
272 { |
|
273 iDocument.MmsPlugin()->LoadHeadersL( readStore ); |
|
274 } |
|
275 |
|
276 CleanupStack::PopAndDestroy( readStore ); |
|
277 |
|
278 iDocument.CreateCharConverterL( charSet ); |
|
279 |
|
280 CompleteSelf( KErrNone ); |
|
281 } |
|
282 |
|
283 // --------------------------------------------------------- |
|
284 // CUniEditorLaunchOperation::DoInitializeModelL |
|
285 // --------------------------------------------------------- |
|
286 // |
|
287 void CUniEditorLaunchOperation::DoInitializeModelL() |
|
288 { |
|
289 iDocument.DataModel()->RestoreL( *this ); |
|
290 SetPending(); |
|
291 } |
|
292 |
|
293 // --------------------------------------------------------- |
|
294 // CUniEditorLaunchOperation::RestoreReady |
|
295 // |
|
296 // RestoreReady: a callback from RestoreL |
|
297 // --------------------------------------------------------- |
|
298 // |
|
299 void CUniEditorLaunchOperation::RestoreReady( TInt /*aParseResult*/, TInt aError ) |
|
300 { |
|
301 CompleteOperation( aError ); |
|
302 } |
|
303 |
|
304 // --------------------------------------------------------- |
|
305 // CUniEditorLaunchOperation::DoHandleMessageL |
|
306 // --------------------------------------------------------- |
|
307 // |
|
308 void CUniEditorLaunchOperation::DoHandleMessageL() |
|
309 { |
|
310 // Synchronize uniobjects that are not yet parsed |
|
311 iDocument.DataModel()->FinalizeMediaParse(); |
|
312 |
|
313 // Map NoSmil and MultipleSmil to MmsSmil |
|
314 if ( iDocument.DataModel()->SmilType() == ENoSmil || |
|
315 iDocument.DataModel()->SmilType() == EMultipleSmil ) |
|
316 { |
|
317 iDocument.DataModel()->SetSmilType( EMmsSmil ); |
|
318 } |
|
319 |
|
320 if ( iDocument.Mtm().Body().DocumentLength() > 0 ) |
|
321 { |
|
322 // When UniEditor message is formed from real SMS message the body text |
|
323 // is not saved to text attachment but copied directly to text control. |
|
324 // Setting the body modified will trigger the saving to be done. |
|
325 iDocument.SetBodyModified( ETrue ); |
|
326 } |
|
327 |
|
328 switch ( iDocument.MessageType() ) |
|
329 { |
|
330 case EUniNewMessage: |
|
331 { |
|
332 //no operation |
|
333 break; |
|
334 } |
|
335 case EUniReply: |
|
336 { |
|
337 AddSubjectPrefixL( ETrue ); |
|
338 iDocument.SetHeaderModified( ETrue ); // To get "Save message..." query always |
|
339 break; |
|
340 } |
|
341 case EUniForward: |
|
342 { |
|
343 // Code runs here when message is forwarded and forwarded message |
|
344 // has been saved into Drafts. |
|
345 // iDocument.LaunchFlags() & EMsgForwardMessage is ETrue, only when |
|
346 // message is being forwarded from Viewer |
|
347 if ( ( iDocument.LaunchFlags() & EMsgForwardMessage ) && |
|
348 !TUniMsvEntry::IsMmsUpload( iDocument.Entry() ) ) |
|
349 { |
|
350 AddSubjectPrefixL( EFalse ); |
|
351 } |
|
352 |
|
353 // If Subject variation is Off, subject has been shown in the viewer |
|
354 // but will not be shown and saved in the editor |
|
355 iDocument.SetHeaderModified( ETrue ); // To get "Save message..." query always |
|
356 |
|
357 #ifdef RD_MSG_XHTML_SUPPORT |
|
358 iTextOperation = CUniEditorProcessTextOperation::NewL( *this, iDocument, iFs ); |
|
359 iTextOperation->Start(); |
|
360 |
|
361 SetPending(); |
|
362 return; |
|
363 #else |
|
364 break; |
|
365 #endif |
|
366 } |
|
367 case EUniOpenFromDraft: |
|
368 { |
|
369 //no operation |
|
370 // Added, because of additional header feature. |
|
371 // Variation has changed On->Off and message opened from Drafts |
|
372 // To get "Save message..." query always |
|
373 iDocument.SetHeaderModified( ETrue ); |
|
374 break; |
|
375 } |
|
376 case EUniSendUi: |
|
377 { |
|
378 // NOTE: Write from phoneidle is handled as SendAs |
|
379 iDocument.SetHeaderModified( ETrue ); // To get "Save message..." note always |
|
380 |
|
381 |
|
382 iSendUiOperation = CUniEditorSendUiOperation::NewL( *this, iDocument, iFs ); |
|
383 iSendUiOperation->Start(); |
|
384 |
|
385 SetPending(); |
|
386 return; |
|
387 } |
|
388 default: |
|
389 { |
|
390 // Message type not known |
|
391 User::Leave( KErrNotSupported ); |
|
392 break; |
|
393 } |
|
394 } |
|
395 CompleteSelf( KErrNone ); |
|
396 } |
|
397 |
|
398 // --------------------------------------------------------- |
|
399 // CUniEditorLaunchOperation::DoPrepareHeaderL |
|
400 // --------------------------------------------------------- |
|
401 // |
|
402 void CUniEditorLaunchOperation::DoPrepareHeaderL() |
|
403 { |
|
404 // Header is always drawn and populated |
|
405 iHeader = CUniEditorHeader::NewL( iDocument.Mtm(), iDocument, iView, iFs ); |
|
406 CompleteSelf( KErrNone ); |
|
407 } |
|
408 |
|
409 // --------------------------------------------------------- |
|
410 // CUniEditorLaunchOperation::DoPrepareBodyL |
|
411 // --------------------------------------------------------- |
|
412 // |
|
413 void CUniEditorLaunchOperation::DoPrepareBodyL() |
|
414 { |
|
415 iSlideLoader = CUniSlideLoader::NewL( |
|
416 iControlObserver, |
|
417 *iDocument.DataModel(), |
|
418 iView, |
|
419 EUniControlEditorMode ); |
|
420 |
|
421 if ( iDocument.DataModel()->SmilType() == EMmsSmil ) |
|
422 { |
|
423 if ( !iDocument.DataModel()->SmilModel().SlideCount() ) |
|
424 { |
|
425 iDocument.DataModel()->SmilModel().AddSlideL(); |
|
426 } |
|
427 |
|
428 iSlideLoader->LoadSlideL( *this, 0 ); |
|
429 SetPending(); |
|
430 } |
|
431 else |
|
432 { |
|
433 // All unsupported files should be in |
|
434 // attachment list! |
|
435 // |
|
436 // We should get here only if the SMIL is |
|
437 // more complex than MMS SMIL. |
|
438 // |
|
439 switch ( iDocument.CreationMode() ) |
|
440 { |
|
441 case EMmsCreationModeRestricted: |
|
442 { |
|
443 // Other than MMS SMIL not supported in restricted mode |
|
444 SetError( KUniLaunchAbortPresRestricted ); |
|
445 CompleteSelf( KErrNone ); |
|
446 return; |
|
447 } |
|
448 case EMmsCreationModeWarning: |
|
449 { |
|
450 // Should be handled in editor side. |
|
451 SetError( KUniLaunchPresGuided ); |
|
452 } |
|
453 // FALLTHROUGH |
|
454 case EMmsCreationModeFree: |
|
455 default: |
|
456 { |
|
457 if( TUniMsvEntry::IsForwardedMessage( iDocument.Entry() ) || |
|
458 !iSmilEditorSupported ) |
|
459 { |
|
460 // No editing allowed for forwarded "TemplateSmil" |
|
461 // "TemplateSmil" not supported in restricted mode |
|
462 // "TemplateSmil" not supported if SmilEditor disabled |
|
463 // |
|
464 // Set SMIL type to "3GPPSmil" |
|
465 iDocument.DataModel()->SetSmilType( E3GPPSmil ); |
|
466 } |
|
467 break; |
|
468 } |
|
469 } |
|
470 |
|
471 DoPrepare3GPPBodyL(); |
|
472 CompleteSelf( KErrNone ); |
|
473 } |
|
474 } |
|
475 |
|
476 // --------------------------------------------------------- |
|
477 // CUniEditorLaunchOperation::DoPrepare3GPPBodyL |
|
478 // --------------------------------------------------------- |
|
479 // |
|
480 void CUniEditorLaunchOperation::DoPrepare3GPPBodyL() |
|
481 { |
|
482 CMsgImageControl* imageControl = CMsgImageControl::NewL( iView, |
|
483 &iControlObserver ); |
|
484 CleanupStack::PushL( imageControl ); |
|
485 |
|
486 imageControl->SetControlId( EMsgComponentIdImage ); |
|
487 |
|
488 TAknsItemID id = KAknsIIDQgnGrafMmsUnedit; |
|
489 TInt icon = EMbmUniutilsQgn_graf_mms_unedit; |
|
490 TInt mask = EMbmUniutilsQgn_graf_mms_unedit_mask; |
|
491 |
|
492 if ( iDocument.DataModel()->SmilType() == ETemplateSmil ) |
|
493 { |
|
494 id.Set( KAknsIIDQgnGrafMmsEdit ); |
|
495 icon = EMbmUniutilsQgn_graf_mms_edit; |
|
496 mask = EMbmUniutilsQgn_graf_mms_edit_mask; |
|
497 } |
|
498 |
|
499 TParse fileParse; |
|
500 fileParse.Set( KUniEditorMbmFile, &KDC_APP_BITMAP_DIR, NULL ); |
|
501 imageControl->LoadIconL( fileParse.FullName(), id, icon, mask ); |
|
502 |
|
503 TAknLayoutRect iconLayout; |
|
504 iconLayout.LayoutRect( MsgEditorCommons::MsgDataPane(), |
|
505 AknLayoutScalable_Apps::msg_data_pane_g4().LayoutLine() ); |
|
506 |
|
507 imageControl->SetIconSizeL( iconLayout.Rect().Size() ); |
|
508 imageControl->SetIconVisible( ETrue ); |
|
509 |
|
510 //The ownership of imageControl is transferred to iView |
|
511 iView.AddControlL( imageControl, EMsgComponentIdImage, EMsgFirstControl, EMsgBody ); |
|
512 CleanupStack::Pop( imageControl ); |
|
513 } |
|
514 |
|
515 // --------------------------------------------------------- |
|
516 // CUniEditorLaunchOperation::AddSubjectPrefixL |
|
517 // --------------------------------------------------------- |
|
518 // |
|
519 void CUniEditorLaunchOperation::AddSubjectPrefixL( TBool aReply ) |
|
520 { |
|
521 HBufC* newSubject = NULL; |
|
522 |
|
523 if( iDocument.Mtm().SubjectL().Length() > 0 ) |
|
524 { |
|
525 // Add prefix only if there's some content in subject field |
|
526 newSubject = iAppUi.CreateSubjectPrefixStringL( iDocument.Mtm().SubjectL(), |
|
527 aReply ); |
|
528 } |
|
529 |
|
530 if ( newSubject ) |
|
531 { |
|
532 CleanupStack::PushL( newSubject ); |
|
533 iDocument.Mtm().SetSubjectL( newSubject->Left( KMaxSubjectLength ) ); |
|
534 iDocument.SetHeaderModified( ETrue ); // To get "Save message..." query always |
|
535 CleanupStack::PopAndDestroy( newSubject ); |
|
536 } |
|
537 } |
|
538 |
|
539 // --------------------------------------------------------- |
|
540 // CUniEditorLaunchOperation::DoCancelCleanup |
|
541 // --------------------------------------------------------- |
|
542 // |
|
543 void CUniEditorLaunchOperation::DoCancelCleanup() |
|
544 { |
|
545 if ( iSlideLoader ) |
|
546 { |
|
547 iSlideLoader->Cancel(); |
|
548 } |
|
549 |
|
550 if ( iSendUiOperation ) |
|
551 { |
|
552 iSendUiOperation->Cancel(); |
|
553 } |
|
554 |
|
555 #ifdef RD_MSG_XHTML_SUPPORT |
|
556 if ( iTextOperation ) |
|
557 { |
|
558 iTextOperation->Cancel(); |
|
559 } |
|
560 #endif |
|
561 } |
|
562 |
|
563 // --------------------------------------------------------- |
|
564 // CUniEditorLaunchOperation::RunL |
|
565 // --------------------------------------------------------- |
|
566 // |
|
567 void CUniEditorLaunchOperation::RunL() |
|
568 { |
|
569 PrintOperationAndState(); |
|
570 if ( iStatus.Int() != KErrNone ) |
|
571 { |
|
572 // if EUniEditorExit, next error code is reason to exit |
|
573 SetError( EUniEditorExit ); |
|
574 SetErrorAndReport( iStatus.Int() ); |
|
575 } |
|
576 else |
|
577 { |
|
578 DoLaunchStepL(); |
|
579 } |
|
580 } |
|
581 |
|
582 // --------------------------------------------------------- |
|
583 // CUniEditorLaunchOperation::RunError |
|
584 // --------------------------------------------------------- |
|
585 // |
|
586 TInt CUniEditorLaunchOperation::RunError( TInt aError ) |
|
587 { |
|
588 // If EUniEditorExit, next error code is reason to exit |
|
589 SetError( EUniEditorExit ); |
|
590 SetError( aError ); |
|
591 |
|
592 iObserver.EditorOperationEvent( EUniEditorOperationLaunch, |
|
593 EUniEditorOperationError ); |
|
594 return KErrNone; |
|
595 } |
|
596 |
|
597 // --------------------------------------------------------- |
|
598 // CUniEditorLaunchOperation::SlideLoadReady |
|
599 // --------------------------------------------------------- |
|
600 // |
|
601 void CUniEditorLaunchOperation::SlideLoadReady( TInt aError ) |
|
602 { |
|
603 CompleteOperation( aError ); |
|
604 } |
|
605 |
|
606 // --------------------------------------------------------- |
|
607 // CUniEditorLaunchOperation::HandleOperationEvent |
|
608 // --------------------------------------------------------- |
|
609 // |
|
610 void CUniEditorLaunchOperation::HandleOperationEvent( TUniEditorOperationType aOperation, |
|
611 TUniEditorOperationEvent /*aEvent*/ ) |
|
612 { |
|
613 if ( aOperation == EUniEditorOperationSendUi ) |
|
614 { |
|
615 CArrayFixFlat<TInt>* errors = iSendUiOperation->GetErrors(); |
|
616 for ( TInt i = 0; i < errors->Count(); i++ ) |
|
617 { |
|
618 if ( errors->At( i ) == EUniProcessImgUserAbort ) |
|
619 { |
|
620 iOperationState = EUniLaunchEnd; |
|
621 } |
|
622 else if ( errors->At( i ) == EUniProcessImgCouldNotScale && |
|
623 iDocument.CreationMode() != EMmsCreationModeRestricted ) |
|
624 { |
|
625 // This occurs when animated or transparent gif. Other cases? |
|
626 // Gif type is by default conformant |
|
627 iParseResultTemp++; |
|
628 } |
|
629 SetError( errors->At( i ) ); |
|
630 } |
|
631 } |
|
632 #ifdef RD_MSG_XHTML_SUPPORT |
|
633 else |
|
634 { |
|
635 CArrayFixFlat<TInt>* errors = iTextOperation->GetErrors(); |
|
636 for ( TInt i = 0; i < errors->Count(); i++ ) |
|
637 { |
|
638 SetError( errors->At( i ) ); |
|
639 } |
|
640 } |
|
641 #endif |
|
642 |
|
643 CompleteOperation( KErrNone ); |
|
644 } |
|
645 |
|
646 // --------------------------------------------------------- |
|
647 // CUniEditorLaunchOperation::ParseResult |
|
648 // --------------------------------------------------------- |
|
649 // |
|
650 TInt CUniEditorLaunchOperation::ParseResult() |
|
651 { |
|
652 TInt parseResult = iDocument.UpdatedNonConformantCount(); |
|
653 parseResult += iParseResultTemp; |
|
654 |
|
655 return parseResult; |
|
656 } |
|
657 |
|
658 |
|
659 // EOF |