diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-10-31 15:13:58 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-01 15:25:43 +0000 |
commit | b5db48ada113206ac090e4a08f2ae211859103ed (patch) | |
tree | 5ca14a8e4209f18845476546953683b6adc860ab /sc/source/ui | |
parent | 9da44ea99fe2fb4455b5e02ee8b178f22584254a (diff) |
no need to use OUString constructor in call to createInstance
Change-Id: Iaf3d83ba1490cb1d97a5bd4d1f7cd6943d4a7296
Reviewed-on: https://gerrit.libreoffice.org/19704
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/docshell/dbdocimp.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index b16827082573..f2f9dcea364a 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -201,10 +201,9 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if ( !xRowSet.is() ) { bDispose = true; - xRowSet = uno::Reference<sdbc::XRowSet>( - comphelper::getProcessServiceFactory()->createInstance( - OUString( SC_SERVICE_ROWSET ) ), - uno::UNO_QUERY); + xRowSet.set(comphelper::getProcessServiceFactory()->createInstance( + SC_SERVICE_ROWSET ), + uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY ); OSL_ENSURE( xRowProp.is(), "can't get RowSet" ); if ( xRowProp.is() ) diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 3d877f6edb12..317cbf2741f1 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -318,8 +318,7 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi ScProgress aProgress( this, ScGlobal::GetRscString( STR_LOAD_DOC ), 0 ); uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory(); - uno::Reference<sdbc::XRowSet> xRowSet( xFactory->createInstance( - OUString( SC_SERVICE_ROWSET ) ), + uno::Reference<sdbc::XRowSet> xRowSet( xFactory->createInstance(SC_SERVICE_ROWSET), uno::UNO_QUERY); ::utl::DisposableComponent aRowSetHelper(xRowSet); uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY ); @@ -924,8 +923,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi // get row set for writing uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory(); - uno::Reference<sdbc::XRowSet> xRowSet( xFactory->createInstance( - OUString( SC_SERVICE_ROWSET ) ), + uno::Reference<sdbc::XRowSet> xRowSet( xFactory->createInstance(SC_SERVICE_ROWSET), uno::UNO_QUERY); ::utl::DisposableComponent aRowSetHelper(xRowSet); uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY ); |