diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-06 07:45:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-11-06 13:51:10 +0200 |
commit | 05050cdb23de586870bf479a9df5ced06828d498 (patch) | |
tree | a34c3bba9a921a5e9abf23d5757c15dfaea0ceac /idlc/source/astdump.cxx | |
parent | 8f266781a6bd6a629bce65c0f613683047c9a794 (diff) |
use the new OUString::fromUtf8 method
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
Diffstat (limited to 'idlc/source/astdump.cxx')
-rw-r--r-- | idlc/source/astdump.cxx | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx index c9a2c473f3fa..01ca504aaefd 100644 --- a/idlc/source/astdump.cxx +++ b/idlc/source/astdump.cxx @@ -41,7 +41,7 @@ bool AstModule::dump(RegistryKey& rKey) localKey = rKey; }else { - if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey)) + if (rKey.createKey( OUString::fromUtf8(getFullName()), localKey)) { fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n", idlc()->getOptions()->getProgramName().getStr(), @@ -62,7 +62,7 @@ bool AstModule::dump(RegistryKey& rKey) m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0, getDocumentation(), emptyStr, typeClass, m_bPublished, - OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0, + OUString::fromUtf8(getRelativName()), 0, nConst, 0, 0); DeclList::const_iterator iter = getIteratorBegin(); @@ -102,7 +102,7 @@ bool AstModule::dump(RegistryKey& rKey) typereg::Writer aBlob( m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0, getDocumentation(), emptyStr, typeClass, m_bPublished, - OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0, 0, 0, + OUString::fromUtf8(getRelativName()), 0, 0, 0, 0); sal_uInt32 aBlobSize; @@ -131,7 +131,7 @@ bool AstTypeDef::dump(RegistryKey& rKey) { OUString emptyStr; RegistryKey localKey; - if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey)) + if (rKey.createKey( OUString::fromUtf8(getFullName()), localKey)) { fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n", idlc()->getOptions()->getProgramName().getStr(), @@ -142,11 +142,10 @@ bool AstTypeDef::dump(RegistryKey& rKey) typereg::Writer aBlob( m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0, getDocumentation(), emptyStr, RT_TYPE_TYPEDEF, m_bPublished, - OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 1, 0, 0, 0); + OUString::fromUtf8(getRelativName()), 1, 0, 0, 0); aBlob.setSuperTypeName( 0, - OStringToOUString( - getBaseType()->getRelativName(), RTL_TEXTENCODING_UTF8)); + OUString::fromUtf8(getBaseType()->getRelativName())); sal_uInt32 aBlobSize; void const * pBlob = aBlob.getBlob(&aBlobSize); @@ -217,7 +216,7 @@ bool AstService::dump(RegistryKey& rKey) } RegistryKey localKey; if (rKey.createKey( - OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8), + OUString::fromUtf8(getFullName()), localKey)) { fprintf( stderr, "%s: warning, could not create key '%s' in '%s'\n", @@ -231,12 +230,12 @@ bool AstService::dump(RegistryKey& rKey) version, getDocumentation(), emptyStr, getNodeType() == NT_singleton ? RT_TYPE_SINGLETON : RT_TYPE_SERVICE, m_bPublished, - OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), + OUString::fromUtf8(getRelativName()), superName.isEmpty() ? 0 : 1, properties, constructors, references); if (!superName.isEmpty()) { writer.setSuperTypeName( - 0, OStringToOUString(superName, RTL_TEXTENCODING_UTF8)); + 0, OUString::fromUtf8(superName)); } sal_uInt16 constructorIndex = 0; sal_uInt16 propertyIndex = 0; @@ -258,8 +257,7 @@ bool AstService::dump(RegistryKey& rKey) writer.setReferenceData( referenceIndex++, decl->getDocumentation(), RT_REF_SUPPORTS, (decl->isOptional() ? RT_ACCESS_OPTIONAL : RT_ACCESS_INVALID), - OStringToOUString( decl->getRealInterface()->getRelativName(), - RTL_TEXTENCODING_UTF8)); + OUString::fromUtf8( decl->getRealInterface()->getRelativName() )); break; } @@ -269,8 +267,7 @@ bool AstService::dump(RegistryKey& rKey) AstServiceMember * decl = static_cast<AstServiceMember *>(*i); writer.setReferenceData(referenceIndex++, decl->getDocumentation(), RT_REF_EXPORTS, (decl->isOptional() ? RT_ACCESS_OPTIONAL : RT_ACCESS_INVALID), - OStringToOUString(decl->getRealService()->getRelativName(), - RTL_TEXTENCODING_UTF8)); + OUString::fromUtf8(decl->getRealService()->getRelativName())); } break; @@ -279,8 +276,7 @@ bool AstService::dump(RegistryKey& rKey) AstObserves * decl = static_cast<AstObserves *>(*i); writer.setReferenceData(referenceIndex++, decl->getDocumentation(), RT_REF_OBSERVES, RT_ACCESS_INVALID, - OStringToOUString( decl->getRealInterface()->getRelativName(), - RTL_TEXTENCODING_UTF8)); + OUString::fromUtf8( decl->getRealInterface()->getRelativName())); break; } @@ -289,8 +285,7 @@ bool AstService::dump(RegistryKey& rKey) AstNeeds * decl = static_cast<AstNeeds *>(*i); writer.setReferenceData( referenceIndex++, decl->getDocumentation(), RT_REF_NEEDS, RT_ACCESS_INVALID, - OStringToOUString( decl->getRealService()->getRelativName(), - RTL_TEXTENCODING_UTF8)); + OUString::fromUtf8( decl->getRealService()->getRelativName())); break; } @@ -367,10 +362,10 @@ bool AstAttribute::dumpBlob( accessMode |= RT_ACCESS_REMOVABLE; } - OUString name(OStringToOUString(getLocalName(), RTL_TEXTENCODING_UTF8)); + OUString name(OUString::fromUtf8(getLocalName())); rBlob.setFieldData( index, getDocumentation(), OUString(), accessMode, name, - OStringToOUString(getType()->getRelativName(), RTL_TEXTENCODING_UTF8), + OUString::fromUtf8(getType()->getRelativName()), RTConstValue()); dumpExceptions( rBlob, m_getDocumentation, m_getExceptions, RT_MODE_ATTRIBUTE_GET, @@ -393,7 +388,7 @@ void AstAttribute::dumpExceptions( // AstInterface::dump: writer.setMethodData( idx, documentation, flags, - OStringToOUString(getLocalName(), RTL_TEXTENCODING_UTF8), + OUString::fromUtf8(getLocalName()), OUString("void"), 0, static_cast< sal_uInt16 >(exceptions.size())); sal_uInt16 exceptionIndex = 0; @@ -402,8 +397,7 @@ void AstAttribute::dumpExceptions( { writer.setMethodExceptionTypeName( idx, exceptionIndex++, - OStringToOUString( - (*i)->getRelativName(), RTL_TEXTENCODING_UTF8)); + OUString::fromUtf8((*i)->getRelativName())); } } } |