diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-04 12:27:22 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-04 20:36:11 +0200 |
commit | 84662e9030a855c8db7cd40d9ce354b773d78c16 (patch) | |
tree | 1c83da4320267f2bc17493e3b528ef388cb9c0ac /unodevtools/source/skeletonmaker/javacompskeleton.cxx | |
parent | 3c6c56b107d71d5f4790be0b76299e8f215f88cc (diff) |
Get rid of b2u/u2b helpers; use OUString's toUtf8/fromUtf8 instead
These helpers are used in code generator code; so any invalid UTF-8
or UTF-16 in the conversion is programmer's error which needs fixing.
Thus, the behavior of toUtf8/fromUtf8 which asserts the validity is
fine here.
Change-Id: I3004e233c9de59f8e348455f1f04d23e8c51ed3d
Reviewed-on: https://gerrit.libreoffice.org/70249
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'unodevtools/source/skeletonmaker/javacompskeleton.cxx')
-rw-r--r-- | unodevtools/source/skeletonmaker/javacompskeleton.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx index 741387cfe120..cf6f6c5f1304 100644 --- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx @@ -495,18 +495,18 @@ static void generateMethodBodies(std::ostream& o, for (const OUString& type : interfaces) { if (type == "com.sun.star.lang.XServiceInfo") { generateXServiceInfoBodies(o); - generated.add(u2b(type)); + generated.add(type.toUtf8()); } else { if (options.componenttype == 2) { if (type == "com.sun.star.lang.XServiceName") { o << " // com.sun.star.lang.XServiceName:\n" " public String getServiceName() {\n" " return sADDIN_SERVICENAME;\n }\n"; - generated.add(u2b(type)); + generated.add(type.toUtf8()); continue; } else if (type == "com.sun.star.sheet.XAddIn") { generateXAddInBodies(o); - generated.add(u2b(type)); + generated.add(type.toUtf8()); // special handling of XLocalizable -> parent of XAddIn if (!generated.contains("com.sun.star.lang.XLocalizable")) { @@ -516,26 +516,26 @@ static void generateMethodBodies(std::ostream& o, continue; } else if (type == "com.sun.star.lang.XLocalizable") { generateXLocalizableBodies(o); - generated.add(u2b(type)); + generated.add(type.toUtf8()); continue; } else if (type == "com.sun.star.sheet.XCompatibilityNames") { generateXCompatibilityNamesBodies(o); - generated.add(u2b(type)); + generated.add(type.toUtf8()); continue; } } if (options.componenttype == 3) { if (type == "com.sun.star.lang.XInitialization") { generateXInitializationBodies(o); - generated.add(u2b(type)); + generated.add(type.toUtf8()); continue; } else if (type == "com.sun.star.frame.XDispatch") { generateXDispatchBodies(o, options); - generated.add(u2b(type)); + generated.add(type.toUtf8()); continue; } else if (type == "com.sun.star.frame.XDispatchProvider") { generateXDispatchProviderBodies(o, options); - generated.add(u2b(type)); + generated.add(type.toUtf8()); continue; } } @@ -812,7 +812,7 @@ void generateSkeleton(ProgramOptions const & options, bool supportxcomponent = false; for (const auto& rType : types) { - checkType(manager, b2u(rType), interfaces, services, properties); + checkType(manager, OUString::fromUtf8(rType), interfaces, services, properties); } if (options.componenttype == 3) { |