Kaydet (Commit) 1ac9985a authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Lionel Elie Mamane

tdf#89391 : Datasource URL in Database Properties window cannot be viewed

Change-Id: Ia3e978e3fd9c0ce19ec679c41d40a34338147c37
Reviewed-on: https://gerrit.libreoffice.org/14766Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
Tested-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
üst d9101e94
...@@ -67,6 +67,21 @@ void OConnectionURLEdit::SetText(const OUString& _rStr) ...@@ -67,6 +67,21 @@ void OConnectionURLEdit::SetText(const OUString& _rStr)
SetText(_rStr, aNoSelection); 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*/) void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/)
{ {
// create new sub controls, if necessary // create new sub controls, if necessary
......
...@@ -127,6 +127,7 @@ namespace dbaui ...@@ -127,6 +127,7 @@ namespace dbaui
m_pFT_Connection->Show(); m_pFT_Connection->Show();
m_pConnectionURL->Show(); m_pConnectionURL->Show();
m_pConnectionURL->Resize();
m_pConnectionURL->ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) ); m_pConnectionURL->ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) );
bool bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType ); bool bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType );
......
...@@ -49,6 +49,7 @@ public: ...@@ -49,6 +49,7 @@ public:
virtual void SetText(const OUString& _rStr) SAL_OVERRIDE; virtual void SetText(const OUString& _rStr) SAL_OVERRIDE;
virtual void SetText(const OUString& _rStr, const Selection& _rNewSelection) SAL_OVERRIDE; virtual void SetText(const OUString& _rStr, const Selection& _rNewSelection) SAL_OVERRIDE;
virtual OUString GetText() const SAL_OVERRIDE; virtual OUString GetText() const SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
/** Showsthe Prefix /** Showsthe Prefix
@param _bShowPrefix @param _bShowPrefix
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment