Issue 21966 - WW8: Hybrid "Paragraph and character" styles
Summary: WW8: Hybrid "Paragraph and character" styles
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: ms_interoperability, oooqa
Depends on:
Reported: 2003-10-31 15:32 UTC by priitr
Modified: 2013-08-07 14:38 UTC (History)
1 user (show)

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

testcase attached (40.50 KB, application/octet-stream)
2003-10-31 15:33 UTC, priitr
no flags Details
Screenshot at word xp, number 3 is missing in OOo (24.48 KB, image/gif)
2003-11-01 03:38 UTC, utomo99
no flags Details
A example of these hybrid character styles (33.00 KB, application/octet-stream)
2003-11-27 16:38 UTC, caolanm
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description priitr 2003-10-31 15:32:32 UTC
Both headings '3.Laokirja originaali säilitab.' and '4.VORMISTAMINE' were
originally (in word doc) marked as headings, after import they are not.
Therefore automatically generated index is wrong.
Comment 1 priitr 2003-10-31 15:33:46 UTC
Created attachment 10842 [details]
testcase attached
Comment 2 mci 2003-10-31 16:09:11 UTC
reassigned to mru
Comment 3 utomo99 2003-11-01 03:36:02 UTC
I can Reproduce the problem on 
OpenOffice 1.1 (default Install, US), Win XP Pro Sp1. 
(And MS Office XP Sp2). 
It is real problem

Number 3 is missing in OOo 1.1 

I will attach screenshot in word xp 

Comment 4 utomo99 2003-11-01 03:38:28 UTC
Created attachment 10863 [details]
Screenshot at word xp, number 3 is missing in OOo
Comment 5 michael.ruess 2003-11-03 11:27:14 UTC
MRU->CMC: Default para style (with hard character format) was
erroneously assigned to the third Heading by the import.
Comment 6 caolanm 2003-11-03 14:44:27 UTC
Not erroneously, correctly!. This is truly weird, that paragraph is
certainly in the Default paragraph style, there is a character style
applied "Char Char", and the diff from "Default" to "Char Char" is the
same as the diff from "Normal" to "Heading 1", with reveal formatting
in word in that paragraph "heading 1" does not appear at all, while
the style "heading 1" is of style type "paragraph and character" which
heading 2/3 etc is (as is usual) is of style "paragraph". Never seen
this before. truly odd.

I don't know whats going on with this.
Comment 7 priitr 2003-11-04 08:32:16 UTC
Well, it seems the file was created  using Word97 and, a couple of
years later, opened and saved using Word XP, Estonian edition.

Comment 8 caolanm 2003-11-27 16:10:00 UTC
Hmm, 97 and 2000 agree with writer, while XP and 2003 do not...
Comment 9 caolanm 2003-11-27 16:37:58 UTC
Hmm, I understand now, and I really don't like it.

cmc->ama: We've got a style headache with this one...

In XP and above word has allowed users to select a range of text and
apply a "paragraph style" to just that range. Under the hood Word
creates a character style which shadows the paragraph style by
containing a copy of the parts of the paragraph style which apply to
character properties, e.g. "Heading 2 Char", and applying that to the
selected text. This can be seen from word's menus when the document is
loaded in versions <= 2000. In XP and above it hides this information
from you.

This would be ok if that was the end of the story, but in versions XP
and above, when making Table Of Contents (and I guess similiar
paragraph style based features) then Word will treat any paragraph
which begins with the character style associated with a paragraph
style as a paragraph belonging to the paragraph style, but only the
selection that is in the associated character style. 

Thats a little confusing to explain, because its a totally stupid idea
 IMO :-). See the document that will be attached. Opened in XP and
above the menus will tell you that the regions of large text are in
"Heading 2" style, and when you update the toc you will see that the
portion of the paragraph which starts with this character style is
shown in the TOC, while the other one which ends in the associated
char style does not.

Open in 2000 and lower, here Word tells the truth and shows us in the
menus that the regions of large text are just character styles, and
that the paragraph style is really normal. When the TOC is updated in
such an older version those paragraphs that start with the magic
character styles are not included in the TOC. And of course this is
the behaviour writer follows :-(

Its just unlucky for the user of the original document that at some
stage they must have selected less than a full paragraph in XP when
applying Heading 1 to VORMISTAMINE and so ended up with such a
associated character style :-(

This would be very tricky to try and work around in the filter, it
*might* be possible, but very hard indeed.
Comment 10 caolanm 2003-11-27 16:38:27 UTC
Created attachment 11593 [details]
A example of these hybrid character styles
Comment 11 andreas.martens 2003-11-27 17:14:45 UTC
Nice feature :-(
I don't want to implement the whole stuff. If we do so we will get
issues from users of older Word version :-(
Maybe we found a practicable solution. My first idea would be to set
the paragraph style to "Heading xy" when all characters have the
character style "Heading xy char". This would solve the problems when
you make use of this "feature" by accident. Another possibility is to
do the same if the first character has this style regardless of the other.
Comment 12 caolanm 2003-11-28 08:58:36 UTC
Yeah thats what I thought of as the "hard" solution, if the filter
sees a char style at the start of a para that is associated (though I
don't know the association rules at the moment) then turn the para
into the para style, but then hard code the inverse difference from
this style to the original properties onto the remainder of the para.
Fairly nasty but plausible. It would fix the first example, but not my
test document as the TOC in word XP+ will only include the charstyle
portion of the paragraph, while this proposed hack would include the
full para :-(

I wonder if this is really the intended word behaviour, and not a bug,
it breaks backward compatability somewhat needlessly.
Comment 13 andreas.martens 2004-06-17 13:16:02 UTC
Because of a shortage of resources we have to retarget this issue to OOo later.