2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 22:04:38 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 15:18:56 +00:00
|
|
|
|
|
|
|
#include <osl/diagnose.h>
|
|
|
|
#include "file/FStatement.hxx"
|
|
|
|
#include "file/FConnection.hxx"
|
2015-04-19 17:12:43 +01:00
|
|
|
#include "sqlbison.hxx"
|
2000-10-19 10:56:36 +00:00
|
|
|
#include "file/FDriver.hxx"
|
2000-09-18 15:18:56 +00:00
|
|
|
#include "file/FResultSet.hxx"
|
2000-10-09 11:34:19 +00:00
|
|
|
#include <comphelper/property.hxx>
|
2000-10-11 09:48:50 +00:00
|
|
|
#include <comphelper/uno3.hxx>
|
2000-09-18 15:18:56 +00:00
|
|
|
#include <osl/thread.h>
|
|
|
|
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
|
|
|
|
#include <com/sun/star/sdbc/ResultSetType.hpp>
|
2000-11-20 08:57:42 +00:00
|
|
|
#include <com/sun/star/sdbc/FetchDirection.hpp>
|
2000-09-18 15:18:56 +00:00
|
|
|
#include <com/sun/star/lang/DisposedException.hpp>
|
2012-11-02 15:13:28 +02:00
|
|
|
#include <comphelper/processfactory.hxx>
|
2000-10-09 11:34:19 +00:00
|
|
|
#include <comphelper/sequence.hxx>
|
2000-09-18 15:18:56 +00:00
|
|
|
#include <cppuhelper/typeprovider.hxx>
|
2014-06-04 15:29:58 +02:00
|
|
|
#include <connectivity/dbexception.hxx>
|
2008-10-01 12:28:29 +00:00
|
|
|
#include "resource/file_res.hrc"
|
2001-10-17 16:12:49 +00:00
|
|
|
#include <algorithm>
|
|
|
|
|
2000-10-24 15:19:10 +00:00
|
|
|
namespace connectivity
|
|
|
|
{
|
|
|
|
namespace file
|
|
|
|
{
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-12-03 11:11:40 +00:00
|
|
|
using namespace dbtools;
|
2000-09-18 15:18:56 +00:00
|
|
|
using namespace com::sun::star::uno;
|
|
|
|
using namespace com::sun::star::lang;
|
|
|
|
using namespace com::sun::star::beans;
|
|
|
|
using namespace com::sun::star::sdbc;
|
|
|
|
using namespace com::sun::star::sdbcx;
|
|
|
|
using namespace com::sun::star::container;
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2006-07-10 13:27:07 +00:00
|
|
|
OStatement_Base::OStatement_Base(OConnection* _pConnection )
|
|
|
|
:OStatement_BASE(m_aMutex)
|
2000-10-05 07:38:52 +00:00
|
|
|
,::comphelper::OPropertyContainer(OStatement_BASE::rBHelper)
|
2006-06-20 00:26:32 +00:00
|
|
|
,m_xDBMetaData(_pConnection->getMetaData())
|
2013-05-21 16:22:38 +02:00
|
|
|
,m_aParser( _pConnection->getDriver()->getComponentContext() )
|
2015-11-10 10:12:07 +01:00
|
|
|
,m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, nullptr )
|
2006-06-20 00:26:32 +00:00
|
|
|
,m_pConnection(_pConnection)
|
2015-11-10 10:12:07 +01:00
|
|
|
,m_pParseTree(nullptr)
|
|
|
|
,m_pSQLAnalyzer(nullptr)
|
|
|
|
,m_pTable(nullptr)
|
2000-11-20 08:57:42 +00:00
|
|
|
,m_nMaxFieldSize(0)
|
|
|
|
,m_nMaxRows(0)
|
|
|
|
,m_nQueryTimeOut(0)
|
|
|
|
,m_nFetchSize(0)
|
|
|
|
,m_nResultSetType(ResultSetType::FORWARD_ONLY)
|
|
|
|
,m_nFetchDirection(FetchDirection::FORWARD)
|
|
|
|
,m_nResultSetConcurrency(ResultSetConcurrency::UPDATABLE)
|
2014-04-16 09:14:24 +02:00
|
|
|
,m_bEscapeProcessing(true)
|
2006-06-20 00:26:32 +00:00
|
|
|
,rBHelper(OStatement_BASE::rBHelper)
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
|
|
|
m_pConnection->acquire();
|
|
|
|
|
|
|
|
sal_Int32 nAttrib = 0;
|
|
|
|
|
2014-05-10 23:51:21 +02:00
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CURSORNAME), PROPERTY_ID_CURSORNAME, nAttrib,&m_aCursorName, ::cppu::UnoType<OUString>::get());
|
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXFIELDSIZE), PROPERTY_ID_MAXFIELDSIZE, nAttrib,&m_nMaxFieldSize, ::cppu::UnoType<sal_Int32>::get());
|
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXROWS), PROPERTY_ID_MAXROWS, nAttrib,&m_nMaxRows, ::cppu::UnoType<sal_Int32>::get());
|
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_QUERYTIMEOUT), PROPERTY_ID_QUERYTIMEOUT, nAttrib,&m_nQueryTimeOut, ::cppu::UnoType<sal_Int32>::get());
|
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, nAttrib,&m_nFetchSize, ::cppu::UnoType<sal_Int32>::get());
|
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE), PROPERTY_ID_RESULTSETTYPE, nAttrib,&m_nResultSetType, ::cppu::UnoType<sal_Int32>::get());
|
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, nAttrib,&m_nFetchDirection, ::cppu::UnoType<sal_Int32>::get());
|
2015-04-01 08:36:20 +02:00
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ESCAPEPROCESSING),PROPERTY_ID_ESCAPEPROCESSING, nAttrib,&m_bEscapeProcessing,cppu::UnoType<bool>::get());
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2014-05-10 23:51:21 +02:00
|
|
|
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY), PROPERTY_ID_RESULTSETCONCURRENCY, nAttrib,&m_nResultSetConcurrency, ::cppu::UnoType<sal_Int32>::get());
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-05-23 13:05:55 +00:00
|
|
|
OStatement_Base::~OStatement_Base()
|
|
|
|
{
|
2012-09-22 01:51:12 -05:00
|
|
|
osl_atomic_increment( &m_refCount );
|
2001-08-24 05:19:41 +00:00
|
|
|
disposing();
|
|
|
|
delete m_pSQLAnalyzer;
|
2001-05-23 13:05:55 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-06-17 18:12:45 +02:00
|
|
|
void OStatement_Base::disposeResultSet()
|
|
|
|
{
|
|
|
|
SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::disposeResultSet" );
|
|
|
|
// free the cursor if alive
|
|
|
|
Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
|
|
|
|
assert(xComp.is() || !m_xResultSet.get().is());
|
|
|
|
if (xComp.is())
|
|
|
|
xComp->dispose();
|
|
|
|
m_xResultSet.clear();
|
|
|
|
}
|
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
void OStatement_BASE2::disposing()
|
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard(m_aMutex);
|
|
|
|
|
2014-06-17 18:12:45 +02:00
|
|
|
disposeResultSet();
|
|
|
|
|
2001-08-24 05:19:41 +00:00
|
|
|
if(m_pSQLAnalyzer)
|
|
|
|
m_pSQLAnalyzer->dispose();
|
|
|
|
|
2010-10-15 12:10:06 -05:00
|
|
|
if(m_aRow.is())
|
2001-08-24 05:19:41 +00:00
|
|
|
{
|
2008-12-30 13:32:01 +00:00
|
|
|
m_aRow->get().clear();
|
2015-11-10 10:12:07 +01:00
|
|
|
m_aRow = nullptr;
|
2001-08-24 05:19:41 +00:00
|
|
|
}
|
|
|
|
|
2000-11-03 13:21:22 +00:00
|
|
|
m_aSQLIterator.dispose();
|
2001-08-24 05:19:41 +00:00
|
|
|
|
|
|
|
if(m_pTable)
|
|
|
|
{
|
|
|
|
m_pTable->release();
|
2015-11-10 10:12:07 +01:00
|
|
|
m_pTable = nullptr;
|
2001-08-24 05:19:41 +00:00
|
|
|
}
|
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
if (m_pConnection)
|
2002-01-16 07:42:47 +00:00
|
|
|
{
|
2000-09-18 15:18:56 +00:00
|
|
|
m_pConnection->release();
|
2015-11-10 10:12:07 +01:00
|
|
|
m_pConnection = nullptr;
|
2002-01-16 07:42:47 +00:00
|
|
|
}
|
2001-10-01 10:24:29 +00:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
dispose_ChildImpl();
|
2002-01-16 07:42:47 +00:00
|
|
|
|
|
|
|
if ( m_pParseTree )
|
|
|
|
{
|
|
|
|
delete m_pParseTree;
|
2015-11-10 10:12:07 +01:00
|
|
|
m_pParseTree = nullptr;
|
2002-01-16 07:42:47 +00:00
|
|
|
}
|
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
OStatement_Base::disposing();
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-10-17 16:11:11 +00:00
|
|
|
void SAL_CALL OStatement_Base::acquire() throw()
|
2001-04-30 09:16:19 +00:00
|
|
|
{
|
|
|
|
OStatement_BASE::acquire();
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-10-17 16:11:11 +00:00
|
|
|
void SAL_CALL OStatement_BASE2::release() throw()
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
|
|
|
relase_ChildImpl();
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(RuntimeException, std::exception)
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
const Any aRet = OStatement_BASE::queryInterface(rType);
|
2001-08-24 05:19:41 +00:00
|
|
|
return aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface(rType);
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException, std::exception)
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
2014-05-22 23:19:05 +02:00
|
|
|
::cppu::OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(),
|
|
|
|
cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(),
|
|
|
|
cppu::UnoType<com::sun::star::beans::XPropertySet>::get());
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2000-10-09 11:34:19 +00:00
|
|
|
return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes());
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException, std::exception)
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-07-01 10:15:58 +01:00
|
|
|
void SAL_CALL OStatement_Base::close() throw (SQLException, RuntimeException, std::exception)
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( m_aMutex );
|
2001-05-17 05:46:55 +00:00
|
|
|
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
|
|
|
dispose();
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-07-01 10:15:58 +01:00
|
|
|
void OStatement_Base::closeResultSet() throw (SQLException, RuntimeException, std::exception)
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
2014-06-17 18:12:45 +02:00
|
|
|
SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::clearMyResultSet " );
|
2000-09-18 15:18:56 +00:00
|
|
|
::osl::MutexGuard aGuard( m_aMutex );
|
2001-05-17 05:46:55 +00:00
|
|
|
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
|
|
|
|
2014-06-17 18:12:45 +02:00
|
|
|
Reference< XCloseable > xCloseable(m_xResultSet.get(), UNO_QUERY);
|
|
|
|
assert(xCloseable.is() || !m_xResultSet.get().is());
|
|
|
|
if (xCloseable.is())
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
xCloseable->close();
|
|
|
|
}
|
|
|
|
catch( const DisposedException& ) { }
|
|
|
|
}
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2014-06-17 18:12:45 +02:00
|
|
|
m_xResultSet.clear();
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeException, std::exception)
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( m_aMutex );
|
2001-05-17 05:46:55 +00:00
|
|
|
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
|
|
|
|
2000-09-29 14:30:09 +00:00
|
|
|
return makeAny(m_aLastWarning);
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeException, std::exception)
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( m_aMutex );
|
2001-05-17 05:46:55 +00:00
|
|
|
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
|
|
|
|
2000-09-29 14:30:09 +00:00
|
|
|
m_aLastWarning = SQLWarning();
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
::cppu::IPropertyArrayHelper* OStatement_Base::createArrayHelper( ) const
|
|
|
|
{
|
2000-09-29 14:30:09 +00:00
|
|
|
Sequence< Property > aProps;
|
2000-09-18 15:18:56 +00:00
|
|
|
describeProperties(aProps);
|
|
|
|
return new ::cppu::OPropertyArrayHelper(aProps);
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
::cppu::IPropertyArrayHelper & OStatement_Base::getInfoHelper()
|
|
|
|
{
|
2015-04-13 12:35:57 +02:00
|
|
|
return *getArrayHelper();
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-29 14:30:09 +00:00
|
|
|
OResultSet* OStatement::createResultSet()
|
|
|
|
{
|
|
|
|
return new OResultSet(this,m_aSQLIterator);
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbc.driver.file.Statement","com.sun.star.sdbc.Statement");
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-10-17 16:11:11 +00:00
|
|
|
void SAL_CALL OStatement::acquire() throw()
|
2001-04-30 09:16:19 +00:00
|
|
|
{
|
|
|
|
OStatement_BASE2::acquire();
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-10-17 16:11:11 +00:00
|
|
|
void SAL_CALL OStatement::release() throw()
|
2001-04-30 09:16:19 +00:00
|
|
|
{
|
|
|
|
OStatement_BASE2::release();
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
sal_Bool SAL_CALL OStatement::execute( const OUString& sql ) throw(SQLException, RuntimeException, std::exception)
|
2004-10-22 07:44:11 +00:00
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( m_aMutex );
|
|
|
|
|
|
|
|
executeQuery(sql);
|
|
|
|
|
2006-07-10 13:27:07 +00:00
|
|
|
return m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT;
|
2004-10-22 07:44:11 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2004-10-22 07:44:11 +00:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
Reference< XResultSet > SAL_CALL OStatement::executeQuery( const OUString& sql ) throw(SQLException, RuntimeException, std::exception)
|
2004-10-22 07:44:11 +00:00
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( m_aMutex );
|
|
|
|
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
|
|
|
|
|
|
|
construct(sql);
|
2005-03-18 08:57:10 +00:00
|
|
|
Reference< XResultSet > xRS;
|
2004-10-22 07:44:11 +00:00
|
|
|
OResultSet* pResult = createResultSet();
|
2005-03-18 08:57:10 +00:00
|
|
|
xRS = pResult;
|
2004-10-22 07:44:11 +00:00
|
|
|
initializeResultSet(pResult);
|
2014-06-17 18:12:45 +02:00
|
|
|
m_xResultSet = xRS;
|
2004-10-22 07:44:11 +00:00
|
|
|
|
|
|
|
pResult->OpenImpl();
|
2005-03-18 08:57:10 +00:00
|
|
|
|
2004-10-22 07:44:11 +00:00
|
|
|
return xRS;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
Reference< XConnection > SAL_CALL OStatement::getConnection( ) throw(SQLException, RuntimeException, std::exception)
|
2004-10-22 07:44:11 +00:00
|
|
|
{
|
2014-10-02 08:40:50 +02:00
|
|
|
return Reference< XConnection >(m_pConnection);
|
2004-10-22 07:44:11 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
sal_Int32 SAL_CALL OStatement::executeUpdate( const OUString& sql ) throw(SQLException, RuntimeException, std::exception)
|
2004-10-22 07:44:11 +00:00
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( m_aMutex );
|
|
|
|
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
|
|
|
|
|
|
|
|
|
|
|
construct(sql);
|
|
|
|
OResultSet* pResult = createResultSet();
|
|
|
|
Reference< XResultSet > xRS = pResult;
|
|
|
|
initializeResultSet(pResult);
|
|
|
|
pResult->OpenImpl();
|
|
|
|
|
|
|
|
return pResult->getRowCountResult();
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2015-04-14 12:44:47 +02:00
|
|
|
void SAL_CALL OStatement_Base::disposing()
|
2001-04-30 09:16:19 +00:00
|
|
|
{
|
2010-10-15 12:10:06 -05:00
|
|
|
if(m_aEvaluateRow.is())
|
2001-10-01 10:24:29 +00:00
|
|
|
{
|
2008-12-30 13:32:01 +00:00
|
|
|
m_aEvaluateRow->get().clear();
|
2015-11-10 10:12:07 +01:00
|
|
|
m_aEvaluateRow = nullptr;
|
2001-10-01 10:24:29 +00:00
|
|
|
}
|
2001-04-30 09:16:19 +00:00
|
|
|
OStatement_BASE::disposing();
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OStatement_Base::getPropertySetInfo( ) throw(RuntimeException, std::exception)
|
2001-04-30 09:16:19 +00:00
|
|
|
{
|
|
|
|
return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeException, std::exception)
|
2001-04-30 09:16:19 +00:00
|
|
|
{
|
2004-10-22 07:44:11 +00:00
|
|
|
Any aRet = OStatement_XStatement::queryInterface( rType);
|
|
|
|
return aRet.hasValue() ? aRet : OStatement_BASE2::queryInterface( rType);
|
2001-04-30 09:16:19 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-24 05:19:41 +00:00
|
|
|
OSQLAnalyzer* OStatement_Base::createAnalyzer()
|
|
|
|
{
|
2008-10-01 12:28:29 +00:00
|
|
|
return new OSQLAnalyzer(m_pConnection);
|
2001-08-24 05:19:41 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-24 05:19:41 +00:00
|
|
|
void OStatement_Base::anylizeSQL()
|
|
|
|
{
|
|
|
|
OSL_ENSURE(m_pSQLAnalyzer,"OResultSet::anylizeSQL: Analyzer isn't set!");
|
|
|
|
// start analysing the statement
|
|
|
|
m_pSQLAnalyzer->setOrigColumns(m_xColNames);
|
|
|
|
m_pSQLAnalyzer->start(m_pParseTree);
|
2001-04-30 09:16:19 +00:00
|
|
|
|
2001-08-24 05:19:41 +00:00
|
|
|
const OSQLParseNode* pOrderbyClause = m_aSQLIterator.getOrderTree();
|
|
|
|
if(pOrderbyClause)
|
|
|
|
{
|
|
|
|
OSQLParseNode * pOrderingSpecCommalist = pOrderbyClause->getChild(2);
|
|
|
|
OSL_ENSURE(SQL_ISRULE(pOrderingSpecCommalist,ordering_spec_commalist),"OResultSet: Fehler im Parse Tree");
|
|
|
|
|
2015-05-28 16:18:34 +02:00
|
|
|
for (size_t m = 0; m < pOrderingSpecCommalist->count(); m++)
|
2001-08-24 05:19:41 +00:00
|
|
|
{
|
|
|
|
OSQLParseNode * pOrderingSpec = pOrderingSpecCommalist->getChild(m);
|
|
|
|
OSL_ENSURE(SQL_ISRULE(pOrderingSpec,ordering_spec),"OResultSet: Fehler im Parse Tree");
|
|
|
|
OSL_ENSURE(pOrderingSpec->count() == 2,"OResultSet: Fehler im Parse Tree");
|
|
|
|
|
|
|
|
OSQLParseNode * pColumnRef = pOrderingSpec->getChild(0);
|
|
|
|
if(!SQL_ISRULE(pColumnRef,column_ref))
|
|
|
|
{
|
|
|
|
throw SQLException();
|
|
|
|
}
|
|
|
|
OSQLParseNode * pAscendingDescending = pOrderingSpec->getChild(1);
|
2001-08-29 11:21:08 +00:00
|
|
|
setOrderbyColumn(pColumnRef,pAscendingDescending);
|
2001-08-24 05:19:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-29 11:21:08 +00:00
|
|
|
void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef,
|
|
|
|
OSQLParseNode* pAscendingDescending)
|
2001-08-24 05:19:41 +00:00
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString aColumnName;
|
2001-08-24 05:19:41 +00:00
|
|
|
if (pColumnRef->count() == 1)
|
|
|
|
aColumnName = pColumnRef->getChild(0)->getTokenValue();
|
|
|
|
else if (pColumnRef->count() == 3)
|
|
|
|
{
|
2015-11-10 10:12:07 +01:00
|
|
|
pColumnRef->getChild(2)->parseNodeToStr( aColumnName, getOwnConnection(), nullptr, false, false );
|
2001-08-24 05:19:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
throw SQLException();
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference<XColumnLocate> xColLocate(m_xColNames,UNO_QUERY);
|
|
|
|
if(!xColLocate.is())
|
|
|
|
return;
|
2011-02-18 21:46:25 +01:00
|
|
|
// Everything tested and we have the name of the Column.
|
|
|
|
// What number is the Column?
|
2011-03-12 02:42:58 +01:00
|
|
|
::rtl::Reference<OSQLColumns> aSelectColumns = m_aSQLIterator.getSelectColumns();
|
2010-10-01 09:59:59 +02:00
|
|
|
::comphelper::UStringMixEqual aCase;
|
|
|
|
OSQLColumns::Vector::const_iterator aFind = ::connectivity::find(aSelectColumns->get().begin(),aSelectColumns->get().end(),aColumnName,aCase);
|
|
|
|
if ( aFind == aSelectColumns->get().end() )
|
|
|
|
throw SQLException();
|
|
|
|
m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->get().begin()) + 1);
|
2001-08-24 05:19:41 +00:00
|
|
|
|
|
|
|
// Ascending or Descending?
|
2001-08-29 11:21:08 +00:00
|
|
|
m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? SQL_DESC : SQL_ASC);
|
2001-08-24 05:19:41 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
void OStatement_Base::construct(const OUString& sql) throw(SQLException, RuntimeException)
|
2001-08-24 05:19:41 +00:00
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString aErr;
|
2001-08-24 05:19:41 +00:00
|
|
|
m_pParseTree = m_aParser.parseTree(aErr,sql);
|
|
|
|
if(m_pParseTree)
|
|
|
|
{
|
|
|
|
m_aSQLIterator.setParseTree(m_pParseTree);
|
|
|
|
m_aSQLIterator.traverseAll();
|
|
|
|
const OSQLTables& xTabs = m_aSQLIterator.getTables();
|
2002-07-05 06:57:45 +00:00
|
|
|
|
2005-03-18 08:57:10 +00:00
|
|
|
// sanity checks
|
2002-03-27 14:21:10 +00:00
|
|
|
if ( xTabs.empty() )
|
2005-03-18 08:57:10 +00:00
|
|
|
// no tables -> nothing to operate on -> error
|
2008-10-01 12:28:29 +00:00
|
|
|
m_pConnection->throwGenericSQLException(STR_QUERY_NO_TABLE,*this);
|
2005-03-18 08:57:10 +00:00
|
|
|
|
2006-07-10 13:27:07 +00:00
|
|
|
if ( xTabs.size() > 1 || m_aSQLIterator.hasErrors() )
|
2005-03-18 08:57:10 +00:00
|
|
|
// more than one table -> can't operate on them -> error
|
2008-10-01 12:28:29 +00:00
|
|
|
m_pConnection->throwGenericSQLException(STR_QUERY_MORE_TABLES,*this);
|
2004-10-22 07:44:11 +00:00
|
|
|
|
2008-12-30 13:32:01 +00:00
|
|
|
if ( (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT) && m_aSQLIterator.getSelectColumns()->get().empty() )
|
2005-03-18 08:57:10 +00:00
|
|
|
// SELECT statement without columns -> error
|
2008-10-01 12:28:29 +00:00
|
|
|
m_pConnection->throwGenericSQLException(STR_QUERY_NO_COLUMN,*this);
|
2001-08-24 05:19:41 +00:00
|
|
|
|
2009-11-11 13:27:33 +01:00
|
|
|
switch(m_aSQLIterator.getStatementType())
|
|
|
|
{
|
|
|
|
case SQL_STATEMENT_CREATE_TABLE:
|
|
|
|
case SQL_STATEMENT_ODBC_CALL:
|
|
|
|
case SQL_STATEMENT_UNKNOWN:
|
|
|
|
m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,*this);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2005-03-18 08:57:10 +00:00
|
|
|
|
2001-08-24 05:19:41 +00:00
|
|
|
// at this moment we support only one table per select statement
|
|
|
|
Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(xTabs.begin()->second,UNO_QUERY);
|
|
|
|
if(xTunnel.is())
|
|
|
|
{
|
|
|
|
if(m_pTable)
|
|
|
|
m_pTable->release();
|
2002-07-05 06:57:45 +00:00
|
|
|
m_pTable = reinterpret_cast<OFileTable*>(xTunnel->getSomething(OFileTable::getUnoTunnelImplementationId()));
|
2001-08-24 05:19:41 +00:00
|
|
|
if(m_pTable)
|
|
|
|
m_pTable->acquire();
|
|
|
|
}
|
|
|
|
OSL_ENSURE(m_pTable,"No table!");
|
2005-03-18 08:57:10 +00:00
|
|
|
if ( m_pTable )
|
|
|
|
m_xColNames = m_pTable->getColumns();
|
2001-08-24 05:19:41 +00:00
|
|
|
Reference<XIndexAccess> xNames(m_xColNames,UNO_QUERY);
|
|
|
|
// set the binding of the resultrow
|
2003-09-04 07:25:44 +00:00
|
|
|
m_aRow = new OValueRefVector(xNames->getCount());
|
2014-01-28 19:56:39 +01:00
|
|
|
(m_aRow->get())[0]->setBound(true);
|
|
|
|
::std::for_each(m_aRow->get().begin()+1,m_aRow->get().end(),TSetRefBound(false));
|
2001-10-01 10:24:29 +00:00
|
|
|
|
|
|
|
// set the binding of the resultrow
|
2003-09-04 07:25:44 +00:00
|
|
|
m_aEvaluateRow = new OValueRefVector(xNames->getCount());
|
2001-10-01 10:24:29 +00:00
|
|
|
|
2014-01-28 19:56:39 +01:00
|
|
|
(m_aEvaluateRow->get())[0]->setBound(true);
|
|
|
|
::std::for_each(m_aEvaluateRow->get().begin()+1,m_aEvaluateRow->get().end(),TSetRefBound(false));
|
2003-09-04 07:25:44 +00:00
|
|
|
|
|
|
|
// set the select row
|
2008-12-30 13:32:01 +00:00
|
|
|
m_aSelectRow = new OValueRefVector(m_aSQLIterator.getSelectColumns()->get().size());
|
2014-01-28 19:56:39 +01:00
|
|
|
::std::for_each(m_aSelectRow->get().begin(),m_aSelectRow->get().end(),TSetRefBound(true));
|
2001-10-01 10:24:29 +00:00
|
|
|
|
|
|
|
// create the column mapping
|
2001-08-24 05:19:41 +00:00
|
|
|
createColumnMapping();
|
|
|
|
|
|
|
|
m_pSQLAnalyzer = createAnalyzer();
|
|
|
|
|
|
|
|
Reference<XIndexesSupplier> xIndexSup(xTunnel,UNO_QUERY);
|
|
|
|
if(xIndexSup.is())
|
|
|
|
m_pSQLAnalyzer->setIndexes(xIndexSup->getIndexes());
|
|
|
|
|
|
|
|
anylizeSQL();
|
|
|
|
}
|
|
|
|
else
|
2013-04-07 12:06:47 +02:00
|
|
|
throw SQLException(aErr,*this,OUString(),0,Any());
|
2001-08-24 05:19:41 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-24 05:19:41 +00:00
|
|
|
void OStatement_Base::createColumnMapping()
|
|
|
|
{
|
|
|
|
// initialize the column index map (mapping select columns to table columns)
|
2010-10-15 12:10:06 -05:00
|
|
|
::rtl::Reference<connectivity::OSQLColumns> xColumns = m_aSQLIterator.getSelectColumns();
|
2008-12-30 13:32:01 +00:00
|
|
|
m_aColMapping.resize(xColumns->get().size() + 1);
|
2001-08-24 05:19:41 +00:00
|
|
|
for (sal_Int32 i=0; i<(sal_Int32)m_aColMapping.size(); ++i)
|
|
|
|
m_aColMapping[i] = i;
|
|
|
|
|
|
|
|
Reference<XIndexAccess> xNames(m_xColNames,UNO_QUERY);
|
|
|
|
// now check which columns are bound
|
2014-04-16 09:14:24 +02:00
|
|
|
OResultSet::setBoundedColumns(m_aRow,m_aSelectRow,xColumns,xNames,true,m_xDBMetaData,m_aColMapping);
|
2001-08-24 05:19:41 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-24 05:19:41 +00:00
|
|
|
void OStatement_Base::initializeResultSet(OResultSet* _pResult)
|
|
|
|
{
|
2001-12-03 11:11:40 +00:00
|
|
|
GetAssignValues();
|
|
|
|
|
2001-08-24 05:19:41 +00:00
|
|
|
_pResult->setSqlAnalyzer(m_pSQLAnalyzer);
|
|
|
|
_pResult->setOrderByColumns(m_aOrderbyColumnNumber);
|
|
|
|
_pResult->setOrderByAscending(m_aOrderbyAscending);
|
|
|
|
_pResult->setBindingRow(m_aRow);
|
|
|
|
_pResult->setColumnMapping(m_aColMapping);
|
2001-10-01 10:24:29 +00:00
|
|
|
_pResult->setEvaluationRow(m_aEvaluateRow);
|
2001-12-03 11:11:40 +00:00
|
|
|
_pResult->setAssignValues(m_aAssignValues);
|
2003-09-04 07:25:44 +00:00
|
|
|
_pResult->setSelectRow(m_aSelectRow);
|
2001-08-24 05:19:41 +00:00
|
|
|
|
2003-09-04 07:25:44 +00:00
|
|
|
m_pSQLAnalyzer->bindSelectRow(m_aRow);
|
2015-06-12 13:24:29 +01:00
|
|
|
m_pSQLAnalyzer->bindEvaluationRow(m_aEvaluateRow); // Set values in the code of the Compiler
|
2001-12-03 11:11:40 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-12-03 11:11:40 +00:00
|
|
|
void OStatement_Base::GetAssignValues()
|
|
|
|
{
|
2015-11-10 10:12:07 +01:00
|
|
|
if (m_pParseTree == nullptr)
|
2001-12-03 11:11:40 +00:00
|
|
|
{
|
|
|
|
::dbtools::throwFunctionSequenceException(*this);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (SQL_ISRULE(m_pParseTree,select_statement))
|
2011-02-18 21:46:25 +01:00
|
|
|
// no values have to be set for SELECT
|
2001-12-03 11:11:40 +00:00
|
|
|
return;
|
|
|
|
else if (SQL_ISRULE(m_pParseTree,insert_statement))
|
|
|
|
{
|
2015-02-21 14:09:16 +01:00
|
|
|
// Create Row for the values to be set (Reference through new)
|
2010-10-15 12:10:06 -05:00
|
|
|
if(m_aAssignValues.is())
|
2008-12-30 13:32:01 +00:00
|
|
|
m_aAssignValues->get().clear();
|
2001-12-03 11:11:40 +00:00
|
|
|
sal_Int32 nCount = Reference<XIndexAccess>(m_xColNames,UNO_QUERY)->getCount();
|
|
|
|
m_aAssignValues = new OAssignValues(nCount);
|
2004-03-15 11:46:56 +00:00
|
|
|
// unbound all
|
2014-01-28 19:56:39 +01:00
|
|
|
::std::for_each(m_aAssignValues->get().begin()+1,m_aAssignValues->get().end(),TSetRefBound(false));
|
2004-03-15 11:46:56 +00:00
|
|
|
|
2001-12-03 11:11:40 +00:00
|
|
|
m_aParameterIndexes.resize(nCount+1,SQL_NO_PARAMETER);
|
|
|
|
|
2013-02-23 17:20:45 +01:00
|
|
|
// List of Column-Names, that exist in the column_commalist (separated by ;):
|
2013-07-19 01:31:53 -05:00
|
|
|
::std::vector<OUString> aColumnNameList;
|
2001-12-03 11:11:40 +00:00
|
|
|
|
|
|
|
OSL_ENSURE(m_pParseTree->count() >= 4,"OResultSet: Fehler im Parse Tree");
|
|
|
|
|
|
|
|
OSQLParseNode * pOptColumnCommalist = m_pParseTree->getChild(3);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pOptColumnCommalist != nullptr,"OResultSet: Fehler im Parse Tree");
|
2001-12-03 11:11:40 +00:00
|
|
|
OSL_ENSURE(SQL_ISRULE(pOptColumnCommalist,opt_column_commalist),"OResultSet: Fehler im Parse Tree");
|
|
|
|
if (pOptColumnCommalist->count() == 0)
|
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
const Sequence< OUString>& aNames = m_xColNames->getElementNames();
|
|
|
|
const OUString* pBegin = aNames.getConstArray();
|
|
|
|
const OUString* pEnd = pBegin + aNames.getLength();
|
2004-09-08 15:20:55 +00:00
|
|
|
for (; pBegin != pEnd; ++pBegin)
|
|
|
|
aColumnNameList.push_back(*pBegin);
|
2001-12-03 11:11:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
OSL_ENSURE(pOptColumnCommalist->count() == 3,"OResultSet: Fehler im Parse Tree");
|
|
|
|
|
|
|
|
OSQLParseNode * pColumnCommalist = pOptColumnCommalist->getChild(1);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pColumnCommalist != nullptr,"OResultSet: Fehler im Parse Tree");
|
2001-12-03 11:11:40 +00:00
|
|
|
OSL_ENSURE(SQL_ISRULE(pColumnCommalist,column_commalist),"OResultSet: Fehler im Parse Tree");
|
|
|
|
OSL_ENSURE(pColumnCommalist->count() > 0,"OResultSet: Fehler im Parse Tree");
|
|
|
|
|
2011-02-18 21:46:25 +01:00
|
|
|
// All Columns in the column_commalist ...
|
2015-05-28 16:18:34 +02:00
|
|
|
for (size_t i = 0; i < pColumnCommalist->count(); i++)
|
2001-12-03 11:11:40 +00:00
|
|
|
{
|
|
|
|
OSQLParseNode * pCol = pColumnCommalist->getChild(i);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pCol != nullptr,"OResultSet: Fehler im Parse Tree");
|
2001-12-03 11:11:40 +00:00
|
|
|
aColumnNameList.push_back(pCol->getTokenValue());
|
|
|
|
}
|
|
|
|
}
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
|
|
|
if ( aColumnNameList.empty() )
|
2001-12-03 11:11:40 +00:00
|
|
|
throwFunctionSequenceException(*this);
|
|
|
|
|
2011-02-18 21:46:25 +01:00
|
|
|
// Values ...
|
2001-12-03 11:11:40 +00:00
|
|
|
OSQLParseNode * pValuesOrQuerySpec = m_pParseTree->getChild(4);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pValuesOrQuerySpec != nullptr,"OResultSet: pValuesOrQuerySpec darf nicht NULL sein!");
|
2001-12-03 11:11:40 +00:00
|
|
|
OSL_ENSURE(SQL_ISRULE(pValuesOrQuerySpec,values_or_query_spec),"OResultSet: ! SQL_ISRULE(pValuesOrQuerySpec,values_or_query_spec)");
|
|
|
|
OSL_ENSURE(pValuesOrQuerySpec->count() > 0,"OResultSet: pValuesOrQuerySpec->count() <= 0");
|
|
|
|
|
2011-02-18 21:46:25 +01:00
|
|
|
// just "VALUES" is allowed ...
|
2001-12-03 11:11:40 +00:00
|
|
|
if (! SQL_ISTOKEN(pValuesOrQuerySpec->getChild(0),VALUES))
|
|
|
|
throwFunctionSequenceException(*this);
|
|
|
|
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
|
|
|
OSL_ENSURE(pValuesOrQuerySpec->count() == 4,"OResultSet: pValuesOrQuerySpec->count() != 4");
|
2001-12-03 11:11:40 +00:00
|
|
|
|
2011-02-18 22:14:33 +01:00
|
|
|
// List of values
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
|
|
|
OSQLParseNode * pInsertAtomCommalist = pValuesOrQuerySpec->getChild(2);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pInsertAtomCommalist != nullptr,"OResultSet: pInsertAtomCommalist darf nicht NULL sein!");
|
2001-12-03 11:11:40 +00:00
|
|
|
OSL_ENSURE(pInsertAtomCommalist->count() > 0,"OResultSet: pInsertAtomCommalist <= 0");
|
|
|
|
|
2013-11-13 10:51:58 +00:00
|
|
|
sal_Int32 nIndex=0;
|
2015-05-28 16:18:34 +02:00
|
|
|
for (size_t i = 0; i < pInsertAtomCommalist->count(); i++)
|
2001-12-03 11:11:40 +00:00
|
|
|
{
|
2014-12-08 19:36:22 +01:00
|
|
|
OSQLParseNode * pRow_Value_Const = pInsertAtomCommalist->getChild(i); // row_value_constructor
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pRow_Value_Const != nullptr,"OResultSet: pRow_Value_Const darf nicht NULL sein!");
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
|
|
|
if(SQL_ISRULE(pRow_Value_Const,parameter))
|
2001-12-03 11:11:40 +00:00
|
|
|
{
|
2011-02-18 21:46:25 +01:00
|
|
|
ParseAssignValues(aColumnNameList,pRow_Value_Const,nIndex++); // only one Columnname allowed per loop
|
2001-12-03 11:11:40 +00:00
|
|
|
}
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
|
|
|
else if(pRow_Value_Const->isToken())
|
2013-11-13 10:51:58 +00:00
|
|
|
ParseAssignValues(aColumnNameList,pRow_Value_Const,i);
|
2001-12-03 11:11:40 +00:00
|
|
|
else
|
|
|
|
{
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
|
|
|
if(pRow_Value_Const->count() == aColumnNameList.size())
|
|
|
|
{
|
2015-05-28 16:18:34 +02:00
|
|
|
for (size_t j = 0; j < pRow_Value_Const->count(); ++j)
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
|
|
|
ParseAssignValues(aColumnNameList,pRow_Value_Const->getChild(j),nIndex++);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throwFunctionSequenceException(*this);
|
2001-12-03 11:11:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (SQL_ISRULE(m_pParseTree,update_statement_searched))
|
|
|
|
{
|
2010-10-15 12:10:06 -05:00
|
|
|
if(m_aAssignValues.is())
|
2008-12-30 13:32:01 +00:00
|
|
|
m_aAssignValues->get().clear();
|
2001-12-03 11:11:40 +00:00
|
|
|
sal_Int32 nCount = Reference<XIndexAccess>(m_xColNames,UNO_QUERY)->getCount();
|
|
|
|
m_aAssignValues = new OAssignValues(nCount);
|
2004-03-15 11:46:56 +00:00
|
|
|
// unbound all
|
2014-01-28 19:56:39 +01:00
|
|
|
::std::for_each(m_aAssignValues->get().begin()+1,m_aAssignValues->get().end(),TSetRefBound(false));
|
2004-03-15 11:46:56 +00:00
|
|
|
|
2001-12-03 11:11:40 +00:00
|
|
|
m_aParameterIndexes.resize(nCount+1,SQL_NO_PARAMETER);
|
|
|
|
|
|
|
|
OSL_ENSURE(m_pParseTree->count() >= 4,"OResultSet: Fehler im Parse Tree");
|
|
|
|
|
|
|
|
OSQLParseNode * pAssignmentCommalist = m_pParseTree->getChild(3);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pAssignmentCommalist != nullptr,"OResultSet: pAssignmentCommalist == NULL");
|
2001-12-03 11:11:40 +00:00
|
|
|
OSL_ENSURE(SQL_ISRULE(pAssignmentCommalist,assignment_commalist),"OResultSet: Fehler im Parse Tree");
|
|
|
|
OSL_ENSURE(pAssignmentCommalist->count() > 0,"OResultSet: pAssignmentCommalist->count() <= 0");
|
|
|
|
|
2011-02-18 21:46:25 +01:00
|
|
|
// work on all assignments (commalist) ...
|
2013-07-19 01:31:53 -05:00
|
|
|
::std::vector< OUString> aList(1);
|
2015-05-28 16:18:34 +02:00
|
|
|
for (size_t i = 0; i < pAssignmentCommalist->count(); i++)
|
2001-12-03 11:11:40 +00:00
|
|
|
{
|
|
|
|
OSQLParseNode * pAssignment = pAssignmentCommalist->getChild(i);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pAssignment != nullptr,"OResultSet: pAssignment == NULL");
|
2001-12-03 11:11:40 +00:00
|
|
|
OSL_ENSURE(SQL_ISRULE(pAssignment,assignment),"OResultSet: Fehler im Parse Tree");
|
|
|
|
OSL_ENSURE(pAssignment->count() == 3,"OResultSet: pAssignment->count() != 3");
|
|
|
|
|
|
|
|
OSQLParseNode * pCol = pAssignment->getChild(0);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pCol != nullptr,"OResultSet: pCol == NULL");
|
2001-12-03 11:11:40 +00:00
|
|
|
|
|
|
|
OSQLParseNode * pComp = pAssignment->getChild(1);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pComp != nullptr,"OResultSet: pComp == NULL");
|
2001-12-03 11:11:40 +00:00
|
|
|
OSL_ENSURE(pComp->getNodeType() == SQL_NODE_EQUAL,"OResultSet: pComp->getNodeType() != SQL_NODE_COMPARISON");
|
|
|
|
if (pComp->getTokenValue().toChar() != '=')
|
|
|
|
{
|
|
|
|
throwFunctionSequenceException(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
OSQLParseNode * pVal = pAssignment->getChild(2);
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pVal != nullptr,"OResultSet: pVal == NULL");
|
2001-12-03 11:11:40 +00:00
|
|
|
aList[0] = pCol->getTokenValue();
|
|
|
|
ParseAssignValues(aList,pVal,0);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2013-11-13 10:51:58 +00:00
|
|
|
void OStatement_Base::ParseAssignValues(const ::std::vector< OUString>& aColumnNameList,OSQLParseNode* pRow_Value_Constructor_Elem, sal_Int32 nIndex)
|
2001-12-03 11:11:40 +00:00
|
|
|
{
|
2013-11-13 10:51:58 +00:00
|
|
|
OSL_ENSURE(size_t(nIndex) <= aColumnNameList.size(),"SdbFileCursor::ParseAssignValues: nIndex > aColumnNameList.GetTokenCount()");
|
2013-07-19 01:31:53 -05:00
|
|
|
OUString aColumnName(aColumnNameList[nIndex]);
|
2013-07-19 11:49:04 +02:00
|
|
|
OSL_ENSURE(aColumnName.getLength() > 0,"OResultSet: Column-Name nicht gefunden");
|
2015-11-10 10:12:07 +01:00
|
|
|
OSL_ENSURE(pRow_Value_Constructor_Elem != nullptr,"OResultSet: pRow_Value_Constructor_Elem darf nicht NULL sein!");
|
2001-12-03 11:11:40 +00:00
|
|
|
|
|
|
|
if (pRow_Value_Constructor_Elem->getNodeType() == SQL_NODE_STRING ||
|
|
|
|
pRow_Value_Constructor_Elem->getNodeType() == SQL_NODE_INTNUM ||
|
|
|
|
pRow_Value_Constructor_Elem->getNodeType() == SQL_NODE_APPROXNUM)
|
|
|
|
{
|
2011-02-18 21:46:25 +01:00
|
|
|
// set value:
|
2001-12-03 11:11:40 +00:00
|
|
|
SetAssignValue(aColumnName, pRow_Value_Constructor_Elem->getTokenValue());
|
|
|
|
}
|
|
|
|
else if (SQL_ISTOKEN(pRow_Value_Constructor_Elem,NULL))
|
|
|
|
{
|
2011-02-18 21:46:25 +01:00
|
|
|
// set NULL
|
2014-04-16 09:14:24 +02:00
|
|
|
SetAssignValue(aColumnName, OUString(), true);
|
2001-12-03 11:11:40 +00:00
|
|
|
}
|
|
|
|
else if (SQL_ISRULE(pRow_Value_Constructor_Elem,parameter))
|
|
|
|
parseParamterElem(aColumnName,pRow_Value_Constructor_Elem);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
throwFunctionSequenceException(*this);
|
|
|
|
}
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2013-07-19 01:31:53 -05:00
|
|
|
void OStatement_Base::SetAssignValue(const OUString& aColumnName,
|
|
|
|
const OUString& aValue,
|
2014-04-16 09:14:24 +02:00
|
|
|
bool bSetNull,
|
2013-07-19 01:31:53 -05:00
|
|
|
sal_uInt32 nParameter)
|
2001-12-03 11:11:40 +00:00
|
|
|
{
|
|
|
|
Reference<XPropertySet> xCol;
|
|
|
|
m_xColNames->getByName(aColumnName) >>= xCol;
|
|
|
|
sal_Int32 nId = Reference<XColumnLocate>(m_xColNames,UNO_QUERY)->findColumn(aColumnName);
|
2011-02-18 21:46:25 +01:00
|
|
|
// does this column actually exist in the file?
|
2001-12-03 11:11:40 +00:00
|
|
|
|
|
|
|
if (!xCol.is())
|
|
|
|
{
|
2011-02-18 21:46:25 +01:00
|
|
|
// This Column doesn't exist!
|
2001-12-03 11:11:40 +00:00
|
|
|
throwFunctionSequenceException(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-02-18 21:46:25 +01:00
|
|
|
// Everything tested and we have the names of the Column.
|
|
|
|
// Now allocate one Value, set the value and tie the value to the Row.
|
2001-12-03 11:11:40 +00:00
|
|
|
if (bSetNull)
|
2008-12-30 13:32:01 +00:00
|
|
|
(m_aAssignValues->get())[nId]->setNull();
|
2001-12-03 11:11:40 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
switch (::comphelper::getINT32(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))))
|
|
|
|
{
|
2011-02-18 21:46:25 +01:00
|
|
|
// put criteria depending on the Type as String or double in the variable
|
2013-07-19 01:31:53 -05:00
|
|
|
case DataType::CHAR:
|
|
|
|
case DataType::VARCHAR:
|
|
|
|
case DataType::LONGVARCHAR:
|
|
|
|
*(m_aAssignValues->get())[nId] = ORowSetValue(aValue);
|
|
|
|
//Characterset is already converted, since the entire statement was converted
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DataType::BIT:
|
|
|
|
if (aValue.equalsIgnoreAsciiCase("TRUE") || aValue[0] == '1')
|
|
|
|
*(m_aAssignValues->get())[nId] = sal_True;
|
|
|
|
else if (aValue.equalsIgnoreAsciiCase("FALSE") || aValue[0] == '0')
|
|
|
|
*(m_aAssignValues->get())[nId] = sal_False;
|
|
|
|
else
|
2001-12-03 11:11:40 +00:00
|
|
|
throwFunctionSequenceException(*this);
|
2013-07-19 01:31:53 -05:00
|
|
|
break;
|
|
|
|
case DataType::TINYINT:
|
|
|
|
case DataType::SMALLINT:
|
|
|
|
case DataType::INTEGER:
|
|
|
|
case DataType::DECIMAL:
|
|
|
|
case DataType::NUMERIC:
|
|
|
|
case DataType::REAL:
|
|
|
|
case DataType::DOUBLE:
|
|
|
|
case DataType::DATE:
|
|
|
|
case DataType::TIME:
|
|
|
|
case DataType::TIMESTAMP:
|
|
|
|
*(m_aAssignValues->get())[nId] = ORowSetValue(aValue);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
throwFunctionSequenceException(*this);
|
2001-12-03 11:11:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-18 21:46:25 +01:00
|
|
|
// save Parameter-No. (as User Data)
|
|
|
|
// SQL_NO_PARAMETER = no Parameter.
|
2001-12-03 11:11:40 +00:00
|
|
|
m_aAssignValues->setParameterIndex(nId,nParameter);
|
|
|
|
if(nParameter != SQL_NO_PARAMETER)
|
|
|
|
m_aParameterIndexes[nParameter] = nId;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2013-07-19 01:31:53 -05:00
|
|
|
void OStatement_Base::parseParamterElem(const OUString& /*_sColumnName*/,OSQLParseNode* /*pRow_Value_Constructor_Elem*/)
|
2001-12-03 11:11:40 +00:00
|
|
|
{
|
|
|
|
// do nothing here
|
2001-08-24 05:19:41 +00:00
|
|
|
}
|
2014-02-25 17:59:09 +01:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
} // namespace file
|
2014-02-25 17:59:09 +01:00
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
}// namespace connectivity
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2010-10-12 15:53:47 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|