summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-09-28 19:02:44 +0100
committerPetr Mladek <pmladek@suse.cz>2012-11-07 11:04:27 +0100
commita68d26c0b626ce78bc2f5ed4da3c0dba462bed31 (patch)
tree4e79fe7954456f4ad140be7d84ac433f92724242 /sc
parentd829b0014b28172b24b84734cde1ea3a100904d4 (diff)
halt corrupted styles with multi-saved xlsx document fdo#55418
Change-Id: I2d53c88ab121edeec2bf53f7fd177a0edcc05a25 Reviewed-on: https://gerrit.libreoffice.org/958 Reviewed-by: Kohei Yoshida <kohei.yoshida@gmail.com> Tested-by: Kohei Yoshida <kohei.yoshida@gmail.com>
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 13b7d401aa6a..6740fdece1bb 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -2229,7 +2229,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(),