summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-09-28 19:02:44 +0100
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-11-05 17:09:06 +0000
commit3225eff997c0703a7b8e784a19770c8eca7263a7 (patch)
tree2da85e5202601b93e824f4e8b0dd16a933eabf26
parent0678304aa69bc5f7bbbd0b6a79e12e875a6b0788 (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>
-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 626baa558f93..3373d7d8f25c 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(),