Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | hyperlinks for shapes not imported | ||
---|---|---|---|
Product: | Calc | Reporter: | noel.power |
Component: | open-import | Assignee: | AOO issues mailing list <issues> |
Status: | ACCEPTED --- | QA Contact: | |
Severity: | Trivial | ||
Priority: | P3 | CC: | freuter, issues, kpalagin, manens, michael.brauer, mmeeks, pagalmes.lists |
Version: | OOo 2.0.3 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | PATCH | Latest Confirmation in: | --- |
Developer Difficulty: | --- | ||
Attachments: |
Description
noel.power
2006-06-19 12:18:50 UTC
Created attachment 37231 [details]
patch file
npower->dr it would be great to get this folded into 2.0.4, I hope to add here a patch for the context menu bits also Created attachment 37347 [details]
latest patch file with hyperlink context menu
Created attachment 37349 [details]
screenshot of new context menu ( shape has no hyperlink assigned )
Created attachment 37350 [details]
screenshot of context menu when the shape alread has associated hlink
Created attachment 37351 [details]
screenshot showing dialog when ~Hyperlink ctx menu is selected
Created attachment 37352 [details]
test document ( used for the screenshots )
Same comments as in issue 59082, please take care about the UI things and the spec. spec is available from here http://specs.openoffice.org/calc/compatibility/AutoShapeGraphicHyperlinkAndMacroSupport.odt the patches already contain the ui bits Created attachment 37823 [details]
new version of patch
small change to patch to prevent bad String copy ( I attach the full version of the patch file with the modification included ) specification has been updated by the User Experience team. Please, could you check if issue 76543 is a duplicate of this one ? BTW, the status of the above spec is "obsolete". Does this mean there is a new spec ? >please, could you check if issue 76543 is a duplicate of this one ? it seems similar, that is if on the excel side of things it is a hyperlink that is associated with the shape.But... this patch wont help because it is a calc only fix >BTW, the status of the above spec is "obsolete". Does this mean there is a new spec ? No idea, I hope the status was set to obsolete accidentaly, but after nearly a year of this hanging around I am finding it hard to maintain interest :-( @dr: any news about that? @npower: Yes, I understand your frustration... target Ok, so far I have added all pieces of this patch but the xmloff stuff to the sources, including some minor changes (e.g. show correct URL in ScGridWindow::RequestHelp(), if an object contains an URL and there is a URL embedded in its text; removed global OUStrings in shapeuno.cxx because that increases library load time). A question about the xmloff changes, as this is a quite big part of the patch and I am not the ODF expert: Do these changes modify the ODF file format (add elements/attributes, or move them, etc)? FYI Noel is on paternity leave, may be a week or so before he can help; sorry. It's great something happens with this at last :-) >A question about the xmloff changes, as this is a quite big part of the patch and I >am not the ODF expert: me either >Do these changes modify the ODF file format (add elements/attributes, or move them, etc)? I am looking at the patch but am currently lost, its been a long time, I will get back to you as soon as I can Well, I have had to do a lot of changes to be able to add it into m215. :-) Currently I have changed the draw:event-listener element (this doesn't exist) to a presentation:event-listener element. But I think that's not the final solution, what does a presentation element in a Calc document? I am in contact with Michael Brauer, and will come back and coment in this issue. hi, I looked through your changes as I was concerned about the patch(s) attached to this issue being out of date. Anyway glad to see everything seems to be fine ( although I ignored the xmloff changes as they were too hard to follow for my tired excuse for a brain). Just to let you know, it's really easy for the patches attached to the issues here to get out of sync with whats in ooo-build, ( often even a patch of mine will get changed without my knowledge because we support a newer milestone ) with so many patches one can quite easily forget to update the patch in the issue after changing it in ooo-build. Perhaps in future you could ping before starting to check? it might save some time ;-), I could answer any questions etc. Totally agree with the draw:event-listener element v's presentation:event-listener in calc, Ihoped adding a element to the draw namespace would be ok ( e.g. unrecognised elements should be ignored by other odf aware applications ) The draw:event-listener follows the existing precedent etc. But I guess Mr Brauer will know what to do. cannot be finished in 2.3 -> target all code already checked in for this feature is commented out by #ifdef ISSUE66550_HLINK_FOR_SHAPES ... #endif changes are in the modules xmloff and sc. Created attachment 46519 [details]
patch to enclose shape objects with <draw:a> and associated hyperlink attribute
summary of the patch o I rewound the changes in xmloff sc. So I added back support for hyperlinks in sc ( except the hyperlink is now transported by a property instead of an event supplier ) All hyperlink related bits in xmloff have been removed o I made Hyperlink an optional property of the Shape service o the property is only available from a shape in calc at the momement ( but thats just an implementation detail ) also I don't want to interfere with the existing writer ( and others? ) handling of hyperlinks ( I think thats a battle for another day ) o now all of the xml handling is localised in calc e.g. see. sc/source/filter/xml/* o also I only enclose the shape in <draw:a> if and only if there is an associated hyperlink exmaple xml ============ a) picture in calc with hyperlink <draw:a xlink:type="simple" xlink:href="#Sheet2"><draw:frame table:end-cell-address="Sheet1.E16" table:end-x="0.503cm" table:end-y="0.375cm" draw:z-index="0" draw:name="Graphics 1" draw:style-name="gr1" draw:text-style-name="P1" svg:width="9.534cm" svg:height="6.805cm" svg:x="0cm" svg:y="0cm"><draw:image xlink:href="Pictures/10000000000003A200000387B6D6F7F0.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"><text:p/></draw:image></draw:frame></draw:a> b) shape in calc ( with hyperlink ) <draw:a xlink:type="simple" xlink:href="#Sheet2"><draw:rect table:end-cell-address="Sheet1.D19" table:end-x="0.447cm" table:end-y="0.322cm" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P1" svg:width="5.798cm" svg:height="2.036cm" svg:x="1.422cm" svg:y="0.001cm"><text:p/></draw:rect></draw:a> Looks very good, thanks. What about the ODF changes? They need to be spec'ed. flr->dr: According to my findings the ODF spec already allows ODF fragments of the above type. I.e. the current ODF spec explicitly allows a "draw:a" element to appear inside a "table:table-cell". So there is not need to modify the ODF spec, since the ODF spec already allows this. Could you please check this with your ODF experts? mib->flr: You are right, a <draw:a> may appear within a table cell. But it currently only allows a <draw:frame> as content, So you may use it for text boxes, images and embedded objects only. My understanding of the issue is that you also want to support hyperlinks also for other kind of objects, for instance rectangles. In that case, the ODF specification has to be extended to also support <draw:rect>, etc. Proposed enhancement to the ODF TC: http://lists.oasis-open.org/archives/office/200707/msg00061.html move target from 2.x to 3.0 fyi, with issue 91056 I fixed that shapes with a surrounding draw:a element are actually loaded in OOo 3.0 and for impress and draw the hyperlink is actually used for the shape. To support the import of the hyperlinks for calc you only have to modify your derivation of SvXMLShapeContext, if such think exists in calc, and use the new protected member msHyperlink which is filed for your convenience during import. If you do not derive from SvXMLShapeContext then you must find another way to get to that member. Created attachment 54776 [details]
patch file
some details on the above o the patch file can replace enable-dra-a-hlink.diff above. o it assumes integration of the cws impress146. o all xml hackerage in sc/source/filter/xml has been removed [*] o xmloff has been modified to try and set the hlink at the shape ( if the optional Hyperlink property exists ) [*] I did leave in the patches to sc/source/filter/xml/xmlexprt.cxx this provides for export of the draw:a bits for calc ( which are not enabled by cws impress146 ) imo it is acceptable for a new feature in a new version not to be readable by and older version of office. But... you can of course just not apply that part of the patch if you wish Daniel, please see if this patch can be integrated. Thanks a lot. WBR, KP. dr->noel: Please give me an update, what's the status of the ODF proposal? Hi Daniel, from cl's comments above ( from Wed Jun 25 '08 ) regarding issue 91056 it would seem to be accepted right? and I attached ( some time ago[*] ) a patch in response to his changes [*] I don't recall exactly what changes I made, there is some sort of a summary immediately after the last version of the patch, I don't know if this patch applies as is anymore, can you try ? if it doesn't apply then I can regenerate it for the milestone you need if you wish, just let me know if you need me to do that ( and the milestone required ) I see, thanks for the feedback. I will try to apply the patch and come back to you, if I find unsolvable problems. dr->npower: have to ask again :-( which patch should I apply? only the very last in the list? the last patches seem to be somewhat similar... >which patch should I apply? only the very last in the list? the last patches >seem to be somewhat similar... http://www.openoffice.org/nonav/issues/showattachment.cgi/54776/vba-sc-autoshapes-hyperlinks.diff ( the last patch ) afaik replaces the others, having a quick look in in I see it patches xmloff/source/draw/ximpshap.cxx ( and the previous one doesn't ) I guess this refers to the changes made in response to issue# 91056 Additionally I see that there is an error in the http://www.openoffice.org/nonav/issues/showattachment.cgi/46519/enable-draw-a-hlink.diff ( the previous version ) see Shape.idl which afaics won't even compile I guess the patches look the same because I am regenerating all the changes rather than added a little change to the previous version. But I guess you need to see if it applies, see if it works ( I haven't looked at this in so long I wouldn't be suprised if it no longer works or applies ) Anyway, if you have problems just ping me and I will help applied successfully. compiling and hoping that it really works :-) I'm adding this comment to all open issues with Issue Type == PATCH. We have 220 such issues, many of them quite old. I apologize for that. We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0. If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know. On the other hand, if the patch is no longer relevant, please let us know that as well. If you have any general questions or want to discuss this further, please send a note to our dev mailing list: dev@openoffice.apache.org Thanks! -Rob |