textrendering/texthandling/ttext/t_fmt1.cpp
author Monotype Imaging Inc. <geoff.greve@monotypeimaging.com
Tue, 09 Mar 2010 14:23:10 +0000
branchRCL_3
changeset 8 030b3432fbe0
parent 0 1fb32624e06b
child 51 a7c938434754
permissions -rw-r--r--
MYuppy TrueType GB2312 font from Monotype Imaging Inc. (Bug 1899) MYuppyGB-Medium Format - TTF TrueType Character set - GB2312 Encoding - Unicode This font was designed to appeal to young urban professionals, Monotype Yuppy is a newly designed typeface with a unique, modern feel. The design combines elements of handwriting with classic letterform characteristics, such as open shapes and proper proportions that help the typeface retain legibility.

/*
* Copyright (c) 1997-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"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
* T_FMT.CPP
*
*/


#include <e32test.h>
#include <txtfmlyr.h>
#include <txtrich.h>
#include <txtfrmat.h>
#include <gdi.h>
#include "TXTSTD.H"


LOCAL_D RTest test(_L("TFormat Test Code for DEF047316"));

LOCAL_C void TestDEF047316L()
// Test CParaFormat stack definition leave protection
//
	{

	
	test.Start(_L(" @SYMTestCaseID:SYSLIB-ETEXT-LEGACY-t_fmt1-0001 CParaFormat - DEF047316 - stack definition leave protection "));
	CParaFormat paraFormat;
	
	// Allocate resources for paraFormat
	TTabStop tabStop;
	paraFormat.StoreTabL(tabStop);
	
	TParaBorder border;
	paraFormat.SetParaBorderL(CParaFormat::EParaBorderTop,border);

	paraFormat.iBullet=new(ELeave)TBullet;
	
	// Push cleanup method for paraFormat
	ResetOnCleanupL( &paraFormat);
	
	// Force cleanup method to be called
	CleanupStack::PopAndDestroy();

	// Note that test end is when paraFormat's destructor is called when 
	// this function terminates. The destructor should not cause any problems
	// even though we have already called the cleanup method
	
	test.End();
	}

GLDEF_C TInt E32Main()
//
// Tests TFORMAT.
//
	{
	CTrapCleanup* cleanup=CTrapCleanup::New();
	test.Title();
	
	__UHEAP_MARK;
	TRAPD(ret,TestDEF047316L());
	test(ret==KErrNone);

	__UHEAP_MARKEND;
		
	test.Close();

	delete cleanup;

	return(0);
	}