1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_OLEHANDLER_HXX
20 #define INCLUDED_OLEHANDLER_HXX
22 #include <WriterFilterDllApi.hxx>
23 #include <resourcemodel/LoggedResources.hxx>
24 #include <boost/shared_ptr.hpp>
25 #include <com/sun/star/awt/Size.hpp>
26 #include <com/sun/star/awt/Point.hpp>
28 #include <com/sun/star/drawing/XShape.hpp>
30 namespace com
{ namespace sun
{ namespace star
{
41 namespace writerfilter
{
44 /** Handler for OLE objects
46 class WRITERFILTER_DLLPRIVATE OLEHandler
: public LoggedProperties
48 OUString m_sObjectType
;
51 OUString m_sDrawAspect
;
57 sal_Int32 m_nWrapMode
;
59 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> m_xShape
;
61 ::com::sun::star::awt::Size m_aShapeSize
;
62 ::com::sun::star::awt::Point m_aShapePosition
;
64 ::com::sun::star::uno::Reference
< ::com::sun::star::graphic::XGraphic
> m_xReplacement
;
66 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStream
> m_xInputStream
;
69 virtual void lcl_attribute(Id Name
, Value
& val
);
70 virtual void lcl_sprm(Sprm
& sprm
);
74 virtual ~OLEHandler();
76 inline ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> getShape( ) { return m_xShape
; };
78 inline bool isOLEObject( ) { return m_xInputStream
.is( ); };
80 OUString
copyOLEOStream( ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextDocument
> xTextDocument
);
82 ::com::sun::star::awt::Size
getSize() const { return m_aShapeSize
;}
83 ::com::sun::star::awt::Point
getPosition() const { return m_aShapePosition
;}
84 ::com::sun::star::uno::Reference
< ::com::sun::star::graphic::XGraphic
>
85 getReplacement() const { return m_xReplacement
; }
88 typedef boost::shared_ptr
< OLEHandler
> OLEHandlerPtr
;
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */