diff -r 9b2cffad4b5e -r 6646c35e558c creator/src/creator_noteelement.cpp --- a/creator/src/creator_noteelement.cpp Wed Sep 15 12:13:45 2010 +0300 +++ b/creator/src/creator_noteelement.cpp Wed Oct 13 14:32:52 2010 +0300 @@ -43,76 +43,6 @@ iIsCommandElement = ETrue; } -void CCreatorNoteElement::AsyncExecuteCommandL() - { - const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount); - TInt noteAmount = 1; - if( amountAttr ) - { - noteAmount = ConvertStrToIntL(amountAttr->Value()); - } - // Get 'fields' element - CCreatorScriptElement* fieldsElement = FindSubElement(KFields); - if( fieldsElement && fieldsElement->SubElements().Count() > 0) - { - // Get sub-elements - const RPointerArray& fields = fieldsElement->SubElements(); - // Create note entries, the amount of entries is defined by noteAmount: - if( iLoopIndex < noteAmount ) - { - CNotepadParameters* param = new (ELeave) CNotepadParameters; - CleanupStack::PushL(param); - - for( TInt i = 0; i < fields.Count(); ++i ) - { - CCreatorScriptElement* field = fields[i]; - TPtrC elemName = field->Name(); - TPtrC elemContent = field->Content(); - const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength); - TBool useMax = EFalse; - if( randomAttr && randomAttr->Value() == KMax ) - { - useMax = ETrue; - } - - if( elemName == KText ) - { - if( randomAttr || elemContent.Length() == 0 ) - { - if( useMax ) - { - TDesC* temp = iEngine->CreateRandomStringLC(KNotepadFieldLength); - SetContentToTextParamL(param->iNoteText, *temp); - CleanupStack::PopAndDestroy(); // temp - } - else - { - SetContentToTextParamL(param->iNoteText, iEngine->RandomString(CCreatorEngine::EMessageText)); - } - } - else - { - SetContentToTextParamL(param->iNoteText, elemContent); - } - } - } - iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryNotes, param); - CleanupStack::Pop(); // param - StartNextLoop(); - } - else - { - AsyncCommandFinished(); - } - } - else - { - iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryNotes, 0, noteAmount); - // signal end of the executing command - AsyncCommandFinished(); - } - } - void CCreatorNoteElement::ExecuteCommandL() { const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);