diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-14 12:10:39 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-14 12:11:48 -0200 |
commit | dc04d67e94d9302278fc049d6617b62fe461ac66 (patch) | |
tree | 3dc4e0e5ee4406483cc1bc8c7bb690a1b2c6efe9 /svx/source/fmcomp | |
parent | c447d9ba8c7d40670c59a9ec9d45f32a36c1efcd (diff) |
Fix for fdo43460 Part XXXVIII getLength() to isEmpty()
Part XXXVIII
Modules
svx
Diffstat (limited to 'svx/source/fmcomp')
-rw-r--r-- | svx/source/fmcomp/dbaexchange.cxx | 12 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 30 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcols.cxx | 2 |
4 files changed, 23 insertions, 23 deletions
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index cc40926de3f9..8987e41f94d2 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -85,7 +85,7 @@ namespace svx implConstruct( - sDataSource.getLength() ? sDataSource : sDatabaseLocation, + sDataSource.isEmpty() ? sDatabaseLocation : sDataSource, sConnectionResource, nCommandType, sCommand, sFieldName ); if ( m_nFormatFlags & CTF_COLUMN_DESCRIPTOR ) @@ -212,7 +212,7 @@ namespace svx if ((m_nFormatFlags & CTF_COLUMN_DESCRIPTOR) == CTF_COLUMN_DESCRIPTOR) { m_aDescriptor.setDataSource(_rDatasource); - if ( _rConnectionResource.getLength() ) + if ( !_rConnectionResource.isEmpty() ) m_aDescriptor[daConnectionResource] <<= _rConnectionResource; m_aDescriptor[daCommand] <<= _rCommand; @@ -309,11 +309,11 @@ namespace svx if (extractColumnDescriptor(_rData, sDatasource, sDatabaseLocation,sConnectionResource,nCommandType, sCommand, sFieldName)) { // and build an own descriptor - if ( sDatasource.getLength() ) + if ( !sDatasource.isEmpty() ) aDescriptor[daDataSource] <<= sDatasource; - if ( sDatabaseLocation.getLength() ) + if ( !sDatabaseLocation.isEmpty() ) aDescriptor[daDatabaseLocation] <<= sDatabaseLocation; - if ( sConnectionResource.getLength() ) + if ( !sConnectionResource.isEmpty() ) aDescriptor[daConnectionResource] <<= sConnectionResource; aDescriptor[daCommand] <<= sCommand; @@ -596,7 +596,7 @@ namespace svx { m_aDescriptor.setDataSource(_rDatasource); // build the descriptor (the property sequence) - if ( _rConnectionResource.getLength() ) + if ( !_rConnectionResource.isEmpty() ) m_aDescriptor[daConnectionResource] <<= _rConnectionResource; if ( _rxConnection.is() ) m_aDescriptor[daConnection] <<= _rxConnection; diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index ec44cf17f4ae..4d387b0458ac 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -205,9 +205,9 @@ void FmGridHeader::RequestHelp( const HelpEvent& rHEvt ) Reference< ::com::sun::star::beans::XPropertySet > xColumn(xColumns->getByIndex(nPos),UNO_QUERY); ::rtl::OUString aHelpText; xColumn->getPropertyValue(FM_PROP_HELPTEXT) >>= aHelpText; - if ( !aHelpText.getLength() ) + if ( aHelpText.isEmpty() ) xColumn->getPropertyValue(FM_PROP_DESCRIPTION) >>= aHelpText; - if ( aHelpText.getLength() ) + if ( !aHelpText.isEmpty() ) { if ( rHEvt.GetMode() & HELPMODE_BALLOON ) Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aHelpText ); @@ -275,10 +275,10 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) if (aColumn.has(daColumnObject))aColumn[daColumnObject] >>= xField; if (aColumn.has(daConnection)) aColumn[daConnection] >>= xConnection; - if ( !sFieldName.getLength() - || !sCommand.getLength() - || ( !sDatasouce.getLength() - && !sDatabaseLocation.getLength() + if ( sFieldName.isEmpty() + || sCommand.isEmpty() + || ( sDatasouce.isEmpty() + && sDatabaseLocation.isEmpty() && !xConnection.is() ) ) @@ -294,7 +294,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) { // the transferable did not contain the connection -> build an own one try { - ::rtl::OUString sSignificantSource( sDatasouce.getLength() ? sDatasouce : sDatabaseLocation ); + ::rtl::OUString sSignificantSource( sDatasouce.isEmpty() ? sDatabaseLocation : sDatasouce ); xConnection = OStaticDataAccessTools().getConnection_withFeedback(sSignificantSource, ::rtl::OUString(),::rtl::OUString(),static_cast<FmGridControl*>(GetParent())->getServiceManager()); } catch(NoSuchElementException&) @@ -396,7 +396,7 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ ) Reference< XConnection > xConnection; ::rtl::OUString sDatasouce = m_pImpl->aDropData.getDataSource(); - if ( !sDatasouce.getLength() && m_pImpl->aDropData.has(daConnectionResource) ) + if ( sDatasouce.isEmpty() && m_pImpl->aDropData.has(daConnectionResource) ) m_pImpl->aDropData[daConnectionResource] >>= sURL; m_pImpl->aDropData[daCommand] >>= sCommand; m_pImpl->aDropData[daCommandType] >>= nCommandType; @@ -526,7 +526,7 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ ) sFieldService = FieldServiceFromId(nPreferedType); Reference< XPropertySet > xThisRoundCol; - if ( sFieldService.getLength() ) + if ( !sFieldService.isEmpty() ) xThisRoundCol = xFactory->createColumn(sFieldService); if (nColCount) xSecondCol = xThisRoundCol; @@ -605,15 +605,15 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ ) Reference< XPropertySet > xForm(xFormCp->getParent(), UNO_QUERY); if (xForm.is()) { - if (!::comphelper::getString(xForm->getPropertyValue(FM_PROP_DATASOURCE)).getLength()) + if (::comphelper::getString(xForm->getPropertyValue(FM_PROP_DATASOURCE)).isEmpty()) { - if ( sDatasouce.getLength() ) + if ( !sDatasouce.isEmpty() ) xForm->setPropertyValue(FM_PROP_DATASOURCE, makeAny(sDatasouce)); else xForm->setPropertyValue(FM_PROP_URL, makeAny(sURL)); } - if (!::comphelper::getString(xForm->getPropertyValue(FM_PROP_COMMAND)).getLength()) + if (::comphelper::getString(xForm->getPropertyValue(FM_PROP_COMMAND)).isEmpty()) { xForm->setPropertyValue(FM_PROP_COMMAND, makeAny(sCommand)); Any aCommandType; @@ -924,7 +924,7 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe break; } - if ( aFieldType.getLength() ) + if ( !aFieldType.isEmpty() ) { try { @@ -1965,7 +1965,7 @@ namespace if ( xProp.is() ) { xProp->getPropertyValue(FM_PROP_HELPTEXT) >>= sRetText; - if ( !sRetText.getLength() ) + if ( sRetText.isEmpty() ) xProp->getPropertyValue(FM_PROP_DESCRIPTION) >>= sRetText; } } @@ -1976,7 +1976,7 @@ namespace GetModelColumnPos( sal::static_int_cast< sal_uInt16 >(_nPosition)), FM_PROP_HELPTEXT); - if ( !sRetText.getLength() ) + if ( sRetText.isEmpty() ) sRetText = getColumnPropertyFromPeer( GetPeer(), GetModelColumnPos( diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 1d039012a17a..d4272f55224e 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -3128,7 +3128,7 @@ void DbFilterField::Update() aStatement.AssignAscii("SELECT DISTINCT "); aStatement += String(quoteName(aQuote, aName)); - if (aFieldName.getLength() && aName != aFieldName) + if (!aFieldName.isEmpty() && aName != aFieldName) { aStatement.AppendAscii(" AS "); aStatement += quoteName(aQuote, aFieldName).getStr(); diff --git a/svx/source/fmcomp/gridcols.cxx b/svx/source/fmcomp/gridcols.cxx index afa82f17d7f1..284e6a7b5820 100644 --- a/svx/source/fmcomp/gridcols.cxx +++ b/svx/source/fmcomp/gridcols.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::uno; const ::comphelper::StringSequence& getColumnTypes() { static ::comphelper::StringSequence aColumnTypes(10); - if (!aColumnTypes.getConstArray()[0].getLength()) + if (aColumnTypes.getConstArray()[0].isEmpty()) { ::rtl::OUString* pNames = aColumnTypes.getArray(); pNames[TYPE_CHECKBOX] = FM_COL_CHECKBOX; |