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 #include "ogl_canvasfont.hxx"
11 #include "ogl_textlayout.hxx"
13 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
14 #include <com/sun/star/rendering/PanoseWeight.hpp>
17 using namespace ::com::sun::star
;
21 CanvasFont::CanvasFont( const rendering::FontRequest
& rFontRequest
,
22 const uno::Sequence
< beans::PropertyValue
>& /*extraFontProperties*/,
23 const geometry::Matrix2D
& fontMatrix
) :
24 CanvasFontBaseT( m_aMutex
),
25 maFontRequest( rFontRequest
),
26 maFontMatrix( fontMatrix
)
30 void SAL_CALL
CanvasFont::disposing()
32 ::osl::MutexGuard
aGuard( m_aMutex
);
35 uno::Reference
< rendering::XTextLayout
> SAL_CALL
CanvasFont::createTextLayout( const rendering::StringContext
& aText
,
37 sal_Int64 nRandomSeed
) throw (uno::RuntimeException
, std::exception
)
39 ::osl::MutexGuard
aGuard( m_aMutex
);
41 return new TextLayout( aText
, nDirection
, nRandomSeed
, ImplRef( this ) );
44 uno::Sequence
< double > SAL_CALL
CanvasFont::getAvailableSizes( ) throw (uno::RuntimeException
, std::exception
)
46 ::osl::MutexGuard
aGuard( m_aMutex
);
49 return uno::Sequence
< double >();
52 uno::Sequence
< beans::PropertyValue
> SAL_CALL
CanvasFont::getExtraFontProperties( ) throw (uno::RuntimeException
, std::exception
)
54 ::osl::MutexGuard
aGuard( m_aMutex
);
57 return uno::Sequence
< beans::PropertyValue
>();
60 rendering::FontRequest SAL_CALL
CanvasFont::getFontRequest( ) throw (uno::RuntimeException
, std::exception
)
62 ::osl::MutexGuard
aGuard( m_aMutex
);
67 rendering::FontMetrics SAL_CALL
CanvasFont::getFontMetrics( ) throw (uno::RuntimeException
, std::exception
)
69 ::osl::MutexGuard
aGuard( m_aMutex
);
72 return rendering::FontMetrics();
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */