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 #include <com/sun/star/drawing/XShape.hpp>
43 namespace com
{ namespace sun
{ namespace star
{
45 class XEmbeddedObject
;
57 class XComponentContext
;
60 namespace writerfilter
{
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
;
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
;
89 virtual ~OLEHandler();
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
;