libxlsxwriter/src/app.c in fast_excel-0.4.1 vs libxlsxwriter/src/app.c in fast_excel-0.5.0
- old
+ new
@@ -1,11 +1,11 @@
/*****************************************************************************
* app - A library for creating Excel XLSX app files.
*
* Used in conjunction with the libxlsxwriter library.
*
- * Copyright 2014-2019, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
+ * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
*
*/
#include "xlsxwriter/xmlwriter.h"
#include "xlsxwriter/app.h"
@@ -130,10 +130,13 @@
* Write the <DocSecurity> element.
*/
STATIC void
_write_doc_security(lxw_app *self)
{
- lxw_xml_data_element(self->file, "DocSecurity", "0", NULL);
+ if (self->doc_security == 2)
+ lxw_xml_data_element(self->file, "DocSecurity", "2", NULL);
+ else
+ lxw_xml_data_element(self->file, "DocSecurity", "0", NULL);
}
/*
* Write the <ScaleCrop> element.
*/