diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-09-15 22:39:23 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-09-16 21:58:58 +0200 |
commit | f499acb2af1d879c776987bdc2366acb5d5964e6 (patch) | |
tree | 04b513fa5d2cf48dc9a0cc1ba9b9b237762b5967 | |
parent | 7a8b337b54690c6962994da8646064665b3f2009 (diff) |
fdo#69091: Copying data from Base-table to Calc by drag and drop
Depending on whether the data source is registered, either
rDescriptor[svx::daDataSource]
or
rDescriptor[svx::daDatabaseLocation]
will be filled in (and should be used).
Luckily, ODataAccessDescriptor provides a utility
function that will automatically return the one
that is set. Use that instead of hardcoding svx::daDataSource.
Thank you Lionel!
Change-Id: I02673e7924c4323915dea579015326194c3f5077
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 1c35fd65f02f..dc31cd9095d2 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -1698,7 +1698,7 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const svx::ODataAccessDes OUString sDBName; OUString sDBTable; sal_Int32 nCommandType = 0; - rDescriptor[svx::daDataSource] >>= sDBName; + sDBName = rDescriptor.getDataSource(); rDescriptor[svx::daCommand] >>= sDBTable; rDescriptor[svx::daCommandType] >>= nCommandType; |