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