Christian Lohmaier wrote:

>> We don't call something broken that never was correct.
> 
> I surely do. If you don't call something a bug when it works /as
> designed/, then I'm with you, but when you say: It doesn't work, neved
> did, so thus cannot be a bug, then we have different points of view.

I never said that. But anyway, let's not continue this fruitless
discussion. We seem to agree that the missing support for the language
property is a bug.

> The point was: Is there something like a document langauge. I said yes,
> you say no.

Yes, my statement was misleading. My understanding was that the OP was
looking for a document language he could set via API - but there is no
such thing in OOo. But I think there should be one.

You seem to have a look from the file format side - it looks as there
could be something (a property in the metadata), but OOo ignores it.

I'm not sure if *this* is a bug because it seems that ODF has a
redundancy here and redundancies always hold the risk of contradictions.
Having two conflicting settings (for the language in the metadata and in
the default style) can't be handled properly. So it seems to be OK that
OOo ignores one of these settings (the metadata) if the other one is set.

What we are missing is a defition how handling contradicory values at
runtime, e.g. should setting the language in the metadata (once it is
working) automatically change the value in the default style? I think it
should. That would be the easiest way to resolve possible conflicts.

> If you hard-code the language inside the paragraph-style with name
> "Default", you're doing something else than changing the document
> language (as done via Tools|Options) - that's the point.
You seemed to fall into the trap again. I didn't write that there is
anything hard-code in the style named "Default". :-)

So let my try to summarize:

If you create a new document in OOo it has some default preset
attributes. These are collected in the so called default styles in ODF.
One of them is the default paragraph style, it contains a language
attribute that is used for every text content in the document that does
not have an own language attribute set. Every attribute that is not set
in a style is inherited from this default style.

These default styles must not be confused with the styles names
"Default". I noticed this possible confusion too late as I used a german
version where these styles are named "Standard" and so they can't be
confused with the default styles. I hope it's clear now.


> And even when both ways don't matter to the spell-checker itself, it
> is still two different things.
Sorry, I don't understand. The language in the default style *does*
matter to the spell checker. And Tools-Options-Language *does* set the
language attribute in the default style (not in the style "Default").

So the problem of the OP that he wanted to set the language of the
document can be answered only by: yes, you can do it via
Tools-Options-Language but there is no API to do it. That's what I
wanted to express written in my first reply. And that's how it is.

'nuff said, IMHO.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to