Apache OpenOffice (AOO) Bugzilla – Issue 81621
Import of Word 2003 XML File that contains a table with missing defaultTabStop causes a crash
Last modified: 2013-02-07 21:59:19 UTC
The crash occurs when 3 Parameters come together: 1. The File contains a Table with content. 2. There is a Style associated with that Table (or a Default style) 3. There is no defaultTabStop (or a defaultTabstop=0) in the xml file. Attached are two Files with 1st and 2nd Parameter and once with a defaultTabStop bigger than 0 (results in no crash) and the other one with no defaultTabStop definition.
Created attachment 48260 [details] defaultTabStop is set to 1 -> no crash
Created attachment 48261 [details] There is no defaultTabStop definition -> OO crashes.
-> SUS
set target 3.0
it easy to fix - if defaultTabStop absent - it must be set to default value (and it can`t be zero - if user press tab then cursor must move at least one pixel is not it?) well - i open OO and save empty doc as MS Office 2003 xml and check defaultTabStop value it was "709.317" is same value we should use by default? or it must be value by default from MS Word 2003? I can`t check value from MS Word because i am at home and i use Mandriva Linux at my notebook without anything from MS on it. I`ll try check it tomorrow at work. But just interested if MS have value by default different from OO default value - what is preferable MS default value or OO default value? i guess if doc saved from MS Word - then defaultTabStop will be present in any case and will be > 0, so - if defaultTabStop is absent then almost 100% that we have deal with generated by someone else XML doc & wich value this person expect as default value? 42? (look movie "The Hitchhiker's Guide to the Galaxy") :) well - if you provide default value (it must be positive value) the bug will be fixed
You are right, the whole problem came up when I tried to reduce the size of my generated xml files. It is not a problem for me anymore. I just add the defaultTabStop to make the whole thing work in OO. Anyway it seems a bit strange, that OO crashes in such a case. What default value is used doesn't matter to me. And as I suppose someone who does not specify a DefaultValue doesn't need one... it can as well be the default one from OO or 1 or whatever positive value Word uses. I would suggest the OO default.
i don`t know how to update CVS here at my work machine i fix it it in file C:\Program Files\OpenOffice.org 2.3\share\xslt\import\wordml\wordml2ooo.xsl in <xsl:template name="create-default-paragraph-styles"> just replace <style:paragraph-properties> <xsl:attribute name="style:tab-stop-distance"> <xsl:call-template name="ConvertMeasure"> <xsl:with-param name="value" select="concat(/w:wordDocument/w:docPr/w:defaultTabStop/@w:val,'twip')"/> </xsl:call-template>cm</xsl:attribute> </style:paragraph-properties> with <style:paragraph-properties> <xsl:attribute name="style:tab-stop-distance"> <xsl:variable name="dts"> <xsl:choose> <xsl:when test="/w:wordDocument/w:docPr/w:defaultTabStop/@w:val > 0"> <xsl:value-of select="/w:wordDocument/w:docPr/w:defaultTabStop/@w:val"/></xsl:when> <xsl:otherwise>709.317</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="ConvertMeasure"> <xsl:with-param name="value" select="concat($dts,'twip')"/> </xsl:call-template>cm</xsl:attribute> </style:paragraph-properties>
Hi guys, the best way to get your fix into the CVS is by providing a patch. More information can be found in the wiki: http://wiki.services.openoffice.org/wiki/Contributing_Patches Thanks for your help and engagement! Svante
I am sorry, I am no longer working on this format. Changed target to Office later. Is anybody able to take this over? And/or provide a patch for this problem? Thanks in advance, Svante