diff -r e7aa27f58ae1 -r e1b6206813b4 meetingrequest/mrgui/src/cesmraddressselectionquery.cpp --- a/meetingrequest/mrgui/src/cesmraddressselectionquery.cpp Tue Feb 02 00:02:40 2010 +0200 +++ b/meetingrequest/mrgui/src/cesmraddressselectionquery.cpp Fri Feb 19 22:37:30 2010 +0200 @@ -21,7 +21,7 @@ #include "cesmraddressselectionquery.h" #include -#include +#include #include #include #include @@ -115,7 +115,7 @@ // ----------------------------------------------------------------------------- // TInt CESMRAddressSelectionQuery::ExecuteAddressSelectionListL( - const RPointerArray& aAddressArray ) + const RPointerArray& aAddressArray ) { FUNC_LOG; TInt ret = ExecuteL( aAddressArray ); @@ -127,13 +127,13 @@ // ----------------------------------------------------------------------------- // TInt CESMRAddressSelectionQuery::ExecuteL( - const RPointerArray& aAddressArray ) + const RPointerArray& aAddressArray ) { FUNC_LOG; TInt response( KErrCancel ); CAknDoublePopupMenuStyleListBox* list = - new( ELeave )CAknDoublePopupMenuStyleListBox; + new( ELeave )CAknDoublePopupMenuStyleListBox; CleanupStack::PushL( list ); CAknPopupList* popupList = CAknPopupList::NewL( list, @@ -175,14 +175,14 @@ // void CESMRAddressSelectionQuery::SetListQueryTextsL( - CDesCArrayFlat* aItemArray, - CAknPopupList* aPopupList, - const RPointerArray& aAddressArray ) + CDesCArrayFlat* aItemArray, + CAknPopupList* aPopupList, + const RPointerArray& aAddressArray ) { FUNC_LOG; // Set title for popup aPopupList->SetTitleL( *iEnv->AllocReadResourceAsDes16LC( - R_QTN_MEET_REQ_LOC_ADDRESS_SELECTION_TITLE ) ); + R_QTN_MEET_REQ_LOC_ADDRESS_SELECTION_TITLE ) ); CleanupStack::PopAndDestroy(); // Resource string // Amount of addresses the contact has @@ -193,7 +193,7 @@ item.CleanupClosePushL(); for ( TInt i(0); i < itemCount; ++i ) - { + { // Descriptor has separator between label and the actual address TPtr16 temp = aAddressArray[i]->Des(); @@ -203,25 +203,25 @@ temp.SetLength( KMaxLength ); } - // Finding the first instance of a separator - TInt offset = temp.Find( KSeparator ); - - if( 0 <= offset && offset < KMaxLength ) - { - // Forming label from the beginning to the first separator - TPtrC16 tempLabel = temp.Mid( 0, offset ); - - // Forming address from the first separator to the end - TPtrC16 tempAddress = temp.Mid( - offset + KSeparatorLength, - temp.Length() - offset - KSeparatorLength ); - - // appending address item to array - item.Format( KListItemFormat, &tempLabel, &tempAddress ); - aItemArray->AppendL( item ); - } - - } + // Finding the first instance of a separator + TInt offset = temp.Find( KSeparator ); + + if( 0 <= offset && offset < KMaxLength ) + { + // Forming label from the beginning to the first separator + TPtrC16 tempLabel = temp.Mid( 0, offset ); + + // Forming address from the first separator to the end + TPtrC16 tempAddress = temp.Mid( + offset + KSeparatorLength, + temp.Length() - offset - KSeparatorLength ); + + // appending address item to array + item.Format( KListItemFormat, &tempLabel, &tempAddress ); + aItemArray->AppendL( item ); + } + + } CleanupStack::PopAndDestroy( &item ); }