Bug 136363 - calc: database-range definition broken on save-load cycle, (tag / attribute table:orientation="column" inserted)
Summary: calc: database-range definition broken on save-load cycle, (tag / attribute t...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-DataRange
  Show dependency treegraph
 
Reported: 2020-09-01 10:41 UTC by b.
Modified: 2023-05-17 15:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description b. 2020-09-01 10:41:39 UTC
Description:
create - save - re-load - re-save of a file breaks the definition of 'database-range' into it, violating tdf standards 1.2 and 1.3, 

this is a short description of the general fault producing autofilter problems and conflicts between filter and sort as described in tdf#133336 and tdf#133529 and others, 

acc. to tdf standards e.g. 

https://docs.oasis-open.org/office/OpenDocument/v1.3/cs01/part3-schema/OpenDocument-v1.3-cs01-part3-schema.html#__RefHeading__1418556_253892949 

see 19.690.3 there, 

a database-range object has an attribute 'table:orientation' describing in which order the data in that range is organized, and the default for this attribute is row! 

cited: 'For a <table:database-range> 9.4.15 element the default value for this attribute is row.' 

with the - quite common - use cycle of a file as desribed below calc unauthorized and invisible for the user inserts a wrong attribute 'column' between first and second save of the file, 

breaking user data integrity and producing errors and irritations in functionalities relying on this attribute, e.g. filter and sort, 

please excuse me for pointing out this error so persistently, imho it is very basic and plays into many other errors, its sequel errors occur irregularly depending on the state of the file you are working with, causing irritations that are difficult to resolve ... 

pls. don't wash away this bug as duplicate, it is about wrong insertion of an attribute, while other bugs reported are about filter and sort conflicting about this attribute and about autofilter definitions messed up by this fault, 

of course it offers itself to treat these problems together since they are interwoven

Steps to Reproduce:
1. create a new calc document, 
2. define a database-range with [data - define range], 
3. save the file, 
4. close the file, 
5. re-load the file, 
6. save the file with another name, 
7. close the file, 
8. inspect both files by opening with a zip manager - e.g. 7-zip, 
9. open the files 'content.xml' found inside the archives, 
10. in the first one you'll find a definition like: 

<table:database-range table:name="data1" table:target-range-address="Sheet1.B3:Sheet1.D6" table:on-update-keep-styles="true" table:on-update-keep-size="false"/>

11. in the second one the definition is like:  

<table:database-range table:name="data1" table:target-range-address="Sheet1.B3:Sheet1.D6" table:on-update-keep-styles="true" table:on-update-keep-size="false" table:orientation="column"/>

12. observe the added tag / attribute - table:orientation="column" - which is an error regarding not! intended by the user, different to the first save and deviating from the default, 

Actual Results:
attribute table:orientation="column" in second save, 

Expected Results:
either no attribute - staying with default - or table:orientation="row" - matching the default from loaded file, 


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL
Comment 1 Valentina Larina 2021-07-27 13:28:42 UTC
Hello.

Repro in Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 71477a3be1c64e5351894d9ef797feeee6b9eeeb
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-07-22_20:13:07
Calc: threaded
Comment 2 b. 2021-07-28 11:46:32 UTC
hello @Valentina Larina, 

thanks for checking, 

'earliest affected', not 'last seen',