[Libreoffice-commits] .: 2 commits - configure.in qadevOOo/tests vcl/generic vcl/inc vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu May 31 06:35:28 PDT 2012


 configure.in                                                |    2 +-
 qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java |    4 ++--
 vcl/generic/glyphs/gcach_layout.cxx                         |    5 -----
 vcl/inc/generic/glyphcache.hxx                              |    2 +-
 vcl/source/control/ctrl.cxx                                 |    5 ++++-
 vcl/source/gdi/sallayout.cxx                                |    5 ++++-
 6 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit 631c25c2ea32e6a61f6dda519bab0fa985885ee2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu May 31 13:47:53 2012 +0100

    We apparently don't need Orbit-2.0 anymore
    
    since a219edfbb65e6623dde2d52c41547d78346b7144
    
    Change-Id: I7cc6d8476aa07929870514a424e2a5e6dc508d99

diff --git a/configure.in b/configure.in
index d52f912..c834829 100644
--- a/configure.in
+++ b/configure.in
@@ -8807,7 +8807,7 @@ AC_MSG_CHECKING([whether to enable GConf support])
 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gconf" = "yes"; then
     ENABLE_GCONF="TRUE"
     AC_MSG_RESULT([yes])
-    PKG_CHECK_MODULES( GCONF, gconf-2.0 gobject-2.0 ORBit-2.0 )
+    PKG_CHECK_MODULES( GCONF, gconf-2.0 gobject-2.0 )
 else
     AC_MSG_RESULT([no])
 fi
commit 1c353c91338e059de3668e15066975aa50170119
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu May 31 11:42:12 2012 +0100

    make CheckCharacterBounds tests happy without forcing empty glyphs 1 unit wide
    
    related, i#87757 and 8bafe38c569afa2e1055eb647cb7ff161ddd1230
    which itself is related to ce14342c4292628a641a72d4f63d9c048e030c6a,
    
    These character bounds are backed by what's the glyph bounding box for the ink
    used for the glyph. Whitespace has no ink so its an empty Rectangle. Which
    brings the awesome RECT_EMPTY into play.
    
    It might be a bit dubious in the first place to back getCharacterBounds with
    the glyph bounding box in the first place, rather than maybe the advance width
    or some such. But lets assume that decision was intentional.
    
    So, the qa test should accept that a glyph might be of 0 width anyway.
    Then, tweak rectangle merging so that we can preserve the correct top-left
    position of an empty glyph
    So, we can determine the correct character index given the top-left position
    of an empty glyph
    
    Change-Id: I5e18460ff7cd90cd27d5eede2aa0a5494c36a5d3

diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java
index 22626cf..8ccb6fa 100644
--- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java
+++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java
@@ -385,9 +385,9 @@ public class _XAccessibleText extends MultiMethodTest {
                 localres = chBounds.X >= 0;
                 localres &= (chBounds.Y >= 0);
                 localres &= ((chBounds.X + chBounds.Width) <= bounds.Width);
-                localres &= ((chBounds.X + chBounds.Width) > 0);
+                localres &= ((chBounds.X + chBounds.Width) >= 0);
                 localres &= ((chBounds.Y + chBounds.Height) <= bounds.Height);
-                localres &= ((chBounds.Y + chBounds.Height) > 0);
+                localres &= ((chBounds.Y + chBounds.Height) >= 0);
 
                 if (!localres) {
                     log.println("Text at this place: "+oObj.getCharacter(i));
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index c1b5b10..ef03aa3 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -43,11 +43,6 @@
 
 namespace { struct SimpleLayoutEngine : public rtl::Static< ServerFontLayoutEngine, SimpleLayoutEngine > {}; }
 
-void GlyphMetric::SetSize(const Size& s)
-{
-    maSize = Size(std::max<long>(1, s.Width()), std::max<long>(1, s.Height()));
-}
-
 // =======================================================================
 // layout implementation for ServerFont
 // =======================================================================
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index 8c0f3b1..1ab2a74 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -132,7 +132,7 @@ protected:
     friend class GlyphData;
     void                    SetOffset( int nX, int nY ) { maOffset = Point( nX, nY); }
     void                    SetDelta( int nX, int nY )  { maDelta = Point( nX, nY); }
-    void                    SetSize(const Size& s);
+    void                    SetSize( const Size& s )    { maSize = s; }
     void                    SetCharWidth( long nW )     { mnAdvanceWidth = nW; }
 
 private:
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 0bfe0de..cd1c7df 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -172,7 +172,10 @@ long ControlLayoutData::GetIndexForPoint( const Point& rPoint ) const
     long nIndex = -1;
     for( long i = m_aUnicodeBoundRects.size()-1; i >= 0; i-- )
     {
-        if( m_aUnicodeBoundRects[ i ].IsInside( rPoint ) )
+        Point aTopLeft = m_aUnicodeBoundRects[i].TopLeft();
+        Point aBottomRight = m_aUnicodeBoundRects[i].BottomRight();
+        if (rPoint.X() >= aTopLeft.X() && rPoint.Y() >= aTopLeft.Y() &&
+            rPoint.X() <= aBottomRight.X() && rPoint.Y() <= aBottomRight.Y())
         {
             nIndex = i;
             break;
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index d25a4b1..f6fe820 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -761,7 +761,10 @@ bool SalLayout::GetBoundRect( SalGraphics& rSalGraphics, Rectangle& rRect ) cons
         {
             // merge rectangle
             aRectangle += aPos;
-            rRect.Union( aRectangle );
+            if (rRect.IsEmpty())
+                rRect = aRectangle;
+            else
+                rRect.Union(aRectangle);
             bRet = true;
         }
     }


More information about the Libreoffice-commits mailing list