textrendering/word/SRC/wpresources.cpp
changeset 0 1fb32624e06b
equal deleted inserted replaced
-1:000000000000 0:1fb32624e06b
       
     1 /*
       
     2 * Copyright (c) 1997-2009 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 * WPFILE.CPP
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include <f32file.h>
       
    21 
       
    22 #include "wpresources.h"
       
    23 
       
    24 
       
    25 /**
       
    26 Get default path for word documents
       
    27 @param aPath this will hold the resulting path
       
    28 @internalComponent
       
    29 */
       
    30 void TWordFilePath::GetWordDefaultFilePath(TFileName& aPath)
       
    31 	{
       
    32 	_LIT(KDriveMask, "_:\\");
       
    33 	aPath.Copy(KDriveMask);
       
    34 	aPath[0] = 'A' + static_cast<TInt>(RFs::GetSystemDrive());
       
    35 	}
       
    36 	
       
    37 
       
    38 /**
       
    39 Get path of the folder containing document templates
       
    40 @param aPath this will hold the resulting path
       
    41 @internalComponent
       
    42 */
       
    43 void TWordFilePath::GetNormalTemplateFolderName(TFileName& aPath)
       
    44 	{
       
    45 	// grab process's private path
       
    46 	RFs fs;
       
    47 	fs.Connect();
       
    48 	fs.PrivatePath(aPath);
       
    49 	fs.Close();
       
    50 	// prepend ROM drive name at front
       
    51 	TDriveUnit romDrive(static_cast<TInt>(EDriveZ));
       
    52 	aPath.Insert(0, romDrive.Name());
       
    53 	}