Hi people, following what Drew started a weeks ago, I've tried to reproduce the database table preview in the Mail Merge wizard:
sw/source/ui/dbui/selectdbtabledialog.cxx sw/source/ui/dbui/dbtablepreviewdialog.cxx sw/source/ui/dbui/dbtablepreviewdialog.hrc sw/source/ui/dbui/dbtablepreviewdialog.src I've tried the XComponentLoader at the XFrame, its XDispatchProvider, but all I get is a read-only DSB. AFAIK my OOoBasic version in the module DataSourceBrowser_2 at http://www.ArielConstenlaHaile.com.ar/ooo/temp/FRAME_CONTROL.odt does quite the "same" as sw/source/ui/dbui/dbtablepreviewdialog.cxx but using a UNO AWT dialog instead of a SfxModalDialog instance (derived of vcl ModalDialog), and a css.awt.Window instead of a vcl Window; but aren't the UNO wrappers of the others? what am I missing? The beamer thing Frank mentioned, is not used at all in dbtablepreviewdialog.cxx (just the name ;-) of the pointer): if(m_xFrame.is()) { uno::Reference<frame::XDispatchProvider> xDP(m_xFrame, uno::UNO_QUERY); util::URL aURL; aURL.Complete = C2U(".component:DB/DataSourceBrowser"); uno::Reference<frame::XDispatch> xD = xDP->queryDispatch(aURL, C2U(""), 0x0C); if(xD.is()) { xD->dispatch(aURL, rValues); m_pBeamerWIN->Show(); } } can be translated to OOobasic like this: oFrame = createUnoService("com.sun.star.frame.Frame") oFrame.initialize(aWindow) aURL.Complete = ".component:DB/DataSourceBrowser" oDispatchObject = oFrame.queryDispatch(_ aURL, _ "",_ CInt("&H0C")) If IsNull(oDispatchObject) Then GoTo CLEAN_UP_DataSourceBrowser_Dispatch End If aProps(0).Name = "DataSourceName" aProps(0).Value = "Bibliography" aProps(1).Name = "CommandType" aProps(1).Value = com.sun.star.sdb.CommandType.TABLE aProps(2).Name = "Command" aProps(2).Value = "biblio" aProps(3).Name = "ShowTreeView" aProps(3).Value = FALSE aProps(4).Name = "ShowTreeViewButton" aProps(4).Value = FALSE aProps(5).Name = "ShowMenu" aProps(5).Value = FALSE oDispatchObject.dispatch(aURL, aProps) As you see no findFrame("_beamer") at all in the C++ code. What am I missing? May be the settings when creating the window? but I've tried every combination... :-( Regards Ariel. SIDE NOTE: the SwDBTablePreviewDialog does not follow the dialog design rules: between the "beamer" window and the command button there is much space! -- Ariel Constenla-Haile La Plata, Argentina [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.ArielConstenlaHaile.com.ar/ooo/ "Aus der Kriegsschule des Lebens - Was mich nicht umbringt, macht mich härter." Nietzsche Götzendämmerung, Sprüche und Pfeile, 8. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]