vcl: OutputDevice::GetGlyphBoundRects()'s nIndex and nBase is always the same
So keeping just nIndex is enough. Change-Id: I5d3a0e6b4a6ce1305a56cf50e7ff181a098f6412 Reviewed-on: https://gerrit.libreoffice.org/35336 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
This commit is contained in:
@@ -181,7 +181,6 @@ namespace vclcanvas
|
||||
maText.Text,
|
||||
::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
|
||||
::canvas::tools::numeric_cast<sal_uInt16>(maText.Length),
|
||||
::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
|
||||
aMetricVector))
|
||||
{
|
||||
aBoundingBoxes.realloc(aMetricVector.size());
|
||||
|
@@ -111,7 +111,7 @@ public:
|
||||
virtual void GrabTableFocus() = 0;
|
||||
|
||||
// OutputDevice
|
||||
virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) = 0;
|
||||
virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector ) = 0;
|
||||
|
||||
// Window
|
||||
virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const = 0;
|
||||
|
@@ -756,7 +756,7 @@ public:
|
||||
virtual void GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const override;
|
||||
virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const override;
|
||||
virtual OUString GetAccessibleCellText(long _nRow, sal_uInt16 _nColPos) const override;
|
||||
virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) override;
|
||||
virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector ) override;
|
||||
virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override;
|
||||
virtual void GrabFocus() override;
|
||||
virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override;
|
||||
|
@@ -229,7 +229,7 @@ public:
|
||||
virtual void GrabTableFocus() override;
|
||||
|
||||
// OutputDevice
|
||||
virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) override;
|
||||
virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector ) override;
|
||||
|
||||
// Window
|
||||
virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override;
|
||||
|
@@ -1232,7 +1232,7 @@ public:
|
||||
ImplGetEmphasisMarkStyle( const vcl::Font& rFont );
|
||||
|
||||
bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
|
||||
int nLen, int nBase, MetricVector& rVector );
|
||||
int nLen, MetricVector& rVector );
|
||||
|
||||
sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr,
|
||||
sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
|
||||
|
@@ -529,9 +529,9 @@ OUString BrowseBox::GetAccessibleCellText(long _nRow, sal_uInt16 _nColPos) const
|
||||
}
|
||||
|
||||
|
||||
bool BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
|
||||
bool BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector )
|
||||
{
|
||||
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, nBase, rVector );
|
||||
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, rVector );
|
||||
}
|
||||
|
||||
Rectangle BrowseBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
|
||||
|
@@ -1090,9 +1090,9 @@ void SvHeaderTabListBox::GrabTableFocus()
|
||||
GrabFocus();
|
||||
}
|
||||
|
||||
bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
|
||||
bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector )
|
||||
{
|
||||
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, nBase, rVector );
|
||||
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, rVector );
|
||||
}
|
||||
|
||||
Rectangle SvHeaderTabListBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
|
||||
@@ -1151,7 +1151,7 @@ sal_Int32 SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nC
|
||||
{
|
||||
OUString sText = GetAccessibleCellText( _nRow, static_cast< sal_uInt16 >( _nColumnPos ) );
|
||||
MetricVector aRects;
|
||||
if ( GetGlyphBoundRects(Point(0,0), sText, 0, sText.getLength(), 0, aRects) )
|
||||
if ( GetGlyphBoundRects(Point(0,0), sText, 0, sText.getLength(), aRects) )
|
||||
{
|
||||
for (MetricVector::iterator aIter = aRects.begin(); aIter != aRects.end(); ++aIter)
|
||||
{
|
||||
|
@@ -205,7 +205,7 @@ namespace vcl
|
||||
if ( _pVector && _pDisplayText )
|
||||
{
|
||||
MetricVector aGlyphBounds;
|
||||
m_rReferenceDevice.GetGlyphBoundRects( _rStartPoint, _rText, _nStartIndex, _nLength, _nStartIndex, aGlyphBounds );
|
||||
m_rReferenceDevice.GetGlyphBoundRects( _rStartPoint, _rText, _nStartIndex, _nLength, aGlyphBounds );
|
||||
::std::copy(
|
||||
aGlyphBounds.begin(), aGlyphBounds.end(),
|
||||
::std::insert_iterator< MetricVector > ( *_pVector, _pVector->end() ) );
|
||||
|
@@ -1465,7 +1465,7 @@ sal_Int32 OutputDevice::ValidateKashidas ( const OUString& rTxt,
|
||||
}
|
||||
|
||||
bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr,
|
||||
int nIndex, int nLen, int nBase, MetricVector& rVector )
|
||||
int nIndex, int nLen, MetricVector& rVector )
|
||||
{
|
||||
rVector.clear();
|
||||
|
||||
@@ -1480,7 +1480,7 @@ bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rSt
|
||||
Rectangle aRect;
|
||||
for( int i = 0; i < nLen; i++ )
|
||||
{
|
||||
if( !GetTextBoundRect( aRect, rStr, nBase, nIndex + i, 1 ) )
|
||||
if( !GetTextBoundRect( aRect, rStr, nIndex, nIndex + i, 1 ) )
|
||||
break;
|
||||
aRect.Move( rOrigin.X(), rOrigin.Y() );
|
||||
rVector.push_back( aRect );
|
||||
|
@@ -838,7 +838,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
|
||||
if( ! aClip.IsNull() )
|
||||
{
|
||||
MetricVector aTmp;
|
||||
GetGlyphBoundRects( rStartPt, rStr, nIndex, nLen, nIndex, aTmp );
|
||||
GetGlyphBoundRects( rStartPt, rStr, nIndex, nLen, aTmp );
|
||||
|
||||
bool bInserted = false;
|
||||
for( MetricVector::const_iterator it = aTmp.begin(); it != aTmp.end(); ++it, nIndex++ )
|
||||
@@ -866,7 +866,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
|
||||
}
|
||||
else
|
||||
{
|
||||
GetGlyphBoundRects( rStartPt, rStr, nIndex, nLen, nIndex, *pVector );
|
||||
GetGlyphBoundRects( rStartPt, rStr, nIndex, nLen, *pVector );
|
||||
if( pDisplayText )
|
||||
*pDisplayText += rStr.copy( nIndex, nLen );
|
||||
}
|
||||
|
Reference in New Issue
Block a user