LCOV - code coverage report
Current view: top level - canvas/source/opengl - ogl_textlayout.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 1 0.0 %
Date: 2014-04-14 Functions: 0 2 0.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             : 
      10             : #ifndef INCLUDED_CANVAS_SOURCE_OPENGL_OGL_TEXTLAYOUT_HXX
      11             : #define INCLUDED_CANVAS_SOURCE_OPENGL_OGL_TEXTLAYOUT_HXX
      12             : 
      13             : #include <cppuhelper/compbase1.hxx>
      14             : #include <comphelper/broadcasthelper.hxx>
      15             : 
      16             : #include <com/sun/star/rendering/XTextLayout.hpp>
      17             : 
      18             : #include <basegfx/vector/b2isize.hxx>
      19             : 
      20             : #include <boost/utility.hpp>
      21             : 
      22             : #include "ogl_canvasfont.hxx"
      23             : 
      24             : 
      25             : /* Definition of TextLayout class */
      26             : 
      27             : namespace oglcanvas
      28             : {
      29             :     typedef ::cppu::WeakComponentImplHelper1< ::com::sun::star::rendering::XTextLayout > TextLayoutBaseT;
      30             : 
      31           0 :     class TextLayout : public ::comphelper::OBaseMutex,
      32             :                        public TextLayoutBaseT,
      33             :                        private ::boost::noncopyable
      34             :     {
      35             :     public:
      36             :         TextLayout( const ::com::sun::star::rendering::StringContext& aText,
      37             :                     sal_Int8                                          nDirection,
      38             :                     sal_Int64                                         nRandomSeed,
      39             :                     const CanvasFont::ImplRef&                        rFont );
      40             : 
      41             :         /// Dispose all internal references
      42             :         virtual void SAL_CALL disposing() SAL_OVERRIDE;
      43             : 
      44             :         // XTextLayout
      45             :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      46             :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryInkMeasures(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      47             :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryMeasures(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      48             :         virtual ::com::sun::star::uno::Sequence< double > SAL_CALL queryLogicalAdvancements(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      49             :         virtual void SAL_CALL applyLogicalAdvancements( const ::com::sun::star::uno::Sequence< double >& aAdvancements ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      50             :         virtual ::com::sun::star::geometry::RealRectangle2D SAL_CALL queryTextBounds(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      51             :         virtual double SAL_CALL justify( double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      52             :         virtual double SAL_CALL combinedJustify( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > >& aNextLayouts, double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      53             :         virtual ::com::sun::star::rendering::TextHit SAL_CALL getTextHit( const ::com::sun::star::geometry::RealPoint2D& aHitPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      54             :         virtual ::com::sun::star::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      55             :         virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      56             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      57             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      58             :         virtual double SAL_CALL getBaselineOffset(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      59             :         virtual sal_Int8 SAL_CALL getMainTextDirection(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      60             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL getFont(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      61             :         virtual ::com::sun::star::rendering::StringContext SAL_CALL getText(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      62             : 
      63             :         bool draw( const ::com::sun::star::rendering::ViewState&         rViewState,
      64             :                    const ::com::sun::star::rendering::RenderState&       rRenderState,
      65             :                    const ::com::sun::star::uno::Reference<
      66             :                          ::com::sun::star::rendering::XGraphicDevice >&  xGraphicDevice ) const;
      67             : 
      68             :     private:
      69             :         ::com::sun::star::rendering::StringContext maText;
      70             :         ::com::sun::star::uno::Sequence< double >  maLogicalAdvancements;
      71             :         CanvasFont::ImplRef                        mpFont;
      72             :         sal_Int8                                   mnTextDirection;
      73             :     };
      74             : 
      75             : }
      76             : 
      77             : #endif
      78             : 
      79             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10