28 mnTextDirection( nDirection )
32 void TextLayout::disposing(std::unique_lock<std::mutex>& )
38 uno::Sequence< uno::Reference< rendering::XPolyPolygon2D > > SAL_CALL TextLayout::queryTextShapes( )
41 return uno::Sequence< uno::Reference< rendering::XPolyPolygon2D > >();
44 uno::Sequence< geometry::RealRectangle2D > SAL_CALL TextLayout::queryInkMeasures( )
47 return uno::Sequence< geometry::RealRectangle2D >();
50 uno::Sequence< geometry::RealRectangle2D > SAL_CALL TextLayout::queryMeasures( )
53 return uno::Sequence< geometry::RealRectangle2D >();
56 uno::Sequence< double > SAL_CALL TextLayout::queryLogicalAdvancements( )
60 return maLogicalAdvancements;
63 void SAL_CALL TextLayout::applyLogicalAdvancements(
const uno::Sequence< double >& aAdvancements )
65 std::unique_lock aGuard( m_aMutex );
67 if( aAdvancements.getLength() !=
maText.Length )
69 SAL_INFO(
"canvas.ogl",
"TextLayout::applyLogicalAdvancements(): mismatching number of advancements");
70 throw lang::IllegalArgumentException();
73 maLogicalAdvancements = aAdvancements;
76 uno::Sequence< sal_Bool > SAL_CALL TextLayout::queryKashidaPositions( )
80 return maKashidaPositions;
83 void SAL_CALL TextLayout::applyKashidaPositions(
const uno::Sequence< sal_Bool >& aPositions )
85 std::unique_lock aGuard( m_aMutex );
87 if( aPositions.hasElements() && aPositions.getLength() !=
maText.Length )
89 SAL_WARN(
"canvas.ogl",
"TextLayout::applyKashidaPositions(): mismatching number of positions" );
90 throw lang::IllegalArgumentException(
"mismatching number of positions", getXWeak(), 1);
93 maKashidaPositions = aPositions;
96 geometry::RealRectangle2D SAL_CALL TextLayout::queryTextBounds( )
101 "TextLayout::queryTextBounds(): invalid font" );
105 const rendering::FontRequest& rFontRequest(
mpFont->getFontRequest() );
106 const double nFontSize(
std::max( rFontRequest.CellSize,
107 rFontRequest.ReferenceAdvancement ) );
108 if( maLogicalAdvancements.hasElements() )
110 return geometry::RealRectangle2D( 0, -nFontSize/2,
111 maLogicalAdvancements[ maLogicalAdvancements.getLength()-1 ],
116 return geometry::RealRectangle2D( 0, -nFontSize/2,
117 nFontSize *
maText.Length,
122 double SAL_CALL TextLayout::justify(
double )
128 double SAL_CALL TextLayout::combinedJustify(
const uno::Sequence< uno::Reference< rendering::XTextLayout > >& ,
135 rendering::TextHit SAL_CALL TextLayout::getTextHit(
const geometry::RealPoint2D& )
138 return rendering::TextHit();
141 rendering::Caret SAL_CALL TextLayout::getCaret( sal_Int32 ,
145 return rendering::Caret();
148 sal_Int32 SAL_CALL TextLayout::getNextInsertionIndex( sal_Int32 ,
156 uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryVisualHighlighting( sal_Int32 ,
160 return uno::Reference< rendering::XPolyPolygon2D >();
163 uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryLogicalHighlighting( sal_Int32 ,
167 return uno::Reference< rendering::XPolyPolygon2D >();
170 double SAL_CALL TextLayout::getBaselineOffset( )
176 sal_Int8 SAL_CALL TextLayout::getMainTextDirection( )
178 std::unique_lock aGuard(
m_aMutex );
180 return mnTextDirection;
183 uno::Reference< rendering::XCanvasFont > SAL_CALL TextLayout::getFont( )
185 std::unique_lock aGuard(
m_aMutex );
190 rendering::StringContext SAL_CALL TextLayout::getText( )
192 std::unique_lock aGuard(
m_aMutex );
rtl::Reference< CanvasFont > ImplRef
TextLayout(css::rendering::StringContext aText, sal_Int8 nDirection, sal_Int64 nRandomSeed, CanvasFont::ImplRef rFont)
#define ENSURE_OR_THROW(c, m)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
std::optional< vcl::Font > mpFont