dbaccess/source/ui/control/opendoccontrols.cxx | 27 +++++++++++++++++++++++++ dbaccess/source/ui/dlg/adminpages.cxx | 13 ++++++++++++ dbaccess/source/ui/dlg/adminpages.hxx | 1 dbaccess/source/ui/inc/opendoccontrols.hxx | 2 + extras/source/glade/libreoffice-catalog.xml.in | 8 +++++++ 5 files changed, 51 insertions(+)
New commits: commit 379988085239fdd93dd87870bcc4966aeaa9b396 Author: Mathias Hasselmann <math...@openismus.com> Date: Thu Mar 21 07:58:31 2013 +0100 Add builder support for a few dbaui controls This adds the needed methods and catalog definitions for dbaui::OGenericAdministrationPage, dbaui::OpenDocumentButton and dbaui::OpenDocumentListBox. Change-Id: I5b883c39f1cb9623c357e5ebec1632816547ff03 Reviewed-on: https://gerrit.libreoffice.org/2886 Reviewed-by: Lionel Elie Mamane <lio...@mamane.lu> Reviewed-by: Fridrich Strba <fridr...@documentfoundation.org> Tested-by: Fridrich Strba <fridr...@documentfoundation.org> diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index 1ae7fe7..907840e 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -38,6 +38,7 @@ #include <tools/urlobj.hxx> #include <svl/filenotation.hxx> #include <osl/diagnose.h> +#include <vcl/builder.hxx> //........................................................................ namespace dbaui @@ -168,6 +169,19 @@ namespace dbaui } //-------------------------------------------------------------------- + OpenDocumentButton::OpenDocumentButton( Window* _pParent, const sal_Char* _pAsciiModuleName ) + :PushButton( _pParent ) + { + impl_init( _pAsciiModuleName ); + } + + //-------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeOpenDocumentButton( Window *pParent, VclBuilder::stringmap & ) + { + return new OpenDocumentButton( pParent, "com.sun.star.sdb.OfficeDatabaseDocument" ); + } + + //-------------------------------------------------------------------- void OpenDocumentButton::impl_init( const sal_Char* _pAsciiModuleName ) { OSL_ENSURE( _pAsciiModuleName, "OpenDocumentButton::impl_init: invalid module name!" ); @@ -198,6 +212,19 @@ namespace dbaui } //-------------------------------------------------------------------- + OpenDocumentListBox::OpenDocumentListBox( Window* _pParent, const sal_Char* _pAsciiModuleName ) + :ListBox( _pParent, WB_BORDER | WB_DROPDOWN ) + { + impl_init( _pAsciiModuleName ); + } + + //-------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeOpenDocumentListBox( Window *pParent, VclBuilder::stringmap & ) + { + return new OpenDocumentListBox( pParent, "com.sun.star.sdb.OfficeDatabaseDocument" ); + } + + //-------------------------------------------------------------------- void OpenDocumentListBox::impl_init( const sal_Char* _pAsciiModuleName ) { OSL_ENSURE( _pAsciiModuleName, "OpenDocumentListBox::impl_init: invalid module name!" ); diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 46840d8..27ce056 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -78,6 +78,19 @@ namespace dbaui } //------------------------------------------------------------------------- + OGenericAdministrationPage::OGenericAdministrationPage(Window* _pParent, const rtl::OString& _rId, const rtl::OUString& _rUIXMLDescription, const SfxItemSet& _rAttrSet) + :SfxTabPage(_pParent, _rId, _rUIXMLDescription, _rAttrSet) + ,m_abEnableRoadmap(sal_False) + ,m_pAdminDialog(NULL) + ,m_pItemSetHelper(NULL) + ,m_pFT_HeaderText(NULL) + { + DBG_CTOR(OGenericAdministrationPage,NULL); + + SetExchangeSupport(sal_True); + } + + //------------------------------------------------------------------------- OGenericAdministrationPage::~OGenericAdministrationPage() { DELETEZ(m_pFT_HeaderText); diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 7e5dcdc..e9e11c8 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -109,6 +109,7 @@ namespace dbaui m_xORB; public: OGenericAdministrationPage(Window* _pParent, const ResId& _rId, const SfxItemSet& _rAttrSet); + OGenericAdministrationPage(Window* _pParent, const rtl::OString& _rId, const rtl::OUString& _rUIXMLDescription, const SfxItemSet& _rAttrSet); ~OGenericAdministrationPage(); /// set a handler which gets called every time something on the page has been modified diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx index 501e045..617476d 100644 --- a/dbaccess/source/ui/inc/opendoccontrols.hxx +++ b/dbaccess/source/ui/inc/opendoccontrols.hxx @@ -45,6 +45,7 @@ namespace dbaui public: OpenDocumentButton( Window* _pParent, const sal_Char* _pAsciiModuleName, const ResId& _rResId ); + OpenDocumentButton( Window* _pParent, const sal_Char* _pAsciiModuleName ); protected: void impl_init( const sal_Char* _pAsciiModuleName ); @@ -64,6 +65,7 @@ namespace dbaui public: OpenDocumentListBox( Window* _pParent, const sal_Char* _pAsciiModuleName, const ResId& _rResId ); + OpenDocumentListBox( Window* _pParent, const sal_Char* _pAsciiModuleName ); String GetSelectedDocumentURL() const; String GetSelectedDocumentFilter() const; diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index f69393d..70b1a2f 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -150,5 +150,13 @@ generic-name="Reference Edit" parent="GtkEntry" icon-name="widget-gtk-textentry"/> + <glade-widget-class title="Open Document ListBox" name="dbaui-OpenDocumentListBox" + generic-name="Open Document ListBox" parent="GtkComboBox" + icon-name="widget-gtk-combobox"/> + + <glade-widget-class title="Open Document Button" name="dbaui-OpenDocumentButton" + generic-name="Open Document Button" parent="GtkButton" + icon-name="widget-gtk-button"/> + </glade-widget-classes> </glade-catalog> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits