diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:24:29 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:24:29 +0200 |
commit | 92667c8edbaee9a252b1d5d221eb62849f76697c (patch) | |
tree | 8f1d329f2259b7d5bff054bc14d0965637df6961 /connectivity/source/drivers/file/fanalyzer.cxx | |
parent | baecdfb578cb7bc992944857ad4d8882ef7e842c (diff) | |
parent | 48b4a99ce2451f1ddf2e8e128bbfcd6683072999 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
connectivity/source/cpool/Zregistration.cxx
connectivity/source/drivers/evoab/LCatalog.cxx
connectivity/source/drivers/evoab/LColumnAlias.cxx
connectivity/source/drivers/evoab/LColumnAlias.hxx
connectivity/source/drivers/evoab/LColumns.cxx
connectivity/source/drivers/evoab/LColumns.hxx
connectivity/source/drivers/evoab/LConfigAccess.cxx
connectivity/source/drivers/evoab/LConfigAccess.hxx
connectivity/source/drivers/evoab/LConnection.cxx
connectivity/source/drivers/evoab/LConnection.hxx
connectivity/source/drivers/evoab/LDatabaseMetaData.cxx
connectivity/source/drivers/evoab/LDatabaseMetaData.hxx
connectivity/source/drivers/evoab/LDriver.cxx
connectivity/source/drivers/evoab/LDriver.hxx
connectivity/source/drivers/evoab/LFolderList.cxx
connectivity/source/drivers/evoab/LFolderList.hxx
connectivity/source/drivers/evoab/LNoException.cxx
connectivity/source/drivers/evoab/LPreparedStatement.cxx
connectivity/source/drivers/evoab/LPreparedStatement.hxx
connectivity/source/drivers/evoab/LResultSet.cxx
connectivity/source/drivers/evoab/LResultSet.hxx
connectivity/source/drivers/evoab/LServices.cxx
connectivity/source/drivers/evoab/LStatement.cxx
connectivity/source/drivers/evoab/LStatement.hxx
connectivity/source/drivers/evoab/LTable.cxx
connectivity/source/drivers/evoab/LTable.hxx
connectivity/source/drivers/evoab/LTables.cxx
connectivity/source/drivers/evoab/LTables.hxx
connectivity/source/drivers/evoab/evoab.xml
connectivity/source/drivers/evoab/makefile.mk
editeng/Library_editeng.mk
framework/Library_fwe.mk
framework/test/test.cxx
idl/prj/d.lst
idl/util/idlpch.cxx
linguistic/Makefile
linguistic/Module_linguistic.mk
linguistic/inc/linguistic/lngdllapi.h
linguistic/inc/linguistic/lngprophelp.hxx
linguistic/inc/linguistic/misc.hxx
linguistic/prj/build.lst
linguistic/prj/d.lst
linguistic/qa/unoapi/Test.java
linguistic/source/grammarchecker.cxx
linguistic/source/grammarchecker.hxx
linguistic/source/hyphdta.cxx
linguistic/source/lngprophelp.cxx
linguistic/source/makefile.mk
linguistic/source/spelldta.cxx
sfx2/Library_qstart.mk
sfx2/Library_sfx.mk
sfx2/inc/sfx2/qswin32.h
sfx2/prj/build.lst
sfx2/qa/cppunit/makefile.mk
xmlscript/inc/xmlscript/xcrdllapi.h
xmlscript/prj/d.lst
xmlscript/util/makefile.mk
Diffstat (limited to 'connectivity/source/drivers/file/fanalyzer.cxx')
-rw-r--r-- | connectivity/source/drivers/file/fanalyzer.cxx | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index 04df24ab379e..6cc7b6eaccb3 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,9 +93,9 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode) || SQL_ISRULE(pColumnRef,factor) || SQL_ISRULE(pColumnRef,set_fct_spec) ) { - ::vos::ORef<OPredicateCompiler> pCompiler = new OPredicateCompiler(this); + ::rtl::Reference<OPredicateCompiler> pCompiler = new OPredicateCompiler(this); pCompiler->setOrigColumns(m_aCompiler->getOrigColumns()); - ::vos::ORef<OPredicateInterpreter> pInterpreter = new OPredicateInterpreter(pCompiler); + ::rtl::Reference<OPredicateInterpreter> pInterpreter = new OPredicateInterpreter(pCompiler); pCompiler->execute( pColumnRef ); m_aSelectionEvaluations.push_back( TPredicates(pCompiler,pInterpreter) ); } @@ -133,10 +134,9 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode) //------------------------------------------------------------------ void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvaluateSetList& _rEvaluateSetList) { - // Zaehlen, wieviele Kriterien - // wenn nur ein Kriterium, und das entsprechende Feld ist indiziert - // dann wird der Index verwendet - + // count criteria + // if only one criterion, and the corresponding field is indexed + // then the index will be used OEvaluateSet* pEvaluateSet = NULL; for (OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter) @@ -171,7 +171,7 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) OEvaluateSetList aEvaluateSetList; for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter) { - if ( aIter->first.isValid() ) + if ( aIter->first.is() ) bindRow( aIter->first->m_aCodeList,_pRow,aEvaluateSetList); } } @@ -184,10 +184,10 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) ::std::vector<sal_Int32>* pKeySet = NULL; OEvaluateSet* pEvaluateSet = NULL; - // Keyset erzeugen mit kleinster Liste + // create Keyset with smallest list if(!aEvaluateSetList.empty()) { - // welche Liste hat den kleinsten count ? + // which list has the smallest count? OEvaluateSetList::iterator i = aEvaluateSetList.begin(); pEvaluateSet = *(i); for(++i; i != aEvaluateSetList.end();++i) @@ -206,7 +206,7 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) (*pKeySet)[k] = j->second; } - // alle loeschen + // delete all for(i = aEvaluateSetList.begin(); i != aEvaluateSetList.end();++i) delete (*i); } @@ -215,26 +215,26 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) } //------------------------------------------------------------------ -void OSQLAnalyzer::describeParam(::vos::ORef<OSQLColumns> rParameterColumns) +void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns) { OCodeList& rCodeList = m_aCompiler->m_aCodeList; OCodeStack aCodeStack; if (!rCodeList.size()) - return; // kein Praedikat + return; // no predicate if (!rParameterColumns->get().size()) - return; // keine Parameter + return; // no parameters - // Anlegen von Columns, die eine genauere Beschreibung fuer die enthalten - ::vos::ORef<OSQLColumns> aNewParamColumns = new OSQLColumns(*rParameterColumns); + // Create columns, that have a more precise description for the included + ::rtl::Reference<OSQLColumns> aNewParamColumns = new OSQLColumns(*rParameterColumns); - // Anlegen einer Testzeile, wird benoetigt um die Parameter zu beschreiben + // Create a Test-row, is needed to describe the parameters OValueRefRow aParameterRow = new OValueRefVector(rParameterColumns->get().size()); bindParameterRow(aParameterRow); OValueRefRow aTestRow = new OValueRefVector(Reference< XIndexAccess>(m_aCompiler->getOrigColumns(),UNO_QUERY)->getCount()); - delete bindEvaluationRow(aTestRow); // Binden der Attribute an die Values + delete bindEvaluationRow(aTestRow); // Bind the attributes to the values for(OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter) { @@ -244,10 +244,10 @@ void OSQLAnalyzer::describeParam(::vos::ORef<OSQLColumns> rParameterColumns) aCodeStack.push(pOperand); else { - if (pOperator->getRequestedOperands() == 2) // bei zwei Operatoren ist es moeglich - { // einen Parameter weiter zu spezifizieren + if (pOperator->getRequestedOperands() == 2) // with two Operands it is possible + { // to specify one parameter better OOperandParam *pParam = PTR_CAST(OOperandParam,aCodeStack.top()); - if (pParam) // Anpassen des ParameterTyps, wenn der linke Operand ein Attribut ist + if (pParam) // adjust the Parameter-types, if the left Operand is an attribute { OOperandAttr *pLeft = PTR_CAST(OOperandAttr,*(rCodeList.end() - 2)); if (pLeft) @@ -270,10 +270,9 @@ void OSQLAnalyzer::describeParam(::vos::ORef<OSQLColumns> rParameterColumns) if (IS_TYPE(OOperandResult,pOperand)) delete pOperand; else - OSL_ENSURE(0,"Illegal here!"); + OSL_FAIL("Illegal here!"); rParameterColumns = aNewParamColumns; - // m_aCompiler->setParameterColumns(rParameterColumns); } // ----------------------------------------------------------------------------- @@ -296,7 +295,7 @@ sal_Bool OSQLAnalyzer::hasFunctions() const m_bSelectionFirstTime = sal_False; for ( ::std::vector< TPredicates >::const_iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end() && !m_bHasSelectionCode ;++aIter) { - if ( aIter->first.isValid() ) + if ( aIter->first.is() ) m_bHasSelectionCode = aIter->first->hasCode(); } } @@ -308,7 +307,7 @@ void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std: sal_Int32 nPos = 1; for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter,++nPos) { - if ( aIter->second.isValid() ) + if ( aIter->second.is() ) { // the first column (index 0) is for convenience only. The first real select column is no 1. sal_Int32 map = nPos; @@ -325,7 +324,7 @@ void OSQLAnalyzer::dispose() m_aCompiler->dispose(); for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter) { - if ( aIter->first.isValid() ) + if ( aIter->first.is() ) aIter->first->dispose(); } } @@ -335,8 +334,10 @@ void OSQLAnalyzer::setOrigColumns(const OFileColumns& rCols) m_aCompiler->setOrigColumns(rCols); for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter) { - if ( aIter->first.isValid() ) + if ( aIter->first.is() ) aIter->first->setOrigColumns(rCols); } } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |