text stringlengths 0 234 |
|---|
procedure Left_Margin(xl : Excel_Out_Stream; inches: Long_Float) is |
begin |
WriteBiff(xl, 16#0026#, IEEE_Double_Intel(inches)); |
end Left_Margin; |
procedure Right_Margin(xl : Excel_Out_Stream; inches: Long_Float) is |
begin |
WriteBiff(xl, 16#0027#, IEEE_Double_Intel(inches)); |
end Right_Margin; |
procedure Top_Margin(xl : Excel_Out_Stream; inches: Long_Float) is |
begin |
WriteBiff(xl, 16#0028#, IEEE_Double_Intel(inches)); |
end Top_Margin; |
procedure Bottom_Margin(xl : Excel_Out_Stream; inches: Long_Float) is |
begin |
WriteBiff(xl, 16#0029#, IEEE_Double_Intel(inches)); |
end Bottom_Margin; |
procedure Margins(xl : Excel_Out_Stream; left, right, top, bottom: Long_Float) is |
begin |
Left_Margin(xl, left); |
Right_Margin(xl, right); |
Top_Margin(xl, top); |
Bottom_Margin(xl, bottom); |
end Margins; |
procedure Print_Row_Column_Headers(xl : Excel_Out_Stream) is |
begin |
WriteBiff(xl, 16#002A#, Intel_16(1)); -- 5.81 PRINTHEADERS p.199 |
end Print_Row_Column_Headers; |
procedure Print_Gridlines(xl : Excel_Out_Stream) is |
begin |
WriteBiff(xl, 16#002B#, Intel_16(1)); -- 5.80 PRINTGRIDLINES p.199 |
end Print_Gridlines; |
procedure Page_Setup( |
xl : Excel_Out_Stream; |
scaling_percents : Positive:= 100; |
fit_width_with_n_pages : Natural:= 1; -- 0: as many as possible |
fit_height_with_n_pages: Natural:= 1; -- 0: as many as possible |
orientation : Orientation_choice:= portrait; |
scale_or_fit : Scale_or_fit_choice:= scale |
) |
is |
begin |
-- 5.73 PAGESETUP p.192 - this is BIFF4+ (cheat if xl.format below)! |
WriteBiff(xl, |
16#00A1#, |
Intel_16(0) & -- paper type undefined |
Intel_16(Unsigned_16(scaling_percents)) & |
Intel_16(1) & -- start page number |
Intel_16(Unsigned_16(fit_width_with_n_pages)) & |
Intel_16(Unsigned_16(fit_height_with_n_pages)) & |
Intel_16(2 * Orientation_choice'Pos(orientation)) |
); |
-- 5.97 SHEETPR p.207 - this is BIFF3+ (cheat if xl.format below) ! |
-- NB: this field contains other informations, should be delayed |
-- in case other preferences are to be set |
WriteBiff(xl, |
16#0081#, |
Intel_16(256 * Scale_or_fit_choice'Pos(scale_or_fit)) |
); |
end Page_Setup; |
y_scale: constant:= 20; -- scaling to obtain character point (pt) units |
-- 5.31 DEFAULTROWHEIGHT |
procedure Write_default_row_height ( |
xl : Excel_Out_Stream; |
height : Positive |
) |
is |
default_twips: constant Byte_buffer:= Intel_16(Unsigned_16(height * y_scale)); |
options_flags: constant Byte_buffer:= (1,0); |
-- 1 = Row height and default font height do not match |
begin |
case xl.format is |
when BIFF2 => |
WriteBiff(xl, 16#0025#, default_twips); |
when BIFF3 | BIFF4 => |
WriteBiff(xl, 16#0225#, options_flags & default_twips); |
end case; |
end Write_default_row_height; |
-- 5.32 DEFCOLWIDTH |
procedure Write_default_column_width ( |
xl : in out Excel_Out_Stream; |
width : Positive) |
is |
begin |
WriteBiff(xl, 16#0055#, Intel_16(Unsigned_16(width))); |
xl.defcolwdth:= 256 * width; |
end Write_default_column_width; |
procedure Write_column_width ( |
xl : in out Excel_Out_Stream; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.