LibreOffice Module canvas (master) 1
ogl_textlayout.hxx
Go to the documentation of this file.
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#pragma once
11
13
14#include <com/sun/star/rendering/XTextLayout.hpp>
15
16#include "ogl_canvasfont.hxx"
17
18
19/* Definition of TextLayout class */
20
21namespace oglcanvas
22{
23 typedef ::comphelper::WeakComponentImplHelper< css::rendering::XTextLayout > TextLayoutBaseT;
24
26 {
27 public:
28 TextLayout( css::rendering::StringContext aText,
29 sal_Int8 nDirection,
30 sal_Int64 nRandomSeed,
31 CanvasFont::ImplRef rFont );
32
34 TextLayout(const TextLayout&) = delete;
35 const TextLayout& operator=(const TextLayout&) = delete;
36
38 virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
39
40 // XTextLayout
41 virtual css::uno::Sequence< css::uno::Reference< css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) override;
42 virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) override;
43 virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) override;
44 virtual css::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) override;
45 virtual void SAL_CALL applyLogicalAdvancements( const css::uno::Sequence< double >& aAdvancements ) override;
46 virtual css::uno::Sequence< sal_Bool > SAL_CALL queryKashidaPositions( ) override;
47 virtual void SAL_CALL applyKashidaPositions( const css::uno::Sequence< sal_Bool >& aPositions ) override;
48 virtual css::geometry::RealRectangle2D SAL_CALL queryTextBounds( ) override;
49 virtual double SAL_CALL justify( double nSize ) override;
50 virtual double SAL_CALL combinedJustify( const css::uno::Sequence< css::uno::Reference< css::rendering::XTextLayout > >& aNextLayouts, double nSize ) override;
51 virtual css::rendering::TextHit SAL_CALL getTextHit( const css::geometry::RealPoint2D& aHitPoint ) override;
52 virtual css::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) override;
53 virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) override;
54 virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
55 virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
56 virtual double SAL_CALL getBaselineOffset( ) override;
57 virtual sal_Int8 SAL_CALL getMainTextDirection( ) override;
58 virtual css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL getFont( ) override;
59 virtual css::rendering::StringContext SAL_CALL getText( ) override;
60
61 private:
62 css::rendering::StringContext maText;
63 css::uno::Sequence< double > maLogicalAdvancements;
64 css::uno::Sequence< sal_Bool > maKashidaPositions;
67 };
68
69}
70
71/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual double SAL_CALL combinedJustify(const css::uno::Sequence< css::uno::Reference< css::rendering::XTextLayout > > &aNextLayouts, double nSize) override
TextLayout(css::rendering::StringContext aText, sal_Int8 nDirection, sal_Int64 nRandomSeed, CanvasFont::ImplRef rFont)
virtual css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL getFont() override
css::uno::Sequence< double > maLogicalAdvancements
virtual sal_Int32 SAL_CALL getNextInsertionIndex(sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures) override
virtual sal_Int8 SAL_CALL getMainTextDirection() override
CanvasFont::ImplRef mpFont
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryInkMeasures() override
virtual void disposing(std::unique_lock< std::mutex > &rGuard) override
Dispose all internal references.
virtual css::uno::Sequence< double > SAL_CALL queryLogicalAdvancements() override
virtual double SAL_CALL getBaselineOffset() override
css::rendering::StringContext maText
const TextLayout & operator=(const TextLayout &)=delete
virtual void SAL_CALL applyKashidaPositions(const css::uno::Sequence< sal_Bool > &aPositions) override
virtual css::rendering::Caret SAL_CALL getCaret(sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures) override
virtual css::rendering::StringContext SAL_CALL getText() override
css::uno::Sequence< sal_Bool > maKashidaPositions
virtual css::uno::Sequence< css::uno::Reference< css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes() override
virtual css::geometry::RealRectangle2D SAL_CALL queryTextBounds() override
virtual css::rendering::TextHit SAL_CALL getTextHit(const css::geometry::RealPoint2D &aHitPoint) override
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
TextLayout(const TextLayout &)=delete
make noncopyable
virtual double SAL_CALL justify(double nSize) override
virtual css::uno::Sequence< sal_Bool > SAL_CALL queryKashidaPositions() override
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryMeasures() override
virtual void SAL_CALL applyLogicalAdvancements(const css::uno::Sequence< double > &aAdvancements) override
::comphelper::WeakComponentImplHelper< css::rendering::XTextLayout > TextLayoutBaseT
unsigned char sal_Bool
signed char sal_Int8