Kaydet (Commit) 83d481b9 authored tarafından Mike Kaganski's avatar Mike Kaganski

Don't close elements that weren't open

Found by code reading.

Change-Id: I6ebae46e56348d38c595d4c5675f0d3902dee5f7
Reviewed-on: https://gerrit.libreoffice.org/70974
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 8b663bc8
......@@ -1226,6 +1226,7 @@ void XclExpCrn::SaveXml( XclExpXmlStream& rStrm )
ScAddress aAdr( mnScCol, mnScRow, 0); // Tab number doesn't matter
for( const auto& rValue : maValues )
{
bool bCloseCell = true;
if( rValue.has< double >() )
{
double fVal = rValue.get< double >();
......@@ -1270,9 +1271,13 @@ void XclExpCrn::SaveXml( XclExpXmlStream& rStrm )
else
{
// Empty/blank cell not stored, only aAdr is incremented.
bCloseCell = false;
}
if (bCloseCell)
{
pFS->endElement(XML_v);
pFS->endElement(XML_cell);
}
pFS->endElement( XML_v );
pFS->endElement( XML_cell);
aAdr.IncCol();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment