localisation/apparchitecture/apgrfx/APGWGNAM.CPP
branchSymbian3
changeset 57 b8d18c84f71c
parent 6 c108117318cb
equal deleted inserted replaced
56:aa99f2208aad 57:b8d18c84f71c
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
       
    12 // NTT DOCOMO, INC. -- Fix CApaWindowGroupName::AppUid() cannot handle UID with 0 prefix
    12 //
    13 //
    13 // Description:
    14 // Description:
    14 //
    15 //
    15 
    16 
    16 #include "APGWGNAM.H"
    17 #include "APGWGNAM.H"
   511 	TInt start=FindDelimiter(EEndStatus);
   512 	TInt start=FindDelimiter(EEndStatus);
   512 	if (start>0)
   513 	if (start>0)
   513 		{
   514 		{
   514 		start++;
   515 		start++;
   515 		TInt end=FindDelimiter(EEndUid);
   516 		TInt end=FindDelimiter(EEndUid);
   516 		if ((end-start) == KUidBufLength)
   517 		if (0<end && (end-start)<=KUidBufLength)
   517 			{
   518 			{
   518 			TBuf<KUidBufLength> uidBuf=iBuf->Mid(start, end-start);
   519 			TBuf<KUidBufLength> uidBuf=iBuf->Mid(start, end-start);
   519 			TLex lex(uidBuf);
   520 			TLex lex(uidBuf);
   520 			TUint32 val = 0;
   521 			TUint32 val = 0;
   521 			lex.Val(val, EHex); //Ignoring error code since we anyways have to return null uid if this returns an error.
   522 			lex.Val(val, EHex); //Ignoring error code since we anyways have to return null uid if this returns an error.
   670 	TInt existing=iBuf->Length();
   671 	TInt existing=iBuf->Length();
   671 	TInt total=existing+aExtraLengthReqd;
   672 	TInt total=existing+aExtraLengthReqd;
   672 	if (total>iBuf->Des().MaxLength())
   673 	if (total>iBuf->Des().MaxLength())
   673 		iBuf=iBuf->ReAllocL(total);
   674 		iBuf=iBuf->ReAllocL(total);
   674 	}
   675 	}
       
   676