From 9a339aedc84d75b7a5e0c2ec2ece0ba9bc344086 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 30 Nov 2013 18:40:39 +0100 Subject: [PATCH] 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 --- sc/source/filter/excel/excrecds.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index 01b2432a6062..9be9bfe530fc 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -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,