Simplify a bit
[LibreOffice.git] / canvas / source / opengl / ogl_canvasfont.cxx
blob43a9d860b5ca8fc4fb3a72a902adbff3aaf85d39
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #include <sal/config.h>
12 #include <com/sun/star/rendering/FontMetrics.hpp>
13 #include <canvas/canvastools.hxx>
14 #include <utility>
16 #include "ogl_canvasfont.hxx"
17 #include "ogl_textlayout.hxx"
19 using namespace ::com::sun::star;
21 namespace oglcanvas
23 CanvasFont::CanvasFont( rendering::FontRequest aFontRequest,
24 const uno::Sequence< beans::PropertyValue >& extraFontProperties,
25 const geometry::Matrix2D& fontMatrix ) :
26 maFontRequest(std::move( aFontRequest )),
27 mnEmphasisMark(0),
28 maFontMatrix( fontMatrix )
30 ::canvas::tools::extractExtraFontProperties(extraFontProperties, mnEmphasisMark);
33 uno::Reference< rendering::XTextLayout > SAL_CALL CanvasFont::createTextLayout( const rendering::StringContext& aText,
34 sal_Int8 nDirection,
35 sal_Int64 nRandomSeed )
37 std::unique_lock aGuard( m_aMutex );
39 return new TextLayout( aText, nDirection, nRandomSeed, ImplRef( this ) );
42 uno::Sequence< double > SAL_CALL CanvasFont::getAvailableSizes( )
44 // TODO
45 return uno::Sequence< double >();
48 uno::Sequence< beans::PropertyValue > SAL_CALL CanvasFont::getExtraFontProperties( )
50 // TODO
51 return uno::Sequence< beans::PropertyValue >();
54 rendering::FontRequest SAL_CALL CanvasFont::getFontRequest( )
56 return maFontRequest;
59 rendering::FontMetrics SAL_CALL CanvasFont::getFontMetrics( )
61 // TODO
62 return rendering::FontMetrics();
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */