コード例 #1
0
        protected PageSequenceMaster(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            subSequenceSpecifiers = new ArrayList();

            if (parent.ElementName.Equals("fo:layout-master-set"))
            {
                this.layoutMasterSet = (LayoutMasterSet)parent;
                string pm = this.properties.GetProperty("master-name").GetString();
                if (pm == null)
                {
                    FonetDriver.ActiveDriver.FireFonetWarning(
                        "page-sequence-master does not have a page-master-name and so is being ignored");
                }
                else
                {
                    this.layoutMasterSet.addPageSequenceMaster(pm, this);
                }
            }
            else
            {
                throw new FonetException("fo:page-sequence-master must be child "
                                         + "of fo:layout-master-set, not "
                                         + parent.ElementName);
            }
        }
コード例 #2
0
        protected SimplePageMaster(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            this.name = "fo:simple-page-master";

            if (parent.GetName().Equals("fo:layout-master-set"))
            {
                this.layoutMasterSet = (LayoutMasterSet)parent;
                masterName           = this.properties.GetProperty("master-name").GetString();
                if (masterName == null)
                {
                    FonetDriver.ActiveDriver.FireFonetWarning(
                        "simple-page-master does not have a master-name and so is being ignored");
                }
                else
                {
                    this.layoutMasterSet.addSimplePageMaster(this);
                }
            }
            else
            {
                throw new FonetException("fo:simple-page-master must be child "
                                         + "of fo:layout-master-set, not "
                                         + parent.GetName());
            }
            _regions = new Hashtable();
        }
コード例 #3
0
ファイル: SimplePageMaster.cs プロジェクト: nholik/Fo.Net
        protected SimplePageMaster(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            this.name = "fo:simple-page-master";

            if (parent.GetName().Equals("fo:layout-master-set"))
            {
                this.layoutMasterSet = (LayoutMasterSet)parent;
                masterName = this.properties.GetProperty("master-name").GetString();
                if (masterName == null)
                {
                    FonetDriver.ActiveDriver.FireFonetWarning(
                        "simple-page-master does not have a master-name and so is being ignored");
                }
                else
                {
                    this.layoutMasterSet.addSimplePageMaster(this);
                }
            }
            else
            {
                throw new FonetException("fo:simple-page-master must be child "
                    + "of fo:layout-master-set, not "
                    + parent.GetName());
            }
            _regions = new Hashtable();
        }
コード例 #4
0
ファイル: PageSequenceMaster.cs プロジェクト: nholik/Fo.Net
        protected PageSequenceMaster(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            this.name = "fo:page-sequence-master";

            subSequenceSpecifiers = new ArrayList();

            if (parent.GetName().Equals("fo:layout-master-set"))
            {
                this.layoutMasterSet = (LayoutMasterSet)parent;
                string pm = this.properties.GetProperty("master-name").GetString();
                if (pm == null)
                {
                    FonetDriver.ActiveDriver.FireFonetWarning(
                        "page-sequence-master does not have a page-master-name and so is being ignored");
                }
                else
                {
                    this.layoutMasterSet.addPageSequenceMaster(pm, this);
                }
            }
            else
            {
                throw new FonetException("fo:page-sequence-master must be child "
                    + "of fo:layout-master-set, not "
                    + parent.GetName());
            }
        }
コード例 #5
0
ファイル: PageSequence.cs プロジェクト: jps1974/SaveAsPdf
        protected PageSequence(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            if (parent.ElementName.Equals("fo:root"))
            {
                this.root = (Root)parent;
            }
            else
            {
                throw new FonetException("page-sequence must be child of root, not "
                                         + parent.ElementName);
            }

            layoutMasterSet = root.getLayoutMasterSet();
            layoutMasterSet.checkRegionNames();

            _flowMap = new Hashtable();

            thisIsFirstPage = true;
            ipnValue        = this.properties.GetProperty("initial-page-number").GetString();

            if (ipnValue.Equals("auto"))
            {
                pageNumberType = AUTO;
            }
            else if (ipnValue.Equals("auto-even"))
            {
                pageNumberType = AUTO_EVEN;
            }
            else if (ipnValue.Equals("auto-odd"))
            {
                pageNumberType = AUTO_ODD;
            }
            else
            {
                pageNumberType = EXPLICIT;
                try
                {
                    int pageStart = Int32.Parse(ipnValue);
                    this.currentPageNumber = (pageStart > 0) ? pageStart - 1 : 0;
                }
                catch (FormatException)
                {
                    throw new FonetException("\"" + ipnValue
                                             + "\" is not a valid value for initial-page-number");
                }
            }

            masterName = this.properties.GetProperty("master-reference").GetString();

            this.pageNumberGenerator =
                new PageNumberGenerator(this.properties.GetProperty("format").GetString(),
                                        this.properties.GetProperty("grouping-separator").GetCharacter(),
                                        this.properties.GetProperty("grouping-size").GetNumber().IntValue(),
                                        this.properties.GetProperty("letter-value").GetEnum());

            this.forcePageCount =
                this.properties.GetProperty("force-page-count").GetEnum();
        }
コード例 #6
0
ファイル: Root.cs プロジェクト: nholik/Fo.Net
 public void setLayoutMasterSet(LayoutMasterSet layoutMasterSet)
 {
     this.layoutMasterSet = layoutMasterSet;
 }
コード例 #7
0
 public void setLayoutMasterSet(LayoutMasterSet layoutMasterSet)
 {
     this.layoutMasterSet = layoutMasterSet;
 }
コード例 #8
0
ファイル: PageSequence.cs プロジェクト: nholik/Fo.Net
        protected PageSequence(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            this.name = "fo:page-sequence";

            if (parent.GetName().Equals("fo:root"))
            {
                this.root = (Root)parent;
            }
            else
            {
                throw new FonetException("page-sequence must be child of root, not "
                    + parent.GetName());
            }

            layoutMasterSet = root.getLayoutMasterSet();
            layoutMasterSet.checkRegionNames();

            _flowMap = new Hashtable();

            thisIsFirstPage = true;
            ipnValue = this.properties.GetProperty("initial-page-number").GetString();

            if (ipnValue.Equals("auto"))
            {
                pageNumberType = AUTO;
            }
            else if (ipnValue.Equals("auto-even"))
            {
                pageNumberType = AUTO_EVEN;
            }
            else if (ipnValue.Equals("auto-odd"))
            {
                pageNumberType = AUTO_ODD;
            }
            else
            {
                pageNumberType = EXPLICIT;
                try
                {
                    int pageStart = Int32.Parse(ipnValue);
                    this.currentPageNumber = (pageStart > 0) ? pageStart - 1 : 0;
                }
                catch (FormatException)
                {
                    throw new FonetException("\"" + ipnValue
                        + "\" is not a valid value for initial-page-number");
                }
            }

            masterName = this.properties.GetProperty("master-reference").GetString();

            this.pageNumberGenerator =
                new PageNumberGenerator(this.properties.GetProperty("format").GetString(),
                                        this.properties.GetProperty("grouping-separator").GetCharacter(),
                                        this.properties.GetProperty("grouping-size").GetNumber().IntValue(),
                                        this.properties.GetProperty("letter-value").GetEnum());

            this.forcePageCount =
                this.properties.GetProperty("force-page-count").GetEnum();

        }