1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_TABLEROW_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_TABLEROW_HXX
22 #include <tools/stream.hxx>
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include "TypeInfo.hxx"
29 class OFieldDescription
;
33 OFieldDescription
* m_pActFieldDescr
;
36 bool m_bOwnsDescriptions
;
41 OTableRow(const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& xAffectedCol
);
42 OTableRow( const OTableRow
& rRow
, long nPosition
= -1 );
45 inline OFieldDescription
* GetActFieldDescr() const { return m_pActFieldDescr
; }
46 inline bool isValid() const { return GetActFieldDescr() != NULL
; }
48 void SetFieldType( const TOTypeInfoSP
& _pType
, bool _bForce
= false );
50 void SetPrimaryKey( bool bSet
);
51 bool IsPrimaryKey() const;
53 /** returns the current position in the table.
55 the current position in the table
57 inline sal_Int32
GetPos() const { return m_nPos
; }
58 inline void SetPos(sal_Int32 _nPos
) { m_nPos
= _nPos
; }
60 /** set the row readonly
62 if <TRUE/> then the row is redonly, otherwise not
64 inline void SetReadOnly( bool _bRead
=true ){ m_bReadOnly
= _bRead
; }
66 /** returns if the row is readonly
68 <TRUE/> if readonly, otherwise <FALSE/>
70 inline bool IsReadOnly() const { return m_bReadOnly
; }
72 friend SvStream
& WriteOTableRow( SvStream
& rStr
,const OTableRow
& _rRow
);
73 friend SvStream
& ReadOTableRow( SvStream
& rStr
, OTableRow
& _rRow
);
78 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_TABLEROW_HXX
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */