Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | DOCX:, each comment include the text of all comments in the imported document | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Writer | Reporter: | ugomatic <ugomatic> | ||||||
Component: | open-import | Assignee: | Oliver-Rainer Wittmann <orw> | ||||||
Status: | CLOSED FIXED | QA Contact: | |||||||
Severity: | Trivial | ||||||||
Priority: | P3 | CC: | doneyourself, gregor, issues, jon, ml, mmarholin, pavel, pescetti, scisteffan, stfhell | ||||||
Version: | OOO320m18 | ||||||||
Target Milestone: | 4.1.0 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=34489 | ||||||||
Issue Type: | DEFECT | Latest Confirmation in: | 4.0.1 | ||||||
Developer Difficulty: | Easy | ||||||||
Issue Depends on: | |||||||||
Issue Blocks: | 123771 | ||||||||
Attachments: |
|
Description
ugomatic
2010-07-09 19:44:20 UTC
Can confirm this. Sample document to be followed... *** Issue 113915 has been marked as a duplicate of this issue. *** ... is this going to be fixed any time soon, as without this feature I'd be forced to use proprietary software. The problem does not occur in version OOo-dev 3.3.0 (Build 9519) just installed rc3 (build 9539) and we are back to the same issue, i will try to install build 9519 as suggested by montyc to see if that makes a difference for me being a relative newbee here i failed to locate build 9518 so no news on that, if someone can give me a link to the ubuntu package of appropriate website i am more then willing to try. I've just downloaded OO 3.3 for OS X (build 9567) and the problem has not been solved. Sadly this is a major problem in collaborating with non foss users, and might force some of us to go back to proprietary. Anyone has clues on how to make this issue more popular within the community? *** Issue 117531 has been marked as a duplicate of this issue. *** Has been fixed in LibreOffice, patch might be applicable, see https://bugs.freedesktop.org/show_bug.cgi?id=34489 Take this one. I was hit by this bug today. Can anyone attach sample document in .docx containing two short paragraphs with one comment in each of them? Thanks. Created attachment 79966 [details]
Sample patch
Sample patch attached.
Inspired by the similar LO change - see details in the patchnotes inside.
Any reviewers?
Created attachment 80006 [details]
Word_2010_comments: sample file
Test kit: sample text file with comments, produced by Word 2010 (saved as DOCX, DOC, ODT) plus Word 2010 screenshot.
Marking as "easy". There are detailed instructions by Pavel Janik on how to solve the problem at http://s.apache.org/vI (ooo-dev mailing list). I copy and paste them here. The problem is very simple: Grab some DOCX document containing more than two comments (so you can check the results). Unzip it. Investigate Comments part (see Office Open XML Part 1 - Fundamentals And Markup Language Reference.pdf for more details). Investigate xmllint --format word/comments.xml Grep for comments: bash-3.2$ xmllint --format word/comments.xml | grep "<w:comment" Comments are numbered: <w:comment w:id="0" w:author="Deborah" w:date="2010-11-19T16:41:00Z" w:initials="D"> <w:comment w:id="1" w:author="Deborah" w:date="2010-11-19T14:41:00Z" w:initials="D"> <w:comment w:id="2" w:author="Deborah" w:date="2010-11-19T14:43:00Z" w:initials="D"> <w:comment w:id="3" w:author="Deborah" w:date="2010-11-19T14:49:00Z" w:initials="D"> <w:comment w:id="4" w:author="Deborah" w:date="2010-11-19T14:53:00Z" w:initials="D"> <w:comment w:id="5" w:author="Deborah" w:date="2010-11-19T14:51:00Z" w:initials="D"> According to wml.xsd, attribute id (w:id) is: <xsd:complexType name="CT_Markup"> <xsd:attribute name="id" type="ST_DecimalNumber" use="required"/> </xsd:complexType> but our model (writerfilter/source/ooxml/model.xml) contains: <attribute name="id"> <text/> which means it is being worked on as a string which is wrong. It should be ST_DecimalNumber. And thats all. Hi, I would like to change 'latest confirmation on: 3.4.1' to 'latest confirmation on: 4.0.0'. I encountered the issue described for one and the same document in both 3.4.1 and 4.0.0 (separate pc's). AOO400m3(Build:9702) - Rev. 1503704 2013-07-16 14:54:56 (Di, 16 Jul 2013) Kind regards, Gregor Taking over to review and integrate proposed solution. Comment on attachment 79966 [details]
Sample patch
proposed patch looks good.
I will apply it on branch ooxml-osba regarding my work on annotations/comments on text ranges.
I had some deeper investigation on the root cause. My results are: Our so-called 'model from OOXML' (file model.xml) contains the following definition: <define name="CT_MarkupRangeBookmark"> <attribute name="id"> <text/> <xs:documentation>Annotation Identifier</xs:documentation> </attribute> <ref name="CT_MarkupRange"/> </define> But via complex type "CT_MarkupRange" it inherits the definition from complex type "CT_Markup" whose definition is: <define name="CT_Markup"> <attribute name="id"> <ref name="ST_DecimalNumber"/> <xs:documentation>Annotation Identifier</xs:documentation> </attribute> </define> With leads to the following generated code in OOXMLFactory_wml.cxx: case NN_wml|DEFINE_CT_MarkupRangeBookmark: // CT_Markup (*pMap)[NS_wordprocessingml|OOXML_id] = NS_ooxml::LN_CT_Markup_id; // CT_MarkupRange (*pMap)[NS_wordprocessingml|OOXML_displacedByCustomXml] = NS_ooxml::LN_CT_MarkupRange_displacedByCustomXml; // CT_MarkupRangeBookmark (*pMap)[NS_wordprocessingml|OOXML_id] = NS_rtf::LN_IBKL; break; and case NN_wml|DEFINE_CT_MarkupRangeBookmark: // CT_Markup (*pMap)[NS_wordprocessingml|OOXML_id] = AttributeInfo(RT_Integer, NN_wml|DEFINE_ST_DecimalNumber); // CT_MarkupRange (*pMap)[NS_wordprocessingml|OOXML_displacedByCustomXml] = AttributeInfo(RT_List, NN_wml|DEFINE_ST_DisplacedByCustomXml); // CT_MarkupRangeBookmark (*pMap)[NS_wordprocessingml|OOXML_id] = AttributeInfo(RT_String, 0); break; ==> duplicate attribute info for attribute id Applying the needed correction to model.xml and performing further investigations reveals that parsing the comments/annotations sub stream for a certain comment/annotation is handled the same as parsing the footnotes sub stream and the endnotes sub stream for a certain footnote resp. endnote. Thus, it is needed to treat the IDs of footnotes and endnotes also as integers. "orw" committed SVN revision 1547392 into branches/ooxml-osba: 113059: *.docx import: correct handling of comment/annotation, footnote and e... fixed on branch ooxml-osba according Pavel's analysis and findings "orw" committed SVN revision 1552317 into trunk: 113059: *.docx import: correct handling of comment/annotation, footnote and e... fixed on trunk for the next release - thanks and kudos again to Pavel. verified on windows7 on AOO410m15(Build:9761) - Rev. 1583666 2014-04-01 13:53:14 (Di, 01 Apr 2014) |