diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-03 08:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-04 12:39:40 +0200 |
commit | 58a32075ca4f457f570af75aef368dd6c389aca7 (patch) | |
tree | e437dcbdeb248b4316cb8a9281d1543419853f6d /sc/source/ui/docshell/dbdocimp.cxx | |
parent | 7d47700972d267fe7c5270c5dadd45a523a2baec (diff) |
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'sc/source/ui/docshell/dbdocimp.cxx')
-rw-r--r-- | sc/source/ui/docshell/dbdocimp.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index 45a68e64e851..8cba5795a60f 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -210,16 +210,12 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, sal_Int32 nType = rParam.bSql ? sdb::CommandType::COMMAND : ( (rParam.nType == ScDbQuery) ? sdb::CommandType::QUERY : sdb::CommandType::TABLE ); - uno::Any aAny; - aAny <<= rParam.aDBName; - xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, aAny ); + xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, uno::Any(rParam.aDBName) ); - aAny <<= rParam.aStatement; - xRowProp->setPropertyValue( SC_DBPROP_COMMAND, aAny ); + xRowProp->setPropertyValue( SC_DBPROP_COMMAND, uno::Any(rParam.aStatement) ); - aAny <<= nType; - xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, aAny ); + xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, uno::Any(nType) ); uno::Reference<sdb::XCompletedExecution> xExecute( xRowSet, uno::UNO_QUERY ); if ( xExecute.is() ) |