make the validation tool happy

This is just fucking awesome. The MSO implementers notes mention this
attribute and point to some extended information that is either missing
or does not mention this attribute. To make it more funny the MSO
validation complains about invalid values in this attribute for our
export.

Change-Id: Iacf1a6666f9f6124106952ae19ae5d5866bc8cf1
This commit is contained in:
Markus Mohrhard
2013-11-30 18:40:39 +01:00
parent e361f6b81b
commit 9a339aedc8

View File

@@ -519,7 +519,7 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->singleElement( XML_sheetProtection,
XML_sheet, XclXmlUtils::ToPsz( true ),
XML_password, sHash.getStr(),
XML_password, sHash.isEmpty()? NULL : sHash.getStr(),
XML_objects, pTabProtect->isOptionEnabled( ScTableProtection::OBJECTS ) ? NULL : XclXmlUtils::ToPsz( true ),
XML_scenarios, pTabProtect->isOptionEnabled( ScTableProtection::SCENARIOS ) ? NULL : XclXmlUtils::ToPsz( true ),
XML_formatCells, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_CELLS ) ? XclXmlUtils::ToPsz( false ) : NULL,