1. mst
  2. ooo340

Commits

Herbert Duerr [hdu]  committed d882df0

#i108584# workaround unexpected ATSUBreakLine error result

  • Participants
  • Parent commits c2da1b0
  • Branches default

Comments (0)

Files changed (1)

File vcl/aqua/source/gdi/salatslayout.cxx

View file
 
 	// initial measurement of text break position
 	UniCharArrayOffset nBreakPos = mnMinCharPos;
-	ATSUTextMeasurement nATSUMaxWidth = Vcl2Fixed( nPixelWidth ); 
+	const ATSUTextMeasurement nATSUMaxWidth = Vcl2Fixed( nPixelWidth ); 
 	if( nATSUMaxWidth <= 0xFFFF ) // #i108584# avoid ATSU rejecting the parameter
 		return mnMinCharPos;      //           or do ATSUMaxWidth=0x10000;
 	OSStatus eStatus = ATSUBreakLine( maATSULayout, mnMinCharPos,
 	if( eStatus != noErr )
 		return nBreakPos;
 	const ATSUTextMeasurement nATSURemWidth = nATSUMaxWidth - (nRight - nLeft);
-	if( nATSURemWidth <= 0 )
+	if( nATSURemWidth <= 0xFFFF ) // #i108584# avoid ATSU rejecting the parameter
 		return nBreakPos;
 	UniCharArrayOffset nBreakPosInWord = nBreakPos;
 	eStatus = ATSUBreakLine( maATSULayout, nBreakPos, nATSURemWidth, false, &nBreakPosInWord );