Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

So we have two ways to enable these code correspondingly. For case 1, just add entry so that can activate ooxml filter and call them; for case 2, enable compiling for the source file in makefile. But due to those source files which has never been compiled was contributed earlier so that are not based on the current code base, they probably meet many compile errors which need to be fixed. Of course it is not so easy as just do doing above things to enable ooxml export because the existing code are far away FAR FAR AWAY from product, have big gaps. They have many mistakes and misses which need to improve.

...

  • Register XLSX export service

In this above file a service name was already defined as "com.sun.star.comp.oox.xls.ExcelFilter". See oox\source\xls\excelfilter.cxx, a object ExcelFilter was already there, and it implemented services of "com.sun.star.comp.oox.xls.ExcelFilter". See code:

OUString SAL_CALL ExcelFilter_getImplementationName() throw()

...

For example, in sc\source\filter\excel\xestream.cxx there are two classes, XclExpStream and XclExpXmlStream. XclExpStream is responsible exporting binary files, XclExpXmlStream is responsible for exporting OOXML files. Similar as binary filter, OOXML filters also export elements from parent to child and usually XclExpXmlXXX classes are OOXML specific responsible for exporting corresponding OOXML XXX objects and they have a SaveXml method for exporting their data. However, some classes are shared by both binary and OOXML filter. In this case, a Save method is for exporting binary data, a SaveXml method is for exporting OOXML data.

...

Now the final step is to register the service and a component at application side. In this example, we need to register a "com.sun.star.comp.Calc.OOXMLExporter"  service and a service component to XclExpXmlStream. It is the most important and most complicated step. Please follow this wiki to get detail: https://wiki.openoffice.org/wiki/Uno/Cpp/Tutorials/component_tutorial

...