Author: hdu
Date: Tue Feb  4 08:44:05 2014
New Revision: 1564228

URL: http://svn.apache.org/r1564228
Log:
#i123862# use O*String's isEmpty() method to check for emptiness in modules 
starting with 'a'

Patch-by: [email protected]
Review-by: [email protected]

Modified:
    
openoffice/trunk/main/accessibility/source/extended/accessibleiconchoicectrl.cxx
    
openoffice/trunk/main/accessibility/source/extended/textwindowaccessibility.cxx
    
openoffice/trunk/main/accessibility/source/standard/accessiblemenuitemcomponent.cxx
    openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx
    
openoffice/trunk/main/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
    openoffice/trunk/main/automation/source/server/recorder.cxx
    openoffice/trunk/main/automation/source/server/statemnt.cxx
    openoffice/trunk/main/avmedia/source/framework/mediacontrol.cxx
    openoffice/trunk/main/avmedia/source/framework/soundhandler.cxx
    openoffice/trunk/main/avmedia/source/gstreamer/gstplayer.cxx
    openoffice/trunk/main/avmedia/source/quicktime/player.cxx
    openoffice/trunk/main/avmedia/source/viewer/mediawindow.cxx
    openoffice/trunk/main/avmedia/source/win/framegrabber.cxx
    openoffice/trunk/main/avmedia/source/win/player.cxx

Modified: 
openoffice/trunk/main/accessibility/source/extended/accessibleiconchoicectrl.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/source/extended/accessibleiconchoicectrl.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- 
openoffice/trunk/main/accessibility/source/extended/accessibleiconchoicectrl.cxx
 (original)
+++ 
openoffice/trunk/main/accessibility/source/extended/accessibleiconchoicectrl.cxx
 Tue Feb  4 08:44:05 2014
@@ -235,7 +235,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;
        }

Modified: 
openoffice/trunk/main/accessibility/source/extended/textwindowaccessibility.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/source/extended/textwindowaccessibility.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- 
openoffice/trunk/main/accessibility/source/extended/textwindowaccessibility.cxx 
(original)
+++ 
openoffice/trunk/main/accessibility/source/extended/textwindowaccessibility.cxx 
Tue Feb  4 08:44:05 2014
@@ -1955,7 +1955,7 @@ Document::changeParagraphText(::sal_uLon
         m_rView.DeleteSelected();
     if (bPaste)
         m_rView.Paste();
-    else if (rText.getLength() != 0)
+    else if ( !rText.isEmpty() )
         m_rView.InsertText(rText);
 }
 

Modified: 
openoffice/trunk/main/accessibility/source/standard/accessiblemenuitemcomponent.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/source/standard/accessiblemenuitemcomponent.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- 
openoffice/trunk/main/accessibility/source/standard/accessiblemenuitemcomponent.cxx
 (original)
+++ 
openoffice/trunk/main/accessibility/source/standard/accessiblemenuitemcomponent.cxx
 Tue Feb  4 08:44:05 2014
@@ -205,7 +205,7 @@ void OAccessibleMenuItemComponent::SetAc
        {
                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 );
                

Modified: 
openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx 
(original)
+++ openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx 
Tue Feb  4 08:44:05 2014
@@ -188,7 +188,7 @@ void VCLXAccessibleBox::ProcessWindowEve
                                if ( xText.is() )
                                {
                                        ::rtl::OUString sText = 
xText->getSelectedText();
-                                       if ( !sText.getLength() )
+                                       if ( sText.isEmpty() )
                                                sText = xText->getText();
                                    pList->UpdateSelection_Acc (sText, 
m_bIsDropDownBox);
                                        //if(m_bIsDropDownBox && 
!pList->IsInDropDown())
@@ -241,7 +241,7 @@ void VCLXAccessibleBox::ProcessWindowEve
                 if ( xText.is() )
                                {
                                        ::rtl::OUString sText = 
xText->getSelectedText();
-                                       if ( !sText.getLength() )
+                                       if ( sText.isEmpty() )
                                                sText = xText->getText();
                     pList->UpdateSelection (sText);
                                }
@@ -575,7 +575,7 @@ void VCLXAccessibleBox::FillAccessibleSt
                                sText = pSubEdit->GetText();
                        nEntryCount = pComboBox->GetEntryCount();
                }
-               if (sText.getLength() == 0 && nEntryCount >0)
+               if ( sText.isEmpty() && nEntryCount > 0 )
                        rStateSet.AddState(AccessibleStateType::INDETERMINATE);
        }
        else if (m_aBoxType == LISTBOX && m_bIsDropDownBox == true)

Modified: 
openoffice/trunk/main/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/source/standard/vclxaccessibletoolboxitem.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- 
openoffice/trunk/main/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
 (original)
+++ 
openoffice/trunk/main/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
 Tue Feb  4 08:44:05 2014
@@ -148,14 +148,14 @@ VCLXAccessibleToolBoxItem::~VCLXAccessib
 //                             sRet += String( RTL_CONSTASCII_USTRINGPARAM( " 
" ) );
 //                     sRet += sWinText;
 //             }
-               if (  sRet.getLength() == 0 )
+               if (  sRet.isEmpty() )
                {
                        Window* pItemWindow = m_pToolBox->GetItemWindow( 
m_nItemId );
                        if ( m_nRole == AccessibleRole::PANEL && pItemWindow && 
pItemWindow->GetAccessible().is() &&
                                 
pItemWindow->GetAccessible()->getAccessibleContext().is() )
                        {
                                ::rtl::OUString sWinText = 
pItemWindow->GetAccessible()->getAccessibleContext()->getAccessibleName();
-                                if ( sWinText.getLength() > 0 ) 
+                                if ( !sWinText.isEmpty() )
                                        sRet = sWinText;
                        }
                }
@@ -642,7 +642,7 @@ awt::FontDescriptor SAL_CALL VCLXAccessi
             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 );
        }

Modified: openoffice/trunk/main/automation/source/server/recorder.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/automation/source/server/recorder.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/automation/source/server/recorder.cxx (original)
+++ openoffice/trunk/main/automation/source/server/recorder.cxx Tue Feb  4 
08:44:05 2014
@@ -114,7 +114,7 @@ void MacroRecorder::LogVCL( rtl::OString
 Window* MacroRecorder::GetParentWithID( Window* pThis )
 {
     Window *pOverlap = pThis->GetWindow( WINDOW_OVERLAP );
-    while ( pOverlap != pThis && !pThis->GetUniqueOrHelpId().getLength() && 
pThis->GET_REAL_PARENT() )
+    while ( pOverlap != pThis && pThis->GetUniqueOrHelpId().isEmpty() && 
pThis->GET_REAL_PARENT() )
         pThis = pThis->GET_REAL_PARENT();
     return pThis;
 }
@@ -330,7 +330,7 @@ IMPL_LINK( MacroRecorder, EventListener,
                                        case VCLEVENT_BUTTON_CLICK:
                         Window* pParent = pWin->GetParent();
                         sal_Bool bDone = sal_False;
-                        if ( pParent->IsDialog() && 
!pWin->GetUniqueOrHelpId().getLength() )
+                        if ( pParent->IsDialog() && 
pWin->GetUniqueOrHelpId().isEmpty() )
                         {
                             switch ( pParent->GetType() )
                             {
@@ -413,7 +413,7 @@ IMPL_LINK( MacroRecorder, EventListener,
                         }
                                                if ( m_bRecord )
                                                {
-                                                       if ( !bSendData && 
pWin->GetUniqueOrHelpId().getLength() )
+                                                       if ( !bSendData && 
!pWin->GetUniqueOrHelpId().isEmpty() )
                                                        {
                                                                
StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), 
(comm_USHORT)M_Click );
                                                                bSendData = 
sal_True;
@@ -536,7 +536,7 @@ IMPL_LINK( MacroRecorder, EventListener,
                                 // compare to 1 for floating ToolBoxes
                                                                if ( m_bRecord )
                                                                {
-                                                                       if ( 
!pWin->GetUniqueOrHelpId().getLength() /* || pWin->GetUniqueOrHelpId().Matches( 
1 ) */ )
+                                                                       if ( 
pWin->GetUniqueOrHelpId().isEmpty() /* || pWin->GetUniqueOrHelpId().Matches( 1 
) */ )
                                                                                
// generate direct Button access
                                                                                
StatementList::pRet->GenReturn( RET_MacroRecorder, Str2Id( pTB->GetItemCommand( 
pTB->GetCurItemId() ) ), (comm_USHORT)(M_Click) );
                                                                        else

Modified: openoffice/trunk/main/automation/source/server/statemnt.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/automation/source/server/statemnt.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/automation/source/server/statemnt.cxx (original)
+++ openoffice/trunk/main/automation/source/server/statemnt.cxx Tue Feb  4 
08:44:05 2014
@@ -868,7 +868,7 @@ void StatementCommand::WriteControlData(
                                break;
 
                        default:
-                               if ( ( pBase->GetUniqueOrHelpId().getLength() 
== 0 ) && !( nConf & DH_MODE_ALLWIN ) )
+                               if ( pBase->GetUniqueOrHelpId().isEmpty() && !( 
nConf & DH_MODE_ALLWIN ) )
                                        bSkip = sal_True;
                                break;
                }
@@ -2087,7 +2087,7 @@ void StatementCommand::Translate()
                        {
                                Window* pNew = pTranslationWindow->GetWindow( 
WINDOW_CLIENT );
                                // Bei Dockingwindoes das kanze Geraffel von 
Docking Floating überspringen
-                               while ( IsDialog( pNew ) && 
!pNew->GetUniqueOrHelpId().getLength() && pNew->GetChildCount() == 1 )
+                               while ( IsDialog( pNew ) && 
pNew->GetUniqueOrHelpId().isEmpty() && pNew->GetChildCount() == 1 )
                                        pNew = pNew->GetChild( 0 );
                                pTranslationWindow = pNew;
                        }

Modified: openoffice/trunk/main/avmedia/source/framework/mediacontrol.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/avmedia/source/framework/mediacontrol.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/avmedia/source/framework/mediacontrol.cxx (original)
+++ openoffice/trunk/main/avmedia/source/framework/mediacontrol.cxx Tue Feb  4 
08:44:05 2014
@@ -307,7 +307,7 @@ void MediaControl::execute( const MediaI
 
 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 );
@@ -386,7 +386,7 @@ void MediaControl::implUpdateToolboxes()
 
 void MediaControl::implUpdateTimeSlider()
 {
-       if( !maItem.getURL().getLength() || !IsEnabled() )
+       if( maItem.getURL().isEmpty() || !IsEnabled() )
                maTimeSlider.Disable();
        else
        {
@@ -413,7 +413,7 @@ void MediaControl::implUpdateTimeSlider(
 
 void MediaControl::implUpdateVolumeSlider()
 {
-       if( !maItem.getURL().getLength() || !IsEnabled() )
+       if( maItem.getURL().isEmpty() || !IsEnabled() )
                maVolumeSlider.Disable();
        else
        {
@@ -430,7 +430,7 @@ void MediaControl::implUpdateVolumeSlide
 
 void MediaControl::implUpdateTimeField( double fCurTime )
 {
-    if( maItem.getURL().getLength() > 0 )
+    if( !maItem.getURL().isEmpty() )
        {
                String                          aTimeString;
                

Modified: openoffice/trunk/main/avmedia/source/framework/soundhandler.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/avmedia/source/framework/soundhandler.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/avmedia/source/framework/soundhandler.cxx (original)
+++ openoffice/trunk/main/avmedia/source/framework/soundhandler.cxx Tue Feb  4 
08:44:05 2014
@@ -415,7 +415,7 @@ void SAL_CALL SoundHandler::dispatch( co
     ::rtl::OUString               sURL       = 
aDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_URL(),
 ::rtl::OUString());
 
     if (
-        (sURL.getLength()           ) &&
+        !sURL.isEmpty() &&
         (avmedia::MediaWindow::isMediaURL(sURL))
        )
     {

Modified: openoffice/trunk/main/avmedia/source/gstreamer/gstplayer.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/avmedia/source/gstreamer/gstplayer.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/avmedia/source/gstreamer/gstplayer.cxx (original)
+++ openoffice/trunk/main/avmedia/source/gstreamer/gstplayer.cxx Tue Feb  4 
08:44:05 2014
@@ -209,7 +209,7 @@ Player* Player::create( const ::rtl::OUS
 {
     Player* pPlayer = NULL;
 
-    if( rURL.getLength() )
+    if( !rURL.isEmpty() )
     {
         // safely initialize GLib threading framework
         try

Modified: openoffice/trunk/main/avmedia/source/quicktime/player.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/avmedia/source/quicktime/player.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/avmedia/source/quicktime/player.cxx (original)
+++ openoffice/trunk/main/avmedia/source/quicktime/player.cxx Tue Feb  4 
08:44:05 2014
@@ -451,7 +451,7 @@ uno::Reference< media::XFrameGrabber > S
   uno::Reference< media::XFrameGrabber > xRet;
   OSL_TRACE ("Player::createFrameGrabber");
 
-  if( maURL.getLength() > 0 )
+  if( !maURL.isEmpty() )
   {
       FrameGrabber* pGrabber = new FrameGrabber( mxMgr );
       

Modified: openoffice/trunk/main/avmedia/source/viewer/mediawindow.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/avmedia/source/viewer/mediawindow.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/avmedia/source/viewer/mediawindow.cxx (original)
+++ openoffice/trunk/main/avmedia/source/viewer/mediawindow.cxx Tue Feb  4 
08:44:05 2014
@@ -406,7 +406,7 @@ bool MediaWindow::executeMediaURLDialog(
     {
         for( sal_Int32 nIndex = 0; nIndex >= 0; )
         {
-            if( aAllTypes.getLength() )
+            if( !aAllTypes.isEmpty() )
                 aAllTypes += aSeparator;
 
             ( aAllTypes += aWildcard ) += aFilters[ i ].second.getToken( 0, 
';', nIndex );
@@ -422,7 +422,7 @@ bool MediaWindow::executeMediaURLDialog(
 
         for( sal_Int32 nIndex = 0; nIndex >= 0; )
         {
-            if( aTypes.getLength() )
+            if( !aTypes.isEmpty() )
                 aTypes += aSeparator;
 
             ( aTypes += aWildcard ) += aFilters[ i ].second.getToken( 0, ';', 
nIndex );
@@ -440,10 +440,10 @@ bool MediaWindow::executeMediaURLDialog(
         const INetURLObject aURL( aDlg.GetPath() );
         rURL = aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
     }
-    else if( rURL.getLength() )
+    else if( !rURL.isEmpty() )
         rURL = ::rtl::OUString();
 
-    return( rURL.getLength() > 0 );
+    return !rURL.isEmpty();
 }
 
 // -------------------------------------------------------------------------

Modified: openoffice/trunk/main/avmedia/source/win/framegrabber.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/avmedia/source/win/framegrabber.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/avmedia/source/win/framegrabber.cxx (original)
+++ openoffice/trunk/main/avmedia/source/win/framegrabber.cxx Tue Feb  4 
08:44:05 2014
@@ -112,7 +112,7 @@ bool FrameGrabber::create( const ::rtl::
     else
         maURL = ::rtl::OUString();
 
-    return( maURL.getLength() > 0 );
+    return !maURL.isEmpty();
 }
 
 // 
------------------------------------------------------------------------------

Modified: openoffice/trunk/main/avmedia/source/win/player.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/avmedia/source/win/player.cxx?rev=1564228&r1=1564227&r2=1564228&view=diff
==============================================================================
--- openoffice/trunk/main/avmedia/source/win/player.cxx (original)
+++ openoffice/trunk/main/avmedia/source/win/player.cxx Tue Feb  4 08:44:05 2014
@@ -552,7 +552,7 @@ uno::Reference< media::XFrameGrabber > S
 
     uno::Reference< media::XFrameGrabber > xRet;
 
-    if( maURL.getLength() > 0 )
+    if( !maURL.isEmpty() )
     {
         FrameGrabber* pGrabber = new FrameGrabber( mxMgr );
         


Reply via email to