From 730c6bfce574e386d07193e8b3974748ef30e464 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Tue, 5 Nov 2013 18:37:50 +0100 Subject: fill in nNumPrecRadix Wrongfully removed by commit 808052a13947c9841ce5c9e40860c48bbfbf3434 Date: Tue Jun 20 02:21:13 2006 +0000 which only wanted to make the code warning-free... But also disallow radix 1 (which does not make much sense) Change-Id: Id8e313301fa6d5e9643d76865a62cc933999a63e --- dbaccess/source/ui/misc/DExport.cxx | 5 +++++ dbaccess/source/ui/misc/UITools.cxx | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'dbaccess/source/ui/misc') diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 1e8ea2b13861..bd5cdbbfa9a6 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -267,6 +267,9 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); m_pTypeInfo->nMaximumScale = aValue; + nPos = 18; + aValue.fill(nPos,aTypes[nPos],xRow); + m_pTypeInfo->nNumPrecRadix = aValue; // check if values are less than zero like it happens in a oracle jdbc driver if( m_pTypeInfo->nPrecision < 0) @@ -275,6 +278,8 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, m_pTypeInfo->nMinimumScale = 0; if( m_pTypeInfo->nMaximumScale < 0) m_pTypeInfo->nMaximumScale = 0; + if( m_pTypeInfo->nNumPrecRadix <= 1) + m_pTypeInfo->nNumPrecRadix = 10; break; } } diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 807764b2a78f..3f6ffab3412e 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -507,8 +507,11 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); pInfo->nMaximumScale = aValue; + assert(nPos == 15); + // 16 and 17 are unused nPos = 18; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); + pInfo->nNumPrecRadix = aValue; // check if values are less than zero like it happens in a oracle jdbc driver if( pInfo->nPrecision < 0) @@ -517,6 +520,8 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo pInfo->nMinimumScale = 0; if( pInfo->nMaximumScale < 0) pInfo->nMaximumScale = 0; + if( pInfo->nNumPrecRadix <= 1) + pInfo->nNumPrecRadix = 10; OUString aName; switch(pInfo->nType) -- cgit