diff options
author | Noel Power <noel.power@suse.com> | 2012-09-28 16:59:02 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2012-09-28 17:38:50 +0100 |
commit | 78a102e2060a1a8fc003d91fa3193b2bfa841d26 (patch) | |
tree | 1db08e5697334302c79aebf70b3456c42f073e4b /sc | |
parent | d3d720b14c0bbfc849f8562d02b471e223e1b0bc (diff) |
fix xlsx export missing alignment attributes with cellstyle fdo#55417
Change-Id: I510d0f399c58b5a9b192f3566e093c636cae2c0a
Diffstat (limited to 'sc')
-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 ebbe25621d94..a90483151e88 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 ); } |