1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: OLEHandler.hxx,v $
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>
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 namespace com
{ namespace sun
{ namespace star
{
43 class XEmbeddedObject
;
55 class XComponentContext
;
58 namespace writerfilter
{
62 /** Handler for OLE objects
64 class WRITERFILTER_DLLPRIVATE OLEHandler
: public Properties
66 ::rtl::OUString m_sObjectType
;
67 ::rtl::OUString m_sProgId
;
68 ::rtl::OUString m_sShapeId
;
69 ::rtl::OUString m_sDrawAspect
;
70 ::rtl::OUString m_sObjectId
;
71 ::rtl::OUString m_sr_id
;
76 ::com::sun::star::awt::Size m_aShapeSize
;
77 ::com::sun::star::awt::Point m_aShapePosition
;
79 ::com::sun::star::uno::Reference
< ::com::sun::star::graphic::XGraphic
> m_xReplacement
;
81 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStream
> m_xInputStream
;
84 virtual ~OLEHandler();
87 virtual void attribute(Id Name
, Value
& val
);
88 virtual void sprm(Sprm
& sprm
);
90 ::rtl::OUString
copyOLEOStream( ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextDocument
> xTextDocument
);
92 ::com::sun::star::awt::Size
getSize() const { return m_aShapeSize
;}
93 ::com::sun::star::awt::Point
getPosition() const { return m_aShapePosition
;}
94 ::com::sun::star::uno::Reference
< ::com::sun::star::graphic::XGraphic
>
95 getReplacement() const { return m_xReplacement
; }
98 typedef boost::shared_ptr
< OLEHandler
> OLEHandlerPtr
;