diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2014-06-28 17:24:10 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-02 11:26:20 +0000 |
commit | bcdd1f3179ab6f4ae72c6ac5b82f7fb4d2e54c16 (patch) | |
tree | c3db9a3822311ee34e3d65a8eaa27281e6582ff2 /dbaccess/source/ui/dlg/ConnectionPage.cxx | |
parent | e9dd058ccd0de193cdbc9ae8638f603569249c5e (diff) |
fdo#68341 Remove space of java class when testing class
When user hit "Test class" it trims the string
User should test class name before going next step
Change-Id: Ic4aa6cb4b821f156cf0ec8c0c09a27db8bd6d51c
Reviewed-on: https://gerrit.libreoffice.org/9953
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/dlg/ConnectionPage.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionPage.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index a3eb7543ae6b..ddb1a7672820 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -246,7 +246,7 @@ namespace dbaui m_aJavaDriverLabel.Show(bEnableJDBC); m_aJavaDriver.Show(bEnableJDBC); m_aTestJavaDriver.Show(bEnableJDBC); - m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().isEmpty() ); + m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().trim().isEmpty() ); m_aFL3.Show(bEnableJDBC); checkTestConnection(); @@ -307,10 +307,11 @@ namespace dbaui #if HAVE_FEATURE_JAVA try { - if ( !m_aJavaDriver.GetText().isEmpty() ) + if ( !m_aJavaDriver.GetText().trim().isEmpty() ) { ::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( m_pAdminDialog->getORB() ); - bSuccess = ::connectivity::existsJavaClassByName(xJVM,m_aJavaDriver.GetText()); + m_aJavaDriver.SetText(m_aJavaDriver.GetText().trim()); // fdo#68341 + bSuccess = ::connectivity::existsJavaClassByName(xJVM,m_aJavaDriver.GetText().trim()); } } catch(Exception&) @@ -329,14 +330,14 @@ namespace dbaui OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty(); if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC ) - bEnableTestConnection = bEnableTestConnection && (!m_aJavaDriver.GetText().isEmpty()); + bEnableTestConnection = bEnableTestConnection && (!m_aJavaDriver.GetText().trim().isEmpty()); m_aTestConnection.Enable(bEnableTestConnection); return true; } IMPL_LINK(OConnectionTabPage, OnEditModified, Edit*, _pEdit) { if ( _pEdit == &m_aJavaDriver ) - m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().isEmpty() ); + m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().trim().isEmpty() ); checkTestConnection(); // tell the listener we were modified |