2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +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 .
|
|
|
|
*/
|
2013-10-28 03:41:20 +01:00
|
|
|
#ifndef INCLUDED_SVX_SOURCE_INC_TABWIN_HXX
|
|
|
|
#define INCLUDED_SVX_SOURCE_INC_TABWIN_HXX
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-10-11 16:13:12 -04:00
|
|
|
#include <svtools/treelistbox.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <vcl/floatwin.hxx>
|
|
|
|
#include <sfx2/basedlgs.hxx>
|
|
|
|
#include <sfx2/childwin.hxx>
|
|
|
|
#include <sfx2/ctrlitem.hxx>
|
|
|
|
#include <com/sun/star/form/XForm.hpp>
|
|
|
|
|
2000-10-20 13:13:45 +00:00
|
|
|
#include <comphelper/propmultiplex.hxx>
|
2001-03-26 14:04:35 +00:00
|
|
|
#include <svtools/transfer.hxx>
|
2015-04-01 15:43:32 +01:00
|
|
|
#include <connectivity/dbtools.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
class FmFieldWin;
|
2014-02-03 14:27:14 +01:00
|
|
|
class FmFieldWinListBox
|
2001-03-26 14:04:35 +00:00
|
|
|
:public SvTreeListBox
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<FmFieldWin> pTabWin;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
protected:
|
2001-03-26 14:04:35 +00:00
|
|
|
// virtual void Command( const CommandEvent& rEvt );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
FmFieldWinListBox( FmFieldWin* pParent );
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~FmFieldWinListBox() override;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void dispose() override;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
|
|
|
|
sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
|
2001-03-26 14:04:35 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// DragSourceHelper
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
|
2002-05-06 09:35:15 +00:00
|
|
|
|
2012-10-11 16:13:12 -04:00
|
|
|
// SvTreeListBox
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool DoubleClickHdl() override;
|
2006-06-19 15:09:02 +00:00
|
|
|
|
2012-10-11 16:13:12 -04:00
|
|
|
using SvTreeListBox::ExecuteDrop;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
class FmFormShell;
|
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2014-02-03 14:27:14 +01:00
|
|
|
class FmFieldWin :public SfxFloatingWindow
|
2001-03-26 14:04:35 +00:00
|
|
|
,public SfxControllerItem
|
|
|
|
,public ::comphelper::OPropertyChangeListener
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
::osl::Mutex m_aMutex;
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<FmFieldWinListBox> pListBox;
|
2015-04-01 15:43:32 +01:00
|
|
|
::dbtools::SharedConnection
|
2005-09-23 11:00:35 +00:00
|
|
|
m_aConnection;
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString m_aDatabaseName,
|
2000-09-18 16:07:07 +00:00
|
|
|
m_aObjectName;
|
|
|
|
sal_Int32 m_nObjectType;
|
|
|
|
|
2016-06-02 14:53:50 +02:00
|
|
|
rtl::Reference<::comphelper::OPropertyChangeMultiplexer> m_pChangeListener;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
FmFieldWin(SfxBindings *pBindings,
|
2014-09-23 11:20:40 +02:00
|
|
|
SfxChildWindow *pMgr, vcl::Window* pParent);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~FmFieldWin() override;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void dispose() override;
|
|
|
|
virtual void Resize() override;
|
2016-07-12 08:21:27 +02:00
|
|
|
using SfxFloatingWindow::Close;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void GetFocus() override;
|
|
|
|
virtual bool PreNotify( NotifyEvent& _rNEvt ) override;
|
2000-09-18 16:07:07 +00:00
|
|
|
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
|
2015-10-12 16:04:04 +02:00
|
|
|
const SfxPoolItem* pState) override;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-06-19 15:09:02 +00:00
|
|
|
void UpdateContent(FmFormShell*);
|
2015-10-30 14:59:47 +02:00
|
|
|
void UpdateContent(const css::uno::Reference< css::form::XForm > &);
|
2015-10-12 16:04:04 +02:00
|
|
|
void FillInfo( SfxChildWinInfo& rInfo ) const override;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& GetDatabaseName() const { return m_aDatabaseName; }
|
2016-04-13 13:32:22 +02:00
|
|
|
const ::dbtools::SharedConnection& GetConnection() const { return m_aConnection; }
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& GetObjectName() const { return m_aObjectName; }
|
2005-09-23 11:00:35 +00:00
|
|
|
sal_Int32 GetObjectType() const { return m_nObjectType; }
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-04-14 16:15:22 +02:00
|
|
|
bool createSelectionControls( );
|
2002-05-06 09:35:15 +00:00
|
|
|
|
2001-03-26 14:04:35 +00:00
|
|
|
protected:
|
2000-09-18 16:07:07 +00:00
|
|
|
// FmXChangeListener
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void _propertyChanged(const css::beans::PropertyChangeEvent& evt) override;
|
2002-05-06 09:35:15 +00:00
|
|
|
|
|
|
|
protected:
|
2016-10-22 10:04:52 +02:00
|
|
|
using SfxControllerItem::GetBindings;
|
2006-06-19 15:09:02 +00:00
|
|
|
using SfxFloatingWindow::StateChanged;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2014-02-03 14:27:14 +01:00
|
|
|
class FmFieldWinMgr : public SfxChildWindow
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
FmFieldWinMgr(vcl::Window *pParent, sal_uInt16 nId,
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxBindings *pBindings, SfxChildWinInfo *pInfo);
|
|
|
|
SFX_DECL_CHILDWINDOW(FmFieldWinMgr);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-27 13:11:31 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|