From 43037c1e883e3b2fcb5ea4aaf6cfaf46bf434b76 Mon Sep 17 00:00:00 2001 From: John McNamara Date: Sat, 12 Nov 2022 18:03:22 +0000 Subject: [PATCH] Added memory buffer example to the docs. --- dev/release/fix_example_docs.pl | 3 +- docs/src/examples.dox | 56 +++++++++++++++++++++------------ docs/src/examples.txt | 21 ++++++++----- examples/output_buffer.c | 2 +- 4 files changed, 53 insertions(+), 29 deletions(-) diff --git a/dev/release/fix_example_docs.pl b/dev/release/fix_example_docs.pl index f4c992bd..80fead5e 100644 --- a/dev/release/fix_example_docs.pl +++ b/dev/release/fix_example_docs.pl @@ -29,6 +29,8 @@ my @examples = ( [ 'dynamic_arrays.c', 'A example of using Excel 365 dynamic array formulas' ], [ 'utf8.c', 'A example of some UTF-8 text' ], [ 'constant_memory.c', 'Write a large file with constant memory usage' ], + [ 'output_buffer.c', 'Write a file to a memory buffer' ], + [ 'image_buffer.c', 'Example of adding an image from a memory buffer.' ], [ 'merge_range.c', 'Create a merged range of cells' ], [ 'merge_rich_string.c', 'Create a merged range with a rich string' ], [ 'autofilter.c', 'An example of a worksheet autofilter' ], @@ -37,7 +39,6 @@ my @examples = ( [ 'conditional_format2.c', 'An advanced conditional formatting example' ], [ 'tables.c', 'Example of table to a worksheet.' ], [ 'images.c', 'Example of adding images to a worksheet.' ], - [ 'image_buffer.c', 'Example of adding an image from a memory buffer.' ], [ 'headers_footers.c', 'Example of adding worksheet headers/footers' ], [ 'defined_name.c', 'Example of how to create defined names' ], [ 'outline.c', 'Example of grouping and outlines' ], diff --git a/docs/src/examples.dox b/docs/src/examples.dox index 414bac57..b48c0662 100644 --- a/docs/src/examples.dox +++ b/docs/src/examples.dox @@ -288,7 +288,7 @@ A simple Unicode UTF-8 example. Note, the source file is UTF-8 encoded. - +
@ref utf8.c "<< utf8.c"@ref merge_range.c "merge_range.c >>"@ref output_buffer.c "output_buffer.c >>"
@@ -300,11 +300,43 @@ mode. -@example merge_range.c +@example output_buffer.c + + +
@ref constant_memory.c "<< constant_memory.c"@ref image_buffer.c "image_buffer.c >>"
+ +Example of using libxlsxwriter to write a workbook file to a memory buffer. + +@image html hello01.png + + + + +@example image_buffer.c + + + + + + +
@ref output_buffer.c "<< output_buffer.c"@ref merge_range.c "merge_range.c >>"
+ +Example of adding an image to a worksheet from a memory buffer. + +@image html image_buffer2.png + + + + +@example merge_range.c + + + +
@ref image_buffer.c "<< image_buffer.c" @ref merge_rich_string.c "merge_rich_string.c >>"
@@ -426,7 +458,7 @@ formula or formatted collectively. - +
@ref tables.c "<< tables.c"@ref image_buffer.c "image_buffer.c >>"@ref headers_footers.c "headers_footers.c >>"
@@ -437,27 +469,11 @@ Example of adding images to a worksheet. -@example image_buffer.c - - - - - - -
@ref images.c "<< images.c"@ref headers_footers.c "headers_footers.c >>"
- -Example of adding an image to a worksheet from a memory buffer. - -@image html image_buffer2.png - - - - @example headers_footers.c - +
@ref image_buffer.c "<< image_buffer.c"@ref images.c "<< images.c" @ref defined_name.c "defined_name.c >>"
diff --git a/docs/src/examples.txt b/docs/src/examples.txt index 8988f975..33e73a06 100644 --- a/docs/src/examples.txt +++ b/docs/src/examples.txt @@ -135,6 +135,20 @@ mode. @image html constant_memory.png +############################################################## +@example output_buffer.c + +Example of using libxlsxwriter to write a workbook file to a memory buffer. + +@image html hello01.png + +############################################################## +@example image_buffer.c + +Example of adding an image to a worksheet from a memory buffer. + +@image html image_buffer2.png + ############################################################## @example merge_range.c @@ -200,13 +214,6 @@ Example of adding images to a worksheet. @image html images.png -############################################################## -@example image_buffer.c - -Example of adding an image to a worksheet from a memory buffer. - -@image html image_buffer2.png - ############################################################## @example headers_footers.c diff --git a/examples/output_buffer.c b/examples/output_buffer.c index 15d72509..20850e8a 100644 --- a/examples/output_buffer.c +++ b/examples/output_buffer.c @@ -1,5 +1,5 @@ /* - * Example of using libxlsxwriter for writing a workbook file to a buffer. + * Example of using libxlsxwriter to write a workbook file to a memory buffer. * * Copyright 2014-2021, John McNamara, jmcnamara@cpan.org *