1*2e2212a7SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2e2212a7SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2e2212a7SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2e2212a7SAndrew Rist * distributed with this work for additional information 6*2e2212a7SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2e2212a7SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2e2212a7SAndrew Rist * "License"); you may not use this file except in compliance 9*2e2212a7SAndrew Rist * with the License. You may obtain a copy of the License at 10*2e2212a7SAndrew Rist * 11*2e2212a7SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*2e2212a7SAndrew Rist * 13*2e2212a7SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2e2212a7SAndrew Rist * software distributed under the License is distributed on an 15*2e2212a7SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2e2212a7SAndrew Rist * KIND, either express or implied. See the License for the 17*2e2212a7SAndrew Rist * specific language governing permissions and limitations 18*2e2212a7SAndrew Rist * under the License. 19*2e2212a7SAndrew Rist * 20*2e2212a7SAndrew Rist *************************************************************/ 21*2e2212a7SAndrew Rist 22*2e2212a7SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX 25cdf0e10cSrcweir #define DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir /** === begin UNO includes === **/ 28cdf0e10cSrcweir #ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ 29cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp> 30cdf0e10cSrcweir #endif 31cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ 32cdf0e10cSrcweir #include <com/sun/star/sdbc/XConnection.hpp> 33cdf0e10cSrcweir #endif 34cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_ 35cdf0e10cSrcweir #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> 36cdf0e10cSrcweir #endif 37cdf0e10cSrcweir #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ 38cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 39cdf0e10cSrcweir #endif 40cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_ 41cdf0e10cSrcweir #include <com/sun/star/sdbc/XRowSet.hpp> 42cdf0e10cSrcweir #endif 43cdf0e10cSrcweir /** === end UNO includes === **/ 44cdf0e10cSrcweir 45cdf0e10cSrcweir #ifndef _SVT_GENERICUNODIALOG_HXX_ 46cdf0e10cSrcweir #include <svtools/genericunodialog.hxx> 47cdf0e10cSrcweir #endif 48cdf0e10cSrcweir #ifndef _DBAUI_MODULE_DBU_HXX_ 49cdf0e10cSrcweir #include "moduledbu.hxx" 50cdf0e10cSrcweir #endif 51cdf0e10cSrcweir #ifndef _DBASHARED_APITOOLS_HXX_ 52cdf0e10cSrcweir #include "apitools.hxx" 53cdf0e10cSrcweir #endif 54cdf0e10cSrcweir 55cdf0e10cSrcweir //......................................................................... 56cdf0e10cSrcweir namespace dbaui 57cdf0e10cSrcweir { 58cdf0e10cSrcweir //......................................................................... 59cdf0e10cSrcweir 60cdf0e10cSrcweir //===================================================================== 61cdf0e10cSrcweir //= ComposerDialog 62cdf0e10cSrcweir //===================================================================== 63cdf0e10cSrcweir class ComposerDialog; 64cdf0e10cSrcweir typedef ::svt::OGenericUnoDialog ComposerDialog_BASE; 65cdf0e10cSrcweir typedef ::comphelper::OPropertyArrayUsageHelper< ComposerDialog > ComposerDialog_PBASE; 66cdf0e10cSrcweir 67cdf0e10cSrcweir class ComposerDialog 68cdf0e10cSrcweir :public ComposerDialog_BASE 69cdf0e10cSrcweir ,public ComposerDialog_PBASE 70cdf0e10cSrcweir { 71cdf0e10cSrcweir OModuleClient m_aModuleClient; 72cdf0e10cSrcweir protected: 73cdf0e10cSrcweir // <properties> 74cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > 75cdf0e10cSrcweir m_xComposer; 76cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > 77cdf0e10cSrcweir m_xRowSet; 78cdf0e10cSrcweir // </properties> 79cdf0e10cSrcweir 80cdf0e10cSrcweir protected: 81cdf0e10cSrcweir ComposerDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); 82cdf0e10cSrcweir ~ComposerDialog(); 83cdf0e10cSrcweir 84cdf0e10cSrcweir public: 85cdf0e10cSrcweir DECLARE_IMPLEMENTATION_ID( ); 86cdf0e10cSrcweir 87cdf0e10cSrcweir DECLARE_PROPERTYCONTAINER_DEFAULTS( ); 88cdf0e10cSrcweir 89cdf0e10cSrcweir protected: 90cdf0e10cSrcweir // own overridables 91cdf0e10cSrcweir virtual Dialog* createComposerDialog( 92cdf0e10cSrcweir Window* _pParent, 93cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, 94cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumns 95cdf0e10cSrcweir ) = 0; 96cdf0e10cSrcweir 97cdf0e10cSrcweir private: 98cdf0e10cSrcweir // OGenericUnoDialog overridables 99cdf0e10cSrcweir virtual Dialog* createDialog(Window* _pParent); 100cdf0e10cSrcweir }; 101cdf0e10cSrcweir 102cdf0e10cSrcweir //===================================================================== 103cdf0e10cSrcweir //= RowsetFilterDialog 104cdf0e10cSrcweir //===================================================================== 105cdf0e10cSrcweir class RowsetFilterDialog : public ComposerDialog 106cdf0e10cSrcweir { 107cdf0e10cSrcweir public: 108cdf0e10cSrcweir RowsetFilterDialog( 109cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB 110cdf0e10cSrcweir ); 111cdf0e10cSrcweir 112cdf0e10cSrcweir DECLARE_SERVICE_INFO_STATIC( ); 113cdf0e10cSrcweir 114cdf0e10cSrcweir protected: 115cdf0e10cSrcweir // own overridables 116cdf0e10cSrcweir virtual Dialog* createComposerDialog( 117cdf0e10cSrcweir Window* _pParent, 118cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, 119cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumns 120cdf0e10cSrcweir ); 121cdf0e10cSrcweir 122cdf0e10cSrcweir // OGenericUnoDialog overridables 123cdf0e10cSrcweir virtual void executedDialog( sal_Int16 _nExecutionResult ); 124cdf0e10cSrcweir }; 125cdf0e10cSrcweir 126cdf0e10cSrcweir //===================================================================== 127cdf0e10cSrcweir //= RowsetOrderDialog 128cdf0e10cSrcweir //===================================================================== 129cdf0e10cSrcweir class RowsetOrderDialog : public ComposerDialog 130cdf0e10cSrcweir { 131cdf0e10cSrcweir public: 132cdf0e10cSrcweir RowsetOrderDialog( 133cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB 134cdf0e10cSrcweir ); 135cdf0e10cSrcweir 136cdf0e10cSrcweir DECLARE_SERVICE_INFO_STATIC( ); 137cdf0e10cSrcweir 138cdf0e10cSrcweir protected: 139cdf0e10cSrcweir // own overridables 140cdf0e10cSrcweir virtual Dialog* createComposerDialog( 141cdf0e10cSrcweir Window* _pParent, 142cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, 143cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumns 144cdf0e10cSrcweir ); 145cdf0e10cSrcweir 146cdf0e10cSrcweir // OGenericUnoDialog overridables 147cdf0e10cSrcweir virtual void executedDialog( sal_Int16 _nExecutionResult ); 148cdf0e10cSrcweir }; 149cdf0e10cSrcweir 150cdf0e10cSrcweir //......................................................................... 151cdf0e10cSrcweir } // namespace dbaui 152cdf0e10cSrcweir //......................................................................... 153cdf0e10cSrcweir 154cdf0e10cSrcweir #endif // DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX 155cdf0e10cSrcweir 156cdf0e10cSrcweir 157