LCOV - code coverage report
Current view: top level - writerfilter/source/dmapper - TablePositionHandler.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 20 20 100.0 %
Date: 2015-06-13 12:38:46 Functions: 10 10 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             : #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEPOSITIONHANDLER_HXX
      10             : #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEPOSITIONHANDLER_HXX
      11             : 
      12             : #include "LoggedResources.hxx"
      13             : #include <memory>
      14             : #include <com/sun/star/beans/PropertyValue.hpp>
      15             : 
      16             : namespace writerfilter
      17             : {
      18             : namespace dmapper
      19             : {
      20             : 
      21             : /// Handler for floating table positioning
      22             : class TablePositionHandler
      23             :     : public LoggedProperties
      24             : {
      25             :     OUString m_aVertAnchor;
      26             :     OUString m_aYSpec;
      27             :     OUString m_aHorzAnchor;
      28             :     OUString m_aXSpec;
      29             :     sal_Int32 m_nY;
      30             :     sal_Int32 m_nX;
      31             :     sal_Int32 m_nLeftFromText;
      32             :     sal_Int32 m_nRightFromText;
      33             :     sal_Int32 m_nTopFromText;
      34             :     sal_Int32 m_nBottomFromText;
      35             : 
      36             :     // Properties
      37             :     virtual void lcl_attribute(Id Name, Value& val) SAL_OVERRIDE;
      38             :     virtual void lcl_sprm(Sprm& sprm) SAL_OVERRIDE;
      39             : 
      40             : public:
      41          43 :     sal_Int32 getY()
      42             :     {
      43          43 :         return m_nY;
      44             :     }
      45          43 :     sal_Int32 getX()
      46             :     {
      47          43 :         return m_nX;
      48             :     }
      49          43 :     sal_Int32 getLeftFromText()
      50             :     {
      51          43 :         return m_nLeftFromText;
      52             :     }
      53          43 :     sal_Int32 getRightFromText()
      54             :     {
      55          43 :         return m_nRightFromText;
      56             :     }
      57          43 :     sal_Int32 getTopFromText()
      58             :     {
      59          43 :         return m_nTopFromText;
      60             :     }
      61          43 :     sal_Int32 getBottomFromText()
      62             :     {
      63          43 :         return m_nBottomFromText;
      64             :     }
      65             : 
      66          43 :     OUString getVertAnchor()
      67             :     {
      68          43 :         return m_aVertAnchor;
      69             :     }
      70          43 :     OUString getYSpec()
      71             :     {
      72          43 :         return m_aYSpec;
      73             :     }
      74          43 :     OUString getHorzAnchor()
      75             :     {
      76          43 :         return m_aHorzAnchor;
      77             :     }
      78          43 :     OUString getXSpec()
      79             :     {
      80          43 :         return m_aXSpec;
      81             :     }
      82             : 
      83             :     TablePositionHandler();
      84             :     virtual ~TablePositionHandler();
      85             : 
      86             :     /** Compute the UNO properties for the frame containing the table based
      87             :         on the received tokens.
      88             : 
      89             :         Note that the properties will need to be adjusted with the table
      90             :         properties before actually using them.
      91             :       */
      92             :     css::uno::Sequence<css::beans::PropertyValue> getTablePosition() const;
      93             : 
      94             :     bool operator== (const TablePositionHandler& rHandler) const;
      95             : };
      96             : 
      97             : typedef std::shared_ptr<TablePositionHandler> TablePositionHandlerPtr;
      98             : } // namespace dmapper
      99             : } // namespace writerfilter
     100             : 
     101             : #endif
     102             : 
     103             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11