internal override Stream ProcessPartData(IPartFilter pf, Stream inputData, RelatedPartProvider relPartProv, DocumentProcessingActions action) { if (!(pf is XmlPartFilter)) Assert.IsInstanceOf(typeof(DefaultPartFilter), pf, "Partfilter wasn't a default part filter"); Assert.IsNotNull(inputData, "input data unexpectedly null"); Assert.AreEqual(expectedAction, action, "action wasn't what we expected"); Assert.IsNotNull(relPartProv, "the related part provider is unexpectedly null"); return base.ProcessPartData(pf, inputData, relPartProv, action); }
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 virtual void PreprocessSpecialParts(PartInfo rel, IPartFilter pf) { Stream inputData = rel.GetContent(); if (pf is DiagramXmlPartFilter || pf is ThemeXmlPartFilter || pf is DiagramColoursXmlPartFilter) { pf.PreProcessPart(inputData); } }
virtual internal Stream ProcessPartData(IPartFilter pf, Stream inputData, RelatedPartProvider relPartProv, DocumentProcessingActions action) { pf.FilterTriggersToRequiredContentTypes(ContentTypesOfInterest); return pf.ProcessPart(inputData, m_docText, relPartProv, action); }
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); }