sc/source/filter/excel/xedbdata.cxx | 15 +++++++++++++++ sc/source/filter/inc/xedbdata.hxx | 12 ++++++++++++ 2 files changed, 27 insertions(+)
New commits: commit ab8bbaa201ccac63b2c17fc7d92b2dead8e68f53 Author: Akash Shetye <shetyeak...@gmail.com> Date: Fri Aug 2 01:29:28 2013 +0530 Added Auto Filter export for DBData (tables) to xlsx Change-Id: I302f492f9c5ba3e886fdca4e5e76aa8c5813aa94 diff --git a/sc/source/filter/excel/xedbdata.cxx b/sc/source/filter/excel/xedbdata.cxx index a2e7c5e..d38cb95 100644 --- a/sc/source/filter/excel/xedbdata.cxx +++ b/sc/source/filter/excel/xedbdata.cxx @@ -84,6 +84,19 @@ void XclExpXmlDBDataColumns::SaveXml( XclExpXmlStream& rStrm ) } // ============================================================================ +XclExpXmlDBDataAutoFilter::XclExpXmlDBDataAutoFilter( const XclExpRoot& rRoot, ScRange& rRange ) + : XclExpRoot( rRoot ), + maRange( rRange ) +{ +} + +void XclExpXmlDBDataAutoFilter::SaveXml( XclExpXmlStream& rStrm ) +{ + sax_fastparser::FSHelperPtr& rDBDataTable = rStrm.GetCurrentStream(); + rDBDataTable->singleElement( XML_autoFilter, XML_ref, XclXmlUtils::ToOString( maRange ).getStr(), FSEND); +} + +// ============================================================================ XclExpXmlDBDataTable::XclExpXmlDBDataTable(const XclExpRoot& rRoot, ScDBData& rDBData, int nTableId ) : XclExpRoot( rRoot ), mnTableId( nTableId ) @@ -96,11 +109,13 @@ XclExpXmlDBDataTable::XclExpXmlDBDataTable(const XclExpRoot& rRoot, ScDBData& rD mbTotalsRowShown = false; // Not supported yet in ScDBData rDBData.GetArea( maRange ); maStyleInfo.reset( new XclExpXmlDBDataStyleInfo( rRoot, aDBFormatting) ); + maAutoFilter.reset( new XclExpXmlDBDataAutoFilter( rRoot, maRange ) ); } void XclExpXmlDBDataTable::SaveXml( XclExpXmlStream& rStrm ) { sax_fastparser::FSHelperPtr& rDBDataTable = rStrm.GetCurrentStream(); rDBDataTable->startElement( XML_table, XML_id, OString::number( mnTableId ).getStr(), XML_name, OUStringToOString( maName, RTL_TEXTENCODING_UTF8 ).getStr(), XML_displayName, OUStringToOString( maDisplayName, RTL_TEXTENCODING_UTF8 ).getStr(), XML_ref, XclXmlUtils::ToOString( maRange ).getStr() ,FSEND); + maAutoFilter->SaveXml( rStrm ); maTableColumns->SaveXml( rStrm ); maStyleInfo->SaveXml( rStrm ); rDBDataTable->endElement( XML_table ); diff --git a/sc/source/filter/inc/xedbdata.hxx b/sc/source/filter/inc/xedbdata.hxx index 1b23183..d3edd2a 100644 --- a/sc/source/filter/inc/xedbdata.hxx +++ b/sc/source/filter/inc/xedbdata.hxx @@ -61,6 +61,16 @@ private: }; // ============================================================================ +class XclExpXmlDBDataAutoFilter : public XclExpRecordBase, protected XclExpRoot +{ +public: + XclExpXmlDBDataAutoFilter( const XclExpRoot& rRoot, ScRange& pRange ); + virtual void SaveXml( XclExpXmlStream& rStrm ); +private: + ScRange maRange; +}; + +// ============================================================================ class XclExpXmlDBDataTable : public XclExpRecordBase, protected XclExpRoot { public: @@ -69,8 +79,10 @@ public: private: typedef boost::scoped_ptr < XclExpXmlDBDataColumns > DBDataTableColumns; typedef boost::scoped_ptr < XclExpXmlDBDataStyleInfo > DBDataStyleInfo; + typedef boost::scoped_ptr < XclExpXmlDBDataAutoFilter > DBDataAutoFilter; DBDataTableColumns maTableColumns; DBDataStyleInfo maStyleInfo; + DBDataAutoFilter maAutoFilter; int mnTableId; OUString maName; OUString maDisplayName; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits