1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2008 by Sun Microsystems, Inc. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * $RCSfile: View.hxx,v $ 10 * $Revision: 1.3 $ 11 * 12 * This file is part of OpenOffice.org. 13 * 14 * OpenOffice.org is free software: you can redistribute it and/or modify 15 * it under the terms of the GNU Lesser General Public License version 3 16 * only, as published by the Free Software Foundation. 17 * 18 * OpenOffice.org is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU Lesser General Public License version 3 for more details 22 * (a copy is included in the LICENSE file that accompanied this code). 23 * 24 * You should have received a copy of the GNU Lesser General Public License 25 * version 3 along with OpenOffice.org. If not, see 26 * <http://www.openoffice.org/license.html> 27 * for a copy of the LGPLv3 License. 28 * 29 ************************************************************************/ 30 31 #ifndef DBACCESS_VIEW_HXX 32 #define DBACCESS_VIEW_HXX 33 34 #include "connectivity/sdbcx/VView.hxx" 35 36 /** === begin UNO includes === **/ 37 #include <com/sun/star/sdbcx/XAlterView.hpp> 38 #include <com/sun/star/sdb/tools/XViewAccess.hpp> 39 /** === end UNO includes === **/ 40 41 #include <comphelper/uno3.hxx> 42 #include <cppuhelper/implbase1.hxx> 43 44 //........................................................................ 45 namespace dbaccess 46 { 47 //........................................................................ 48 49 //==================================================================== 50 //= View 51 //==================================================================== 52 typedef ::connectivity::sdbcx::OView View_Base; 53 typedef ::cppu::ImplHelper1< ::com::sun::star::sdbcx::XAlterView > View_IBASE; 54 class View :public View_Base 55 ,public View_IBASE 56 { 57 public: 58 View( 59 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, 60 sal_Bool _bCaseSensitive, 61 const ::rtl::OUString& _rCatalogName, 62 const ::rtl::OUString& _rSchemaName, 63 const ::rtl::OUString& _rName 64 ); 65 66 // UNO 67 DECLARE_XINTERFACE() 68 DECLARE_XTYPEPROVIDER() 69 70 // XAlterView 71 virtual void SAL_CALL alterCommand( const ::rtl::OUString& NewCommand ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); 72 73 protected: 74 virtual ~View(); 75 76 protected: 77 // OPropertyContainer 78 virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle ) const; 79 80 private: 81 ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XViewAccess> m_xViewAccess; 82 sal_Int32 m_nCommandHandle; 83 private: 84 using View_Base::getFastPropertyValue; 85 }; 86 87 //........................................................................ 88 } // namespace dbaccess 89 //........................................................................ 90 91 #endif // DBACCESS_VIEW_HXX 92