diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2011-12-09 14:00:09 -0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-12-09 23:37:05 +0100 |
commit | f43311dfb77342f0d003bee5336215f92500f15c (patch) | |
tree | 7f5ef6154f07850add2eb3f169508319f7e11889 | |
parent | 1d1f049859e080b403c743f7e0604bd72475a824 (diff) |
Fix for fdo43460, Part I, getLength to isEmpty
Part I
Modules
unoControl, accessibility and avmedia
9 files changed, 17 insertions, 17 deletions
diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 006924c85e4e..6b2919094f6f 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -203,7 +203,7 @@ void SAL_CALL FrameControl::createPeer( const Reference< XToolkit >& xToo BaseControl::createPeer( xToolkit, xParentPeer ); if ( impl_getPeerWindow().is() ) { - if( m_sComponentURL.getLength() > 0 ) + if( !m_sComponentURL.isEmpty() ) { impl_createFrame( getPeer(), m_sComponentURL, m_seqLoaderArguments ); } diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index 52bd71a99c0e..b3a518248a9e 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -1038,11 +1038,11 @@ sal_Bool ProgressMonitor::impl_debug_checkParameter ( ) { // Check "rTopic" if ( &rTopic == NULL ) return sal_False ; // NULL-pointer for reference ???!!! - if ( rTopic.getLength () < 1 ) return sal_False ; // "" + if ( rTopic.isEmpty() ) return sal_False ; // "" // Check "rText" if ( &rText == NULL ) return sal_False ; // NULL-pointer for reference ???!!! - if ( rText.getLength () < 1 ) return sal_False ; // "" + if ( rText.isEmpty() ) return sal_False ; // "" // "bbeforeProgress" is valid in everyway! @@ -1055,7 +1055,7 @@ sal_Bool ProgressMonitor::impl_debug_checkParameter ( const OUString& rTopic, sa { // Check "rTopic" if ( &rTopic == NULL ) return sal_False ; // NULL-pointer for reference ???!!! - if ( rTopic.getLength () < 1 ) return sal_False ; // "" + if ( rTopic.isEmpty() ) return sal_False ; // "" // "bbeforeProgress" is valid in everyway! diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index eb47993a15e4..c7894adbbb73 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -211,7 +211,7 @@ namespace accessibility ensureAlive(); ::rtl::OUString sName = getCtrl()->GetAccessibleName(); - if ( sName.getLength() == 0 ) + if ( sName.isEmpty() ) sName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IconChoiceControl" ) ); return sName; } diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 57c63780d8c2..39b332c5590e 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -1798,7 +1798,7 @@ Document::changeParagraphText(::sal_uLong nNumber, ::sal_uInt16 nBegin, ::sal_uI m_rView.DeleteSelected(); if (bPaste) m_rView.Paste(); - else if (rText.getLength() != 0) + else if (!rText.isEmpty()) m_rView.InsertText(rText); } diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx index ee10a609745a..f36dcb820b62 100644 --- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx +++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx @@ -208,7 +208,7 @@ void OAccessibleMenuItemComponent::SetAccessibleName( const ::rtl::OUString& sAc { sal_uInt16 nItemId = m_pParent->GetItemId( m_nItemPos ); sName = m_pParent->GetAccessibleName( nItemId ); - if ( sName.getLength() == 0 ) + if ( sName.isEmpty() ) sName = m_pParent->GetItemText( nItemId ); sName = OutputDevice::GetNonMnemonicString( sName ); } diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index e868403ef40d..c59eb5bda2d7 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -156,7 +156,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven if ( xText.is() ) { ::rtl::OUString sText = xText->getSelectedText(); - if ( !sText.getLength() ) + if ( sText.isEmpty() ) sText = xText->getText(); pList->UpdateSelection (sText); } diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index e1f6d94e8d7c..e8fc1fdfe918 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -607,7 +607,7 @@ awt::FontDescriptor SAL_CALL VCLXAccessibleToolBoxItem::getFontMetrics( const Re sRet = m_pToolBox->GetHelpText( m_nItemId ); else sRet = m_pToolBox->GetQuickHelpText( m_nItemId ); - if ( !sRet.getLength() ) + if ( sRet.isEmpty() ) // no help text set, so use item text sRet = m_pToolBox->GetItemText( m_nItemId ); } diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index ceb375ed24f8..cdfce1ae0bff 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -293,7 +293,7 @@ void MediaControl::setState( const MediaItem& rItem ) void MediaControl::implUpdateToolboxes() { - const bool bValidURL = ( maItem.getURL().getLength() > 0 ); + const bool bValidURL = ( !maItem.getURL().isEmpty()); maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_INSERT, bValidURL ); maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_PLAY, bValidURL ); @@ -372,7 +372,7 @@ void MediaControl::implUpdateToolboxes() void MediaControl::implUpdateTimeSlider() { - if( !maItem.getURL().getLength() || !IsEnabled() ) + if( maItem.getURL().isEmpty() || !IsEnabled() ) maTimeSlider.Disable(); else { @@ -399,7 +399,7 @@ void MediaControl::implUpdateTimeSlider() void MediaControl::implUpdateVolumeSlider() { - if( !maItem.getURL().getLength() || !IsEnabled() ) + if( maItem.getURL().isEmpty() || !IsEnabled() ) maVolumeSlider.Disable(); else { @@ -416,7 +416,7 @@ void MediaControl::implUpdateVolumeSlider() void MediaControl::implUpdateTimeField( double fCurTime ) { - if( maItem.getURL().getLength() > 0 ) + if( !maItem.getURL().isEmpty() ) { String aTimeString; diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index 713e9e9058e8..e6c6c067e98e 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -274,7 +274,7 @@ bool MediaWindow::executeMediaURLDialog(Window* /* pParent */, { for( sal_Int32 nIndex = 0; nIndex >= 0; ) { - if( aAllTypes.getLength() ) + if( !aAllTypes.isEmpty() ) aAllTypes += aSeparator; ( aAllTypes += aWildcard ) += aFilters[ i ].second.getToken( 0, ';', nIndex ); @@ -290,7 +290,7 @@ bool MediaWindow::executeMediaURLDialog(Window* /* pParent */, for( sal_Int32 nIndex = 0; nIndex >= 0; ) { - if( aTypes.getLength() ) + if( !aTypes.isEmpty() ) aTypes += aSeparator; ( aTypes += aWildcard ) += aFilters[ i ].second.getToken( 0, ';', nIndex ); @@ -334,10 +334,10 @@ bool MediaWindow::executeMediaURLDialog(Window* /* pParent */, } } } - else if( rURL.getLength() ) + else if( !rURL.isEmpty() ) rURL = ::rtl::OUString(); - return( rURL.getLength() > 0 ); + return( !rURL.isEmpty() ); } // ------------------------------------------------------------------------- |