Apache OpenOffice (AOO) Bugzilla – Issue 30898
Incorrect behaviour of hidden paragraph fields
Last modified: 2017-05-20 11:22:28 UTC
As requested, I am resubmitting issue 18294 in stripped down form. I have created as a sample data source a small spreadsheet, consisting of two sheets, each sheet containing 3 rows by 1 column. In OOwriter add this as a new data source using Tools->Data Sources, This gives you two data source tables, each with 3 records of 1 column. I have inserted this data as fields into a OOwriter document, with each data field starting a separate paragraph of the document, giving 6 paragraphs in total. The data in the spreadsheet is chosen so that this has the effect of labelling the paragraphs "A" though to "F". After each data field I have added a hidden paragraph field based on the contents of the data field and a line of text to indicate if that paragraph should be hidden. Open this document, make sure View->Hidden Paragraphs is not enabled, then press F9 to update all fields. Paragraphs A and E are now hidden and the rest are visible (this is the correct behaviour). Press F9 again. Paragraphs A, B, and C are now hidden and the rest are visible. Further pressing of F9 does not change the behaviour. Press F4 to open the data source view and in the left hand pane select sheet->Tables->Sheet1. In the right hand pane select all rows of the table then click on the "data to fields" button in the data source view. The paragraphs that take data from this table are now hidden correctly (i.e. paragraph A is hidden), but the paragraphs that take data from the other table are now all visible. Next, in the left hand pane of the data source view, select sheet->Tables->Sheet2 then in the right hand pane select all rows of the table and click on the "data to fields" button. The paragraphs that take data from this table are now hidden correctly (i.e. paragraph E is hidden), but the paragraphs that take data from the first table are now all visible. Press F9 once and no change is made. Press F9 again and all paragraphs become visible. This same bug can be seen when using conditional text and hidden text fields.
Created attachment 16192 [details] OOwriter document demonstrating bug
Created attachment 16193 [details] OOcalc spreadsheet used as data source for demonstrating bug
Hi martinwhitaker, I made some first tests, and my result is, that I see different behaviour using OOo 1.1.1 WIN XP: [645m35(Build8762)] or OOo I 1.1.2RC3 (German) WIN XP: [645m44(Build8784)] "... Open this document, make sure View->Hidden Paragraphs is not enabled, then press F9 to update all fields." same 1.1.1, 1.1.2, 'A' and 'E' will be hidden "Press F9 again..." 1.1.1: as you reported 1.1.2: nothing happens "Press F4 to open the data source view ..." 1.1.1 and 1.1.2: everything as you reported "...Press F9 once...." 1.1.1: everything as you reported 1.1.2: nothing happens Can you please add some further information: 1. I need some more information why you think that the reaction should be in a special way. For example concerning your first comment: "(this is the correct behaviour)", because the condition for "hide paragraph" is fulfilled in line 'A' (content is "A") and line 'E' (content is "E"). So all lines except 'A' and 'E' should be visible. I belive, that this view should remain, even if 'F9' will be pressed again and again. martinwhitaker, do you agree with this? Please tell me here in the issue and add some further comments, what reactions are unexpected for you and why they are unexpected. I need this information for discussion with developers: Is the reaction in accordance to the aimed design, and is the actual design in accordance to users needs? Thanks Rainer
Hi Rainer, At all times (unless you enable View->Hidden Paragraphs), paragraphs A and E should be hidden and the other paragraphs should be visible. This should be true when you first load the document, whenever you reimport the data from the data source (unless you change the source data, in which case the conditions should be re-evaluated according to the new data), and however many times you press F9 to update the fields. So any action that results in paragraphs A or E being visible, or paragraphs B, C, D, or F being hidden is (in my view) showing up a bug in the code. With regard to your comments about different behaviour in 1.1.2RC3, the first 1.1.2RC behaved like 1.1.1, so it would seem that someone has been working on the relevant bit of code. Hope this has clarified the issue, please ask again if you want further information. Thanks for taking the time to investigate this! Martin
Hi Martin, I already did some tests, and step by step I understand what happens (but it will still take some further tests to get a clear result). Currently I think, that in the text document we have a very unusual use of the 'mail merge fields'. I am afraid, that that function has not been designed for that use. Can you tell some more concerning your "real" application where you need that function for? First I tried to print a mail merge letter, I checked with 1.1.2RC3 (German) WIN XP: [645m44(Build8784)]. 0. Open "document.sxw", after you established "sheet.sxc" as database 1. select 'tools - mail merge letter - from this document', OOo will select sheet 2 of the data source 2. finish printout expected: Line 'D' and 'F' will be printed, 'E' is hidden actual: as expected 3. try again and again as expected, always Line 'D' and 'F' will be printed, 'E' is hidden 4. close document without saving New test: 10. Open "document.sxw", after you established "sheet.sxc" as database 11. select 'tools - mail merge letter - from this document', select sheet 1 of the data source manually 12. finish printout expected: Line 'B' and 'C' will be printed, 'A' is hidden actual: all 3 lines 'A' - 'C' will be printed 13. Doubleclick into the grey field in front of text "This paragraph ..." in Line 'A', you find condition <sheet.Sheet2.Column1 == "E"> - oops in Line 'A', you find condition <sheet.Sheet2.Column1 == "E"> - oops in Line 'A', you find condition <sheet.Sheet2.Column1 == "E"> - oops 14. Press F9 expected: you will see again Line 'A' ... 'F' again actual: "sort order" 'A' 'C' 'A' 'B' 'C' ('E' invisible) 15. select 'tools - mail merge letter - from this document', select sheet 1 of the data source manually 16. finish printout expected: result like in '12.' actual: as expected 4. close document without saving I believe, problems are caused by the "forbidden" use of mail merge fields of 2 data sources in 1 document (further tests will be essential), but of course, that should at least be mentionned in HELP. Status -> NEW May be "database access" would be a better component, but first I would like to hear some more opinions. Rainer
My real application is a technical document specifying the software control interface for a range of networked equipment. The equipment is controlled using the SNMP protocol, which maps all control operations onto simple "set" and "get" operations on a notional tree-structured database. My document has to describe this notional database in two ways, one as a human-friendly description (showing the structure of the tree, and describing what happens when you "get" or "put" any given leaf node of the tree), the other as a formal, machine-readable specification. The information required to do this falls into two categories, first a list of named types, defining sets of allowed values, and second a list of tree nodes, defining the nodes of the tree, how they are linked, and which of the named types represents the values permitted in "set" and "get" operations on that node. To handle this I constructed a spreadsheet both to hold the basic information, and to construct the derived text for insertion in my document. This spreadsheet is split into multiple sheets, partly to make it more manageable, but also because the two categories of information require a different number of data source fields to be inserted into the document, and because different information about the same item needs to be inserted in two separate places in the document. For the formal specification, some fields represent information which is only present for some items, so I am using the hidden paragraph functionality to hide these fields when information is not present. Hope this makes sense - it's not a simple thing to describe! Regarding your comment about "database access" being a better component - I thought that data sources were the way to extract information from a database into an OOo document - that's certainly what I am using it for (even though my database is in reality a spreadsheet). I am not using the mail merge tools at all.
ES->OS: the problem seems to be as following: - a document containing DB fields from 2 different DB tables - for each paragraph (and there's 1 field per paragraph) there's a hidden paragraph condition. Now when merging the fields of Table1, the hidden paragraph fields work fine for the Table1 fields but not for the Table2 fields. On the contrary, merging the Table2 fields leads the hidden paragraph fields applied to the Table1 fields to not work anymore while the hidden paragraph fields applied to the Table2 fields work fine now. Maybe the bug is that hidden paragraph fields cannot get updated correctly when the document contains fields from 2 different tables...
This Issue requires more information ('needmoreinfo'), but has not been updated within the last year. Please re-test with one of the latest versions of OOo - the problem(s) may already be addressed. Either use the latest stable version: http://download.openoffice.org/index.html or consider trying the new OOo 3 BETA (still in testing): http://download.openoffice.org/3.0beta/ Please report back the outcome of your testing, so this Issue may be closed or progressed as necessary - otherwise the issue may be Resolved as Invalid in the future. You may also wish to search for (and note) any duplicates of this Issue that may have progressed further : http://www.openoffice.org/issues/query.cgi Regards, Andrew Cleaning-up and Closing old Issues as part of: ~ The Grand Bug Squash, pre v3 ~
This is incorrectly tagged as needmoreinfo - I have already provided the information that was requested. This bug is partially fixed in DEV300m10. Selecting all rows of one table in the data source view and clicking on the "data to fields" button still affects the visibility of hidden paragraphs related to the other data source table, but subsequently pressing F9 corrects the visibility of all paragraphs. Additionally, if you disconnect from the data source (so you can update the spreadsheet) then reconnect and update the fields in the main document, all the paragraphs become visible. The only work around is to close and reopen the document.
Reset assigne to the default "issues@openoffice.apache.org".