[api-dev] ConfigurationProvider getByHierarchicalName regression

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[api-dev] ConfigurationProvider getByHierarchicalName regression

Bernard Marcelly
Hi,
Running a code that works in previous versions (up to 1.1.5 !) I found that it
throws an exception in OOo 3.3 RC3 / Windows XP. Probably same in the latest RC,
not tested.

I use getByHierarchicalName to obtain a set in a container.
If the argument is an absolute address within the container, it is rejected
"NoSuchElementException".
If the argument is a relative address it is accepted.
Both case were accepted up to now.

A second anomaly is that if you put a Watch in Basic on the variable containing
the registry key content, OpenOffice crashes. Seems similar to Issue 112107.

Here is the Basic code. It reads the data UseSystemFileDialog in node:
/org.openoffice.Office.Common/Misc
It successfully reads with a relative address, then fails with an absolute address.
______________

Sub Main
Dim rk As Object, v As Object, dataValue As Variant
' using GetRegistryKeyContent() from module Misc of library Tools
GlobalScope.BasicLibraries.loadLibrary("Tools")

rk = GetRegistryKeyContent("/org.openoffice.Office.Common")
' if you put a watch on rk and a breakpoint at next instruction, OpenOffice
crashes !

' next line works, the argument is relative to the node name
v = rk.getByHierarchicalName("Misc")
dataValue = v.getByName("UseSystemFileDialog")
MsgBox("Value : " & dataValue, 0, "Relative address")

' next line throws com.sun.star.container.NoSuchElementException with an
absolute address
v = rk.getByHierarchicalName("/org.openoffice.Office.Common/Misc")
dataValue = v.getByName("UseSystemFileDialog")
MsgBox("Value : " & dataValue, 0, "Absolute address")

rk.dispose
End Sub
______________

I think this is a stopper to 3.3, your opinion ?
Regards
   Bernard


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] ConfigurationProvider getByHierarchicalName regression

Stephan Bergmann-2
On 01/10/11 08:34, Bernard Marcelly wrote:
> Running a code that works in previous versions (up to 1.1.5 !) I found
> that it throws an exception in OOo 3.3 RC3 / Windows XP. Probably same
> in the latest RC, not tested.
>
> I use getByHierarchicalName to obtain a set in a container.
> If the argument is an absolute address within the container, it is
> rejected "NoSuchElementException".
> If the argument is a relative address it is accepted.
> Both case were accepted up to now.

It never occurred to me that one would want to use absolute paths with
getByHierarchicalName (let alone that it worked with the old configmgr
implementation), so that got lost with the configmgr re-write for OOo
3.3.  You can file an issue to make the new configmgr backwards
compatible and also accept absolute paths, but I doubt this is a show
stopper.

> A second anomaly is that if you put a Watch in Basic on the variable
> containing the registry key content, OpenOffice crashes. Seems similar
> to Issue 112107.

I remember there was a problem with the Basic Watch feature recently,
presumably in combination with configmgr, and I think it got fixed for
one of the 3.3 RCs, but I cannot find any details.  Can you please retry
with a more recent RC to see if this problem is already fixed?  Thanks.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] ConfigurationProvider getByHierarchicalName regression

Fernand Vanrie
In reply to this post by Bernard Marcelly
Bernard ,

could that also been the  reason why


oCfgManager = oDoc.getUIConfigurationManager()
  oToolbarSettings = oCfgManager.getSettings( xResourceURL, True)

no longer works ?

Greetz

Fernand

> Hi,
> Running a code that works in previous versions (up to 1.1.5 !) I found
> that it throws an exception in OOo 3.3 RC3 / Windows XP. Probably same
> in the latest RC, not tested.
>
> I use getByHierarchicalName to obtain a set in a container.
> If the argument is an absolute address within the container, it is
> rejected "NoSuchElementException".
> If the argument is a relative address it is accepted.
> Both case were accepted up to now.
>
> A second anomaly is that if you put a Watch in Basic on the variable
> containing the registry key content, OpenOffice crashes. Seems similar
> to Issue 112107.
>
> Here is the Basic code. It reads the data UseSystemFileDialog in node:
> /org.openoffice.Office.Common/Misc
> It successfully reads with a relative address, then fails with an
> absolute address.
> ______________
>
> Sub Main
> Dim rk As Object, v As Object, dataValue As Variant
> ' using GetRegistryKeyContent() from module Misc of library Tools
> GlobalScope.BasicLibraries.loadLibrary("Tools")
>
> rk = GetRegistryKeyContent("/org.openoffice.Office.Common")
> ' if you put a watch on rk and a breakpoint at next instruction,
> OpenOffice crashes !
>
> ' next line works, the argument is relative to the node name
> v = rk.getByHierarchicalName("Misc")
> dataValue = v.getByName("UseSystemFileDialog")
> MsgBox("Value : " & dataValue, 0, "Relative address")
>
> ' next line throws com.sun.star.container.NoSuchElementException with
> an absolute address
> v = rk.getByHierarchicalName("/org.openoffice.Office.Common/Misc")
> dataValue = v.getByName("UseSystemFileDialog")
> MsgBox("Value : " & dataValue, 0, "Absolute address")
>
> rk.dispose
> End Sub
> ______________
>
> I think this is a stopper to 3.3, your opinion ?
> Regards
>   Bernard
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] ConfigurationProvider getByHierarchicalName regression

Carsten Driesner-3
Am 10.01.2011 10:16, schrieb Fernand Vanrie:
> Bernard ,
>
> could that also been the  reason why
>
>
> oCfgManager = oDoc.getUIConfigurationManager()
>  oToolbarSettings = oCfgManager.getSettings( xResourceURL, True)
>
> no longer works ?
Hi Fernand,

No, this is definitely not the cause. The user interface configuration
manager is a completely different implementation. I answered this
question some days ago. There is nothing wrong here. Normally the
document doesn't contain any user interface settings, therefore your
second line won't work! You have to insert a user interface element
setting to a document first. The default settings are stored for every
module at the module ui configuration manager.

Regards,
Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] ConfigurationProvider getByHierarchicalName regression

Stephan Bergmann-2
In reply to this post by Stephan Bergmann-2
On 01/10/11 10:06, Stephan Bergmann wrote:
> On 01/10/11 08:34, Bernard Marcelly wrote:
>> A second anomaly is that if you put a Watch in Basic on the variable
>> containing the registry key content, OpenOffice crashes. Seems similar
>> to Issue 112107.
>
> I remember there was a problem with the Basic Watch feature recently,
> presumably in combination with configmgr, and I think it got fixed for
> one of the 3.3 RCs, but I cannot find any details. Can you please retry
> with a more recent RC to see if this problem is already fixed? Thanks.

Meanwhile, found the details again.  Its
<http://qa.openoffice.org/issues/show_bug.cgi?id=112107>, only fixed for
OOo 3.4 (DEV300_m93).

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] ConfigurationProvider getByHierarchicalName regression

Bernard Marcelly
In reply to this post by Stephan Bergmann-2
Message de Stephan Bergmann  date 2011-01-10 10:06 :

>
> On 01/10/11 08:34, Bernard Marcelly wrote:
>> Running a code that works in previous versions (up to 1.1.5 !) I found
>> that it throws an exception in OOo 3.3 RC3 / Windows XP. Probably same
>> in the latest RC, not tested.
>>
>> I use getByHierarchicalName to obtain a set in a container.
>> If the argument is an absolute address within the container, it is
>> rejected "NoSuchElementException".
>> If the argument is a relative address it is accepted.
>> Both case were accepted up to now.
>
> It never occurred to me that one would want to use absolute paths with
> getByHierarchicalName (let alone that it worked with the old configmgr
> implementation), so that got lost with the configmgr re-write for OOo 3.3. You
> can file an issue to make the new configmgr backwards compatible and also accept
> absolute paths, but I doubt this is a show stopper.
>

I have created Issue 116391
<http://qa.openoffice.org/issues/show_bug.cgi?id=116391>

    Bernard


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] ConfigurationProvider getByHierarchicalName regression

Bernard Marcelly
In reply to this post by Stephan Bergmann-2
Message de Stephan Bergmann  date 2011-01-10 11:24 :

>
> On 01/10/11 10:06, Stephan Bergmann wrote:
>> On 01/10/11 08:34, Bernard Marcelly wrote:
>>> A second anomaly is that if you put a Watch in Basic on the variable
>>> containing the registry key content, OpenOffice crashes. Seems similar
>>> to Issue 112107.
>>
>
> Meanwhile, found the details again. Its
> <http://qa.openoffice.org/issues/show_bug.cgi?id=112107>, only fixed for OOo 3.4
> (DEV300_m93).
>

I don't understand why this regression/crash is not corrected for OOo 3.3.

It is triggered by object inspectors : the watch window, Xray, MRI. These tools
help ordinary programmers in their struggle against the API.

    Bernard


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] ConfigurationProvider getByHierarchicalName regression

Stephan Bergmann-2
On 01/10/11 14:50, Bernard Marcelly wrote:

> Message de Stephan Bergmann  date 2011-01-10 11:24 :
>>
>> On 01/10/11 10:06, Stephan Bergmann wrote:
>>> On 01/10/11 08:34, Bernard Marcelly wrote:
>>>> A second anomaly is that if you put a Watch in Basic on the variable
>>>> containing the registry key content, OpenOffice crashes. Seems similar
>>>> to Issue 112107.
>>>
>>
>> Meanwhile, found the details again. Its
>> <http://qa.openoffice.org/issues/show_bug.cgi?id=112107>, only fixed
>> for OOo 3.4
>> (DEV300_m93).
>>
>
> I don't understand why this regression/crash is not corrected for OOo 3.3.

Because nobody deemed it a show stopper.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]