[Libreoffice] ExcelToSc / ExcelToSc8
Hi, at the moment I'm having a look at ExcelToSc and ExcelToSc8 and have the feeling that there is some amount of duplicate code... During comparison of methods ExcRelToScRel and ExcRelToScRel8 I've wondered if it shouldn't be nRow instead of nC in the initialisation of bRowRel: void ExcelToSc8::ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nC, ScSingleRefData rSRD, const sal_Bool bName ) { const sal_BoolbColRel = ( nC 0x4000 ) != 0; const sal_BoolbRowRel = ( nC 0x8000 ) != 0; const sal_uInt8nCol = static_castsal_uInt8(nC); ... Christina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] ExcelToSc / ExcelToSc8
On Fri, 2011-05-13 at 22:14 +0200, Chr. Rossmanith wrote: Hi, at the moment I'm having a look at ExcelToSc and ExcelToSc8 and have the feeling that there is some amount of duplicate code... During comparison of methods ExcRelToScRel and ExcRelToScRel8 I've wondered if it shouldn't be nRow instead of nC in the initialisation of bRowRel: No, that code is correct. In the Excel binary format, both column and row flags are stored in the (unused) higher bits of the column index bytes. Kohei -- Kohei Yoshida, LibreOffice hacker, Calc kyosh...@novell.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] ExcelToSc / ExcelToSc8
Quick answer :-) Thank you! at the moment I'm having a look at ExcelToSc and ExcelToSc8 and have the feeling that there is some amount of duplicate code... During comparison of methods ExcRelToScRel and ExcRelToScRel8 I've wondered if it shouldn't be nRow instead of nC in the initialisation of bRowRel: No, that code is correct. In the Excel binary format, both column and row flags are stored in the (unused) higher bits of the column index bytes. And it changed with versions? In ExcRelToScRel() I find if( nRow 0x4000 ) and if( nRow 0x8000 ) I'd expect nCol with your explanation from above... Christina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] ExcelToSc / ExcelToSc8
On Fri, 2011-05-13 at 22:38 +0200, Chr. Rossmanith wrote: Quick answer :-) Thank you! at the moment I'm having a look at ExcelToSc and ExcelToSc8 and have the feeling that there is some amount of duplicate code... During comparison of methods ExcRelToScRel and ExcRelToScRel8 I've wondered if it shouldn't be nRow instead of nC in the initialisation of bRowRel: No, that code is correct. In the Excel binary format, both column and row flags are stored in the (unused) higher bits of the column index bytes. And it changed with versions? That's possible. BIFF5 and BIFF8 handle many things differently. I'm just talking about BIFF8 here. I don't even know if we can still find a spec on BIFF5. But then, that format is so old we don't really pay that much attention. But if something as basic as that (cell address) is wrong, I would think that we would have received lots of bugs reports regarding Excel import filter bugs. So I assume that's correct. Kohei -- Kohei Yoshida, LibreOffice hacker, Calc kyosh...@novell.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice