diff -r 27f5851bd5a5 -r d06b1526f62c csxhelp/HelpEngine/src/CSXHGenericTOC1.cpp --- a/csxhelp/HelpEngine/src/CSXHGenericTOC1.cpp Tue Feb 02 00:03:40 2010 +0200 +++ b/csxhelp/HelpEngine/src/CSXHGenericTOC1.cpp Fri Feb 19 22:42:03 2010 +0200 @@ -21,8 +21,8 @@ // --------------------------------------------------------- // Items commented in header. // --------------------------------------------------------- -CCSXHGenericTOC1::CCSXHGenericTOC1(const TDesC& aName): - CCSXHHelpContentBase(aName),iChildList(NULL) +CCSXHGenericTOC1::CCSXHGenericTOC1(const TDesC& aName, const TInt32 aPriority): + CCSXHHelpContentBase(aName, aPriority), iChildList(NULL) {//No Implementation required } @@ -108,6 +108,20 @@ return ETrue; } +TBool CCSXHGenericTOC1::InsertChildWithPriority(CCSXHHelpContentBase* aChild, TBool aDeleteObject) + { + ConstructChildList(); + TLinearOrder anOrder(OrdererWithPriority); + if (KErrNone != iChildList->InsertInOrder(aChild,anOrder)) + { + if(aDeleteObject) + delete aChild; + + return EFalse; + } + return ETrue; + } + // --------------------------------------------------------- // Items commented in header. // --------------------------------------------------------- @@ -115,12 +129,15 @@ { TInt count = iChildList->Count(); CCSXHHelpContentBase* child; - for(TInt i=0;i toc2Entry(KTabSpace); - toc2Entry.Append(child->GetName()); - aArray->AppendL(toc2Entry); + if (child && child->GetName().Length() != 0) + { + TBuf toc2Entry(KTabSpace); + toc2Entry.Append(child->GetName()); + aArray->AppendL(toc2Entry); + } } }