diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-05-31 11:42:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-31 14:34:54 +0100 |
commit | 1c353c91338e059de3668e15066975aa50170119 (patch) | |
tree | 8f10d81780cfc005b17d89f1a9761aea2d146023 /qadevOOo | |
parent | Display the rendered document (diff) | |
download | core-1c353c91338e059de3668e15066975aa50170119.tar.gz core-1c353c91338e059de3668e15066975aa50170119.zip |
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
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java index 22626cf34c1f..8ccb6fa5093d 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)); |