From e3f11c10d8cc759d01afa4b8fd8bd98c81a03119 Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Mon, 21 Jan 2013 14:32:09 +0100 Subject: Changed SetText() / GetText() to take/return OUString replaced lots of Len() with isEmpty() Change-Id: I6b82d48245ee2a0782e05a326f7934e9357227d0 Reviewed-on: https://gerrit.libreoffice.org/1795 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- .../ext/macromigration/macromigrationpages.cxx | 4 ++-- dbaccess/source/ui/control/curledit.cxx | 8 ++++---- dbaccess/source/ui/control/sqledit.cxx | 2 +- dbaccess/source/ui/dlg/ConnectionHelper.cxx | 8 ++++---- dbaccess/source/ui/dlg/ConnectionPage.cxx | 10 +++++----- dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 22 +++++++++++----------- dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 16 ++++++++-------- dbaccess/source/ui/dlg/UserAdmin.cxx | 2 +- dbaccess/source/ui/dlg/admincontrols.cxx | 10 +++++----- dbaccess/source/ui/dlg/adminpages.cxx | 2 +- dbaccess/source/ui/dlg/detailpages.cxx | 8 ++++---- dbaccess/source/ui/dlg/directsql.cxx | 2 +- dbaccess/source/ui/dlg/dlgsave.cxx | 6 +++--- dbaccess/source/ui/inc/FieldControls.hxx | 6 +++--- dbaccess/source/ui/inc/curledit.hxx | 6 +++--- dbaccess/source/ui/inc/sqledit.hxx | 2 +- dbaccess/source/ui/misc/WCPage.cxx | 2 +- dbaccess/source/ui/misc/WTypeSelect.cxx | 2 +- 18 files changed, 59 insertions(+), 59 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx index 0bd39fe8f1ef..18ae6c65d725 100644 --- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx @@ -131,7 +131,7 @@ namespace dbmm void SaveDBDocPage::impl_updateLocationDependentItems() { updateDialogTravelUI(); - m_aStartMigration.Show( m_aSaveAsLocation.GetText().Len() > 0 ); + m_aStartMigration.Show( !m_aSaveAsLocation.GetText().isEmpty() ); } //-------------------------------------------------------------------- @@ -172,7 +172,7 @@ namespace dbmm if ( !MacroMigrationPage::canAdvance() ) return false; - return m_aSaveAsLocation.GetText().Len() > 0; + return !m_aSaveAsLocation.GetText().isEmpty(); } //-------------------------------------------------------------------- diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index be08a4104981..9ed5523e1552 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -67,14 +67,14 @@ String OConnectionURLEdit::GetTextNoPrefix() const } //------------------------------------------------------------------------- -void OConnectionURLEdit::SetText(const String& _rStr) +void OConnectionURLEdit::SetText(const OUString& _rStr) { Selection aNoSelection(0,0); SetText(_rStr, aNoSelection); } //------------------------------------------------------------------------- -void OConnectionURLEdit::SetText(const String& _rStr, const Selection& /*_rNewSelection*/) +void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/) { // create new sub controls, if necessary if (!GetSubEdit()) @@ -90,7 +90,7 @@ void OConnectionURLEdit::SetText(const String& _rStr, const Selection& /*_rNewSe m_pForcedPrefix->Show(m_bShowPrefix); - sal_Bool bIsEmpty = 0 == _rStr.Len(); + sal_Bool bIsEmpty = _rStr.isEmpty(); // calc the prefix String sPrefix; if (!bIsEmpty) @@ -126,7 +126,7 @@ void OConnectionURLEdit::SetText(const String& _rStr, const Selection& /*_rNewSe } //------------------------------------------------------------------------- -String OConnectionURLEdit::GetText() const +OUString OConnectionURLEdit::GetText() const { if ( m_pForcedPrefix ) return m_pForcedPrefix->GetText() += Edit::GetText(); diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 4154c280e403..feee0a084aab 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -204,7 +204,7 @@ IMPL_LINK(OSqlEdit, ModifyHdl, void*, /*EMPTYTAG*/) return 0; } -void OSqlEdit::SetText(const String& rNewText) +void OSqlEdit::SetText(const OUString& rNewText) { DBG_CHKTHIS(OSqlEdit,NULL); if (m_timerUndoActionCreation.IsActive()) 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(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(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(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(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: */ diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx index c571a111c8ca..2e1087836888 100644 --- a/dbaccess/source/ui/inc/FieldControls.hxx +++ b/dbaccess/source/ui/inc/FieldControls.hxx @@ -48,7 +48,7 @@ namespace dbaui public: inline OPropColumnEditCtrl(Window* pParent, ::rtl::OUString& _rAllowedChars, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0); - inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); } + inline sal_Bool IsModified() const { return GetText() != OUString(GetSavedValue()); } short GetPos() const { return m_nPos; } String GetHelp() const { return m_strHelpText; } @@ -80,7 +80,7 @@ namespace dbaui inline OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0); inline OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1); - inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); } + inline sal_Bool IsModified() const { return GetText() != OUString(GetSavedValue()); } short GetPos() const { return m_nPos; } String GetHelp() const { return m_strHelpText; } @@ -115,7 +115,7 @@ namespace dbaui inline OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0); inline OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1); - inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); } + inline sal_Bool IsModified() const { return GetText() != OUString(GetSavedValue()); } short GetPos() const { return m_nPos; } String GetHelp() const { return m_strHelpText; } diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx index 522a1e880eef..981d790b8dc4 100644 --- a/dbaccess/source/ui/inc/curledit.hxx +++ b/dbaccess/source/ui/inc/curledit.hxx @@ -51,9 +51,9 @@ public: public: // Edit overridables - virtual void SetText(const String& _rStr); - virtual void SetText(const String& _rStr, const Selection& _rNewSelection); - virtual String GetText() const; + virtual void SetText(const OUString& _rStr); + virtual void SetText(const OUString& _rStr, const Selection& _rNewSelection); + virtual OUString GetText() const; /** Showsthe Prefix diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx index a4ac1a39f523..50a5dcb60860 100644 --- a/dbaccess/source/ui/inc/sqledit.hxx +++ b/dbaccess/source/ui/inc/sqledit.hxx @@ -70,7 +70,7 @@ namespace dbaui virtual ~OSqlEdit(); // Edit overridables - virtual void SetText(const String& rNewText); + virtual void SetText(const OUString& rNewText); using MultiLineEditSyntaxHighlight::SetText; // own functionality diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx index 6e16280bbd99..5205c7ece933 100644 --- a/dbaccess/source/ui/misc/WCPage.cxx +++ b/dbaccess/source/ui/misc/WCPage.cxx @@ -167,7 +167,7 @@ sal_Bool OCopyTable::LeavePage() { DBG_CHKTHIS(OCopyTable,NULL); m_pParent->m_bCreatePrimaryKeyColumn = (m_bPKeyAllowed && m_aCB_PrimaryColumn.IsEnabled()) ? m_aCB_PrimaryColumn.IsChecked() : sal_False; - m_pParent->m_aKeyName = m_pParent->m_bCreatePrimaryKeyColumn ? m_edKeyName.GetText() : String(); + m_pParent->m_aKeyName = m_pParent->m_bCreatePrimaryKeyColumn ? m_edKeyName.GetText() : OUString(); m_pParent->setUseHeaderLine( m_aCB_UseHeaderLine.IsChecked() ); // first check if the table already exists in the database diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index a55ee7ba7fe7..d9ec94d7be7e 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -355,7 +355,7 @@ IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, /*pButton*/ ) DBG_CHKTHIS(OWizTypeSelect,NULL); sal_Int32 nBreakPos; m_pParent->CheckColumns(nBreakPos); - fillColumnList(m_etAuto.GetText().ToInt32()); + fillColumnList(m_etAuto.GetText().toInt32()); ActivatePage(); -- cgit