os/textandloc/textrendering/texthandling/stext/TXTFEP.CPP
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 1998-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 *
    16 */
    17 
    18 
    19 #include <e32std.h>
    20 #include "TXTETEXT.H"
    21 #include "TXTFEP.H"
    22 #include "TXTOPT.H"
    23 
    24 CInlineEditData::CInlineEditData()
    25 	{
    26 	// do nothing
    27 	}
    28 
    29 CInlineEditData::~CInlineEditData()
    30 	{
    31 	delete iInlineText;
    32 	delete iHiddenText;
    33 	}
    34 
    35 void CEditableText::SetAndTransferOwnershipOfInlineEditDataL(CInlineEditData* aInlineEditData)
    36 	{
    37 	if (!iOptionalData)
    38 		iOptionalData = new(ELeave) CEditableTextOptionalData;
    39 	delete iOptionalData->iInlineEditData;
    40 	iOptionalData->iInlineEditData = aInlineEditData;
    41 	}
    42 
    43 CInlineEditData* CEditableText::InlineEditData() const
    44 	{
    45 	if (iOptionalData)
    46 		return iOptionalData->iInlineEditData;
    47 	else
    48 		return NULL;
    49 	}
    50 
    51 void CEditableText::DeleteInlineEditDataAndSetToNull()
    52 	{
    53 	if (iOptionalData)
    54 		{
    55 		delete iOptionalData->iInlineEditData;
    56 		iOptionalData->iInlineEditData = NULL;
    57 		}
    58 	}