phonebookui/Phonebook/View/src/PbkViewUtils.cpp
changeset 0 e686773b3f54
child 21 9da50d567e3c
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *		Namespace structure for Phonebook view helper functions
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "PbkViewUtils.h"
       
    22 #include <PbkView.rsg>
       
    23 #include <StringLoader.h>
       
    24 #include <CPbkContactEngine.h>
       
    25 
       
    26 
       
    27 // ================= MEMBER FUNCTIONS =======================
       
    28 
       
    29 TChar PbkViewUtils::ResolveNameOrderSeparatorL(CPbkContactEngine& aEngine)
       
    30     {
       
    31     TChar separatorChar = aEngine.NameSeparator();		    		    
       
    32     TBuf<1> oneChar;
       
    33     oneChar.Append(separatorChar);
       
    34                 
       
    35     if (oneChar[0]==0 || separatorChar.IsSpace())
       
    36         {
       
    37         // Separator is undefined. Load default value.
       
    38         HBufC* defaultSeparator = StringLoader::LoadL(R_QTN_NAME_SEPARATOR_CHAR);
       
    39         if (defaultSeparator)
       
    40             {                    
       
    41             separatorChar = defaultSeparator->Des()[0];
       
    42             delete defaultSeparator;        
       
    43             }
       
    44         }
       
    45     return separatorChar;
       
    46     }
       
    47 
       
    48 
       
    49 // End of File