Bump for 3.6-28
[LibreOffice.git] / connectivity / source / inc / calc / CTable.hxx
blob0db28e7fd9a5559845393e3a2cbe2b7e2e056a0f
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 #ifndef _CONNECTIVITY_CALC_TABLE_HXX_
30 #define _CONNECTIVITY_CALC_TABLE_HXX_
32 #include "file/FTable.hxx"
33 #include <tools/date.hxx>
35 namespace com { namespace sun { namespace star { namespace sheet {
36 class XSpreadsheet;
37 class XSpreadsheetDocument;
38 } } } }
40 namespace com { namespace sun { namespace star { namespace util {
41 class XNumberFormats;
42 } } } }
45 namespace connectivity
47 namespace calc
49 typedef file::OFileTable OCalcTable_BASE;
50 class OCalcConnection;
52 typedef ::std::map< ::rtl::OUString,
53 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed>,
54 comphelper::UStringMixLess > OContainer;
56 class OCalcTable : public OCalcTable_BASE
58 private:
59 ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset
60 ::std::vector<sal_Int32> m_aPrecisions; // same as aboth
61 ::std::vector<sal_Int32> m_aScales;
62 ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > m_xSheet;
63 OCalcConnection* m_pConnection;
64 sal_Int32 m_nStartCol;
65 sal_Int32 m_nStartRow;
66 sal_Int32 m_nDataCols;
67 sal_Int32 m_nDataRows;
68 sal_Bool m_bHasHeaders;
69 ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > m_xFormats;
70 ::Date m_aNullDate;
72 void fillColumns();
74 protected:
75 virtual void FileClose();
76 public:
77 virtual void refreshColumns();
78 virtual void refreshIndexes();
80 public:
81 OCalcTable( sdbcx::OCollection* _pTables,OCalcConnection* _pConnection,
82 const ::rtl::OUString& _Name,
83 const ::rtl::OUString& _Type,
84 const ::rtl::OUString& _Description = ::rtl::OUString(),
85 const ::rtl::OUString& _SchemaName = ::rtl::OUString(),
86 const ::rtl::OUString& _CatalogName = ::rtl::OUString()
89 virtual sal_Int32 getCurrentLastPos() const;
90 virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
91 virtual sal_Bool fetchRow(OValueRefRow& _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData);
93 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
94 //XTypeProvider
95 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
96 virtual void SAL_CALL disposing(void);
98 // com::sun::star::lang::XUnoTunnel
99 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
100 static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
102 void construct();
107 #endif // _CONNECTIVITY_CALC_TABLE_HXX_
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */