summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-15 10:35:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-15 10:38:00 +0100
commit8d124bc49a3b89705763e81e0acc2335f6e090f7 (patch)
tree9474714ea0f079250b7f825c9b53abf2003e64e0 /svtools
parentca09d2df977d473341546882cf48c70ebd322d42 (diff)
make SvtURLBox ui buildable
Change-Id: I13a917c84678d4dc5a0e6dae80a1a494909ca1d3
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/inettbc.hxx9
-rw-r--r--svtools/source/control/inettbc.cxx30
2 files changed, 25 insertions, 14 deletions
diff --git a/svtools/inc/svtools/inettbc.hxx b/svtools/inc/svtools/inettbc.hxx
index c4419de5b4eb..a8e85eaf7647 100644
--- a/svtools/inc/svtools/inettbc.hxx
+++ b/svtools/inc/svtools/inettbc.hxx
@@ -51,8 +51,7 @@ friend class SvtURLBox_Impl;
SVT_DLLPRIVATE void TryAutoComplete();
SVT_DLLPRIVATE void UpdatePicklistForSmartProtocol_Impl();
DECL_DLLPRIVATE_LINK( AutoCompleteHdl_Impl, void* );
- using Window::ImplInit;
- SVT_DLLPRIVATE void ImplInit();
+ SVT_DLLPRIVATE void Init(bool bSetDefaultHelpID);
protected:
virtual long Notify( NotifyEvent& rNEvt );
@@ -61,9 +60,9 @@ protected:
virtual long PreNotify( NotifyEvent& rNEvt );
public:
- SvtURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_NOT_VALID );
- SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart = INET_PROT_NOT_VALID );
- SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart = INET_PROT_NOT_VALID );
+ SvtURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_NOT_VALID, bool bSetDefaultHelpID = true );
+ SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart = INET_PROT_NOT_VALID, bool bSetDefaultHelpID = true );
+ SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart = INET_PROT_NOT_VALID, bool bSetDefaultHelpID = true );
~SvtURLBox();
void SetBaseURL( const String& rURL );
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index c7779c5702d1..2859c10b1c10 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -41,10 +41,11 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <rtl/instance.hxx>
-#include <vcl/toolbox.hxx>
#include <salhelper/thread.hxx>
#include <osl/mutex.hxx>
+#include <vcl/builder.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/toolbox.hxx>
#include <unotools/historyoptions.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
@@ -843,7 +844,7 @@ void SvtURLBox::TryAutoComplete()
}
//-------------------------------------------------------------------------
-SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart )
+SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart, bool bSetDefaultHelpID )
: ComboBox( pParent , WB_DROPDOWN | WB_AUTOSIZE | WB_AUTOHSCROLL ),
eSmartProtocol( eSmart ),
bAutoCompleteMode( sal_False ),
@@ -853,7 +854,7 @@ SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart )
bNoSelection( sal_False ),
bIsAutoCompleteEnabled( sal_True )
{
- ImplInit();
+ Init(bSetDefaultHelpID);
if ( GetDesktopRectPixel().GetWidth() > 800 )
SetSizePixel( Size( 300, 240 ) );
@@ -862,7 +863,8 @@ SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart )
}
//-------------------------------------------------------------------------
-SvtURLBox::SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart )
+SvtURLBox::SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart,
+ bool bSetDefaultHelpID )
: ComboBox( pParent, _nStyle ),
eSmartProtocol( eSmart ),
bAutoCompleteMode( sal_False ),
@@ -872,11 +874,21 @@ SvtURLBox::SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart )
bNoSelection( sal_False ),
bIsAutoCompleteEnabled( sal_True )
{
- ImplInit();
+ Init(bSetDefaultHelpID);
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvtURLBox(Window *pParent, VclBuilder::stringmap &)
+{
+ WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP|
+ WB_DROPDOWN|WB_AUTOSIZE|WB_AUTOHSCROLL;
+ SvtURLBox* pListBox = new SvtURLBox(pParent, nWinBits, INET_PROT_NOT_VALID, false);
+ pListBox->EnableAutoSize(true);
+ return pListBox;
}
//-------------------------------------------------------------------------
-SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart )
+SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart,
+ bool bSetDefaultHelpID )
: ComboBox( pParent , _rResId ),
eSmartProtocol( eSmart ),
bAutoCompleteMode( sal_False ),
@@ -886,14 +898,14 @@ SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart
bNoSelection( sal_False ),
bIsAutoCompleteEnabled( sal_True )
{
- ImplInit();
+ Init(bSetDefaultHelpID);
}
-void SvtURLBox::ImplInit()
+void SvtURLBox::Init(bool bSetDefaultHelpID)
{
pImp = new SvtURLBox_Impl();
- if ( GetHelpId().getLength() == 0 )
+ if (bSetDefaultHelpID && GetHelpId().isEmpty())
SetHelpId( ".uno:OpenURL" );
EnableAutocomplete( sal_False );