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 .
|
|
|
|
*/
|
2013-11-05 02:18:53 +01:00
|
|
|
#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONCONTROLLER_HXX
|
|
|
|
#define INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONCONTROLLER_HXX
|
2001-02-28 09:09:17 +00:00
|
|
|
|
|
|
|
#include "JoinController.hxx"
|
|
|
|
#include "RelationDesignView.hxx"
|
|
|
|
|
2009-09-08 09:50:48 +00:00
|
|
|
class WaitObject;
|
2001-02-28 09:09:17 +00:00
|
|
|
namespace dbaui
|
|
|
|
{
|
|
|
|
class ORelationController : public OJoinController
|
|
|
|
{
|
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xTables;
|
2009-09-08 09:50:48 +00:00
|
|
|
::std::auto_ptr<WaitObject> m_pWaitObject;
|
2011-01-14 15:00:11 +01:00
|
|
|
sal_uLong m_nThreadEvent;
|
2001-03-22 07:03:35 +00:00
|
|
|
sal_Bool m_bRelationsPossible;
|
2001-02-28 09:09:17 +00:00
|
|
|
protected:
|
|
|
|
// all the features which should be handled by this class
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void describeSupportedFeatures() SAL_OVERRIDE;
|
2001-03-21 12:53:00 +00:00
|
|
|
// state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual FeatureState GetState(sal_uInt16 nId) const SAL_OVERRIDE;
|
2001-02-28 09:09:17 +00:00
|
|
|
// execute a feature
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) SAL_OVERRIDE;
|
2001-02-28 09:09:17 +00:00
|
|
|
|
2010-02-09 17:26:40 +01:00
|
|
|
ORelationDesignView* getRelationView() { return static_cast<ORelationDesignView*>( getView() ); }
|
2001-02-28 09:09:17 +00:00
|
|
|
void loadData();
|
2013-04-07 12:06:47 +02:00
|
|
|
TTableWindowData::value_type existsTable(const OUString& _rComposedTableName,sal_Bool _bCase) const;
|
2001-10-23 11:30:27 +00:00
|
|
|
|
2001-06-28 13:26:45 +00:00
|
|
|
// load the window positions out of the datasource
|
|
|
|
void loadLayoutInformation();
|
2001-08-24 05:40:35 +00:00
|
|
|
void loadTableData(const ::com::sun::star::uno::Any& _aTable);
|
2001-02-28 09:09:17 +00:00
|
|
|
public:
|
2013-01-07 17:46:55 +02:00
|
|
|
ORelationController(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rM);
|
2001-02-28 09:09:17 +00:00
|
|
|
|
|
|
|
~ORelationController();
|
|
|
|
// temp
|
|
|
|
void SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY );
|
|
|
|
|
2009-09-08 09:50:48 +00:00
|
|
|
void mergeData(const TTableConnectionData& _aConnectionData);
|
|
|
|
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual sal_Bool Construct(Window* pParent) SAL_OVERRIDE;
|
2001-02-28 09:09:17 +00:00
|
|
|
|
|
|
|
// XServiceInfo
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2001-02-28 09:09:17 +00:00
|
|
|
// need by registration
|
2013-04-07 12:06:47 +02:00
|
|
|
static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
|
|
|
|
static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
|
2001-02-28 09:09:17 +00:00
|
|
|
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
|
|
|
|
SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
|
2001-03-01 12:29:19 +00:00
|
|
|
|
2006-07-10 14:28:51 +00:00
|
|
|
// OJoinController overridables
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual bool allowViews() const SAL_OVERRIDE;
|
|
|
|
virtual bool allowQueries() const SAL_OVERRIDE;
|
2006-07-10 14:28:51 +00:00
|
|
|
|
2008-04-04 13:01:45 +00:00
|
|
|
private:
|
2001-10-23 11:30:27 +00:00
|
|
|
// ask the user if the design should be saved when it is modified
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual short saveModified() SAL_OVERRIDE;
|
|
|
|
virtual void reset() SAL_OVERRIDE;
|
|
|
|
virtual void impl_initialize() SAL_OVERRIDE;
|
|
|
|
virtual OUString getPrivateTitle( ) const SAL_OVERRIDE;
|
2009-09-08 09:50:48 +00:00
|
|
|
DECL_LINK( OnThreadFinished, void* );
|
2001-02-28 09:09:17 +00:00
|
|
|
};
|
|
|
|
}
|
2013-11-05 02:18:53 +01:00
|
|
|
#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONCONTROLLER_HXX
|
2001-02-28 09:09:17 +00:00
|
|
|
|
2010-10-27 12:33:13 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|