Example #1
0
 public OdtTemplate(DocumentInformation documentInformation, IXmlNamespaceResolver xmlNamespaceResolver,
                    IXDocumentParserService xDocumentParserService)
     : base(documentInformation, xmlNamespaceResolver, xDocumentParserService)
 {
     ScriptSectionFormatting();
     ReplaceFields();
 }
Example #2
0
        public OdsTemplate( DocumentInformation documentInformation, IXmlNamespaceResolver xmlNamespaceResolver,
		                    IXDocumentParserService xDocumentParserService )
            : base(documentInformation, xmlNamespaceResolver, xDocumentParserService)
        {
            HandleConditionals();
            ReplaceComments();
        }
Example #3
0
        public OdtTemplate( DocumentInformation documentInformation, IXmlNamespaceResolver xmlNamespaceResolver,
		                    IXDocumentParserService xDocumentParserService )
            : base(documentInformation, xmlNamespaceResolver, xDocumentParserService)
        {
            ScriptSectionFormatting();
            ReplaceFields();
        }
Example #4
0
 public OdsTemplate(DocumentInformation documentInformation, IXmlNamespaceResolver xmlNamespaceResolver,
                    IXDocumentParserService xDocumentParserService)
     : base(documentInformation, xmlNamespaceResolver, xDocumentParserService)
 {
     HandleConditionals();
     ReplaceComments();
 }
 public TemplateBuilderService(ITemplateFactory templateFactory, IOdfHandlerService odfHandlerService,
                               IXmlNamespaceResolver xmlNamespaceService,
                               IXDocumentParserService xDocumentParserService)
 {
     _templateFactory        = templateFactory;
     _odfHandlerService      = odfHandlerService;
     _xmlNamespaceService    = xmlNamespaceService;
     _xDocumentParserService = xDocumentParserService;
 }
Example #6
0
        protected Template( DocumentInformation documentInformation, IXmlNamespaceResolver xmlNamespaceResolver,
		                    IXDocumentParserService xDocumentParserService )
        {
            OriginalDocument = documentInformation.Document;
            Meta = documentInformation.Metadata;
            Manager = xmlNamespaceResolver;
            _xDocumentParserService = xDocumentParserService;
            ConvertDocument( documentInformation.Content );
        }
Example #7
0
 protected Template(DocumentInformation documentInformation, IXmlNamespaceResolver xmlNamespaceResolver,
                    IXDocumentParserService xDocumentParserService)
 {
     OriginalDocument        = documentInformation.Document;
     Meta                    = documentInformation.Metadata;
     Manager                 = xmlNamespaceResolver;
     _xDocumentParserService = xDocumentParserService;
     ConvertDocument(documentInformation.Content);
 }
        public TemplateBuilderService( ITemplateFactory templateFactory, IOdfHandlerService odfHandlerService,
		                               IXmlNamespaceResolver xmlNamespaceService,
		                               IXDocumentParserService xDocumentParserService )
        {
            _templateFactory = templateFactory;
            _odfHandlerService = odfHandlerService;
            _xmlNamespaceService = xmlNamespaceService;
            _xDocumentParserService = xDocumentParserService;
        }
        public OdfHandlerService( IZipFactory zipFactory, IZipHandlerService zipHandlerService,
								  IBuildOdfMetadataService buildOdfMetadataService, IXmlNamespaceResolver xmlNamespaceService,
		                          IXDocumentParserService ixDocumentParserService )
        {
            _zipFactory = zipFactory;
            _zipHandlerService = zipHandlerService;
            _buildOdfMetadataService = buildOdfMetadataService;
            _manager = xmlNamespaceService;
            _ixDocumentParserService = ixDocumentParserService;
        }
Example #10
0
 public OdfHandlerService(IZipFactory zipFactory, IZipHandlerService zipHandlerService,
                          IBuildOdfMetadataService buildOdfMetadataService, IXmlNamespaceResolver xmlNamespaceService,
                          IXDocumentParserService ixDocumentParserService)
 {
     _zipFactory              = zipFactory;
     _zipHandlerService       = zipHandlerService;
     _buildOdfMetadataService = buildOdfMetadataService;
     _manager = xmlNamespaceService;
     _ixDocumentParserService = ixDocumentParserService;
 }
        public OdfMetadata BuildOdfMetadata( string metaXml, IXmlNamespaceResolver manager,
		                                     IXDocumentParserService parserService )
        {
            var document = parserService.Parse( metaXml );
            var modelTypeNameElement =
                document.XPathSelectElement( @"//meta:user-defined[ @meta:name = 'ModelType' ]", manager );

            var modelTypeName = modelTypeNameElement.Value;

            var type = Type.GetType( modelTypeName, true );
            return new OdfMetadata( type );
        }
        public OdfMetadata BuildOdfMetadata(string metaXml, IXmlNamespaceResolver manager,
                                            IXDocumentParserService parserService)
        {
            var document             = parserService.Parse(metaXml);
            var modelTypeNameElement =
                document.XPathSelectElement(@"//meta:user-defined[ @meta:name = 'ModelType' ]", manager);

            var modelTypeName = modelTypeNameElement.Value;

            var type = Type.GetType(modelTypeName, true);

            return(new OdfMetadata(type));
        }
Example #13
0
        public Template GenerateTemplate(DocumentInformation documentInformation, IXmlNamespaceResolver xmlNamespaceService,
                                         IXDocumentParserService xDocumentParserService)
        {
            switch (documentInformation.FileType)
            {
            case OdfHandlerService.FileType.Ods:
                return(new OdsTemplate(documentInformation, xmlNamespaceService, xDocumentParserService));

            case OdfHandlerService.FileType.Odt:
                return(new OdtTemplate(documentInformation, xmlNamespaceService, xDocumentParserService));
            }

            throw new NotSupportedException(
                      "Only ods and odt files are supported at this time, and this error should have been caught on pattern initialization.");
        }
Example #14
0
        public Template GenerateTemplate( DocumentInformation documentInformation, IXmlNamespaceResolver xmlNamespaceService,
		                                  IXDocumentParserService xDocumentParserService )
        {
            switch( documentInformation.FileType )
            {
                case OdfHandlerService.FileType.Ods:
                    return new OdsTemplate( documentInformation, xmlNamespaceService, xDocumentParserService );

                case OdfHandlerService.FileType.Odt:
                    return new OdtTemplate( documentInformation, xmlNamespaceService, xDocumentParserService );
            }

            throw new NotSupportedException(
                "Only ods and odt files are supported at this time, and this error should have been caught on pattern initialization." );
        }