[Libreoffice-bugs] [Bug 112023] New: Copying data from Base truncates precision to the shown format

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Aug 25 11:14:38 UTC 2017


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

            Bug ID: 112023
           Summary: Copying data from Base truncates precision to the
                    shown format
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: lajo at rn.dk

Created attachment 135786
  --> https://bugs.documentfoundation.org/attachment.cgi?id=135786&action=edit
Small database with high-precision data

In Base, copying a table or query with standard "Copy", the data are only
copied to the precision defined by the formatting, not the full precision. For
instance, standard numeric format shows two decimal places, so a data entry
containing the number 3.1415 will be copied as 3.14, resulting in loss of
precision.

For seeing the behaviour, open the attached small database and copy "Table1"
into e.g. a Calc spreadsheet. The database contains the data

    MyTimestamp            MyDouble
    01-01-2015 00:00:01    1.2345
    01-01-2015 00:00:15    3.1415

but unless formatting is changed in Base before copying, "Copy" will only copy
the timestamp to the format chosen for SHOWING the data in the database: Time
to the level of full minutes, numbers with two decimal places.

Whether this behaviour (copying truncating to the shown precision) is a bug or
a feature depends on the viewpoint - or put another way, the current behaviour
has both advantages and disadvantages:

Advantages: Copying a full table can mean copying a huge amount of data to the
clipboard. And copying data with full precision can give a confusing result on
insert in e.g. a text file.

Disadvantages: The user is not warned that "Copy" is a lossy copy. The
behaviour is different from "Copy" in Calc, where data is copied in full
precision regardless of formatting for showing. Finally, alternatives for
copying with full precision may not be obvious to the user.

A solution to make everybody happy may be to have two versions of copy:

a) Rename the current behaviour to "Copy as shown". This makes it clear to the
user that there may be data loss.

b) Implement copy to retain full precision. This can be called "Copy" or
perhaps "Copy with full precision". This allows users like me to retain the
full precision of the data when copying.

Best regards,
Lars

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170825/1f300853/attachment.html>


More information about the Libreoffice-bugs mailing list