diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-12 08:29:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-12 12:57:22 +0200 |
commit | c45bc08dc6e64352e11cf632b8ad868c312a62fe (patch) | |
tree | 4b665726f2a4ffb556e51915dcc5e2515c21d1b7 /dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | |
parent | 08495e24e899c2fd52b9724d993598189e12fc7e (diff) |
loplugin:stringview whitelist getLength and isEmpty
Change-Id: I38f3410c0b25ff579879b9de1f266af4d8fd51e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150256
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 299dfa6b34cb..a5041ae2af12 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -448,7 +448,7 @@ using namespace ::com::sun::star; OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); // to get the correct value when saveValue was called by base class - if ( m_xETDriverClass->get_text().trim().isEmpty() ) + if ( o3tl::trim(m_xETDriverClass->get_text()).empty() ) { m_xETDriverClass->set_text(m_sDefaultJdbcDriverName); m_xETDriverClass->save_value(); @@ -467,7 +467,7 @@ using namespace ::com::sun::star; #if HAVE_FEATURE_JAVA try { - if ( !m_xETDriverClass->get_text().trim().isEmpty() ) + if ( !o3tl::trim(m_xETDriverClass->get_text()).empty() ) { // TODO change jvmaccess ::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( m_pAdminDialog->getORB() ); @@ -488,8 +488,8 @@ using namespace ::com::sun::star; void OGeneralSpecialJDBCConnectionPageSetup::callModifiedHdl(weld::Widget* pControl) { if (pControl == m_xETDriverClass.get()) - m_xPBTestJavaDriver->set_sensitive( !m_xETDriverClass->get_text().trim().isEmpty() ); - bool bRoadmapState = ((!m_xETDatabasename->get_text().isEmpty() ) && ( !m_xETHostname->get_text().isEmpty() ) && (!m_xNFPortNumber->get_text().isEmpty() ) && ( !m_xETDriverClass->get_text().trim().isEmpty() )); + m_xPBTestJavaDriver->set_sensitive( !o3tl::trim(m_xETDriverClass->get_text()).empty() ); + bool bRoadmapState = ((!m_xETDatabasename->get_text().isEmpty() ) && ( !m_xETHostname->get_text().isEmpty() ) && (!m_xNFPortNumber->get_text().isEmpty() ) && ( !o3tl::trim(m_xETDriverClass->get_text()).empty() )); SetRoadmapStateValue(bRoadmapState); OGenericAdministrationPage::callModifiedHdl(); } |