[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - dbaccess/source
Lionel Elie Mamane
lionel at mamane.lu
Tue Jul 2 00:43:55 PDT 2013
dbaccess/source/core/api/OptimisticSet.cxx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit a571129c94318ce5667f89cb6489561b8c161ee2
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
Reviewed-on: https://gerrit.libreoffice.org/4669
Tested-by: David Tardon <dtardon at redhat.com>
Reviewed-by: David Tardon <dtardon at redhat.com>
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index be34382..ff22d4d 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