Beispiel #1
0
        }         // RtfDocument

        // ----------------------------------------------------------------------
        public RtfDocument(
            int rtfVersion,
            IRtfFont defaultFont,
            IRtfFontCollection fontTable,
            IRtfColorCollection colorTable,
            string generator,
            IRtfTextFormatCollection uniqueTextFormats,
            IRtfDocumentInfo documentInfo,
            IRtfDocumentPropertyCollection userProperties,
            IRtfVisualCollection visualContent
            )
        {
            if (rtfVersion != RtfSpec.RtfVersion1)
            {
                throw new RtfUnsupportedStructureException(Strings.UnsupportedRtfVersion(rtfVersion));
            }
            if (defaultFont == null)
            {
                throw new ArgumentNullException("defaultFont");
            }
            if (fontTable == null)
            {
                throw new ArgumentNullException("fontTable");
            }
            if (colorTable == null)
            {
                throw new ArgumentNullException("colorTable");
            }
            if (uniqueTextFormats == null)
            {
                throw new ArgumentNullException("uniqueTextFormats");
            }
            if (documentInfo == null)
            {
                throw new ArgumentNullException("documentInfo");
            }
            if (userProperties == null)
            {
                throw new ArgumentNullException("userProperties");
            }
            if (visualContent == null)
            {
                throw new ArgumentNullException("visualContent");
            }
            this.rtfVersion        = rtfVersion;
            this.defaultFont       = defaultFont;
            defaultTextFormat      = new RtfTextFormat(defaultFont, RtfSpec.DefaultFontSize);
            this.fontTable         = fontTable;
            this.colorTable        = colorTable;
            this.generator         = generator;
            this.uniqueTextFormats = uniqueTextFormats;
            this.documentInfo      = documentInfo;
            this.userProperties    = userProperties;
            this.visualContent     = visualContent;
        }         // RtfDocument
Beispiel #2
0
 // ----------------------------------------------------------------------
 public RtfDocument(
     int rtfVersion,
     IRtfFont defaultFont,
     IRtfFontCollection fontTable,
     IRtfColorCollection colorTable,
     string generator,
     IRtfTextFormatCollection uniqueTextFormats,
     IRtfDocumentInfo documentInfo,
     IRtfDocumentPropertyCollection userProperties,
     IRtfVisualCollection visualContent
     )
 {
     if ( rtfVersion != RtfSpec.RtfVersion1 )
     {
         throw new RtfUnsupportedStructureException( Strings.UnsupportedRtfVersion( rtfVersion ) );
     }
     if ( defaultFont == null )
     {
         throw new ArgumentNullException( "defaultFont" );
     }
     if ( fontTable == null )
     {
         throw new ArgumentNullException( "fontTable" );
     }
     if ( colorTable == null )
     {
         throw new ArgumentNullException( "colorTable" );
     }
     if ( uniqueTextFormats == null )
     {
         throw new ArgumentNullException( "uniqueTextFormats" );
     }
     if ( documentInfo == null )
     {
         throw new ArgumentNullException( "documentInfo" );
     }
     if ( userProperties == null )
     {
         throw new ArgumentNullException( "userProperties" );
     }
     if ( visualContent == null )
     {
         throw new ArgumentNullException( "visualContent" );
     }
     this.rtfVersion = rtfVersion;
     this.defaultFont = defaultFont;
     defaultTextFormat = new RtfTextFormat( defaultFont, RtfSpec.DefaultFontSize );
     this.fontTable = fontTable;
     this.colorTable = colorTable;
     this.generator = generator;
     this.uniqueTextFormats = uniqueTextFormats;
     this.documentInfo = documentInfo;
     this.userProperties = userProperties;
     this.visualContent = visualContent;
 }
Beispiel #3
0
        } // RtfDocument

        public RtfDocument(
            int rtfVersion,
            IRtfFont defaultFont,
            IRtfFontCollection fontTable,
            IRtfColorCollection colorTable,
            string generator,
            IRtfTextFormatCollection uniqueTextFormats,
            IRtfDocumentInfo documentInfo,
            IRtfDocumentPropertyCollection userProperties,
            IRtfVisualCollection visualContent
            )
        {
            if (rtfVersion != RtfSpec.RtfVersion1)
            {
                throw new RtfUnsupportedStructureException(Strings.UnsupportedRtfVersion(rtfVersion));
            }
            if (defaultFont == null)
            {
                throw new ArgumentNullException(nameof(defaultFont));
            }
            if (fontTable == null)
            {
                throw new ArgumentNullException(nameof(fontTable));
            }
            if (colorTable == null)
            {
                throw new ArgumentNullException(nameof(colorTable));
            }
            if (uniqueTextFormats == null)
            {
                throw new ArgumentNullException(nameof(uniqueTextFormats));
            }
            if (documentInfo == null)
            {
                throw new ArgumentNullException(nameof(documentInfo));
            }
            if (userProperties == null)
            {
                throw new ArgumentNullException(nameof(userProperties));
            }
            if (visualContent == null)
            {
                throw new ArgumentNullException(nameof(visualContent));
            }
            RtfVersion        = rtfVersion;
            DefaultFont       = defaultFont;
            DefaultTextFormat = new RtfTextFormat(defaultFont, RtfSpec.DefaultFontSize);
            FontTable         = fontTable;
            ColorTable        = colorTable;
            Generator         = generator;
            UniqueTextFormats = uniqueTextFormats;
            DocumentInfo      = documentInfo;
            UserProperties    = userProperties;
            VisualContent     = visualContent;
        } // RtfDocument