Apache OpenOffice (AOO) Bugzilla – Issue 9880
Conditional text fields referencing database fields behave erratically
Last modified: 2013-08-07 14:43:39 UTC
I have a document used for label printing that includes a conditional text field for outputing spaces if the preceding field is non-null. If the document is loaded from a database, the spaces initially appear correctly, but they can disappear if the document is manipulated at all. The problem is demonstrated in the document ConditionalTest.sxw. 1) open this document. 2) Say no to 'Update Links'. 3) Observe the presence of three question marks between the address and author fields (of the bibliography database). 3) Print the document (to file to save trees). 4) Observe the question marks are still present. 5) Print the document again - poof ! The question marks disappear.
Created attachment 3926 [details] Document demonstrating the problem
Reassigned to ES
ES->AMA: Indeed! As described! I have no idea who can be responsible for this so a choose the nicest developper ever first :-)
.
OD (12.03.2003): accepted.
Created attachment 5193 [details] simple document also showing the defect
OD->OS 21.03.2003: Please take over. I attached document <testdoc.sxw>, which also shows the defect - follow the instructions at the beginning of the document. I already figured out that the database manager doesn't seem to reset the selection and the position, when its asked for the value of the identifier.
There are at least two different problems. One is that when database data is merged into the document and a field update is done after that the database selection is not re-used. That problem is fixed. The other one is what is done after a document like the attached ConditionalTest.sxw is loaded and printed. Printing initiates an update of the fields. By evaluating the fields' expressions an access to the database takes place. As the database selection that created the document prior to saving it is not restorable the wrong data is used for the expressions. This could only be prevented by storing all accessed data from the database which is not a good idea ;-) Another possibility is to detect such missing database selection and providing an error message for it. Additionally locking of the fields could be provided that allows to print the document 'as is' without changing any of the fields and other expressions.
Filed issue 12608 as enhancement, brh set as CC. The fix is contained in cws os7 in sw/source/ui/dbui/dbmgr.cxx
os7 is available on so-cwsserv03, wntmsci9 and unxsols4.pro
ES: verified in os7
verified
All tasks are verified in OOo1.1 Beta2