sl@0: /* sl@0: * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include sl@0: #include "TXTETEXT.H" sl@0: #include "TXTFEP.H" sl@0: #include "TXTOPT.H" sl@0: sl@0: CInlineEditData::CInlineEditData() sl@0: { sl@0: // do nothing sl@0: } sl@0: sl@0: CInlineEditData::~CInlineEditData() sl@0: { sl@0: delete iInlineText; sl@0: delete iHiddenText; sl@0: } sl@0: sl@0: void CEditableText::SetAndTransferOwnershipOfInlineEditDataL(CInlineEditData* aInlineEditData) sl@0: { sl@0: if (!iOptionalData) sl@0: iOptionalData = new(ELeave) CEditableTextOptionalData; sl@0: delete iOptionalData->iInlineEditData; sl@0: iOptionalData->iInlineEditData = aInlineEditData; sl@0: } sl@0: sl@0: CInlineEditData* CEditableText::InlineEditData() const sl@0: { sl@0: if (iOptionalData) sl@0: return iOptionalData->iInlineEditData; sl@0: else sl@0: return NULL; sl@0: } sl@0: sl@0: void CEditableText::DeleteInlineEditDataAndSetToNull() sl@0: { sl@0: if (iOptionalData) sl@0: { sl@0: delete iOptionalData->iInlineEditData; sl@0: iOptionalData->iInlineEditData = NULL; sl@0: } sl@0: }