View | Details | Raw Unified | Return to issue 123862
Collapse All | Expand All

(-)bridges/source/cpp_uno/shared/vtablefactory.cxx (-2 / +2 lines)
Lines 255-263 Link Here
255
    if (aSecurity.getHomeDir(strURLDirectory))
255
    if (aSecurity.getHomeDir(strURLDirectory))
256
        osl::File::getSystemPathFromFileURL(strURLDirectory, strDirectory);
256
        osl::File::getSystemPathFromFileURL(strURLDirectory, strDirectory);
257
257
258
    for (int i = strDirectory.getLength() == 0 ? 1 : 0; i < 2; ++i)
258
    for (int i = strDirectory.isEmpty() ? 1 : 0; i < 2; ++i)
259
    {
259
    {
260
        if (!strDirectory.getLength())
260
        if (strDirectory.isEmpty())
261
            strDirectory = rtl::OUString::createFromAscii("/tmp");
261
            strDirectory = rtl::OUString::createFromAscii("/tmp");
262
262
263
        strDirectory += rtl::OUString::createFromAscii("/.execoooXXXXXX");
263
        strDirectory += rtl::OUString::createFromAscii("/.execoooXXXXXX");
(-)bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx (-2 / +2 lines)
Lines 77-83 Link Here
77
	{
77
	{
78
		if( *pRTTI == ':' || ! *pRTTI )
78
		if( *pRTTI == ':' || ! *pRTTI )
79
		{
79
		{
80
			if( aRet.getLength() )
80
			if( !aRet.isEmpty() )
81
				aRet += ".";
81
				aRet += ".";
82
			aRet += rRTTIname.copy( pLast - pOrg, pRTTI - pLast );
82
			aRet += rRTTIname.copy( pLast - pOrg, pRTTI - pLast );
83
			while( *pRTTI == ':' )
83
			while( *pRTTI == ':' )
Lines 111-117 Link Here
111
111
112
static OString toRTTImangledname( const OString & rRTTIname )
112
static OString toRTTImangledname( const OString & rRTTIname )
113
{
113
{
114
	if( ! rRTTIname.getLength() )
114
	if( rRTTIname.isEmpty() )
115
		return OString();
115
		return OString();
116
116
117
	OStringBuffer aRet( rRTTIname.getLength()*2 );
117
	OStringBuffer aRet( rRTTIname.getLength()*2 );
(-)bridges/source/cpp_uno/cc50_solaris_intel/except.cxx (-2 / +2 lines)
Lines 75-81 Link Here
75
	{
75
	{
76
		if( *pRTTI == ':' || ! *pRTTI )
76
		if( *pRTTI == ':' || ! *pRTTI )
77
		{
77
		{
78
			if( aRet.getLength() )
78
			if( !aRet.isEmpty() )
79
				aRet += ".";
79
				aRet += ".";
80
			aRet += rRTTIname.copy( pLast - pOrg, pRTTI - pLast );
80
			aRet += rRTTIname.copy( pLast - pOrg, pRTTI - pLast );
81
			while( *pRTTI == ':' )
81
			while( *pRTTI == ':' )
Lines 109-115 Link Here
109
109
110
static OString toRTTImangledname( const OString & rRTTIname )
110
static OString toRTTImangledname( const OString & rRTTIname )
111
{
111
{
112
	if( ! rRTTIname.getLength() )
112
	if( rRTTIname.isEmpty() )
113
		return OString();
113
		return OString();
114
114
115
	OStringBuffer aRet( rRTTIname.getLength()*2 );
115
	OStringBuffer aRet( rRTTIname.getLength()*2 );
(-)bridges/source/jni_uno/jni_data.cxx (-1 / +1 lines)
Lines 1800-1806 Link Here
1800
                // polymorphic struct types:
1800
                // polymorphic struct types:
1801
                rtl::OUString const & name = rtl::OUString::unacquired(
1801
                rtl::OUString const & name = rtl::OUString::unacquired(
1802
                    &pAny->pType->pTypeName);
1802
                    &pAny->pType->pTypeName);
1803
                OSL_ASSERT(name.getLength() > 0);
1803
                OSL_ASSERT(!name.isEmpty());
1804
                if (name[name.getLength() - 1] == '>')
1804
                if (name[name.getLength() - 1] == '>')
1805
                {
1805
                {
1806
                    // Box up in com.sun.star.uno.Any:
1806
                    // Box up in com.sun.star.uno.Any:
(-)binaryurp/source/writer.cxx (-1 / +1 lines)
Lines 210-216 Link Here
210
    std::vector< BinaryAny > const & inArguments, bool currentContextMode,
210
    std::vector< BinaryAny > const & inArguments, bool currentContextMode,
211
    css::uno::UnoInterfaceReference const & currentContext)
211
    css::uno::UnoInterfaceReference const & currentContext)
212
{
212
{
213
    OSL_ASSERT(tid.getLength() != 0 && oid.getLength() != 0 && member.is());
213
    OSL_ASSERT(tid.getLength() != 0 && !oid.isEmpty() && member.is());
214
    css::uno::TypeDescription t(type);
214
    css::uno::TypeDescription t(type);
215
    sal_Int32 functionId = 0;
215
    sal_Int32 functionId = 0;
216
    bool forceSynchronous = false;
216
    bool forceSynchronous = false;
(-)binaryurp/source/bridge.cxx (-4 / +4 lines)
Lines 327-333 Link Here
327
    rtl::OUString const & oid, css::uno::TypeDescription const & type)
327
    rtl::OUString const & oid, css::uno::TypeDescription const & type)
328
{
328
{
329
    OSL_ASSERT(type.is());
329
    OSL_ASSERT(type.is());
330
    if (oid.getLength() == 0) {
330
    if ( oid.isEmpty() ) {
331
        return css::uno::UnoInterfaceReference();
331
        return css::uno::UnoInterfaceReference();
332
    }
332
    }
333
    css::uno::UnoInterfaceReference obj(findStub(oid, type));
333
    css::uno::UnoInterfaceReference obj(findStub(oid, type));
Lines 410-416 Link Here
410
css::uno::UnoInterfaceReference Bridge::findStub(
410
css::uno::UnoInterfaceReference Bridge::findStub(
411
    rtl::OUString const & oid, css::uno::TypeDescription const & type)
411
    rtl::OUString const & oid, css::uno::TypeDescription const & type)
412
{
412
{
413
    OSL_ASSERT(oid.getLength() != 0 && type.is());
413
    OSL_ASSERT(!oid.isEmpty() && type.is());
414
    osl::MutexGuard g(mutex_);
414
    osl::MutexGuard g(mutex_);
415
    Stubs::iterator i(stubs_.find(oid));
415
    Stubs::iterator i(stubs_.find(oid));
416
    if (i != stubs_.end()) {
416
    if (i != stubs_.end()) {
Lines 432-438 Link Here
432
void Bridge::releaseStub(
432
void Bridge::releaseStub(
433
    rtl::OUString const & oid, css::uno::TypeDescription const & type)
433
    rtl::OUString const & oid, css::uno::TypeDescription const & type)
434
{
434
{
435
    OSL_ASSERT(oid.getLength() != 0 && type.is());
435
    OSL_ASSERT(!oid.isEmpty() && type.is());
436
    css::uno::UnoInterfaceReference obj;
436
    css::uno::UnoInterfaceReference obj;
437
    bool unused;
437
    bool unused;
438
    {
438
    {
Lines 796-802 Link Here
796
css::uno::Reference< css::uno::XInterface > Bridge::getInstance(
796
css::uno::Reference< css::uno::XInterface > Bridge::getInstance(
797
    rtl::OUString const & sInstanceName) throw (css::uno::RuntimeException)
797
    rtl::OUString const & sInstanceName) throw (css::uno::RuntimeException)
798
{
798
{
799
    if (sInstanceName.getLength() == 0) {
799
    if ( sInstanceName.isEmpty() ) {
800
        throw css::uno::RuntimeException(
800
        throw css::uno::RuntimeException(
801
            rtl::OUString(
801
            rtl::OUString(
802
                RTL_CONSTASCII_USTRINGPARAM(
802
                RTL_CONSTASCII_USTRINGPARAM(
(-)binaryurp/source/reader.cxx (-2 / +2 lines)
Lines 210-216 Link Here
210
    rtl::OUString oid;
210
    rtl::OUString oid;
211
    if (newOid) {
211
    if (newOid) {
212
        oid = unmarshal.readOid();
212
        oid = unmarshal.readOid();
213
        if (oid.getLength() == 0) {
213
        if ( oid.isEmpty() ) {
214
            throw css::io::IOException(
214
            throw css::io::IOException(
215
                rtl::OUString(
215
                rtl::OUString(
216
                    RTL_CONSTASCII_USTRINGPARAM(
216
                    RTL_CONSTASCII_USTRINGPARAM(
Lines 219-225 Link Here
219
        }
219
        }
220
        lastOid_ = oid;
220
        lastOid_ = oid;
221
    } else {
221
    } else {
222
        if (lastOid_.getLength() == 0) {
222
        if ( lastOid_.isEmpty() ) {
223
            throw css::uno::RuntimeException(
223
            throw css::uno::RuntimeException(
224
                rtl::OUString(
224
                rtl::OUString(
225
                    RTL_CONSTASCII_USTRINGPARAM(
225
                    RTL_CONSTASCII_USTRINGPARAM(
(-)binaryurp/source/unmarshal.cxx (-2 / +2 lines)
Lines 244-251 Link Here
244
        }
244
        }
245
    }
245
    }
246
    sal_uInt16 idx = readCacheIndex();
246
    sal_uInt16 idx = readCacheIndex();
247
    if (oid.getLength() == 0 && idx != cache::ignore) {
247
    if (oid.isEmpty() && idx != cache::ignore) {
248
        if (state_.oidCache[idx].getLength() == 0) {
248
        if ( state_.oidCache[idx].isEmpty() ) {
249
            throw css::io::IOException(
249
            throw css::io::IOException(
250
                rtl::OUString(
250
                rtl::OUString(
251
                    RTL_CONSTASCII_USTRINGPARAM(
251
                    RTL_CONSTASCII_USTRINGPARAM(
(-)binaryurp/source/marshal.cxx (-1 / +1 lines)
Lines 162-168 Link Here
162
{
162
{
163
    bool found;
163
    bool found;
164
    sal_uInt16 idx;
164
    sal_uInt16 idx;
165
    if (oid.getLength() == 0) {
165
    if ( oid.isEmpty() ) {
166
        found = true;
166
        found = true;
167
        idx = cache::ignore;
167
        idx = cache::ignore;
168
    } else {
168
    } else {
(-)binaryurp/source/bridgefactory.cxx (-2 / +2 lines)
Lines 75-81 Link Here
75
    OSL_ASSERT(bridge.is());
75
    OSL_ASSERT(bridge.is());
76
    rtl::OUString n(bridge->getName());
76
    rtl::OUString n(bridge->getName());
77
    osl::MutexGuard g(*this);
77
    osl::MutexGuard g(*this);
78
    if (n.getLength() == 0) {
78
    if ( n.isEmpty() ) {
79
        BridgeList::iterator i(
79
        BridgeList::iterator i(
80
            std::find(unnamed_.begin(), unnamed_.end(), bridge));
80
            std::find(unnamed_.begin(), unnamed_.end(), bridge));
81
        if (i != unnamed_.end()) {
81
        if (i != unnamed_.end()) {
Lines 149-155 Link Here
149
                static_cast< cppu::OWeakObject * >(this), -1);
149
                static_cast< cppu::OWeakObject * >(this), -1);
150
        }
150
        }
151
        b.set(new Bridge(this, sName, aConnection, anInstanceProvider));
151
        b.set(new Bridge(this, sName, aConnection, anInstanceProvider));
152
        if (sName.getLength() == 0) {
152
        if ( sName.isEmpty() ) {
153
            unnamed_.push_back(
153
            unnamed_.push_back(
154
                css::uno::Reference< css::bridge::XBridge >(b.get()));
154
                css::uno::Reference< css::bridge::XBridge >(b.get()));
155
        } else {
155
        } else {
(-)basic/source/comp/sbcomp.cxx (-2 / +2 lines)
Lines 589-595 Link Here
589
	const TraceTextData& rTraceTextData = itInner->second;
589
	const TraceTextData& rTraceTextData = itInner->second;
590
	const rtl::OString& rStr_STMNT = rTraceTextData.m_aTraceStr_STMNT;
590
	const rtl::OString& rStr_STMNT = rTraceTextData.m_aTraceStr_STMNT;
591
	bool bSTMT = false;
591
	bool bSTMT = false;
592
	if( rStr_STMNT.getLength() )
592
	if( !rStr_STMNT.isEmpty() )
593
		bSTMT = true;
593
		bSTMT = true;
594
594
595
	char TimeBuffer[200];
595
	char TimeBuffer[200];
Lines 619-625 Link Here
619
619
620
	nIndent += GnIndentForPCode;
620
	nIndent += GnIndentForPCode;
621
	const rtl::OString& rStr_PCode = rTraceTextData.m_aTraceStr_PCode;
621
	const rtl::OString& rStr_PCode = rTraceTextData.m_aTraceStr_PCode;
622
	if( rStr_PCode.getLength() )
622
	if( !rStr_PCode.isEmpty() )
623
	{
623
	{
624
		lcl_lineOut( rStr_PCode.getStr(), lcl_getSpaces( nIndent ),
624
		lcl_lineOut( rStr_PCode.getStr(), lcl_getSpaces( nIndent ),
625
			bPrintTimeStamp ? TimeBuffer : NULL );
625
			bPrintTimeStamp ? TimeBuffer : NULL );
(-)basic/source/basmgr/vbahelper.cxx (-2 / +2 lines)
Lines 220-226 Link Here
220
220
221
void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, const ::rtl::OUString& rPath )
221
void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, const ::rtl::OUString& rPath )
222
{
222
{
223
    if( rPath.getLength() > 0 )
223
    if( !rPath.isEmpty() )
224
    {
224
    {
225
        CurrDirPool& rPool = StaticCurrDirPool::get();
225
        CurrDirPool& rPool = StaticCurrDirPool::get();
226
        ::osl::MutexGuard aGuard( rPool.maMutex );
226
        ::osl::MutexGuard aGuard( rPool.maMutex );
Lines 228-234 Link Here
228
        {
228
        {
229
            uno::Reference< frame::XModuleManager > xModuleManager( lclCreateModuleManager(), uno::UNO_SET_THROW );
229
            uno::Reference< frame::XModuleManager > xModuleManager( lclCreateModuleManager(), uno::UNO_SET_THROW );
230
            ::rtl::OUString aIdentifier = xModuleManager->identify( rxModel );
230
            ::rtl::OUString aIdentifier = xModuleManager->identify( rxModel );
231
            if( aIdentifier.getLength() > 0 )
231
            if( !aIdentifier.isEmpty() )
232
                rPool.maCurrDirs[ aIdentifier ] = rPath;
232
                rPool.maCurrDirs[ aIdentifier ] = rPath;
233
        }
233
        }
234
        catch( uno::Exception& )
234
        catch( uno::Exception& )
(-)basic/source/basmgr/basmgr.cxx (-3 / +3 lines)
Lines 270-276 Link Here
270
void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent& Event )
270
void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent& Event )
271
	throw( RuntimeException )
271
	throw( RuntimeException )
272
{
272
{
273
	sal_Bool bLibContainer = ( maLibName.getLength() == 0 );
273
	sal_Bool bLibContainer = maLibName.isEmpty();
274
	::rtl::OUString aName;
274
	::rtl::OUString aName;
275
	Event.Accessor >>= aName;
275
	Event.Accessor >>= aName;
276
276
Lines 326-332 Link Here
326
326
327
	// Replace not possible for library container
327
	// Replace not possible for library container
328
#ifdef DBG_UTIL
328
#ifdef DBG_UTIL
329
	sal_Bool bLibContainer = ( maLibName.getLength() == 0 );
329
	sal_Bool bLibContainer = maLibName.isEmpty();
330
#endif
330
#endif
331
    DBG_ASSERT( !bLibContainer, "library container fired elementReplaced()");
331
    DBG_ASSERT( !bLibContainer, "library container fired elementReplaced()");
332
332
Lines 356-362 Link Here
356
356
357
    mpMgr->mpImpl->mbModifiedByLibraryContainer = sal_True;
357
    mpMgr->mpImpl->mbModifiedByLibraryContainer = sal_True;
358
358
359
	sal_Bool bLibContainer = ( maLibName.getLength() == 0 );
359
	sal_Bool bLibContainer = maLibName.isEmpty();
360
	if( bLibContainer )
360
	if( bLibContainer )
361
	{
361
	{
362
		StarBASIC* pLib = mpMgr->GetLib( aName );
362
		StarBASIC* pLib = mpMgr->GetLib( aName );
(-)basic/source/classes/image.cxx (-1 / +1 lines)
Lines 298-304 Link Here
298
		SbiCloseRecord( r, nPos );
298
		SbiCloseRecord( r, nPos );
299
	}
299
	}
300
	// Source?
300
	// Source?
301
	if( aOUSource.getLength() && SbiGood( r ) )
301
	if( !aOUSource.isEmpty() && SbiGood( r ) )
302
	{
302
	{
303
		nPos = SbiOpenRecord( r, B_SOURCE, 1 );
303
		nPos = SbiOpenRecord( r, B_SOURCE, 1 );
304
        String aTmp;
304
        String aTmp;
(-)basic/source/classes/sbunoobj.cxx (-6 / +6 lines)
Lines 333-339 Link Here
333
    lcl_indent( _inout_rBuffer, _nLevel );
333
    lcl_indent( _inout_rBuffer, _nLevel );
334
    _inout_rBuffer.appendAscii( "Type: " );
334
    _inout_rBuffer.appendAscii( "Type: " );
335
335
336
    if ( _rExceptionType.getLength() == 0 )
336
    if ( _rExceptionType.isEmpty() )
337
        _inout_rBuffer.appendAscii( "Unknown" );
337
        _inout_rBuffer.appendAscii( "Unknown" );
338
    else
338
    else
339
        _inout_rBuffer.append( _rExceptionType );
339
        _inout_rBuffer.append( _rExceptionType );
Lines 1773-1779 Link Here
1773
				{
1773
				{
1774
					rtl::OUString sTypeName;
1774
					rtl::OUString sTypeName;
1775
					xInv->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$GetTypeName") ) ) >>= sTypeName;
1775
					xInv->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$GetTypeName") ) ) >>= sTypeName;
1776
					if ( sTypeName.getLength() == 0 || sTypeName.equals(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IDispatch") ) ) )
1776
					if ( sTypeName.isEmpty() || sTypeName.equals(  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IDispatch") ) ) )
1777
						// can't check type, leave it pass
1777
						// can't check type, leave it pass
1778
						result = true;	
1778
						result = true;	
1779
					else
1779
					else
Lines 2298-2304 Link Here
2298
														bBlockConversionToSmallestType );
2298
														bBlockConversionToSmallestType );
2299
2299
2300
							::rtl::OUString aParamName = pNames[iSbx];
2300
							::rtl::OUString aParamName = pNames[iSbx];
2301
							if( aParamName.getLength() )
2301
							if( !aParamName.isEmpty() )
2302
							{
2302
							{
2303
								oleautomation::NamedArgument aNamedArgument;
2303
								oleautomation::NamedArgument aNamedArgument;
2304
								aNamedArgument.Name = aParamName;
2304
								aNamedArgument.Name = aParamName;
Lines 2755-2761 Link Here
2755
			if( mxExactName.is() )
2755
			if( mxExactName.is() )
2756
			{
2756
			{
2757
				::rtl::OUString aUExactName = mxExactName->getExactName( aUName );
2757
				::rtl::OUString aUExactName = mxExactName->getExactName( aUName );
2758
				if( aUExactName.getLength() )
2758
				if( !aUExactName.isEmpty() )
2759
					aUName = aUExactName;
2759
					aUName = aUExactName;
2760
			}
2760
			}
2761
			if( mxUnoAccess->hasProperty( aUName, PropertyConcept::ALL - PropertyConcept::DANGEROUS ) )
2761
			if( mxUnoAccess->hasProperty( aUName, PropertyConcept::ALL - PropertyConcept::DANGEROUS ) )
Lines 2831-2837 Link Here
2831
			if( mxExactNameInvocation.is() )
2831
			if( mxExactNameInvocation.is() )
2832
			{
2832
			{
2833
				::rtl::OUString aUExactName = mxExactNameInvocation->getExactName( aUName );
2833
				::rtl::OUString aUExactName = mxExactNameInvocation->getExactName( aUName );
2834
				if( aUExactName.getLength() )
2834
				if( !aUExactName.isEmpty() )
2835
					aUName = aUExactName;
2835
					aUName = aUExactName;
2836
			}
2836
			}
2837
2837
Lines 4778-4784 Link Here
4778
		SbxVariable* pVar = pModIfaces->Get( i );
4778
		SbxVariable* pVar = pModIfaces->Get( i );
4779
		::rtl::OUString aIfaceName = pVar->GetName();
4779
		::rtl::OUString aIfaceName = pVar->GetName();
4780
4780
4781
		if( aIfaceName.getLength() != 0 )
4781
		if( !aIfaceName.isEmpty() )
4782
		{
4782
		{
4783
			::rtl::OUString aPureIfaceName = aIfaceName;
4783
			::rtl::OUString aPureIfaceName = aIfaceName;
4784
			sal_Int32 indexLastDot = aIfaceName.lastIndexOf('.');
4784
			sal_Int32 indexLastDot = aIfaceName.lastIndexOf('.');
(-)basic/source/uno/namecont.cxx (-7 / +7 lines)
Lines 605-611 Link Here
605
    meInitMode = DEFAULT;
605
    meInitMode = DEFAULT;
606
    INetURLObject aInitUrlInetObj( maInitialDocumentURL );
606
    INetURLObject aInitUrlInetObj( maInitialDocumentURL );
607
    OUString aInitFileName = aInitUrlInetObj.GetMainURL( INetURLObject::NO_DECODE );
607
    OUString aInitFileName = aInitUrlInetObj.GetMainURL( INetURLObject::NO_DECODE );
608
    if( aInitFileName.getLength() )
608
    if( !aInitFileName.isEmpty() )
609
    {
609
    {
610
        // We need a BasicManager to avoid problems
610
        // We need a BasicManager to avoid problems
611
        StarBASIC* pBas = new StarBASIC();
611
        StarBASIC* pBas = new StarBASIC();
Lines 834-840 Link Here
834
834
835
			    // Check storage URL
835
			    // Check storage URL
836
			    OUString aStorageURL = rLib.aStorageURL;
836
			    OUString aStorageURL = rLib.aStorageURL;
837
			    if( !bStorage && !aStorageURL.getLength() && nPass == 0 )
837
			    if( !bStorage && aStorageURL.isEmpty() && nPass == 0 )
838
			    {
838
			    {
839
					String aLibraryPath;
839
					String aLibraryPath;
840
					if( meInitMode == CONTAINER_INIT_FILE )
840
					if( meInitMode == CONTAINER_INIT_FILE )
Lines 1239-1245 Link Here
1239
	rtl::OUString aLibURL;
1239
	rtl::OUString aLibURL;
1240
1240
1241
	bool bPureDialogLib = false;
1241
	bool bPureDialogLib = false;
1242
	while( (aLibURL = aScriptIt.nextBasicOrDialogLibrary( bPureDialogLib )).getLength() > 0 )
1242
	while( (aLibURL = aScriptIt.nextBasicOrDialogLibrary( bPureDialogLib )).isEmpty() == false )
1243
	{
1243
	{
1244
		if( bPureDialogLib && maInfoFileName.equalsAscii( "script" ) )
1244
		if( bPureDialogLib && maInfoFileName.equalsAscii( "script" ) )
1245
			continue;
1245
			continue;
Lines 1351-1357 Link Here
1351
    ( SfxLibrary* pLib, const OUString& aName )
1351
    ( SfxLibrary* pLib, const OUString& aName )
1352
{
1352
{
1353
	OUString aLibDirPath = pLib->maStorageURL;
1353
	OUString aLibDirPath = pLib->maStorageURL;
1354
	if( !aLibDirPath.getLength() )
1354
	if( aLibDirPath.isEmpty() )
1355
    {
1355
    {
1356
		INetURLObject aInetObj( String(maLibraryPath).GetToken(1) );
1356
		INetURLObject aInetObj( String(maLibraryPath).GetToken(1) );
1357
		aInetObj.insertName( aName, sal_True, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL );
1357
		aInetObj.insertName( aName, sal_True, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL );
Lines 1976-1982 Link Here
1976
1976
1977
    // if we did an in-place save into a storage (i.e. a save into the storage we were already based on),
1977
    // if we did an in-place save into a storage (i.e. a save into the storage we were already based on),
1978
    // then we need to clean up the temporary storage we used for this
1978
    // then we need to clean up the temporary storage we used for this
1979
    if ( bInplaceStorage && sTempTargetStorName.getLength() )
1979
    if ( bInplaceStorage && !sTempTargetStorName.isEmpty() )
1980
    {
1980
    {
1981
        OSL_ENSURE( xSourceLibrariesStor.is(), "SfxLibrariesContainer::storeLibraries_impl: unexpected: we should have a source storage here!" );
1981
        OSL_ENSURE( xSourceLibrariesStor.is(), "SfxLibrariesContainer::storeLibraries_impl: unexpected: we should have a source storage here!" );
1982
        try
1982
        try
Lines 3119-3125 Link Here
3119
	implSetModified( sal_True );
3119
	implSetModified( sal_True );
3120
3120
3121
    // Remove element file
3121
    // Remove element file
3122
	if( maStorageURL.getLength() )
3122
	if( !maStorageURL.isEmpty() )
3123
	{
3123
	{
3124
		INetURLObject aElementInetObj( maStorageURL );
3124
		INetURLObject aElementInetObj( maStorageURL );
3125
		aElementInetObj.insertName( _rElementName, sal_False,
3125
		aElementInetObj.insertName( _rElementName, sal_False,
Lines 3254-3260 Link Here
3254
{
3254
{
3255
	rtl::OUString aRetLib;
3255
	rtl::OUString aRetLib;
3256
3256
3257
	while( !aRetLib.getLength() && m_eState != END_REACHED )
3257
	while( aRetLib.isEmpty() && m_eState != END_REACHED )
3258
	{
3258
	{
3259
		switch( m_eState )
3259
		switch( m_eState )
3260
		{
3260
		{
(-)basic/source/uno/scriptcont.cxx (-4 / +4 lines)
Lines 304-310 Link Here
304
    // TODO: Check language
304
    // TODO: Check language
305
	// aMod.aLanguage
305
	// aMod.aLanguage
306
	// aMod.aName ignored
306
	// aMod.aName ignored
307
	if( aMod.aModuleType.getLength() > 0 )
307
	if( !aMod.aModuleType.isEmpty() )
308
	{
308
	{
309
        /*  If in VBA compatibility mode, force creation of the VBA Globals
309
        /*  If in VBA compatibility mode, force creation of the VBA Globals
310
            object. Each application will create an instance of its own
310
            object. Each application will create an instance of its own
Lines 474-481 Link Here
474
    if( OldPassword == NewPassword )
474
    if( OldPassword == NewPassword )
475
        return;
475
        return;
476
476
477
    sal_Bool bOldPassword = ( OldPassword.getLength() > 0 );
477
    sal_Bool bOldPassword = !OldPassword.isEmpty();
478
    sal_Bool bNewPassword = ( NewPassword.getLength() > 0 );
478
    sal_Bool bNewPassword = !NewPassword.isEmpty();
479
	sal_Bool bStorage = mxStorage.is() && !pImplLib->mbLink;
479
	sal_Bool bStorage = mxStorage.is() && !pImplLib->mbLink;
480
480
481
    if( pImplLib->mbReadOnly || (bOldPassword && !pImplLib->mbPasswordProtected) )
481
    if( pImplLib->mbReadOnly || (bOldPassword && !pImplLib->mbPasswordProtected) )
Lines 1264-1270 Link Here
1264
{
1264
{
1265
	OUString sModuleText;
1265
	OUString sModuleText;
1266
    aElement >>= sModuleText;
1266
    aElement >>= sModuleText;
1267
	return ( sModuleText.getLength() > 0 );
1267
	return ( !sModuleText.isEmpty() );
1268
}
1268
}
1269
1269
1270
bool SAL_CALL SfxScriptLibrary::isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const
1270
bool SAL_CALL SfxScriptLibrary::isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const
(-)basic/source/runtime/methods1.cxx (-3 / +3 lines)
Lines 1597-1605 Link Here
1597
		String aStr = rPar.Get(1)->GetString();
1597
		String aStr = rPar.Get(1)->GetString();
1598
        INetURLObject aURLObj( aStr, INET_PROT_FILE );
1598
        INetURLObject aURLObj( aStr, INET_PROT_FILE );
1599
	    ::rtl::OUString aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
1599
	    ::rtl::OUString aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
1600
	    if( !aFileURL.getLength() )
1600
	    if( aFileURL.isEmpty() )
1601
            ::osl::File::getFileURLFromSystemPath( aFileURL, aFileURL );
1601
            ::osl::File::getFileURLFromSystemPath( aFileURL, aFileURL );
1602
	    if( !aFileURL.getLength() )
1602
	    if( aFileURL.isEmpty() )
1603
            aFileURL = aStr;
1603
            aFileURL = aStr;
1604
		rPar.Get(0)->PutString( String(aFileURL) );
1604
		rPar.Get(0)->PutString( String(aFileURL) );
1605
	}
1605
	}
Lines 1617-1623 Link Here
1617
		String aStr = rPar.Get(1)->GetString();
1617
		String aStr = rPar.Get(1)->GetString();
1618
	    ::rtl::OUString aSysPath;
1618
	    ::rtl::OUString aSysPath;
1619
	    ::osl::File::getSystemPathFromFileURL( aStr, aSysPath );
1619
	    ::osl::File::getSystemPathFromFileURL( aStr, aSysPath );
1620
	    if( !aSysPath.getLength() )
1620
	    if( aSysPath.isEmpty() )
1621
            aSysPath = aStr;
1621
            aSysPath = aStr;
1622
		rPar.Get(0)->PutString( String(aSysPath) );
1622
		rPar.Get(0)->PutString( String(aSysPath) );
1623
	}
1623
	}
(-)basic/source/runtime/methods.cxx (-2 / +2 lines)
Lines 169-175 Link Here
169
	INetURLObject aURLObj( aRelPath );
169
	INetURLObject aURLObj( aRelPath );
170
	aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
170
	aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
171
171
172
	if( !aFileURL.getLength() )
172
	if( aFileURL.isEmpty() )
173
	{
173
	{
174
		File::getFileURLFromSystemPath( aRelPath, aFileURL );
174
		File::getFileURLFromSystemPath( aRelPath, aFileURL );
175
	}
175
	}
Lines 283-289 Link Here
283
		if ( bVBA && rPar.Count() > 1 )
283
		if ( bVBA && rPar.Count() > 1 )
284
		{
284
		{
285
			com::sun::star::uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() );
285
			com::sun::star::uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() );
286
			if ( xErrObj.is() && xErrObj->getNumber() == nCode && xErrObj->getDescription().getLength() )
286
			if ( xErrObj.is() && xErrObj->getNumber() == nCode && !xErrObj->getDescription().isEmpty() )
287
				tmpErrMsg = xErrObj->getDescription();
287
				tmpErrMsg = xErrObj->getDescription();
288
		}
288
		}
289
		rPar.Get( 0 )->PutString( tmpErrMsg );
289
		rPar.Get( 0 )->PutString( tmpErrMsg );
(-)basic/source/runtime/dllmgr.cxx (-1 / +1 lines)
Lines 577-583 Link Here
577
SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc)
577
SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc)
578
{
578
{
579
    OSL_ASSERT(proc != 0);
579
    OSL_ASSERT(proc != 0);
580
    if (name.getLength() != 0 && name[0] == '@') { //TODO: "@" vs. "#"???
580
    if ( !name.isEmpty() && name[0] == '@' ) { //TODO: "@" vs. "#"???
581
        sal_Int32 n = name.copy(1).toInt32(); //TODO: handle bad input
581
        sal_Int32 n = name.copy(1).toInt32(); //TODO: handle bad input
582
        if (n <= 0 || n > 0xFFFF) {
582
        if (n <= 0 || n > 0xFFFF) {
583
            return ERRCODE_BASIC_BAD_ARGUMENT; //TODO: more specific errcode?
583
            return ERRCODE_BASIC_BAD_ARGUMENT; //TODO: more specific errcode?
(-)basic/source/runtime/iosys.cxx (-1 / +1 lines)
Lines 274-280 Link Here
274
			const Reference< XBridge >& rxBridge = pBridges[ i ];
274
			const Reference< XBridge >& rxBridge = pBridges[ i ];
275
			::rtl::OUString aDescription = rxBridge->getDescription();
275
			::rtl::OUString aDescription = rxBridge->getDescription();
276
			::rtl::OUString aPortalUser = findUserInDescription( aDescription );
276
			::rtl::OUString aPortalUser = findUserInDescription( aDescription );
277
			if( aPortalUser.getLength() > 0 )
277
			if( !aPortalUser.isEmpty() )
278
			{
278
			{
279
				// User Found, compare to system user
279
				// User Found, compare to system user
280
				if( aPortalUser == aSystemUser )
280
				if( aPortalUser == aSystemUser )
(-)basic/source/runtime/step2.cxx (-2 / +2 lines)
Lines 424-430 Link Here
424
							rtl::OUString sDefaultMethod;
424
							rtl::OUString sDefaultMethod;
425
							if ( xDfltMethod.is() )
425
							if ( xDfltMethod.is() )
426
								sDefaultMethod = xDfltMethod->getDefaultMethodName();
426
								sDefaultMethod = xDfltMethod->getDefaultMethodName();
427
							if ( sDefaultMethod.getLength() )
427
							if ( !sDefaultMethod.isEmpty() )
428
							{
428
							{
429
								SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD );
429
								SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD );
430
								if( meth != NULL )
430
								if( meth != NULL )
Lines 592-598 Link Here
592
                            else if( xIndexAccess.is() )
592
                            else if( xIndexAccess.is() )
593
                                sDefaultMethod = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getByIndex" ) );
593
                                sDefaultMethod = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getByIndex" ) );
594
594
595
                            if ( sDefaultMethod.getLength() )
595
                            if ( !sDefaultMethod.isEmpty() )
596
                            {
596
                            {
597
                                SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD );
597
                                SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD );
598
                                SbxVariableRef refTemp = meth;
598
                                SbxVariableRef refTemp = meth;
(-)basctl/source/dlged/dlgedobj.cxx (-1 / +1 lines)
Lines 518-524 Link Here
518
		Reference< container::XNameAccess > xNameAcc((GetDlgEdForm()->GetUnoControlModel()), UNO_QUERY);
518
		Reference< container::XNameAccess > xNameAcc((GetDlgEdForm()->GetUnoControlModel()), UNO_QUERY);
519
		if ( xNameAcc.is() && xNameAcc->hasByName(aOldName) )
519
		if ( xNameAcc.is() && xNameAcc->hasByName(aOldName) )
520
		{	
520
		{	
521
			if ( !xNameAcc->hasByName(aNewName) && aNewName.getLength() != 0 )
521
			if ( !xNameAcc->hasByName(aNewName) && !aNewName.isEmpty() )
522
			{
522
			{
523
				// remove the control by the old name and insert the control by the new name in the container 
523
				// remove the control by the old name and insert the control by the new name in the container 
524
				Reference< container::XNameContainer > xCont(xNameAcc, UNO_QUERY );
524
				Reference< container::XNameContainer > xCont(xNameAcc, UNO_QUERY );
(-)basctl/source/basicide/scriptdocument.cxx (-3 / +3 lines)
Lines 1002-1008 Link Here
1002
                }
1002
                }
1003
            }
1003
            }
1004
1004
1005
            if ( aFileURL.getLength() )
1005
            if ( !aFileURL.isEmpty() )
1006
            {
1006
            {
1007
                ::osl::DirectoryItem aFileItem;
1007
                ::osl::DirectoryItem aFileItem;
1008
                ::osl::FileStatus aFileStatus( FileStatusMask_FileURL );
1008
                ::osl::FileStatus aFileStatus( FileStatusMask_FileURL );
Lines 1164-1170 Link Here
1164
    ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption )
1164
    ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption )
1165
    {
1165
    {
1166
        ScriptDocument aDocument( getApplicationScriptDocument() );
1166
        ScriptDocument aDocument( getApplicationScriptDocument() );
1167
        if ( _rUrlOrCaption.getLength() == 0 )
1167
        if ( _rUrlOrCaption.isEmpty() )
1168
            return aDocument;
1168
            return aDocument;
1169
1169
1170
        docs::Documents aDocuments;
1170
        docs::Documents aDocuments;
Lines 1521-1527 Link Here
1521
    LibraryLocation ScriptDocument::getLibraryLocation( const ::rtl::OUString& _rLibName ) const
1521
    LibraryLocation ScriptDocument::getLibraryLocation( const ::rtl::OUString& _rLibName ) const
1522
    {
1522
    {
1523
        LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN;
1523
        LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN;
1524
        if ( _rLibName.getLength() )
1524
        if ( !_rLibName.isEmpty() )
1525
        {
1525
        {
1526
            if ( isDocument() )
1526
            if ( isDocument() )
1527
            {
1527
            {
(-)basctl/source/basicide/localizationmgr.cxx (-3 / +3 lines)
Lines 183-189 Link Here
183
	aPureIdStr += aDot;
183
	aPureIdStr += aDot;
184
	aPureIdStr += aDialogName;
184
	aPureIdStr += aDialogName;
185
	aPureIdStr += aDot;
185
	aPureIdStr += aDot;
186
	if( aCtrlName.getLength() )
186
	if( !aCtrlName.isEmpty() )
187
	{
187
	{
188
		aPureIdStr += aCtrlName;
188
		aPureIdStr += aCtrlName;
189
		aPureIdStr += aDot;
189
		aPureIdStr += aDot;
Lines 243-249 Link Here
243
					// Replace string by id, add id+string to StringResource
243
					// Replace string by id, add id+string to StringResource
244
					if( eMode == SET_IDS )
244
					if( eMode == SET_IDS )
245
					{
245
					{
246
						bool bEscAlreadyExisting = (aPropStr.getLength() && aPropStr.getStr()[0] == '&' );
246
						bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' );
247
						if( bEscAlreadyExisting )
247
						if( bEscAlreadyExisting )
248
							continue;
248
							continue;
249
249
Lines 436-442 Link Here
436
						for ( i = 0; i < nPropStringCount; ++i )
436
						for ( i = 0; i < nPropStringCount; ++i )
437
						{
437
						{
438
							::rtl::OUString aPropStr = pPropStrings[i];
438
							::rtl::OUString aPropStr = pPropStrings[i];
439
							bool bEscAlreadyExisting = (aPropStr.getLength() && aPropStr.getStr()[0] == '&' );
439
							bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' );
440
							if( bEscAlreadyExisting )
440
							if( bEscAlreadyExisting )
441
							{
441
							{
442
								pIdStrings[i] = aPropStr;
442
								pIdStrings[i] = aPropStr;
(-)basctl/source/basicide/bastype2.cxx (-1 / +1 lines)
Lines 781-787 Link Here
781
            }
781
            }
782
        }
782
        }
783
783
784
        if ( sFactoryURL.getLength() )
784
        if ( !sFactoryURL.isEmpty() )
785
        {
785
        {
786
            rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), 
786
            rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), 
787
                sal_False /* small */, 
787
                sal_False /* small */, 
(-)basctl/source/basicide/baside2.cxx (-1 / +1 lines)
Lines 370-376 Link Here
370
			if ( !pMethod )
370
			if ( !pMethod )
371
			{
371
			{
372
				if ( aDocument.isInVBAMode() )
372
				if ( aDocument.isInVBAMode() )
373
					return ( BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), sal_False, rtl::OUString() ).getLength() > 0 ) ? sal_True : sal_False;
373
					return ( BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), sal_False, rtl::OUString() ).isEmpty() == false ) ? sal_True : sal_False;
374
				else
374
				else
375
					pMethod = (SbMethod*)xModule->Find( String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) ), SbxCLASS_METHOD );
375
					pMethod = (SbMethod*)xModule->Find( String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) ), SbxCLASS_METHOD );
376
			}
376
			}

Return to issue 123862