示例#1
0
 internal ChartRenderer(DocumentObject domObj, RtfDocumentRenderer docRenderer)
     : base(domObj, docRenderer)
 {
     _chart    = (Chart)domObj;
     _isInline = DocumentRelations.HasParentOfType(_chart, typeof(Paragraph)) ||
                 RenderInParagraph();
 }
示例#2
0
        internal ImageRenderer(DocumentObject domObj, RtfDocumentRenderer docRenderer)
            : base(domObj, docRenderer)
        {
            this.image    = domObj as Image;
            this.filePath = this.image.GetFilePath(this.docRenderer.WorkingDirectory);
            this.isInline = DocumentRelations.HasParentOfType(this.image, typeof(Paragraph)) ||
                            RenderInParagraph();

            CalculateImageDimensions();
        }
示例#3
0
        /// <summary>
        /// Renders the dummy paragraph's attributes.
        /// </summary>
        protected virtual void RenderParagraphAttributes()
        {
            bool isInCell = DocumentRelations.HasParentOfType(this.shape, typeof(Cell));

            //if (isInCell)
            //  this.csvWriter.WriteControl("intbl");

            RenderParagraphAlignment();
            RenderParagraphIndents();
            RenderParagraphDistances();
        }
        /// <summary>
        /// Renders attributes that belong to a shape.
        /// </summary>
        private void RenderShapeAttributes()
        {
            RenderTopPosition();
            RenderLeftPosition();

            if (DocumentRelations.HasParentOfType(_shape, typeof(HeaderFooter)))
            {
                _rtfWriter.WriteControl("shpfhdr", "1");
            }
            else
            {
                _rtfWriter.WriteControl("shpfhdr", "0");
            }
            RenderWrapFormat();
            RenderRelativeHorizontal();
            RenderRelativeVertical();
            if (RenderInParagraph())
            {
                _rtfWriter.WriteControl("shplockanchor");
                RenderNameValuePair("fPseudoInline", "1");
            }
            RenderLineFormat();
            RenderFillFormat();
        }