Exemplo n.º 1
0
        private static InternalChart CreateChartSheet()
        {
            InternalChart retval = new InternalChart();
            List<Record.Record> records = new List<Record.Record>(30);
            retval.recores = records;

            records.Add(CreateBOFRecord());
            records.Add(CreateChartFRTInfoRecord());
            records.Add(new HeaderRecord(string.Empty));
            records.Add(new FooterRecord(string.Empty));
            records.Add(CreateHCenterRecord());
            records.Add(CreateVCenterRecord());
            records.Add((LeftMarginRecord)CreateMarginRecord(MarginType.LeftMargin, 0.7));
            records.Add((RightMarginRecord)CreateMarginRecord(MarginType.RightMargin, 0.7));
            records.Add((TopMarginRecord)CreateMarginRecord(MarginType.TopMargin, 0.7));
            records.Add((BottomMarginRecord)CreateMarginRecord(MarginType.BottomMargin, 0.7));
            //ignore pls
            
            records.Add(CreatePrintSetupRecord());
            records.Add(CreatePrintSizeRecord());
            records.Add(CreateFontBasisRecord1());
            records.Add(CreateFontBasisRecord2());
            //records.Add(CreateHeaderFooterRecord()); //ignore this record
            records.Add(new ProtectRecord(false));
            //records.Add(CreateDrawingRecord());
            records.Add(new UnitsRecord());

            //CHARTFOMATS = Chart Begin *2FONTLIST Scl PlotGrowth [FRAME] *SERIESFORMAT *SS 
            //ShtProps *2DFTTEXT AxesUsed 1*2AXISPARENT [CrtLayout12A] [DAT] *ATTACHEDLABEL 
            //[CRTMLFRT] *([DataLabExt StartObject] ATTACHEDLABEL [EndObject]) [TEXTPROPS] *2CRTMLFRT End
            records.Add(CreateChartRecord(0, 0, 32341968, 14745600));
            records.Add(new BeginRecord());
            records.Add(CreateSCLRecord(1, 1));
            records.Add(CreatePlotGrowthRecord(65536, 65536));
            //Frame
            records.Add(CreateFrameRecord1());
            records.Add(new BeginRecord());
            records.Add(CreateLineFormatRecord(true));
            records.Add(CreateAreaFormatRecord1());
            records.Add(new EndRecord());

            //an empty chart has no SERIESFORMAT
            //CreateSERIESFORMAT(records);
            //an empty chart has no SS
            //CreateSS(records);

            records.Add(CreateShtPropsRecord());

            //*2 DFTTEXT
            CreateRuleDFTTEXT(records);
            CreateRuleDFTTEXT(records);

            records.Add(CreateAxisUsedRecord(1));

            // 1*2AXISPARENT
            CreateRuleAXISPARENT(records);
            //SERIESDATA
            CreateRuleSERIESDATA(records);

            records.Add(new EOFRecord());
            return retval;
        }
Exemplo n.º 2
0
        private static InternalChart CreateChartSheet()
        {
            InternalChart        retval  = new InternalChart();
            List <Record.Record> records = new List <Record.Record>(30);

            retval.recores = records;

            records.Add(CreateBOFRecord());
            records.Add(CreateChartFRTInfoRecord());
            records.Add(new HeaderRecord(string.Empty));
            records.Add(new FooterRecord(string.Empty));
            records.Add(CreateHCenterRecord());
            records.Add(CreateVCenterRecord());
            records.Add((LeftMarginRecord)CreateMarginRecord(MarginType.LeftMargin, 0.7));
            records.Add((RightMarginRecord)CreateMarginRecord(MarginType.RightMargin, 0.7));
            records.Add((TopMarginRecord)CreateMarginRecord(MarginType.TopMargin, 0.7));
            records.Add((BottomMarginRecord)CreateMarginRecord(MarginType.BottomMargin, 0.7));
            //ignore pls

            records.Add(CreatePrintSetupRecord());
            records.Add(CreatePrintSizeRecord());
            records.Add(CreateFontBasisRecord1());
            records.Add(CreateFontBasisRecord2());
            //records.Add(CreateHeaderFooterRecord()); //ignore this record
            records.Add(new ProtectRecord(false));
            //records.Add(CreateDrawingRecord());
            records.Add(new UnitsRecord());

            //CHARTFOMATS = Chart Begin *2FONTLIST Scl PlotGrowth [FRAME] *SERIESFORMAT *SS
            //ShtProps *2DFTTEXT AxesUsed 1*2AXISPARENT [CrtLayout12A] [DAT] *ATTACHEDLABEL
            //[CRTMLFRT] *([DataLabExt StartObject] ATTACHEDLABEL [EndObject]) [TEXTPROPS] *2CRTMLFRT End
            records.Add(CreateChartRecord(0, 0, 32341968, 14745600));
            records.Add(new BeginRecord());
            records.Add(CreateSCLRecord(1, 1));
            records.Add(CreatePlotGrowthRecord(65536, 65536));
            //Frame
            records.Add(CreateFrameRecord1());
            records.Add(new BeginRecord());
            records.Add(CreateLineFormatRecord(true));
            records.Add(CreateAreaFormatRecord1());
            records.Add(new EndRecord());

            //an empty chart has no SERIESFORMAT
            //CreateSERIESFORMAT(records);
            //an empty chart has no SS
            //CreateSS(records);

            records.Add(CreateShtPropsRecord());

            //*2 DFTTEXT
            CreateRuleDFTTEXT(records);
            CreateRuleDFTTEXT(records);

            records.Add(CreateAxisUsedRecord(1));

            // 1*2AXISPARENT
            CreateRuleAXISPARENT(records);
            //SERIESDATA
            CreateRuleSERIESDATA(records);

            records.Add(new EOFRecord());
            return(retval);
        }