diff -uNr old/cppcanvas/source/mtfrenderer/textaction.cxx new/cppcanvas/source/mtfrenderer/textaction.cxx --- old/cppcanvas/source/mtfrenderer/textaction.cxx 2008-01-07 15:09:19.359375000 +0800 +++ new/cppcanvas/source/mtfrenderer/textaction.cxx 2008-01-07 15:09:02.406250000 +0800 @@ -1448,8 +1448,9 @@ rendering::RenderState aLocalState( maState ); uno::Reference< rendering::XTextLayout > xTextLayout( mxTextLayout ); + geometry::RealRectangle2D TextBounds = xTextLayout->queryTextBounds(); double nMinPos(0.0); - double nMaxPos(0.0); + double nMaxPos( TextBounds.X2 - TextBounds.X1); createSubsetLayout( xTextLayout, aLocalState, @@ -1517,9 +1518,10 @@ rendering::RenderState aLocalState( maState ); uno::Reference< rendering::XTextLayout > xTextLayout( mxTextLayout ); + geometry::RealRectangle2D TextBounds = xTextLayout->queryTextBounds(); double nMinPos(0.0); - double nMaxPos(0.0); + double nMaxPos( TextBounds.X2 - TextBounds.X1); createSubsetLayout( xTextLayout, aLocalState,