summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/dbdocimp.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerNoel Grandin <noel@peralex.com>2016-05-04 12:39:40 +0200
commit58a32075ca4f457f570af75aef368dd6c389aca7 (patch)
treee437dcbdeb248b4316cb8a9281d1543419853f6d /sc/source/ui/docshell/dbdocimp.cxx
parent7d47700972d267fe7c5270c5dadd45a523a2baec (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.cxx10
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() )