[Libreoffice] StarCalc 1.0 to 5.0 filters

Caolán McNamara caolanm at redhat.com
Thu Feb 2 02:10:08 PST 2012

On Thu, 2012-02-02 at 09:26 +0100, Jan Holesovsky wrote:
> Hi Kohei,
> On 2012-02-01 at 22:21 -0500, Kohei Yoshida wrote:
> > Looking at this
> > 
> > http://opengrok.libreoffice.org/xref/core/sc/source/ui/docshell/docsh.cxx#162
> > 
> > We still have some code left in sc that appears to handle import of the
> > now defunct StarCalc binary file format.  I believe this stuff has been
> > moved to binfilter so I guess it's okay to remove these?
> This is only the filter detection code (if I'm not mistaken?), and as
> such, I think this should still remain there, until we kill binfilter
> for good; we still use the import functionality, and for that we need
> the filter detection.

binfilter has its *own* typedetection implementation, i.e.
binfilter/binfilterdetect/source/bindetect BinFilterDetect::detect so,
in theory at least, it self-contains what it needs to detect the formats
it imports. So you should be able to hack sc happily without caring
about it.

e.g. filter/source/config/fragments/types/calc_StarCalc_30.xcu has a
DetectService of com.sun.star.comp.sfx2.BinaryFormatDetector which is
the above BinFilterDetect::detect so .sdc files should be sent to the
binfilter to verify that they are .sdc files and handled by the
binfilter for import

That said, there appears to be a specific quirk/bug with Star Calc 1.0
format, calc_StarCalc_10.xcu still has
"com.sun.star.comp.calc.FormatDetector" as its DetectService instead of

The use of binfilter to typedetect Calc 1.0 files was reverted for 

And it looks on a casual viewing that sc/source/filter/starcalc/*cxx is
the implementation for importing StarCalc 1.0 files that somehow didn't
actually get moved into binfilter and has stayed behind in sc ?


More information about the LibreOffice mailing list