textrendering/texthandling/stext/TXTFEP.CPP
author hgs
Thu, 24 Jun 2010 11:18:23 +0800
changeset 40 91ef7621b7fc
parent 0 1fb32624e06b
permissions -rw-r--r--
201019_08

/*
* Copyright (c) 1998-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: 
*
*/


#include <e32std.h>
#include "TXTETEXT.H"
#include "TXTFEP.H"
#include "TXTOPT.H"

CInlineEditData::CInlineEditData()
	{
	// do nothing
	}

CInlineEditData::~CInlineEditData()
	{
	delete iInlineText;
	delete iHiddenText;
	}

void CEditableText::SetAndTransferOwnershipOfInlineEditDataL(CInlineEditData* aInlineEditData)
	{
	if (!iOptionalData)
		iOptionalData = new(ELeave) CEditableTextOptionalData;
	delete iOptionalData->iInlineEditData;
	iOptionalData->iInlineEditData = aInlineEditData;
	}

CInlineEditData* CEditableText::InlineEditData() const
	{
	if (iOptionalData)
		return iOptionalData->iInlineEditData;
	else
		return NULL;
	}

void CEditableText::DeleteInlineEditDataAndSetToNull()
	{
	if (iOptionalData)
		{
		delete iOptionalData->iInlineEditData;
		iOptionalData->iInlineEditData = NULL;
		}
	}