summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx8
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx10
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx22
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx16
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.cxx2
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.cxx10
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx8
-rw-r--r--dbaccess/source/ui/dlg/directsql.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx6
10 files changed, 43 insertions, 43 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 8bac6979cff1..9193dbc8533e 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -391,16 +391,16 @@ DBG_NAME(OConnectionHelper)
String OConnectionHelper::impl_getURL( sal_Bool _bPrefix ) const
{
// get the pure text
- String sURL = _bPrefix ? m_aConnectionURL.GetText() : m_aConnectionURL.GetTextNoPrefix();
+ OUString sURL = _bPrefix ? m_aConnectionURL.GetText() : OUString(m_aConnectionURL.GetTextNoPrefix());
OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" );
- if ( m_pCollection && sURL.Len() )
+ if ( m_pCollection && !sURL.isEmpty() )
{
if ( m_pCollection->isFileSystemBased( m_eType ) )
{
// get the two parts: prefix and file URL
- String sTypePrefix, sFileURLDecoded;
+ OUString sTypePrefix, sFileURLDecoded;
if ( _bPrefix )
{
sTypePrefix = m_pCollection->getPrefix( m_eType );
@@ -412,7 +412,7 @@ DBG_NAME(OConnectionHelper)
}
sURL = sTypePrefix;
- if ( sFileURLDecoded.Len() )
+ if ( !sFileURLDecoded.isEmpty() )
{
OFileNotation aFileNotation( sFileURLDecoded, OFileNotation::N_SYSTEM );
sURL += String( aFileNotation.get( OFileNotation::N_URL ) );
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index eb33e8e6f028..2076a1c46311 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -252,7 +252,7 @@ namespace dbaui
m_aJavaDriverLabel.Show(bEnableJDBC);
m_aJavaDriver.Show(bEnableJDBC);
m_aTestJavaDriver.Show(bEnableJDBC);
- m_aTestJavaDriver.Enable( m_aJavaDriver.GetText().Len() != 0);
+ m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().isEmpty() );
m_aFL3.Show(bEnableJDBC);
checkTestConnection();
@@ -291,7 +291,7 @@ namespace dbaui
{
sal_Bool bChangedSomething = sal_False;
- if (m_aUserName.GetText() != m_aUserName.GetSavedValue())
+ if (m_aUserName.GetText() != OUString(m_aUserName.GetSavedValue()))
{
_rSet.Put(SfxStringItem(DSID_USER, m_aUserName.GetText()));
_rSet.Put(SfxStringItem(DSID_PASSWORD, String()));
@@ -316,7 +316,7 @@ namespace dbaui
sal_Bool bSuccess = sal_False;
try
{
- if ( m_aJavaDriver.GetText().Len() )
+ if ( !m_aJavaDriver.GetText().isEmpty() )
{
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( Reference<XMultiServiceFactory>(m_pAdminDialog->getORB()->getServiceManager(), UNO_QUERY_THROW) );
bSuccess = ::connectivity::existsJavaClassByName(xJVM,m_aJavaDriver.GetText());
@@ -338,7 +338,7 @@ namespace dbaui
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC )
- bEnableTestConnection = bEnableTestConnection && (m_aJavaDriver.GetText().Len() != 0);
+ bEnableTestConnection = bEnableTestConnection && (!m_aJavaDriver.GetText().isEmpty());
m_aTestConnection.Enable(bEnableTestConnection);
return true;
}
@@ -346,7 +346,7 @@ namespace dbaui
IMPL_LINK(OConnectionTabPage, OnEditModified, Edit*, _pEdit)
{
if ( _pEdit == &m_aJavaDriver )
- m_aTestJavaDriver.Enable( m_aJavaDriver.GetText().Len() != 0 );
+ m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().isEmpty() );
checkTestConnection();
// tell the listener we were modified
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index f84b37c1b89c..ef5cd570d584 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -182,7 +182,7 @@ DBG_NAME(OTextConnectionPageSetup)
fillString(_rSet,&m_aETBaseDN,DSID_CONN_LDAP_BASEDN, bChangedSomething);
fillInt32(_rSet,&m_aNFPortNumber,DSID_CONN_LDAP_PORTNUMBER,bChangedSomething);
- if ( m_aETHostServer.GetText() != m_aETHostServer.GetSavedValue() )
+ if ( m_aETHostServer.GetText() != OUString(m_aETHostServer.GetSavedValue()) )
{
DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rSet.GetItem(DSID_TYPECOLLECTION));
::dbaccess::ODsnTypeCollection* pCollection = NULL;
@@ -239,7 +239,7 @@ DBG_NAME(OTextConnectionPageSetup)
// -----------------------------------------------------------------------
IMPL_LINK(OLDAPConnectionPageSetup, OnEditModified, Edit*, /*_pEdit*/)
{
- sal_Bool bRoadmapState = ((m_aETHostServer.GetText().Len() != 0 ) && ( m_aETBaseDN.GetText().Len() != 0 ) && (m_aFTPortNumber.GetText().Len() != 0 ));
+ sal_Bool bRoadmapState = ((!m_aETHostServer.GetText().isEmpty() ) && ( !m_aETBaseDN.GetText().isEmpty() ) && (!m_aFTPortNumber.GetText().isEmpty() ));
SetRoadmapStateValue(bRoadmapState);
callModifiedHdl();
return 0L;
@@ -535,14 +535,14 @@ DBG_NAME(OMySQLIntroPageSetup)
OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
// to get the correct value when saveValue was called by base class
- if ( !m_aETDriverClass.GetText().Len() )
+ if ( m_aETDriverClass.GetText().isEmpty() )
{
m_aETDriverClass.SetText(m_sDefaultJdbcDriverName);
m_aETDriverClass.SetModifyFlag();
}
callModifiedHdl();
- sal_Bool bRoadmapState = ((m_aETDatabasename.GetText().Len() != 0 ) && ( m_aETHostname.GetText().Len() != 0 ) && (m_aNFPortNumber.GetText().Len() != 0 ) && ( m_aETDriverClass.GetText().Len() != 0 ));
+ sal_Bool bRoadmapState = ((!m_aETDatabasename.GetText().isEmpty() ) && (!m_aETHostname.GetText().isEmpty()) && (!m_aNFPortNumber.GetText().isEmpty() ) && ( !m_aETDriverClass.GetText().isEmpty() ));
SetRoadmapStateValue(bRoadmapState);
}
@@ -554,7 +554,7 @@ DBG_NAME(OMySQLIntroPageSetup)
sal_Bool bSuccess = sal_False;
try
{
- if ( m_aETDriverClass.GetText().Len() )
+ if ( !m_aETDriverClass.GetText().isEmpty() )
{
// TODO change jvmaccess
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( uno::Reference<lang::XMultiServiceFactory>(m_pAdminDialog->getORB()->getServiceManager(), uno::UNO_QUERY_THROW) );
@@ -576,8 +576,8 @@ DBG_NAME(OMySQLIntroPageSetup)
IMPL_LINK(OGeneralSpecialJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit)
{
if ( _pEdit == &m_aETDriverClass )
- m_aPBTestJavaDriver.Enable( m_aETDriverClass.GetText().Len() != 0 );
- sal_Bool bRoadmapState = ((m_aETDatabasename.GetText().Len() != 0 ) && ( m_aETHostname.GetText().Len() != 0 ) && (m_aNFPortNumber.GetText().Len() != 0 ) && ( m_aETDriverClass.GetText().Len() != 0 ));
+ m_aPBTestJavaDriver.Enable( !m_aETDriverClass.GetText().isEmpty() );
+ sal_Bool bRoadmapState = ((!m_aETDatabasename.GetText().isEmpty() ) && ( !m_aETHostname.GetText().isEmpty() ) && (!m_aNFPortNumber.GetText().isEmpty() ) && ( !m_aETDriverClass.GetText().isEmpty() ));
SetRoadmapStateValue(bRoadmapState);
callModifiedHdl();
return 0L;
@@ -662,7 +662,7 @@ DBG_NAME(OMySQLIntroPageSetup)
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
- bEnableTestConnection = bEnableTestConnection && (m_aETDriverClass.GetText().Len() != 0);
+ bEnableTestConnection = bEnableTestConnection && (!m_aETDriverClass.GetText().isEmpty());
return bEnableTestConnection;
}
@@ -674,7 +674,7 @@ DBG_NAME(OMySQLIntroPageSetup)
sal_Bool bSuccess = sal_False;
try
{
- if ( m_aETDriverClass.GetText().Len() )
+ if ( !m_aETDriverClass.GetText().isEmpty() )
{
// TODO change jvmaccess
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( uno::Reference<lang::XMultiServiceFactory>(m_pAdminDialog->getORB()->getServiceManager(), uno::UNO_QUERY_THROW) );
@@ -695,7 +695,7 @@ DBG_NAME(OMySQLIntroPageSetup)
IMPL_LINK(OJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit)
{
if ( _pEdit == &m_aETDriverClass )
- m_aPBTestJavaDriver.Enable( m_aETDriverClass.GetText().Len() != 0 );
+ m_aPBTestJavaDriver.Enable( !m_aETDriverClass.GetText().isEmpty() );
SetRoadmapStateValue(checkTestConnection());
// tell the listener we were modified
callModifiedHdl();
@@ -825,7 +825,7 @@ DBG_NAME(OAuthentificationPageSetup)
{
sal_Bool bChangedSomething = sal_False;
- if (m_aETUserName.GetText() != m_aETUserName.GetSavedValue())
+ if (m_aETUserName.GetText() != OUString(m_aETUserName.GetSavedValue()))
{
_rSet.Put(SfxStringItem(DSID_USER, m_aETUserName.GetText()));
_rSet.Put(SfxStringItem(DSID_PASSWORD, String()));
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index ff38363b20f5..f979b51d4a14 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -300,7 +300,7 @@ DBG_NAME(OTextConnectionHelper)
aErrorText.SearchAndReplaceAscii("#1",m_aFieldSeparatorLabel.GetText());
pErrorWin = &m_aFieldSeparator;
}
- else if (!m_aDecimalSeparator.GetText().Len())
+ else if (m_aDecimalSeparator.GetText().isEmpty())
{ // No DecimalSeparator
aErrorText = String(ModuleRes(STR_AUTODELIMITER_MISSING));
aErrorText.SearchAndReplaceAscii("#1",m_aDecimalSeparatorLabel.GetText());
@@ -386,25 +386,25 @@ DBG_NAME(OTextConnectionHelper)
if ( ( m_nAvailableSections & TC_SEPARATORS ) != 0 )
{
- if( m_aFieldSeparator.GetText() != m_aFieldSeparator.GetSavedValue() )
+ if( m_aFieldSeparator.GetText() != OUString(m_aFieldSeparator.GetSavedValue()) )
{
rSet.Put( SfxStringItem(DSID_FIELDDELIMITER, GetSeparator( m_aFieldSeparator, m_aFieldSeparatorList) ) );
bChangedSomething = sal_True;
}
- if( m_aTextSeparator.GetText() != m_aTextSeparator.GetSavedValue() )
+ if( m_aTextSeparator.GetText() != OUString(m_aTextSeparator.GetSavedValue()) )
{
rSet.Put( SfxStringItem(DSID_TEXTDELIMITER, GetSeparator( m_aTextSeparator, m_aTextSeparatorList) ) );
bChangedSomething = sal_True;
}
- if( m_aDecimalSeparator.GetText() != m_aDecimalSeparator.GetSavedValue() )
+ if( m_aDecimalSeparator.GetText() != OUString(m_aDecimalSeparator.GetSavedValue()) )
{
- rSet.Put( SfxStringItem(DSID_DECIMALDELIMITER, m_aDecimalSeparator.GetText().Copy(0, 1) ) );
+ rSet.Put( SfxStringItem(DSID_DECIMALDELIMITER, m_aDecimalSeparator.GetText().copy(0, 1) ) );
bChangedSomething = sal_True;
}
- if( m_aThousandsSeparator.GetText() != m_aThousandsSeparator.GetSavedValue() )
+ if( m_aThousandsSeparator.GetText() != OUString(m_aThousandsSeparator.GetSavedValue()) )
{
- rSet.Put( SfxStringItem(DSID_THOUSANDSDELIMITER, m_aThousandsSeparator.GetText().Copy(0,1) ) );
+ rSet.Put( SfxStringItem(DSID_THOUSANDSDELIMITER, m_aThousandsSeparator.GetText().copy(0,1) ) );
bChangedSomething = sal_True;
}
}
@@ -453,7 +453,7 @@ DBG_NAME(OTextConnectionHelper)
xub_StrLen nPos(rBox.GetEntryPos( rBox.GetText() ));
if( nPos == COMBOBOX_ENTRY_NOTFOUND )
- return rBox.GetText().Copy(0);
+ return rBox.GetText().copy(0);
if ( !( &m_aTextSeparator == &rBox && nPos == (rBox.GetEntryCount()-1) ) )
return rtl::OUString(
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index a79399a009fc..a0d074e87aa9 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -122,7 +122,7 @@ IMPL_LINK_NOARG(OPasswordDialog, OKHdl_Impl)
// -----------------------------------------------------------------------------
IMPL_LINK( OPasswordDialog, ModifiedHdl, Edit *, pEdit )
{
- aOKBtn.Enable(pEdit->GetText().Len() != 0);
+ aOKBtn.Enable(!pEdit->GetText().isEmpty());
return 0;
}
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index 097cde222c66..250a431d6f86 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -272,23 +272,23 @@ namespace dbaui
//--------------------------------------------------------------------
bool MySQLNativeSettings::canAdvance() const
{
- if ( m_aDatabaseName.GetText().Len() == 0 )
+ if ( m_aDatabaseName.GetText().isEmpty() )
return false;
if ( m_aHostPortRadio.IsChecked()
- && ( ( m_aHostName.GetText().Len() == 0 )
- || ( m_aPort.GetText().Len() == 0 )
+ && ( ( m_aHostName.GetText().isEmpty() )
+ || ( m_aPort.GetText().isEmpty() )
)
)
return false;
#ifdef UNX
if ( ( m_aSocketRadio.IsChecked() )
- && ( m_aSocket.GetText().Len() == 0 )
+ && ( m_aSocket.GetText().isEmpty() )
)
#else
if ( ( m_aNamedPipeRadio.IsChecked() )
- && ( m_aNamedPipe.GetText().Len() == 0 )
+ && ( m_aNamedPipe.GetText().isEmpty() )
)
#endif
return false;
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index f0e4af33ac97..fcdb61c091c8 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -237,7 +237,7 @@ namespace dbaui
// -----------------------------------------------------------------------
void OGenericAdministrationPage::fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething)
{
- if( (_pEdit != NULL) && (_pEdit->GetText() != _pEdit->GetSavedValue()) )
+ if( (_pEdit != NULL) && (_pEdit->GetText() != OUString(_pEdit->GetSavedValue())) )
{
_rSet.Put(SfxStringItem(_nID, _pEdit->GetText()));
_bChangedSomething = sal_True;
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index ff3e679c97da..45831a6d99c9 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -609,7 +609,7 @@ namespace dbaui
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
// to get the correcxt value when saveValue was called by base class
- if ( m_bUseClass && !m_aEDDriverClass.GetText().Len() )
+ if ( m_bUseClass && m_aEDDriverClass.GetText().isEmpty() )
{
m_aEDDriverClass.SetText(m_sDefaultJdbcDriverName);
m_aEDDriverClass.SetModifyFlag();
@@ -624,7 +624,7 @@ namespace dbaui
sal_Bool bSuccess = sal_False;
try
{
- if ( m_aEDDriverClass.GetText().Len() )
+ if ( !m_aEDDriverClass.GetText().isEmpty() )
{
// TODO change jvmaccess
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( Reference<XMultiServiceFactory>(m_pAdminDialog->getORB()->getServiceManager(), UNO_QUERY_THROW) );
@@ -645,7 +645,7 @@ namespace dbaui
IMPL_LINK(OGeneralSpecialJDBCDetailsPage, OnEditModified, Edit*, _pEdit)
{
if ( m_bUseClass && _pEdit == &m_aEDDriverClass )
- m_aTestJavaDriver.Enable( m_aEDDriverClass.GetText().Len() != 0 );
+ m_aTestJavaDriver.Enable( !m_aEDDriverClass.GetText().isEmpty() );
// tell the listener we were modified
callModifiedHdl();
@@ -705,7 +705,7 @@ namespace dbaui
bChangedSomething |= m_aMySQLSettings.FillItemSet( _rSet );
- if ( m_aUserName.GetText() != m_aUserName.GetSavedValue() )
+ if ( m_aUserName.GetText() != OUString(m_aUserName.GetSavedValue()) )
{
_rSet.Put( SfxStringItem( DSID_USER, m_aUserName.GetText() ) );
_rSet.Put( SfxStringItem( DSID_PASSWORD, String()));
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index 2f57720b2591..9ce1968fed68 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -356,7 +356,7 @@ DBG_NAME(DirectSQLDialog)
//--------------------------------------------------------------------
IMPL_LINK( DirectSQLDialog, OnStatementModified, void*, /*NOTINTERESTEDIN*/ )
{
- m_aExecute.Enable(0 != m_aSQL.GetText().Len());
+ m_aExecute.Enable(!m_aSQL.GetText().isEmpty());
return 0L;
}
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index b3258add6b31..bcb599f97952 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -355,7 +355,7 @@ IMPL_LINK(OSaveAsDlg, ButtonClickHdl, Button *, pButton)
IMPL_LINK(OSaveAsDlg, EditModifyHdl, Edit *, pEdit )
{
if (pEdit == &m_pImpl->m_aTitle)
- m_pImpl->m_aPB_OK.Enable(0 != m_pImpl->m_aTitle.GetText().Len());
+ m_pImpl->m_aPB_OK.Enable(!m_pImpl->m_aTitle.GetText().isEmpty());
return 0;
}
// -----------------------------------------------------------------------------
@@ -429,7 +429,7 @@ void OSaveAsDlg::implInit()
}
// -----------------------------------------------------------------------------
String OSaveAsDlg::getName() const { return m_pImpl->m_aName; }
-String OSaveAsDlg::getCatalog() const { return m_pImpl->m_aCatalog.IsVisible() ? m_pImpl->m_aCatalog.GetText() : String(); }
-String OSaveAsDlg::getSchema() const { return m_pImpl->m_aSchema.IsVisible() ? m_pImpl->m_aSchema.GetText() : String(); }
+String OSaveAsDlg::getCatalog() const { return m_pImpl->m_aCatalog.IsVisible() ? m_pImpl->m_aCatalog.GetText() : OUString(); }
+String OSaveAsDlg::getSchema() const { return m_pImpl->m_aSchema.IsVisible() ? m_pImpl->m_aSchema.GetText() : OUString(); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */