private StyleSheet GetStyleSheet()
 {
     if (m_styleSheet == null)
     {
         PartInfo rel = GetMainDoc();
         PartInfo rSS = rel.GetRelatedObjects(OpenXmlFactory.Get(m_openXmlFormat).OfficeDocumentRelationshipsStyles)[0];
         m_styleSheet = new StyleSheet(m_commonNamespaces);
         using (Stream str = rSS.GetContent())
         {
             m_styleSheet.ConnectToInputStream(str);
             m_styleSheet.Execute();
             m_styleSheet.Resolve();
         }
     }
     return m_styleSheet;
 }
        public StyleBasedPartFilter(StyleSheet styleSheet, CommonNamespaces commonNamespaces, ContentType[] contentTypesToDetect, bool cleaning) : base(commonNamespaces)
        {
            m_styleSheet = styleSheet;
            m_contentTypesToDetect = contentTypesToDetect;
			m_cleaning = cleaning;
        }