public XlsxMacrosheetXmlPartFilter(CommonNamespaces commonNamespaces, Dictionary<string, string> StringContentLookup, Dictionary<string, WorkSheet> WorksheetLookup, Dictionary<string, CellFormatData> CellFormats, ContentType[] contentTypesToDetect, ref XlsxProcessingDictionaries processingDictionaries, ref PredefinedObjectsProcessingHelper predefinedObjectsHelper, PartInfo rel)
     : base(commonNamespaces, rel.Target, StringContentLookup, WorksheetLookup, CellFormats, contentTypesToDetect, ref processingDictionaries, ref predefinedObjectsHelper)
 {
     m_id = rel.Id;
     m_target = rel.Target;
     m_type = rel.GetContentType();
 }
Esempio n. 2
0
 public XmlNodeInformation(string contentValue, int depth, CommonNamespaces commonNamespaces)
 {
     m_contentValue = contentValue;
     iDepth = depth;
     nodeType = NodeType.content;
     m_commonNamespaces = commonNamespaces;
 }
 public PptxPresentationPartFilter(CommonNamespaces commonNamespaces, PptxDocumentProcessor docproc, bool interestedInHiddenSlides)
     : base(commonNamespaces)
 {
     m_parentDocProc = docproc;
     Triggers.AddRange(PptxMetadataDefinitions.Hyperlink);
     m_interestedInHiddenSlides = interestedInHiddenSlides;
 }
 public void TestCreateAndLoad()
 {
     CommonNamespaces cs = new CommonNamespaces(OpenXmlFormat.Transitional);
     XlsxPredefinedTableXmlFilter filter = new XlsxPredefinedTableXmlFilter("TableStyleMedium28", cs);
     Assert.IsTrue(filter.TargetTableStyle == "TableStyleMedium28", "didn't set the table style target");
     filter.Read();
 }
        private void Init(CommonNamespaces commonNamespaces, Dictionary<string, string> StringContentLookup, Dictionary<string, WorkSheet> WorksheetLookup, Dictionary<string, CellFormatData> CellFormats, ref XlsxProcessingDictionaries processingDictionaries)
        {
            m_c = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "c");
            m_chartsheet = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "chartsheet");
            m_col = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "col");
            m_cols = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "cols");
            m_dialogsheet = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "dialogsheet");
            m_f = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "f");
            m_hidden = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "hidden");
            m_veryHidden = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "veryHidden");
            m_hyperlinks = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "hyperlinks");
            m_oleObjects = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "oleObjects");
            m_row = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "row");
            m_s = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "s");
            m_sheetName = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "SheetName");
            m_sheetData = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "sheetData");
            m_v = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "v");
            m_worksheet = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "worksheet");
            m_nProcessed = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "node_processed");
            m_sProcessed = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "s_node_processed");


            if (StringContentLookup != null)
                SharedStringContentLookup = StringContentLookup;
            if (WorksheetLookup != null)
                WorksheetDataLookup = WorksheetLookup;
            if (CellFormats != null)
                CellFormatsLookup = CellFormats;
            if (processingDictionaries != null)
                m_processingDictionaries = processingDictionaries;
        }
 public XlsxPreprocessWorkbookXmlFilter(DocumentText docText, CommonNamespaces commonNamespaces, ContentType[] contentTypesToDetect, Dictionary<string, PartInfo> piDictSheets)
     : base(docText, commonNamespaces)
 {
     List<ContentType> m_contentTypesOfInterest = new List<ContentType>(contentTypesToDetect);
     m_piDictSheets = piDictSheets;
     m_sheet = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "sheet");
     m_definedName = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "definedName");
 }
Esempio n. 7
0
 public DiagramXmlPartFilter(CommonNamespaces commonNamespaces, ContentType[] contentTypesToDetect, bool preProcessing, ref PredefinedObjectsProcessingHelper DiagramHelper)
     : base(commonNamespaces)
 {
     m_commonNamespaces = commonNamespaces;
     m_contentTypesToDetect = contentTypesToDetect;
     m_preProcessing = preProcessing;
     m_DiagramHelper = DiagramHelper;
 }
        public XlsxPreprocessTablePartFilter(CommonNamespaces commonNamespaces, string rId, string target, string parentSheet, ref XlsxProcessingDictionaries processingDictionaries)
            : base(commonNamespaces)
        {
            m_rId = rId;
            m_target = target;
            m_parentSheet = parentSheet;
            m_processingDictionaries = processingDictionaries;

        }
Esempio n. 9
0
        void Initialise(Stream inputStream)
        {
            m_openXmlFormat = OpenXmlFormatIdentifier.Resolve(inputStream);

            m_inputStream = inputStream;
            m_inputPackage = new OPCPackage(m_inputStream);
            m_outputPackage = null;
            m_commonNamespaces = new CommonNamespaces(m_openXmlFormat);
        }
Esempio n. 10
0
        public PptxComment(DocumentText docText, CommonNamespaces commonNamespaces)
            : base(docText, commonNamespaces)
        { 
#region XMLFilterBase
        //override protected void HandleStartElement(XmlNodeInformation nodeInfo);
        //override protected void HandleContent(XmlNodeInformation nodeInfo){}
        //override protected void HandleEndElement(XmlNodeInformation nodeInfo){}
#endregion
        }
Esempio n. 11
0
        public static XmlNodeList SelectSubNodes(XmlDocument doc, string xPath)
        {
            XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
            CommonNamespaces cns = new CommonNamespaces(doc.NameTable, OpenXmlFormat.Transitional);
            nsmgr.AddNamespace("r", cns.GetAtomicName(NamespaceId.r));
            nsmgr.AddNamespace("alias", doc.DocumentElement.NamespaceURI);

            XmlNodeList nodes = doc.DocumentElement.SelectNodes(xPath, nsmgr);
            return nodes;
        }
 public XlsxPreprocessWorksheetPartFilter(CommonNamespaces commonNamespaces, string target, ContentType[] contentTypesToDetect, Dictionary<string, WorkSheet> WorksheetLookup, Dictionary<string, CellFormatData> CellFormatsLookup, ref XlsxProcessingDictionaries processingDictionaries, ref PredefinedObjectsProcessingHelper predefinedObjectsHelper)
     : base(commonNamespaces)
 {
     m_contentTypesToDetect = contentTypesToDetect;
     m_worksheetLookup = WorksheetLookup;
     m_cellFormatsLookup = CellFormatsLookup;
     m_target = target;
     m_processingDictionaries = processingDictionaries;
     m_predefinedObjectsHelper = predefinedObjectsHelper;
 }
Esempio n. 13
0
        public static XmlNodeList SelectSubNodes(XmlDocument doc, string xPath, OpenXmlFormat format = OpenXmlFormat.Transitional)
        {
            XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
            CommonNamespaces cns = new CommonNamespaces(doc.NameTable, format);
            nsmgr.AddNamespace("w", cns.GetAtomicName(NamespaceId.w));

            XmlNodeList nodes = doc.SelectNodes(xPath, nsmgr);

            return nodes;
        }
 public XlsxSharedStringsXmlFilter(DocumentText docText, CommonNamespaces commonNamespaces, ContentType[] contentTypesOfInterest, ref XlsxProcessingDictionaries processingDictionaries)
     : base(docText, commonNamespaces)
 {
     List<ContentType> ctypes = new List<ContentType>(contentTypesOfInterest);
     m_interestedInWhiteText = ctypes.Contains(ContentType.WhiteText);
     m_interestedInSmallText = ctypes.Contains(ContentType.SmallText);
     m_interestedInRedactedText = ctypes.Contains(ContentType.RedactedText);
     m_interestedInHiddenText = ctypes.Contains(ContentType.HiddenRow);//add to this as we go I think
     m_processingDictionaries = processingDictionaries;
 }
Esempio n. 15
0
 public StateTracker(CommonNamespaces commonNamespaces, List<ContentType> ctypes, ref PredefinedObjectsProcessingHelper predefinedObjectsHelper)
 {
     m_interestedInWhiteText = ctypes.Contains(ContentType.WhiteText);
     m_interestedInSmallText = ctypes.Contains(ContentType.SmallText);
     m_interestedInRedactedText = ctypes.Contains(ContentType.RedactedText);
     m_interestedInHiddenRow = ctypes.Contains(ContentType.HiddenRow);
     m_interestedInHiddenColumn = ctypes.Contains(ContentType.HiddenColumn);
     m_interestedInHyperlinks = ctypes.Contains(ContentType.Hyperlink);
     m_interestedInLinks = ctypes.Contains(ContentType.Links);
     m_interestedInHiddenSheets = ctypes.Contains(ContentType.HiddenSheet);
     m_interestedInMacros = ctypes.Contains(ContentType.Macro);
     m_predefinedObjectsHelper = predefinedObjectsHelper;
     m_commonNamespaces = commonNamespaces;
 }
 public XlsxPreprocessTableXmlFilter(DocumentText docText, CommonNamespaces commonNamespaces, string rId, string target, string parentSheet, ref XlsxProcessingDictionaries processingDictionaries)
     : base(docText, commonNamespaces)
 {
     m_processingDictionaries = processingDictionaries;
     m_tableData.rId = rId;
     int index = parentSheet.IndexOf("xl/");
     if (index != -1)
     {
         m_tableData.ParentSheet = parentSheet.Substring(3);
     }
     else
     {
         m_tableData.ParentSheet = parentSheet;
     }
 }
Esempio n. 17
0
 public XlsxWorkbookXmlFilter(DocumentText docText, CommonNamespaces commonNamespaces, ContentType[] contentTypesToDetect, Dictionary<DefinedName, byte> FoundDefinedNames, Dictionary<string, WorkSheet> WorksheetLookup)
     : base(docText, commonNamespaces)
 {
     List<ContentType> m_contentTypesOfInterest = new List<ContentType>(contentTypesToDetect);
     m_interestedInHiddenSheets = m_contentTypesOfInterest.Contains(ContentType.HiddenSheet);
     m_interestedInExternalLinks = m_contentTypesOfInterest.Contains(ContentType.Links);
     m_interestedInMacros = m_contentTypesOfInterest.Contains(ContentType.Macro);
     
     //may have to get more specific later 
     if (m_contentTypesOfInterest.Contains(ContentType.HiddenText) ||
         m_contentTypesOfInterest.Contains(ContentType.HiddenColumn) ||
         m_contentTypesOfInterest.Contains(ContentType.HiddenRow))
     {
         m_interestedInHiddenData = true;
     }
     m_foundDefinedNames = FoundDefinedNames;
     m_worksheets = WorksheetLookup;
     m_sheet = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "sheet");
     m_externalRef = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "externalReferences");
     m_definedNames = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "definedNames");
     m_definedName = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "definedName");
     m_hidden = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "hidden");
     m_veryHidden = NameTableUtils.NormalizeString(commonNamespaces.NameTable, "veryHidden");
 }
Esempio n. 18
0
 public DiagramXmlFilter(DocumentText docText, CommonNamespaces commonNamespaces, ContentType[] contentTypesOfInterest, ref PredefinedObjectsProcessingHelper DiagramHelper)
     : base(docText, commonNamespaces)
 {
     m_stateTracker = new DiagramStateTracker(new List<ContentType>(contentTypesOfInterest));
     m_DiagramHelper = DiagramHelper;
 }
 public PptxViewPropsPartFilter(CommonNamespaces commonNamespaces)
     : base(commonNamespaces)
 {
 }
Esempio n. 20
0
 public PptxCommentAuthors(DocumentText docText, CommonNamespaces commonNamespaces)
     : base(docText, commonNamespaces)
 { 
 }
Esempio n. 21
0
 public DocxInkPartFilter(CommonNamespaces commonNamespaces, string sTarget)
     : base(commonNamespaces)
 {
     m_target = sTarget;
 }
Esempio n. 22
0
 public XmlPartFilter(CommonNamespaces commonNamespaces, string ContentType)
 {
     m_commonNamespaces = commonNamespaces;
     m_openXmlFormat = commonNamespaces.OpenXmlFormat;
     m_contentType = ContentType;
 }
Esempio n. 23
0
 public XmlPartFilter(CommonNamespaces commonNamespaces)
 {
     m_commonNamespaces = commonNamespaces;
     m_openXmlFormat = commonNamespaces.OpenXmlFormat;
 }
 public XlsxExternalLinkPartFilter(CommonNamespaces commonNamespaces, string target, PartInfo rel)
     : base(commonNamespaces)
 {
     m_targetName = target;
     StoreRelatedPartsData(rel.GetRelatedObjects());
 }
Esempio n. 25
0
 public ThemeXmlFilter(DocumentText docText, CommonNamespaces commonNamespaces, ref PredefinedObjectsProcessingHelper DiagramHelper)
     : base(docText, commonNamespaces)
 {
     m_DiagramHelper = DiagramHelper;
 }
 public DiagramColoursXmlPartFilter(CommonNamespaces commonNamespaces, ref PredefinedObjectsProcessingHelper DiagramHelper)
     : base(commonNamespaces)
 {
     m_commonNamespaces = commonNamespaces;
     m_DiagramHelper = DiagramHelper;
 }
Esempio n. 27
0
 public XlsxStyleXmlPartFilter(CommonNamespaces commonNamespaces)
     : base(commonNamespaces)
 {
 }
Esempio n. 28
0
 public XlsxRevisionXmlFilter(DocumentText docText, CommonNamespaces commonNamespaces, Dictionary<string, WorkSheet> WorksheetLookup)
     : base(docText, commonNamespaces)
 {
     WorksheetDataLookup = WorksheetLookup;
     m_currentRevisionType = RowColRevisionType.none;
 }
 public XlsxBaseWorksheetXmlFilter(DocumentText docText, CommonNamespaces commonNamespaces, Dictionary<string, string> StringContentLookup, Dictionary<string, WorkSheet> WorksheetLookup, Dictionary<string, CellFormatData> CellFormats, XlsxProcessingDictionaries processingDictionaries)
     : base(docText, commonNamespaces)
 {
     Init(commonNamespaces, StringContentLookup, WorksheetLookup, CellFormats, ref  processingDictionaries);
 }
 public XlsxBaseWorksheetXmlFilter(CommonNamespaces commonNamespaces, Dictionary<string, WorkSheet> WorksheetLookup, Dictionary<string, CellFormatData> CellFormats, ref XlsxProcessingDictionaries processingDictionaries)
     : base(commonNamespaces)
 {
     Init(commonNamespaces, null, WorksheetLookup, CellFormats, ref  processingDictionaries);
 }