https://bugs.documentfoundation.org/show_bug.cgi?id=53027

Julien Nabet <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #20 from Julien Nabet <[email protected]> ---
About Decimal, on pc Debian x86-64 with master sources updated today,  the
value is also at 4 on dbase odb file.
after some gdb, it's because of this (see
http://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/dbase/DTable.cxx#359)
    359         case 'N':
    360             aTypeName = "DECIMAL";
    361             if ( aDBFColumn.db_typ == 'N' )
    362                 aTypeName = "NUMERIC";
    363             eType = DataType::DECIMAL;
    364 
    365             // for numeric fields two characters more are written, than
the precision of the column description predescribes,
    366             // to keep room for the possible sign and the comma. This
has to be considered...
    367             nPrecision =
SvDbaseConverter::ConvertPrecisionToOdbc(nPrecision,aDBFColumn.db_dez);
    368             // This is not true for older versions ....
    369             break;

If removing line 367, the value is at 5 in table edition + when copying table.

Here are the other lines:
     22 sal_Int32 SvDbaseConverter::ConvertPrecisionToDbase(sal_Int32 _nLen,
sal_Int32 _nScale)
     23 {
     24     return _nScale ? _nLen +2 : _nLen +1;
     25 }
     26 sal_Int32 SvDbaseConverter::ConvertPrecisionToOdbc(sal_Int32 _nLen,
sal_Int32 _nScale)
     27 {
     28     return _nScale ? _nLen -2 : _nLen -1;
     29 }

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to