diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-10-13 17:45:02 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2019-10-14 12:31:35 +0200 |
commit | 86d08e23f1b20b6582dd944b952b47cc737a7c52 (patch) | |
tree | b21030a1209ed114b1e0b27628ca6aed1020d033 /vcl | |
parent | 802d034c55876c9a933206176a7882ac1ae7566e (diff) |
gtk3atk: Make sure returned values are initialized
This is the same as 8a086a97299c ("atk: Make sure returned values are
initialized"), but for gtk3atk.
-1 is the now-document value to be used in this case, see
https://gitlab.gnome.org/GNOME/atk/merge_requests/22
Change-Id: I3cf5f78cc1db603445edfeec1bebcb2e1e48e9ed
Reviewed-on: https://gerrit.libreoffice.org/80737
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/a11y/gtk3atkcomponent.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk3/a11y/gtk3atkimage.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk3/a11y/gtk3atktext.cxx | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/vcl/unx/gtk3/a11y/gtk3atkcomponent.cxx b/vcl/unx/gtk3/a11y/gtk3atkcomponent.cxx index e904b12ac610..da5a48eca1f2 100644 --- a/vcl/unx/gtk3/a11y/gtk3atkcomponent.cxx +++ b/vcl/unx/gtk3/a11y/gtk3atkcomponent.cxx @@ -170,6 +170,8 @@ component_wrapper_get_position (AtkComponent *component, return; } + *x = *y = -1; + try { css::uno::Reference<css::accessibility::XAccessibleComponent> pComponent @@ -208,6 +210,8 @@ component_wrapper_get_size (AtkComponent *component, return; } + *width = *height = -1; + try { css::uno::Reference<css::accessibility::XAccessibleComponent> pComponent diff --git a/vcl/unx/gtk3/a11y/gtk3atkimage.cxx b/vcl/unx/gtk3/a11y/gtk3atkimage.cxx index 8d9cc20ebbc0..acd43f467690 100644 --- a/vcl/unx/gtk3/a11y/gtk3atkimage.cxx +++ b/vcl/unx/gtk3/a11y/gtk3atkimage.cxx @@ -77,7 +77,7 @@ image_get_image_position( AtkImage *image, gint *y, AtkCoordType coord_type ) { - *x = *y = 0; + *x = *y = -1; if( ATK_IS_COMPONENT( image ) ) { SAL_WNODEPRECATED_DECLARATIONS_PUSH @@ -93,8 +93,7 @@ image_get_image_size( AtkImage *image, gint *width, gint *height ) { - *width = 0; - *height = 0; + *width = *height = -1; try { css::uno::Reference<css::accessibility::XAccessibleImage> pImage = getImage( image ); diff --git a/vcl/unx/gtk3/a11y/gtk3atktext.cxx b/vcl/unx/gtk3/a11y/gtk3atktext.cxx index 532b55013ddd..1406ceea5544 100644 --- a/vcl/unx/gtk3/a11y/gtk3atktext.cxx +++ b/vcl/unx/gtk3/a11y/gtk3atktext.cxx @@ -621,12 +621,13 @@ text_wrapper_get_character_extents( AtkText *text, gint *height, AtkCoordType coords ) { + *x = *y = *width = *height = -1; + try { css::uno::Reference<css::accessibility::XAccessibleText> pText = getText( text ); if( pText.is() ) { - *x = *y = *width = *height = 0; awt::Rectangle aRect = pText->getCharacterBounds( offset ); gint origin_x = 0; |