diff options
24 files changed, 43 insertions, 43 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 046376ceae99..4fa65c746639 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -256,7 +256,7 @@ void SAL_CALL BasMgrContainerListenerImpl::disposing( const lang::EventObject& S void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::ContainerEvent& Event ) throw( uno::RuntimeException ) { - sal_Bool bLibContainer = ( maLibName.getLength() == 0 ); + sal_Bool bLibContainer = maLibName.isEmpty(); OUString aName; Event.Accessor >>= aName; @@ -308,7 +308,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const container::Con // Replace not possible for library container #ifdef DBG_UTIL - sal_Bool bLibContainer = ( maLibName.getLength() == 0 ); + sal_Bool bLibContainer = maLibName.isEmpty(); #endif DBG_ASSERT( !bLibContainer, "library container fired elementReplaced()"); @@ -336,7 +336,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const container::Cont OUString aName; Event.Accessor >>= aName; - sal_Bool bLibContainer = ( maLibName.getLength() == 0 ); + sal_Bool bLibContainer = maLibName.isEmpty(); if( bLibContainer ) { StarBASIC* pLib = mpMgr->GetLib( aName ); diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index b5662bbd29ce..2697c6440c56 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -2271,7 +2271,7 @@ void handleService( for (sal_uInt16 i = 0; i < methods; ++i) { rtl::OString name(codemaker::convertString( reader.getMethodName(i))); - bool defaultCtor = name.getLength() == 0; + bool defaultCtor = name.isEmpty(); if (reader.getMethodFlags(i) != RT_MODE_TWOWAY || (reader.getMethodReturnTypeName(i) != "void") || (defaultCtor diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx index 528508d1da01..2602f34480a5 100644 --- a/connectivity/source/drivers/evoab2/NConnection.cxx +++ b/connectivity/source/drivers/evoab2/NConnection.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star::lang; ::rtl::OUString implGetExceptionMsg( Exception& e, const ::rtl::OUString& aExceptionType_ ) { ::rtl::OUString aExceptionType = aExceptionType_; - if( aExceptionType.getLength() == 0 ) + if( aExceptionType.isEmpty() ) aExceptionType = ::rtl::OUString("Unknown") ; ::rtl::OUString aTypeLine( "\nType: " ); diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 5e31646f60f5..0a07e1d1ecc8 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -273,7 +273,7 @@ namespace connectivity rtl::OString sVersionString; while ( pStream->ReadLine(sLine) ) { - if ( sLine.getLength() == 0 ) + if ( sLine.isEmpty() ) continue; const rtl::OString sIniKey = comphelper::string::getToken(sLine, 0, '='); const rtl::OString sValue = comphelper::string::getToken(sLine, 1, '='); diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx index b984de0b82fa..2de4b5643211 100644 --- a/cppuhelper/source/bootstrap.cxx +++ b/cppuhelper/source/bootstrap.cxx @@ -143,7 +143,7 @@ Reference< XComponentContext > SAL_CALL bootstrap() OUString sPipeName( buf.makeStringAndClear() ); // accept string - OSL_ASSERT( buf.getLength() == 0 ); + OSL_ASSERT( buf.isEmpty() ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "--accept=pipe,name=" ) ); buf.append( sPipeName ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ";urp;" ) ); @@ -199,7 +199,7 @@ Reference< XComponentContext > SAL_CALL bootstrap() bridge::UnoUrlResolver::create( xLocalContext ) ); // connection string - OSL_ASSERT( buf.getLength() == 0 ); + OSL_ASSERT( buf.isEmpty() ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "uno:pipe,name=" ) ); buf.append( sPipeName ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 6b79f1da1ebd..cc9da4d783a4 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -1296,7 +1296,7 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) } } - if ( b.getLength() == 0 ) + if ( b.isEmpty() ) b.append( m_noDescription ); showDescription( b.makeStringAndClear(), bInserted ); diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index a3171c888dc8..81388092cc59 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -401,7 +401,7 @@ Reference<XComponentContext> connectToOffice( if (verbose) dp_misc::writeConsole("OK. Connecting..."); - OSL_ASSERT( buf.getLength() == 0 ); + OSL_ASSERT( buf.isEmpty() ); buf.appendAscii( "uno:pipe,name=" ); buf.append( pipeId ); buf.appendAscii( ";urp;StarOffice.ComponentContext" ); diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx index 054fd77d4920..f62383f843f6 100644 --- a/extensions/source/nsplugin/source/so_main.cxx +++ b/extensions/source/nsplugin/source/so_main.cxx @@ -313,7 +313,7 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f aPluginPipeName = ::rtl::OUString::valueOf( aPath.hashCode() ); // accept string - OSL_ASSERT( buf.getLength() == 0 ); + OSL_ASSERT( buf.isEmpty() ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "--accept=pipe,name=" ) ); buf.append( aPluginPipeName ); //user installation path as pipe name buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ";urp;" ) ); @@ -332,7 +332,7 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f bridge::UnoUrlResolver::create( xLocalContext ) ); // connection string - OSL_ASSERT( buf.getLength() == 0 ); + OSL_ASSERT( buf.isEmpty() ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "uno:pipe,name=" ) ); buf.append( aPluginPipeName ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( diff --git a/extensions/source/plugin/win/winmgr.cxx b/extensions/source/plugin/win/winmgr.cxx index 4f62ecd1c881..81d1e55080eb 100644 --- a/extensions/source/plugin/win/winmgr.cxx +++ b/extensions/source/plugin/win/winmgr.cxx @@ -387,7 +387,7 @@ Sequence< PluginDescription > XPluginManager_Impl::impl_getPluginDescriptions(vo PluginDescription & rDescr = pDescriptions[nStart+nTok]; OString aMIMEToken( aMIME.getToken( 0, '|', nIndex ) ); OString aExtToken2( aExt.getToken( 0, '|', nIndex2 ) ); - if( aMIMEToken.getLength() == 0 || aExtToken2.getLength() == 0 ) + if( aMIMEToken.isEmpty() || aExtToken2.isEmpty() ) continue; rDescr.Mimetype = OUString( diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx index ea3d36666b99..e9e902458297 100644 --- a/filter/source/graphicfilter/idxf/dxfgrprd.cxx +++ b/filter/source/graphicfilter/idxf/dxfgrprd.cxx @@ -46,7 +46,7 @@ rtl::OString DXFReadLine(SvStream& rIStm) sal_uInt16 nLen = (sal_uInt16)rIStm.Read( buf, sizeof(buf)-1 ); if( !nLen ) { - if( aBuf.getLength() == 0 ) + if( aBuf.isEmpty() ) return rtl::OString(); else break; diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index ac42d7fde40d..f8a9620874c6 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -1072,7 +1072,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const cDateSep = cChar; if (!cDateSep2) cDateSep2 = cChar; - if (cDateSep != cDateSep2 && aPatternBuf2.getLength() == 0) + if (cDateSep != cDateSep2 && aPatternBuf2.isEmpty()) aPatternBuf2 = aPatternBuf; if (cChar == cDateSep || cChar == cDateSep2) aPatternBuf.append( OUString( &cDateSep, 1)); // always the defined separator diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx index 18fab173e701..ca5274dc1900 100644 --- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx +++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx @@ -52,7 +52,7 @@ namespace rtl_OStringBuffer CPPUNIT_ASSERT_MESSAGE ( "New OStringBuffer containing no characters", - aStrBuf.getLength() == 0 && + aStrBuf.isEmpty() && *pStr == '\0' && aStrBuf.getCapacity() == 16 ); } @@ -90,10 +90,10 @@ namespace rtl_OStringBuffer CPPUNIT_ASSERT_MESSAGE ( "New OStringBuffer containing no characters and contain assigned capacity", - aStrBuf1.getLength() == 0 && + aStrBuf1.isEmpty() && *pStr1 == '\0' && aStrBuf1.getCapacity() == kTestStr2Len && - aStrBuf2.getLength() == 0 && + aStrBuf2.isEmpty() && *pStr2 == '\0' && aStrBuf2.getCapacity() == 0 ); @@ -111,7 +111,7 @@ namespace rtl_OStringBuffer CPPUNIT_ASSERT_MESSAGE ( "New OStringBuffer containing no characters and contain assigned capacity", - aStrBuf3.getLength() == 0 && + aStrBuf3.isEmpty() && *pStr == '\0' && aStrBuf3.getCapacity() == kNonSInt32Max ); diff --git a/sal/qa/rtl/ostring/rtl_OString2.cxx b/sal/qa/rtl/ostring/rtl_OString2.cxx index 6826fb944d37..0ea73cdcbd43 100644 --- a/sal/qa/rtl/ostring/rtl_OString2.cxx +++ b/sal/qa/rtl/ostring/rtl_OString2.cxx @@ -425,7 +425,7 @@ public: CPPUNIT_ASSERT_MESSAGE("Token should be a 'a'", sToken.equals("a") == sal_True); /* rtl::OString */ sToken = sTokenStr.getToken( 0, ';', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be empty", sToken.getLength() == 0); + CPPUNIT_ASSERT_MESSAGE("Token should be empty", sToken.isEmpty()); /* rtl::OString */ sToken = sTokenStr.getToken( 0, ';', nIndex ); CPPUNIT_ASSERT_MESSAGE("Token should be a 'b'", sToken.equals("b") == sal_True); @@ -448,7 +448,7 @@ public: CPPUNIT_ASSERT_MESSAGE("Token should be 'ever'", sToken.equals("ever") == sal_True); /* rtl::OString */ sToken = sTokenStr.getToken( 0, '.', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be empty", sToken.getLength() == 0); + CPPUNIT_ASSERT_MESSAGE("Token should be empty", sToken.isEmpty()); CPPUNIT_ASSERT_MESSAGE("index should be negative", nIndex == -1); } diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx index 331016ed586d..ad1c6180ab4e 100644 --- a/sal/qa/rtl/oustring/rtl_OUString2.cxx +++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx @@ -914,7 +914,7 @@ public: CPPUNIT_ASSERT_MESSAGE( "Token should be a 'a'", suToken == "a" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, ';', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.getLength() == 0); + CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.isEmpty()); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, ';', nIndex ); CPPUNIT_ASSERT_MESSAGE( "Token should be a 'b'", suToken == "b" ); @@ -937,7 +937,7 @@ public: CPPUNIT_ASSERT_MESSAGE( "Token should be 'ever'", suToken == "ever" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, '.', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.getLength() == 0); + CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.isEmpty()); CPPUNIT_ASSERT_MESSAGE("index should be negative", nIndex == -1); } @@ -949,7 +949,7 @@ public: "token should be 'ab'", ab.getToken(0, '-', n) == ab); CPPUNIT_ASSERT_MESSAGE("n should be -1", n == -1); CPPUNIT_ASSERT_MESSAGE( - "token should be empty", ab.getToken(0, '-', n).getLength() == 0); + "token should be empty", ab.getToken(0, '-', n).isEmpty()); } CPPUNIT_TEST_SUITE(getToken); diff --git a/sal/qa/rtl_strings/rtl_OUStringBuffer.cxx b/sal/qa/rtl_strings/rtl_OUStringBuffer.cxx index 9a1233e2efa0..56d8926662c5 100644 --- a/sal/qa/rtl_strings/rtl_OUStringBuffer.cxx +++ b/sal/qa/rtl_strings/rtl_OUStringBuffer.cxx @@ -63,13 +63,13 @@ static sal_Bool test_rtl_OUStringBuffer_ctor_001( hTestResult hRtlTestResult ) ::rtl::OUStringBuffer aUStrBuf; bool b1 = - aUStrBuf.getLength() == 0 && + aUStrBuf.isEmpty() && ! *(aUStrBuf.getStr()) && aUStrBuf.getCapacity() == 16; ::rtl::OUStringBuffer aUStrBuf2(0); bool b2 = - aUStrBuf2.getLength() == 0 && + aUStrBuf2.isEmpty() && ! *(aUStrBuf2.getStr()) && aUStrBuf2.getCapacity() == /* LLA: !!! */ 0; return @@ -116,15 +116,15 @@ sal_Bool SAL_CALL test_rtl_OUStringBuffer_ctor_003( bool b1 = - aUStrBuf1.getLength() == 0 && + aUStrBuf1.isEmpty() && ! *(aUStrBuf1.getStr()) && aUStrBuf1.getCapacity() == kTestStr2Len ; bool b2 = - aUStrBuf2.getLength() == 0 && + aUStrBuf2.isEmpty() && ! *(aUStrBuf2.getStr()) && aUStrBuf2.getCapacity() == /* LLA: ??? 16 */ 0; bool b3 = - aUStrBuf3.getLength() == 0 && + aUStrBuf3.isEmpty() && ! *(aUStrBuf3.getStr()) && aUStrBuf3.getCapacity() == kNonSInt32Max; return diff --git a/sal/qa/rtl_strings/rtl_old_testowstring.cxx b/sal/qa/rtl_strings/rtl_old_testowstring.cxx index 92a0e143b138..f23287a5a25b 100644 --- a/sal/qa/rtl_strings/rtl_old_testowstring.cxx +++ b/sal/qa/rtl_strings/rtl_old_testowstring.cxx @@ -167,7 +167,7 @@ void oldtests::test_OUString() //YD will fail copy assert on indexes, because ':' returns -1 s7 = OUString("Hallo jetzt komm ich"); s8 = s7.copy(0, s7.indexOf((sal_Unicode)':')); - TEST_ENSURE( s8.getLength() == 0, "test_OWString error 55"); + TEST_ENSURE( s8.isEmpty(), "test_OWString error 55"); TEST_ENSURE( s8.compareTo(OUString()) == 0, "test_OWString error 56"); #endif diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx index f824e5ebaaac..375ade4e7397 100644 --- a/sd/source/ui/remotecontrol/ImagePreparer.cxx +++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx @@ -179,7 +179,7 @@ void ImagePreparer::sendNotes( sal_uInt32 aSlideNumber ) OString aNotes = prepareNotes( aSlideNumber ); - if ( aNotes.getLength() == 0 ) + if ( aNotes.isEmpty() ) return; // OUStringBuffer aStrBuffer; diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 5485511eed38..8492457c5aa2 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -868,7 +868,7 @@ void Parser::parseLine( const ::rtl::OString& rLine ) oslFileError readLine( oslFileHandle pFile, ::rtl::OStringBuffer& line ) { - OSL_PRECOND( line.getLength() == 0, "line buf not empty" ); + OSL_PRECOND( line.isEmpty(), "line buf not empty" ); // TODO(P3): read larger chunks sal_Char aChar('\n'); diff --git a/shell/source/backends/wininetbe/wininetbackend.cxx b/shell/source/backends/wininetbe/wininetbackend.cxx index 339940009286..0b24a47ffb2e 100644 --- a/shell/source/backends/wininetbe/wininetbackend.cxx +++ b/shell/source/backends/wininetbe/wininetbackend.cxx @@ -90,7 +90,7 @@ namespace // private if( aType.equals( nextToken.getToken( 0, EQUAL_SIGN, i ) ) ) return ReadProxyEntry(nextToken, i); } - else if( aType.getLength() == 0) + else if( aType.isEmpty()) return ReadProxyEntry(nextToken, i); } while ( nIndex >= 0 ); diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 87fb54df6b05..a6a3f20f1a3e 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -435,7 +435,7 @@ bool ImpSvNumberInputScan::StringContainsImpl( const OUString& rWhat, bool ImpSvNumberInputScan::StringPtrContainsImpl( const OUString& rWhat, const sal_Unicode* pString, sal_Int32 nPos ) { - if ( rWhat.getLength() == 0 ) + if ( rWhat.isEmpty() ) { return false; } diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 9516581e5cac..d9fc89a80cef 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -551,7 +551,7 @@ sal_Bool SvStream::ReadLine( rtl::OString& rStr, sal_Int32 nMaxBytesToRead ) sal_uInt16 nLen = (sal_uInt16)Read( buf, sizeof(buf)-1 ); if ( !nLen ) { - if ( aBuf.getLength() == 0 ) + if ( aBuf.isEmpty() ) { // Exit on first block-read error bIsEof = sal_True; diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx index 30fe95e37fd3..bd9d2012a258 100644 --- a/ucb/source/ucp/gio/gio_mount.cxx +++ b/ucb/source/ucp/gio/gio_mount.cxx @@ -97,10 +97,10 @@ static void ooo_mount_operation_ask_password (GMountOperation *op, aPrevPassword = rtl::OUString(pThis->m_pPrevPassword, strlen(pThis->m_pPrevPassword), RTL_TEXTENCODING_UTF8); //The damn dialog is stupidly broken, so do like webdav, i.e. "#102871#" - if ( aUserName.getLength() == 0 ) + if ( aUserName.isEmpty() ) aUserName = aPrevUsername; - if ( aPassword.getLength() == 0 ) + if ( aPassword.isEmpty() ) aPassword = aPrevPassword; ucbhelper::SimpleAuthenticationRequest::EntityType eDomain = diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index bbdac2f644fb..8c495610a8d7 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -60,10 +60,10 @@ int DAVAuthListener_Impl::authenticate( // container to reject these. Thus, the credential input dialog will be shown again. // #102871# - Supply username and password from previous try. // Password container service depends on this! - if ( inoutUserName.getLength() == 0 && bUsePreviousCredentials ) + if ( inoutUserName.isEmpty() && bUsePreviousCredentials ) inoutUserName = m_aPrevUsername; - if ( outPassWord.getLength() == 0 && bUsePreviousCredentials ) + if ( outPassWord.isEmpty() && bUsePreviousCredentials ) outPassWord = m_aPrevPassword; rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest @@ -1008,17 +1008,17 @@ void DAVResourceAccess::initialize() throw ( DAVException ) { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - if ( m_aPath.getLength() == 0 ) + if ( m_aPath.isEmpty() ) { SerfUri aURI( m_aURL ); rtl::OUString aPath( aURI.GetPath() ); /* #134089# - Check URI */ - if ( !aPath.getLength() ) + if ( aPath.isEmpty() ) throw DAVException( DAVException::DAV_INVALID_ARG ); /* #134089# - Check URI */ - if ( !aURI.GetHost().getLength() ) + if ( aURI.GetHost().isEmpty() ) throw DAVException( DAVException::DAV_INVALID_ARG ); if ( !m_xSession.is() || !m_xSession->CanUse( m_aURL ) ) diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 7ea094bb9791..3594ddd96083 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -2225,7 +2225,7 @@ void Content::insert( // Check, if all required properties are present. - if ( aEscapedTitle.getLength() == 0 ) + if ( aEscapedTitle.isEmpty() ) { OSL_ENSURE( sal_False, "Content::insert - Title missing!" ); |