2010-10-27 12:33:13 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2020-09-13 12:06:53 +00:00
|
|
|
#pragma once
|
2001-02-14 13:37:35 +00:00
|
|
|
|
2001-06-29 07:45:10 +00:00
|
|
|
#include <svtools/editbrowsebox.hxx>
|
2001-02-14 13:37:35 +00:00
|
|
|
|
2003-03-19 16:57:12 +00:00
|
|
|
#include "IClipBoardTest.hxx"
|
|
|
|
#include "TypeInfo.hxx"
|
2001-02-14 13:37:35 +00:00
|
|
|
|
|
|
|
namespace dbaui
|
|
|
|
{
|
|
|
|
class OTableDesignView;
|
2012-08-12 18:38:58 +02:00
|
|
|
|
2012-08-12 18:45:53 +02:00
|
|
|
class OTableRowView : public ::svt::EditBrowseBox, public IClipboardTest
|
2001-02-14 13:37:35 +00:00
|
|
|
{
|
|
|
|
friend class OTableDesignUndoAct;
|
|
|
|
|
|
|
|
protected:
|
2020-10-21 15:25:56 +02:00
|
|
|
tools::Long m_nDataPos; ///< currently needed row
|
|
|
|
tools::Long m_nCurrentPos; ///< current position of selected column
|
2012-08-12 18:22:40 +02:00
|
|
|
|
2001-02-14 13:37:35 +00:00
|
|
|
private:
|
2011-01-14 15:00:11 +01:00
|
|
|
sal_uInt16 m_nCurUndoActId;
|
2012-08-12 18:38:58 +02:00
|
|
|
|
2001-02-14 13:37:35 +00:00
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
OTableRowView(vcl::Window* pParent);
|
2001-02-14 13:37:35 +00:00
|
|
|
|
2020-10-21 07:49:00 +02:00
|
|
|
virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
|
|
|
|
virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData ) = 0;
|
|
|
|
virtual css::uno::Any GetCellData( sal_Int32 nRow, sal_uInt16 nColId ) = 0;
|
|
|
|
virtual void SetControlText( sal_Int32 nRow, sal_uInt16 nColId, const OUString& rText ) = 0;
|
2001-02-14 13:37:35 +00:00
|
|
|
|
|
|
|
virtual OTableDesignView* GetView() const = 0;
|
|
|
|
|
2019-09-04 16:08:36 +02:00
|
|
|
sal_uInt16 GetCurUndoActId() const { return m_nCurUndoActId; }
|
2001-02-14 13:37:35 +00:00
|
|
|
|
2003-03-19 16:57:12 +00:00
|
|
|
// IClipboardTest
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void cut() override;
|
|
|
|
virtual void copy() override;
|
|
|
|
virtual void paste() override;
|
2001-02-14 13:37:35 +00:00
|
|
|
|
|
|
|
protected:
|
2020-10-21 07:49:00 +02:00
|
|
|
void Paste( sal_Int32 nRow );
|
2001-02-14 13:37:35 +00:00
|
|
|
|
2001-08-14 06:56:01 +00:00
|
|
|
virtual void CopyRows() = 0;
|
|
|
|
virtual void DeleteRows() = 0;
|
2020-10-21 07:49:00 +02:00
|
|
|
virtual void InsertRows( sal_Int32 nRow ) = 0;
|
|
|
|
virtual void InsertNewRows( sal_Int32 nRow ) = 0;
|
2001-08-14 06:56:01 +00:00
|
|
|
|
2019-10-18 15:43:21 +02:00
|
|
|
virtual bool IsPrimaryKeyAllowed() = 0;
|
2020-10-21 07:49:00 +02:00
|
|
|
virtual bool IsInsertNewAllowed( sal_Int32 nRow ) = 0;
|
2019-10-18 15:43:21 +02:00
|
|
|
virtual bool IsDeleteAllowed() = 0;
|
2001-02-14 13:37:35 +00:00
|
|
|
|
2020-10-21 07:49:00 +02:00
|
|
|
virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void KeyInput(const KeyEvent& rEvt) override;
|
|
|
|
virtual void Command( const CommandEvent& rEvt ) override;
|
2001-02-14 13:37:35 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Init() override;
|
2001-02-14 13:37:35 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2010-10-27 12:33:13 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|