Kaydet (Commit) 37998808 authored tarafından Mathias Hasselmann's avatar Mathias Hasselmann Kaydeden (comit) Fridrich Strba

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/2886Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
Reviewed-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
Tested-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
üst d72b4106
......@@ -38,6 +38,7 @@
#include <tools/urlobj.hxx>
#include <svl/filenotation.hxx>
#include <osl/diagnose.h>
#include <vcl/builder.hxx>
//........................................................................
namespace dbaui
......@@ -167,6 +168,19 @@ namespace dbaui
impl_init( _pAsciiModuleName );
}
//--------------------------------------------------------------------
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 )
{
......@@ -197,6 +211,19 @@ namespace dbaui
impl_init( _pAsciiModuleName );
}
//--------------------------------------------------------------------
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 )
{
......
......@@ -77,6 +77,19 @@ namespace dbaui
SetExchangeSupport(sal_True);
}
//-------------------------------------------------------------------------
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()
{
......
......@@ -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
......
......@@ -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;
......
......@@ -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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment