bump product version to 4.1.6.2
[LibreOffice.git] / dbaccess / source / ui / inc / RelationController.hxx
blobb62620f3f1b51cc85919f441e34a58c21e6637f9
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 DBAUI_RELATIONCONTROLLER_HXX
20 #define DBAUI_RELATIONCONTROLLER_HXX
22 #include "JoinController.hxx"
23 #include "RelationDesignView.hxx"
25 class WaitObject;
26 namespace dbaui
28 class ORelationController : public OJoinController
30 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xTables;
31 ::std::auto_ptr<WaitObject> m_pWaitObject;
32 sal_uLong m_nThreadEvent;
33 sal_Bool m_bRelationsPossible;
34 protected:
35 // all the features which should be handled by this class
36 virtual void describeSupportedFeatures();
37 // 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.
38 virtual FeatureState GetState(sal_uInt16 nId) const;
39 // execute a feature
40 virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
42 ORelationDesignView* getRelationView() { return static_cast<ORelationDesignView*>( getView() ); }
43 void loadData();
44 TTableWindowData::value_type existsTable(const OUString& _rComposedTableName,sal_Bool _bCase) const;
46 // load the window positions out of the datasource
47 void loadLayoutInformation();
48 void loadTableData(const ::com::sun::star::uno::Any& _aTable);
49 public:
50 ORelationController(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rM);
52 ~ORelationController();
53 // temp
54 void SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY );
56 void mergeData(const TTableConnectionData& _aConnectionData);
58 virtual sal_Bool Construct(Window* pParent);
60 // XServiceInfo
61 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
62 virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
63 // need by registration
64 static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
65 static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
66 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
67 SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
69 // OJoinController overridables
70 virtual bool allowViews() const;
71 virtual bool allowQueries() const;
73 private:
74 // ask the user if the design should be saved when it is modified
75 virtual short saveModified();
76 virtual void reset();
77 virtual void impl_initialize();
78 virtual OUString getPrivateTitle( ) const;
79 DECL_LINK( OnThreadFinished, void* );
82 #endif // DBAUI_RELATIONCONTROLLER_HXX
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */