incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 3395] Reveal formatting codes
Date Tue, 17 Apr 2012 18:07:16 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=3395

--- Comment #160 from orcmid <orcmid@apache.org> 2012-04-17 18:07:16 UTC ---
Created attachment 77455
  --> https://issues.apache.org/ooo/attachment.cgi?id=77455
Extracts of the ODF document showing how the same text shown in attachment
#77454 is formatted in ODF via an OpenOffice-lineage application

I should point out that the exercise for making a roundtrip from WPD to ODT to
WPD was done using LibreOffice 3.3.2 as the intermediary.  It formats ODT
output in the same way as all OpenOffice.org 3.x implementations do, including
the forthcoming Apache OpenOffice 3.4.

There are two parts in the XML specimen.  The first, the <office:text> element
provides the text of the single paragraph in the document.  It is this:

<office:text>
    <text:p text:style-name="P2">
        <text:span text:style-name="T4">This little ditty</text:span>
        <text:span text:style-name="T5"> is simply to see </text:span>
        <text:span text:style-name="T2">what </text:span>
        <text:span text:style-name="T1">Reveal Codes</text:span>
        <text:span text:style-name="T2"> is all </text:span>
        <text:span text:style-name="T5">about when used in </text:span>
        <text:span text:style-name="T6">Word</text:span>
        <text:span text:style-name="T3">Perfect</text:span>
        <text:span text:style-name="T5">. <text:s/>
        </text:span>
    </text:p>
</office:text>

Notice that, although no specific style was selected with this document, a
number of automatic styles are applied based on actions taken by the document
author (mainly font selections, bolding, italicizing, and changes of font
size).

THe different <text:span> elements and their text:style-name attributes appeal
to the places where the resulting formatting conditons have been retained. 
Note that there is an automatic style for the paragraph itself as well.  

Here is one of the automatic style definitions (all of them are in the attached
file).  They are all on this pattern:

    <style:style style:name="T1" style:family="text">
        <style:text-properties fo:color="#000000"
                style:font-name="Courier New" fo:font-size="12pt"
                fo:font-style="italic" fo:font-weight="bold"
                style:font-name-asian="Courier New"
                style:font-size-asian="12pt" style:font-style-asian="italic"
                style:font-weight-asian="bold"
                style:font-name-complex="Courier New"
                style:font-size-complex="12pt"
                style:font-style-complex="italic"
                style:font-weight-complex="bold"/>
    </style:style>

These are not done in a way where only the change from the adjacent span is
handled, nor are spans nested in a way that has inner spans only identify
changes.  It is of course possible to synthesize such information -- it was
done when the ODT was converted back to a WPD.  But it is not how the
OpenOffice-lineage engines are designed to reflect certain format changes via
introduction of automatic styles that capture them.  

In addition, for someone working natively with OpenDocument format documents,
any kind of Reveal Styling (it is not about codes) would need to be more
harmonious with how the format works as well as the different ways the format
can be controlled by user actions (i.e., using some sort of Reveal Styling to
see where to adjust the document in the editor or in the Reveal Styling
interface itself).

Having said all of those high-level things, there is also this:  There was in
the past a macro that managed to do a reasonable job at providing style
information about selected text in OpenOffice.org.  There is information about
that in the comments on this issue.  That remains the most-likely-achievable
expedient solution and it depends on someone able and willing to recover and
continue that work, if not re-invent it.

(In reply to comment #154)
> I have a couple of examples that might at least clarify how different the
> situations are.  I wonder how many more years this request will still be here!

(In reply to comment #158)
> I find it interesting that OpenOffice.org-lineage programs tend to create flat
> switching among automatically-created anonymous styles within a paragraph or
> heading, without any tendency to do <text:span> nesting.  That does not mean it
> is difficult to translate.  OpenOffice.org 3.3 accepts WPD files and produces
> ODT files in its way of styling.  WordPerfect X5, I see, accepts the ODT file
> and after conversion manages to place it in its format structure, as can be
> seen in the Reveal Codes of the ODT->WPD conversion.

-- 
Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Mime
View raw message