diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-26 23:38:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-27 09:23:46 +0100 |
commit | 6f976916e2ae5dd83838a7f5de273944eb61e7f2 (patch) | |
tree | cbaced827624301a274b796c4eac41318931ee05 /sw/source/ui/dbui/mmoutputpage.cxx | |
parent | 1614c1150665d2d6e855a506d667127e0bd73939 (diff) |
Related: fdo#35404 treat failed column same as non-existing column
Diffstat (limited to 'sw/source/ui/dbui/mmoutputpage.cxx')
-rw-r--r-- | sw/source/ui/dbui/mmoutputpage.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index c4f5219699c1..374e68f37dce 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -101,13 +101,19 @@ String lcl_GetExtensionForDocType(sal_uLong nDocType) ::rtl::OUString lcl_GetColumnValueOf(const ::rtl::OUString& rColumn, Reference < container::XNameAccess>& rxColAccess ) { ::rtl::OUString sRet; - if(rxColAccess->hasByName(rColumn)) + try + { + if (rxColAccess->hasByName(rColumn)) + { + Any aCol = rxColAccess->getByName(rColumn); + Reference< sdb::XColumn > xColumn; + aCol >>= xColumn; + if(xColumn.is()) + sRet = xColumn->getString(); + } + } + catch (const uno::Exception&) { - Any aCol = rxColAccess->getByName(rColumn); - Reference< sdb::XColumn > xColumn; - aCol >>= xColumn; - if(xColumn.is()) - sRet = xColumn->getString(); } return sRet; } |