summaryrefslogtreecommitdiff
path: root/canvas/source/directx/dx_textlayout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source/directx/dx_textlayout.cxx')
-rw-r--r--canvas/source/directx/dx_textlayout.cxx27
1 files changed, 24 insertions, 3 deletions
diff --git a/canvas/source/directx/dx_textlayout.cxx b/canvas/source/directx/dx_textlayout.cxx
index 5e69f70df624..e64dde596693 100644
--- a/canvas/source/directx/dx_textlayout.cxx
+++ b/canvas/source/directx/dx_textlayout.cxx
@@ -93,6 +93,26 @@ namespace dxcanvas
maLogicalAdvancements = aAdvancements;
}
+ uno::Sequence< sal_Bool > SAL_CALL TextLayout::queryKashidaPositions( )
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ return maKashidaPositions;
+ }
+
+ void SAL_CALL TextLayout::applyKashidaPositions( const uno::Sequence< sal_Bool >& aPositions )
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if( aPositions.hasElements() && aPositions.getLength() != maText.Length )
+ {
+ SAL_WARN("canvas.directx", "TextLayout::applyKashidaPositions(): mismatching number of positions" );
+ throw lang::IllegalArgumentException("mismatching number of positions", getXWeak(), 1);
+ }
+
+ maKashidaPositions = aPositions;
+ }
+
geometry::RealRectangle2D SAL_CALL TextLayout::queryTextBounds( )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -105,7 +125,7 @@ namespace dxcanvas
aDrawHelper.queryTextBounds(
maText,
maLogicalAdvancements,
- mpFont.get(),
+ mpFont,
mpFont->getFontMatrix()));
return aBounds;
@@ -176,7 +196,7 @@ namespace dxcanvas
{
::osl::MutexGuard aGuard( m_aMutex );
- return mpFont.get();
+ return mpFont;
}
rendering::StringContext SAL_CALL TextLayout::getText( )
@@ -205,7 +225,8 @@ namespace dxcanvas
rOutputOffset,
maText,
maLogicalAdvancements,
- mpFont.get(),
+ maKashidaPositions,
+ mpFont,
mpFont->getFontMatrix(),
bAlphaSurface,
mnTextDirection != 0);