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/.
10 #ifndef INCLUDED_CANVAS_SOURCE_OPENGL_OGL_CANVASFONT_HXX
11 #define INCLUDED_CANVAS_SOURCE_OPENGL_OGL_CANVASFONT_HXX
13 #include <cppuhelper/compbase1.hxx>
14 #include <comphelper/broadcasthelper.hxx>
16 #include <com/sun/star/rendering/XCanvas.hpp>
17 #include <com/sun/star/rendering/XCanvasFont.hpp>
19 #include <rtl/ref.hxx>
21 #include <boost/shared_ptr.hpp>
22 #include <boost/utility.hpp>
25 /* Definition of CanvasFont class */
31 typedef ::cppu::WeakComponentImplHelper1
< ::com::sun::star::rendering::XCanvasFont
> CanvasFontBaseT
;
33 class CanvasFont
: public ::comphelper::OBaseMutex
,
34 public CanvasFontBaseT
,
35 private ::boost::noncopyable
38 typedef rtl::Reference
<CanvasFont
> ImplRef
;
40 CanvasFont( const ::com::sun::star::rendering::FontRequest
& fontRequest
,
41 const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& extraFontProperties
,
42 const ::com::sun::star::geometry::Matrix2D
& fontMatrix
);
44 /// Dispose all internal references
45 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
48 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::rendering::XTextLayout
> SAL_CALL
createTextLayout( const ::com::sun::star::rendering::StringContext
& aText
, sal_Int8 nDirection
, sal_Int64 nRandomSeed
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
49 virtual ::com::sun::star::rendering::FontRequest SAL_CALL
getFontRequest( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
50 virtual ::com::sun::star::rendering::FontMetrics SAL_CALL
getFontMetrics( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
51 virtual ::com::sun::star::uno::Sequence
< double > SAL_CALL
getAvailableSizes( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
52 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
getExtraFontProperties( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
54 const ::com::sun::star::geometry::Matrix2D
& getFontMatrix() const { return maFontMatrix
; }
57 ::com::sun::star::rendering::FontRequest maFontRequest
;
58 ::com::sun::star::geometry::Matrix2D maFontMatrix
;
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */