os/textandloc/textrendering/texthandling/stext/TXTINDEX.INL
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/textandloc/textrendering/texthandling/stext/TXTINDEX.INL	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,94 @@
     1.4 +/*
     1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +void CRichTextIndex::ExternalizePhraseCountL(RWriteStream& aStream,TInt aPhraseCount)const
    1.23 +	{aStream.WriteInt32L(aPhraseCount);}
    1.24 +
    1.25 +
    1.26 +TInt CRichTextIndex::ParagraphCount()const
    1.27 +	{return (iParaIx)?iParaIx->Count():0;}
    1.28 +
    1.29 +
    1.30 +TInt CRichTextIndex::PhraseCount()const
    1.31 +	{return (iPhraseIx)?iPhraseIx->Count():0;}
    1.32 +
    1.33 +
    1.34 +const CStreamStore* CRichTextIndex::ResolvedStreamStore(TInt aPos)const
    1.35 +	{
    1.36 +	MRichTextStoreResolver* res=iText.StoreResolver();
    1.37 +	return (res)
    1.38 +		? &(res->StreamStoreL(aPos))
    1.39 +		: NULL;
    1.40 +	}
    1.41 +
    1.42 +
    1.43 +void CRichTextIndex::SetPhraseSplit(TBool aBool)
    1.44 +	{
    1.45 +	if (aBool) iFlags|=KPhraseSplit;
    1.46 +	else iFlags&=~KPhraseSplit;
    1.47 +	}
    1.48 +
    1.49 +
    1.50 +TBool CRichTextIndex::PhraseSplit()const
    1.51 +	{return iFlags&KPhraseSplit;}
    1.52 +
    1.53 +
    1.54 +void CRichTextIndex::SetSpecificMarkupInternalized(TBool aBool)
    1.55 +	{
    1.56 +	if (aBool) iFlags|=KSpecificMarkupInternalized;
    1.57 +	else iFlags&=~KSpecificMarkupInternalized;
    1.58 +	}
    1.59 +
    1.60 +
    1.61 +TBool CRichTextIndex::SpecificMarkupInternalized()const
    1.62 +	{return iFlags&KSpecificMarkupInternalized;}
    1.63 +
    1.64 +
    1.65 +RPhraseAttribsEntry::RPhraseAttribsEntry(const RPhraseAttribsEntry& aPhrase)
    1.66 +	{AssignAndRelease(aPhrase);}
    1.67 +
    1.68 +
    1.69 +RPhraseAttribsEntry& RPhraseAttribsEntry::operator=(const RPhraseAttribsEntry& aPhrase)
    1.70 +	{
    1.71 +	AssignAndRelease(aPhrase);
    1.72 +	return *this;
    1.73 +	}
    1.74 +
    1.75 +inline TBool CParaAttribs::IsShared()const
    1.76 +	{return iRefCount>0;}
    1.77 +
    1.78 +
    1.79 +inline TBool RPhraseAttribsEntry::IsPicturePhrase()const
    1.80 +	{return iLength==EPictureIndicator;}
    1.81 +
    1.82 +inline TInt RPhraseAttribsEntry::Length() const
    1.83 +	{return (iLength>=0) ? iLength : EPicturePhraseLength;}
    1.84 +
    1.85 +
    1.86 +template <class T>
    1.87 +TInt CRichTextStoreMap<T>::Count()const
    1.88 +// Return a count of the number of items in the map
    1.89 +//
    1.90 +	{return (iMap) ? iMap->Count() : 0;}
    1.91 +
    1.92 +
    1.93 +template <class T>
    1.94 +const TRichTextMapEntry& CRichTextStoreMap<T>::At(TInt aIndex)const
    1.95 +// Return the map entry specified by the the offset aIndex.
    1.96 +//
    1.97 +	{return (*iMap)[aIndex];}