Bugzilla – Attachment 150344 Details for
Bug 124385
toolkit: UnknownPropertyException on setModel() call
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Beanshell test script
tabs.bsh (text/plain), 1.57 KB, created by
Vasily Melenchuk (CIB)
on 2019-03-28 09:17:30 UTC
(
hide
)
Description:
Beanshell test script
Filename:
MIME Type:
Creator:
Vasily Melenchuk (CIB)
Created:
2019-03-28 09:17:30 UTC
Size:
1.57 KB
patch
obsolete
>import com.sun.star.lang.XMultiComponentFactory; >import com.sun.star.uno.UnoRuntime; >import com.sun.star.uno.XComponentContext; >import com.sun.star.frame.XDesktop; >import com.sun.star.frame.XModel; >import com.sun.star.awt.tab.XTabPageContainerModel; >import com.sun.star.awt.tab.XTabPageModel; >import com.sun.star.awt.XControl; >import com.sun.star.awt.XControlModel; > > >XComponentContext xContext = XSCRIPTCONTEXT.getComponentContext(); >XMultiComponentFactory xMCF = xContext.getServiceManager(); > >Object tabPagesModel = xMCF.createInstanceWithContext("com.sun.star.awt.tab.UnoControlTabPageContainerModel", xContext); >XTabPageContainerModel xTabPageContainerModel = UnoRuntime.queryInterface(XTabPageContainerModel.class, tabPagesModel); > >// page1 >XTabPageModel xTabPageModel1 = xTabPageContainerModel.createTabPage((short) 1); >xTabPageModel1.setTitle("Page1"); >xTabPageModel1.setEnabled(true); >xTabPageContainerModel.insertByIndex(0, xTabPageModel1); > > >// page2 >XTabPageModel xTabPageModel2 = xTabPageContainerModel.createTabPage((short) 2); >xTabPageModel2.setTitle("Page2"); >xTabPageModel2.setEnabled(true); >xTabPageContainerModel.insertByIndex(1, xTabPageModel2); > >XControlModel xControlModel = UnoRuntime.queryInterface(XControlModel.class, tabPagesModel); >Object tabPageContainer = xMCF.createInstanceWithContext("com.sun.star.awt.tab.UnoControlTabPageContainer", xContext); >XControl xTabPageControl = UnoRuntime.queryInterface(XControl.class, tabPageContainer); > >xTabPageControl.setModel(xControlModel); > //UnknownPropertyException > >// BeanShell OpenOffice.org scripts should always return 0 >return 0; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 124385
: 150344 |
150520