1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef DBAUI_DBEXCHANGE_HXX 28 #define DBAUI_DBEXCHANGE_HXX 29 30 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ 31 #include <com/sun/star/beans/PropertyValue.hpp> 32 #endif 33 #ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_ 34 #include <com/sun/star/util/XNumberFormatter.hpp> 35 #endif 36 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ 37 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 38 #endif 39 #ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_ 40 #include <com/sun/star/lang/XEventListener.hpp> 41 #endif 42 #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ 43 #include <com/sun/star/sdbc/XConnection.hpp> 44 #endif 45 #ifndef _CPPUHELPER_IMPLBASE1_HXX_ 46 #include <cppuhelper/implbase1.hxx> 47 #endif 48 #ifndef _SVX_DBAEXCHANGE_HXX_ 49 #include <svx/dbaexchange.hxx> 50 #endif 51 #ifndef _COMPHELPER_UNO3_HXX_ 52 #include <comphelper/uno3.hxx> 53 #endif 54 #include <vector> 55 56 #include <rtl/ref.hxx> 57 58 namespace dbaui 59 { 60 61 class ORTFImportExport; 62 class OHTMLImportExport; 63 64 class ODataClipboard : public ::svx::ODataAccessObjectTransferable 65 66 { 67 ::rtl::Reference< OHTMLImportExport > m_pHtml; 68 ::rtl::Reference< ORTFImportExport > m_pRtf; 69 70 public: 71 ODataClipboard( 72 const ::rtl::OUString& _rDatasource, 73 const sal_Int32 _nCommandType, 74 const ::rtl::OUString& _rCommand, 75 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, 76 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter, 77 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB 78 ); 79 80 ODataClipboard( 81 const ::rtl::OUString& _rDatasource, 82 const sal_Int32 _nCommandType, 83 const ::rtl::OUString& _rCommand, 84 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter, 85 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB 86 ); 87 88 ODataClipboard( 89 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_rAliveForm, 90 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& i_rSelectedRows, 91 const sal_Bool i_bBookmarkSelection, 92 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_rORB 93 ); 94 95 // XEventListener 96 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); 97 98 protected: 99 virtual void AddSupportedFormats(); 100 virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); 101 virtual void ObjectReleased(); 102 virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); 103 }; 104 } 105 106 #endif // DBAUI_DBEXCHANGE_HXX 107 108 109 110 111 112 113 114