summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2015-03-05 23:15:26 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2015-03-06 11:13:48 +0000
commit8ace7ee616e7a38f7c626a74e680b928832c78df (patch)
tree2697b4daed91c60be13079599ff2c518d00ed4c9 /dbaccess
parentce8aba4da2a287c2b51d1d34a290284b2f754dc2 (diff)
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@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/control/curledit.cxx15
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx1
-rw-r--r--dbaccess/source/ui/inc/curledit.hxx1
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 0c404dc12b0e..a2f827832bb4 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 dc1a42986116..f3a0dca42090 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