bump product version to 5.0.4.1
[LibreOffice.git] / connectivity / source / inc / calc / CTable.hxx
blob4e8ea641dded8e11eb79f7768bd2c96c4e6845f5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_CALC_CTABLE_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_INC_CALC_CTABLE_HXX
23 #include "file/FTable.hxx"
24 #include <tools/date.hxx>
26 namespace com { namespace sun { namespace star { namespace sheet {
27 class XSpreadsheet;
28 } } } }
30 namespace com { namespace sun { namespace star { namespace util {
31 class XNumberFormats;
32 } } } }
35 namespace connectivity
37 namespace calc
39 typedef file::OFileTable OCalcTable_BASE;
40 class OCalcConnection;
42 class OCalcTable : public OCalcTable_BASE
44 private:
45 ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset
46 ::std::vector<sal_Int32> m_aPrecisions; // same as aboth
47 ::std::vector<sal_Int32> m_aScales;
48 ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > m_xSheet;
49 OCalcConnection* m_pConnection;
50 sal_Int32 m_nStartCol;
51 sal_Int32 m_nStartRow;
52 sal_Int32 m_nDataCols;
53 sal_Int32 m_nDataRows;
54 bool m_bHasHeaders;
55 ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > m_xFormats;
56 ::Date m_aNullDate;
58 void fillColumns();
60 protected:
61 virtual void FileClose() SAL_OVERRIDE;
62 public:
63 virtual void refreshColumns() SAL_OVERRIDE;
64 virtual void refreshIndexes() SAL_OVERRIDE;
66 public:
67 OCalcTable( sdbcx::OCollection* _pTables,OCalcConnection* _pConnection,
68 const OUString& _Name,
69 const OUString& _Type,
70 const OUString& _Description = OUString(),
71 const OUString& _SchemaName = OUString(),
72 const OUString& _CatalogName = OUString()
75 virtual sal_Int32 getCurrentLastPos() const SAL_OVERRIDE;
76 virtual bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) SAL_OVERRIDE;
77 virtual bool fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool _bUseTableDefs, bool bRetrieveData) SAL_OVERRIDE;
79 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 //XTypeProvider
81 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
82 virtual void SAL_CALL disposing() SAL_OVERRIDE;
84 // com::sun::star::lang::XUnoTunnel
85 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
86 static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
88 void construct() SAL_OVERRIDE;
93 #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_CALC_CTABLE_HXX
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */