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
14
15#include <com/sun/star/rendering/XTextLayout.hpp>
16
17#include "ogl_canvasfont.hxx"
18
19
20/* Definition of TextLayout class */
21
22namespace oglcanvas
23{
24 typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout > TextLayoutBaseT;
25
27 public TextLayoutBaseT
28 {
29 public:
30 TextLayout( css::rendering::StringContext aText,
31 sal_Int8 nDirection,
32 sal_Int64 nRandomSeed,
33 CanvasFont::ImplRef rFont );
34
36 TextLayout(const TextLayout&) = delete;
37 const TextLayout& operator=(const TextLayout&) = delete;
38
40 virtual void SAL_CALL disposing() override;
41
42 // XTextLayout
43 virtual css::uno::Sequence< css::uno::Reference< css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) override;
44 virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) override;
45 virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) override;
46 virtual css::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) override;
47 virtual void SAL_CALL applyLogicalAdvancements( const css::uno::Sequence< double >& aAdvancements ) 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;
66 };
67
68}
69
70/* 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 SAL_CALL disposing() 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 css::rendering::Caret SAL_CALL getCaret(sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures) override
virtual css::rendering::StringContext SAL_CALL getText() override
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< css::geometry::RealRectangle2D > SAL_CALL queryMeasures() override
virtual void SAL_CALL applyLogicalAdvancements(const css::uno::Sequence< double > &aAdvancements) override
::cppu::WeakComponentImplHelper< css::rendering::XTextLayout > TextLayoutBaseT
unsigned char sal_Bool
signed char sal_Int8