[Libreoffice-commits] core.git: sc/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 19 11:27:18 UTC 2019
sc/source/filter/excel/xelink.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 83d481b9584dbb4d97661a95f1a19f25dad737b2
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Apr 19 11:24:13 2019 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Apr 19 13:26:33 2019 +0200
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: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 73e3cc36b052..750ae8111345 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -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();
}
More information about the Libreoffice-commits
mailing list