[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - dbaccess/source

Szymon Kłos eszkadev at gmail.com
Fri Mar 6 03:14:08 PST 2015


 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 8ace7ee616e7a38f7c626a74e680b928832c78df
Author: Szymon Kłos <eszkadev at 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
    (cherry picked from commit 1ac9985ade97f91869a11ce45231ffd6a5440959)
    Reviewed-on: https://gerrit.libreoffice.org/14768
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    Tested-by: Lionel Elie Mamane <lionel at 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 0c404dc..a2f8278 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 dc1a429..f3a0dca 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


More information about the Libreoffice-commits mailing list