textrendering/texthandling/stext/TXTINDEX.INL
changeset 0 1fb32624e06b
equal deleted inserted replaced
-1:000000000000 0:1fb32624e06b
       
     1 /*
       
     2 * Copyright (c) 1997-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 void CRichTextIndex::ExternalizePhraseCountL(RWriteStream& aStream,TInt aPhraseCount)const
       
    20 	{aStream.WriteInt32L(aPhraseCount);}
       
    21 
       
    22 
       
    23 TInt CRichTextIndex::ParagraphCount()const
       
    24 	{return (iParaIx)?iParaIx->Count():0;}
       
    25 
       
    26 
       
    27 TInt CRichTextIndex::PhraseCount()const
       
    28 	{return (iPhraseIx)?iPhraseIx->Count():0;}
       
    29 
       
    30 
       
    31 const CStreamStore* CRichTextIndex::ResolvedStreamStore(TInt aPos)const
       
    32 	{
       
    33 	MRichTextStoreResolver* res=iText.StoreResolver();
       
    34 	return (res)
       
    35 		? &(res->StreamStoreL(aPos))
       
    36 		: NULL;
       
    37 	}
       
    38 
       
    39 
       
    40 void CRichTextIndex::SetPhraseSplit(TBool aBool)
       
    41 	{
       
    42 	if (aBool) iFlags|=KPhraseSplit;
       
    43 	else iFlags&=~KPhraseSplit;
       
    44 	}
       
    45 
       
    46 
       
    47 TBool CRichTextIndex::PhraseSplit()const
       
    48 	{return iFlags&KPhraseSplit;}
       
    49 
       
    50 
       
    51 void CRichTextIndex::SetSpecificMarkupInternalized(TBool aBool)
       
    52 	{
       
    53 	if (aBool) iFlags|=KSpecificMarkupInternalized;
       
    54 	else iFlags&=~KSpecificMarkupInternalized;
       
    55 	}
       
    56 
       
    57 
       
    58 TBool CRichTextIndex::SpecificMarkupInternalized()const
       
    59 	{return iFlags&KSpecificMarkupInternalized;}
       
    60 
       
    61 
       
    62 RPhraseAttribsEntry::RPhraseAttribsEntry(const RPhraseAttribsEntry& aPhrase)
       
    63 	{AssignAndRelease(aPhrase);}
       
    64 
       
    65 
       
    66 RPhraseAttribsEntry& RPhraseAttribsEntry::operator=(const RPhraseAttribsEntry& aPhrase)
       
    67 	{
       
    68 	AssignAndRelease(aPhrase);
       
    69 	return *this;
       
    70 	}
       
    71 
       
    72 inline TBool CParaAttribs::IsShared()const
       
    73 	{return iRefCount>0;}
       
    74 
       
    75 
       
    76 inline TBool RPhraseAttribsEntry::IsPicturePhrase()const
       
    77 	{return iLength==EPictureIndicator;}
       
    78 
       
    79 inline TInt RPhraseAttribsEntry::Length() const
       
    80 	{return (iLength>=0) ? iLength : EPicturePhraseLength;}
       
    81 
       
    82 
       
    83 template <class T>
       
    84 TInt CRichTextStoreMap<T>::Count()const
       
    85 // Return a count of the number of items in the map
       
    86 //
       
    87 	{return (iMap) ? iMap->Count() : 0;}
       
    88 
       
    89 
       
    90 template <class T>
       
    91 const TRichTextMapEntry& CRichTextStoreMap<T>::At(TInt aIndex)const
       
    92 // Return the map entry specified by the the offset aIndex.
       
    93 //
       
    94 	{return (*iMap)[aIndex];}