[Libreoffice-commits] core.git: 2 commits - basic/source codemaker/source connectivity/source cppuhelper/source desktop/source extensions/source filter/source i18npool/source sal/qa sal/workben sdext/source sd/source shell/source svl/source svx/source tools/source ucb/source xmloff/source
Thomas Arnhold
thomas at arnhold.org
Sat Mar 9 11:34:08 PST 2013
basic/source/basmgr/basmgr.cxx | 6 +++---
codemaker/source/javamaker/javatype.cxx | 2 +-
connectivity/source/drivers/evoab2/NConnection.cxx | 2 +-
connectivity/source/drivers/hsqldb/HDriver.cxx | 2 +-
cppuhelper/source/bootstrap.cxx | 4 ++--
desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 2 +-
desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 2 +-
extensions/source/nsplugin/source/so_main.cxx | 4 ++--
extensions/source/ole/unoobjw.cxx | 14 +++++++-------
extensions/source/plugin/win/winmgr.cxx | 2 +-
filter/source/graphicfilter/idxf/dxfgrprd.cxx | 2 +-
i18npool/source/localedata/LocaleNode.cxx | 2 +-
sal/qa/OStringBuffer/rtl_OStringBuffer.cxx | 8 ++++----
sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx | 6 +++---
sal/qa/rtl/ostring/rtl_OString2.cxx | 4 ++--
sal/qa/rtl/oustring/rtl_OUString2.cxx | 6 +++---
sal/qa/rtl_strings/rtl_OUStringBuffer.cxx | 10 +++++-----
sal/qa/rtl_strings/rtl_old_testowstring.cxx | 2 +-
sal/workben/testfile.cxx | 12 ++++++------
sd/source/ui/remotecontrol/ImagePreparer.cxx | 2 +-
sdext/source/pdfimport/wrapper/wrapper.cxx | 2 +-
shell/source/backends/wininetbe/wininetbackend.cxx | 2 +-
svl/source/numbers/zforfind.cxx | 2 +-
svx/source/form/fmpage.cxx | 4 ++--
svx/source/tbxctrls/tbunosearchcontrollers.cxx | 2 +-
tools/source/stream/stream.cxx | 2 +-
ucb/source/ucp/gio/gio_mount.cxx | 4 ++--
ucb/source/ucp/webdav/DAVResourceAccess.cxx | 10 +++++-----
ucb/source/ucp/webdav/webdavcontent.cxx | 2 +-
xmloff/source/draw/sdxmlexp.cxx | 6 +++---
xmloff/source/style/fonthdl.cxx | 4 ++--
31 files changed, 67 insertions(+), 67 deletions(-)
New commits:
commit d2f57b6c1275e0e6ed7f214d471ddb84ecb1b4ad
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 9 17:44:52 2013 +0100
fdo#43460: use isEmpty()
Change-Id: I47b35af71277fdda19767a553c960bf12164b92f
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 9bd7a4a..c6551f4 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -1375,7 +1375,7 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /*
{
exactName = m_xExactName->getExactName( info.name);
// invoke again
- if( exactName.getLength() != 0)
+ if( !exactName.isEmpty() )
{
if( SUCCEEDED( ret= doInvoke( pdispparams, pvarResult,
pexcepinfo, puArgErr, exactName, params)))
@@ -1400,7 +1400,7 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /*
{
exactName = m_xExactName->getExactName( info.name);
// invoke again
- if( exactName.getLength() != 0)
+ if( !exactName.isEmpty() )
{
if( SUCCEEDED( ret= doSetProperty( pdispparams, pvarResult,
pexcepinfo, puArgErr, exactName, params)))
@@ -1424,7 +1424,7 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /*
{
exactName = m_xExactName->getExactName( info.name);
// invoke again
- if( exactName.getLength() != 0)
+ if( !exactName.isEmpty() )
{
if( SUCCEEDED( ret= doGetProperty( pdispparams, pvarResult,
pexcepinfo, exactName)))
@@ -1452,7 +1452,7 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /*
{
exactName = m_xExactName->getExactName( info.name);
// invoke again
- if( exactName.getLength() != 0)
+ if( !exactName.isEmpty() )
{
if( SUCCEEDED( ret= doInvoke( pdispparams, pvarResult,
pexcepinfo, puArgErr, exactName, params)))
@@ -1471,7 +1471,7 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /*
&& ret == DISP_E_MEMBERNOTFOUND)
{
// try to get the exact name
- if( exactName.getLength() != 0)
+ if( !exactName.isEmpty() )
{
if( SUCCEEDED( ret= doSetProperty( pdispparams, pvarResult,
pexcepinfo, puArgErr, exactName, params)))
@@ -1496,7 +1496,7 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /*
{
exactName = m_xExactName->getExactName( info.name);
// invoke again
- if( exactName.getLength() != 0)
+ if( !exactName.isEmpty() )
{
if( SUCCEEDED( ret= doInvoke( pdispparams, pvarResult,
pexcepinfo, puArgErr, exactName, params)))
@@ -1514,7 +1514,7 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /*
pexcepinfo, info.name))
&& ret == DISP_E_MEMBERNOTFOUND)
{
- if( exactName.getLength() != 0)
+ if( !exactName.isEmpty() )
{
if( SUCCEEDED( ret= doSetProperty( pdispparams, pvarResult,
pexcepinfo, puArgErr, exactName, params)))
diff --git a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
index 2977771..0cab17f 100644
--- a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
+++ b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
@@ -177,7 +177,7 @@ namespace rtl_Bootstrap
rtl::OUString suGetname;
aBootstrap.getIniName( suGetname );
printUString( suGetname );
- CPPUNIT_ASSERT_MESSAGE("ctor error without initial file.", suGetname.getLength() != 0 );
+ CPPUNIT_ASSERT_MESSAGE("ctor error without initial file.", !suGetname.isEmpty() );
}
CPPUNIT_TEST_SUITE(ctor);
@@ -238,7 +238,7 @@ namespace rtl_Bootstrap
rtl::OUString suValuename ("INHERITED_VALUE");
aBootstrap.getFrom( suValuename, suGetname );
printUString( suGetname );
- CPPUNIT_ASSERT_MESSAGE("get the value of a variable in ini file.", suGetname.getLength() != 0 );
+ CPPUNIT_ASSERT_MESSAGE("get the value of a variable in ini file.", !suGetname.isEmpty());
}
//use defaut value
@@ -440,7 +440,7 @@ namespace rtl_Bootstrap
rtl::OUString suValuename("INHERITED_VALUE");
Bootstrap::get( suValuename, suGetname );
printUString( suGetname );
- CPPUNIT_ASSERT_MESSAGE("setIniFilename and get value of the argument.", suGetname.getLength() != 0 );
+ CPPUNIT_ASSERT_MESSAGE("setIniFilename and get value of the argument.", !suGetname.isEmpty());
}
CPPUNIT_TEST_SUITE(setIniFilename);
diff --git a/sal/workben/testfile.cxx b/sal/workben/testfile.cxx
index a670f7b..473e25a 100644
--- a/sal/workben/testfile.cxx
+++ b/sal/workben/testfile.cxx
@@ -2152,7 +2152,7 @@ void ConvertPathTest(rtl::OUString& strPath)
// getFileURLFromSystemPath
//--------------------------------------------------
- if ( strNormPath.getLength() != 0 )
+ if ( !strNormPath.isEmpty() )
{
rc=FileBase::getFileURLFromSystemPath( strNormPath, strFileURL );
@@ -2172,7 +2172,7 @@ void ConvertPathTest(rtl::OUString& strPath)
// getNormalizedPathFromFileURL
//--------------------------------------------------
- if ( strFileURL.getLength() != 0 )
+ if ( !strFileURL.isEmpty() )
{
rc=FileBase::getSystemPathFromFileURL( strFileURL, strNormPathFromFileURL );
@@ -2193,7 +2193,7 @@ void ConvertPathTest(rtl::OUString& strPath)
// getSystemPathFromFileURL
//--------------------------------------------------
- if ( strNormPath.getLength() != 0 )
+ if ( !strNormPath.isEmpty() )
{
rc=FileBase::getSystemPathFromFileURL( strNormPath, strSystemPath );
@@ -2331,7 +2331,7 @@ void SearchPathTest(void)
// searchFileURL (with a normalized path)
//--------------------------------------------------
- if ( strNormPath.getLength() != 0 )
+ if ( !strNormPath.isEmpty() )
{
printf( "\nSearch-Normalized-Path (with a normalized path) : ");
printFileName ( strNormPath );
@@ -2355,7 +2355,7 @@ void SearchPathTest(void)
// searchFileURL (with a File-URL)
//--------------------------------------------------
- if ( strFileURL.getLength() != 0 )
+ if ( !strFileURL.isEmpty() )
{
printf( "\nSearch-Normalized-Path (with a FileURL) : ");
printFileName( strFileURL );
@@ -2379,7 +2379,7 @@ void SearchPathTest(void)
// searchFileURL (with a systempath)
//--------------------------------------------------
- if ( strSystemPath.getLength() != 0 )
+ if ( !strSystemPath.isEmpty() )
{
printf( "\nSearch-Normalized-Path (with a SystemPath) : ");
printFileName( strSystemPath );
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index bcf3147..3243c23 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -180,7 +180,7 @@ sal_Bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView,
if (::comphelper::hasProperty(FM_PROP_HELPTEXT, xSet))
aHelpText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_HELPTEXT)).getStr();
- if (!aHelpText.getLength() && ::comphelper::hasProperty(FM_PROP_TARGET_URL, xSet))
+ if (aHelpText.isEmpty() && ::comphelper::hasProperty(FM_PROP_TARGET_URL, xSet))
{
OUString aText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_TARGET_URL));
INetURLObject aUrl(aText);
@@ -200,7 +200,7 @@ sal_Bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView,
}
}
}
- if ( aHelpText.getLength() != 0 )
+ if ( !aHelpText.isEmpty() )
{
// Hilfe anzeigen
Rectangle aItemRect = pObj->GetCurrentBoundRect();
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index c964fce..7a020ed 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -118,7 +118,7 @@ void FindTextFieldControl::SetTextToSelected_Impl()
{
}
- if ( aString.getLength() != 0 )
+ if ( !aString.isEmpty() )
{
SetText( aString );
GetModifyHdl().Call(this); // FIXME why SetText doesn't trigger this?
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 86cdd8c..b71f851 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2164,13 +2164,13 @@ void SdXMLExport::exportPresentationSettings()
if( !xPageName.is() )
continue;
- if( sTmp.getLength() != 0 )
+ if( !sTmp.isEmpty() )
sTmp.append( sal_Unicode( ',' ) );
sTmp.append( xPageName->getName() );
}
- if( sTmp.getLength() )
+ if( !sTmp.isEmpty() )
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PAGES, sTmp.makeStringAndClear() );
SvXMLElementExport aShows(*this, XML_NAMESPACE_PRESENTATION, XML_SHOW, sal_True, sal_True);
@@ -2685,7 +2685,7 @@ OUString SdXMLExport::getNavigationOrder( const Reference< XDrawPage >& xDrawPag
OUString sId( getInterfaceToIdentifierMapper().registerReference( Reference< XInterface >( xNavOrder->getByIndex( nIndex ), UNO_QUERY ) ) );
if( !sId.isEmpty() )
{
- if( sNavOrder.getLength() != 0 )
+ if( !sNavOrder.isEmpty() )
sNavOrder.append( (sal_Unicode)' ' );
sNavOrder.append( sId );
}
diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx
index 29ca53d..fb9f18c 100644
--- a/xmloff/source/style/fonthdl.cxx
+++ b/xmloff/source/style/fonthdl.cxx
@@ -96,7 +96,7 @@ sal_Bool XMLFontFamilyNamePropHdl::importXML( const OUString& rStrImpValue, uno:
if( nFirst <= nLast )
{
- if( sValue.getLength() != 0 )
+ if( !sValue.isEmpty() )
sValue.append(';');
sValue.append(rStrImpValue.copy( nFirst, nLast-nFirst+1));
@@ -107,7 +107,7 @@ sal_Bool XMLFontFamilyNamePropHdl::importXML( const OUString& rStrImpValue, uno:
}
while( -1 != nPos );
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
rValue <<= sValue.makeStringAndClear();
bRet = sal_True;
commit a2454a42ad2236f0f6b88be166bc7e6a8f90f036
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 9 17:22:11 2013 +0100
fdo#43460: use isEmpty()
Change-Id: I01f503ea5268245cc4f98524931730cfa063d57e
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 046376c..4fa65c7 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 b5662bb..2697c64 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 528508d..2602f34 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 5e31646..0a07e1d 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 b984de0..2de4b56 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 6b79f1d..cc9da4d 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 a3171c8..8138809 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 054fd77..f62383f 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 4f62ecd..81d1e55 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 ea3d366..e9e9024 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 ac42d7f..f8a9620 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 18fab17..ca5274d 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 6826fb9..0ea73cd 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 331016e..ad1c618 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 9a1233e..56d8926 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 92a0e14..f23287a 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 f824e5e..375ade4 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 5485511..8492457 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 3399400..0b24a47 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 87fb54d..a6a3f20 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 9516581..d9fc89a 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 30fe95e..bd9d201 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 bbdac2f..8c49561 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 7ea094b..3594ddd 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!" );
More information about the Libreoffice-commits
mailing list