diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/curledit.cxx | 15 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/curledit.hxx | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index 22d8241448ca..4dc9d7fffb52 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -67,6 +67,21 @@ void OConnectionURLEdit::SetText(const OUString& _rStr) SetText(_rStr, aNoSelection); } +void OConnectionURLEdit::Resize() +{ + if (GetSubEdit()) + { + Size aMySize = GetSizePixel(); + sal_Int32 nTextWidth = 0; + if ( m_pForcedPrefix && m_bShowPrefix) + { + nTextWidth = m_pForcedPrefix->GetTextWidth(m_pForcedPrefix->GetText()) + 2; + m_pForcedPrefix->SetPosSizePixel(Point(0, -2), Size(nTextWidth, aMySize.Height())); + } + GetSubEdit()->SetPosSizePixel(Point(nTextWidth, -2), Size(aMySize.Width() - nTextWidth - 4, aMySize.Height())); + } +} + void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/) { // create new sub controls, if necessary diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 7649be117a50..eeb3bd442440 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -127,6 +127,7 @@ namespace dbaui m_pFT_Connection->Show(); m_pConnectionURL->Show(); + m_pConnectionURL->Resize(); m_pConnectionURL->ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) ); bool bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType ); diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx index a08bcf038287..cb9201328ada 100644 --- a/dbaccess/source/ui/inc/curledit.hxx +++ b/dbaccess/source/ui/inc/curledit.hxx @@ -49,6 +49,7 @@ public: virtual void SetText(const OUString& _rStr) SAL_OVERRIDE; virtual void SetText(const OUString& _rStr, const Selection& _rNewSelection) SAL_OVERRIDE; virtual OUString GetText() const SAL_OVERRIDE; + virtual void Resize() SAL_OVERRIDE; /** Showsthe Prefix @param _bShowPrefix |