summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/a11y
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-08-19 18:50:23 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-08-21 21:17:58 +0200
commit8a086a97299c921a0b386f762ff706b6d85e678a (patch)
tree8dfdce621839f73b63d01085b8e44fd2e68d3f07 /vcl/unx/gtk/a11y
parent59189f3e02acbdf4e5bbd35fc278252b30022f43 (diff)
atk: Make sure returned values are initialized
-1 is the now-document value to be used in this case, see https://gitlab.gnome.org/GNOME/atk/merge_requests/22 Change-Id: I7e8f1c64cf0dfb337f2c1ee026ca68700c893e78 Reviewed-on: https://gerrit.libreoffice.org/77750 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/unx/gtk/a11y')
-rw-r--r--vcl/unx/gtk/a11y/atkcomponent.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atkimage.cxx5
-rw-r--r--vcl/unx/gtk/a11y/atktext.cxx3
3 files changed, 8 insertions, 4 deletions
diff --git a/vcl/unx/gtk/a11y/atkcomponent.cxx b/vcl/unx/gtk/a11y/atkcomponent.cxx
index e904b12ac610..da5a48eca1f2 100644
--- a/vcl/unx/gtk/a11y/atkcomponent.cxx
+++ b/vcl/unx/gtk/a11y/atkcomponent.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/gtk/a11y/atkimage.cxx b/vcl/unx/gtk/a11y/atkimage.cxx
index 1c9bc2c640f9..baf45d45babe 100644
--- a/vcl/unx/gtk/a11y/atkimage.cxx
+++ b/vcl/unx/gtk/a11y/atkimage.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/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx
index 532b55013ddd..1406ceea5544 100644
--- a/vcl/unx/gtk/a11y/atktext.cxx
+++ b/vcl/unx/gtk/a11y/atktext.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;