summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-09-28 19:02:44 +0100
committerNoel Power <noel.power@suse.com>2012-09-28 19:03:56 +0100
commita705c6cac4182d62c3495be7367d4ae34fd47fac (patch)
tree6af0111d3f7f135316068cb148099c939cea0f51 /sc
parentdeee6394c0db6c6ec844d2c9606b138d9bcb4672 (diff)
halt corrupted styles with multi-saved xlsx document fdo#55418
Change-Id: I2d53c88ab121edeec2bf53f7fd177a0edcc05a25
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xestyle.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index a90483151e88..339dd10df17b 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -2235,7 +2235,10 @@ void XclExpStyle::SaveXml( XclExpXmlStream& rStrm )
}
else
sName = XclXmlUtils::ToOString( maName );
- sal_Int32 nXFId = rStrm.GetRoot().GetXFBuffer().GetXmlStyleIndex( maXFId.mnXFId );
+ // get the index in sortedlist associated with the mnXId
+ sal_Int32 nXFId = rStrm.GetRoot().GetXFBuffer().GetXFIndex( maXFId.mnXFId );
+ // get the style index associated with index into sortedlist
+ nXFId = rStrm.GetRoot().GetXFBuffer().GetXmlStyleIndex( nXFId );
rStrm.GetCurrentStream()->singleElement( XML_cellStyle,
XML_name, sName.getStr(),
XML_xfId, OString::valueOf( nXFId ).getStr(),