merge the formfield patch from ooo-build
[ooovba.git] / writerfilter / source / dmapper / OLEHandler.hxx
blobd65035ffcc843e3bfc260ceec6e76e4c80fbd8db
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: OLEHandler.hxx,v $
10 * $Revision: 1.3 $
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 ************************************************************************/
30 #ifndef INCLUDED_OLEHANDLER_HXX
31 #define INCLUDED_OLEHANDLER_HXX
33 #ifndef INCLUDED_WRITERFILTERDLLAPI_H
34 #include <WriterFilterDllApi.hxx>
35 #endif
36 #include <resourcemodel/WW8ResourceModel.hxx>
37 #include <boost/shared_ptr.hpp>
38 #include <com/sun/star/awt/Size.hpp>
39 #include <com/sun/star/awt/Point.hpp>
41 #include <com/sun/star/drawing/XShape.hpp>
43 namespace com{ namespace sun{ namespace star{
44 namespace embed{
45 class XEmbeddedObject;
47 namespace graphic{
48 class XGraphic;
50 namespace io{
51 class XInputStream;
53 namespace text{
54 class XTextDocument;
56 namespace uno{
57 class XComponentContext;
59 }}}
60 namespace writerfilter {
61 namespace dmapper
63 //class PropertyMap;
64 /** Handler for OLE objects
66 class WRITERFILTER_DLLPRIVATE OLEHandler : public Properties
68 ::rtl::OUString m_sObjectType;
69 ::rtl::OUString m_sProgId;
70 ::rtl::OUString m_sShapeId;
71 ::rtl::OUString m_sDrawAspect;
72 ::rtl::OUString m_sObjectId;
73 ::rtl::OUString m_sr_id;
75 sal_Int32 m_nDxaOrig;
76 sal_Int32 m_nDyaOrig;
77 sal_Int32 m_nWrapMode;
79 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xShape;
81 ::com::sun::star::awt::Size m_aShapeSize;
82 ::com::sun::star::awt::Point m_aShapePosition;
84 ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > m_xReplacement;
86 ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream;
87 public:
88 OLEHandler();
89 virtual ~OLEHandler();
91 // Properties
92 virtual void attribute(Id Name, Value & val);
93 virtual void sprm(Sprm & sprm);
95 inline ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > getShape( ) { return m_xShape; };
97 inline bool isOLEObject( ) { return m_xInputStream.is( ); };
99 ::rtl::OUString copyOLEOStream( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument > xTextDocument );
101 ::com::sun::star::awt::Size getSize() const { return m_aShapeSize;}
102 ::com::sun::star::awt::Point getPosition() const { return m_aShapePosition;}
103 ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >
104 getReplacement() const { return m_xReplacement; }
107 typedef boost::shared_ptr< OLEHandler > OLEHandlerPtr;
110 #endif //