LibreOffice Module dbaccess (master) 1
TableDesignControl.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
22
23#include "IClipBoardTest.hxx"
24#include "TypeInfo.hxx"
25
26namespace dbaui
27{
28 class OTableDesignView;
29
31 {
32 friend class OTableDesignUndoAct;
33
34 protected:
37
38 private:
39 sal_uInt16 m_nCurUndoActId;
40
41 public:
42 OTableRowView(vcl::Window* pParent);
43
44 virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
45 virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData ) = 0;
46 virtual css::uno::Any GetCellData( sal_Int32 nRow, sal_uInt16 nColId ) = 0;
47 virtual void SetControlText( sal_Int32 nRow, sal_uInt16 nColId, const OUString& rText ) = 0;
48
49 virtual OTableDesignView* GetView() const = 0;
50
51 sal_uInt16 GetCurUndoActId() const { return m_nCurUndoActId; }
52
53 // IClipboardTest
54 virtual void cut() override;
55 virtual void copy() override;
56 virtual void paste() override;
57
58 protected:
59 void Paste( sal_Int32 nRow );
60
61 virtual void CopyRows() = 0;
62 virtual void DeleteRows() = 0;
63 virtual void InsertRows( sal_Int32 nRow ) = 0;
64 virtual void InsertNewRows( sal_Int32 nRow ) = 0;
65
66 virtual bool IsPrimaryKeyAllowed() = 0;
67 virtual bool IsInsertNewAllowed( sal_Int32 nRow ) = 0;
68 virtual bool IsDeleteAllowed() = 0;
69
70 virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
71 virtual void KeyInput(const KeyEvent& rEvt) override;
72 virtual void Command( const CommandEvent& rEvt ) override;
73
74 virtual void Init() override;
75 };
76}
77
78/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tools::Long m_nCurrentPos
current position of selected column
void Paste(sal_Int32 nRow)
virtual void cut() override
virtual bool IsDeleteAllowed()=0
virtual void CopyRows()=0
virtual void SetCellData(sal_Int32 nRow, sal_uInt16 nColId, const TOTypeInfoSP &_pTypeInfo)=0
tools::Long m_nDataPos
currently needed row
virtual OTableDesignView * GetView() const =0
virtual bool IsInsertNewAllowed(sal_Int32 nRow)=0
virtual void copy() override
virtual void SetControlText(sal_Int32 nRow, sal_uInt16 nColId, const OUString &rText)=0
virtual void InsertNewRows(sal_Int32 nRow)=0
virtual void Command(const CommandEvent &rEvt) override
virtual void SetCellData(sal_Int32 nRow, sal_uInt16 nColId, const css::uno::Any &_rNewData)=0
virtual void paste() override
virtual void KeyInput(const KeyEvent &rEvt) override
virtual bool IsPrimaryKeyAllowed()=0
virtual css::uno::Any GetCellData(sal_Int32 nRow, sal_uInt16 nColId)=0
virtual RowStatus GetRowStatus(sal_Int32 nRow) const override
OTableRowView(vcl::Window *pParent)
virtual void DeleteRows()=0
virtual void Init() override
virtual void InsertRows(sal_Int32 nRow)=0
sal_uInt16 GetCurUndoActId() const
std::shared_ptr< OTypeInfo > TOTypeInfoSP
Definition: TypeInfo.hxx:99
long Long