diff options
Diffstat (limited to 'toolkit/source/awt/vclxfont.cxx')
-rw-r--r-- | toolkit/source/awt/vclxfont.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx index 14174f25b5d7..139defbc1af4 100644 --- a/toolkit/source/awt/vclxfont.cxx +++ b/toolkit/source/awt/vclxfont.cxx @@ -176,8 +176,13 @@ sal_Int32 VCLXFont::getStringWidthArray( const OUString& str, ::com::sun::star:: { Font aOldFont = pOutDev->GetFont(); pOutDev->SetFont( maFont ); + long* pDXA = (long*)alloca(str.getLength() * sizeof(long)); + nRet = pOutDev->GetTextArray( str, pDXA ); rDXArray = ::com::sun::star::uno::Sequence<sal_Int32>( str.getLength() ); - nRet = pOutDev->GetTextArray( str, rDXArray.getArray() ); + for(int i = 0; i < str.getLength(); i++) + { + rDXArray[i] = pDXA[i]; + } pOutDev->SetFont( aOldFont ); } return nRet; |