Bug 66586 - dynamicaly add a control to a dialog does not work
Summary: dynamicaly add a control to a dialog does not work
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.1.0.1 rc
Hardware: Other All
: medium normal
Assignee: Noel Power
URL:
Whiteboard: target:4.2.0 target:4.1.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-07-04 14:13 UTC by Laurent Godard
Modified: 2013-07-22 14:26 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
test extension (2.21 KB, application/vnd.openofficeorg.extension)
2013-07-04 16:02 UTC, Laurent Godard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Godard 2013-07-04 14:13:05 UTC
the dialog are created fine, but fail (silently) to include an control by Code

treeModel = oDlgModel.createInstance("com.sun.star.awt.tree.TreeControlModel")
...
oDlgModel.insertByName("TreeChoixDossier",treeModel)

--> nothing inserted

works on 4.0.4
Comment 1 Laurent Godard 2013-07-04 16:02:17 UTC
Created attachment 82034 [details]
test extension

deploy the extension
in library1.Module1 execute "test"

it will launch a dialog with one button and dynamically built treeview

in 4.0.4 --> a blank treeview is visible
in 4.10 --> no treeview
Comment 2 Noel Power 2013-07-11 09:32:38 UTC
confirmed 4.1
Comment 3 Noel Power 2013-07-11 16:01:21 UTC
http://cgit.freedesktop.org/libreoffice/core/commit/?id=fcd01fba69db6de6cfc983fae65b6ba6764de0d6

is the cause of this, I can't see service "com.sun.star.awt.tree.DefaultTreeDataModel" in 4.1 ( in services.rdb ) also it doesn't exist in 3.4. The change in treecontrolpeer.cxx is not compatible with the previous behaviour ( previously there was no throw when the equivalent createInstance failed )

the use of TreeControlPeer by the uno Dialogs seems a bit dubious since that TreeControlPeer seems to expect the passed model to implement XTreeDataModel ( dialog tree control does not ( there is a variant I think 'MuteableTreeDataModel' that does )
Comment 4 Commit Notification 2013-07-12 13:25:08 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=df9f26c22a59ae2309201d2709ea5f8a0ecbf247

fix fdo#66586 Revert "fdo#46808, create IDL fortree::DefaultTreeDataModel"



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2013-07-15 11:18:15 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4079afed49aaa5b1d84443a21f63007754ba31ae&h=libreoffice-4-1

fix fdo#66586 Revert "fdo#46808, create IDL fortree::DefaultTreeDataModel"


It will be available in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2013-07-22 14:26:45 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-4-1-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e1244d57bd8329ccc4177399d159923d76b1e2ce&h=libreoffice-4-1-0

fix fdo#66586 Revert "fdo#46808, create IDL fortree::DefaultTreeDataModel"


It will be available already in LibreOffice 4.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.