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-28 09:09:17 +00:00
|
|
|
|
2017-04-14 08:42:15 +10:00
|
|
|
#include <memory>
|
2020-12-09 22:42:32 +01:00
|
|
|
#include <string_view>
|
|
|
|
|
2001-02-28 09:09:17 +00:00
|
|
|
#include "JoinController.hxx"
|
|
|
|
|
2019-12-01 19:27:47 +00:00
|
|
|
namespace weld
|
|
|
|
{
|
|
|
|
class WaitObject;
|
|
|
|
}
|
|
|
|
|
2001-02-28 09:09:17 +00:00
|
|
|
namespace dbaui
|
|
|
|
{
|
|
|
|
class ORelationController : public OJoinController
|
|
|
|
{
|
2015-08-03 09:14:58 +02:00
|
|
|
css::uno::Reference< css::container::XNameAccess > m_xTables;
|
2019-12-01 19:27:47 +00:00
|
|
|
std::unique_ptr<weld::WaitObject> m_xWaitObject;
|
2011-01-14 15:00:11 +01:00
|
|
|
sal_uLong m_nThreadEvent;
|
2015-08-03 09:14:58 +02:00
|
|
|
bool m_bRelationsPossible;
|
2001-02-28 09:09:17 +00:00
|
|
|
protected:
|
|
|
|
// all the features which should be handled by this class
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void describeSupportedFeatures() override;
|
2015-08-03 09:14:58 +02:00
|
|
|
// state of a feature. 'feature' may be the handle of a css::util::URL somebody requested a dispatch interface for OR a toolbar slot.
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual FeatureState GetState(sal_uInt16 nId) const override;
|
2001-02-28 09:09:17 +00:00
|
|
|
// execute a feature
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) override;
|
2001-02-28 09:09:17 +00:00
|
|
|
|
|
|
|
void loadData();
|
2020-12-09 22:42:32 +01:00
|
|
|
TTableWindowData::value_type existsTable(std::u16string_view _rComposedTableName) 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-02-28 09:09:17 +00:00
|
|
|
public:
|
2015-08-03 09:14:58 +02:00
|
|
|
ORelationController(const css::uno::Reference< css::uno::XComponentContext >& _rM);
|
2001-02-28 09:09:17 +00:00
|
|
|
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~ORelationController() override;
|
2001-02-28 09:09:17 +00:00
|
|
|
|
2009-09-08 09:50:48 +00:00
|
|
|
void mergeData(const TTableConnectionData& _aConnectionData);
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool Construct(vcl::Window* pParent) override;
|
2001-02-28 09:09:17 +00:00
|
|
|
|
|
|
|
// XServiceInfo
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual OUString SAL_CALL getImplementationName() override;
|
|
|
|
virtual css::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() override;
|
2001-03-01 12:29:19 +00:00
|
|
|
|
2006-07-10 14:28:51 +00:00
|
|
|
// OJoinController overridables
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool allowViews() const override;
|
|
|
|
virtual bool allowQueries() const 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
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual short saveModified() override;
|
|
|
|
virtual void reset() override;
|
|
|
|
virtual void impl_initialize() override;
|
|
|
|
virtual OUString getPrivateTitle( ) const override;
|
2016-10-05 07:56:12 +02:00
|
|
|
DECL_LINK( OnThreadFinished, void*, void );
|
2001-02-28 09:09:17 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2010-10-27 12:33:13 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|