示例#1
0
 protected virtual void PreprocessSpecialParts(PartInfo rel, IPartFilter pf)
 {
     Stream inputData = rel.GetContent();
     if (pf is DiagramXmlPartFilter || pf is ThemeXmlPartFilter || pf is DiagramColoursXmlPartFilter)
     {
         pf.PreProcessPart(inputData);
     }
 }
        protected override void PreprocessSpecialParts(PartInfo rel, IPartFilter pf)
        {
            Stream inputData = rel.GetContent();
            pf.PreProcessPart(inputData);

            if (pf is PptxSlidePartFilter)
            {
                CollectPreProcessResultsForSlidePart(rel, pf as PptxSlidePartFilter);
            }
            else if (pf is PptxNotesMasterPartFilter)
            {
                CollectPreProcessResultsForNotesMasterPart(rel, pf as PptxNotesMasterPartFilter);
            }
            else if (pf is PptxHandoutsMasterPartFilter)
            {
                CollectPreProcessResultsForHandoutsMasterPart(rel, pf as PptxHandoutsMasterPartFilter);
            }
            else if (pf is PptxSlideMasterPartFilter)
            {
                CollectPreProcessResultsForSlideMasterPart(rel, pf as PptxSlideMasterPartFilter);
            }
            else if (pf is PptxSlideLayoutPartFilter)
            {
                CollectPreProcessResultsForSlideLayoutPart(rel, pf as PptxSlideLayoutPartFilter);
            }

            base.PreprocessSpecialParts(rel, pf);
        }
 protected override void PreprocessSpecialParts(PartInfo rel, IPartFilter pf)
 {
     Stream inputData = rel.GetContent();
     if (pf is XlsxWorkbookXmlPartFilter ||
         pf is XlsxStyleXmlPartFilter ||
         pf is XlsxPreprocessTablePartFilter)
     {
         pf.PreProcessPart(inputData);
     }
     else if (pf is XlsxPreprocessWorksheetPartFilter)
     {
         foreach (PartInfo subRel in pf.SortRelatedParts(rel.GetRelatedObjects()))
         {
             if (subRel.Type == OpenXmlFactory.Get(m_openXmlFormat).OfficeDocumentRelationshipsTable)
             {
                 PreprocessPart(subRel, DocumentProcessingActions.Discover);
                 m_tablePreprocessed = true;
                 break;
             }
         }
         pf.PreProcessPart(inputData);
     }
     base.PreprocessSpecialParts(rel, pf);
 }