diff -r a3a1ae9acec6 -r da5135c61bad meetingrequest/mrgui/src/cesmraddressselectionquery.cpp --- a/meetingrequest/mrgui/src/cesmraddressselectionquery.cpp Mon Mar 15 12:39:10 2010 +0200 +++ b/meetingrequest/mrgui/src/cesmraddressselectionquery.cpp Wed Mar 31 21:08:33 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -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 ); }