summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-10-17 17:00:10 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2016-10-18 19:14:57 +0000
commit55bcb865ee09673af06652e507d08d13069eae86 (patch)
treeac461d76191bbc94777726b1a51fd73787b7f39a /ucb
parent5cfbab03f914946bf9e5813eae707328fda438f9 (diff)
ucb: fix handling of >>= with rhs Any
>>= for rhs Any is always true, check result with hasValue() instead. bool convert<uno::Any>(...) always returns false and assigns the 3rd parameter to the 4th. do the assign directly and check result with hasValue(). Change-Id: I0ae985cc0837abf1108930d593edae69de2ae549 Reviewed-on: https://gerrit.libreoffice.org/29977 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx5
-rw-r--r--ucb/source/ucp/file/filrow.cxx4
2 files changed, 4 insertions, 5 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index c45410bef37b..abf29aa1e12b 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -2118,10 +2118,9 @@ Any SAL_CALL CachedContentResultSet
}
//@todo: pay attention to typeMap
const Any& rValue = m_aCache.getAny( nRow, columnIndex );
- Any aRet;
m_bLastReadWasFromCache = true;
- m_bLastCachedReadWasNull = !( rValue >>= aRet );
- return aRet;
+ m_bLastCachedReadWasNull = !rValue.hasValue();
+ return rValue;
}
//virtual
diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx
index aafeca501bee..370906239bbe 100644
--- a/ucb/source/ucp/file/filrow.cxx
+++ b/ucb/source/ucp/file/filrow.cxx
@@ -307,9 +307,9 @@ XRow_impl::getObject(
{
if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() )
throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface >(), OUString(), 0, uno::Any() );
- uno::Any Value;
osl::MutexGuard aGuard( m_aMutex );
- m_nWasNull = ::convert<uno::Any>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
+ uno::Any Value = m_aValueMap[columnIndex - 1];
+ m_nWasNull = !Value.hasValue();
return Value;
}