diff options
-rw-r--r-- | editeng/source/accessibility/AccessibleStringWrap.cxx | 4 | ||||
-rw-r--r-- | editeng/source/uno/unoedprx.cxx | 10 | ||||
-rw-r--r-- | include/editeng/AccessibleStringWrap.hxx | 2 |
3 files changed, 6 insertions, 10 deletions
diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx index d42b012a06bd..b923d39bf6d2 100644 --- a/editeng/source/accessibility/AccessibleStringWrap.cxx +++ b/editeng/source/accessibility/AccessibleStringWrap.cxx @@ -38,7 +38,7 @@ AccessibleStringWrap::AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, { } -sal_Bool AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ) +void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ) { DBG_ASSERT(nIndex >= 0 && nIndex <= USHRT_MAX, "SvxAccessibleStringWrap::GetCharacterBounds: index value overflow"); @@ -70,8 +70,6 @@ sal_Bool AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect = Rectangle( Point(-rRect.Top(), rRect.Left()), Point(-rRect.Bottom(), rRect.Right())); } - - return sal_True; } sal_Int32 AccessibleStringWrap::GetIndexAtPoint( const Point& rPoint ) diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 1210018325ab..00b155d09a46 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -749,8 +749,8 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI { AccessibleStringWrap aStringWrap( *pOutDev, aBulletInfo.aFont, aBulletInfo.aText ); - if( aStringWrap.GetCharacterBounds( aIndex.GetBulletOffset(), aRect ) ) - aRect.Move( aBulletInfo.aBounds.Left(), aBulletInfo.aBounds.Top() ); + aStringWrap.GetCharacterBounds( aIndex.GetBulletOffset(), aRect ); + aRect.Move( aBulletInfo.aBounds.Left(), aBulletInfo.aBounds.Top() ); } } else @@ -773,10 +773,8 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI Rectangle aStartRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() ); - if( !aStringWrap.GetCharacterBounds( aIndex.GetFieldOffset(), aRect ) ) - aRect = aStartRect; - else - aRect.Move( aStartRect.Left(), aStartRect.Top() ); + aStringWrap.GetCharacterBounds( aIndex.GetFieldOffset(), aRect ); + aRect.Move( aStartRect.Left(), aStartRect.Top() ); } } } diff --git a/include/editeng/AccessibleStringWrap.hxx b/include/editeng/AccessibleStringWrap.hxx index 50cf379589bb..3936436489a1 100644 --- a/include/editeng/AccessibleStringWrap.hxx +++ b/include/editeng/AccessibleStringWrap.hxx @@ -41,7 +41,7 @@ public: EDITENG_DLLPUBLIC AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const OUString& rText ); - EDITENG_DLLPUBLIC sal_Bool GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ); + EDITENG_DLLPUBLIC void GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ); EDITENG_DLLPUBLIC sal_Int32 GetIndexAtPoint( const Point& rPoint ); private: |