Exemplo n.º 1
0
        /**
         * Construct a new HtmlPipelineContext object
         */

        public HtmlPipelineContext(CssAppliers cssAppliers)
        {
            this.queue       = new LinkedList <StackKeeper>();
            this.memory      = new Dictionary <String, Object>();
            this.cssAppliers = cssAppliers;
            if (this.cssAppliers == null)
            {
                this.cssAppliers = new CssAppliersImpl(new XMLWorkerFontProvider());
            }
        }
Exemplo n.º 2
0
        /**
         * Create a clone of this HtmlPipelineContext, the clone only contains the
         * initial values, not the internal values. Beware, the state of the current
         * Context is not copied to the clone. Only the configurational important
         * stuff like the LinkProvider (same object), ImageProvider (new
         * {@link AbstractImageProvider} with same ImageRootPath) ,
         * TagProcessorFactory (same object), acceptUnknown (primitive), charset
         * (Charset.forName to get a new charset), autobookmark (primitive) are
         * copied.
         */

        virtual public object Clone()
        {
            CssAppliers         cloneCssApliers = this.cssAppliers.Clone();
            HtmlPipelineContext newCtx          = new HtmlPipelineContext(cloneCssApliers);

            if (this.imageProvider != null)
            {
                newCtx.SetImageProvider(imageProvider);
            }
            if (null != this.charset)
            {
                newCtx.CharSet(Encoding.GetEncoding(this.charset.CodePage));
            }
            newCtx.SetPageSize(new Rectangle(this.pageSize)).SetLinkProvider(this.linkprovider)
            .SetRootTags(new List <String>(this.roottags)).AutoBookmark(this.autoBookmark)
            .SetTagFactory(this.tagFactory).SetAcceptUnknown(this.acceptUnknown);
            return(newCtx);
        }
Exemplo n.º 3
0
        /**
         * Construct a ParagraphCssApplier.
         *
         */

        public ParagraphCssApplier(CssAppliers appliers)
        {
            this.appliers = appliers;
        }
Exemplo n.º 4
0
 public void SetCssAppliers(CssAppliers cssAppliers)
 {
     this.cssAppliers = cssAppliers;
 }