Fix for fdo43460, Part I, getLength to isEmpty
Part I Modules unoControl, accessibility and avmedia
This commit is contained in:
parent
1d1f049859
commit
f43311dfb7
@ -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 );
|
||||
}
|
||||
|
@ -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!
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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 );
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 );
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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() );
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user