public SlideListWithText(BinaryReader _reader, uint size, uint typeCode, uint version, uint instance)
            : base(_reader, size, typeCode, version, instance)
        {
            SlidePersistAtom curSpAtom = null;
            TextHeaderAtom   curThAtom = null;

            foreach (Record r in this.Children)
            {
                SlidePersistAtom    spAtom   = r as SlidePersistAtom;
                TextHeaderAtom      thAtom   = r as TextHeaderAtom;
                ITextDataRecord     tdRecord = r as ITextDataRecord;
                TextSpecialInfoAtom tsiAtom  = r as TextSpecialInfoAtom;

                if (spAtom != null)
                {
                    curSpAtom = spAtom;
                    this.SlidePersistAtoms.Add(spAtom);
                }

                else if (thAtom != null)
                {
                    curThAtom = thAtom;

                    if (!this.SlideToPlaceholderTextHeaders.ContainsKey(curSpAtom))
                    {
                        this.SlideToPlaceholderTextHeaders[curSpAtom] = new List <TextHeaderAtom>();
                    }

                    this.SlideToPlaceholderTextHeaders[curSpAtom].Add(thAtom);
                }

                else if (tdRecord != null)
                {
                    curThAtom.HandleTextDataRecord(tdRecord);
                }
                else if (tsiAtom != null)
                {
                    if (!this.SlideToPlaceholderSpecialInfo.ContainsKey(curSpAtom))
                    {
                        this.SlideToPlaceholderSpecialInfo[curSpAtom] = new List <TextSpecialInfoAtom>();
                    }

                    this.SlideToPlaceholderSpecialInfo[curSpAtom].Add(tsiAtom);
                }
                else
                {
                }
            }
        }
Esempio n. 2
0
        public void HandleTextDataRecord(ITextDataRecord tdRecord)
        {
            tdRecord.TextHeaderAtom = this;

            TextAtom      textAtom = tdRecord as TextAtom;
            TextStyleAtom tsAtom   = tdRecord as TextStyleAtom;

            if (textAtom != null)
            {
                this.TextAtom = textAtom;
            }
            else if (tsAtom != null)
            {
                this.TextStyleAtom = tsAtom;
            }
            else
            {
                throw new NotImplementedException("Unhandled text data record type " + tdRecord.GetType().ToString());
            }
        }