calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / dbaccess / source / core / api / StaticSet.hxx
blob9f765996b860083b6f6677b8e51f83f6185e5784
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 #pragma once
22 #include "CacheSet.hxx"
24 namespace dbaccess
26 // is used when nothing is supported by the driver
27 // we use a snapshot
28 class OStaticSet : public OCacheSet
30 ORowSetMatrix m_aSet;
31 ORowSetMatrix::iterator m_aSetIter;
32 bool m_bEnd;
33 bool fetchRow();
34 void fillAllRows();
35 public:
36 explicit OStaticSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
37 , m_aSetIter(m_aSet.end())
38 , m_bEnd(false)
40 m_aSet.push_back(nullptr); // this is the beforefirst record
43 virtual void reset(const css::uno::Reference< css::sdbc::XResultSet>& _xDriverSet) override;
45 virtual void fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition) override;
46 // css::sdbcx::XRowLocate
47 virtual css::uno::Any getBookmark() override;
48 virtual bool moveToBookmark( const css::uno::Any& bookmark ) override;
49 virtual sal_Int32 compareBookmarks( const css::uno::Any& first, const css::uno::Any& second ) override;
50 virtual bool hasOrderedBookmarks( ) override;
51 virtual sal_Int32 hashBookmark( const css::uno::Any& bookmark ) override;
53 bool isBeforeFirst( );
54 bool isAfterLast( );
56 // css::sdbc::XResultSet
57 virtual bool next() override;
58 virtual void beforeFirst( ) override;
59 virtual void afterLast( ) override;
60 virtual bool first() override;
61 virtual bool last() override;
62 virtual sal_Int32 getRow( ) override;
63 virtual bool absolute( sal_Int32 row ) override;
64 virtual bool previous( ) override;
65 virtual void refreshRow( ) override;
66 virtual bool rowUpdated( ) override;
67 virtual bool rowInserted( ) override;
68 virtual bool rowDeleted( ) override;
69 // css::sdbc::XResultSetUpdate
70 virtual void insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) override;
71 virtual void deleteRow(const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) override;
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */