summaryrefslogtreecommitdiff
path: root/javaunohelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-30 16:38:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-31 08:56:20 +0000
commit1c3e84d8192218befebcddae2ed9842d081dc6c7 (patch)
treef4fc5cddd181d6d49bf55f74e6d3d107b8ae8d18 /javaunohelper
parente1e6cdbb1e9ff37f0bb740a70045c66953bec50c (diff)
teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'javaunohelper')
-rw-r--r--javaunohelper/source/vm.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/javaunohelper/source/vm.cxx b/javaunohelper/source/vm.cxx
index 4b42b5446cb9..763fc4c98aee 100644
--- a/javaunohelper/source/vm.cxx
+++ b/javaunohelper/source/vm.cxx
@@ -68,11 +68,7 @@ css::uno::Reference< css::uno::XInterface > SingletonFactory::createInstanceWith
css::uno::Reference< css::uno::XComponentContext > const & xContext )
{
sal_Int64 handle = reinterpret_cast< sal_Int64 >( m_vm_access.get() );
- css::uno::Any arg(
- css::uno::makeAny(
- css::beans::NamedValue(
- OUString( "UnoVirtualMachine" ),
- css::uno::makeAny( handle ) ) ) );
+ css::uno::Any arg( css::beans::NamedValue( "UnoVirtualMachine", css::uno::makeAny( handle ) ) );
return xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.java.JavaVirtualMachine",
css::uno::Sequence< css::uno::Any >( &arg, 1 ), xContext );
@@ -111,7 +107,7 @@ css::uno::Reference< css::uno::XComponentContext > install_vm_singleton(
{
css::uno::Reference< css::lang::XSingleComponentFactory > xFac( new SingletonFactory( vm_access ) );
::cppu::ContextEntry_Init entry(
- OUString("/singletons/com.sun.star.java.theJavaVirtualMachine"),
+ "/singletons/com.sun.star.java.theJavaVirtualMachine",
css::uno::makeAny( xFac ), true );
return ::cppu::createComponentContext( &entry, 1, xContext );
}