Issue 85358 - default names for ( form ) controls and shape/autoshapes are incorrect
Summary: default names for ( form ) controls and shape/autoshapes are incorrect
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: OOo 2.0.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2008-01-18 11:34 UTC by noel.power
Modified: 2013-08-07 15:13 UTC (History)
2 users (show)

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

patch file (4.48 KB, patch)
2008-01-18 11:36 UTC, noel.power
no flags Details | Diff
patch (8.40 KB, patch)
2008-01-28 11:07 UTC, noel.power
no flags Details | Diff
list of locale names for controls & autoshapes (14.00 KB, application/
2008-01-28 11:23 UTC, noel.power
no flags Details
patch (6.10 KB, patch)
2009-02-04 15:11 UTC, noel.power
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description noel.power 2008-01-18 11:34:57 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
Comment 1 noel.power 2008-01-18 11:36:53 UTC
Created attachment 50962 [details]
patch file
Comment 2 daniel.rentz 2008-01-18 11:54:42 UTC
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?
Comment 3 noel.power 2008-01-18 12:06:19 UTC
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 )

Comment 4 daniel.rentz 2008-01-18 12:44:09 UTC
It is the UI language of Excel, regardless of the system locale or document
locale. And I am ok with a two-step fix :-)
Comment 5 daniel.rentz 2008-01-18 12:45:08 UTC
btw, I know the German and English names only :-(
Comment 6 noel.power 2008-01-28 11:03:54 UTC
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 )
Comment 7 noel.power 2008-01-28 11:07:46 UTC
Created attachment 51199 [details]
Comment 8 noel.power 2008-01-28 11:21:59 UTC
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.
Comment 9 noel.power 2008-01-28 11:23:26 UTC
Created attachment 51200 [details]
list of locale names for controls & autoshapes
Comment 10 daniel.rentz 2009-02-04 10:15:06 UTC

XLS filter code has been changed in the meantime, have to adapt this patch manually.
Comment 11 noel.power 2009-02-04 13:35:44 UTC
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?
Comment 12 daniel.rentz 2009-02-04 14:36:47 UTC
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.
Comment 13 noel.power 2009-02-04 15:11:13 UTC
Created attachment 59925 [details]
Comment 14 noel.power 2009-02-04 15:14:58 UTC
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
Comment 15 daniel.rentz 2009-02-04 16:11:18 UTC
Hmm does this really work? You use the STR_* defines in xiescher.cxx, but
#include the globstr.hrc in xlescher.cxx... :)
Comment 16 noel.power 2009-02-04 17:07:53 UTC
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.
Comment 17 daniel.rentz 2009-10-13 16:59:33 UTC
new target
Comment 18 Rob Weir 2013-03-11 15:04:48 UTC
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: