diff options
author | Katarina Machalkova <kmachalkova@suse.cz> | 2010-10-13 17:54:42 +0200 |
---|---|---|
committer | Katarina Machalkova <kmachalkova@suse.cz> | 2010-10-13 19:51:45 +0200 |
commit | 8c368fecaa527cf8b20423289eea5b25d0571a29 (patch) | |
tree | 47e24bb69a59c565b3db4eebfd7ec4add9977e3d | |
parent | d7699181e72d8219ce43bcabfbf65c810965d7c7 (diff) |
Merged xlsx-shared-xlsx-export-simple-autofilter.diff from ooo-buil
-rw-r--r-- | sc/source/filter/excel/excrecds.cxx | 9 | ||||
-rw-r--r-- | sc/source/filter/inc/excrecds.hxx | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index 89702d1a7c74..318a13545a48 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -843,6 +843,7 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) : XclExpRoot( rRoot ), pFilterMode( NULL ), pFilterInfo( NULL ) + , mbAutoFilter (false) { ScDBCollection& rDBColl = GetDatabaseRanges(); XclExpNameManager& rNameMgr = GetNameManager(); @@ -943,6 +944,9 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) : if( !maFilterList.IsEmpty() ) pFilterMode = new XclExpFiltermode; pFilterInfo = new XclExpAutofilterinfo( aRange.aStart, nColCnt ); + + if (maFilterList.IsEmpty () && !bConflict) + mbAutoFilter = true; } } } @@ -1000,7 +1004,7 @@ void ExcAutoFilterRecs::Save( XclExpStream& rStrm ) void ExcAutoFilterRecs::SaveXml( XclExpXmlStream& rStrm ) { - if( maFilterList.IsEmpty() ) + if( maFilterList.IsEmpty() && !mbAutoFilter ) return; sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream(); @@ -1008,7 +1012,8 @@ void ExcAutoFilterRecs::SaveXml( XclExpXmlStream& rStrm ) XML_ref, XclXmlUtils::ToOString( maRef ).getStr(), FSEND ); // OOXTODO: XML_extLst, XML_sortState - maFilterList.SaveXml( rStrm ); + if( !maFilterList.IsEmpty() ) + maFilterList.SaveXml( rStrm ); rWorksheet->endElement( XML_autoFilter ); } diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx index 275133643221..d5c3541b12d9 100644 --- a/sc/source/filter/inc/excrecds.hxx +++ b/sc/source/filter/inc/excrecds.hxx @@ -472,6 +472,7 @@ private: XclExpFiltermode* pFilterMode; XclExpAutofilterinfo* pFilterInfo; ScRange maRef; + bool mbAutoFilter; }; // ---------------------------------------------------------------------------- |