dbaccess/source/ui/control/curledit.cxx | 15 +++++++++++++++ dbaccess/source/ui/dlg/ConnectionHelper.cxx | 1 + dbaccess/source/ui/inc/curledit.hxx | 1 + 3 files changed, 17 insertions(+)
New commits: commit 1ac9985ade97f91869a11ce45231ffd6a5440959 Author: Szymon KÅos <eszka...@gmail.com> Date: Thu Mar 5 23:15:26 2015 +0100 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 <lio...@mamane.lu> Tested-by: Lionel Elie Mamane <lio...@mamane.lu> diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index 22d8241..4dc9d7f 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 7649be1..eeb3bd4 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 a08bcf0..cb92013 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
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits