Issue 12831 - Word filter should not hardcode default lang when writing
Summary: Word filter should not hardcode default lang when writing
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
: 12239 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-03-30 10:46 UTC by pavel
Modified: 2013-08-07 14:41 UTC (History)
1 user (show)

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


Attachments
Patch that uses LongLnaguage for lid in Word (566 bytes, patch)
2003-03-30 10:46 UTC, pavel
no flags Details | Diff
English Fields (29.50 KB, application/octet-stream)
2003-08-25 12:23 UTC, caolanm
no flags Details
Saved with German Word97 (30.00 KB, application/octet-stream)
2003-08-25 15:05 UTC, caolanm
no flags Details
Japanese Word2000 (28.00 KB, application/octet-stream)
2003-08-25 15:48 UTC, khirano
no flags Details
Español Word XP (10) es-MX (30.50 KB, application/octet-stream)
2003-08-25 19:40 UTC, Unknown
no flags Details
Word 2000 - Es - Windows 2000 (31.00 KB, patch)
2003-08-26 05:28 UTC, Unknown
no flags Details | Diff
File saved with the french version of word 97 (29.00 KB, application/octet-stream)
2003-08-28 14:56 UTC, ast2001
no flags Details
Saved with Word 97 in Spanish (29.50 KB, text/doc)
2003-08-28 20:06 UTC, ggabriel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2003-03-30 10:46:16 UTC
$subject says it all. See attached patche.
Comment 1 pavel 2003-03-30 10:46:54 UTC
Created attachment 5344 [details]
Patch that uses LongLnaguage for lid in Word
Comment 2 caolanm 2003-03-31 08:15:07 UTC
I know, but the problem is that if you do this then some of the field
names must be localized for a number of languages, german french
english spanish etc otherwise word will not recognize them. Currently
the names are in german so we set the document language to german. I
tried this before and got burnt when the fields stopped working in
word.

This makes less difference then you might think because the default
language of the default style overrides this for everything else, and
that language is set correctly. Nevertheless I agree that its annoying
and should be fixed but we need to output the correct languages names
of the fields depending on the document language before this oneliner
can be put in.

I say we finish the 1.1. beta and then do this change and dig out the
localized fields names from word and do it properly for 2.0. I believe
we only need to handle english, french, german and spanish. Everything
else supposedly uses english names for the fields. Or at least word
will allow english names in other langauge versions.
Comment 3 caolanm 2003-03-31 08:25:46 UTC
resolve later
Comment 4 caolanm 2003-04-29 13:15:09 UTC
*** Issue 12239 has been marked as a duplicate of this issue. ***
Comment 5 caolanm 2003-08-25 12:23:36 UTC
Created attachment 8726 [details]
English Fields
Comment 6 caolanm 2003-08-25 15:05:52 UTC
Created attachment 8740 [details]
Saved with German Word97
Comment 7 khirano 2003-08-25 15:48:01 UTC
Created attachment 8741 [details]
Japanese Word2000
Comment 8 Unknown 2003-08-25 19:40:27 UTC
Created attachment 8744 [details]
Español Word XP (10) es-MX
Comment 9 Unknown 2003-08-26 05:28:11 UTC
Created attachment 8756 [details]
Word 2000 - Es - Windows 2000
Comment 10 caolanm 2003-08-28 14:01:33 UTC
I suspect that the big three of german, french and spanish are special
cases when it comes to fields, so I think I have to have these three
sets of field names before I can safely try to save and the "real"
language id for the document.
Comment 11 ast2001 2003-08-28 14:56:53 UTC
Created attachment 8849 [details]
File saved with the french version of word 97
Comment 12 caolanm 2003-08-28 16:14:40 UTC
Hmm these examples seem to bear out this knowledge base article: 
http://support.microsoft.com/default.aspx?scid=kb;en-us;268717

which says that all fields are now in english since word 2000,
regardless of the language, and looking at the output of the new
localized versions I see that they all have their codepage set to 409,
i.e. english to make other older versions happy.

Article says "The decision to use a single field name language
worldwide was made to allow users of multiple languages to exchange
documents more easily. Earlier versions of German, French, and Spanish
Word required extensive language detection and field translation
routines to allow users of one language version to open documents that
were created in a different language version. This was effectively an
attempt to localize a programming language where some parts of a
string are tokens to be interpreted by the program, which should be
translated, and other parts are user-viewable text, which should not
be translated. This translation process made it difficult to add new
features to the fields object model and could cause awkward results
for multilingual users.

The new model of using nonlocalized field names is consistent with the
model used for Visual Basic for Applications that has existed in
Office since version 7.0/95, and for SQL, where the VBA statements,
methods, properties, and so on, are in English regardless of the
localized language. It allows a more seamless transition between
languages, reduces possibilities of errors in translated documents,
and gives the users of all international versions of the software a
consistent experience.

Changing Word 97 Macros to Work in Word 2000 for Any Language:
When you open a document that was created in a localized version of
Word 97 (for example, French, German, or Spanish Word), Word 2000
changes the names of any fields and field options in the document from
the local language to English"


So I think I should do the same as what word now does.
a) use english field names always on export
b) always set the "struct" codepage to 0x409 to make these english
names work on every version of word back to the past
c) not import and export the "default languages for document" setting
at all, seeing as its not equivalent to the codepage feature in word.
Word just uses the default "normal" style and when you change its
default language, you change the language of the normal style in the
normal.dot template.
Comment 13 ggabriel 2003-08-28 20:06:47 UTC
Created attachment 8859 [details]
Saved with Word 97 in Spanish
Comment 14 caolanm 2003-09-08 15:37:16 UTC
Reopen to work with this bug
Comment 15 caolanm 2003-09-08 15:38:58 UTC
Ok, implemented using english field names the same as word > 2000
does. Don't change the document default language to the same language
as the lid id used to track what language the fields are in, as word
no longer uses this as it once did.
Comment 16 caolanm 2003-09-08 15:39:31 UTC
Done in killarneyfilterteam13 for 2.0
Comment 17 caolanm 2003-09-16 12:56:00 UTC
Reopen to reassign
Comment 18 caolanm 2003-09-16 12:57:24 UTC
cmc->mru: From killarneyfilterteam13 onwards we should always export
english field names to be like word 2000 and upwards. So should test
that field export still works when opened in 97 for example.
Comment 19 michael.ruess 2003-09-19 12:16:25 UTC
Checked fix with CWS killarneyfilterteam13.
Comment 20 michael.ruess 2003-09-19 12:23:07 UTC
Verified. Fix will be included in OO 2.0
Comment 21 michael.ruess 2003-11-27 10:57:16 UTC
Fix good in OO 2.0 snapshot src680m13.