Example #1
0
        /**
         * Construct a SpreadsheetML Drawing from a namespace part
         *
         * @param part the namespace part holding the Drawing data,
         * the content type must be <code>application/vnd.openxmlformats-officedocument.Drawing+xml</code>
         * @param rel  the namespace relationship holding this Drawing,
         * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing
         */
        internal XSSFDrawing(PackagePart part, PackageRelationship rel)
            : base(part, rel)
        {
            XmlDocument xmldoc = ConvertStreamToXml(part.GetInputStream());

            drawing = NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing.Parse(xmldoc, NamespaceManager);
        }
Example #2
0
        /**
         * Construct a SpreadsheetML Drawing from a namespace part
         *
         * @param part the namespace part holding the Drawing data,
         * the content type must be <code>application/vnd.openxmlformats-officedocument.Drawing+xml</code>
         * @param rel  the namespace relationship holding this Drawing,
         * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing
         */
        internal XSSFDrawing(PackagePart part)
            : base(part)
        {
            XmlDocument xmldoc = ConvertStreamToXml(part.GetInputStream());

            drawing = CT_Drawing.Parse(xmldoc, NamespaceManager);
        }
Example #3
0
 /**
  * Construct a SpreadsheetML Drawing from a namespace part
  *
  * @param part the namespace part holding the Drawing data,
  * the content type must be <code>application/vnd.openxmlformats-officedocument.Drawing+xml</code>
  * @param rel  the namespace relationship holding this Drawing,
  * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing
  */
 internal XSSFDrawing(PackagePart part, PackageRelationship rel)
     : base(part, rel)
 {
     //XmlOptions options = new XmlOptions(DEFAULT_XML_OPTIONS);
     ////Removing root element
     //options.setLoadReplaceDocumentElement(null);
     //drawing = CTDrawing.Factory.parse(part.getInputStream(), options);
     drawing = NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing.Parse(part.GetInputStream());
 }
Example #4
0
 /**
  * Construct a SpreadsheetML Drawing from a namespace part
  *
  * @param part the namespace part holding the Drawing data,
  * the content type must be <code>application/vnd.openxmlformats-officedocument.Drawing+xml</code>
  * @param rel  the namespace relationship holding this Drawing,
  * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing
  */
 internal XSSFDrawing(PackagePart part, PackageRelationship rel)
     : base(part, rel)
 {
     //XmlOptions options = new XmlOptions(DEFAULT_XML_OPTIONS);
     ////Removing root element
     //options.setLoadReplaceDocumentElement(null);
     //drawing = CTDrawing.Factory.parse(part.getInputStream(), options);
     drawing = NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing.Parse(part.GetInputStream());
 }
Example #5
0
 /**
  * Construct a SpreadsheetML Drawing from a namespace part
  *
  * @param part the namespace part holding the Drawing data,
  * the content type must be <code>application/vnd.openxmlformats-officedocument.Drawing+xml</code>
  * @param rel  the namespace relationship holding this Drawing,
  * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing
  */
 internal XSSFDrawing(PackagePart part, PackageRelationship rel)
     : base(part, rel)
 {
     XmlDocument xmldoc = ConvertStreamToXml(part.GetInputStream());
     drawing = NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing.Parse(xmldoc, NamespaceManager);
 }
Example #6
0
 /**
  * Create a new SpreadsheetML Drawing
  *
  * @see NPOI.xssf.usermodel.XSSFSheet#CreateDrawingPatriarch()
  */
 public XSSFDrawing()
     : base()
 {
     drawing = NewDrawing();
 }
Example #7
0
 /**
  * Create a new SpreadsheetML Drawing
  *
  * @see NPOI.xssf.usermodel.XSSFSheet#CreateDrawingPatriarch()
  */
 public XSSFDrawing()
     : base()
 {
     drawing = NewDrawing();
 }
Example #8
0
 public static CT_Drawing Parse(XmlDocument xmldoc, XmlNamespaceManager namespaceManager)
 {
     XmlNodeList cellanchorNodes = xmldoc.SelectNodes("//*",namespaceManager);
     CT_Drawing ctDrawing = new CT_Drawing();
     foreach (XmlNode node in cellanchorNodes)
     {
         if (node.LocalName == "twoCellAnchor")
         {
             CT_TwoCellAnchor twoCellAnchor = CT_TwoCellAnchor.Parse(node, namespaceManager);
             ctDrawing.cellAnchors.Add(twoCellAnchor);
         }
         else if (node.LocalName == "oneCellAnchor")
         {
             CT_OneCellAnchor oneCellAnchor = CT_OneCellAnchor.Parse(node, namespaceManager);
             ctDrawing.cellAnchors.Add(oneCellAnchor);
         }
         else if (node.LocalName == "absCellAnchor")
         {
             CT_AbsoluteCellAnchor absCellAnchor = CT_AbsoluteCellAnchor.Parse(node, namespaceManager);
             ctDrawing.cellAnchors.Add(absCellAnchor);
         }
     }
     return ctDrawing;
 }
Example #9
0
        //[XmlElement("absoluteAnchor")]
        //public List<CT_TwoCellAnchor> AbsoluteAnchors
        //{
        //    get { return absoluteAnchors; }
        //    set { absoluteAnchors = value; }
        //}

        public void Set(CT_Drawing ctDrawing)
        {
            this.cellAnchors.Clear();
            foreach (IEG_Anchor anchor in ctDrawing.cellAnchors)
            {
                this.cellAnchors.Add(anchor);
            }
        }
Example #10
0
        //[XmlElement("absoluteAnchor")]
        //public List<CT_TwoCellAnchor> AbsoluteAnchors
        //{
        //    get { return absoluteAnchors; }
        //    set { absoluteAnchors = value; }
        //}

        public void Set(CT_Drawing cT_Drawing)
        {
            throw new NotImplementedException();
        }
Example #11
0
        //[XmlElement("absoluteAnchor")]
        //public List<CT_TwoCellAnchor> AbsoluteAnchors
        //{
        //    get { return absoluteAnchors; }
        //    set { absoluteAnchors = value; }
        //}

        public void Set(CT_Drawing cT_Drawing)
        {
            throw new NotImplementedException();
        }
Example #12
0
        public static CT_Drawing Parse(Stream stream)
        {
            CT_Drawing result = (CT_Drawing)serializer.Deserialize(stream);

            return(result);
        }
Example #13
0
 /**
  * Construct a SpreadsheetML Drawing from a namespace part
  *
  * @param part the namespace part holding the Drawing data,
  * the content type must be <code>application/vnd.openxmlformats-officedocument.Drawing+xml</code>
  * @param rel  the namespace relationship holding this Drawing,
  * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing
  */
 internal XSSFDrawing(PackagePart part, PackageRelationship rel)
     : base(part, rel)
 {
     drawing = NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing.Parse(part.GetInputStream());
 }
Example #14
0
 /**
  * Construct a SpreadsheetML Drawing from a namespace part
  *
  * @param part the namespace part holding the Drawing data,
  * the content type must be <code>application/vnd.openxmlformats-officedocument.Drawing+xml</code>
  * @param rel  the namespace relationship holding this Drawing,
  * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing
  */
 internal XSSFDrawing(PackagePart part, PackageRelationship rel)
     : base(part, rel)
 {
     drawing = NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Drawing.Parse(part.GetInputStream());
 }