diff options
-rw-r--r-- | accessibility/source/extended/textwindowaccessibility.cxx | 15 | ||||
-rw-r--r-- | codemaker/source/codemaker/dependencies.cxx | 10 | ||||
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 32 | ||||
-rw-r--r-- | codemaker/source/cppumaker/includes.cxx | 6 | ||||
-rw-r--r-- | codemaker/source/javamaker/classfile.cxx | 36 | ||||
-rw-r--r-- | codemaker/source/javamaker/javatype.cxx | 48 | ||||
-rw-r--r-- | cppu/source/typelib/typelib.cxx | 18 | ||||
-rw-r--r-- | cppuhelper/source/tdmgr.cxx | 8 | ||||
-rw-r--r-- | idlc/source/astdump.cxx | 6 | ||||
-rw-r--r-- | registry/source/regimpl.cxx | 16 | ||||
-rw-r--r-- | sal/qa/rtl/uri/rtl_testuri.cxx | 16 | ||||
-rw-r--r-- | stoc/source/registry_tdprovider/tdiface.cxx | 12 | ||||
-rw-r--r-- | stoc/source/registry_tdprovider/tdprovider.cxx | 8 | ||||
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpdirp.cxx | 4 | ||||
-rw-r--r-- | ucb/workben/cachemap/cachemaptest.cxx | 30 |
16 files changed, 141 insertions, 127 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 6691856c5f92..f27fc8f00124 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -1725,8 +1725,9 @@ void Document::notifyVisibleRangeChanges( { // XXX Replace this code that determines which paragraphs have changed from // invisible to visible or vice versa with a better algorithm. - {for (Paragraphs::iterator aIt(rOldVisibleBegin); aIt != rOldVisibleEnd; - ++aIt) + for (Paragraphs::iterator aIt(rOldVisibleBegin); aIt != rOldVisibleEnd; + ++aIt) + { if (aIt != rInserted && (aIt < m_aVisibleBegin || aIt >= m_aVisibleEnd)) NotifyAccessibleEvent( @@ -1735,8 +1736,9 @@ void Document::notifyVisibleRangeChanges( ::css::uno::makeAny(getAccessibleChild(aIt)), ::css::uno::Any()); } - {for (Paragraphs::iterator aIt(m_aVisibleBegin); aIt != m_aVisibleEnd; - ++aIt) + for (Paragraphs::iterator aIt(m_aVisibleBegin); aIt != m_aVisibleEnd; + ++aIt) + { if (aIt == rInserted || aIt < rOldVisibleBegin || aIt >= rOldVisibleEnd) NotifyAccessibleEvent( @@ -1829,8 +1831,9 @@ void Document::handleParagraphNotifications() ::sal_uLong n = aHint.GetValue(); if (n == TEXT_PARA_ALL) { - {for (Paragraphs::iterator aIt(m_aVisibleBegin); - aIt != m_aVisibleEnd; ++aIt) + for (Paragraphs::iterator aIt(m_aVisibleBegin); + aIt != m_aVisibleEnd; ++aIt) + { NotifyAccessibleEvent( ::css::accessibility::AccessibleEventId:: CHILD, diff --git a/codemaker/source/codemaker/dependencies.cxx b/codemaker/source/codemaker/dependencies.cxx index 9d2e7699544e..f3baf1ce10b9 100644 --- a/codemaker/source/codemaker/dependencies.cxx +++ b/codemaker/source/codemaker/dependencies.cxx @@ -65,13 +65,13 @@ Dependencies::Dependencies( } } if (tc != RT_TYPE_ENUM) { - {for (sal_Int16 i = 0; i < reader.getFieldCount(); ++i) { + for (sal_Int16 i = 0; i < reader.getFieldCount(); ++i) { if ((reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) == 0) { insert(reader.getFieldTypeName(i), false); } - }} + } } for (sal_Int16 i = 0; i < reader.getMethodCount(); ++i) { insert(reader.getMethodReturnTypeName(i), false); @@ -249,11 +249,11 @@ void Dependencies::insert(rtl::OString const & type, bool base) { case UnoType::SORT_COMPLEX: { - {for (std::vector< rtl::OString >::iterator i(args.begin()); - i != args.end(); ++i) + for (std::vector< rtl::OString >::iterator i(args.begin()); + i != args.end(); ++i) { insert(*i, false); - }} + } Map::iterator i(m_map.find(t)); if (i == m_map.end()) { m_map.insert( diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 09de49c97a06..2c4d80884d7b 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -1015,12 +1015,12 @@ void CppuType::dumpType(FileStream& o, const OString& type, if (bConst) o << "const "; - {for (sal_Int32 i = 0; i < seqNum; ++i) { + for (sal_Int32 i = 0; i < seqNum; ++i) { if (cppuUnoType) o << "::cppu::UnoSequenceType< "; else o << "::com::sun::star::uno::Sequence< "; - }} + } switch (typeClass) { @@ -1067,9 +1067,9 @@ void CppuType::dumpType(FileStream& o, const OString& type, break; } - {for (sal_Int32 i = 0; i < seqNum; ++i) { + for (sal_Int32 i = 0; i < seqNum; ++i) { o << " >"; - }} + } if (bRef) o << "&"; } @@ -1850,21 +1850,21 @@ void InterfaceType::dumpCppuMethodRefs(FileStream& o, sal_uInt32& index) sal_uInt32 InterfaceType::getMemberCount() { sal_uInt16 count = 0; sal_uInt16 methodCount = m_reader.getMethodCount(); - {for (sal_uInt16 i = 0; i < methodCount; ++i) { + for (sal_uInt16 i = 0; i < methodCount; ++i) { RTMethodMode flags = m_reader.getMethodFlags(i); if (flags != RT_MODE_ATTRIBUTE_GET && flags != RT_MODE_ATTRIBUTE_SET) { m_hasMethods = true; ++count; } - }} + } sal_uInt16 fieldCount = m_reader.getFieldCount(); - {for (sal_uInt16 i = 0; i < fieldCount; ++i) { + for (sal_uInt16 i = 0; i < fieldCount; ++i) { RTFieldAccess flags = m_reader.getFieldFlags(i); if (flags != RT_ACCESS_CONST && flags != RT_ACCESS_INVALID) { m_hasAttributes = true; ++count; } - }} + } return count; } @@ -1912,20 +1912,20 @@ void BaseOffset::calculate(typereg::Reader const & reader) { .second) { calculateBases(reader); - {for (sal_uInt16 i = 0; i < reader.getMethodCount(); ++i) { + for (sal_uInt16 i = 0; i < reader.getMethodCount(); ++i) { RTMethodMode flags = reader.getMethodFlags(i); if (flags != RT_MODE_ATTRIBUTE_GET && flags != RT_MODE_ATTRIBUTE_SET) { ++offset; } - }} - {for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) { + } + for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) { RTFieldAccess flags = reader.getFieldFlags(i); if (flags != RT_ACCESS_CONST && flags != RT_ACCESS_INVALID) { ++offset; } - }} + } } } @@ -2975,7 +2975,7 @@ void StructureType::dumpComprehensiveGetCppuType(FileStream & out) typedef std::map< rtl::OString, sal_uInt32 > Map; Map parameters; Map types; - {for (sal_uInt16 i = 0; i < fields; ++i) { + for (sal_uInt16 i = 0; i < fields; ++i) { rtl::OString type( rtl::OUStringToOString( m_reader.getFieldTypeName(i), RTL_TEXTENCODING_UTF8)); @@ -3027,10 +3027,10 @@ void StructureType::dumpComprehensiveGetCppuType(FileStream & out) m_reader.getFieldName(i), RTL_TEXTENCODING_UTF8).replace( '/', '.') << "\" );\n"; - }} + } out << indent() << "::typelib_StructMember_Init the_members[] = {\n"; inc(); - {for (sal_uInt16 i = 0; i < fields; ++i) { + for (sal_uInt16 i = 0; i < fields; ++i) { out << indent() << "{ { "; rtl::OString type( rtl::OUStringToOString( @@ -3046,7 +3046,7 @@ void StructureType::dumpComprehensiveGetCppuType(FileStream & out) << ((m_reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) == 0 ? "false" : "true") << " }" << (i == fields - 1 ? " };" : ",") << "\n"; - }} + } dec(); out << indent() << "::typelib_TypeDescription * the_newType = 0;\n"; out << indent() diff --git a/codemaker/source/cppumaker/includes.cxx b/codemaker/source/cppumaker/includes.cxx index 9411312eca93..9ee0eb54fd3b 100644 --- a/codemaker/source/cppumaker/includes.cxx +++ b/codemaker/source/cppumaker/includes.cxx @@ -118,11 +118,11 @@ void Includes::add(rtl::OString const & registryType) { m_map.insert( codemaker::Dependencies::Map::value_type( type, codemaker::Dependencies::KIND_NO_BASE)); - {for (std::vector< rtl::OString >::iterator i(args.begin()); - i != args.end(); ++i) + for (std::vector< rtl::OString >::iterator i(args.begin()); + i != args.end(); ++i) { add(*i); - }} + } break; default: diff --git a/codemaker/source/javamaker/classfile.cxx b/codemaker/source/javamaker/classfile.cxx index bc0cf2c908a0..1a61e2fe2092 100644 --- a/codemaker/source/javamaker/classfile.cxx +++ b/codemaker/source/javamaker/classfile.cxx @@ -245,29 +245,29 @@ void ClassFile::Code::instrLookupswitch( Position pos1 = m_code.size(); appendU1(m_code, 0xAB); int pad = (pos1 + 1) % 4; - {for (int i = 0; i < pad; ++i) { + for (int i = 0; i < pad; ++i) { appendU1(m_code, 0); - }} + } Position pos2 = pos1 + 1 + pad + 8 + blocks.size() * 8; //FIXME: overflow appendU4(m_code, static_cast< sal_uInt32 >(pos2 - pos1)); //FIXME: overflow pos2 += defaultBlock->m_code.size(); //FIXME: overflow appendU4(m_code, static_cast< sal_uInt32 >(size)); - {for (std::list< std::pair< sal_Int32, Code * > >::const_iterator i( - blocks.begin()); - i != blocks.end(); ++i) + for (std::list< std::pair< sal_Int32, Code * > >::const_iterator i( + blocks.begin()); + i != blocks.end(); ++i) { appendU4(m_code, static_cast< sal_uInt32 >(i->first)); appendU4(m_code, static_cast< sal_uInt32 >(pos2 - pos1)); //FIXME: overflow pos2 += i->second->m_code.size(); //FIXME: overflow - }} + } appendStream(m_code, defaultBlock->m_code); - {for (std::list< std::pair< sal_Int32, Code * > >::const_iterator i( - blocks.begin()); - i != blocks.end(); ++i) + for (std::list< std::pair< sal_Int32, Code * > >::const_iterator i( + blocks.begin()); + i != blocks.end(); ++i) { appendStream(m_code, i->second->m_code); - }} + } } void ClassFile::Code::instrNew(rtl::OString const & type) { @@ -330,9 +330,9 @@ void ClassFile::Code::instrTableswitch( Position pos1 = m_code.size(); appendU1(m_code, 0xAA); int pad = (pos1 + 1) % 4; - {for (int i = 0; i < pad; ++i) { + for (int i = 0; i < pad; ++i) { appendU1(m_code, 0); - }} + } std::list< Code * >::size_type size = blocks.size(); Position pos2 = pos1 + 1 + pad + 12 + size * 4; //FIXME: overflow sal_uInt32 defaultOffset = static_cast< sal_uInt32 >(pos2 - pos1); @@ -341,8 +341,8 @@ void ClassFile::Code::instrTableswitch( pos2 += defaultBlock->m_code.size(); //FIXME: overflow appendU4(m_code, static_cast< sal_uInt32 >(low)); appendU4(m_code, static_cast< sal_uInt32 >(low + (size - 1))); - {for (std::list< Code * >::const_iterator i(blocks.begin()); - i != blocks.end(); ++i) + for (std::list< Code * >::const_iterator i(blocks.begin()); + i != blocks.end(); ++i) { if (*i == 0) { appendU4(m_code, defaultOffset); @@ -351,15 +351,15 @@ void ClassFile::Code::instrTableswitch( //FIXME: overflow pos2 += (*i)->m_code.size(); //FIXME: overflow } - }} + } appendStream(m_code, defaultBlock->m_code); - {for (std::list< Code * >::const_iterator i(blocks.begin()); - i != blocks.end(); ++i) + for (std::list< Code * >::const_iterator i(blocks.begin()); + i != blocks.end(); ++i) { if (*i != 0) { appendStream(m_code, (*i)->m_code); } - }} + } } void ClassFile::Code::loadIntegerConstant(sal_Int32 value) { diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index 5b8748e4bf5f..404626a0316f 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -856,7 +856,7 @@ void handleEnumType( rtl::OString())); SAL_WNODEPRECATED_DECLARATIONS_POP rtl::OString classDescriptor("L" + className + ";"); - {for (sal_uInt16 i = 0; i < fields; ++i) { + for (sal_uInt16 i = 0; i < fields; ++i) { RTConstValue fieldValue(reader.getFieldValue(i)); if (fieldValue.m_type != RT_TYPE_INT32 || reader.getFieldFlags(i) != RT_ACCESS_CONST @@ -880,7 +880,7 @@ void handleEnumType( fieldName + rtl::OString(RTL_CONSTASCII_STRINGPARAM("_value")), rtl::OString(RTL_CONSTASCII_STRINGPARAM("I")), cf->addIntegerInfo(fieldValue.m_value.aLong), rtl::OString()); - }} + } SAL_WNODEPRECATED_DECLARATIONS_PUSH std::auto_ptr< ClassFile::Code > code(cf->newCode()); SAL_WNODEPRECATED_DECLARATIONS_POP @@ -914,14 +914,14 @@ void handleEnumType( std::map< sal_Int32, rtl::OString > map; sal_Int32 min = SAL_MAX_INT32; sal_Int32 max = SAL_MIN_INT32; - {for (sal_uInt16 i = 0; i < fields; ++i) { + for (sal_uInt16 i = 0; i < fields; ++i) { sal_Int32 value = reader.getFieldValue(i).m_value.aLong; min = std::min(min, value); max = std::max(max, value); map.insert( std::map< sal_Int32, rtl::OString >::value_type( value, codemaker::convertString(reader.getFieldName(i)))); - }} + } sal_uInt64 size = static_cast< sal_uInt64 >(map.size()); if ((static_cast< sal_uInt64 >(max) - static_cast< sal_uInt64 >(min) <= 2 * size) @@ -954,11 +954,11 @@ void handleEnumType( blockCode.release(); } code->instrTableswitch(defCode.get(), min, blocks); - {for (std::list< ClassFile::Code * >::iterator i(blocks.begin()); + for (std::list< ClassFile::Code * >::iterator i(blocks.begin()); i != blocks.end(); ++i) { delete *i; - }} + } } else{ SAL_WNODEPRECATED_DECLARATIONS_PUSH std::auto_ptr< ClassFile::Code > defCode(cf->newCode()); @@ -979,12 +979,12 @@ void handleEnumType( blockCode.release(); } code->instrLookupswitch(defCode.get(), blocks); - {for (std::list< std::pair< sal_Int32, ClassFile::Code * > >::iterator - i(blocks.begin()); - i != blocks.end(); ++i) + for (std::list< std::pair< sal_Int32, ClassFile::Code * > >::iterator + i(blocks.begin()); + i != blocks.end(); ++i) { delete i->second; - }} + } } code->setMaxStackAndLocals(1, 1); cf->addMethod( @@ -994,7 +994,7 @@ void handleEnumType( rtl::OString(RTL_CONSTASCII_STRINGPARAM("(I)")) + classDescriptor, code.get(), std::vector< rtl::OString >(), rtl::OString()); code.reset(cf->newCode()); - {for (sal_uInt16 i = 0; i < fields; ++i) { + for (sal_uInt16 i = 0; i < fields; ++i) { code->instrNew(className); code->instrDup(); code->loadIntegerConstant(reader.getFieldValue(i).m_value.aLong); @@ -1005,7 +1005,7 @@ void handleEnumType( className, codemaker::convertString(reader.getFieldName(i)), classDescriptor); - }} + } code->instrReturn(); code->setMaxStackAndLocals(3, 0); cf->addMethod( @@ -1924,7 +1924,7 @@ void handleAggregatingType( className, superClass, sig)); SAL_WNODEPRECATED_DECLARATIONS_POP std::vector< TypeInfo > typeInfo; - {for (sal_uInt16 i = firstField; i < fields; ++i) { + for (sal_uInt16 i = firstField; i < fields; ++i) { RTFieldAccess flags = reader.getFieldFlags(i); if ((flags != RT_ACCESS_READWRITE && flags != (RT_ACCESS_READWRITE | RT_ACCESS_PARAMETERIZED_TYPE)) @@ -1954,7 +1954,7 @@ void handleAggregatingType( addField( manager, dependencies, cf.get(), &typeInfo, typeParameterIndex, type, codemaker::convertString(reader.getFieldName(i)), i - firstField); - }} + } if (runtimeException) { addField( manager, dependencies, cf.get(), &typeInfo, -1, @@ -1970,7 +1970,7 @@ void handleAggregatingType( superClass, rtl::OString(RTL_CONSTASCII_STRINGPARAM("<init>")), rtl::OString(RTL_CONSTASCII_STRINGPARAM("()V"))); sal_uInt16 stack = 0; - {for (sal_uInt16 i = firstField; i < fields; ++i) { + for (sal_uInt16 i = firstField; i < fields; ++i) { stack = std::max( stack, addFieldInit( @@ -1979,7 +1979,7 @@ void handleAggregatingType( (reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) != 0, codemaker::convertString(reader.getFieldTypeName(i)), dependencies, code.get())); - }} + } if (runtimeException) { stack = std::max( stack, @@ -2055,7 +2055,7 @@ void handleAggregatingType( superClass, rtl::OString(RTL_CONSTASCII_STRINGPARAM("<init>")), desc.getDescriptor()); sal_uInt16 maxSize = index; - {for (sal_uInt16 i = firstField; i < fields; ++i) { + for (sal_uInt16 i = firstField; i < fields; ++i) { maxSize = std::max( maxSize, addDirectArgument( @@ -2063,7 +2063,7 @@ void handleAggregatingType( codemaker::convertString(reader.getFieldName(i)), (reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) != 0, codemaker::convertString(reader.getFieldTypeName(i)))); - }} + } if (runtimeException) { maxSize = std::max( maxSize, @@ -2139,11 +2139,11 @@ void handleInterfaceType( rtl::OString(RTL_CONSTASCII_STRINGPARAM("java/lang/Object")), rtl::OString())); SAL_WNODEPRECATED_DECLARATIONS_POP - {for (sal_uInt16 i = 0; i < superTypes; ++i) { + for (sal_uInt16 i = 0; i < superTypes; ++i) { rtl::OString t(codemaker::convertString(reader.getSuperTypeName(i))); dependencies->insert(t); cf->addInterface(t); - }} + } // As a special case, let com.sun.star.lang.XEventListener extend // java.util.EventListener ("A tagging interface that all event listener // interfaces must extend"): @@ -2157,7 +2157,7 @@ void handleInterfaceType( } std::vector< TypeInfo > typeInfo; sal_Int32 index = 0; - {for (sal_uInt16 i = 0; i < fields; ++i) { + for (sal_uInt16 i = 0; i < fields; ++i) { RTFieldAccess flags = reader.getFieldFlags(i); //TODO: ok if both READONLY and BOUND? if (((((flags & RT_ACCESS_READWRITE) != 0) @@ -2244,8 +2244,8 @@ void handleInterfaceType( ? 0 : TypeInfo::FLAG_BOUND)), index, polymorphicUnoType)); index += ((flags & RT_ACCESS_READONLY) == 0 ? 2 : 1); - }} - {for (sal_uInt16 i = 0; i < methods; ++i) { + } + for (sal_uInt16 i = 0; i < methods; ++i) { RTMethodMode flags = reader.getMethodFlags(i); switch (flags) { case RT_MODE_ONEWAY: @@ -2344,7 +2344,7 @@ void handleInterfaceType( rtl::OString( RTL_CONSTASCII_STRINGPARAM("Bad type information"))); //TODO } - }} + } addTypeInfo(className, typeInfo, dependencies, cf.get()); writeClassFile(options, className, *cf.get()); } diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index 9eda378609f5..0c66661bef21 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -1186,8 +1186,8 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_newMIInterface( sal_Int32 n = 0; BaseList::List const & rList = aBaseList.getList(); - {for (BaseList::List::const_iterator i(rList.begin()); i != rList.end(); - ++i) + for (BaseList::List::const_iterator i(rList.begin()); i != rList.end(); + ++i) { typelib_InterfaceTypeDescription const * pBase = i->base; typelib_InterfaceTypeDescription const * pDirectBase @@ -1210,7 +1210,7 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_newMIInterface( aName.pData); pITD->ppAllMembers[n++] = pDerivedMember; } - }} + } if( nMembers ) { @@ -1218,11 +1218,11 @@ extern "C" CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_newMIInterface( } // add own members - {for( sal_Int32 i = 0; i < nMembers; i++ ) + for( sal_Int32 i = 0; i < nMembers; i++ ) { typelib_typedescriptionreference_acquire( ppMembers[i] ); pITD->ppAllMembers[n++] = ppMembers[i]; - }} + } } typelib_TypeDescription * pTmp = (typelib_TypeDescription *)pITD; @@ -1507,18 +1507,18 @@ static inline void typelib_typedescription_destructExtendedMembers( case typelib_TypeClass_INTERFACE: { typelib_InterfaceTypeDescription * pITD = (typelib_InterfaceTypeDescription*)pTD; - {for( sal_Int32 i = 0; i < pITD->nAllMembers; i++ ) + for( sal_Int32 i = 0; i < pITD->nAllMembers; i++ ) { typelib_typedescriptionreference_release( pITD->ppAllMembers[i] ); - }} + } delete [] pITD->ppAllMembers; delete [] pITD->pMapMemberIndexToFunctionIndex; delete [] pITD->pMapFunctionIndexToMemberIndex; - {for (sal_Int32 i = 0; i < pITD->nBaseTypes; ++i) { + for (sal_Int32 i = 0; i < pITD->nBaseTypes; ++i) { typelib_typedescription_release( reinterpret_cast< typelib_TypeDescription * >( pITD->ppBaseTypes[i])); - }} + } delete[] pITD->ppBaseTypes; break; } diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index 9538c3d59bee..ef922dca6733 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -418,13 +418,13 @@ inline static typelib_TypeDescription * createCTD( // is also the typelib_TypeDescriptionReference for that type: boost::scoped_array< typelib_TypeDescription * > aBaseTypes( new typelib_TypeDescription *[nBases]); - {for (sal_Int32 i = 0; i < nBases; ++i) { + for (sal_Int32 i = 0; i < nBases; ++i) { typelib_TypeDescription * p = createCTD(access, aBases[i]); OSL_ASSERT( !TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK(p->eTypeClass)); typelib_typedescription_register(&p); aBaseTypes[i] = p; - }} + } typelib_TypeDescriptionReference ** pBaseTypeRefs = reinterpret_cast< typelib_TypeDescriptionReference ** >( aBaseTypes.get()); @@ -461,9 +461,9 @@ inline static typelib_TypeDescription * createCTD( nMembers, ppMemberRefs ); // cleanup refs and base type - {for (int i = 0; i < nBases; ++i) { + for (int i = 0; i < nBases; ++i) { typelib_typedescription_release(aBaseTypes[i]); - }} + } for ( nPos = nMembers; nPos--; ) { diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx index 5382685e4762..efce89b1b8ca 100644 --- a/idlc/source/astdump.cxx +++ b/idlc/source/astdump.cxx @@ -173,8 +173,8 @@ sal_Bool AstService::dump(RegistryKey& rKey) sal_uInt16 constructors = 0; sal_uInt16 properties = 0; sal_uInt16 references = 0; - {for (DeclList::const_iterator i(getIteratorBegin()); i != getIteratorEnd(); - ++i) + for (DeclList::const_iterator i(getIteratorBegin()); i != getIteratorEnd(); + ++i) { switch ((*i)->getNodeType()) { case NT_interface: @@ -212,7 +212,7 @@ sal_Bool AstService::dump(RegistryKey& rKey) OSL_ASSERT(false); break; } - }} + } OSL_ASSERT(constructors == 0 || !m_defaultConstructor); if (m_defaultConstructor) { constructors = 1; diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index e364a1757953..44b25a7c2d81 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -191,17 +191,17 @@ void dumpType(typereg::Reader const & reader, rtl::OString const & indent) { printf( "%ssuper type count: %u\n", indent.getStr(), static_cast< unsigned int >(reader.getSuperTypeCount())); - {for (sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i) { + for (sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i) { printf( "%ssuper type name %u: ", indent.getStr(), static_cast< unsigned int >(i)); printString(reader.getSuperTypeName(i)); printf("\n"); - }} + } printf( "%sfield count: %u\n", indent.getStr(), static_cast< unsigned int >(reader.getFieldCount())); - {for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) { + for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) { printf( "%sfield %u:\n", indent.getStr(), static_cast< unsigned int >(i)); @@ -285,11 +285,11 @@ void dumpType(typereg::Reader const & reader, rtl::OString const & indent) { break; } printf("\n"); - }} + } printf( "%smethod count: %u\n", indent.getStr(), static_cast< unsigned int >(reader.getMethodCount())); - {for (sal_uInt16 i = 0; i < reader.getMethodCount(); ++i) { + for (sal_uInt16 i = 0; i < reader.getMethodCount(); ++i) { printf( "%smethod %u:\n", indent.getStr(), static_cast< unsigned int >(i)); @@ -378,11 +378,11 @@ void dumpType(typereg::Reader const & reader, rtl::OString const & indent) { printString(reader.getMethodExceptionTypeName(i, j)); printf("\n"); } - }} + } printf( "%sreference count: %u\n", indent.getStr(), static_cast< unsigned int >(reader.getReferenceCount())); - {for (sal_uInt16 i = 0; i < reader.getReferenceCount(); ++i) { + for (sal_uInt16 i = 0; i < reader.getReferenceCount(); ++i) { printf( "%sreference %u:\n", indent.getStr(), static_cast< unsigned int >(i)); @@ -416,7 +416,7 @@ void dumpType(typereg::Reader const & reader, rtl::OString const & indent) { printf("%s type name: ", indent.getStr()); printString(reader.getReferenceTypeName(i)); printf("\n"); - }} + } } else { printf("<invalid>\n"); } diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx index 77d535f7ec9a..ec29c8097d27 100644 --- a/sal/qa/rtl/uri/rtl_testuri.cxx +++ b/sal/qa/rtl/uri/rtl_testuri.cxx @@ -68,9 +68,9 @@ void Test::test_Uri() { "\0x70\0x71\0x72\0x73\0x74\0x75\0x76\0x77" "\0x78\0x79\0x7A\0x7B\0x7C\0x7D\0x7E\0x7F")); aText2 = aText1; - {for (rtl_UriCharClass eCharClass = eFirstCharClass; - eCharClass <= eLastCharClass; - eCharClass = static_cast< rtl_UriCharClass >(eCharClass + 1)) + for (rtl_UriCharClass eCharClass = eFirstCharClass; + eCharClass <= eLastCharClass; + eCharClass = static_cast< rtl_UriCharClass >(eCharClass + 1)) { CPPUNIT_ASSERT_MESSAGE( "failure 1", @@ -120,7 +120,7 @@ void Test::test_Uri() { RTL_TEXTENCODING_ISO_8859_1), rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8) == aText2)); - }} + } aText1 = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -157,9 +157,9 @@ void Test::test_Uri() { "\0xF0\0xF1\0xF2\0xF3\0xF4\0xF5\0xF6\0xF7" "\0xF8\0xF9\0xFA\0xFB\0xFC\0xFD\0xFE\0xFF")); aText2 = aText1; - {for (rtl_UriCharClass eCharClass = eFirstCharClass; - eCharClass <= eLastCharClass; - eCharClass = static_cast< rtl_UriCharClass >(eCharClass + 1)) + for (rtl_UriCharClass eCharClass = eFirstCharClass; + eCharClass <= eLastCharClass; + eCharClass = static_cast< rtl_UriCharClass >(eCharClass + 1)) { CPPUNIT_ASSERT_MESSAGE( "failure 7", @@ -193,7 +193,7 @@ void Test::test_Uri() { RTL_TEXTENCODING_UTF8), rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8) == aText2)); - }} + } // Check surrogate handling: diff --git a/stoc/source/registry_tdprovider/tdiface.cxx b/stoc/source/registry_tdprovider/tdiface.cxx index 303de97dd5ad..0ec64d9e4c8e 100644 --- a/stoc/source/registry_tdprovider/tdiface.cxx +++ b/stoc/source/registry_tdprovider/tdiface.cxx @@ -450,19 +450,19 @@ Sequence< Reference< XInterfaceMemberTypeDescription > > InterfaceTypeDescriptio TYPEREG_VERSION_1); sal_Int32 count = 0; sal_uInt16 methodCount = reader.getMethodCount(); - {for (sal_uInt16 i = 0; i < methodCount; ++i) { + for (sal_uInt16 i = 0; i < methodCount; ++i) { RTMethodMode flags = reader.getMethodFlags(i); if (flags != RT_MODE_ATTRIBUTE_GET && flags != RT_MODE_ATTRIBUTE_SET) { ++count; } - }} + } sal_uInt16 fieldCount = reader.getFieldCount(); count += fieldCount; _members.realloc(count); sal_Int32 index = 0; - {for (sal_uInt16 i = 0; i < fieldCount; ++i) { + for (sal_uInt16 i = 0; i < fieldCount; ++i) { rtl::OUString name(reader.getFieldName(i)); rtl::OUStringBuffer typeName(getName()); typeName.appendAscii(RTL_CONSTASCII_STRINGPARAM("::")); @@ -504,8 +504,8 @@ Sequence< Reference< XInterfaceMemberTypeDescription > > InterfaceTypeDescriptio (flags & RT_ACCESS_BOUND) != 0, getter, setter, _nBaseOffset + index); ++index; - }} - {for (sal_uInt16 i = 0; i < methodCount; ++i) { + } + for (sal_uInt16 i = 0; i < methodCount; ++i) { RTMethodMode flags = reader.getMethodFlags(i); if (flags != RT_MODE_ATTRIBUTE_GET && flags != RT_MODE_ATTRIBUTE_SET) @@ -520,7 +520,7 @@ Sequence< Reference< XInterfaceMemberTypeDescription > > InterfaceTypeDescriptio _aBytes, i, flags == RT_MODE_ONEWAY, _nBaseOffset + index); ++index; } - }} + } _membersInit = true; } return _members; diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx index a2d88ee0e7f2..87089a9adfb6 100644 --- a/stoc/source/registry_tdprovider/tdprovider.cxx +++ b/stoc/source/registry_tdprovider/tdprovider.cxx @@ -472,19 +472,19 @@ com::sun::star::uno::Reference< XTypeDescription > createTypeDescription( { sal_uInt16 n = aReader.getSuperTypeCount(); com::sun::star::uno::Sequence< rtl::OUString > aBaseTypeNames(n); - {for (sal_uInt16 i = 0; i < n; ++i) { + for (sal_uInt16 i = 0; i < n; ++i) { aBaseTypeNames[i] = aReader.getSuperTypeName(i).replace( '/', '.'); - }} + } sal_uInt16 n2 = aReader.getReferenceCount(); com::sun::star::uno::Sequence< rtl::OUString > aOptionalBaseTypeNames(n2); - {for (sal_uInt16 i = 0; i < n2; ++i) { + for (sal_uInt16 i = 0; i < n2; ++i) { OSL_ASSERT( aReader.getReferenceSort(i) == RT_REF_SUPPORTS && aReader.getReferenceFlags(i) == RT_ACCESS_OPTIONAL); aOptionalBaseTypeNames[i] = aReader.getReferenceTypeName(i); - }} + } return com::sun::star::uno::Reference< XTypeDescription >( new InterfaceTypeDescriptionImpl( xNameAccess, aName, diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index f6e9db46b92c..0587490cc8b8 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -4741,7 +4741,8 @@ bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath, case FSYS_MAC: aSynAbsURIRef.append(sal_Unicode('/')); - {for (sal_Unicode const * p = pFSysBegin; p != pFSysEnd; ++p) + for (sal_Unicode const * p = pFSysBegin; p != pFSysEnd; ++p) + { switch (*p) { case ':': diff --git a/ucb/source/ucp/ftp/ftpdirp.cxx b/ucb/source/ucp/ftp/ftpdirp.cxx index c847a32d7acf..f618019d3019 100644 --- a/ucb/source/ucp/ftp/ftpdirp.cxx +++ b/ucb/source/ucp/ftp/ftpdirp.cxx @@ -783,12 +783,12 @@ sal_Bool FTPDirectoryParser::parseVMS ( // Parse <year> part and set entry date's year: sal_uInt16 nYear = 0; - {for (int i = 0; i < 2; ++i) + for (int i = 0; i < 2; ++i) { if (*p < '0' || *p > '9') return sal_False; nYear = 10 * nYear + (*p++ - '0'); - }} + } if (*p >= '0' && *p <= '9') { nYear = 10 * nYear + (*p++ - '0'); diff --git a/ucb/workben/cachemap/cachemaptest.cxx b/ucb/workben/cachemap/cachemaptest.cxx index f486fbae05de..477be2673568 100644 --- a/ucb/workben/cachemap/cachemaptest.cxx +++ b/ucb/workben/cachemap/cachemaptest.cxx @@ -53,11 +53,13 @@ sal_uInt32 test(Obj *) + rtl::OUString::valueOf(static_cast< sal_Int32 >( i % 100))); rtl::Reference< Obj > xObj01(xCont->get(aKey0)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj01); } rtl::Reference< Obj > xObj02(xCont->get(aKey0)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj02); } @@ -66,11 +68,13 @@ sal_uInt32 test(Obj *) + rtl::OUString::valueOf(static_cast< sal_Int32 >( (i + 1) % 100))); rtl::Reference< Obj > xObj11(xCont->get(aKey1)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj11); } rtl::Reference< Obj > xObj12(xCont->get(aKey1)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj12); } @@ -79,11 +83,13 @@ sal_uInt32 test(Obj *) + rtl::OUString::valueOf(static_cast< sal_Int32 >( (i + 2) % 100))); rtl::Reference< Obj > xObj21(xCont->get(aKey2)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj21); } rtl::Reference< Obj > xObj22(xCont->get(aKey2)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj22); } @@ -92,11 +98,13 @@ sal_uInt32 test(Obj *) + rtl::OUString::valueOf(static_cast< sal_Int32 >( (i + 3) % 100))); rtl::Reference< Obj > xObj31(xCont->get(aKey3)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj31); } rtl::Reference< Obj > xObj32(xCont->get(aKey3)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj32); } @@ -105,11 +113,13 @@ sal_uInt32 test(Obj *) + rtl::OUString::valueOf(static_cast< sal_Int32 >( (i + 4) % 100))); rtl::Reference< Obj > xObj41(xCont->get(aKey4)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj41); } rtl::Reference< Obj > xObj42(xCont->get(aKey4)); - {for (int j = 0; j < 50; ++j) + for (int j = 0; j < 50; ++j) + { rtl::Reference< Obj > xRef(xObj42); } } |