diff options
author | Noel Power <noel.power@suse.com> | 2012-09-28 16:59:02 +0100 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-05 17:05:26 +0000 |
commit | 0678304aa69bc5f7bbbd0b6a79e12e875a6b0788 (patch) | |
tree | 92c8a98b2013de623f47c530f9b4e7dfd0eab46a | |
parent | 60a3410614dfb1cb9b60e77898bb1f130bd2c742 (diff) |
fix xlsx export missing alignment attributes with cellstyle fdo#55417
Change-Id: I510d0f399c58b5a9b192f3566e093c636cae2c0a
Reviewed-on: https://gerrit.libreoffice.org/959
Reviewed-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Tested-by: Kohei Yoshida <kohei.yoshida@gmail.com>
-rw-r--r-- | sc/source/filter/excel/xestyle.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 13b7d401aa6a..626baa558f93 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -2025,7 +2025,6 @@ void XclExpXF::Init( const SfxItemSet& rItemSet, sal_Int16 nScript, GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong ) : nForceScNumFmt; mnXclNumFmt = GetNumFmtBuffer().Insert( mnScNumFmt ); mbFmtUsed = ScfTools::CheckItem( rItemSet, ATTR_VALUE_FORMAT, IsStyleXF() ); - // alignment mbAlignUsed = maAlignment.FillFromItemSet( rItemSet, bForceLineBreak, GetBiff(), IsStyleXF() ); @@ -2112,10 +2111,12 @@ void XclExpXF::SaveXml( XclExpXmlStream& rStrm ) sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream(); sal_Int32 nXfId = 0; + const XclExpXF* pStyleXF = NULL; if( IsCellXF() ) { sal_uInt16 nXFIndex = rStrm.GetRoot().GetXFBuffer().GetXFIndex( mnParentXFId ); nXfId = rStrm.GetRoot().GetXFBuffer().GetXmlStyleIndex( nXFIndex ); + pStyleXF = rStrm.GetRoot().GetXFBuffer().GetXFById( mnParentXFId ); } rStyleSheet->startElement( XML_xf, @@ -2135,8 +2136,13 @@ void XclExpXF::SaveXml( XclExpXmlStream& rStrm ) FSEND ); if( mbAlignUsed ) maAlignment.SaveXml( rStrm ); + else if ( pStyleXF ) + pStyleXF->GetAlignmentData().SaveXml( rStrm ); if( mbProtUsed ) maProtection.SaveXml( rStrm ); + else if ( pStyleXF ) + pStyleXF->GetProtectionData().SaveXml( rStrm ); + // OOXTODO: XML_extLst rStyleSheet->endElement( XML_xf ); } |