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/.
12 #include <cppuhelper/compbase.hxx>
13 #include <cppuhelper/basemutex.hxx>
15 #include <com/sun/star/rendering/XCanvasFont.hpp>
16 #include <com/sun/star/geometry/Matrix2D.hpp>
18 #include <rtl/ref.hxx>
21 /* Definition of CanvasFont class */
27 typedef ::cppu::WeakComponentImplHelper
< css::rendering::XCanvasFont
> CanvasFontBaseT
;
29 class CanvasFont
: public ::cppu::BaseMutex
,
30 public CanvasFontBaseT
33 typedef rtl::Reference
<CanvasFont
> ImplRef
;
36 CanvasFont(const CanvasFont
&) = delete;
37 const CanvasFont
& operator=(const CanvasFont
&) = delete;
39 CanvasFont( const css::rendering::FontRequest
& fontRequest
,
40 const css::uno::Sequence
< css::beans::PropertyValue
>& extraFontProperties
,
41 const css::geometry::Matrix2D
& fontMatrix
);
44 virtual css::uno::Reference
< css::rendering::XTextLayout
> SAL_CALL
createTextLayout( const css::rendering::StringContext
& aText
, sal_Int8 nDirection
, sal_Int64 nRandomSeed
) override
;
45 virtual css::rendering::FontRequest SAL_CALL
getFontRequest( ) override
;
46 virtual css::rendering::FontMetrics SAL_CALL
getFontMetrics( ) override
;
47 virtual css::uno::Sequence
< double > SAL_CALL
getAvailableSizes( ) override
;
48 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getExtraFontProperties( ) override
;
50 const css::geometry::Matrix2D
& getFontMatrix() const { return maFontMatrix
; }
52 sal_uInt32
getEmphasisMark() const { return mnEmphasisMark
; }
55 css::rendering::FontRequest maFontRequest
;
56 sal_uInt32 mnEmphasisMark
;
57 css::geometry::Matrix2D maFontMatrix
;
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */