merge the formfield patch from ooo-build
[ooovba.git] / connectivity / source / drivers / evoab / LFolderList.hxx
blob690c3bb140d97d4cf13a24edeec26720263b444a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: LFolderList.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CONNECTIVITY_EVOAB_LEVOABFOLDERLIST_HXX_
32 #define _CONNECTIVITY_EVOAB_LEVOABFOLDERLIST_HXX_
34 #include "connectivity/sdbcx/VColumn.hxx"
35 #include "connectivity/CommonTools.hxx"
36 #include <tools/urlobj.hxx>
37 #include "LTable.hxx"
38 #include "TResultSetHelper.hxx"
41 namespace connectivity
43 namespace evoab
45 //==================================================================
46 // Ableitung von String mit ueberladenen GetToken/GetTokenCount-Methoden
47 // Speziell fuer FLAT FILE-Format: Strings koennen gequotet sein
48 //==================================================================
50 class OEvoabConnection;
52 class OEvoabFolderList
54 // maps a row postion to a file position
55 ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset
56 ::std::vector<sal_Int32> m_aPrecisions; // same as aboth
57 ::std::vector<sal_Int32> m_aScales;
58 QuotedTokenizedString m_aCurrentLine;
59 ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xNumberFormatter;
60 sal_Int32 m_nFilePos; // aktuelle IResultSetHelper::Movement
61 SvStream* m_pFileStream;
62 OEvoabConnection* m_pConnection;
63 ::vos::ORef<OSQLColumns> m_aColumns;
64 OValueRow m_aRow;
65 sal_Bool m_bIsNull;
67 private:
68 void fillColumns(const ::com::sun::star::lang::Locale& _aLocale);
69 BOOL CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo);
71 sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols);
72 sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition);
74 public:
76 OEvoabFolderList( OEvoabConnection* _pConnection);
78 OEvoabConnection* getConnection() const { return m_pConnection;}
79 ::vos::ORef<OSQLColumns> getTableColumns() const {return m_aColumns;}
80 void construct(); // can throw any exception
81 static SvStream* createStream_simpleError( const String& _rFileName, StreamMode _eOpenMode);
82 void initializeRow(sal_Int32 _nColumnCount);
83 void checkIndex(sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException);
84 const ORowSetValue& getValue(sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException);
85 ::rtl::OUString SAL_CALL getString( sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
86 sal_Int32 SAL_CALL getInt( sal_Int32 _nColumnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
87 sal_Bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
88 sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
89 sal_Int32 SAL_CALL getRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
94 #endif // _CONNECTIVITY_EVOAB_LEVOABFOLDERLIST_HXX_