Bug 130020 - No warning displayed even if error/warning code was set when spreadsheet data fails to save to dBASE format.
Summary: No warning displayed even if error/warning code was set when spreadsheet data...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.0.0 target:6.4.1
Keywords:
: 130019 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-01-15 17:16 UTC by Athos
Modified: 2022-02-04 03:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
screenshots (215.04 KB, image/png)
2020-01-15 17:20 UTC, Athos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Athos 2020-01-15 17:16:36 UTC
Description:
CALC spreadsheet failed to save to dBASE format.
If the second row of a given column contains only numbers, it is incorrectly saved.
In this case, you treat the column as a number type and place a zero in the character type cell.
Screenshots link: prnt.sc  qo5h99
https://prnt.sc/qo5h99

Steps to Reproduce:
1. FILE / Save as / dBASE (*.dbf) type ( valami.dbf )
2. Just Use dBASE formatum
3. Export dBASE format: (DOS/OS2-852)
4. Click OK.
5. Close file
6. Open last document  ( valami.dbf )


Actual Results:
Zero digits appear in the character cell

Expected Results:
You should have saved the original content.


Reproducible: Always


User Profile Reset: No



Additional Info:
This error is present in all versions.
Comment 1 Athos 2020-01-15 17:20:00 UTC
Created attachment 157164 [details]
screenshots
Comment 2 Eike Rathke 2020-01-15 17:53:07 UTC
*** Bug 130019 has been marked as a duplicate of this bug. ***
Comment 3 Eike Rathke 2020-01-15 18:12:26 UTC
You can't have columns of mixed types in dBase. If the first data row's cell has numeric content then numeric/Decimal type is assumed, similar for boolean/Logical and Date. However, you can force a field to type Text/Character by appending ",C" (without quotes) to the field name, so in your case that would be "CODE1,C". Then numeric cell content is converted to text for export.

All columns' data could be scanned whether they contain mixed types and then switch to Character type, but.. that's rather a data layout error.
Comment 4 Eike Rathke 2020-01-15 18:40:14 UTC
ScDocShell::DBaseExport() for this case even sets SCWARN_EXPORT_DATALOST error code, but for some yet unknown reason a message is not displayed or the error not propagated later.
Comment 5 Eike Rathke 2020-01-16 14:34:01 UTC
At least since 5.3 (don't have earlier versions at hand).
Comment 6 Athos 2020-01-16 15:15:10 UTC
(In reply to Eike Rathke from comment #3)
> You can't have columns of mixed types in dBase. If the first data row's cell
> has numeric content then numeric/Decimal type is assumed, similar for
> boolean/Logical and Date. However, you can force a field to type
> Text/Character by appending ",C" (without quotes) to the field name, so in
> your case that would be "CODE1,C". Then numeric cell content is converted to
> text for export.
> 
> All columns' data could be scanned whether they contain mixed types and then
> switch to Character type, but.. that's rather a data layout error.

The ",C" post-field-name addition is not a bad idea, but doing hundreds or 1000 columns is a big job.
It would be better if you took the dBASE data field type from the table column type.
Comment 7 Eike Rathke 2020-01-20 15:02:56 UTC
There is no such thing as a "table column type" in a spreadsheet.
Comment 8 Commit Notification 2020-01-20 23:25:41 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6a308d2bfaf1d756aa4cfca6a40b80cf5e88e5fa

Propagate warning error code from dBASE export, tdf#130020

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2020-02-04 06:27:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/02ca7b1c92a801004a42c92c59f4bbfc70ec19eb

Propagate warning error code from dBASE export, tdf#130020

It will be available in 6.4.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 QA Administrators 2022-02-04 03:41:37 UTC
Dear Athos,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug