Bug 118267 - /org.openoffice.Setup/Product ooXMLFileFormatVersion configuration information throws NoSuchElementException in Basic/Python macros
Summary: /org.openoffice.Setup/Product ooXMLFileFormatVersion configuration informatio...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-UNOAPI
  Show dependency treegraph
 
Reported: 2018-06-20 11:56 UTC by LibreOfficiant
Modified: 2019-11-22 08:54 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LibreOfficiant 2018-06-20 11:56:42 UTC
Description:
Product information such as name, version, vendor, etc can be retrieved using the API. ooXMLFileFormat has disappeared from 5.x to 6.x  

Steps to Reproduce:
Run the follwing ooBasic macro:
Sub OOoVersion() As String
  Dim args(0) As new com.sun.star.beans.PropertyValue
  oConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider")
  args(0).Name = "nodepath"
  args(0).Value = "/org.openoffice.Setup/Product"
  oSettings = oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", args())
  OOOVersion= oSettings.getByName("ooXMLFileFormatVersion")
  msgbox OOOVersion
End Sub

Actual Results:
Error MsgBox (french example)
  Erreur d'exécution BASIC.
  Une exception s'est produite :
  Type: com.sun.star.container.NoSuchElementException
  Message: ooXMLFileFormatVersion.

Expected Results:
Simple MsgBox stating:
  1.0


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Julien Nabet 2018-06-20 12:48:59 UTC
I don't know about "ooXMLFileFormatVersion" but you can find some interesting properties from here:
https://opengrok.libreoffice.org/xref/core/unotools/source/config/configmgr.cxx#71:
- ooSetupVersionAboutBox
- ooVendor
- ooName
- etc.
Comment 2 Julien Nabet 2018-06-20 12:56:39 UTC
On Win7 with LO 5.0.1, I got "1.0" when launching the macro on a brand new Writer file.
Comment 3 Julien Nabet 2018-06-20 13:29:42 UTC
Gabor/Katarina: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=45d1e227f910b6c3746b12fb2eebfac498c14ba5, thought you might be interested in this one.

author	Gabor Kelemen <kelemeng@ubuntu.com>	2017-08-16 15:55:27 +0200
committer	Katarina Behrens <Katarina.Behrens@cib.de>	2017-09-09 12:58:58 +0200
commit 45d1e227f910b6c3746b12fb2eebfac498c14ba5 (patch)
tree 14eb9213a02cf27afb5883ab3ea0abf76cce5617
parent 7c429ddca63c09a2b656715292968000bfe86a1a (diff)
Drop unused ooXMLFileFormat* config keys
These are unused since 2013, see:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=041d2b88a473cc7ba9b68113f7642dd8417369e4
https://cgit.freedesktop.org/libreoffice/core/commit/?id=abd3338486a515380d50c4ee5f4ab242fb5fd4bd
Comment 4 LibreOfficiant 2018-06-20 14:07:53 UTC
If such property is deprecated, it's not mentioned in the SDK as far as I tried to verify this.

It may be worth documenting within the SDK:

o  the list of valid nodepath's
o  the list of supported properties for each nodepath
Comment 5 Xisco Faulí 2018-06-21 15:22:08 UTC
(In reply to Alain H Romedenne from comment #4)
> If such property is deprecated, it's not mentioned in the SDK as far as I
> tried to verify this.
> 
> It may be worth documenting within the SDK:
> 
> o  the list of valid nodepath's
> o  the list of supported properties for each nodepath

@Stephan, I thought you could be interested in this issue...
Comment 6 Stephan Bergmann 2018-06-21 15:38:04 UTC
This is documented in the LO 6.0 release notes at <https://wiki.documentfoundation.org/index.php?title=ReleaseNotes/6.0&oldid=161949#Removed_configuration_options> (current revision; no idea how to find out with what revision of that wiki page it got there):  "The following configuration schemas were removed: [...] /org.openoffice.Office/Common/Setup/Product/ooXMLFileFormatName and /org.openoffice.Office/Common/Setup/Product/ooXMLFileFormatVersion [...]"
Comment 7 Stephan Bergmann 2018-06-21 15:43:54 UTC
(In general, documentation of the available configuration items is the tree of source files at officecfg/registry/schema/, even if <https://wiki.openoffice.org/wiki/Documentation/DevGuide/Config/Configuration_Management> is probably not very specific about that.  I'm not sure it would be a good idea to duplicate that information in the SDK documentation.  One approach could be to automatically extract such documentation from the source files, with some tool run at build time, and include that in the SDK, similar to how documentation is generated for the UNOIDL, C++, and Java APIs.  Patches welcome.)
Comment 8 Julien Nabet 2019-08-27 13:36:30 UTC
Let's put this one to WFM since the property had been deprecated and it was indicated in 6.0 release notes.
Of course, there's still SDK documentation perhaps to improve but at least we got the explanation about NoSuchElementException.