LibreOffice Module dbaccess (master) 1
RelationController.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
21#include <memory>
22#include <string_view>
23
24#include "JoinController.hxx"
25
26namespace weld
27{
28 class WaitObject;
29}
30
31namespace dbaui
32{
34 {
35 css::uno::Reference< css::container::XNameAccess > m_xTables;
36 std::unique_ptr<weld::WaitObject> m_xWaitObject;
39 protected:
40 // all the features which should be handled by this class
41 virtual void describeSupportedFeatures() override;
42 // state of a feature. 'feature' may be the handle of a css::util::URL somebody requested a dispatch interface for OR a toolbar slot.
43 virtual FeatureState GetState(sal_uInt16 nId) const override;
44 // execute a feature
45 virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) override;
46
47 void loadData();
48 TTableWindowData::value_type existsTable(std::u16string_view _rComposedTableName) const;
49
50 // load the window positions out of the datasource
52 public:
53 ORelationController(const css::uno::Reference< css::uno::XComponentContext >& _rM);
54
55 virtual ~ORelationController() override;
56
57 void mergeData(const TTableConnectionData& _aConnectionData);
58
59 virtual bool Construct(vcl::Window* pParent) override;
60
61 // XServiceInfo
62 virtual OUString SAL_CALL getImplementationName() override;
63 virtual css::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() override;
64
65 // OJoinController overridables
66 virtual bool allowViews() const override;
67 virtual bool allowQueries() const override;
68
69 private:
70 // ask the user if the design should be saved when it is modified
71 virtual short saveModified() override;
72 virtual void reset() override;
73 virtual void impl_initialize() override;
74 virtual OUString getPrivateTitle( ) const override;
75 DECL_LINK( OnThreadFinished, void*, void );
76 };
77}
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool Construct(vcl::Window *pParent) override
void mergeData(const TTableConnectionData &_aConnectionData)
virtual bool allowQueries() const override
determines whether or not it's allowed for queries to participate in the game
virtual void reset() override
ORelationController(const css::uno::Reference< css::uno::XComponentContext > &_rM)
virtual void describeSupportedFeatures() override
css::uno::Reference< css::container::XNameAccess > m_xTables
virtual bool allowViews() const override
determines whether or not it's allowed for database views to participate in the game
virtual void impl_initialize() override
std::unique_ptr< weld::WaitObject > m_xWaitObject
virtual ~ORelationController() override
TTableWindowData::value_type existsTable(std::u16string_view _rComposedTableName) const
virtual short saveModified() override
virtual FeatureState GetState(sal_uInt16 nId) const override
DECL_LINK(OnThreadFinished, void *, void)
virtual OUString getPrivateTitle() const override
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
std::vector< std::shared_ptr< OTableConnectionData > > TTableConnectionData
sal_uIntPtr sal_uLong
describes the state of a feature