merge the formfield patch from ooo-build
[ooovba.git] / svx / source / editeng / eeobj.hxx
blobc013d040b35fa942b958dfc4d28f97f2fd28d8b2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: eeobj.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
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.
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).
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.
29 ************************************************************************/
31 #ifndef _DATAOBJ_HXX
32 #define _DATAOBJ_HXX
34 #include <cppuhelper/weak.hxx>
35 #include <com/sun/star/datatransfer/XTransferable.hpp>
37 #include <tools/stream.hxx>
39 class EditDataObject : public ::com::sun::star::datatransfer::XTransferable,
40 public ::cppu::OWeakObject
43 private:
44 SvMemoryStream maBinData;
45 SvMemoryStream maRTFData;
46 String maText;
48 String maOfficeBookmark;
50 // String maNetscapeBookmark;
51 // SvMemoryStream maRTFData;
53 public:
54 EditDataObject();
55 ~EditDataObject();
57 SvMemoryStream& GetStream() { return maBinData; }
58 SvMemoryStream& GetRTFStream() { return maRTFData; }
59 String& GetString() { return maText; }
60 String& GetURL() { return maOfficeBookmark; }
63 // ::com::sun::star::uno::XInterface
64 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
65 void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
66 void SAL_CALL release() throw() { OWeakObject::release(); }
68 // ::com::sun::star::datatransfer::XTransferable
69 ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) throw(::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
70 ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) throw(::com::sun::star::uno::RuntimeException);
71 sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) throw(::com::sun::star::uno::RuntimeException);
74 #endif // _DATAOBJ_HXX