Bug 55410 - on windows automatically fill in the default user's name into tools->options->user data
Summary: on windows automatically fill in the default user's name into tools->options-...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: EasyHack DifficultyBeginner SkillCpp
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-28 09:32 UTC by Caolán McNamara
Modified: 2014-05-23 08:44 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Caolán McNamara 2012-09-28 09:32:52 UTC
For gnome in shell/source/backends/gconfbe/gconfaccess.cxx we fill in the user's name information from glib's "g_get_real_name" (search for "givenname" and "g_get_real_name" in there.

It would be nice to fill in the defaults under windows as well SHGetUserDisplayName (http://undoc.airesoft.co.uk/shell32.dll/SHGetUserDisplayName.php) looks about right.

In officecfg/registry/data/org/openoffice/UserProfile.xcu there is
  <prop oor:name="givenname" install:module="gconflockdown">
    <value oor:external=
        "com.sun.star.configuration.backend.GconfBackend givenname"/>
  </prop>

which makes the configuration check that module to get that givenname property. If that was changed to...

<prop oor:name="givenname">
 <value install:module="unixdesktop" oor:external=
   "com.sun.star.configuration.backend.GconfBackend givenname"/>
  <value install:module="unixdesktop" oor:external=
   "com.sun.star.configuration.backend.WinInetBackend givenname"/>
</prop>

then it would also ask the windows backend in shell/source/backends/wininetbe/wininetbackend.cxx through WinInetBackend::getPropertyValue for "givenname" and some attempt to use SHGetUserDisplayName there might get us a fairly useful default value
Comment 1 Urmas 2012-09-28 20:40:52 UTC
Ordinal-exported functions are NEVER right.
Comment 2 Björn Michaelsen 2013-10-04 18:46:49 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 3 Robinson Tryon (qubit) 2013-10-23 16:45:03 UTC
Removing comma from whiteboard (please use a space to delimit values in this field)
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Whiteboard#Getting_Started
Comment 4 Tor Lillqvist 2014-05-23 08:44:23 UTC
That SHGetUserDisplayName() seems to be undocumented, so we definitely should *not* use that. Which is what Urmas meant, I guess.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.