Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / ui / inc / RelationController.hxx
blob4edbecf071640554253245e0dab23d6c71c3f8dd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONCONTROLLER_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONCONTROLLER_HXX
22 #include "JoinController.hxx"
23 #include "RelationDesignView.hxx"
24 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 class WaitObject;
27 namespace dbaui
29 class ORelationController : public OJoinController
31 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xTables;
32 ::std::unique_ptr<WaitObject> m_pWaitObject;
33 sal_uLong m_nThreadEvent;
34 bool m_bRelationsPossible;
35 protected:
36 // all the features which should be handled by this class
37 virtual void describeSupportedFeatures() SAL_OVERRIDE;
38 // 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.
39 virtual FeatureState GetState(sal_uInt16 nId) const SAL_OVERRIDE;
40 // execute a feature
41 virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) SAL_OVERRIDE;
43 ORelationDesignView* getRelationView() { return static_cast<ORelationDesignView*>( getView() ); }
44 void loadData();
45 TTableWindowData::value_type existsTable(const OUString& _rComposedTableName,bool _bCase) const;
47 // load the window positions out of the datasource
48 void loadLayoutInformation();
49 void loadTableData(const ::com::sun::star::uno::Any& _aTable);
50 public:
51 ORelationController(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rM);
53 virtual ~ORelationController();
54 // temp
55 void SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY );
57 void mergeData(const TTableConnectionData& _aConnectionData);
59 virtual bool Construct(vcl::Window* pParent) SAL_OVERRIDE;
61 // XServiceInfo
62 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
63 virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
64 // need by registration
65 static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
66 static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw( ::com::sun::star::uno::RuntimeException );
67 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
68 SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
70 // OJoinController overridables
71 virtual bool allowViews() const SAL_OVERRIDE;
72 virtual bool allowQueries() const SAL_OVERRIDE;
74 private:
75 // ask the user if the design should be saved when it is modified
76 virtual short saveModified() SAL_OVERRIDE;
77 virtual void reset() SAL_OVERRIDE;
78 virtual void impl_initialize() SAL_OVERRIDE;
79 virtual OUString getPrivateTitle( ) const SAL_OVERRIDE;
80 DECL_LINK( OnThreadFinished, void* );
83 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONCONTROLLER_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */