summaryrefslogtreecommitdiff
path: root/codemaker/source/cppumaker/cpputype.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'codemaker/source/cppumaker/cpputype.cxx')
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx46
1 files changed, 23 insertions, 23 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index f2007e5ee19f..3a436ca01111 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -253,7 +253,7 @@ sal_Bool CppuType::dumpFile(CppuOptions* pOptions,
}
OString sFileName = createFileNameFromType(sOutPath, sName, sExtension);
- if (sFileName.getLength() == 0)
+ if (sFileName.isEmpty())
return sal_False;
sal_Bool bFileExists = fileExists( sFileName );
@@ -539,7 +539,7 @@ void CppuType::dumpNormalGetCppuType(FileStream& o)
m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
}
sal_Bool bIsBaseException = sal_False;
- if (superType.getLength() > 0)
+ if (!superType.isEmpty())
{
if ( superType.equals("com/sun/star/uno/Exception") )
{
@@ -599,7 +599,7 @@ void CppuType::dumpNormalGetCppuType(FileStream& o)
o << indent() << "typelib_static_compound_type_init( &the_type, "
<< getTypeClass(m_typeName, sal_True) << ", \"" << m_typeName.replace('/', '.') << "\", ";
- if ( superType.getLength() > 0 || bIsBaseException )
+ if ( !superType.isEmpty() || bIsBaseException )
{
if ( bIsBaseException )
{
@@ -658,7 +658,7 @@ void CppuType::dumpComprehensiveGetCppuType(FileStream& o)
superType = rtl::OUStringToOString(
m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
}
- if (superType.getLength() > 0) {
+ if (!superType.isEmpty()) {
o << indent()
<< "const ::com::sun::star::uno::Type& rSuperType = ::cppu::UnoType< ";
dumpType(o, superType, false, false, false, true);
@@ -712,7 +712,7 @@ void CppuType::dumpComprehensiveGetCppuType(FileStream& o)
o << indent() << "&pTD,\n" << indent() << "(typelib_TypeClass)"
<< getTypeClass() << ", sTypeName.pData,\n";
- if (superType.getLength() > 0) {
+ if (!superType.isEmpty()) {
o << indent() << "rSuperType.getTypeLibType(),\n";
} else {
o << indent() << "0,\n";
@@ -816,7 +816,7 @@ sal_uInt32 CppuType::checkInheritedMemberCount(const typereg::Reader* pReader)
superType = rtl::OUStringToOString(
pReader->getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
}
- if (superType.getLength() > 0)
+ if (!superType.isEmpty())
{
typereg::Reader aSuperReader(m_typeMgr.getTypeReader(superType));
if ( aSuperReader.isValid() )
@@ -856,10 +856,10 @@ sal_uInt32 CppuType::getInheritedMemberCount()
OString CppuType::getTypeClass(const OString& type, sal_Bool bCStyle)
{
- OString typeName = (type.getLength() > 0 ? type : m_typeName);
+ OString typeName = (!type.isEmpty() ? type : m_typeName);
RTTypeClass rtTypeClass = RT_TYPE_INVALID;
- if (type.getLength() > 0)
+ if (!type.isEmpty())
{
typeName = type;
rtTypeClass = m_typeMgr.getTypeClass(typeName);
@@ -966,7 +966,7 @@ void CppuType::dumpType(FileStream& o, const OString& type,
case RT_TYPE_INVALID:
{
OString tmp(translateSimpleUnoType(relType, cppuUnoType));
- if (tmp.getLength() > 0)
+ if (!tmp.isEmpty())
{
o << tmp;
} else
@@ -2428,9 +2428,9 @@ void StructureType::dumpDeclaration(FileStream& o)
if (m_reader.getSuperTypeCount() != 0) {
base = rtl::OUStringToOString(
m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
- OSL_ASSERT(base.getLength() > 0); //TODO
+ OSL_ASSERT(!base.isEmpty()); //TODO
}
- if (base.getLength() > 0) {
+ if (!base.isEmpty()) {
o << ": public " << scopedCppName(base);
}
o << " {\n";
@@ -2480,7 +2480,7 @@ void StructureType::dumpDeclaration(FileStream& o)
o << " "
<< rtl::OUStringToOString(
m_reader.getFieldName(i), RTL_TEXTENCODING_UTF8);
- if (i == 0 && base.getLength() > 0 && type != "double"
+ if (i == 0 && !base.isEmpty() && type != "double"
&& type != "hyper" && type != "unsigned hyper")
{
OSL_ASSERT(!parameterized);
@@ -2523,7 +2523,7 @@ sal_Bool StructureType::dumpHxxFile(
m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
}
sal_Bool first = sal_True;
- if (superType.getLength() > 0)
+ if (!superType.isEmpty())
{
o << indent() << ": " << scopedCppName(superType) << "()\n";
first = sal_False;
@@ -2599,7 +2599,7 @@ sal_Bool StructureType::dumpHxxFile(
inc();
first = sal_True;
- if (superType.getLength() > 0)
+ if (!superType.isEmpty())
{
o << indent() << ": " << scopedCppName(superType) << "(";
dumpSuperMember(o, superType, sal_False);
@@ -3001,7 +3001,7 @@ sal_Bool StructureType::dumpSuperMember(FileStream& o, const OString& superType,
{
sal_Bool hasMember = sal_False;
- if (superType.getLength() > 0)
+ if (!superType.isEmpty())
{
typereg::Reader aSuperReader(m_typeMgr.getTypeReader(superType));
@@ -3176,7 +3176,7 @@ void ExceptionType::dumpDeclaration(FileStream& o)
superType = rtl::OUStringToOString(
m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
}
- if (superType.getLength() > 0)
+ if (!superType.isEmpty())
o << " : public " << scopedCppName(superType);
o << "\n{\npublic:\n";
@@ -3240,7 +3240,7 @@ void ExceptionType::dumpDeclaration(FileStream& o)
o << indent();
dumpType(o, fieldType);
o << " " << fieldName;
- if (i == 0 && superType.getLength() &&
+ if (i == 0 && !superType.isEmpty() &&
!fieldType.equals("double") && !fieldType.equals("hyper") && !fieldType.equals("unsigned hyper"))
{
o << " CPPU_GCC3_ALIGN( " << scopedCppName(superType) << " )";
@@ -3277,7 +3277,7 @@ sal_Bool ExceptionType::dumpHxxFile(
m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
}
sal_Bool first = sal_True;
- if (superType.getLength() > 0)
+ if (!superType.isEmpty())
{
o << indent() << ": " << scopedCppName(superType) << "()\n";
first = sal_False;
@@ -3353,7 +3353,7 @@ sal_Bool ExceptionType::dumpHxxFile(
inc();
first = sal_True;
- if (superType.getLength() > 0)
+ if (!superType.isEmpty())
{
o << indent() << ": " << scopedCppName(superType) << "(";
dumpSuperMember(o, superType, sal_False);
@@ -3398,7 +3398,7 @@ sal_Bool ExceptionType::dumpHxxFile(
o << indent() << m_name << "::" << m_name << "(" << m_name
<< " const & the_other)";
first = true;
- if (superType.getLength() > 0) {
+ if (!superType.isEmpty()) {
o << ": " << scopedCppName(superType) << "(the_other)";
first = false;
}
@@ -3417,7 +3417,7 @@ sal_Bool ExceptionType::dumpHxxFile(
o << indent()
<< ("//TODO: Just like its implicitly-defined counterpart, this function"
" definition is not exception-safe\n");
- if (superType.getLength() > 0) {
+ if (!superType.isEmpty()) {
o << indent() << scopedCppName(superType)
<< "::operator =(the_other);\n";
}
@@ -3446,7 +3446,7 @@ sal_Bool ExceptionType::dumpSuperMember(FileStream& o, const OString& superType,
{
sal_Bool hasMember = sal_False;
- if (superType.getLength() > 0)
+ if (!superType.isEmpty())
{
typereg::Reader aSuperReader(m_typeMgr.getTypeReader(superType));
@@ -4124,7 +4124,7 @@ void ServiceType::addSpecialDependencies() {
}
bool ServiceType::isDefaultConstructor(sal_uInt16 ctorIndex) const {
- return m_reader.getMethodName(ctorIndex).getLength() == 0;
+ return m_reader.getMethodName(ctorIndex).isEmpty();
}
bool ServiceType::hasRestParameter(sal_uInt16 ctorIndex) const {