diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2015-03-05 23:15:26 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2015-03-06 11:11:56 +0000 |
commit | 1ac9985ade97f91869a11ce45231ffd6a5440959 (patch) | |
tree | 3f93ee6322101a7a64ae3f9969662d2a811262e5 /dbaccess | |
parent | d9101e9416d9a285028ccb74895f6ba3964cce46 (diff) |
tdf#89391 : Datasource URL in Database Properties window cannot be viewed
Change-Id: Ia3e978e3fd9c0ce19ec679c41d40a34338147c37
Reviewed-on: https://gerrit.libreoffice.org/14766
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
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 |