summaryrefslogtreecommitdiff
path: root/vcl/source/text/textlayout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/text/textlayout.cxx')
-rw-r--r--vcl/source/text/textlayout.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/text/textlayout.cxx b/vcl/source/text/textlayout.cxx
index d43549a589d3..5621a9d4c1f6 100644
--- a/vcl/source/text/textlayout.cxx
+++ b/vcl/source/text/textlayout.cxx
@@ -486,7 +486,8 @@ namespace vcl
tools::Long DefaultTextLayout::GetTextArray( const OUString& _rText, KernArray* _pDXArray,
sal_Int32 _nStartIndex, sal_Int32 _nLength, bool bCaret ) const
{
- return basegfx::fround<tools::Long>(m_rTargetDevice.GetTextArray( _rText, _pDXArray, _nStartIndex, _nLength, bCaret ));
+ return basegfx::fround<tools::Long>(
+ m_rTargetDevice.GetTextArray(_rText, _pDXArray, _nStartIndex, _nLength, bCaret).nWidth);
}
sal_Int32 DefaultTextLayout::GetTextBreak( const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
@@ -594,7 +595,9 @@ namespace vcl
return 0;
// retrieve the character widths from the reference device
- tools::Long nTextWidth = basegfx::fround<tools::Long>(m_rReferenceDevice.GetTextArray( _rText, _pDXAry, _nStartIndex, _nLength, bCaret ));
+ tools::Long nTextWidth = basegfx::fround<tools::Long>(
+ m_rReferenceDevice.GetTextArray(_rText, _pDXAry, _nStartIndex, _nLength, bCaret)
+ .nWidth);
#if OSL_DEBUG_LEVEL > 1
if ( _pDXAry )
{