Bump version to 4.1-6
[LibreOffice.git] / writerfilter / source / dmapper / OLEHandler.hxx
blob63e9207819825e597ea76c58485cef1073d9aa44
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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{
31 namespace graphic{
32 class XGraphic;
34 namespace io{
35 class XInputStream;
37 namespace text{
38 class XTextDocument;
40 }}}
41 namespace writerfilter {
42 namespace dmapper
44 /** Handler for OLE objects
46 class WRITERFILTER_DLLPRIVATE OLEHandler : public LoggedProperties
48 OUString m_sObjectType;
49 OUString m_sProgId;
50 OUString m_sShapeId;
51 OUString m_sDrawAspect;
52 OUString m_sObjectId;
53 OUString m_sr_id;
55 sal_Int32 m_nDxaOrig;
56 sal_Int32 m_nDyaOrig;
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;
68 // Properties
69 virtual void lcl_attribute(Id Name, Value & val);
70 virtual void lcl_sprm(Sprm & sprm);
72 public:
73 OLEHandler();
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;
91 #endif //
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */