LCOV - code coverage report
Current view: top level - writerfilter/source/dmapper - OLEHandler.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 4 4 100.0 %
Date: 2014-04-11 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : #ifndef INCLUDED_OLEHANDLER_HXX
      20             : #define INCLUDED_OLEHANDLER_HXX
      21             : 
      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>
      27             : 
      28             : #include <com/sun/star/drawing/XShape.hpp>
      29             : 
      30             : namespace com{ namespace sun{ namespace star{
      31             :     namespace graphic{
      32             :         class XGraphic;
      33             :     }
      34             :     namespace io{
      35             :         class XInputStream;
      36             :     }
      37             :     namespace text{
      38             :         class XTextDocument;
      39             :     }
      40             : }}}
      41             : namespace writerfilter {
      42             : namespace dmapper
      43             : {
      44             : /** Handler for OLE objects
      45             :  */
      46             : class OLEHandler : public LoggedProperties
      47             : {
      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;
      54             : 
      55             :     sal_Int32                   m_nDxaOrig;
      56             :     sal_Int32                   m_nDyaOrig;
      57             :     sal_Int32                   m_nWrapMode;
      58             : 
      59             :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xShape;
      60             : 
      61             :     ::com::sun::star::awt::Size m_aShapeSize;
      62             :     ::com::sun::star::awt::Point m_aShapePosition;
      63             : 
      64             :     ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > m_xReplacement;
      65             : 
      66             :     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream;
      67             : 
      68             :     // Properties
      69             :     virtual void lcl_attribute(Id Name, Value & val) SAL_OVERRIDE;
      70             :     virtual void lcl_sprm(Sprm & sprm) SAL_OVERRIDE;
      71             : 
      72             :     // Interoperability
      73             :     virtual void saveInteropProperties( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument > xTextDocument,
      74             :                                         const OUString& sObjectName );
      75             : 
      76             : public:
      77             :     OLEHandler();
      78             :     virtual ~OLEHandler();
      79             : 
      80          22 :     inline ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > getShape( ) { return m_xShape; };
      81             : 
      82         169 :     inline bool isOLEObject( ) { return m_xInputStream.is( ); };
      83             : 
      84             :     OUString copyOLEOStream( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument > xTextDocument );
      85             : 
      86          22 :     ::com::sun::star::awt::Size     getSize() const { return m_aShapeSize;}
      87             :     ::com::sun::star::awt::Point    getPosition() const { return m_aShapePosition;}
      88             :     ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >
      89          22 :                                     getReplacement() const { return m_xReplacement; }
      90             : 
      91             : };
      92             : typedef boost::shared_ptr< OLEHandler >  OLEHandlerPtr;
      93             : }}
      94             : 
      95             : #endif
      96             : 
      97             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10