[Libreoffice-commits] core.git: canvas/source include/svtools include/vcl svtools/source vcl/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Mar 17 20:19:10 UTC 2017


 canvas/source/vcl/textlayout.cxx            |    1 -
 include/svtools/accessibletableprovider.hxx |    2 +-
 include/svtools/brwbox.hxx                  |    2 +-
 include/svtools/svtabbx.hxx                 |    2 +-
 include/vcl/outdev.hxx                      |    2 +-
 svtools/source/brwbox/brwbox3.cxx           |    4 ++--
 svtools/source/contnr/svtabbx.cxx           |    6 +++---
 vcl/source/gdi/textlayout.cxx               |    2 +-
 vcl/source/outdev/font.cxx                  |    4 ++--
 vcl/source/outdev/text.cxx                  |    4 ++--
 10 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit a6209ba6a8b5a2c9bcbd0d4f334e7d74acbde95f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Mar 17 14:24:01 2017 +0100

    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 at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 98f5f43d7bf1..03f2fbaebd24 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -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());
diff --git a/include/svtools/accessibletableprovider.hxx b/include/svtools/accessibletableprovider.hxx
index 5856890d4b94..805e95aa5c23 100644
--- a/include/svtools/accessibletableprovider.hxx
+++ b/include/svtools/accessibletableprovider.hxx
@@ -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;
diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx
index fd6b18b6c24c..33ff5ac24273 100644
--- a/include/svtools/brwbox.hxx
+++ b/include/svtools/brwbox.hxx
@@ -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;
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index 2e10dcf3df01..a824ebd8ba82 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -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;
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 4cf54e83817c..f3a407eae2e4 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -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;
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index b0f5d518e849..e4f7409139d5 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -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
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index be8b00b8315f..965fd15c3397 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -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)
         {
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 0d0b600af1db..e41887d24e01 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -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() ) );
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 0794bd13d359..a28fba0c0220 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -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 );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index ba946d3914fa..7aa4ec1cece3 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -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 );
         }


More information about the Libreoffice-commits mailing list