[Libreoffice-commits] core.git: dbaccess/source
Lionel Elie Mamane
lionel at mamane.lu
Mon Jul 1 15:58:30 PDT 2013
dbaccess/source/core/api/OptimisticSet.cxx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 369e2d3e007fd9177c3500813feee22fc3a8a823
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Tue Jul 2 00:56:57 2013 +0200
fdo#66464 initialise static join info at construct time
to ensure that isReadOnly returns something sensible as soon as construct() finishes
Change-Id: I5f9bef049297c5232df0ecdb9084add968a0052f
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index ac73c44..8fed9a3 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -136,11 +136,6 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const OU
OKeySetValue keySetValue((ORowSetValueVector *)NULL,::std::pair<sal_Int32,Reference<XRow> >(0,(Reference<XRow>)NULL));
m_aKeyMap.insert(OKeySetMatrix::value_type(0,keySetValue));
m_aKeyIter = m_aKeyMap.begin();
-}
-
-void OptimisticSet::makeNewStatement( )
-{
- OUStringBuffer aFilter = createKeyFilter();
Reference< XSingleSelectQueryComposer> xSourceComposer(m_xComposer,UNO_QUERY);
Reference< XMultiServiceFactory > xFactory(m_xConnection, UNO_QUERY_THROW);
@@ -156,6 +151,17 @@ void OptimisticSet::makeNewStatement( )
m_aSqlIterator.traverseAll();
fillJoinedColumns_throw(m_aSqlIterator.getJoinConditions());
+}
+
+void OptimisticSet::makeNewStatement( )
+{
+ OUStringBuffer aFilter = createKeyFilter();
+
+ Reference< XSingleSelectQueryComposer> xSourceComposer(m_xComposer,UNO_QUERY);
+ Reference< XMultiServiceFactory > xFactory(m_xConnection, UNO_QUERY_THROW);
+ Reference<XSingleSelectQueryComposer> xAnalyzer(xFactory->createInstance(SERVICE_NAME_SINGLESELECTQUERYCOMPOSER),UNO_QUERY);
+ xAnalyzer->setElementaryQuery(xSourceComposer->getElementaryQuery());
+
const OUString sComposerFilter = m_xComposer->getFilter();
if ( !m_sRowSetFilter.isEmpty() || !sComposerFilter.isEmpty() )
{
More information about the Libreoffice-commits
mailing list