diff -r bf7481649c98 -r 2717213c588a fbs/fontandbitmapserver/sfbs/FBSFONT.CPP --- a/fbs/fontandbitmapserver/sfbs/FBSFONT.CPP Fri Jun 11 14:58:47 2010 +0300 +++ b/fbs/fontandbitmapserver/sfbs/FBSFONT.CPP Tue Jun 22 15:21:29 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1995-2010 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" @@ -19,7 +19,7 @@ #include #include "UTILS.H" #include -#include "fbsmessage.h" +#include "FbsMessage.H" #include #include @@ -38,7 +38,7 @@ { if (aAny && aHeapBase) { - return (TInt)aAny - (TInt)aHeapBase; + return reinterpret_cast(aAny) - reinterpret_cast(aHeapBase); } return 0; } @@ -50,11 +50,11 @@ @return A pointer relative to the passed heap base. @see PointerToOffset() */ -LOCAL_C TAny* OffsetToPointer(const TInt aOffset, TUint8* aHeapBase) +LOCAL_C TAny* OffsetToPointer(TInt aOffset, TUint8* aHeapBase) { if (aOffset && aHeapBase) { - return (TAny*)(aOffset + (TInt)aHeapBase); + return reinterpret_cast(aOffset + reinterpret_cast(aHeapBase)); } return NULL; } @@ -469,10 +469,10 @@ { // Translate the offsets sent to the server back to pointers relative to // the heap base of the current process - const TOpenFontCharMetrics* temp = (const TOpenFontCharMetrics*)OffsetToPointer(paramsBuf().iMetricsOffset, iFbs->HeapBase()); - if (temp) + const TOpenFontCharMetrics* metrics = (const TOpenFontCharMetrics*)OffsetToPointer(paramsBuf().iMetricsOffset, iFbs->HeapBase()); + if (metrics) { - aMetrics = *temp; + aMetrics = *metrics; } aBitmap = static_cast(OffsetToPointer(paramsBuf().iBitmapPointerOffset, iFbs->HeapBase())); } @@ -587,7 +587,7 @@ EXPORT_C TBool CFbsFont::HasCharacter(TInt aCode) const { if (iHandle) - { + { return iFbs->SendCommand(EFbsMessHasCharacter,iHandle,aCode); } return EFalse; @@ -621,7 +621,7 @@ /** help DoExtendedFunction to perform KFontDeleteShaping function @param aParam Input parameter block -@return KErrNone if successful, KErrBadHandle if the font does not have a valid handle. +@return KErrNone if successful, KErrGeneral if the font does not have a valid handle. */ TInt CFbsFont::DoFontDeleteShaping(TFontShapeDeleteFunctionParameters* aParam) const { @@ -775,3 +775,4 @@ } return CFont::DoExtendedFunction(aFunctionId, aParam); } +