summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/uno
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-17 16:09:38 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-17 16:09:38 +0100
commit41bc9ff8d750b4af10d20a36539c57da14695dcf (patch)
treedc2ee437c54daba12ac442fd0e10baf97eadf184 /dbaccess/source/ui/uno
parentf6ccb8354a350fce31f8c6c7d04b86d5c0a126d1 (diff)
parente35c56815d43a06c53488e3efa35f062a6a2d60c (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: dbaccess/source/core/misc/services.cxx dbaccess/source/filter/migration/cfgimport.cxx reportdesign/source/core/api/ReportDefinition.cxx
Diffstat (limited to 'dbaccess/source/ui/uno')
-rw-r--r--dbaccess/source/ui/uno/ColumnControl.cxx4
-rw-r--r--dbaccess/source/ui/uno/ColumnControl.hxx1
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx15
3 files changed, 16 insertions, 4 deletions
diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx
index c98e3ffa6d21..beac49e1513f 100644
--- a/dbaccess/source/ui/uno/ColumnControl.cxx
+++ b/dbaccess/source/ui/uno/ColumnControl.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::sdbc;
OColumnControl::OColumnControl(const Reference<XMultiServiceFactory>& _rxFactory)
-: m_xORB(_rxFactory)
+ :UnoControl( _rxFactory )
{
}
// -----------------------------------------------------------------------------
@@ -76,7 +76,7 @@ void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit
pParentWin = pParent->GetWindow();
}
- OColumnPeer* pPeer = new OColumnPeer(pParentWin,m_xORB);
+ OColumnPeer* pPeer = new OColumnPeer( pParentWin, maContext.getLegacyServiceFactory() );
OSL_ENSURE(pPeer != NULL, "FmXGridControl::createPeer : imp_CreatePeer didn't return a peer !");
setPeer( pPeer );
diff --git a/dbaccess/source/ui/uno/ColumnControl.hxx b/dbaccess/source/ui/uno/ColumnControl.hxx
index 08ef5e8f5fe5..7971357106d3 100644
--- a/dbaccess/source/ui/uno/ColumnControl.hxx
+++ b/dbaccess/source/ui/uno/ColumnControl.hxx
@@ -35,7 +35,6 @@ namespace dbaui
{
class OColumnControl : public UnoControl
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB;
public:
OColumnControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index e3e86ae44b1b..3fb4b032e3bc 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1179,8 +1179,15 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
aSourceColTypes.reserve( nCount + 1 );
aSourceColTypes.push_back( -1 ); // just to avoid a everytime i-1 call
+ ::std::vector< sal_Int32 > aSourcePrec;
+ aSourcePrec.reserve( nCount + 1 );
+ aSourcePrec.push_back( -1 ); // just to avoid a everytime i-1 call
+
for ( sal_Int32 k=1; k <= nCount; ++k )
+ {
aSourceColTypes.push_back( xMeta->getColumnType( k ) );
+ aSourcePrec.push_back( xMeta->getPrecision( k ) );
+ }
// now create, fill and execute the prepared statement
Reference< XPreparedStatement > xStatement( ODatabaseExport::createPreparedStatment( xDestMetaData, _rxDestTable, aColumnMapping ), UNO_SET_THROW );
@@ -1292,7 +1299,6 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
case DataType::LONGVARBINARY:
case DataType::BINARY:
case DataType::VARBINARY:
- case DataType::BIT:
aTransfer.transferComplexValue( &XRow::getBytes, &XParameters::setBytes );
break;
@@ -1308,6 +1314,13 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
aTransfer.transferComplexValue( &XRow::getTimestamp, &XParameters::setTimestamp );
break;
+ case DataType::BIT:
+ if ( aSourcePrec[nSourceColumn] > 1 )
+ {
+ aTransfer.transferComplexValue( &XRow::getBytes, &XParameters::setBytes );
+ break;
+ }
+ // run through
case DataType::BOOLEAN:
aTransfer.transferValue( &XRow::getBoolean, &XParameters::setBoolean );
break;