diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2011-12-19 18:10:37 -0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2011-12-21 09:52:48 +0100 |
commit | 545921f914ec172bcd6712cce54847131a49afb6 (patch) | |
tree | 92dde2ebc7c4d70240e4967b11526e73fef10b16 /dbaccess/source/ui/control | |
parent | 1835d0599e3d8984c7dfa2bbef2be5747596716a (diff) |
Fix for fdo43460 Part XII getLength() to isEmpty()
Part XII
Module
dbaccess
Diffstat (limited to 'dbaccess/source/ui/control')
-rw-r--r-- | dbaccess/source/ui/control/FieldDescControl.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/ui/control/dbtreelistbox.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/control/opendoccontrols.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/control/toolboxcontroller.cxx | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index b3e307f65d30..ecdd3b823525 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1312,7 +1312,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) { ActivateAggregate( tpLength ); pLength->SetMax(::std::max<sal_Int32>(pFieldType->nPrecision,pFieldDescr->GetPrecision())); - pLength->SetSpecialReadOnly(pFieldType->aCreateParams.getLength()==0); + pLength->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty()); } else DeactivateAggregate( tpLength ); @@ -1323,7 +1323,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) pScale->SetMax(::std::max<sal_Int32>(pFieldType->nMaximumScale,pFieldDescr->GetScale())); pScale->SetMin(pFieldType->nMinimumScale); static const ::rtl::OUString s_sPRECISION(RTL_CONSTASCII_USTRINGPARAM("PRECISION")); - pScale->SetSpecialReadOnly(pFieldType->aCreateParams.getLength() == 0 || pFieldType->aCreateParams == s_sPRECISION); + pScale->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty() || pFieldType->aCreateParams == s_sPRECISION); } else DeactivateAggregate( tpScale ); @@ -1343,7 +1343,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) { ActivateAggregate( tpTextLen ); pTextLen->SetMax(::std::max<sal_Int32>(pFieldType->nPrecision,pFieldDescr->GetPrecision())); - pTextLen->SetSpecialReadOnly(pFieldType->aCreateParams.getLength()==0); + pTextLen->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty()); } else DeactivateAggregate( tpTextLen ); @@ -1359,7 +1359,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) ActivateAggregate( tpFormat ); break; case DataType::BIT: - if ( pFieldType->aCreateParams.getLength() ) + if ( !pFieldType->aCreateParams.isEmpty() ) { DeactivateAggregate( tpFormat ); DeactivateAggregate( tpTextLen ); @@ -1668,7 +1668,7 @@ void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr ) sDefault = BoolStringPersistent(pBoolDefault->GetSelectEntry()); } - if ( sDefault.getLength() ) + if ( !sDefault.isEmpty() ) pFieldDescr->SetControlDefault(makeAny(sDefault)); else pFieldDescr->SetControlDefault(Any()); @@ -1845,7 +1845,7 @@ String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDes { if ( !bTextFormat ) { - if ( sDefault.getLength() ) + if ( !sDefault.isEmpty() ) { try { @@ -1886,8 +1886,8 @@ String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDes OSL_ENSURE(xPreViewer.is(),"XNumberFormatPreviewer is null!"); sDefault = xPreViewer->convertNumberToPreviewString(sFormat,nValue,aLocale,sal_True); } - else if ( !_bCheck || (sDefault.getLength() != 0) ) - sDefault = xNumberFormatter->formatString(nFormatKey,(sDefault.getLength() != 0 )? sDefault : sFormat); + else if ( !(_bCheck && sDefault.isEmpty()) ) + sDefault = xNumberFormatter->formatString(nFormatKey, sDefault.isEmpty() ? sFormat : sDefault); } catch(const Exception&) { diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 0a177bec75d0..cfbd311b528c 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -482,9 +482,9 @@ namespace else { ::rtl::OUString sCommandURL( _pPopup->GetItemCommand( nId ) ); - bool bEnabled = ( sCommandURL.getLength() ) - ? _rController.isCommandEnabled( sCommandURL ) - : _rController.isCommandEnabled( nId ); + bool bEnabled = sCommandURL.isEmpty() + ? _rController.isCommandEnabled( nId ) + : _rController.isCommandEnabled( sCommandURL ); _pPopup->EnableItem( nId, bEnabled ); } } @@ -522,7 +522,7 @@ namespace // more things to preserve: // - the help command ::rtl::OUString sHelpURL = _rMenu.GetHelpCommand( nId ); - if ( sHelpURL.getLength() ) + if ( !sHelpURL.isEmpty() ) _rMenu.SetHelpCommand( nCommandId, sHelpURL ); // remove the "old" item diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index c488801a61d3..71fd695ffc04 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -247,7 +247,7 @@ namespace dbaui INetURLObject aURL; aURL.SetSmartURL( sURL ); // The password is set only when it is not empty. - if ( sPassword.getLength() > 0 ) + if ( !sPassword.isEmpty() ) aURL.SetPass( sPassword ); if ( !sTitle.Len() ) diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 84ce4b0f4d0d..b48206c43697 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -475,7 +475,7 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry( const ::rtl::OUString& rSecondName = bCatalogAtStart ? sSchema : sCatalog; const sal_Int32 nSecondFolderType = bCatalogAtStart ? DatabaseObjectContainer::SCHEMA : DatabaseObjectContainer::CATALOG; - if ( rFirstName.getLength() ) + if ( !rFirstName.isEmpty() ) { SvLBoxEntry* pFolder = GetEntryPosByName( rFirstName, pParentEntry ); if ( !pFolder ) @@ -483,7 +483,7 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry( pParentEntry = pFolder; } - if ( rSecondName.getLength() ) + if ( !rSecondName.isEmpty() ) { SvLBoxEntry* pFolder = GetEntryPosByName( rSecondName, pParentEntry ); if ( !pFolder ) @@ -639,14 +639,14 @@ SvLBoxEntry* OTableTreeListBox::getEntryByQualifiedName( const ::rtl::OUString& SvLBoxEntry* pParent = getAllObjectsEntry(); SvLBoxEntry* pCat = NULL; SvLBoxEntry* pSchema = NULL; - if ( sCatalog.getLength() ) + if ( !sCatalog.isEmpty() ) { pCat = GetEntryPosByName(sCatalog, pParent); if ( pCat ) pParent = pCat; } - if ( sSchema.getLength() ) + if ( !sSchema.isEmpty() ) { pSchema = GetEntryPosByName(sSchema, pParent); if ( pSchema ) diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx index 8dccea3e998d..bbef4c8d0a56 100644 --- a/dbaccess/source/ui/control/toolboxcontroller.cxx +++ b/dbaccess/source/ui/control/toolboxcontroller.cxx @@ -264,7 +264,7 @@ namespace dbaui URL aUrl; Sequence < PropertyValue > aArgs; aUrl.Complete = m_aCommandURL; - OSL_ENSURE(aUrl.Complete.getLength(),"Command is empty!"); + OSL_ENSURE(!aUrl.Complete.isEmpty(),"Command is empty!"); if ( getURLTransformer().is() ) getURLTransformer()->parseStrict(aUrl); xDispatch->dispatch(aUrl,aArgs); |