summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d/textlayoutdevice.cxx
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2007-09-26 10:36:58 +0000
committerArmin Weiss <aw@openoffice.org>2007-09-26 10:36:58 +0000
commit9260ca65470b0e7e8310772865023addaa393ca8 (patch)
tree17931f5b22df163d8cf1dec2ac4a28c195995c53 /drawinglayer/source/primitive2d/textlayoutdevice.cxx
parent553365ad85673d3d3f42bc32d817a387fba1a85e (diff)
#i73860# text decomposition extended
Diffstat (limited to 'drawinglayer/source/primitive2d/textlayoutdevice.cxx')
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx29
1 files changed, 20 insertions, 9 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 769f7cffea1e..c8af9e53f8b3 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: textlayoutdevice.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: hdu $ $Date: 2007-02-14 14:53:01 $
+ * last change: $Author: aw $ $Date: 2007-09-26 11:36:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -210,23 +210,34 @@ namespace drawinglayer
return mrDevice.GetTextHeight();
}
- double TextLayouterDevice::getTextWidth(const String& rText, xub_StrLen nIndex, xub_StrLen nLength) const
+ double TextLayouterDevice::getTextWidth(const rtl::OUString& rText, sal_Int32 nIndex, sal_Int32 nLength) const
{
- return mrDevice.GetTextWidth(rText, nIndex, nLength);
+ return mrDevice.GetTextWidth(rText, static_cast< sal_uInt16 >(nIndex), static_cast< sal_uInt16 >(nLength));
}
- bool TextLayouterDevice::getTextOutlines( basegfx::B2DPolyPolygonVector& rB2DPolyPolyVector, const String& rText, xub_StrLen nIndex, xub_StrLen nLength, const ::std::vector< sal_Int32 >& rDXArray)
+ bool TextLayouterDevice::getTextOutlines( basegfx::B2DPolyPolygonVector& rB2DPolyPolyVector, const rtl::OUString& rText, sal_Int32 nIndex, sal_Int32 nLength, const ::std::vector< sal_Int32 >& rDXArray)
{
const sal_Int32* pDXArray = rDXArray.size() ? &rDXArray[0] : NULL;
- return mrDevice.GetTextOutlines( rB2DPolyPolyVector, rText, nIndex, nIndex, nLength, true, 0, pDXArray);
+ return mrDevice.GetTextOutlines(
+ rB2DPolyPolyVector,
+ rText,
+ static_cast< sal_uInt16 >(nIndex),
+ static_cast< sal_uInt16 >(nIndex),
+ static_cast< sal_uInt16 >(nLength),
+ true, 0, pDXArray);
}
- basegfx::B2DRange TextLayouterDevice::getTextBoundRect(const String& rText, xub_StrLen nIndex, xub_StrLen nLength) const
+ basegfx::B2DRange TextLayouterDevice::getTextBoundRect(const rtl::OUString& rText, sal_Int32 nIndex, sal_Int32 nLength) const
{
- if(rText.Len() && nLength)
+ if(rText.getLength() && nLength)
{
Rectangle aRect;
- mrDevice.GetTextBoundRect(aRect, rText, nIndex, nIndex, nLength);
+ mrDevice.GetTextBoundRect(
+ aRect,
+ rText,
+ static_cast< sal_uInt16 >(nIndex),
+ static_cast< sal_uInt16 >(nIndex),
+ static_cast< sal_uInt16 >(nLength));
return basegfx::B2DRange(aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom());
}