From 6cfae09e5dafa477db210272949e253d4fb24349 Mon Sep 17 00:00:00 2001 From: Gustavo Buzzatti Pacheco Date: Mon, 26 Dec 2011 15:08:46 -0200 Subject: Fix for fdo43460 Part XVIII getLength() to isEmpty() Part XVIII module form --- forms/source/component/DatabaseForm.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'forms/source/component/DatabaseForm.cxx') diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 9a4943fc23eb..5caf83a9f56b 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -510,7 +510,7 @@ ODatabaseForm::~ODatabaseForm() { aName = pSuccObj->aName; aValue = pSuccObj->aValue; - if( pSuccObj->nRepresentation == SUCCESSFUL_REPRESENT_FILE && aValue.getLength() ) + if( pSuccObj->nRepresentation == SUCCESSFUL_REPRESENT_FILE && !aValue.isEmpty() ) { // Bei File-URLs wird der Dateiname und keine URL uebertragen, // weil Netscape dies so macht. @@ -635,7 +635,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc xComponentSet->getPropertyValue(PROPERTY_CLASSID) >>= nClassId; ::rtl::OUString aName; xComponentSet->getPropertyValue( PROPERTY_NAME ) >>= aName; - if( !aName.getLength() && nClassId != FormComponentType::IMAGEBUTTON) + if( aName.isEmpty() && nClassId != FormComponentType::IMAGEBUTTON) return; else // Name um den Prefix erweitern aName = rNamePrefix + aName; @@ -675,12 +675,12 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc ::rtl::OUString aRhs = ::rtl::OUString::valueOf( MouseEvt.X ); // nur wenn ein Name vorhanden ist, kann ein name.x - aLhs += aName.getLength() ? UniString::CreateFromAscii(".x") : UniString::CreateFromAscii("x"); + aLhs += !aName.isEmpty() ? UniString::CreateFromAscii(".x") : UniString::CreateFromAscii("x"); rList.push_back( HtmlSuccessfulObj(aLhs, aRhs) ); aLhs = aName; aRhs = ::rtl::OUString::valueOf( MouseEvt.Y ); - aLhs += aName.getLength() ? UniString::CreateFromAscii(".y") : UniString::CreateFromAscii("y"); + aLhs += !aName.isEmpty() ? UniString::CreateFromAscii(".y") : UniString::CreateFromAscii("y"); rList.push_back( HtmlSuccessfulObj(aLhs, aRhs) ); } @@ -907,7 +907,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc for(i=0; i& Control, { ::osl::MutexGuard aGuard(m_aMutex); // Sind Controls und eine Submit-URL vorhanden? - if( !getCount() || !m_aTargetURL.getLength() ) + if( !getCount() || m_aTargetURL.isEmpty() ) return; } @@ -2541,7 +2541,7 @@ void SAL_CALL ODatabaseForm::setGroup( const Sequence > continue; } - if (!sGroupName.getLength()) + if (sGroupName.isEmpty()) xSet->getPropertyValue(PROPERTY_NAME) >>= sGroupName; else xSet->setPropertyValue(PROPERTY_NAME, makeAny(sGroupName)); @@ -2715,7 +2715,7 @@ sal_Bool ODatabaseForm::canShareConnection( const Reference< XPropertySet >& _rx // both rowsets share are connected to the same data source if ( sParentDataSource == sOwnDatasource ) { - if ( 0 != sParentDataSource.getLength() ) + if ( !sParentDataSource.isEmpty() ) // and it's really a data source name (not empty) bCanShareConnection = sal_True; else @@ -2894,7 +2894,7 @@ void ODatabaseForm::load_impl(sal_Bool bCausedByParentForm, sal_Bool bMoveToFirs sal_Bool bConnected = implEnsureConnection(); // we don't have to execute if we do not have a command to execute - sal_Bool bExecute = bConnected && m_xAggregateSet.is() && getString(m_xAggregateSet->getPropertyValue(PROPERTY_COMMAND)).getLength(); + sal_Bool bExecute = bConnected && m_xAggregateSet.is() && !getString(m_xAggregateSet->getPropertyValue(PROPERTY_COMMAND)).isEmpty(); // a database form always uses caching // we use starting fetchsize with at least 10 rows -- cgit