Issue 2408 - "Field codes" not set by Open Office
Summary: "Field codes" not set by Open Office
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 641
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-03 18:59 UTC by osavill
Modified: 2003-09-08 16:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Many OO issues shown in this one file (177.50 KB, application/octet-stream)
2002-01-07 11:48 UTC, osavill
no flags Details
bookmarks, references, and set/ask... (31.00 KB, application/octet-stream)
2002-01-30 09:55 UTC, caolanm
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description osavill 2001-12-03 18:59:41 UTC
Please find attached a file that shows what I mean. This file was created in Word and imported 
into OO.

You'll notice on the first page a few vertical grey strips. Hold the mouse pointer 
over one of them and the cursor changes into a hand and the field name appears in a pop-up. However 
there is no text, for example the first one is the Doc. Author and should contain "Owen Savill". 
Double clicking a grey stripe produces an edit dialog, but again there is no text. Moreover the 
editing fields / widgets are disabled so this text cannot be inserted.
Comment 1 stefan.baltzer 2001-12-12 10:43:37 UTC
Please attach the file.
Comment 2 osavill 2001-12-12 10:59:48 UTC
I have tried on more than one occassion to attache files to bug reports but so far they 
have all raised comments like the last one !!! For previous bug reports I have had to 
resort to send the documents to specified e-mail addresses ! So what's yours !
Comment 3 stefan.baltzer 2002-01-07 11:07:14 UTC
You can not submit a task and attach a doc at the same time (to avoid spamming, I guess).
You have to edit the sent issue and click the "create a new attachment" link in the issuezilla front end.
Sending documents directly via email is only for confidential documents and only if the owner asks for it.
Comment 4 osavill 2002-01-07 11:48:40 UTC
Created attachment 874 [details]
Many OO issues shown in this one file
Comment 5 osavill 2002-01-07 11:51:50 UTC
Tried to attach a document that shows this problem. It is a 'blank',
i.e. non of the offending fields are filled in. It is in the original
Word format. To fill the fields in (forgive if teaching granny to suck
eggs !) press Ctrl+A then F9 and follow Words prompts. Even without
entries in these fields it is possible to see the problems.
Comment 6 stefan.baltzer 2002-01-08 15:49:20 UTC
Reassigned to Michael.
Comment 7 michael.ruess 2002-01-23 14:19:18 UTC
MRU->CMC: Oh, I think, there are fields, which are not already
implemented/added
to the Filterlists. Do you agree? Pls, send this one back to me, when
you added your opinion. After this I´ll talk to FT about this, for the
case I´m right.
Comment 8 caolanm 2002-01-30 09:55:21 UTC
Created attachment 1010 [details]
bookmarks, references, and set/ask...
Comment 9 caolanm 2002-01-30 10:17:14 UTC
These are the "ask" fields, they are in the filter list but marked as
not implemented. There is a part implementation in the filter already
that isn't truly doing what we want. 

I think that with some twiddling we can recognize the uses of
bookmarks as variables, which is what is going on here. Word folds our
"show/set variables" feature into its bookmark/reference feature. And
its a little inconsistent, but seems reproducable in the filter.

The attached new document shows the uses of ask/set/ref and how they
interact with ordinary bookmarks and references. All these cases can
be handled in the filter, except for one case. Which (typically) is
the one actually mentioned in this bug.

i.e in word and in writer these variables are local, when set they
take that value from underneath the set location to the next set
location or to the end of the document. Now, the first example has a
ref to a variable that is not set yet. In writer we would leave it
blank as its not set, in word a strange thing happens where the
previous values are used.

i.e. update the fields, fill in data (call it data 1), no change to
field contents, because the ask fields are below the ref fields, and
can only affect refs below that point. Fill in data again (call this
data 2), now data 1 will be displayed in the variables. So when word
fills in the fields and all the fields have been parsed and filled in,
then word retains those final values of the last run as the "current"
values, and the next time it updates fields it starts filling in from
the top with the "current" values until the variables change through
the use of set or ask. 

I think it is reasonable to consider this last feature as less of a
feature and more of a quirk of word. The feature that we would need
for this would be something like "retain final values of variables in
documents and initialize starting values for next field update from
them". Otherwise, if you move the "ask" fields before the ref fields
then they (when I finish the implementation) will work fine in writer,
and you won't have to update your fields twice in word to see your
changes.
Comment 10 caolanm 2002-02-04 09:51:07 UTC
Import/Export this sort of microsoft misuse of references/bookmarks to
set/show variables fixed in head.
Comment 11 caolanm 2002-02-20 11:09:57 UTC
The attachment I added myself demos all the cases we can support. And
those are working in SRC651a (linux pro). Ironically the original
document for this will not work exactly as it did in word. But as
explained, it really doesn't make a lot of sense that it works in word
at all as the show and set are the wrong way around :-)
Comment 12 osavill 2002-02-20 11:39:36 UTC
One of the (many) quirks of Word is that sometimes you have to do the
Ctrl+A then F9 sequence twice before Word itself fills in the blanks
!! So maybe Word itself is non too happy about this feature !

"SRC651a" !!! We out here in binary only land are still on 641C ! Any
chance of a new binary any time soon ?  :-)
Comment 13 caolanm 2002-02-20 12:02:46 UTC
The reason you have to do it twice in word is because you have used
the reference before you set it. Toggle show codes on in word and move
the "ask" to before the uses of the variable and it will work in word
without having to refresh twice, and it will work correctly in the
SRC651 writer. The reason you need to refresh twice is the same reason
it won't display in writer even after this fix. variables are local in
word, but they wrap around back to the start on the next refresh.

As for when the great unwashed :-) get their hands on a SRC651 ? Well
you can always build it yourself by cvs updating to that tag and
building. Otherwise it'll be whenever the OOo release team get around
to building it. They are churning out a OOo642 at the moment, I
imagine that the next version after that will have all this 651 stuff
in it.
Comment 14 michael.ruess 2002-11-26 13:52:43 UTC
MRU: improvement implemented in OpenOffice 643C.
Comment 15 michael.ruess 2002-11-26 13:53:30 UTC
Closed.
Comment 16 osavill 2002-11-26 14:13:34 UTC
None of the problems associated with the origional document appear
fixed :-( Oh well.
Comment 17 michael.ruess 2002-11-26 14:30:35 UTC
That's not really true. Read carefully what CMC wrote.
Variables in Word and Writer work a bit different. In Writer, you have
the possibility to set different values for one variable throughout
the document. If you have a "Show Variable" field before you have a
"Set Variable" or "Input" field, the "Show Variable" field will have
no content. You can see this easily, when you transfer the input
fields (or former Ask-fields from Word) above the Show Variable fields.
Yes, in deed, this is not optimal, but at the moment as good as
possible, because Word and Writer work different in some points and a
direct import won't be possible.