Apache OpenOffice (AOO) Bugzilla – Issue 85358
default names for ( form ) controls and shape/autoshapes are incorrect
Last modified: 2013-08-07 15:13:10 UTC
If a user does not specify the name of a control or a shape, MSO Excel does it for you, but of course the name MSO uses isn't store anywhere, it's inferred from the shape type and the shape id. However in openoffice when importing a) for form controls a standard ( unnumbered ) name is used.. the names are also wrong, e.g. CommandButton instead of Button etc. This is a little annoying because for example when a sheet with multiple buttons is imported, in openoffice all of the buttons have the same name b) for shapes no name at all is set. the following patch assigns the correct names to the shapes and controls
Created attachment 50962 [details] patch file
MS uses localized names for unnamed objects, e.g. with an English Excel, insert a rectangle into a sheet, which is named "Rectangle 1", open the file in a German Excel, you will see "Rechteck 1". Do we want this too?
ouch! I didn't realize that, sure, we should support that also then, but I think we can even do that as second step ( do you think that is ok? ) do you know are the names tied to the locale of the document or the locale of the Excel? if you are happy with a iterative approach ( english first then locale support ) I can commit this somewhere ( assuming you are happy with the patch/approach )
It is the UI language of Excel, regardless of the system locale or document locale. And I am ok with a two-step fix :-)
btw, I know the German and English names only :-(
oh, I must have blown away my .cvsrc file, the previous attachment hasn't unified diffs :-( anyway, I attach a new version ( well not that new, I just forgot to upload it ) using resource strings ( to support locale specific strings )
Created attachment 51199 [details] patch
mmm I am not sure what is the best way to get the excel equiv localized names for the controls and autoshape. But perhaps a good start would be to initially provide the translations for english, french and german ( kohei who had a french excel install hanging around kindly dug out some names ) see attachment. Some volunteers to fill in the missing locales would be nice. I presume that if the locale specific text is not available the default will be en-US.
Created attachment 51200 [details] list of locale names for controls & autoshapes
target XLS filter code has been changed in the meantime, have to adapt this patch manually.
would an m40 version do, we should have ported this patch in ooo-build anyway ( but I am not sure, maybe I did it, or someone else or... no-one ) but I can do it if it doesn't exist, shall I do it?
would be nice. Basically, the creation of default names is done now in the c'tor of XclImpObjectManager. This is used by all XLS import filters supporting drawing objects (BIFF3-BIFF8). I hope the mapping XLS-object-type -> name is sufficient (e.g. all different auto shapes get the name "AutoShape"). The resulting name is built in XclImpObjectManager::GetDefaultObjName() based on the Excel object ID rather than the DFF shape ID which is what Excel does too.
Created attachment 59925 [details] patch
yeah, I vaguely recall this (e.g. wondering why this patch would no longer apply and looking through the nice new stuff ) It seems the patch is now just the resource related part, ( yeah I know it's not complete, I only cover the basic names, but they are all I know ) anyway I don't think it is a problem to introduce these piecemeal
Hmm does this really work? You use the STR_* defines in xiescher.cxx, but #include the globstr.hrc in xlescher.cxx... :)
no idea, it looks like a stray ( but harmless ) hunk left over from removing the other bits out of the previous version of the patch.
new target
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