diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 12:06:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-24 14:43:34 +0200 |
commit | 6f50961e69406a17d6ec998956a6b33208b1001b (patch) | |
tree | 413c83df969e73c5cba1e11ef3740afc748ee1f5 /idlc | |
parent | 4e729de73f2947155248f8df5897380611b87917 (diff) |
remove more rtl::OUString and OString prefixes
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/source/parser.y | 37 | ||||
-rw-r--r-- | idlc/source/scanner.l | 36 |
2 files changed, 34 insertions, 39 deletions
diff --git a/idlc/source/parser.y b/idlc/source/parser.y index 9cd8f4465894..74ceb348dc46 100644 --- a/idlc/source/parser.y +++ b/idlc/source/parser.y @@ -58,15 +58,10 @@ #define YYDEBUG 1 #define YYERROR_VERBOSE 1 -using ::rtl::OUString; -using ::rtl::OString; -using ::rtl::OStringToOUString; -using ::rtl::OStringBuffer; - extern int yylex(void); static void yyerror(char const *); -static void checkIdentifier(::rtl::OString const * id) +static void checkIdentifier(OString const * id) { static short check = 0; if (check == 0) { @@ -80,7 +75,7 @@ static void checkIdentifier(::rtl::OString const * id) if ( (id->pData->buffer[0] >= 97 && id->pData->buffer[0] <= 122) || id->pData->buffer[0] == '_') { if (check == 1) { - ::rtl::OStringBuffer msg(25 + id->getLength()); + OStringBuffer msg(25 + id->getLength()); msg.append("mismatched identifier '"); msg.append(*id); msg.append("'"); @@ -103,8 +98,8 @@ static void reportDoubleMemberDeclarations( } static void addInheritedInterface( - AstInterface * ifc, rtl::OString const & name, bool optional, - rtl::OUString const & documentation) + AstInterface * ifc, OString const & name, bool optional, + OUString const & documentation) { AstDeclaration * decl = ifc->lookupByName(name); AstDeclaration const * resolved = resolveTypedefs(decl); @@ -141,7 +136,7 @@ static void addInheritedInterface( } static AstDeclaration const * createNamedType( - rtl::OString const * scopedName, DeclList const * typeArgs) + OString const * scopedName, DeclList const * typeArgs) { AstDeclaration * decl = idlc()->scopes()->topNonNull()->lookupByName( *scopedName); @@ -219,8 +214,8 @@ static bool includes(AstDeclaration const * type1, AstDeclaration const * type2) FeDeclarator* fdval; /* declarator value */ FeDeclList* dlval; /* declarator list value */ FeInheritanceHeader* ihval; /* inheritance header value */ - ::rtl::OString* sval; /* OString value */ - std::vector< rtl::OString > * svals; + OString* sval; /* OString value */ + std::vector< OString > * svals; sal_Char* strval; /* sal_Char* value */ bool bval; /* sal_Boolean* value */ sal_Int64 ival; /* sal_Int64 value */ @@ -631,8 +626,8 @@ interface_dcl : && ifc->getScopedName() != "com::sun::star::uno::XInterface") { addInheritedInterface( - ifc, rtl::OString("::com::sun::star::uno::XInterface"), false, - rtl::OUString()); + ifc, OString("::com::sun::star::uno::XInterface"), false, + OUString()); } ifc->setDefined(); idlc()->setParseState(PS_InterfaceBodySeen); @@ -887,8 +882,8 @@ opt_attribute_get_raises: attribute_get_raises: IDL_GET raises ';' { - $$.documentation = new rtl::OUString( - rtl::OStringToOUString( + $$.documentation = new OUString( + OStringToOUString( idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8)); $$.exceptions = $2; } @@ -910,8 +905,8 @@ attribute_set_raises: } raises ';' { - $$.documentation = new rtl::OUString( - rtl::OStringToOUString( + $$.documentation = new OUString( + OStringToOUString( idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8)); $$.exceptions = $3; } @@ -1194,7 +1189,7 @@ interface_inheritance_decl: } else { addInheritedInterface( ifc, *$4, $1, - rtl::OStringToOUString( + OStringToOUString( idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8)); } delete $4; @@ -2176,7 +2171,7 @@ scoped_name : identifier { checkIdentifier($4); - *$1 += ::rtl::OString("::"); + *$1 += OString("::"); *$1 += *$4; delete $4; $$ = $1; @@ -2478,7 +2473,7 @@ opt_type_params: type_params: identifier { - $$ = new std::vector< rtl::OString >; + $$ = new std::vector< OString >; $$->push_back(*$1); delete $1; } diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l index 180381c3ff38..a7c23f458b96 100644 --- a/idlc/source/scanner.l +++ b/idlc/source/scanner.l @@ -58,7 +58,7 @@ int yycolumn = 1; yycolumn += yyleng; sal_Int32 beginLine = 0; -::rtl::OString docu; +OString docu; static int asciiToInteger(char const * s, sal_Int64 * sval, sal_uInt64 * uval) { bool neg = false; @@ -202,12 +202,12 @@ static double asciiToFloat(const sal_Char *s) static void idlParsePragma(sal_Char* pPragma) { - ::rtl::OString pragma(pPragma); + OString pragma(pPragma); sal_Int32 index = pragma.indexOf("include"); sal_Char* begin = pPragma + index + 8; sal_Char* offset = begin; while (*offset != ',') offset++; - //::rtl::OString include = pragma.copy(index + 8, offset - begin); + //OString include = pragma.copy(index + 8, offset - begin); //unused// idlc()->insertInclude(pragma.copy(index + 8, (sal_Int32)(offset - begin))); } @@ -239,9 +239,9 @@ static void parseLineAndFile(sal_Char* pBuf) for (; *r != '"'; r++) ; *r = 0; if (*h == '\0') - idlc()->setFileName(::rtl::OString("standard input")); + idlc()->setFileName(OString("standard input")); else - idlc()->setFileName(::rtl::OString(h)); + idlc()->setFileName(OString(h)); bIsInMain = idlc()->getFileName() == idlc()->getRealFileName(); idlc()->setInMainfile(bIsInMain); @@ -364,7 +364,7 @@ published return IDL_PUBLISHED; } {IDENTIFIER} { - yylval.sval = new ::rtl::OString(yytext); + yylval.sval = new OString(yytext); return IDL_IDENTIFIER; } @@ -383,26 +383,26 @@ published return IDL_PUBLISHED; "/*" { BEGIN( COMMENT ); - docu = ::rtl::OString(); + docu = OString(); beginLine = idlc()->getLineNumber(); } "/***" { BEGIN( COMMENT ); - docu = ::rtl::OString(); + docu = OString(); beginLine = idlc()->getLineNumber(); } <COMMENT>[^*]+ { - docu += ::rtl::OString(yytext); + docu += OString(yytext); } <COMMENT>"*"[^*/]+ { - docu += ::rtl::OString(yytext); + docu += OString(yytext); } <COMMENT>"**" { - docu += ::rtl::OString(yytext); + docu += OString(yytext); } <COMMENT>[*]+"/" { @@ -416,26 +416,26 @@ published return IDL_PUBLISHED; "/**" { BEGIN( DOCU ); - docu = ::rtl::OString(); + docu = OString(); beginLine = idlc()->getLineNumber(); } <DOCU>[^*\n]+ { - docu += ::rtl::OString(yytext); + docu += OString(yytext); } <DOCU>"\n"[ \t]*"*"{1} { idlc()->setLineNumber( idlc()->getLineNumber() + 1); - docu += ::rtl::OString("\n"); + docu += OString("\n"); } <DOCU>"\n" { idlc()->setLineNumber( idlc()->getLineNumber() + 1); - docu += ::rtl::OString(yytext); + docu += OString(yytext); } <DOCU>"*"[^*^/\n]* { - docu += ::rtl::OString(yytext); + docu += OString(yytext); } <DOCU>"\n"[ \t]*"*/" { @@ -474,7 +474,7 @@ published return IDL_PUBLISHED; "//"[^/]{1}.*"\n" { /* only a comment */ - ::rtl::OString docStr(yytext); + OString docStr(yytext); docStr = docStr.copy( 0, docStr.lastIndexOf('\n') ); docStr = docStr.copy( docStr.lastIndexOf('/')+1 ); docStr = docStr.trim(); @@ -482,7 +482,7 @@ published return IDL_PUBLISHED; } "///".*"\n" { - ::rtl::OString docStr(yytext); + OString docStr(yytext); docStr = docStr.copy( 0, docStr.lastIndexOf('\n') ); docStr = docStr.copy( docStr.lastIndexOf('/')+1 ); docStr = docStr.trim(); |