summaryrefslogtreecommitdiff
path: root/unodevtools
diff options
context:
space:
mode:
Diffstat (limited to 'unodevtools')
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index 639438799d48..49a86e87d866 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -252,7 +252,8 @@ static void printConstructor(
rtl::Reference< unoidl::Entity > const & entity, std::u16string_view name,
std::vector< OUString > const & arguments)
{
- o << "public " << OUString(name.substr(name.rfind('.') + 1)) << '(';
+ std::u16string_view::size_type pos = name.rfind('.');
+ o << "public " << OUString(name.substr((pos != std::u16string_view::npos) ? pos + 1 : 0)) << '(';
printConstructorParameters(
o, options, manager, sort, entity, name, arguments);
o << ");\n";