Bump for 3.6-28
[LibreOffice.git] / connectivity / source / drivers / file / FNoException.cxx
blob67599cbc85bdf85704bd1fcfb3919f20cd45c209
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include "file/FCatalog.hxx"
30 #include "file/fcomp.hxx"
31 #include "file/fanalyzer.hxx"
32 #include "file/FResultSet.hxx"
33 #include "file/FPreparedStatement.hxx"
34 #include <connectivity/FValue.hxx>
35 #include <tools/debug.hxx>
36 #include "TKeyValue.hxx"
37 #include <rtl/logfile.hxx>
39 using namespace connectivity;
40 using namespace connectivity::file;
41 // -----------------------------------------------------------------------------
42 void OFileCatalog::refreshViews()
44 void OFileCatalog::refreshGroups()
46 void OFileCatalog::refreshUsers()
49 // -----------------------------------------------------------------------------
50 OPredicateInterpreter::~OPredicateInterpreter()
52 while(!m_aStack.empty())
54 delete m_aStack.top();
55 m_aStack.pop();
57 // m_aStack.clear();
59 // -----------------------------------------------------------------------------
60 void OPredicateCompiler::Clean()
62 for(OCodeList::reverse_iterator aIter = m_aCodeList.rbegin(); aIter != m_aCodeList.rend();++aIter)
64 delete *aIter;
66 m_aCodeList.clear();
68 // -----------------------------------------------------------------------------
69 void OSQLAnalyzer::bindParameterRow(OValueRefRow& _pRow)
71 OCodeList& rCodeList = m_aCompiler->m_aCodeList;
72 for(OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end();++aIter)
74 OOperandParam* pParam = PTR_CAST(OOperandParam,(*aIter));
75 if ( pParam )
76 pParam->bindValue(_pRow);
79 // -----------------------------------------------------------------------------
80 void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes)
82 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OPreparedStatement::scanParameter" );
83 DBG_ASSERT(pParseNode != NULL,"OResultSet: interner Fehler: ungueltiger ParseNode");
85 // found parameter Name-Rule?
86 if (SQL_ISRULE(pParseNode,parameter))
88 DBG_ASSERT(pParseNode->count() >= 1,"OResultSet: Parse Tree fehlerhaft");
89 DBG_ASSERT(pParseNode->getChild(0)->getNodeType() == SQL_NODE_PUNCTUATION,"OResultSet: Parse Tree fehlerhaft");
91 _rParaNodes.push_back(pParseNode);
92 // Further descend not nessesary
93 return;
96 // Further descend in Parse Tree
97 for (sal_uInt32 i = 0; i < pParseNode->count(); i++)
98 scanParameter(pParseNode->getChild(i),_rParaNodes);
100 // -----------------------------------------------------------------------------
101 OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow)
103 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::GetOrderbyKeyValue" );
104 sal_uInt32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue());
106 OKeyValue* pKeyValue = OKeyValue::createKeyValue((sal_uInt32)nBookmarkValue);
108 ::std::vector<sal_Int32>::iterator aIter = m_aOrderbyColumnNumber.begin();
109 for (;aIter != m_aOrderbyColumnNumber.end(); ++aIter)
111 OSL_ENSURE(*aIter < static_cast<sal_Int32>(_rRow->get().size()),"Invalid index for orderkey values!");
112 pKeyValue->pushKey(new ORowSetValueDecorator((_rRow->get())[*aIter]->getValue()));
115 return pKeyValue;
117 // -----------------------------------------------------------------------------
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */