From dc171330390c0f5346ec6d8bdec07009f95295bd Mon Sep 17 00:00:00 2001 From: John McNamara Date: Sun, 1 Mar 2015 20:32:16 +0000 Subject: [PATCH] Prep for release 0.0.4. --- Changes.txt | 16 ++++++++++++++++ include/xlsxwriter.h | 2 +- include/xlsxwriter/worksheet.h | 20 +++++++++++++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Changes.txt b/Changes.txt index e0f7434c..ceac5563 100644 --- a/Changes.txt +++ b/Changes.txt @@ -2,6 +2,22 @@ @page changes Changes + +## 0.0.4 March 1 2015 + +- Added `worksheet_set_margins()` function to set top, bottom, left and right + margins in a worksheet. + +- Fix for issue where format objects were written to the file in the order of + creation rather than the order of use. This issue caused incorrect formats + in cells. + Issue [#3](https://github.com/jmcnamara/libxlsxwriter/issues/3). + +- Fix for issue where tmp files in `constant_memory` mode weren't closed + until application exited. + Issue [#1](https://github.com/jmcnamara/libxlsxwriter/issues/1). + + ## 0.0.3 January 7 2015 - Added worksheet page setup methods. diff --git a/include/xlsxwriter.h b/include/xlsxwriter.h index c2eb46b0..5d6f4be5 100644 --- a/include/xlsxwriter.h +++ b/include/xlsxwriter.h @@ -18,6 +18,6 @@ #include "xlsxwriter/format.h" #include "xlsxwriter/utility.h" -#define LXW_VERSION "0.0.3" +#define LXW_VERSION "0.0.4" #endif /* __LXW_XLSXWRITER_H__ */ diff --git a/include/xlsxwriter/worksheet.h b/include/xlsxwriter/worksheet.h index 7d37c30b..c5416fe7 100644 --- a/include/xlsxwriter/worksheet.h +++ b/include/xlsxwriter/worksheet.h @@ -792,6 +792,24 @@ void worksheet_set_page_view(lxw_worksheet *worksheet); */ void worksheet_set_paper(lxw_worksheet *worksheet, uint8_t paper_type); +/** + * @brief Set the worksheet margins for the printed page. + * + * @param worksheet Pointer to a lxw_worksheet instance to be updated. + * @param left Left margin in inches. Excel default is 0.7. + * @param right Right margin in inches. Excel default is 0.7. + * @param top Top margin in inches. Excel default is 0.75. + * @param bottom Bottom margin in inches. Excel default is 0.75. + * + * The `set_margins()` function is used to set the margins of the worksheet + * when it is printed. The units are in inches. Specifying `-1` for any + * parameter will give the default Excel value as shown above. + * + * @code + * worksheet_set_margins(worksheet, 1.3, 1.2, -1, -1); + * @endcode + * + */ void worksheet_set_margins(lxw_worksheet *worksheet, double left, double right, double top, double bottom); @@ -799,7 +817,7 @@ void worksheet_set_margins(lxw_worksheet *worksheet, double left, * @brief Set the order in which pages are printed. * * @param worksheet Pointer to a lxw_worksheet instance to be updated. -* + * * The `print_across()` function is used to change the default print * direction. This is referred to by Excel as the sheet "page order": *