summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/control/curledit.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/control/curledit.cxx')
-rw-r--r--dbaccess/source/ui/control/curledit.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx
index 8dc6cd76abb8..02bddf81ac67 100644
--- a/dbaccess/source/ui/control/curledit.cxx
+++ b/dbaccess/source/ui/control/curledit.cxx
@@ -48,6 +48,7 @@ namespace dbaui
//=========================================================================
OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,BOOL _bShowPrefix)
:Edit(_pParent, _rResId)
+ ,m_pTypeCollection(NULL)
,m_pForcedPrefix(NULL)
,m_bShowPrefix(_bShowPrefix)
{
@@ -111,13 +112,7 @@ void OConnectionURLEdit::SetText(const String& _rStr, const Selection& /*_rNewSe
if (!bIsEmpty)
{
// determine the type of the new URL described by the new text
- ::dbaccess::DATASOURCE_TYPE eType = m_aTypeCollection.getType(_rStr);
- // and the prefix belonging to this type
- if ( ::dbaccess::DST_UNKNOWN != eType)
- sPrefix = m_aTypeCollection.getDatasourcePrefix(eType);
- else {
- DBG_ERROR("OConnectionURLEdit::SetText : the new text is no valid connection URL!");
- }
+ sPrefix = m_pTypeCollection->getPrefix(_rStr);
}
// the fixed text gets the prefix
@@ -139,10 +134,10 @@ void OConnectionURLEdit::SetText(const String& _rStr, const Selection& /*_rNewSe
GetSubEdit()->Show();
// do the real SetTex
-// Edit::SetText(bIsEmpty ? _rStr : m_aTypeCollection.cutPrefix(_rStr), _rNewSelection);
+// Edit::SetText(bIsEmpty ? _rStr : m_pTypeCollection->cutPrefix(_rStr), _rNewSelection);
String sNewText( _rStr );
if ( !bIsEmpty )
- sNewText =m_aTypeCollection.cutPrefix( _rStr );
+ sNewText = m_pTypeCollection->cutPrefix( _rStr );
Edit::SetText( sNewText );
}