Issue 33065 - docbook output produces empty width for inlinegraphics
Summary: docbook output produces empty width for inlinegraphics
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Code
Component: code (show other issues)
Version: OOo 1.1.2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: jogi
QA Contact: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-17 08:05 UTC by ensonic
Modified: 2009-07-20 14:40 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ensonic 2004-08-17 08:05:46 UTC
When saving a document in docbook xml, imgaes are saved as
<inlinegraphic fileref="myimage.png" width=""/>

This causes probelms when further processing the xml as then the width becomes
"NAN" and this in not well handled by programs.

The cause of the problem is in '/share/xslt/docbook/sofftodocbookheadings.xsl'
at the very bottom in '<xsl:template match="draw:image">'.

I am far from beeing an openoffice expert, but wouldn't it be possible to set
the correct sizes here, from the graphic-formating dialog, cropping tab, scaling
(the names might be wrong as I use the german version -
grafik/zuschneiden/skalierung)
Comment 1 michael.ruess 2004-08-17 10:06:25 UTC
reassigned to JSI.
Comment 2 jogi 2004-08-17 12:06:21 UTC
lo: If there's time we want to improve the quality.
Comment 3 ensonic 2004-08-19 10:34:30 UTC
I have taken a closer look at the issue. 

That is a exmaple XML fragment for a graphical element:
<draw:image
  draw:style-name="fr1"
  draw:name="Grafik1"
  text:anchor-type="paragraph"
  svg:width="0.85cm"
  svg:height="0.85cm"
  draw:z-index="0"
  xlink:href="#Pictures/1000000000000040000000409DF66393.png"
  xlink:type="simple"
  xlink:show="embed"
  xlink:actuate="onLoad"/>

and here is the related style:
<style:style
  style:name="fr1"
  style:family="graphics"
  style:parent-style-name="Graphics">
  <style:properties
   style:wrap="right"
   style:number-wrapped-paragraphs="no-limit"
   style:wrap-contour="false"
   style:horizontal-pos="left"
   style:horizontal-rel="paragraph"
   style:mirror="none"
   fo:clip="rect(0cm 0cm 0cm 0cm)"
   draw:luminance="0%"
   draw:contrast="0%"
   draw:red="0%"
   draw:green="0%"
   draw:blue="0%"
   draw:gamma="1"
   draw:color-inversion="false"
   draw:transparency="0%" draw:color-mode="standard"/>
</style:style>

The first problem is, that the size of the image is stored as svg:width and
svg:height. 1.) the image is not a svg and 2.) the original size is missing or
the resulting scale is missing. As a XSLT processor is not good in doing math
this is very unfortunate.

The second problem is that at least style:horizontal-pos="left|center|right"
should be translated to align="left|center|right" of the docbook inlinegraphic
element. See (http://www.docbook.org/tdg/en/html/inlinegraphic.html). Same
applies to the docbook valign atribute.
Comment 4 lo 2005-12-13 13:21:06 UTC
xmlfilter for you
Comment 5 ralfhauser 2007-05-20 12:06:05 UTC
see also Issue 32792 and Issue 27424
Comment 6 svante.schubert 2007-06-20 21:20:29 UTC
svg:width is just a borrowed attribute from the svg specification.

I used svg:width to fill width 
and svg:height to fill depth

Please correct me if I am wrong, I just read
http://www.sslug.dk/dokumentation/docbook/r01r109.html
Comment 7 svante.schubert 2007-07-20 12:34:44 UTC
Fixed in CWS XSLTFILTER08 according to my previous comment.
Therefore the width is no longer empty.
As testdocument you might resue "haandbog-1-1-0" from i30494.
Comment 8 svante.schubert 2007-08-07 08:26:54 UTC
Postponed to next release as there were too many CWS/issues waiting for the OOo
2.3 release to be integrated
Comment 9 jack.warchold 2007-08-30 15:48:55 UTC
seen good in cws xsltfilter08

set to verified

inlinegraphic is no embedded as in the following example

<inlinegraphic fileref="embedded:Grafik116" width="7.057cm" depth="2.045cm"/>
Comment 10 thorsten.ziehm 2009-07-20 14:40:31 UTC
This issue is closed automatically and wasn't rechecked in a current version of
OOo. This fixed issue should be integrated in OOo since more than half a year.
If you think this issue isn't fixed in a current version (OOo 3.1), please
reopen it and change the field 'Target Milestone' accordingly.

If you want to download a current version of OOo =>
http://download.openoffice.org/index.html
If you want to know more about the handling of fixed/verified issues =>
http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues