[Libreoffice-commits] core.git: solenv/gbuild solenv/sanitizers

2018-05-06 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk   |2 -
 solenv/sanitizers/ui/cui.suppr  |   33 +
 solenv/sanitizers/ui/dbaccess.suppr |   14 +++
 solenv/sanitizers/ui/modules/BasicIDE.suppr |1 
 solenv/sanitizers/ui/modules/dbreport.suppr |2 +
 solenv/sanitizers/ui/modules/sabpilot.suppr |9 
 solenv/sanitizers/ui/modules/scalc.suppr|   53 +++
 solenv/sanitizers/ui/modules/scanner.suppr  |2 +
 solenv/sanitizers/ui/modules/schart.suppr   |4 ++
 solenv/sanitizers/ui/modules/sdraw.suppr|4 ++
 solenv/sanitizers/ui/modules/simpress.suppr |4 ++
 solenv/sanitizers/ui/modules/smath.suppr|1 
 solenv/sanitizers/ui/modules/swriter.suppr  |   54 
 solenv/sanitizers/ui/sfx.suppr  |6 +++
 solenv/sanitizers/ui/svx.suppr  |6 +++
 solenv/sanitizers/ui/uui.suppr  |7 +++
 solenv/sanitizers/ui/vcl.suppr  |3 +
 solenv/sanitizers/ui/writerperfect.suppr|1 
 solenv/sanitizers/ui/xmlsec.suppr   |   19 +
 19 files changed, 224 insertions(+), 1 deletion(-)

New commits:
commit 239d985b712301a5922fe4d32f29db94e5f73766
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri May 4 11:14:12 2018 +0200

gla11y: Enable warnings for GtkEntry widgets missing a label

Change-Id: Ie2bd516a8125771e747c5960087f835b63737e9e
Reviewed-on: https://gerrit.libreoffice.org/53837
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index e208d99a7309..1eee6edf1922 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -174,7 +174,7 @@ gb_UIConfig_gla11y_PARAMETERS += --enable-type 
duplicate-mnemonic --enable-type
 gb_UIConfig_gla11y_PARAMETERS += --disable-type no-labelled-by
 # Clearly need labelling
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkScale
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkEntry
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkEntry
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkSpinButton
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkSpinner
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkProgressBar
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index faf5d9357fdd..b0f9d263ad52 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -1,3 +1,23 @@
+cui/uiconfig/ui/aboutconfigdialog.ui://GtkEntry[@id='searchEntry'] 
no-labelled-by
+cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='preference'] orphan-label
+cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='property'] orphan-label
+cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='type'] orphan-label
+cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='value'] orphan-label
+cui/uiconfig/ui/assigncomponentdialog.ui://GtkLabel[@id='label1'] orphan-label
+cui/uiconfig/ui/assigncomponentdialog.ui://GtkEntry[@id='methodEntry'] 
no-labelled-by
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='osversion'] 
no-labelled-by
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='platformvendor']
 no-labelled-by
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='device'] 
no-labelled-by
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='driverversion'] 
no-labelled-by
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='label4'] 
orphan-label
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='label5'] 
orphan-label
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='label6'] 
orphan-label
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='label7'] 
orphan-label
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='label8'] 
orphan-label
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='bledittitle'] 
orphan-label
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='bladdtitle'] 
orphan-label
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='wledittitle'] 
orphan-label
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='wladdtitle'] 
orphan-label
 cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='C_custom:0%'] 
duplicate-mnemonic
 cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='K_custom:0%'] 
duplicate-mnemonic
 cui/uiconfig/ui/comment.ui://GtkButton[@id='previous'] button-no-label
@@ -5,6 +25,13 @@ cui/uiconfig/ui/comment.ui://GtkButton[@id='next'] 
button-no-label
 cui/uiconfig/ui/gradientpage.ui://GtkScale[@id='incrementslider'] 
no-labelled-by
 cui/uiconfig/ui/gradientpage.ui://GtkLabel[@id='centerft'] orphan-label
 cui/uiconfig/ui/gradientpage.ui://GtkScale[@id='borderslider'] no-labelled-by
+cui/uiconfig/ui/hangulhanjac

[Libreoffice-commits] core.git: vcl/qa

2018-05-06 Thread Samuel Thibault
 vcl/qa/cppunit/builder/demo.ui |   53 -
 1 file changed, 52 insertions(+), 1 deletion(-)

New commits:
commit 4789eb9671c6d6fb0e131267b97a7ad3de8ac5ce
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri May 4 12:59:45 2018 +0200

vcl: Fix accessibility issues in demo.ui

Change-Id: I8da9fabe80f9c487b0c5ef225d55048ef544bf8e
Reviewed-on: https://gerrit.libreoffice.org/53843
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/vcl/qa/cppunit/builder/demo.ui b/vcl/qa/cppunit/builder/demo.ui
index 47caf2d4d3c4..5e59a785dd7e 100644
--- a/vcl/qa/cppunit/builder/demo.ui
+++ b/vcl/qa/cppunit/builder/demo.ui
@@ -395,7 +395,9 @@
 True
 False
 0
-Number of title pages
+_Number of title pages
+True
+NF_PAGE_COUNT
   
   
 0
@@ -454,6 +456,9 @@
 1
 1
 True
+
+  
+
   
   
 2
@@ -534,6 +539,9 @@
 0
 True
 RB_DOCUMENT_START
+
+  
+
   
   
 1
@@ -607,6 +615,9 @@
 True
 False
 Page number
+
+  
+
   
   
 False
@@ -620,6 +631,9 @@
 False
 True
 True
+
+  
+
   
   
 False
@@ -661,6 +675,9 @@
 True
 False
 Page number
+
+  
+
   
   
 False
@@ -674,6 +691,9 @@
 False
 True
 True
+
+  
+
   
   
 False
@@ -860,6 +880,7 @@
 False
 0
 Style
+5
   
   
 False
@@ -890,6 +911,9 @@
 False
 0
 True
+
+  
+
   
   
 False
@@ -905,6 +929,9 @@
   
 True
 True
+
+  
+
   
   
 False
@@ -1062,6 +1089,9 @@
 0
 True
 15
+
+  
+
   
   
 False
@@ -1073,6 +1103,9 @@
   
 True
 True
+
+  
+
   
   

[Libreoffice-commits] core.git: 2 commits - solenv/gbuild sw/qa

2018-05-08 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk|   15 +--
 sw/qa/extras/odfexport/odfexport.cxx |7 +++
 2 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit 80cee87b3d398837d5b665f3e83ae8a4e6a9ea0f
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri May 4 13:46:39 2018 +0200

gbuild: Add function to only run gla11y on .ui files

This adds gb_UIConfig_add_a11yerrors_uifiles to request running gla11y on
.ui files without involving the rest of the .ui processing.

Change-Id: Ic2478705037c98c6cdd493c3930b6ab8ef166b04
Reviewed-on: https://gerrit.libreoffice.org/53924
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 1eee6edf1922..154e9be51149 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -248,6 +248,12 @@ $(call gb_UIConfig__package_file,$(1),$(2),ui,$(3),$(4))
 
 endef
 
+define gb_UIConfig_add_a11yerrors_uifile
+$(call gb_UIConfig_get_a11yerrors_target,$(1)) : UIFILES += $(SRCDIR)/$(2).ui
+$(call gb_UIConfig_get_a11yerrors_target,$(1)) : $(SRCDIR)/$(2).ui
+
+endef
+
 # gb_UIConfig__add_uifile target file
 define gb_UIConfig__add_uifile
 $(call gb_UIConfig__package_uifile,$(1),$(call 
gb_UIConfig_get_packagename,$(1)),$(notdir $(2)).ui,$(2).ui)
@@ -257,8 +263,7 @@ $(call gb_UIConfig_get_imagelist_target,$(1)) : 
UI_IMAGELISTS += $(call gb_UIIma
 $(call gb_UIConfig_get_imagelist_target,$(1)) : $(call 
gb_UIImageListTarget_get_target,$(2))
 $(call gb_UIConfig_get_clean_target,$(1)) : $(call 
gb_UIImageListTarget_get_clean_target,$(2))
 
-$(call gb_UIConfig_get_a11yerrors_target,$(1)) : UIFILES += $(SRCDIR)/$(2).ui
-$(call gb_UIConfig_get_a11yerrors_target,$(1)) : $(SRCDIR)/$(2).ui
+$(call gb_UIConfig_add_a11yerrors_uifile,$(1),$(2))
 
 endef
 
@@ -282,6 +287,12 @@ $(foreach uifile,$(2),$(call 
gb_UIConfig_add_uifile,$(1),$(uifile)))
 
 endef
 
+# gb_UIConfig_add_uifiles target uifile(s) but only for running gla11y
+define gb_UIConfig_add_a11yerrors_uifiles
+$(foreach uifile,$(2),$(call gb_UIConfig_add_a11yerrors_uifile,$(1),$(uifile)))
+
+endef
+
 # gb_UIConfig__add_xmlfile target package-target type xmlfile
 define gb_UIConfig__add_xmlfile
 $(call gb_UIConfig__package_file,$(1),$(call 
gb_UIConfig_get_packagename,$(2)),$(3),$(notdir $(4)).xml,$(4).xml)
commit fe192a7b7485379625a4d91ad6e3a9e6280add2c
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue May 8 11:16:16 2018 +0200

Enable CppunitTest_sw_odfexport for MACOSX

The whole boy of sw/qa/extras/odfexport/odfexport.cxx had been disabled for
MACOSX and WNT with effeb7b039bbed5e4eb0c4af1f600b61ffbb4546 "sw/qa: 1
individual unit test per filter (import/export) test", for no clear reason, 
then
enabled again for WNT (but left disabled for MACOSX) with
960db7d4a875897addb8a28257da38138babb264 "CppunitTest_sw_odfexport: enable 
on
Windows".

What fails for me on macOS is

> /Users/stephan/Software/lo/core/test/source/xmltesttools.cxx:71: Assertion
> Test name: testEmbeddedFontProps::Import_Export_Import
> equality assertion failed
> - Expected: 1
> - Actual  : 0
> - In 
,
 XPath '//style:font-face[@style:name='Liberation 
Serif']/svg:font-face-src/svg:font-face-uri[1]' number of nodes is incorrect
>
> 
/Users/stephan/Software/lo/core/sw/qa/extras/odfexport/odfexport.cxx:1948: 
Assertion
> Test name: testBulletAsImage::Import
> equality assertion failed
> - Expected: 15
> - Actual  : 17
>
> 
/Users/stephan/Software/lo/core/sw/qa/extras/odfexport/odfexport.cxx:1948: 
Assertion
> Test name: testBulletAsImage::Import_Export_Import
> equality assertion failed
> - Expected: 15
> - Actual  : 17
>
> Failures !!!
> Run: 99   Failure total: 3   Failures: 3   Errors: 0

of which the first was already disabled individually for WNT (so disabled 
it for
MACOSX, too), and the latter two are covered by a new TODO disabling just 
the
relevant CPPUNIT_ASSERT_EQUAL for MACOSX for now.

Change-Id: I233f71dc9566b1e21d34f4ef65cbddb364bb6f03
Reviewed-on: https://gerrit.libreoffice.org/53961
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index c2da82ffcaa3..375d7ed04958 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -13,7 +13,6 @@
 
 #include 
 
-#if !defined(MACOSX)
 #include 
 #include 
 #include 
@@ -1828,7 +1827,7 @@ DECLARE_ODFEXPORT_TEST(testImageMimetype, 
"image-mimetype.odt")
 
 DECLARE_ODFEXPORT_TEST(testEmbeddedFontProps, "embedded-font-props.odt")
 {
-#if !defined(WNT)

[Libreoffice-commits] core.git: solenv/gbuild solenv/sanitizers

2018-05-21 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk   |6 +--
 solenv/sanitizers/ui/cui.suppr  |   53 
 solenv/sanitizers/ui/dbaccess.suppr |   11 +
 solenv/sanitizers/ui/desktop.suppr  |9 
 solenv/sanitizers/ui/filter.suppr   |2 +
 solenv/sanitizers/ui/modules/scalc.suppr|9 
 solenv/sanitizers/ui/modules/schart.suppr   |   27 ++
 solenv/sanitizers/ui/modules/sdraw.suppr|2 -
 solenv/sanitizers/ui/modules/simpress.suppr |   15 +++
 solenv/sanitizers/ui/modules/smath.suppr|3 +
 solenv/sanitizers/ui/modules/swriter.suppr  |   32 
 solenv/sanitizers/ui/sfx.suppr  |3 +
 solenv/sanitizers/ui/svt.suppr  |2 +
 solenv/sanitizers/ui/svx.suppr  |8 
 solenv/sanitizers/ui/vcl.suppr  |3 +
 15 files changed, 181 insertions(+), 4 deletions(-)

New commits:
commit d5bb7db998c4c629ec61b9475c86c130e57787f3
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri May 11 14:01:50 2018 +0200

gla11y: Enable warnings for more widgets missing a label

Namely
GtkSpinButton
GtkSpinner
GtkProgressBar

Change-Id: I00c1d03cde43d23cee5e8b502a03284ac81967a5
Reviewed-on: https://gerrit.libreoffice.org/54131
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 154e9be51149..3203c22203c2 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -175,9 +175,9 @@ gb_UIConfig_gla11y_PARAMETERS += --disable-type 
no-labelled-by
 # Clearly need labelling
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkScale
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkEntry
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkSpinButton
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkSpinner
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkProgressBar
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkSpinButton
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkSpinner
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkProgressBar
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-SvxColorListBox
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-SvxLanguageBox
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.sfxlo-SvxCharView
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index b0f9d263ad52..a9dcaf2ae43f 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -5,6 +5,9 @@ cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='type'] 
orphan-label
 cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='value'] orphan-label
 cui/uiconfig/ui/assigncomponentdialog.ui://GtkLabel[@id='label1'] orphan-label
 cui/uiconfig/ui/assigncomponentdialog.ui://GtkEntry[@id='methodEntry'] 
no-labelled-by
+cui/uiconfig/ui/bitmaptabpage.ui://GtkLabel[@id='label4'] orphan-label
+cui/uiconfig/ui/bitmaptabpage.ui://GtkLabel[@id='label9'] orphan-label
+cui/uiconfig/ui/bitmaptabpage.ui://GtkSpinButton[@id='tileoffmtr:0%'] 
no-labelled-by
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='osversion'] 
no-labelled-by
 
cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='platformvendor'] 
no-labelled-by
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='device'] 
no-labelled-by
@@ -18,8 +21,34 @@ 
cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='bledittitle'] orp
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='bladdtitle'] 
orphan-label
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='wledittitle'] 
orphan-label
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='wladdtitle'] 
orphan-label
+cui/uiconfig/ui/breaknumberoption.ui://GtkSpinButton[@id='beforebreak'] 
no-labelled-by
+cui/uiconfig/ui/breaknumberoption.ui://GtkSpinButton[@id='afterbreak'] 
no-labelled-by
+cui/uiconfig/ui/breaknumberoption.ui://GtkSpinButton[@id='wordlength'] 
no-labelled-by
+cui/uiconfig/ui/colorpage.ui://GtkLabel[@id='label18'] orphan-label
+cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='R_preset-nospin'] 
no-labelled-by
+cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='G_preset-nospin'] 
no-labelled-by
+cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='B_preset-nospin'] 
no-labelled-by
+cui/uiconfig/ui/colorpage.ui://GtkLabel[@id='label17'] orphan-label
+cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='C_preset-nospin:0%'] 
no-labelled-by
+cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='M_preset-nospin:0%'] 
no-labelled-by
+cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='Y_preset-nospin:0%'] 
no-labelled-by
+cui/uiconf

[Libreoffice-commits] core.git: solenv/sanitizers vcl/UIConfig_vcl.mk

2018-05-25 Thread Samuel Thibault
 solenv/sanitizers/ui/vcl.suppr |   14 ++
 vcl/UIConfig_vcl.mk|4 
 2 files changed, 18 insertions(+)

New commits:
commit 305285bd1450bb847058a877b0dc2adface4e521
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri May 4 14:08:27 2018 +0200

vcl: Run gla11y on demo.ui

Change-Id: I63d67709ab50e86b138fecd814b4dee7e2f2a755
Reviewed-on: https://gerrit.libreoffice.org/53925
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/solenv/sanitizers/ui/vcl.suppr b/solenv/sanitizers/ui/vcl.suppr
index 5251717f54d5..1014ae74d870 100644
--- a/solenv/sanitizers/ui/vcl.suppr
+++ b/solenv/sanitizers/ui/vcl.suppr
@@ -7,3 +7,17 @@ vcl/uiconfig/ui/printdialog.ui://GtkEntry[@id='pagerange'] 
no-labelled-by
 vcl/uiconfig/ui/printerdevicepage.ui://GtkEntry[@id='custom'] no-labelled-by
 vcl/uiconfig/ui/printprogressdialog.ui://GtkLabel[@id='label'] orphan-label
 vcl/uiconfig/ui/printprogressdialog.ui://GtkProgressBar[@id='progressbar'] 
no-labelled-by
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='labelfoo'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label4'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label5'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkSpinButton[@id='spinbutton1'] 
no-labelled-by
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label6'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label7'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label8'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkEntry[@id='entry1'] no-labelled-by
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label34'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label35'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label36'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label37'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label38'] orphan-label
+vcl/qa/cppunit/builder/demo.ui://GtkLabel[@id='label39'] orphan-label
diff --git a/vcl/UIConfig_vcl.mk b/vcl/UIConfig_vcl.mk
index 85dbe823d5cc..8238c717a279 100644
--- a/vcl/UIConfig_vcl.mk
+++ b/vcl/UIConfig_vcl.mk
@@ -22,4 +22,8 @@ $(eval $(call gb_UIConfig_add_uifiles,vcl,\
vcl/uiconfig/ui/querydialog \
 ))
 
+$(eval $(call gb_UIConfig_add_a11yerrors_uifiles,vcl,\
+   vcl/qa/cppunit/builder/demo \
+))
+
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: libreofficekit/Module_libreofficekit.mk libreofficekit/UIConfig_libreofficekit.mk Repository.mk solenv/sanitizers

2018-05-24 Thread Samuel Thibault
 Repository.mk |1 +
 libreofficekit/Module_libreofficekit.mk   |1 +
 libreofficekit/UIConfig_libreofficekit.mk |   16 
 solenv/sanitizers/ui/libreofficekit.suppr |6 ++
 4 files changed, 24 insertions(+)

New commits:
commit 63f5e757a0453be7a343d74d54f7e61a9070a373
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri May 4 13:59:53 2018 +0200

libreofficekit: Run gla11y on gtv.ui

Change-Id: I1bb2be7d3636b70018276eb3d6b23ba7ace6e62a
Reviewed-on: https://gerrit.libreoffice.org/53926
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/Repository.mk b/Repository.mk
index be1879cdfc71..2a66608621a5 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1136,6 +1136,7 @@ $(eval $(call gb_Helper_register_uiconfigs,\
filter \
formula \
fps \
+   libreofficekit \
$(call gb_Helper_optional,SCRIPTING,modules/BasicIDE) \
$(call gb_Helper_optional,DBCONNECTIVITY,\
modules/dbapp \
diff --git a/libreofficekit/Module_libreofficekit.mk 
b/libreofficekit/Module_libreofficekit.mk
index 2d7519c46ca1..351f89a33e48 100644
--- a/libreofficekit/Module_libreofficekit.mk
+++ b/libreofficekit/Module_libreofficekit.mk
@@ -30,6 +30,7 @@ endif # ($(ENABLE_GTK3),)
 $(eval $(call gb_Module_add_targets,libreofficekit,\
 Executable_tilebench \
 Package_selectionhandles \
+UIConfig_libreofficekit \
 ))
 
 endif
diff --git a/libreofficekit/UIConfig_libreofficekit.mk 
b/libreofficekit/UIConfig_libreofficekit.mk
new file mode 100644
index ..7018506db050
--- /dev/null
+++ b/libreofficekit/UIConfig_libreofficekit.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UIConfig_UIConfig,libreofficekit))
+
+$(eval $(call gb_UIConfig_add_a11yerrors_uifiles,libreofficekit,\
+   libreofficekit/qa/gtktiledviewer/gtv \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/sanitizers/ui/libreofficekit.suppr 
b/solenv/sanitizers/ui/libreofficekit.suppr
new file mode 100644
index ..8807f96a939a
--- /dev/null
+++ b/solenv/sanitizers/ui/libreofficekit.suppr
@@ -0,0 +1,6 @@
+libreofficekit/qa/gtktiledviewer/gtv.ui://GtkLabel[@id='zoomlabel'] 
orphan-label
+libreofficekit/qa/gtktiledviewer/gtv.ui://GtkLabel[@id='redlinelabel'] 
orphan-label
+libreofficekit/qa/gtktiledviewer/gtv.ui://GtkEntry[@id='findbar_entry'] 
no-labelled-by
+libreofficekit/qa/gtktiledviewer/gtv.ui://GtkLabel[@id='findbar_label'] 
orphan-label
+libreofficekit/qa/gtktiledviewer/gtv.ui://GtkEntry[@id='addressbar_entry'] 
no-labelled-by
+libreofficekit/qa/gtktiledviewer/gtv.ui://GtkEntry[@id='formulabar_entry'] 
no-labelled-by
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/gbuild solenv/sanitizers

2018-06-13 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk|6 +-
 solenv/sanitizers/ui/cui.suppr   |   19 
 solenv/sanitizers/ui/dbaccess.suppr  |   26 +++
 solenv/sanitizers/ui/fps.suppr   |4 +
 solenv/sanitizers/ui/libreofficekit.suppr|3 +
 solenv/sanitizers/ui/modules/dbreport.suppr  |2 
 solenv/sanitizers/ui/modules/sabpilot.suppr  |3 +
 solenv/sanitizers/ui/modules/sbibliography.suppr |6 ++
 solenv/sanitizers/ui/modules/scalc.suppr |   43 ++
 solenv/sanitizers/ui/modules/scanner.suppr   |2 
 solenv/sanitizers/ui/modules/schart.suppr|5 ++
 solenv/sanitizers/ui/modules/simpress.suppr  |9 +++
 solenv/sanitizers/ui/modules/smath.suppr |3 +
 solenv/sanitizers/ui/modules/swriter.suppr   |   54 +++
 solenv/sanitizers/ui/svx.suppr   |   29 
 solenv/sanitizers/ui/vcl.suppr   |   14 +
 16 files changed, 225 insertions(+), 3 deletions(-)

New commits:
commit e3248c2ac6d1f090b58489d087f029d85d060637
Author: Samuel Thibault 
Date:   Sat Jun 2 01:34:21 2018 +0200

gla11y: Enable warnings for more widgets missing a label

Namely
GtkComboBox
GtkComboBoxText
GtkMenuItem

Change-Id: I85a971ca9cee5f17649b93d13d6b2aeb5440f830
Reviewed-on: https://gerrit.libreoffice.org/55414
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 7213d5e162a6..094ed5fe72a8 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -184,9 +184,9 @@ gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.sfxlo-SvxCharV
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.foruilo-RefEdit
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-PaperSizeListBox
 # Probably need labelling
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkComboBox
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkComboBoxText
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkMenuItem
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkComboBox
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkComboBoxText
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkMenuItem
 # Possibly need labelling
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkTreeView
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkTreeViewColumn
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 847e9bb883df..d2de43424f25 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -10,6 +10,7 @@ 
cui/uiconfig/ui/autocorrectdialog.ui://svxcorelo-SvxLanguageBox[@id='lang'] no-l
 cui/uiconfig/ui/bitmaptabpage.ui://GtkLabel[@id='label4'] orphan-label
 cui/uiconfig/ui/bitmaptabpage.ui://GtkLabel[@id='label9'] orphan-label
 cui/uiconfig/ui/bitmaptabpage.ui://GtkSpinButton[@id='tileoffmtr:0%'] 
no-labelled-by
+cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkComboBox[@id='os'] 
no-labelled-by
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='osversion'] 
no-labelled-by
 
cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='platformvendor'] 
no-labelled-by
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkEntry[@id='device'] 
no-labelled-by
@@ -151,6 +152,10 @@ 
cui/uiconfig/ui/colorpickerdialog.ui://GtkSpinButton[@id='satSpinbutton'] no-lab
 cui/uiconfig/ui/colorpickerdialog.ui://GtkSpinButton[@id='brightSpinbutton'] 
no-labelled-by
 cui/uiconfig/ui/comment.ui://GtkButton[@id='previous'] button-no-label
 cui/uiconfig/ui/comment.ui://GtkButton[@id='next'] button-no-label
+cui/uiconfig/ui/dimensionlinestabpage.ui://GtkLabel[@id='FT_POSITION'] 
orphan-label
+cui/uiconfig/ui/dimensionlinestabpage.ui://GtkComboBox[@id='LB_UNIT'] 
no-labelled-by
+cui/uiconfig/ui/fmsearchdialog.ui://GtkComboBox[@id='lbField'] no-labelled-by
+cui/uiconfig/ui/fmsearchdialog.ui://GtkLabel[@id='replacedesc'] orphan-label
 cui/uiconfig/ui/gradientpage.ui://GtkScale[@id='incrementslider'] 
no-labelled-by
 cui/uiconfig/ui/gradientpage.ui://GtkLabel[@id='centerft'] orphan-label
 cui/uiconfig/ui/gradientpage.ui://GtkScale[@id='borderslider'] no-labelled-by
@@ -167,6 +172,7 @@ cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='angleft'] 
orphan-label
 cui/uiconfig/ui/hatchpage.ui://GtkScale[@id='angleslider'] no-labelled-by
 cui/uiconfig/ui/hatchpage.ui://GtkSpinButton[@id='anglemtr:0degrees'] 
no-labelled-by
 cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='linetypeft'] orphan-label
+cui/uiconfig/ui/hatchpage.ui://GtkComboBoxText[@id='linetypelb'] no-labelled-by
 cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='linecolorft'] orphan-label
 cui/uiconfig/ui/hatchpage.ui://svxcorelo-SvxColorListBox[@id

[Libreoffice-commits] core.git: solenv/gbuild solenv/sanitizers

2018-06-01 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk   |   10 +-
 solenv/sanitizers/ui/cui.suppr  |  108 
 solenv/sanitizers/ui/formula.suppr  |6 +
 solenv/sanitizers/ui/modules/scalc.suppr|   30 +++
 solenv/sanitizers/ui/modules/simpress.suppr |9 ++
 solenv/sanitizers/ui/modules/swriter.suppr  |1 
 solenv/sanitizers/ui/svx.suppr  |   14 +++
 solenv/sanitizers/ui/uui.suppr  |7 +
 solenv/sanitizers/ui/xmlsec.suppr   |1 
 9 files changed, 178 insertions(+), 8 deletions(-)

New commits:
commit 7a95afee62e536220230f01a5227c9edda617d4e
Author: Samuel Thibault 
Date:   Fri May 25 16:40:56 2018 +0200

gla11y: Enable warnings for more widgets missing a label

Namely
svxcorelo-SvxColorListBox
svxcorelo-SvxLanguageBox
sfxlo-SvxCharView
foruilo-RefEdit
svxcorelo-PaperSizeListBox

Change-Id: I5933c7500017a25ce8597d781b4a0dcfbbe3
Reviewed-on: https://gerrit.libreoffice.org/54814
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 3203c22203c2..7213d5e162a6 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -178,11 +178,11 @@ gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkEntry
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkSpinButton
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkSpinner
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkProgressBar
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-SvxColorListBox
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-SvxLanguageBox
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.sfxlo-SvxCharView
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.foruilo-RefEdit
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-PaperSizeListBox
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-SvxColorListBox
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-SvxLanguageBox
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.sfxlo-SvxCharView
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.foruilo-RefEdit
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-PaperSizeListBox
 # Probably need labelling
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkComboBox
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkComboBoxText
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index a9dcaf2ae43f..847e9bb883df 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -5,6 +5,8 @@ cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='type'] 
orphan-label
 cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='value'] orphan-label
 cui/uiconfig/ui/assigncomponentdialog.ui://GtkLabel[@id='label1'] orphan-label
 cui/uiconfig/ui/assigncomponentdialog.ui://GtkEntry[@id='methodEntry'] 
no-labelled-by
+cui/uiconfig/ui/autocorrectdialog.ui://GtkLabel[@id='label1'] orphan-label
+cui/uiconfig/ui/autocorrectdialog.ui://svxcorelo-SvxLanguageBox[@id='lang'] 
no-labelled-by
 cui/uiconfig/ui/bitmaptabpage.ui://GtkLabel[@id='label4'] orphan-label
 cui/uiconfig/ui/bitmaptabpage.ui://GtkLabel[@id='label9'] orphan-label
 cui/uiconfig/ui/bitmaptabpage.ui://GtkSpinButton[@id='tileoffmtr:0%'] 
no-labelled-by
@@ -24,6 +26,104 @@ 
cui/uiconfig/ui/blackorwhitelistentrydialog.ui://GtkLabel[@id='wladdtitle'] orph
 cui/uiconfig/ui/breaknumberoption.ui://GtkSpinButton[@id='beforebreak'] 
no-labelled-by
 cui/uiconfig/ui/breaknumberoption.ui://GtkSpinButton[@id='afterbreak'] 
no-labelled-by
 cui/uiconfig/ui/breaknumberoption.ui://GtkSpinButton[@id='wordlength'] 
no-labelled-by
+cui/uiconfig/ui/colorconfigwin.ui://GtkLabel[@id='doccolor'] orphan-label
+cui/uiconfig/ui/colorconfigwin.ui://svxcorelo-SvxColorListBox[@id='doccolor_lb']
 no-labelled-by
+cui/uiconfig/ui/colorconfigwin.ui://svxcorelo-SvxColorListBox[@id='docboundaries_lb']
 no-labelled-by
+cui/uiconfig/ui/colorconfigwin.ui://GtkLabel[@id='general'] orphan-label
+cui/uiconfig/ui/colorconfigwin.ui://svxcorelo-SvxColorListBox[@id='appback_lb']
 no-labelled-by
+cui/uiconfig/ui/colorconfigwin.ui://GtkLabel[@id='appback'] orphan-label
+cui/uiconfig/ui/colorconfigwin.ui://svxcorelo-SvxColorListBox[@id='objboundaries_lb']
 no-labelled-by
+cui/uiconfig/ui/colorconfigwin.ui://svxcorelo-SvxColorListBox[@id='tblboundaries_lb']
 no-labelled-by
+cui/uiconfig/ui/colorconfigwin.ui://GtkLabel[@id='font'] orphan-label
+cui/uiconfig/ui/colorconfigwin.ui://svxcorelo-SvxColorListBox[@id='font_lb'] 
no-labelled-by
+cui/uiconfig/ui/colorconfigwin.ui://svxcorelo-SvxColorListBox[@id='unvisitedlinks_lb']
 no-labelled-by
+cui/uiconfig

[Libreoffice-commits] core.git: solenv/gbuild solenv/sanitizers

2018-06-20 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk   |8 +--
 solenv/sanitizers/ui/cui.suppr  |   67 +++-
 solenv/sanitizers/ui/dbaccess.suppr |4 +
 solenv/sanitizers/ui/desktop.suppr  |3 +
 solenv/sanitizers/ui/filter.suppr   |4 +
 solenv/sanitizers/ui/fps.suppr  |1 
 solenv/sanitizers/ui/modules/sabpilot.suppr |2 
 solenv/sanitizers/ui/modules/scalc.suppr|7 ++
 solenv/sanitizers/ui/modules/schart.suppr   |2 
 solenv/sanitizers/ui/modules/smath.suppr|9 +++
 solenv/sanitizers/ui/modules/swriter.suppr  |   10 
 solenv/sanitizers/ui/sfx.suppr  |   12 +
 solenv/sanitizers/ui/svx.suppr  |8 +++
 solenv/sanitizers/ui/uui.suppr  |3 +
 solenv/sanitizers/ui/vcl.suppr  |9 +++
 solenv/sanitizers/ui/xmlsec.suppr   |2 
 16 files changed, 146 insertions(+), 5 deletions(-)

New commits:
commit 8cc60b05c688e0edc03a63da0afd85f1e853bbc3
Author: Samuel Thibault 
Date:   Wed Jun 13 11:55:09 2018 +0200

gla11y: Enable warnings for more widgets missing a label

Namely
GtkTreeView
GtkTreeViewColumn
GtkTextView
GtkDrawingArea

Change-Id: I4190fc73d0c7fd3575bef0388f44aa52b51f29d2
Reviewed-on: https://gerrit.libreoffice.org/55743
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 094ed5fe72a8..6113161d970d 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -188,10 +188,10 @@ gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkComboBox
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkComboBoxText
 gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkMenuItem
 # Possibly need labelling
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkTreeView
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkTreeViewColumn
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkTextView
-#gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkDrawingArea
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkTreeView
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkTreeViewColumn
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkTextView
+gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkDrawingArea
 # Perhaps need labelling
 #gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkImage
 
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 96186ebd2892..b3391beb3257 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -1,3 +1,13 @@
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='logoreplacement'] orphan-label
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='buildid'] orphan-label
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='locale'] orphan-label
+cui/uiconfig/ui/aboutdialog.ui://GtkTextView[@id='version'] no-labelled-by
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='description'] orphan-label
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='copyright'] orphan-label
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='libreoffice'] orphan-label
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='derived'] orphan-label
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='vendor'] orphan-label
+cui/uiconfig/ui/aboutdialog.ui://GtkLabel[@id='link'] orphan-label
 cui/uiconfig/ui/aboutconfigdialog.ui://GtkEntry[@id='searchEntry'] 
no-labelled-by
 cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='preference'] orphan-label
 cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='property'] orphan-label
@@ -179,6 +189,8 @@ 
cui/uiconfig/ui/hatchpage.ui://svxcorelo-SvxColorListBox[@id='backgroundcolorlb'
 cui/uiconfig/ui/hyphenate.ui://GtkLabel[@id='label1'] orphan-label
 cui/uiconfig/ui/hyphenate.ui://GtkButton[@id='left'] button-no-label
 cui/uiconfig/ui/hyphenate.ui://GtkButton[@id='right'] button-no-label
+cui/uiconfig/ui/iconchangedialog.ui://GtkTextView[@id='addrTextview'] 
no-labelled-by
+cui/uiconfig/ui/iconchangedialog.ui://GtkLabel[@id='label1'] orphan-label
 cui/uiconfig/ui/insertfloatingframe.ui://GtkEntry[@id='edname'] no-labelled-by
 cui/uiconfig/ui/insertfloatingframe.ui://GtkEntry[@id='edurl'] no-labelled-by
 cui/uiconfig/ui/insertfloatingframe.ui://GtkLabel[@id='label6'] orphan-label
@@ -188,6 +200,8 @@ 
cui/uiconfig/ui/insertfloatingframe.ui://GtkLabel[@id='heightlabel'] orphan-labe
 cui/uiconfig/ui/insertfloatingframe.ui://GtkSpinButton[@id='width'] 
no-labelled-by
 cui/uiconfig/ui/insertfloatingframe.ui://GtkSpinButton[@id='height'] 
no-labelled-by
 cui/uiconfig/ui/insertoleobject.ui://GtkEntry[@id='urled'] no-labelled-by
+cui/uiconfig/ui/javastartparametersdialog.ui://GtkTreeViewColumn[@id='treeviewcolumn1']
 no-labelled-by
+cui/uiconfig/ui

[Libreoffice-commits] core.git: solenv/gbuild solenv/sanitizers

2018-05-03 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk  |2 +-
 solenv/sanitizers/ui/cui.suppr |   13 +
 solenv/sanitizers/ui/modules/scalc.suppr   |5 +
 solenv/sanitizers/ui/modules/schart.suppr  |3 ++-
 solenv/sanitizers/ui/modules/swriter.suppr |   14 ++
 solenv/sanitizers/ui/svx.suppr |7 +++
 6 files changed, 38 insertions(+), 6 deletions(-)

New commits:
commit 936eaedddbc6d21737745be3c3131607440e366c
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Mon Apr 23 10:54:20 2018 +0200

gla11y: Enable duplicate labelling warnings

Change-Id: Id9022aad4538caa08c3de9a76ff97282cfefb828
Reviewed-on: https://gerrit.libreoffice.org/53314
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 1d9ede0986d1..e208d99a7309 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -167,7 +167,7 @@ gb_UIConfig_gla11y_PARAMETERS += --enable-type 
missing-labelled-by
 # These are often buttons with only an image
 gb_UIConfig_gla11y_PARAMETERS += --enable-type button-no-label
 # These are often doubtful
-#gb_UIConfig_gla11y_PARAMETERS += --enable-type duplicate-mnemonic 
--enable-type labelled-by-and-mnemonic
+gb_UIConfig_gla11y_PARAMETERS += --enable-type duplicate-mnemonic 
--enable-type labelled-by-and-mnemonic
 
 # For now, disable warning about widgets without a label by default, to enable 
warnings for classes progressively
 # To be uncommented progressively
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 3cf4f506104c..faf5d9357fdd 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -1,3 +1,5 @@
+cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='C_custom:0%'] 
duplicate-mnemonic
+cui/uiconfig/ui/colorpage.ui://GtkSpinButton[@id='K_custom:0%'] 
duplicate-mnemonic
 cui/uiconfig/ui/comment.ui://GtkButton[@id='previous'] button-no-label
 cui/uiconfig/ui/comment.ui://GtkButton[@id='next'] button-no-label
 cui/uiconfig/ui/gradientpage.ui://GtkScale[@id='incrementslider'] 
no-labelled-by
@@ -11,6 +13,8 @@ cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='linecolorft'] 
orphan-label
 cui/uiconfig/ui/hyphenate.ui://GtkLabel[@id='label1'] orphan-label
 cui/uiconfig/ui/hyphenate.ui://GtkButton[@id='left'] button-no-label
 cui/uiconfig/ui/hyphenate.ui://GtkButton[@id='right'] button-no-label
+cui/uiconfig/ui/menuassignpage.ui://GtkTextView[@id='desc:border'] 
labelled-by-and-mnemonic
+cui/uiconfig/ui/newlibdialog.ui://GtkEntry[@id='entry'] duplicate-mnemonic
 cui/uiconfig/ui/optemailpage.ui://GtkLabel[@id='browsetitle'] orphan-label
 cui/uiconfig/ui/optemailpage.ui://GtkLabel[@id='suppress'] orphan-label
 cui/uiconfig/ui/optemailpage.ui://GtkCheckButton[@id='suppressHidden'] 
button-no-label
@@ -20,6 +24,9 @@ cui/uiconfig/ui/optfontspage.ui://GtkLabel[@id='font'] 
orphan-label
 cui/uiconfig/ui/optfontspage.ui://GtkLabel[@id='replacewith'] orphan-label
 cui/uiconfig/ui/optfontspage.ui://GtkButton[@id='apply'] button-no-label
 cui/uiconfig/ui/optfontspage.ui://GtkButton[@id='delete'] button-no-label
+cui/uiconfig/ui/optviewpage.ui://GtkComboBoxText[@id='iconsize'] 
duplicate-mnemonic
+cui/uiconfig/ui/pageformatpage.ui://GtkSpinButton[@id='spinMargLeft:0.00cm'] 
duplicate-mnemonic
+cui/uiconfig/ui/pageformatpage.ui://GtkSpinButton[@id='spinMargRight:0.00cm'] 
duplicate-mnemonic
 cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default1'] 
button-no-label
 cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default2'] 
button-no-label
 cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default3'] 
button-no-label
@@ -42,8 +49,6 @@ 
cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result7'] button-no-la
 cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result8'] 
button-no-label
 cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result9'] 
button-no-label
 cui/uiconfig/ui/select_persona_dialog.ui://GtkLabel[@id='progress_label'] 
orphan-label
-cui/uiconfig/ui/textflowpage.ui://GtkSpinButton[@id='spinPageNumber'] 
missing-label-for
-cui/uiconfig/ui/textflowpage.ui://GtkComboBox[@id='comboPageStyle'] 
missing-label-for
-cui/uiconfig/ui/textflowpage.ui://GtkSpinButton[@id='spinOrphan'] 
missing-label-for
-cui/uiconfig/ui/textflowpage.ui://GtkSpinButton[@id='spinWidow'] 
missing-label-for
+cui/uiconfig/ui/signsignatureline.ui://GtkTextView[@id='edit_comment'] 
duplicate-mnemonic
 cui/uiconfig/ui/thesaurus.ui://GtkButton[@id='left'] button-no-label
+cui/uiconfig/ui/wordcompletionpage.ui://GtkSpinButton[@id='maxentries'] 
duplicate-mnemonic
diff --git a/solenv/sanitizers/ui/modules/scalc.suppr 
b/solenv/sanitizers/ui/modules/scalc.suppr
index 28d6cc96060e..6e20952ada84 100644
--- a/solenv/sanitizers/ui/modules/scalc.suppr
+++ b/solenv/sanitizers/ui/modules/scalc.suppr
@@ -1,3 +1,4 @@
+sc

Re: Implementing accessibility non-regression check tool

2018-01-18 Thread Samuel Thibault
Samuel Thibault, on jeu. 18 janv. 2018 12:36:49 +0100, wrote:
> We can discuss about it at the ESC call today.

Ok, that mail didn't get to the list before the call, so it didn't get
into the agenda and I didn't manage to speak in. We can probably start
discussing what we can on this list, and discuss next week then.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Implementing accessibility non-regression check tool

2018-01-19 Thread Samuel Thibault
Hello,

This is a small mail to briefly present the work we (Hypra) will be
doing for accessibility in LibreOffice.

Basically, the idea is to design a tool which will check .ui files for
accessibility issues: missing relations between widgets and labels,
notably. The tool would just use libxml to parse the files and emit
warnings for the found issues.

Such a tool could be called by the LibreOffice build system so that
developers get the warnings along other compiler warnings, and treated
the same way. It could also be used in Continuous Integration reports.

Of course, there are a lot of existing issues, so we plan to add support
for suppression rules, so that when the tool invocation is integrated,
we also integrate an initial set of suppression rules which allows to
start with a zero-warning state, and then for a start developers will
try to stay without warning, and progressively fix existing issues and
their corresponding suppression rules.

One of the remaining questions we have (it's not blocking for our
immediate development, though) is whether this tool should be integrated
within libreoffice, or within glade. The latter would both allow more
widespread use of the tool by other projects, and make the maintenance
happen there, thus less work for LibreOffice :)

We can discuss about it at the ESC call today.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-01-25 Thread Samuel Thibault
Hello,

Caolán McNamara, on jeu. 25 janv. 2018 15:31:34 +, wrote:
> FWIW, there is a little script in LibreOffice as bin/lint-ui.py which
> checks for various things. It doesn't do the above, but it does at
> least demo some simple .ui parsing.

Thanks!

Is there a particular codestyle that we should follow?  I didn't find
particular codestyle in various python script in LO, probably because
the python syntax already imposes quite a lot, and thus enough to get
homoegenous code?

> > One of the remaining questions we have (it's not blocking for our
> > immediate development, though) is whether this tool should be
> > integrated within libreoffice, or within glade. The latter would both
> > allow more widespread use of the tool by other projects, and make the
> > maintenance happen there, thus less work for LibreOffice :)
> 
> With glade would seem most natural, seeing as we just reuse the
> gtkbuilder file format which gtk uses. But if ends up as a relatively
> simple standalone script perhaps it just needs its own gitlab/github
> toplevel project and LibreOffice can pull it down from there if it
> wants to integrate it into our build

Ok, maybe we can start on our
https://git.hypra.fr/youpi/libreoffice-non-regressions repository for
now and see where to move it for better visibility and contributions
later.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-02-12 Thread Samuel Thibault
Hello,

So there was a presentation about this tool at FOSDEM, the video
recording is already available on
https://fosdem.org/2018/schedule/event/ode_testing/
Basically, the tool (improved a bit since FOSDEM) is currently reporting
about 8000 warnings, i.e. 8 per file on average. I have attached the
evolution over time, we clearly see the migration to .ui files during
4.0 :) Looking at a few .ui files, there are some false positives, but
not so many, and they are usually based on semantic, so they wouldn't be
detectable anyway, one needs to mark them as such anyway. There are some
errors too (parsing error or missing targets), they are quite rare.

We have discussed with various people at FOSDEM about their feeling
on it, and thought how to proceed from there. Our goal is to achieve
zero-regression and fixing existing issues on the long run, while
avoiding to bother developers too hard. Our fears is that the tool might
produce too many false positives, that people need to be taught how to
fix the true positives, and that we don't want to do several a11y-fix
passes over all .ui files.

We thought about the following planning, step by step:

- Add to the build process error checking (only the hard errors such as
bogus target names). There are only a few existing issues, so we can fix
them alongside, and people won't introduce many, so making them errors
already shouldn't be bothering.

- Add to make check warning checking, one kind of warning at a time,
with suppression files alongside, so that the tool only displays "
suppressed warnings" and new warnings introduced by developers from
there. These warnings would point to wiki pages explaining the ins and
outs of the issues and how to fix them. Introducing warnings one kind
of warning at a time should leave time to developers for learning the
accessibility rules progressively. It should also allow to observe how
well false positives are treated before enabling all warnings.

- When we get more and more confident that warnings are solid, we can
make them fatal (one kind at a time), to really enforce non-regression.

- At the same time, we would work on fixing issues raised by the tool on
some set of dialog boxes, to check that fixing them does provide good
accessibility, and to what extent we want to introduce more warnings to
reach good accessibility.

- At some point we'll get confident that we won't introduce other
big classes of warnings over hundreds of .ui files. That's the point
where we can say "ok, let's start fixing the existing issues over
all .ui files once for good". We can then run through .ui files one
by one, fixing the issues and removing the corresponding suppression
lines. These could be used as "easy hacks" entries, they are usually
just a few lines to fix.

The progression of all of this could be monitored with statistics
reported e.g. in the minutes of ESC calls.

What do people think about this plan?

Samuel


libreoffice.eps
Description: PostScript document
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-02-16 Thread Samuel Thibault
Miklos Vajna, on ven. 16 févr. 2018 09:24:38 +0100, wrote:
> On Thu, Feb 15, 2018 at 06:58:42PM +0100, Samuel Thibault 
> <sthiba...@hypra.fr> wrote:
> > For now I have patched the build system to call the tool as the attached
> > patch does, does it look OK? (basically it's called along building the
> > image list in the UIC rule, I need to doublecheck the clean rule, but
> > the build rule works fine)
> 
> Please submit patches to gerrit:
> <https://wiki.documentfoundation.org/Development/gerrit>, it's much
> easier to review anything there. :-)

For reviews, sure, I'm here just asking whether the general approach is
fine, not an actual review of the implementation.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Samuel Thibault license statement

2018-02-15 Thread Samuel Thibault
Hello,

All of my past & future contributions to LibreOffice may be
licensed under the MPLv2/LGPLv3+ dual license.

Cheers,
Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: bin/gla11y config_host.mk.in configure.ac solenv/gbuild

2018-02-21 Thread Samuel Thibault
Hello,

Rene Engelhard, on mer. 21 févr. 2018 09:11:02 +0100, wrote:
> Was this ever really tested besides Jenkins (no idea with what build
> config this was tested...)?

I did test it, but apparently not in all potential situations.

> > diff --git a/bin/gla11y b/bin/gla11y
> > new file mode 100755
> > index ..d0619133ad0f
> > --- /dev/null
> > +++ b/bin/gla11y
> > @@ -0,0 +1,216 @@
> > +#!/usr/bin/env python
> 
> That's "python". Python2.

It works with either python2 or python3

> > +AC_MSG_CHECKING([for python lxml])
> > +if $PYTHON -c "import lxml.etree as ET" ; then
> 
> Here it checks for lxml in the system python. This is a a 3.x.
> Because for python3-uno in Debian, of course python3 is used.
> And LOs internal python also is python3. 
> 
> But the actual script (see above) calls "python" and not "python3"

Mmm, so we should make it a .py.in file to be able to put @PYTHON@ in the 
script?

> Even if installing python-xml (for the actual script) and python3
> (for the configure check) it complains about no input files or somesuch
> and fails

Indeed, I sent a fix for that

https://gerrit.libreoffice.org/50071

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: bin/gla11y config_host.mk.in configure.ac solenv/gbuild

2018-02-21 Thread Samuel Thibault
Stephan Bergmann, on mer. 21 févr. 2018 09:26:03 +0100, wrote:
> Drop the shebang line and call it as `$(PYTHON) $(SRCDIR)/bin/gla11y` from
> the makefile?

It's still be useful to keep the shebang for people to be also able to
run it directly as shell command, but we can force the python shell from
the makefile indeed, will submit that.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: accessibility/source

2018-02-21 Thread Samuel Thibault
 accessibility/source/standard/vclxaccessibleedit.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit fa775ed30ad8969dacca34ddb63b76a89d8ba7da
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Tue Feb 20 13:55:53 2018 +0100

tdf#86661 a11y: give ROLE_LABEL to read-only edit

ROLE_TEXT is for editable text, ROLE_LABEL should be used for static text,
so that screen readers know they should speak it.

Change-Id: I8f781a42a2838f641ccdfe7310046d74f9faced6
Reviewed-on: https://gerrit.libreoffice.org/50052
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx 
b/accessibility/source/standard/vclxaccessibleedit.cxx
index 65f1c2817bce..17146ae2518c 100644
--- a/accessibility/source/standard/vclxaccessibleedit.cxx
+++ b/accessibility/source/standard/vclxaccessibleedit.cxx
@@ -218,6 +218,8 @@ sal_Int16 VCLXAccessibleEdit::getAccessibleRole(  )
 VclPtr< Edit > pEdit = GetAs< Edit >();
 if ( pEdit && ( ( pEdit->GetStyle() & WB_PASSWORD ) || 
pEdit->GetEchoChar() ) )
 nRole = AccessibleRole::PASSWORD_TEXT;
+else if ( pEdit && ( pEdit->GetStyle() & WB_READONLY ) )
+nRole = AccessibleRole::LABEL;
 else
 nRole = AccessibleRole::TEXT;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - accessibility/source

2018-02-21 Thread Samuel Thibault
 accessibility/source/standard/vclxaccessibleedit.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit b1c0169fa7079d1701625ce4f05d871093b482fc
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Tue Feb 20 13:55:53 2018 +0100

tdf#86661 a11y: give ROLE_LABEL to read-only edit

ROLE_TEXT is for editable text, ROLE_LABEL should be used for static text,
so that screen readers know they should speak it.

Change-Id: I8f781a42a2838f641ccdfe7310046d74f9faced6
Reviewed-on: https://gerrit.libreoffice.org/50052
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
(cherry picked from commit fa775ed30ad8969dacca34ddb63b76a89d8ba7da)
Reviewed-on: https://gerrit.libreoffice.org/50099

diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx 
b/accessibility/source/standard/vclxaccessibleedit.cxx
index 4a85ab8797f1..c5a894e4e3ec 100644
--- a/accessibility/source/standard/vclxaccessibleedit.cxx
+++ b/accessibility/source/standard/vclxaccessibleedit.cxx
@@ -223,6 +223,8 @@ sal_Int16 VCLXAccessibleEdit::getAccessibleRole(  )
 VclPtr< Edit > pEdit = GetAs< Edit >();
 if ( pEdit && ( ( pEdit->GetStyle() & WB_PASSWORD ) || 
pEdit->GetEchoChar() ) )
 nRole = AccessibleRole::PASSWORD_TEXT;
+else if ( pEdit && ( pEdit->GetStyle() & WB_READONLY ) )
+nRole = AccessibleRole::LABEL;
 else
 nRole = AccessibleRole::TEXT;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac solenv/gbuild

2018-02-22 Thread Samuel Thibault
 configure.ac  |2 +-
 solenv/gbuild/UIConfig.mk |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6a9f851e54f416820c61baf8caa79e4d91c8c61f
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Feb 21 10:45:02 2018 +0100

gla11y: Use python interpreter decided by configure

configure uses $PYTHON to determine lxml availability, so the make rule
should use the same instead of letting gla11y find a python interpreter
through "env", in case e.g. $PYTHON is python3, and lxml is available in
python3 but not in python (actually python2).

Along the way, rather use PYTHON_FOR_BUILD for coherency.

Change-Id: Ied4c05aca462cc16685c61f36b56bb9e8612d90e
Reviewed-on: https://gerrit.libreoffice.org/50087
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/configure.ac b/configure.ac
index 58451b4912c7..8b624c3ded46 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8154,7 +8154,7 @@ system)
 SYSTEM_PYTHON=TRUE
 
 AC_MSG_CHECKING([for python lxml])
-if $PYTHON -c "import lxml.etree as ET" ; then
+if $PYTHON_FOR_BUILD -c "import lxml.etree as ET" ; then
 PYTHON_LXML=TRUE
 AC_MSG_RESULT([yes])
 else
diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index fb8762e8a09c..9665dcaf9d18 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -94,7 +94,7 @@ endef
 # * UIConfig/ containing all nontranslatable files
 
 gb_UIConfig_INSTDIR := $(LIBO_SHARE_FOLDER)/config/soffice.cfg
-gb_UIConfig_a11yerrors_COMMAND = $(SRCDIR)/bin/gla11y
+gb_UIConfig_a11yerrors_COMMAND = $(PYTHON_FOR_BUILD) $(SRCDIR)/bin/gla11y
 
 $(dir $(call gb_UIConfig_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: bin/gla11y config_host.mk.in configure.ac solenv/gbuild

2018-02-22 Thread Samuel Thibault
Hello,

Miklos Vajna, on jeu. 22 févr. 2018 09:53:43 +0100, wrote:
> On Wed, Feb 21, 2018 at 10:11:18AM +0100, Samuel Thibault 
> <sthiba...@hypra.fr> wrote:
> > Rene Engelhard, on mer. 21 févr. 2018 10:02:08 +0100, wrote:
> > > OK, thanks - and then I wonder why this is ran in "normal" UIConfig 
> > > targets and
> > > not only in make check...
> > For the "error" cases (-W none), it makes sense: 
> > 
> > « Add to the build process error checking (only the hard errors such as
> > bogus target names). »
> > 
> > That's really the kind of issues one should get as soon as compilation
> > time.
> > 
> > Later on I'll add a call in "make check" time for the warnings.
> 
> For source code we have warnings for these linter type problems

Err, these are not just "linter type problems". They are undefined
references, just like undefined C references. So the failure belongs to
compilation time. If somebody modifies a .ui file in a way that gets
such undefined reference, compilation itself should really fail, just
like it does when a variable defintion is missing.

The "make check" warnings I mentioned above are *other* kinds of issues,
which would indeed only be tested within make check, made warnings by
default, and turned into errors by Jenkins.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-02-22 Thread Samuel Thibault
Stephan Bergmann, on jeu. 22 févr. 2018 16:36:44 +0100, wrote:
>  I have e.g. no idea whether/how
> it's possible to tell that lxml setup.py which libxml2/libxslt to use.

That was indeed a missing part in my patch, it's a mere setup.py option
which does work fine.

> (And whether e.g. the external/{libxml2,libxslt} case will require
> some extra scaffolding at the calling site of gla11y in UIConfig.mk.)

This is already handled with LD_LIBRARY_PATH on programs/

> Just be warned. ;)

Sure, I'm not saying that the plumbing is completely trivial :)

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Invoking gla11y [was: core.git: bin/gla11y config_host.mk.in configure.ac solenv/gbuild]

2018-02-22 Thread Samuel Thibault
Stephan Bergmann, on jeu. 22 févr. 2018 18:03:28 +0100, wrote:
> Does that make sense?

Yes, thanks for making these clear :)

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Invoking gla11y [was: core.git: bin/gla11y config_host.mk.in configure.ac solenv/gbuild]

2018-02-22 Thread Samuel Thibault
Stephan Bergmann, on jeu. 22 févr. 2018 16:43:37 +0100, wrote:
> On 22.02.2018 13:54, Samuel Thibault wrote:
> > Miklos Vajna, on jeu. 22 févr. 2018 09:53:43 +0100, wrote:
> > > On Wed, Feb 21, 2018 at 10:11:18AM +0100, Samuel Thibault 
> > > <sthiba...@hypra.fr> wrote:
> > > > Rene Engelhard, on mer. 21 févr. 2018 10:02:08 +0100, wrote:
> > > > > OK, thanks - and then I wonder why this is ran in "normal" UIConfig 
> > > > > targets and
> > > > > not only in make check...
> > > > For the "error" cases (-W none), it makes sense:
> > > > 
> > > > « Add to the build process error checking (only the hard errors such as
> > > > bogus target names). »
> > > > 
> > > > That's really the kind of issues one should get as soon as compilation
> > > > time.
> > > > 
> > > > Later on I'll add a call in "make check" time for the warnings.
> > > 
> > > For source code we have warnings for these linter type problems
> > 
> > Err, these are not just "linter type problems". They are undefined
> > references, just like undefined C references. So the failure belongs to
> > compilation time. If somebody modifies a .ui file in a way that gets
> > such undefined reference, compilation itself should really fail, just
> > like it does when a variable defintion is missing.
> > 
> > The "make check" warnings I mentioned above are *other* kinds of issues,
> > which would indeed only be tested within make check, made warnings by
> > default, and turned into errors by Jenkins.
> 
> I don't understand the "turned into errors by Jenkins" part.  How would that
> be done?
> 
> (And `make check` should ideally be "silent".  We do not want it to produce
> any non-fatal warnings.)

Well, perhaps I didn't understand what Miklos meant, then.

Miklos Vajna, on jeu. 22 févr. 2018 09:53:43 +0100, wrote:
> For source code we have warnings for these linter type problems and then
> --enable-werror (Jenkins uses it) turns those warnings into errors.
> 
> Probably the best would be if the .ui checker would follow the same
> pattern, instead of running it twice during 'make check' (which is a
> superset of 'make').

What I had understood from that was that at "make" time there are only
compiler errors, and at "make check" time there are linter warnings, and
in Jenkins, --enable-werror is used to turn these warnings into errors.

Now that I re-read it with what you said, I understand that

- at "make" time there are some compiler warnings which are turned into
errors in Jenkins with --enable-werror
- Miklos suggested that we only call gla11y at "make" time, and not a
second time at "make check" time.

I'm fine with emitting accessibility warnings at "make" time and let
Jenkins turning them into errors, I just thought from the discussions at
FOSDEM that they should be done at "make check" time.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-02-22 Thread Samuel Thibault
Michael Stahl, on jeu. 22 févr. 2018 16:59:21 +0100, wrote:
> On 22.02.2018 16:36, Stephan Bergmann wrote:
> > I was more hoping that there might be an established plain Python option 
> > for XML processing?
> 
> FWIW, there is at least xml.etree.ElementTree and xml.dom.minidom in the
> CPython bundled libs.
> 
> https://docs.python.org/3/library/xml.etree.elementtree.html
> https://docs.python.org/3/library/xml.dom.minidom.html

An issue with these is that they do not keep source line numbers of the
nodes.  That's really concerning for providing useful information to
the programmer.  We will be bothering them with new warnings that they
will have to learn about ; if we don't provide with line numbers, they
will get rightfully angry :) We could fallback to only providing the
class and id of the suspected widget. In some cases we have seen no id
defined, and thus no pointer to give to the programmer.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-02-23 Thread Samuel Thibault
Khaled Hosny, on sam. 24 févr. 2018 01:02:29 +0200, wrote:
> On Thu, Feb 22, 2018 at 04:13:42PM +0100, Samuel Thibault wrote:
> > Stephan Bergmann, on jeu. 22 févr. 2018 15:49:40 +0100, wrote:
> > > That means external/lxml will need to:
> > > 
> > > * build against and run with either the system Python or the locally-built
> > > one from external/python3,
> > > 
> > > * build against and run with either the system libxml2/libxslt or the
> > > locally-built one from external/{libxml2,libxslt}.
> > > 
> > > That's four different ways how to build external/lxml, and slightly more
> > > different ways (using the system lxml versus external/lxml) how to run the
> > > gla11y tool in solenv/gbuild/UIConfig.mk.  And getting all those ways to
> > > work, on the different platforms, will be hell.
> > 
> > Well, python, libxml2 and libxslt are very-well-established projects
> > with a huge lot of reverse dependencies, and thus they have to take
> > backward compatibility into extremely careful consideration. I thus
> > don't fear too much problems building lxml against various versions of
> > them.
> > 
> > (and the current building issue reported in gerrit 50115 is merely that
> > the current LO python3 module doesn't install any header file or such)
> > 
> > > Isn't there another option to make that gla11y tool process XML data, one
> > > that better matches LO's needs?
> > 
> > Well, we can reimplement the world for sure.
> 
> “import xml.etree.ElementTree as ET” (which is part of Python standard
> library) not good enough?

“
An issue with these is that they do not keep source line numbers of the
nodes.  That's really concerning for providing useful information to
the programmer.  We will be bothering them with new warnings that they
will have to learn about ; if we don't provide with line numbers, they
will get rightfully angry :) We could fallback to only providing the
class and id of the suspected widget. In some cases we have seen no id
defined, and thus no pointer to give to the programmer.
”
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-02-23 Thread Samuel Thibault
Samuel Thibault, on jeu. 22 févr. 2018 17:22:26 +0100, wrote:
> Michael Stahl, on jeu. 22 févr. 2018 16:59:21 +0100, wrote:
> > On 22.02.2018 16:36, Stephan Bergmann wrote:
> > > I was more hoping that there might be an established plain Python option 
> > > for XML processing?
> > 
> > FWIW, there is at least xml.etree.ElementTree and xml.dom.minidom in the
> > CPython bundled libs.
> > 
> > https://docs.python.org/3/library/xml.etree.elementtree.html
> > https://docs.python.org/3/library/xml.dom.minidom.html
> 
> An issue with these is that they do not keep source line numbers of the
> nodes.  That's really concerning for providing useful information to
> the programmer.

Also, they do not provide get_parent(), which makes it difficult to get
the XML path to generate suppressions: one has to parse the whole tree
to find where the culprit element is. I have benchmarked a bit over
the whole set of libreoffice .ui files with all thousands of warnings
triggered, this gets from 5s to 27s of processing time. That is still
very reasonable, so why not (and that will reduce once warnings are
fixed :) )

Now, it happens that the lxml build on windows seems hard, it's
apparently not actually supported by upstream :/

One thing that could be done is to make gla11y work with either
python's implementation and lxml's implementation (that's really easy),
and not build lxml on windows platforms.  That'd mean that windows
developers don't have .ui line information, only ids (unless they use
a system python with lxml), while unix developers always have .ui line
information.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-02-15 Thread Samuel Thibault
Hello,

For now I have patched the build system to call the tool as the attached
patch does, does it look OK? (basically it's called along building the
image list in the UIC rule, I need to doublecheck the clean rule, but
the build rule works fine)

Samuel
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index 688f596..cc9f7bf 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -272,6 +272,10 @@ define gb_Helper_get_imagelists
 $(foreach ui,$(gb_UIConfig_REGISTERED),$(call 
gb_UIConfig_get_imagelist_target,$(ui)))
 endef
 
+define gb_Helper_get_a11yerrors
+$(foreach ui,$(gb_UIConfig_REGISTERED),$(call 
gb_UIConfig_get_a11yerrors_target,$(ui)))
+endef
+
 # call 
gb_Helper_replace_if_different_and_touch,source,target,optional-touch-reference-file
 define gb_Helper_replace_if_different_and_touch
 if cmp -s $(1) $(2); then rm $(1); \
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index a831065..26bbf7f 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -156,6 +156,7 @@ gb_ScpTemplateTarget_get_target = $(abspath 
$(WORKDIR)/ScpTemplateTarget/$(dir $
 gb_SdiTarget_get_target = $(WORKDIR)/SdiTarget/$(1)
 gb_ThesaurusIndexTarget_get_target = 
$(WORKDIR)/ThesaurusIndexTarget/$(basename $(1)).idx
 gb_UIConfig_get_imagelist_target = $(WORKDIR)/UIConfig/$(1).ilst
+gb_UIConfig_get_a11yerrors_target = $(WORKDIR)/UIConfig/$(1).a11yerrors
 gb_UIConfig_get_target = $(WORKDIR)/UIConfig/$(1).done
 gb_UIImageListTarget_get_target = $(WORKDIR)/UIImageListTarget/$(1).ilst
 gb_UIMenubarTarget_get_target = $(WORKDIR)/UIMenubarTarget/$(1).xml
@@ -280,6 +281,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
CppunitTestFakeExecutable \
CustomTarget \
ExternalProject \
+   UIA11YErrors \
UIConfig \
UIImageListTarget \
UIMenubarTarget \
diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 01bfdba..53235c3 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -94,6 +94,7 @@ endef
 # * UIConfig/ containing all nontranslatable files
 
 gb_UIConfig_INSTDIR := $(LIBO_SHARE_FOLDER)/config/soffice.cfg
+gb_UIConfig_a11yerrors_COMMAND = $(SRCDIR)/bin/gla11y
 
 $(dir $(call gb_UIConfig_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
@@ -101,7 +102,7 @@ $(dir $(call gb_UIConfig_get_target,%)).dir :
 $(dir $(call gb_UIConfig_get_target,%))%/.dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
 
-$(call gb_UIConfig_get_target,%) : $(call gb_UIConfig_get_imagelist_target,%)
+$(call gb_UIConfig_get_target,%) : $(call gb_UIConfig_get_imagelist_target,%) 
$(call gb_UIConfig_get_a11yerrors_target,%)
$(call gb_Output_announce,$*,$(true),UIC,2)
$(call gb_Helper_abbreviate_dirs,\
touch $@ \
@@ -110,6 +111,16 @@ $(call gb_UIConfig_get_target,%) : $(call 
gb_UIConfig_get_imagelist_target,%)
 $(call gb_UIConfig_get_imagelist_target,%) :
$(call gb_UIConfig__command)
 
+define gb_UIConfig_a11yerrors__command
+$(call gb_Output_announce,$(2),$(true),UIA,1)
+$(call gb_Helper_abbreviate_dirs,\
+   $(gb_UIConfig_a11yerrors_COMMAND) $(UIFILE) > $@
+)
+endef
+
+$(call gb_UIConfig_get_a11yerrors_target,%) :
+   $(call gb_UIConfig_a11yerrors__command,$@,$*)
+
 .PHONY : $(call gb_UIConfig_get_clean_target,%)
 $(call gb_UIConfig_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),UIC,2)
@@ -117,6 +128,11 @@ $(call gb_UIConfig_get_clean_target,%) :
rm -f $(call gb_UIConfig_get_target,$*) \
)
 
+.PHONY : $(call gb_UIA11YErrorsTarget_get_clean_target,%)
+$(call gb_UIA11YErrorsTarget_get_clean_target,%) :
+   $(call gb_Output_announce,$*,$(false),UIA,2)
+   rm -f $(call gb_UIConfig_get_a11yerrors_target,$*)
+
 gb_UIConfig_get_packagename = UIConfig/$(1)
 gb_UIConfig_get_packagesetname = UIConfig/$(1)
 
@@ -138,6 +154,7 @@ $(call gb_PackageSet_add_package,$(call 
gb_UIConfig_get_packagesetname,$(1)),$(c
 
 $(call gb_UIConfig_get_target,$(1)) :| $(dir $(call 
gb_UIConfig_get_target,$(1))).dir
 $(call gb_UIConfig_get_imagelist_target,$(1)) :| $(dir $(call 
gb_UIConfig_get_imagelist_target,$(1))).dir
+$(call gb_UIConfig_get_a11yerrors_target,$(1)) :| $(dir $(call 
gb_UIConfig_get_a11yerrors_target,$(1))).dir
 $(call gb_UIConfig_get_target,$(1)) : $(call gb_PackageSet_get_target,$(call 
gb_UIConfig_get_packagesetname,$(1)))
 $(call gb_UIConfig_get_clean_target,$(1)) : $(call 
gb_PackageSet_get_clean_target,$(call gb_UIConfig_get_packagesetname,$(1)))
 
@@ -168,6 +185,9 @@ $(call gb_UIConfig_get_imagelist_target,$(1)) : 
UI_IMAGELISTS += $(call gb_UIIma
 $(call gb_UIConfig_get_imagelist_target,$(1)) : $(call 
gb_UIImageListTarget_get_target,$(2))
 $(call gb_UIConfig_get_clean_target,$(1)) : $(call 
gb_UIImageListTarget_get_clean_target,$(2))
 
+$(call gb_UIConfig_get_a11yerrors_target,$(1)) : UIFILE := $(SRCDIR)/$(2).ui
+$(call 

Re: Invoking gla11y [was: core.git: bin/gla11y config_host.mk.in configure.ac solenv/gbuild]

2018-02-23 Thread Samuel Thibault
Stephan Bergmann, on jeu. 22 févr. 2018 18:03:28 +0100, wrote:
> Now, gla11y shall do two things:
> 
> 1  Find newly introduced bugs in .ui files.
> 
> 2  Find existing bugs in .ui files

For now, I have pushed this to gerrit
https://gerrit.libreoffice.org/50251

It introduces the suppresion mechanism and a suppression file for each
module. The build is silent except some

0 new error (2 suppressed by 
/mnt/sthibault/libreoffice/solenv/sanitizers/ui/svt.suppr)

I was indeed thinking that we could have a target which just runs gla11y
on all modules with ui files. I'm just not sure how it should plug into
makefiles, I guess just adding to gbuild_TARGETS but put the rules in
solenv/gbuild/UIConfig.mk?

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: bin/gla11y

2018-02-21 Thread Samuel Thibault
 bin/gla11y |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit ccadc6d4a5fab687434a0972862d49f77328c6c9
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Feb 21 00:12:45 2018 +0100

gla11y: do not fail when not passed any .ui file

This avoids build failures when a directory uses UIConfig but does not add
any ui file.

Change-Id: I63413f87fc5515ffb9e3dd9baf25c6a4ba70c2be
Reviewed-on: https://gerrit.libreoffice.org/50071
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/bin/gla11y b/bin/gla11y
index d0619133ad0f..fc06fac7da01 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -186,9 +186,6 @@ def main():
 elif a == "none":
 Wnone = True
 
-if not args:
-sys.exit("%s: no input files" % progname)
-
 for filename in args:
 try:
 tree = ET.parse(filename)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: bin/gla11y config_host.mk.in configure.ac solenv/gbuild

2018-02-21 Thread Samuel Thibault
Rene Engelhard, on mer. 21 févr. 2018 10:02:08 +0100, wrote:
> On Wed, Feb 21, 2018 at 09:19:51AM +0100, Samuel Thibault wrote:
> > > Even if installing python-xml (for the actual script) and python3
> > > (for the configure check) it complains about no input files or somesuch
> > > and fails
> > 
> > Indeed, I sent a fix for that
> > 
> > https://gerrit.libreoffice.org/50071
> 
> OK, thanks - and then I wonder why this is ran in "normal" UIConfig targets 
> and
> not only in make check...

For the "error" cases (-W none), it makes sense: 

« Add to the build process error checking (only the hard errors such as
bogus target names). »

That's really the kind of issues one should get as soon as compilation
time.

Later on I'll add a call in "make check" time for the warnings.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: bin/gla11y config_host.mk.in configure.ac solenv/gbuild

2018-02-20 Thread Samuel Thibault
 bin/gla11y   |  216 +++
 config_host.mk.in|1 
 configure.ac |   10 +
 solenv/gbuild/TargetLocations.mk |2 
 solenv/gbuild/UIConfig.mk|   26 
 5 files changed, 254 insertions(+), 1 deletion(-)

New commits:
commit 226697ae27ef451cad404256e83eef88262f16d1
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri Feb 16 13:22:10 2018 +0100

Integrate initial version of gla11y tool in the build system

This is part of integrating an accessibility non-regression tool. This
adds checks in configure.ac for the presence of python lxml which we will
need, and adds support for calling the tool at build time, to check for
definite UI errors. For now, that only emits errors for missing or duplicate
accessibility relation targets, and senseless relations: a label being
mnemonic for several widgets.

Change-Id: Idda91b15b9a9e0322d16db33dfac8e03f2aa518c
Reviewed-on: https://gerrit.libreoffice.org/49856
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/bin/gla11y b/bin/gla11y
new file mode 100755
index ..d0619133ad0f
--- /dev/null
+++ b/bin/gla11y
@@ -0,0 +1,216 @@
+#!/usr/bin/env python
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Copyright (c) 2018 Martin Pieuchot
+#   Copyright (c) 2018 Samuel Thibault <sthiba...@hypra.fr>
+#
+#   Permission to use, copy, modify, and distribute this software for any
+#   purpose with or without fee is hereby granted, provided that the above
+#   copyright notice and this permission notice appear in all copies.
+#
+#   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+#   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+#   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+#   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+#   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+#   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+#   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
+
+# Take LibreOffice (glade) .ui files and check for non accessible widgets
+
+from __future__ import print_function
+
+import os
+import sys
+import getopt
+import lxml.etree as ET
+
+progname = os.path.basename(sys.argv[0])
+Werror = False
+Wnone = False
+errors = 0
+warnings = 0
+
+
+def errstr(elm):
+"""
+Print the line number of the element
+"""
+
+return str(elm.sourceline)
+
+def err(filename, elm, msg):
+global errors
+
+if elm == None:
+prefix = "%s:" % filename
+else:
+prefix = "%s:%s" % (filename, errstr(elm))
+
+errors += 1
+msg = "%s ERROR: %s" % (prefix, msg)
+print(msg.encode('ascii', 'ignore'))
+
+
+def warn(filename, elm, msg):
+global Werror, Wnone, errors, warnings
+
+if Wnone:
+return
+
+prefix = "%s:%s" % (filename, errstr(elm))
+
+if Werror:
+errors += 1
+else:
+warnings += 1
+
+msg = "%s WARNING: %s" % (prefix,  msg)
+print(msg.encode('ascii', 'ignore'))
+
+
+def check_objects(filename, elm, objects, target):
+"""
+Check that objects contains exactly one object
+"""
+length = len(list(objects))
+if length == 0:
+err(filename, elm, "use of undeclared target '%s'" % target)
+elif length > 1:
+err(filename, elm, "sevral targets are named '%s'" % target)
+
+def check_props(filename, root, props):
+"""
+Check the given list of relation properties
+"""
+for prop in props:
+objects = root.iterfind(".//object[@id='%s']" % prop.text)
+check_objects(filename, prop, objects, prop.text)
+
+def check_rels(filename, root, rels):
+"""
+Check the given list of relations
+"""
+for rel in rels:
+target = rel.attrib['target']
+targets = root.iterfind(".//object[@id='%s']" % target)
+check_objects(filename, rel, targets, target)
+
+def check_a11y_relation(filename, root):
+"""
+Emit an error message if any of the 'object' elements of the XML
+document represented by `root' doesn't comply with Accessibility
+rules.
+""

[Libreoffice-commits] core.git: Makefile.in

2018-02-19 Thread Samuel Thibault
 Makefile.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8d4d2bf5405ef9d4b0b126f96f882f01031defd6
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Thu Feb 15 15:08:03 2018 +0100

Fix specific targets for UIConfig submodules

For instance,

make UIConfig_uui

allows to run the UIConfig target for the uui module. Submodules are called
for instance modules/swriter, but

make UIConfig_modules/swriter

was not working only because the main Makefile didn't include the generic
target.  This adds the generic target, thus fixing the issue.

Change-Id: I6825fa5bf0daa4d964bea651841e8fac318fe068
Reviewed-on: https://gerrit.libreoffice.org/49825
Reviewed-by: Michael Stahl <mst...@redhat.com>
Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/Makefile.in b/Makefile.in
index 2b7b4e2a7125..3fb86acf4dc1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -162,7 +162,7 @@ gbuild_TARGETS := AllLangHelp \
Zip \
 
 # build a generic gbuild target
-$(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach 
module,$(gbuild_modules),$(target)_$(module)/%)) %.genpatch: bootstrap fetch
+$(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach 
module,$(gbuild_modules),$(target)_$(module)/%)) UIConfig_modules/% %.genpatch: 
bootstrap fetch
$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile.gbuild $@
 
 #
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Implementing accessibility non-regression check tool

2018-02-22 Thread Samuel Thibault
Stephan Bergmann, on jeu. 22 févr. 2018 15:49:40 +0100, wrote:
> That means external/lxml will need to:
> 
> * build against and run with either the system Python or the locally-built
> one from external/python3,
> 
> * build against and run with either the system libxml2/libxslt or the
> locally-built one from external/{libxml2,libxslt}.
> 
> That's four different ways how to build external/lxml, and slightly more
> different ways (using the system lxml versus external/lxml) how to run the
> gla11y tool in solenv/gbuild/UIConfig.mk.  And getting all those ways to
> work, on the different platforms, will be hell.

Well, python, libxml2 and libxslt are very-well-established projects
with a huge lot of reverse dependencies, and thus they have to take
backward compatibility into extremely careful consideration. I thus
don't fear too much problems building lxml against various versions of
them.

(and the current building issue reported in gerrit 50115 is merely that
the current LO python3 module doesn't install any header file or such)

> Isn't there another option to make that gla11y tool process XML data, one
> that better matches LO's needs?

Well, we can reimplement the world for sure.

More seriously, we can of course at least depend only on libxml2. Not
depending on a higher-level library, however, means to have to
reimplement all the tree browsing functions needed to reach the pieces
of .ui files.  And avoiding python means, writing all of this in C?
That's neither fun nor easy to extend for further .ui checking.  The
eventual script we plan to integrate is only about 300 lines of python.
I'm scared by the maintenance of the equivalent without using python and
lxml more than maintenance of building lxml.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: configure.ac

2018-02-23 Thread Samuel Thibault
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1f3dd8f60c60f2a18a64aee332acc09b1870ee07
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri Feb 23 11:50:28 2018 +0100

Fix --enable-python documentation

python is always used at build-time. Saying that --disable-python disables
python support at build-time is confusing.

Change-Id: Ic7206c832b1cf3ee41d67152198660c13aa86652
Reviewed-on: https://gerrit.libreoffice.org/50229
Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
Tested-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/configure.ac b/configure.ac
index 8b624c3ded46..245aa7724434 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1179,7 +1179,7 @@ AC_ARG_ENABLE(lto,
 
 AC_ARG_ENABLE(python,
 AS_HELP_STRING([--enable-python=],
-[Enables or disables Python support at run-time and build-time.
+[Enables or disables Python support at run-time.
  Also specifies what Python to use. 'auto' is the default.
  'fully-internal' even forces the internal version for uses of Python
  during the build.]))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: What does weld do for libreoffice

2018-06-21 Thread Samuel Thibault
Hello,

BTW, I see that you have been tackling gla11y warnings along the way.  I
wonder how well it went?  Are there improvements you think we could make
to help dealing with them?  We want it to be a help, not a burden :)

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sd/uiconfig solenv/gbuild

2018-06-21 Thread Samuel Thibault
 sd/uiconfig/simpress/ui/notebookbar.ui |2 +-
 solenv/gbuild/UIConfig.mk  |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 62040f7cd65986b68054b1e17157af6b96f2be33
Author: Samuel Thibault 
Date:   Wed Jun 13 13:59:13 2018 +0200

simpress: Fix duplicate ID in notebookbar.ui

and enable the corresponding gla11y warning

Change-Id: Iabf850f6831cb7d269aa74c9ab50461d35871a16
Reviewed-on: https://gerrit.libreoffice.org/55750
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sd/uiconfig/simpress/ui/notebookbar.ui 
b/sd/uiconfig/simpress/ui/notebookbar.ui
index cee0e4868eb0..f04e31458b1e 100644
--- a/sd/uiconfig/simpress/ui/notebookbar.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar.ui
@@ -6739,7 +6739,7 @@
 False
 1
 
-  
+  
 True
 False
 center
diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 6113161d970d..1ebb9c3e5d48 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -163,6 +163,7 @@ gb_UIConfig_gla11y_PARAMETERS += --enable-type orphan-label
 gb_UIConfig_gla11y_PARAMETERS += --enable-type undeclared-target
 gb_UIConfig_gla11y_PARAMETERS += --enable-type missing-label-for
 gb_UIConfig_gla11y_PARAMETERS += --enable-type missing-labelled-by
+gb_UIConfig_gla11y_PARAMETERS += --enable-type duplicate-id
 
 # These are often buttons with only an image
 gb_UIConfig_gla11y_PARAMETERS += --enable-type button-no-label
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Implementing accessibility non-regression check tool

2018-08-28 Thread Samuel Thibault
Hello,

Samuel Thibault, le lun. 12 févr. 2018 15:30:59 +0100, a ecrit:
> - At some point we'll get confident that we won't introduce other
> big classes of warnings over hundreds of .ui files. That's the point
> where we can say "ok, let's start fixing the existing issues over
> all .ui files once for good". We can then run through .ui files one
> by one, fixing the issues and removing the corresponding suppression
> lines. These could be used as "easy hacks" entries, they are usually
> just a few lines to fix.

I believe we have gotten to this point, and it can now be time to start
fixing warnings.  I have completed documentation on fixing them on

https://wiki.documentfoundation.org/Development/Accessibility

and notably

https://wiki.documentfoundation.org/Development/Accessibility#Fixing_existing_issues

provides this kind of procedure to fix warnings: just remove suppression
rules for a .ui file, fix warnings in the .ui file or mark them as false
positives, submit the result, and move on to another .ui file.

Could people check this documentation before we advertise it more
broadly as an "easy hack"?

> The progression of all of this could be monitored with statistics
> reported e.g. in the minutes of ESC calls.

They could be gathered from e.g. the nightly build logs by grepping for

"\([0-9]+\) suppressed by .*\.suppr"

and adding the figures. I however don't know where such scripts live or
even their language :)

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-08-29 Thread Samuel Thibault
Jan-Marek Glogowski, le mer. 29 août 2018 06:53:52 +, a ecrit:
> Am August 28, 2018 4:04:37 PM UTC schrieb Samuel Thibault 
> :
> >Samuel Thibault, le lun. 12 févr. 2018 15:30:59 +0100, a ecrit:
> >> - At some point we'll get confident that we won't introduce other
> >> big classes of warnings over hundreds of .ui files. That's the point
> >> where we can say "ok, let's start fixing the existing issues over
> >> all .ui files once for good". We can then run through .ui files one
> >> by one, fixing the issues and removing the corresponding suppression
> >> lines. These could be used as "easy hacks" entries, they are usually
> >> just a few lines to fix.
> 
> I'm not sure we want this handled as "easy hacks". The goal was to enable the 
> checks always for the build. Is this implemented and can I enable it?

The checks are already enabled, and any new issue will fail the
build.  The goal now is to fix existing issues (currently suppressed by
suppression rules).

> My preferred solution would be, that generating the error files in the 
> current build wouldn't break it, but spill the errors to the console to annoy 
> people, to get this fixed in time. Mind I have no ideas about the amount of 
> output / the current state.

The current amount of warnings is ~2000 lines, so I don't think we want
to just enable it: new warnings (i.e. regressions, which is what we
strictly want to avoid) would be buried in the flow.

> >> The progression of all of this could be monitored with statistics reported 
> >> e.g. in the minutes of ESC calls.
> So who would be responsible to fix it? If we don't test it on patch 
> submission and break on error, it would just pile up again.

The principle is that the patch submission contains both the fix and
the removal of the suppression rules, i.e. the build breaks if the fix
doesn't actually fix the warnings which used to be suppressed by the
rules.

Of course, review is still needed to check that the .ui change used to
fix the warning does make sense and is not a "quick hack" to get the
warning away.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: bin/gla11y solenv/gbuild solenv/sanitizers

2018-02-28 Thread Samuel Thibault
 bin/gla11y  |  165 
 solenv/gbuild/UIConfig.mk   |6 +
 solenv/gbuild/platform/com_GCC_class.mk |2 
 solenv/gbuild/platform/com_MSC_class.mk |2 
 solenv/sanitizers/ui/cui.suppr  |3 
 solenv/sanitizers/ui/svt.suppr  |2 
 solenv/sanitizers/ui/svx.suppr  |6 +
 7 files changed, 168 insertions(+), 18 deletions(-)

New commits:
commit d09cc5fe73fc1de27e92dae38bc58ea0aadb4f27
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri Feb 23 14:49:01 2018 +0100

gla11y: add warning/error suppression machinery

Also add an accessibility test which does have a few existing issues, and
the corresponding suppression lines.

Change-Id: I7095cdc13e40501bbdf6e635c1e4f93f70bc1316
Reviewed-on: https://gerrit.libreoffice.org/50251
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/bin/gla11y b/bin/gla11y
index 77a84840087a..9d550a6ea001 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -39,11 +39,17 @@ except ImportError:
 lxml = False
 
 progname = os.path.basename(sys.argv[0])
+suppressions = {}
+gen_suppr = None
+gen_supprfile = None
 outfile = None
+pflag = False
 Werror = False
 Wnone = False
 errors = 0
+errexists = 0
 warnings = 0
+warnexists = 0
 
 def step_elm(elm):
 """
@@ -75,6 +81,29 @@ def find_elm(root, elm):
 return step + path
 return None
 
+def errpath(filename, tree, elm):
+"""
+Return the XML class path of the element
+"""
+if elm is None:
+return ""
+path = ""
+if 'class' in elm.attrib:
+path += elm.attrib['class']
+oid = elm.attrib.get('id')
+if oid is not None:
+oid = oid.encode('ascii','ignore').decode('ascii')
+path += "[@id='%s']" % oid
+if lxml:
+elm = elm.getparent()
+while elm is not None:
+step = step_elm(elm)
+path = step + path
+elm = elm.getparent()
+else:
+path = find_elm(tree.getroot(), elm)[:-1]
+path = filename + ':' + path
+return path
 
 def elm_prefix(filename, elm):
 """
@@ -99,10 +128,44 @@ def elm_name(elm):
 return name
 return ""
 
-def err(filename, tree, elm, msg):
-global errors
+def elm_suppr(filename, tree, elm, msgtype):
+"""
+Return the prefix to be displayed to the user and the suppression line for
+the warning type "msgtype" for element "elm"
+"""
+global gen_suppr, gen_supprfile, pflag
+
+if suppressions or gen_suppr is not None or pflag:
+prefix = errpath(filename, tree, elm)
+
+if suppressions or gen_suppr is not None:
+suppr = '%s %s' % (prefix, msgtype)
+
+if gen_suppr is not None and msgtype is not None:
+if gen_supprfile is None:
+gen_supprfile = open(gen_suppr, 'w')
+print(suppr, file=gen_supprfile)
+else:
+suppr = None
+
+if not pflag:
+# Use user-friendly line numbers
+prefix = elm_prefix(filename, elm)
 
-prefix = elm_prefix(filename, elm)
+return (prefix, suppr)
+
+def err(filename, tree, elm, msgtype, msg):
+"""
+Emit an error for an element
+"""
+global errors, errexists
+
+(prefix, suppr) = elm_suppr(filename, tree, elm, msgtype)
+
+if suppr in suppressions:
+# Suppressed
+errexists += 1
+return
 
 errors += 1
 msg = "%s ERROR: %s%s" % (prefix, elm_name(elm), msg)
@@ -111,13 +174,23 @@ def err(filename, tree, elm, msg):
 print(msg, file=outfile)
 
 
-def warn(filename, elm, msg):
-global Werror, Wnone, errors, warnings
+def warn(filename, tree, elm, msgtype, msg):
+"""
+Emit a warning for an element
+"""
+global Werror, Wnone, errors, errexists, warnings, warnexists
 
 if Wnone:
 return
 
-prefix = elm_prefix(filename, elm)
+(prefix, suppr) = elm_suppr(filename, tree, elm, msgtype)
+if suppr in suppressions:
+# Suppressed
+if Werror:
+errexists += 1
+else:
+warnexists += 1
+return
 
 if Werror:
 errors += 1
@@ -136,9 +209,9 @@ def check_objects(filename, tree, elm, objects, target):
 """
 length = len(list(objects))
 if length == 0:
-err(filename, tree, elm, "uses undeclared target '%s'" % target)
+err(filename, tree, elm, "undeclared-target", "uses undeclared target 
'%s'" % target)
 elif length > 1:
-err(filename, tree, elm, "several targets are named '%s'" % target)
+err(filename, tree, elm, "multiple-target", "s

[Libreoffice-commits] core.git: bin/gla11y config_host.mk.in configure.ac download.lst external/libxslt external/lxml external/Module_external.mk Makefile.fetch RepositoryExternal.mk solenv/gbuild

2018-02-28 Thread Samuel Thibault
 Makefile.fetch  |1 
 RepositoryExternal.mk   |1 
 bin/gla11y  |  167 
 config_host.mk.in   |1 
 configure.ac|   36 --
 download.lst|2 
 external/Module_external.mk |1 
 external/libxslt/libxslt-config.patch.1 |6 -
 external/lxml/ExternalProject_lxml.mk   |   42 
 external/lxml/Makefile  |7 +
 external/lxml/Module_lxml.mk|   17 +++
 external/lxml/README|7 +
 external/lxml/UnpackedTarball_lxml.mk   |   14 ++
 solenv/gbuild/UIConfig.mk   |   18 +--
 solenv/gbuild/platform/com_GCC_class.mk |9 +
 solenv/gbuild/platform/com_MSC_class.mk |   14 ++
 solenv/gbuild/platform/macosx.mk|2 
 solenv/gbuild/platform/solaris.mk   |2 
 solenv/gbuild/platform/unxgcc.mk|2 
 19 files changed, 280 insertions(+), 69 deletions(-)

New commits:
commit 84ef6d82546b044990f4efd57e51e29c6c6565c8
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Feb 21 15:51:11 2018 +0100

Build external lxml if not provided by system

except on windows, where gla11y will resort to python's internal xml parser,
which does not provide line numbers.

This allows gla11y to be runnable on all systems.

Change-Id: Ica4eb90f59bddfcefd783fc2ed9c8c27357e7572
Reviewed-on: https://gerrit.libreoffice.org/50115
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/Makefile.fetch b/Makefile.fetch
index 58ed12b8e398..94f697ea9270 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -163,6 +163,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk 
$(SRCDIR)/download.lst $(S
XMLSEC_TARBALL \
$(call fetch_Optional,LIBXSLT,LIBXSLT_TARBALL) \
$(call fetch_Optional,LPSOLVE,LPSOLVE_TARBALL) \
+   $(call fetch_Optional,LXML,LXML_TARBALL) \
$(call 
fetch_Optional,MARIADB_CONNECTOR_C,MARIADB_CONNECTOR_C_TARBALL) \
$(call fetch_Optional,MDDS,MDDS_TARBALL) \
$(call fetch_Optional,MDNSRESPONDER,MDNSRESPONDER_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 85264b4afdf3..aecbd71b8b43 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4017,6 +4017,7 @@ else
 
 define gb_ExternalExecutable__register_python
 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
+$(call 
gb_ExternalExecutable_set_precommand,python,PYTHONPATH=PYTHONPATH{PYTHONPATH:+{PYPATH:+:}}PYPATH)
 
 endef
 
diff --git a/bin/gla11y b/bin/gla11y
index 04d5d83ccd1a..77a84840087a 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -31,33 +31,84 @@ from __future__ import print_function
 import os
 import sys
 import getopt
-import lxml.etree as ET
+try:
+import lxml.etree as ET
+lxml = True
+except ImportError:
+import xml.etree.ElementTree as ET
+lxml = False
 
 progname = os.path.basename(sys.argv[0])
+outfile = None
 Werror = False
 Wnone = False
 errors = 0
 warnings = 0
 
-
-def errstr(elm):
+def step_elm(elm):
+"""
+Return the XML class path step corresponding to elm.
+This can be empty if the elm does not have any class or id.
+"""
+step = elm.attrib.get('class')
+if step is None:
+step = ""
+oid = elm.attrib.get('id')
+if oid is not None:
+oid = oid.encode('ascii','ignore').decode('ascii')
+step += "[@id='%s']" % oid
+if len(step) > 0:
+step += '/'
+return step
+
+def find_elm(root, elm):
 """
-Print the line number of the element
+Return the XML class path of the element from the given root.
+This is the slow version used when getparent is not available.
 """
+if root == elm:
+return ""
+for o in root:
+path = find_elm(o, elm)
+if path is not None:
+step = step_elm(o)
+return step + path
+return None
 
-return str(elm.sourceline)
 
-def err(filename, elm, msg):
+def elm_prefix(filename, elm):
+"""
+Return the display prefix of the element
+"""
+if elm == None or not lxml:
+return "%s:" % filename
+else:
+return "%s:%u" % (filename, elm.sourceline)
+
+def elm_name(elm):
+"""
+Return a display name of the element
+"""
+if elm is not None:
+name = ""
+if 'class' in elm.attrib:
+name = "'%s' " % elm.attrib['class']
+if 'id' in elm.attrib:
+id = elm.attrib['id'].encode('ascii','ignore').decode('ascii')
+name += "'%s' &q

[Libreoffice-commits] core.git: bin/gla11y solenv/gbuild

2018-03-01 Thread Samuel Thibault
 bin/gla11y  |   16 
 solenv/gbuild/UIConfig.mk   |2 +-
 solenv/gbuild/platform/com_GCC_class.mk |2 +-
 solenv/gbuild/platform/com_MSC_class.mk |2 +-
 4 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit e85b8efafc715f2bf3e240f24617dc1d6aa46d4f
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Thu Mar 1 13:16:12 2018 +0100

gla11y: fix build outside source

We need to pass the absolute path to gla11y for build outside source to
work. We however do not want to expose absolute paths in suppression files,
so we have to introduce a parameter that provides the common prefix to be
stripped.

Change-Id: Iaf652cb8d6c3646438f828a0949dfd811f964e77
Reviewed-on: https://gerrit.libreoffice.org/50568
Reviewed-by: jan iversen <j...@libreoffice.org>
Tested-by: jan iversen <j...@libreoffice.org>

diff --git a/bin/gla11y b/bin/gla11y
index 9d550a6ea001..13f1c8e98b97 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -42,6 +42,7 @@ progname = os.path.basename(sys.argv[0])
 suppressions = {}
 gen_suppr = None
 gen_supprfile = None
+suppr_prefix = ""
 outfile = None
 pflag = False
 Werror = False
@@ -133,10 +134,12 @@ def elm_suppr(filename, tree, elm, msgtype):
 Return the prefix to be displayed to the user and the suppression line for
 the warning type "msgtype" for element "elm"
 """
-global gen_suppr, gen_supprfile, pflag
+global gen_suppr, gen_supprfile, suppr_prefix, pflag
 
 if suppressions or gen_suppr is not None or pflag:
 prefix = errpath(filename, tree, elm)
+if prefix[0:len(suppr_prefix)] == suppr_prefix:
+prefix = prefix[len(suppr_prefix):]
 
 if suppressions or gen_suppr is not None:
 suppr = '%s %s' % (prefix, msgtype)
@@ -151,6 +154,8 @@ def elm_suppr(filename, tree, elm, msgtype):
 if not pflag:
 # Use user-friendly line numbers
 prefix = elm_prefix(filename, elm)
+if prefix[0:len(suppr_prefix)] == suppr_prefix:
+prefix = prefix[len(suppr_prefix):]
 
 return (prefix, suppr)
 
@@ -322,20 +327,21 @@ def check_a11y_relation(filename, tree):
 
 
 def usage():
-print("%s [-W error|none] [-p] [-g SUPPR_FILE] [-s SUPPR_FILE] [-o 
LOG_FILE] [file ... | -L filelist]" % progname,
+print("%s [-W error|none] [-p] [-g SUPPR_FILE] [-s SUPPR_FILE] [-P 
SUPPR_PREFIX] [-o LOG_FILE] [file ... | -L filelist]" % progname,
   file=sys.stderr)
 print("  -p print XML class path instead of line number");
 print("  -g Generate suppression file SUPPR_FILE");
 print("  -s Suppress warnings given by file SUPPR_FILE");
+print("  -P Suppress SUPPR_PREFIX from emitted warnings, e.g. absolute 
source directory");
 print("  -o Also prints errors and warnings to given file");
 sys.exit(2)
 
 
 def main():
-global pflag, Werror, Wnone, gen_suppr, gen_supprfile, suppressions, 
errors, outfile
+global pflag, Werror, Wnone, gen_suppr, gen_supprfile, suppressions, 
suppr_prefix, errors, outfile
 
 try:
-opts, args = getopt.getopt(sys.argv[1:], "W:pg:s:o:L:")
+opts, args = getopt.getopt(sys.argv[1:], "W:pg:s:P:o:L:")
 except getopt.GetoptError:
 usage()
 
@@ -354,6 +360,8 @@ def main():
 gen_suppr = a
 elif o == "-s":
 suppr = a
+elif o == "-P":
+suppr_prefix = a
 elif o == "-o":
 out = a
 elif o == "-L":
diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index a0d8974fffe9..c5a04e33ab56 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -190,7 +190,7 @@ $(call gb_UIConfig_get_imagelist_target,$(1)) : 
UI_IMAGELISTS += $(call gb_UIIma
 $(call gb_UIConfig_get_imagelist_target,$(1)) : $(call 
gb_UIImageListTarget_get_target,$(2))
 $(call gb_UIConfig_get_clean_target,$(1)) : $(call 
gb_UIImageListTarget_get_clean_target,$(2))
 
-$(call gb_UIConfig_get_a11yerrors_target,$(1)) : UIFILES += $(2).ui
+$(call gb_UIConfig_get_a11yerrors_target,$(1)) : UIFILES += $(SRCDIR)/$(2).ui
 
 endef
 
diff --git a/solenv/gbuild/platform/com_GCC_class.mk 
b/solenv/gbuild/platform/com_GCC_class.mk
index 3345c7f6cca3..6d5393d2fad9 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -159,7 +159,7 @@ define gb_UIConfig__gla11y_command
 $(call gb_Helper_abbreviate_dirs,\
$(gb_UIConfig_LXML_PATH) $(gb_Helper_set_ld_path) \
$(call gb_ExternalExecutable_get_command,python) \
-   $(gb_UIConfig_gla11y_SCRIPT) -s $(UI_A11YSUPPRS) $(GEN_A11Y_SUPPRS) -o 
$@ $(UIFILES)
+   $(gb_UIConfig_gla11y_SCRIPT) -s $(UI_A11YSUPPRS) $(GEN_A11Y_SUPPRS) -P 
$(SRCDIR)/ -o $@ $(UIFILES)
 )
 
 endef
diff --g

[Libreoffice-commits] core.git: cui/uiconfig

2018-03-14 Thread Samuel Thibault
 cui/uiconfig/ui/cellalignment.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 76b6fd430098fb54ca5098f2e1be6eb1a3ad0cbb
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Mar 14 17:30:20 2018 +0100

cui: Add missing mnemonic_widget

This is needed for proper accessibility labelling.

Change-Id: I11830d16816a471c1531012a18be81e5f8d136a9
Reviewed-on: https://gerrit.libreoffice.org/51287
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>
Tested-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/uiconfig/ui/cellalignment.ui b/cui/uiconfig/ui/cellalignment.ui
index 16d82364e712..95fa6ea2234d 100644
--- a/cui/uiconfig/ui/cellalignment.ui
+++ b/cui/uiconfig/ui/cellalignment.ui
@@ -122,6 +122,7 @@
 0
 _Degrees:
 True
+spinDegrees
   
   
 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: filter/uiconfig

2018-03-14 Thread Samuel Thibault
 filter/uiconfig/ui/pdfsignpage.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 20d37ac04361dc80682417a06d542c51ea49
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Mar 14 17:38:00 2018 +0100

pdf filter: fix bogus mnemonic_widget target

"Time Stamp Authority:" labels 'tsa', not 'reason'.

Change-Id: I60c007b04591a534323d0a86bb19475f27953107
Reviewed-on: https://gerrit.libreoffice.org/51290
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>
Tested-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/filter/uiconfig/ui/pdfsignpage.ui 
b/filter/uiconfig/ui/pdfsignpage.ui
index 548f31691330..b5f3fdcaad1a 100644
--- a/filter/uiconfig/ui/pdfsignpage.ui
+++ b/filter/uiconfig/ui/pdfsignpage.ui
@@ -227,7 +227,7 @@
 1
 Time Stamp Authority:
 True
-reason
+tsa
   
   
 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/gbuild solenv/sanitizers

2018-04-13 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk   |4 ++--
 solenv/sanitizers/ui/cui.suppr  |4 
 solenv/sanitizers/ui/filter.suppr   |1 +
 solenv/sanitizers/ui/modules/scalc.suppr|   25 +
 solenv/sanitizers/ui/modules/simpress.suppr |3 +++
 solenv/sanitizers/ui/modules/swriter.suppr  |8 
 solenv/sanitizers/ui/svx.suppr  |   17 +
 7 files changed, 60 insertions(+), 2 deletions(-)

New commits:
commit c1084f6d791b69e612acfe7484f4f38b41662c80
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Apr 4 19:22:47 2018 +0200

gla11y: Enable label-for/labelled-by pairing warnings

Change-Id: Icecc1cf3d7ec5c217e705640f1c4a049b75a6778
Reviewed-on: https://gerrit.libreoffice.org/52405
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 4923dd26e431..aec1efb33316 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -161,8 +161,8 @@ gb_UIConfig_gla11y_PARAMETERS += --enable-type orphan-label
 
 # These are definite errors
 gb_UIConfig_gla11y_PARAMETERS += --enable-type undeclared-target
-#gb_UIConfig_gla11y_PARAMETERS += --enable-type missing-label-for
-#gb_UIConfig_gla11y_PARAMETERS += --enable-type missing-labelled-by
+gb_UIConfig_gla11y_PARAMETERS += --enable-type missing-label-for
+gb_UIConfig_gla11y_PARAMETERS += --enable-type missing-labelled-by
 
 # These are often buttons with only an image
 #gb_UIConfig_gla11y_PARAMETERS += --enable-type button-no-label
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 598c7a600ae3..8f00b81c4cf2 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -6,3 +6,7 @@ cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='angleft'] 
orphan-label
 cui/uiconfig/ui/hatchpage.ui://GtkScale[@id='angleslider'] no-labelled-by
 cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='linetypeft'] orphan-label
 cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='linecolorft'] orphan-label
+cui/uiconfig/ui/textflowpage.ui://GtkSpinButton[@id='spinPageNumber'] 
missing-label-for
+cui/uiconfig/ui/textflowpage.ui://GtkComboBox[@id='comboPageStyle'] 
missing-label-for
+cui/uiconfig/ui/textflowpage.ui://GtkSpinButton[@id='spinOrphan'] 
missing-label-for
+cui/uiconfig/ui/textflowpage.ui://GtkSpinButton[@id='spinWidow'] 
missing-label-for
diff --git a/solenv/sanitizers/ui/filter.suppr 
b/solenv/sanitizers/ui/filter.suppr
new file mode 100644
index ..5cff1cecf634
--- /dev/null
+++ b/solenv/sanitizers/ui/filter.suppr
@@ -0,0 +1 @@
+filter/uiconfig/ui/pdfgeneralpage.ui://GtkCheckButton[@id='reduceresolution'] 
missing-labelled-by
diff --git a/solenv/sanitizers/ui/modules/scalc.suppr 
b/solenv/sanitizers/ui/modules/scalc.suppr
new file mode 100644
index ..83ffb6cae818
--- /dev/null
+++ b/solenv/sanitizers/ui/modules/scalc.suppr
@@ -0,0 +1,25 @@
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='connect1'] 
missing-label-for
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='field1'] 
missing-label-for
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='field2'] 
missing-label-for
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='field3'] 
missing-label-for
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='cond1'] 
missing-label-for
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='cond2'] 
missing-label-for
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='cond3'] 
missing-label-for
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='val1'] 
missing-label-for
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='val2'] 
missing-label-for
+sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='val3'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='connect1'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='connect2'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='field1'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='field2'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='field3'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='cond1'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='cond2'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='cond3'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val1'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val2'] 
missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComb

[Libreoffice-commits] core.git: solenv/gbuild

2018-04-18 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c24c2d1e41b8123d205f69415a4f934b365408a7
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Apr 18 16:26:02 2018 +0200

gla11y: Add dependency on .ui files

During the gla11y work, the dependency of UIA rules on the .ui files
got lost, this adds it so that modifying a .ui file triggers checking
accessibility with gla11y.

Change-Id: I62103ca1783c2f532d7647384c1add1b557b37a1
Reviewed-on: https://gerrit.libreoffice.org/53116
Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index aec1efb33316..36ffdeb0d511 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -258,6 +258,7 @@ $(call gb_UIConfig_get_imagelist_target,$(1)) : $(call 
gb_UIImageListTarget_get_
 $(call gb_UIConfig_get_clean_target,$(1)) : $(call 
gb_UIImageListTarget_get_clean_target,$(2))
 
 $(call gb_UIConfig_get_a11yerrors_target,$(1)) : UIFILES += $(SRCDIR)/$(2).ui
+$(call gb_UIConfig_get_a11yerrors_target,$(1)) : $(SRCDIR)/$(2).ui
 
 endef
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/sanitizers sw/uiconfig

2018-04-18 Thread Samuel Thibault
 solenv/sanitizers/ui/modules/swriter.false |1 +
 sw/uiconfig/swriter/ui/pagestylespanel.ui  |4 
 2 files changed, 5 insertions(+)

New commits:
commit 77bfe10480bc77fe29d989785c8fda4cb3946560
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Mon Apr 16 10:45:44 2018 +0200

swriter: Add missing labelling

The page style panel was completely missing labelling.

The "Custom" label is actually used a a resource, suppress the labelling
warning for it.

Change-Id: I741ddea4a1608f0d7084dda79af2ab59a6fc5812
Reviewed-on: https://gerrit.libreoffice.org/52947
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/solenv/sanitizers/ui/modules/swriter.false 
b/solenv/sanitizers/ui/modules/swriter.false
index 83c62dd064b3..b30009980a01 100644
--- a/solenv/sanitizers/ui/modules/swriter.false
+++ b/solenv/sanitizers/ui/modules/swriter.false
@@ -1,2 +1,3 @@
 sw/uiconfig/swriter/ui/sortdialog.ui://GtkLabel[@id='order'] orphan-label
 sw/uiconfig/swriter/ui/pageformatpanel.ui://GtkLabel[@id='customlabel'] 
orphan-label
+sw/uiconfig/swriter/ui/pagestylespanel.ui://GtkLabel[@id='customlabel'] 
orphan-label
diff --git a/sw/uiconfig/swriter/ui/pagestylespanel.ui 
b/sw/uiconfig/swriter/ui/pagestylespanel.ui
index c737a7ee0f90..f7f50519bbfb 100644
--- a/sw/uiconfig/swriter/ui/pagestylespanel.ui
+++ b/sw/uiconfig/swriter/ui/pagestylespanel.ui
@@ -49,6 +49,7 @@
 False
 1
 Number:
+numberbox
   
   
 0
@@ -63,6 +64,7 @@
 False
 1
 Background:
+bgselect
   
   
 0
@@ -89,6 +91,7 @@
 False
 1
 Layout:
+layoutbox
   
   
 0
@@ -117,6 +120,7 @@
 False
 1
 Columns:
+columnbox
   
   
 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/sanitizers sw/uiconfig

2018-04-18 Thread Samuel Thibault
 solenv/sanitizers/ui/modules/swriter.false |2 ++
 sw/uiconfig/swriter/ui/pagefooterpanel.ui  |8 
 sw/uiconfig/swriter/ui/pageheaderpanel.ui  |8 
 3 files changed, 18 insertions(+)

New commits:
commit ed74986b212ca04cf7a45e4eb15073f0a2db1d14
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Mon Apr 16 10:48:36 2018 +0200

swriter: Add missing labelling

The page header and footer panels were completely missing labelling

The "Custom" label is actually used a a resource, suppress the labelling
warning for it.

Change-Id: I3ca6b1984fab23478a11e916f26702592a5ee991
Reviewed-on: https://gerrit.libreoffice.org/52948
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/solenv/sanitizers/ui/modules/swriter.false 
b/solenv/sanitizers/ui/modules/swriter.false
index b30009980a01..6e709e490041 100644
--- a/solenv/sanitizers/ui/modules/swriter.false
+++ b/solenv/sanitizers/ui/modules/swriter.false
@@ -1,3 +1,5 @@
 sw/uiconfig/swriter/ui/sortdialog.ui://GtkLabel[@id='order'] orphan-label
 sw/uiconfig/swriter/ui/pageformatpanel.ui://GtkLabel[@id='customlabel'] 
orphan-label
 sw/uiconfig/swriter/ui/pagestylespanel.ui://GtkLabel[@id='customlabel'] 
orphan-label
+sw/uiconfig/swriter/ui/pagefooterpanel.ui://GtkLabel[@id='customlabel'] 
orphan-label
+sw/uiconfig/swriter/ui/pageheaderpanel.ui://GtkLabel[@id='customlabel'] 
orphan-label
diff --git a/sw/uiconfig/swriter/ui/pagefooterpanel.ui 
b/sw/uiconfig/swriter/ui/pagefooterpanel.ui
index 67f96e0492aa..a0b872b499fb 100644
--- a/sw/uiconfig/swriter/ui/pagefooterpanel.ui
+++ b/sw/uiconfig/swriter/ui/pagefooterpanel.ui
@@ -28,6 +28,11 @@
 True
 0
 True
+
+  
+Enable 
footer
+  
+
   
   
 False
@@ -42,6 +47,7 @@
 end
 True
 Margins:
+footermarginpreset
   
   
 False
@@ -71,6 +77,7 @@
 False
 end
 Spacing:
+spacingpreset
   
   
 0
@@ -83,6 +90,7 @@
 False
 end
 Same Content:
+samecontentLB
   
   
 0
diff --git a/sw/uiconfig/swriter/ui/pageheaderpanel.ui 
b/sw/uiconfig/swriter/ui/pageheaderpanel.ui
index 193867e896b7..5b6ddb86f700 100644
--- a/sw/uiconfig/swriter/ui/pageheaderpanel.ui
+++ b/sw/uiconfig/swriter/ui/pageheaderpanel.ui
@@ -28,6 +28,11 @@
 True
 0
 True
+
+  
+Enable 
header
+  
+
   
   
 False
@@ -42,6 +47,7 @@
 end
 True
 Margins:
+headermarginpreset
   
   
 False
@@ -71,6 +77,7 @@
 False
 end
 Spacing:
+spacingpreset
   
   
 0
@@ -83,6 +90,7 @@
 False
 end
 Same Content:
+samecontentLB
   
   
 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/sanitizers sw/uiconfig

2018-04-18 Thread Samuel Thibault
 solenv/sanitizers/ui/modules/swriter.false |1 +
 sw/uiconfig/swriter/ui/pageformatpanel.ui  |5 +
 2 files changed, 6 insertions(+)

New commits:
commit e99666c5a764fac14a04d84181f98e96786345aa
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Mon Apr 16 10:39:38 2018 +0200

swriter: Add missing labelling

The page format panel was completely missing labelling.

The "Custom" label is actually used a a resource, suppress the labelling
warning for it.

Change-Id: I1c026f7a743b5da45f244d2527ab2b66165ccd4a
Reviewed-on: https://gerrit.libreoffice.org/52946
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/solenv/sanitizers/ui/modules/swriter.false 
b/solenv/sanitizers/ui/modules/swriter.false
index bbba7d731c7e..83c62dd064b3 100644
--- a/solenv/sanitizers/ui/modules/swriter.false
+++ b/solenv/sanitizers/ui/modules/swriter.false
@@ -1 +1,2 @@
 sw/uiconfig/swriter/ui/sortdialog.ui://GtkLabel[@id='order'] orphan-label
+sw/uiconfig/swriter/ui/pageformatpanel.ui://GtkLabel[@id='customlabel'] 
orphan-label
diff --git a/sw/uiconfig/swriter/ui/pageformatpanel.ui 
b/sw/uiconfig/swriter/ui/pageformatpanel.ui
index 8c541a4e65ee..579db0800223 100644
--- a/sw/uiconfig/swriter/ui/pageformatpanel.ui
+++ b/sw/uiconfig/swriter/ui/pageformatpanel.ui
@@ -22,6 +22,7 @@
 False
 Size:
 1
+papersize
   
   
 0
@@ -34,6 +35,7 @@
 False
 Width:
 1
+paperwidth
   
   
 0
@@ -46,6 +48,7 @@
 False
 Height:
 1
+paperheight
   
   
 0
@@ -58,6 +61,7 @@
 False
 Orientation:
 1
+paperorientation
   
   
 0
@@ -124,6 +128,7 @@
 False
 Margins:
 1
+marginLB
   
   
 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/gbuild solenv/sanitizers

2018-04-20 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk   |2 -
 solenv/sanitizers/ui/cui.suppr  |   41 
 solenv/sanitizers/ui/dbaccess.suppr |   14 +
 solenv/sanitizers/ui/formula.suppr  |7 
 solenv/sanitizers/ui/fps.suppr  |3 ++
 solenv/sanitizers/ui/modules/dbreport.suppr |4 ++
 solenv/sanitizers/ui/modules/scanner.suppr  |3 ++
 solenv/sanitizers/ui/modules/schart.suppr   |6 
 solenv/sanitizers/ui/modules/simpress.suppr |9 ++
 solenv/sanitizers/ui/modules/swriter.suppr  |   33 ++
 solenv/sanitizers/ui/svt.suppr  |1 
 solenv/sanitizers/ui/svx.suppr  |2 +
 solenv/sanitizers/ui/vcl.suppr  |3 ++
 13 files changed, 127 insertions(+), 1 deletion(-)

New commits:
commit 79391d92df7a474651e02980f238eac4781305ce
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Mon Apr 16 13:52:38 2018 +0200

gla11y: Enable button labelling warnings

Change-Id: Ie6a45060e252e75b76fb6222d02403de6d4bccfd
Reviewed-on: https://gerrit.libreoffice.org/52968
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 36ffdeb0d511..1d9ede0986d1 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -165,7 +165,7 @@ gb_UIConfig_gla11y_PARAMETERS += --enable-type 
missing-label-for
 gb_UIConfig_gla11y_PARAMETERS += --enable-type missing-labelled-by
 
 # These are often buttons with only an image
-#gb_UIConfig_gla11y_PARAMETERS += --enable-type button-no-label
+gb_UIConfig_gla11y_PARAMETERS += --enable-type button-no-label
 # These are often doubtful
 #gb_UIConfig_gla11y_PARAMETERS += --enable-type duplicate-mnemonic 
--enable-type labelled-by-and-mnemonic
 
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 598c7a600ae3..3cf4f506104c 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -1,3 +1,5 @@
+cui/uiconfig/ui/comment.ui://GtkButton[@id='previous'] button-no-label
+cui/uiconfig/ui/comment.ui://GtkButton[@id='next'] button-no-label
 cui/uiconfig/ui/gradientpage.ui://GtkScale[@id='incrementslider'] 
no-labelled-by
 cui/uiconfig/ui/gradientpage.ui://GtkLabel[@id='centerft'] orphan-label
 cui/uiconfig/ui/gradientpage.ui://GtkScale[@id='borderslider'] no-labelled-by
@@ -6,3 +8,42 @@ cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='angleft'] 
orphan-label
 cui/uiconfig/ui/hatchpage.ui://GtkScale[@id='angleslider'] no-labelled-by
 cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='linetypeft'] orphan-label
 cui/uiconfig/ui/hatchpage.ui://GtkLabel[@id='linecolorft'] orphan-label
+cui/uiconfig/ui/hyphenate.ui://GtkLabel[@id='label1'] orphan-label
+cui/uiconfig/ui/hyphenate.ui://GtkButton[@id='left'] button-no-label
+cui/uiconfig/ui/hyphenate.ui://GtkButton[@id='right'] button-no-label
+cui/uiconfig/ui/optemailpage.ui://GtkLabel[@id='browsetitle'] orphan-label
+cui/uiconfig/ui/optemailpage.ui://GtkLabel[@id='suppress'] orphan-label
+cui/uiconfig/ui/optemailpage.ui://GtkCheckButton[@id='suppressHidden'] 
button-no-label
+cui/uiconfig/ui/optfontspage.ui://GtkLabel[@id='always'] orphan-label
+cui/uiconfig/ui/optfontspage.ui://GtkLabel[@id='screenonly'] orphan-label
+cui/uiconfig/ui/optfontspage.ui://GtkLabel[@id='font'] orphan-label
+cui/uiconfig/ui/optfontspage.ui://GtkLabel[@id='replacewith'] orphan-label
+cui/uiconfig/ui/optfontspage.ui://GtkButton[@id='apply'] button-no-label
+cui/uiconfig/ui/optfontspage.ui://GtkButton[@id='delete'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default1'] 
button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default2'] 
button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default3'] 
button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkLabel[@id='applied_theme'] 
orphan-label
+cui/uiconfig/ui/personalization_tab.ui://GtkLabel[@id='extensions_label'] 
orphan-label
+cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='persona_preview'] 
button-no-label
+cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='suggestion1'] 
button-no-label
+cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='suggestion2'] 
button-no-label
+cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='suggestion3'] 
button-no-label
+cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='suggestion4'] 
button-no-label
+cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='suggestion5'] 
button-no-label
+cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='suggestion6'] 
button-no-label
+cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result1'] 
button-no-label
+cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result2'] 
button-no-label
+cui/uiconfig/ui/select_persona_dialog.ui://GtkButton[@id='result3'] 
button-no-labe

[Libreoffice-commits] core.git: bin/gla11y

2018-04-20 Thread Samuel Thibault
 bin/gla11y |   58 +++---
 1 file changed, 43 insertions(+), 15 deletions(-)

New commits:
commit 9ebe4dec48a3677fced23ede58e31057b5db1df3
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Mar 21 14:28:35 2018 +0100

Update gla11y

This updates the gla11y tool

- mnemonic-widget is actually an alias for mnemonic_widget
- ditto for tooltip-text vs tooltip_text
- ditto for placeholder-text vs placeholder_text
- glade introduced a notation for specifying the role of a widget, which can
  be used to make a label static for instance (thus not orphan).
- --help is fixed to use the standard formatting.
- Remove the documentation of unexisting -i option
- Add the documentation of -P option
- Add --help/-h and --version options for completeness.

Change-Id: I8510ba9c5a877c05edd3af305b4e7fe1f105acd5
Reviewed-on: https://gerrit.libreoffice.org/52973
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/bin/gla11y b/bin/gla11y
index 8b2746fb4a98..f18e2f48c960 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -244,6 +244,7 @@ widgets_labels = [
 # GtkPrinterOptionWidget ?
 # GtkStackCombo ?
 # GtkStackSidebar ?
+# GtkStackSwitcher ?
 
 progname = os.path.basename(sys.argv[0])
 
@@ -629,7 +630,8 @@ def is_orphan_label(filename, tree, root, obj, orphan_root, 
doprint = False):
 return True
 
 # mnemonic_widget
-mnemonic_for = obj.findall("property[@name='mnemonic_widget']")
+mnemonic_for = obj.findall("property[@name='mnemonic_widget']") + \
+   obj.findall("property[@name='mnemonic-widget']")
 for rel in mnemonic_for:
 target = rel.text
 l = mnemonic_for_elm[target]
@@ -649,6 +651,17 @@ def is_orphan_label(filename, tree, root, obj, 
orphan_root, doprint = False):
 # Oh, a labelled label, probably not to be labelling anything
 return False
 
+# explicit role?
+roles = [x.text for x in 
obj.findall("child[@internal-child='accessible']/object[@class='AtkObject']/property[@name='AtkObject::accessible-role']")]
+roles += [x.attrib.get("type") for x in obj.findall("accessibility/role")]
+if len(roles) > 1 and doprint:
+err(filename, tree, obj, "multiple-role", "has multiple "
+"%s" % elms_lines(children))
+for role in roles:
+if role == 'static' or role == 'ATK_ROLE_STATIC':
+# This is static text, not meant to label anything
+return False
+
 parent = elm_parent(root, obj)
 if parent is not None:
 childtype = parent.attrib.get('type')
@@ -739,14 +752,16 @@ def is_orphan_widget(filename, tree, root, obj, orphan, 
orphan_root, doprint = F
 return False
 
 # Case 5: Has a 
-tooltips = obj.findall("property[@name='tooltip_text']")
+tooltips = obj.findall("property[@name='tooltip_text']") + \
+   obj.findall("property[@name='tooltip-text']")
 if len(tooltips) > 1 and doprint:
 err(filename, tree, obj, "multiple-tooltip", "has multiple 
tooltip_text properties")
-if len(tooltips) >= 1:
+if len(tooltips) >= 1 and klass != 'GtkCheckButton':
 return False
 
 # Case 6: Has a 
-placeholders = obj.findall("property[@name='placeholder_text']")
+placeholders = obj.findall("property[@name='placeholder_text']") + \
+   obj.findall("property[@name='placeholder-text']")
 if len(placeholders) > 1 and doprint:
 err(filename, tree, obj, "multiple-placeholder", "has multiple 
placeholder_text properties")
 if len(placeholders) >= 1:
@@ -887,7 +902,7 @@ def check_props(filename, tree, root, elm, forward):
 """
 Check the given list of relation properties
 """
-props = elm.findall("property[@name='mnemonic_widget']")
+props = elm.findall("property[@name='" + forward + "']")
 for prop in props:
 if prop.text not in ids:
 err(filename, tree, elm, "undeclared-target", forward + " uses 
undeclared target '%s'" % prop.text)
@@ -972,7 +987,8 @@ def check_a11y_relation(filename, tree):
 
 # Labels special case
 if klass in widgets_labels:
-properties = check_props(filename, tree, root, obj, 
"mnemonic_widget")
+properties = check_props(filename, tree, root, obj, 
"mnemonic_widget") + \
+ check_props(filename, tree, root, obj, 
"mnemonic-widget")
 if len(properties) > 1:
 err(filename, tree, obj, "multiple-mnemonic", "has mult

[Libreoffice-commits] core.git: Makefile.in solenv/gbuild

2018-04-20 Thread Samuel Thibault
 Makefile.in |3 +++
 solenv/gbuild/Helper.mk |3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 77b09e7f921c42c41171e431813652db6de54679
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Mar 14 13:37:31 2018 +0100

gbuild: add target rules for all modules

This allows to run e.g. make UIConfig to automatically run make
UIConfig_ for all modules.

Change-Id: Idc2c3a61fd38b486435366164031b4d51f68eebc
Reviewed-on: https://gerrit.libreoffice.org/51274
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/Makefile.in b/Makefile.in
index f149a7ee79b4..3cce173bcdf0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -165,6 +165,9 @@ gbuild_TARGETS := AllLangHelp \
 $(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach 
module,$(gbuild_modules),$(target)_$(module)/%)) UIConfig_modules/% %.genpatch: 
bootstrap fetch
$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile.gbuild $@
 
+$(gbuild_TARGETS):
+   $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile.gbuild $@
+
 #
 # Clean
 #
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index 688f5963a1f5..2aa0fc8d65b2 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -88,7 +88,8 @@ endef
 #
 # gb_Helper_make_userfriendly_targets target class build-target? clean-target?
 define gb_Helper_make_userfriendly_targets
-.PHONY: $(2)_$(1) $(2)_$(1).clean
+.PHONY: $(2) $(2)_$(1) $(2)_$(1).clean
+$(2): $(2)_$(1)
 $(2)_$(1) : $(if $(3),$(3),$(call gb_$(2)_get_target,$(1)))
 $(2)_$(1).clean : $(if $(4),$(4),$(call gb_$(2)_get_clean_target,$(1)))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/gla11y solenv/gbuild solenv/sanitizers

2018-03-27 Thread Samuel Thibault
 bin/gla11y |   38 +
 solenv/gbuild/UIConfig.mk  |3 +-
 solenv/sanitizers/ui/modules/swriter.false |1 
 3 files changed, 36 insertions(+), 6 deletions(-)

New commits:
commit 8b9075f8f4f47c469dd63c3a3bc2d55d41f5e735
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Mar 14 13:09:55 2018 +0100

gla11y: add support for marking false positives

Change-Id: I62c24f0aa20dea1cca4ba77a71dbb247bc37a5b5
Reviewed-on: https://gerrit.libreoffice.org/51545
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/bin/gla11y b/bin/gla11y
index e19e580d0d4f..8b2746fb4a98 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -248,6 +248,7 @@ widgets_labels = [
 progname = os.path.basename(sys.argv[0])
 
 suppressions = {}
+false_positives = {}
 ids = {}
 ids_dup = {}
 labelled_by_elm = {}
@@ -422,12 +423,12 @@ def elm_suppr(filename, tree, elm, msgtype, dogen):
 """
 global gen_suppr, gen_supprfile, suppr_prefix, pflag
 
-if suppressions or gen_suppr is not None or pflag:
+if suppressions or false_positives or gen_suppr is not None or pflag:
 prefix = errpath(filename, tree, elm)
 if prefix[0:len(suppr_prefix)] == suppr_prefix:
 prefix = prefix[len(suppr_prefix):]
 
-if suppressions or gen_suppr is not None:
+if suppressions or false_positives or gen_suppr is not None:
 suppr = '%s %s' % (prefix, msgtype)
 
 if gen_suppr is not None and msgtype is not None and dogen:
@@ -476,6 +477,9 @@ def err(filename, tree, elm, msgtype, msg, error = True):
 return
 
 (prefix, suppr) = elm_suppr(filename, tree, elm, msgtype, True)
+if suppr in false_positives:
+# That was actually expected
+return
 if suppr in suppressions:
 # Suppressed
 suppressions[suppr] = False
@@ -668,6 +672,9 @@ def is_orphan_label(filename, tree, root, obj, orphan_root, 
doprint = False):
 
 # No label-for, no mnemonic-for, no labelled-by, we are orphan.
 (_, suppr) = elm_suppr(filename, tree, obj, "orphan-label", False)
+if suppr in false_positives:
+# That was actually expected
+return False
 if suppr in suppressions:
 # Warning suppressed for this label
 if suppressions[suppr]:
@@ -774,6 +781,9 @@ def is_orphan_widget(filename, tree, root, obj, orphan, 
orphan_root, doprint = F
 # Warnings disabled
 return False
 (_, suppr) = elm_suppr(filename, tree, obj, "button-no-label", False)
+if suppr in false_positives:
+# That was actually expected
+return False
 if suppr in suppressions:
 # Warning suppressed for this widget
 if suppressions[suppr]:
@@ -818,6 +828,9 @@ def is_orphan_widget(filename, tree, root, obj, orphan, 
orphan_root, doprint = F
 # Warnings disabled for this class of widgets
 return False
 (_, suppr) = elm_suppr(filename, tree, obj, "no-labelled-by", False)
+if suppr in false_positives:
+# That was actually expected
+return False
 if suppr in suppressions:
 # Warning suppressed for this widget
 if suppressions[suppr]:
@@ -1041,12 +1054,13 @@ def check_a11y_relation(filename, tree):
 #
 
 def usage():
-print("%s [-p] [-g SUPPR_FILE] [-s SUPPR_FILE] [-i WIDGET1,WIDGET2[,...]] 
[-o LOG_FILE] [file ...]" % progname,
+print("%s [-p] [-g SUPPR_FILE] [-s SUPPR_FILE] [-f SUPPR_FILE] [-i 
WIDGET1,WIDGET2[,...]] [-o LOG_FILE] [file ...]" % progname,
   file=sys.stderr)
 print("")
 print("  -p Print XML class path instead of line number")
 print("  -g Generate suppression file SUPPR_FILE")
 print("  -s Suppress warnings given by file SUPPR_FILE")
+print("  -f Suppress warnings given by file SUPPR_FILE completely")
 print("  -i Ignore warnings for widgets of a given class")
 print("  -o Also prints errors and warnings to given file")
 print("")
@@ -1109,12 +1123,12 @@ def widgets_opt(widgets_list, arg):
 
 
 def main():
-global pflag, gen_suppr, gen_supprfile, suppressions, suppr_prefix, 
dofatals, enables, dofatals, warn_orphan_labels
+global pflag, gen_suppr, gen_supprfile, suppressions, suppr_prefix, 
false_positives, dofatals, enables, dofatals, warn_orphan_labels
 global widgets_toplevel, widgets_ignored, widgets_suffixignored, 
widgets_needlabel, widgets_buttons, widgets_labels
 global outfile
 
 try:
-opts, args = getopt.getopt(sys.argv[1:], "piIg:s:P:o:L:", [
+opts, args = getopt.getopt(sys.argv[1:], "piIg:s:f:P:o:L:", [
 "widgets-toplevel=",
 "widgets-ignored="

[Libreoffice-commits] core.git: bin/gla11y solenv/gbuild solenv/sanitizers

2018-03-27 Thread Samuel Thibault
 bin/gla11y  | 1145 
 solenv/gbuild/UIConfig.mk   |   67 +
 solenv/gbuild/platform/com_GCC_class.mk |2 
 solenv/gbuild/platform/com_MSC_class.mk |2 
 solenv/sanitizers/ui/cui.suppr  |   11 
 solenv/sanitizers/ui/svt.suppr  |4 
 solenv/sanitizers/ui/svx.suppr  |   18 
 7 files changed, 1100 insertions(+), 149 deletions(-)

New commits:
commit d0f1a431eab9a7a503bf6487732eeaec0e881053
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Mon Mar 12 18:28:06 2018 +0100

gla11y: update heuristics but don't enable warnings yet

This updates gla11y with all heuristics to detect orphan labels and widgets
without too many false positives.

This updates gbuild to tell gla11y to only emit errors about undefined
targets and about orphan warnings for GtkScale (as was the case with
previous versions). More errors and warnings will be enabled progressively
later on.

Change-Id: I96580eb0eb8eb327f0f54563d7976a5148e9531a
Reviewed-on: https://gerrit.libreoffice.org/51161
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/bin/gla11y b/bin/gla11y
index fa6e7281a0cd..e19e580d0d4f 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -36,23 +36,263 @@ try:
 lxml = True
 except ImportError:
 if sys.version_info < (2,7):
+print("gla11y needs lxml or python >= 2.7")
 exit()
 import xml.etree.ElementTree as ET
 lxml = False
 
+# Toplevel widgets
+widgets_toplevel = [
+'GtkWindow',
+'GtkOffscreenWindow',
+'GtkApplicationWindow',
+'GtkDialog',
+'GtkAboutDialog',
+'GtkFileChooserDialog',
+'GtkColorChooserDialog',
+'GtkFontChooserDialog',
+'GtkMessageDialog',
+'GtkRecentChooserDialog',
+'GtkAssistant',
+'GtkAppChooserDialog',
+'GtkPrintUnixDialog',
+'GtkShortcutsWindow',
+]
+
+widgets_ignored = widgets_toplevel + [
+# Containers
+'GtkBox',
+'GtkGrid',
+'GtkNotebook',
+'GtkFrame',
+'GtkAspectFrame',
+'GtkListBox',
+'GtkFlowBox',
+'GtkOverlay',
+'GtkMenuBar',
+'GtkToolbar',
+'GtkToolpalette',
+'GtkPaned',
+'GtkHPaned',
+'GtkVPaned',
+'GtkButtonBox',
+'GtkHButtonBox',
+'GtkVButtonBox',
+'GtkLayout',
+'GtkFixed',
+'GtkEventBox',
+'GtkExpander',
+'GtkViewport',
+'GtkScrolledWindow',
+'GtkAlignment',
+'GtkRevealer',
+'GtkSearchBar',
+'GtkHeaderBar',
+'GtkStack',
+'GtkStackSwticher',
+'GtkPopover',
+'GtkPopoverMenu',
+'GtkActionBar',
+'GtkHandleBox',
+'GtkShortcutsSection',
+'GtkShortcutsGroup',
+'GtkTable',
+
+'GtkVBox',
+'GtkHBox',
+'GtkToolItem',
+'GtkMenu',
+
+# Invisible actions
+'GtkSeparator',
+'GtkHSeparator',
+'GtkVSeparator',
+'GtkAction',
+'GtkToggleAction',
+'GtkActionGroup',
+'GtkCellRendererGraph',
+'GtkCellRendererPixbuf',
+'GtkCellRendererProgress',
+'GtkCellRendererSpin',
+'GtkCellRendererText',
+'GtkCellRendererToggle',
+'GtkSeparatorMenuItem',
+'GtkSeparatorToolItem',
+
+# Storage objects
+'GtkListStore',
+'GtkTreeStore',
+'GtkTreeModelFilter',
+'GtkTreeModelSort',
+
+'GtkEntryBuffer',
+'GtkTextBuffer',
+'GtkTextTag',
+'GtkTextTagTable',
+
+'GtkSizeGroup',
+'GtkWindowGroup',
+'GtkAccelGroup',
+'GtkAdjustment',
+'GtkEntryCompletion',
+'GtkIconFactory',
+'GtkStatusIcon',
+'GtkFileFilter',
+'GtkRecentFilter',
+'GtkRecentManager',
+'GThemedIcon',
+
+'GtkTreeSelection',
+
+'GtkListBoxRow',
+
+# Useless to label
+'GtkScrollbar',
+'GtkHScrollbar',
+'GtkStatusbar',
+'GtkInfoBar',
+
+# These are actually labels
+'GtkLinkButton',
+
+# This precisely give a11y information :)
+'AtkObject',
+]
+
+widgets_suffixignored = [
+]
+
+# These widgets always need a label
+widgets_needlabel = [
+'GtkEntry',
+'GtkSearchEntry',
+'GtkScale',
+'GtkHScale',
+'GtkVScale',
+'GtkSpinButton',
+'GtkSwitch',
+]
+
+# These widgets normally have their own label
+widgets_buttons = [
+'GtkButton',
+'GtkToolButton',
+'GtkToggleButton',
+'GtkToggleToolButton',
+'GtkRadioButton',
+'GtkRadioToolButton',
+'GtkCheckButton',
+'GtkModelButton',
+'GtkLockButton',
+'GtkColorButton',
+'GtkMenuButton',
+
+'GtkMenuItem',
+'GtkImageMenuItem',
+'GtkMenuToolButton',
+'GtkRadioMenuItem',
+'GtkCheckMenuItem',
+]
+
+# These widgets are labels that can label other widgets
+widgets_labels = [
+'GtkLabel',
+'GtkAccelLabel',
+]
+
+# The rest should probably be labelled if there are orphan labels
+
+# GtkSpinner
+# GtkProgressBar
+# GtkLevelBar
+
+# GtkComboBox
+# GtkComboBoxText
+# GtkFileChooserButton
+# Gt

[Libreoffice-commits] core.git: sc/uiconfig

2018-03-17 Thread Samuel Thibault
 sc/uiconfig/scalc/ui/sheetprintpage.ui |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 4f54739c54d7c95a8aa8ec415b350e7e5034cb18
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Mar 14 17:40:26 2018 +0100

scalc: Add missing labelling

The "first page number" spin button was missing accessibility labelling.

Change-Id: I750cebf33f20056819abc00bb6875e2d89100fdd
Reviewed-on: https://gerrit.libreoffice.org/51291
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/sc/uiconfig/scalc/ui/sheetprintpage.ui 
b/sc/uiconfig/scalc/ui/sheetprintpage.ui
index 925b041f0cfd..458a76c1f022 100644
--- a/sc/uiconfig/scalc/ui/sheetprintpage.ui
+++ b/sc/uiconfig/scalc/ui/sheetprintpage.ui
@@ -103,6 +103,9 @@
 True
 0
 True
+
+  
+
   
   
 0
@@ -116,6 +119,9 @@
 5
 •
 adjustmentFirstPage
+
+  
+
   
   
 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig

2018-03-17 Thread Samuel Thibault
 cui/uiconfig/ui/numberingformatpage.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5833734027f9194e3433d82a6e8848b64e2ae3b1
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Wed Mar 14 17:32:46 2018 +0100

cui: Add tooltip to user-defined number format comment

The context is not obvious when using a screen reader.

Change-Id: Ibabc9b33081b729c1ded5b43b6dfa05aeb854fc3
Reviewed-on: https://gerrit.libreoffice.org/51289
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/uiconfig/ui/numberingformatpage.ui 
b/cui/uiconfig/ui/numberingformatpage.ui
index fe9dec307877..fe18bd1fae20 100644
--- a/cui/uiconfig/ui/numberingformatpage.ui
+++ b/cui/uiconfig/ui/numberingformatpage.ui
@@ -179,6 +179,7 @@
 True
 True
 ●
+Comment
   
   
 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: bin/gla11y

2018-03-03 Thread Samuel Thibault
Hello,

Thorsten Behrens, on ven. 02 mars 2018 22:54:40 +0100, wrote:
> libreoffice-comm...@lists.freedesktop.org wrote:
> > commit 44b4ad7d210097fdaed7dd94c5746b03f43592d3
> > Author: Thorsten Behrens 
> > Date:   Fri Mar 2 22:38:18 2018 +0100
> >
> > build fix: disable gla11y for python 2.6
> >
> Some tinderboxen failing with:
> 
> Traceback (most recent call last):
> File "/tinderbox/buildslave/source/libo-master/bin/gla11y", line 406, in main
>check_a11y_relation(filename, tree)
> File "/tinderbox/buildslave/source/libo-master/bin/gla11y", line 255, in 
> check_a11y_relation
>for obj in root.iter(´object´):
> AttributeError: _ElementInterface instance has no attribute ´iter´

Oops.  So python2.6's xml parsing is even less capable...

If have submitted https://gerrit.libreoffice.org/#/c/50686/ to allow
python2.6 when lxml is available (or built)

Sorry for he issue, I hope we'll soon be done with these, so we can work
on actually fixing a11y issues :)

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: bin/gla11y

2018-03-04 Thread Samuel Thibault
 bin/gla11y |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 0a3151314ad78b86bbb4bd76bac678fbaa9caf06
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Sat Mar 3 18:50:15 2018 +0100

gla11y: allow python 2.6 when lxml is available

python2.6's internal xml parser is not enough for gla11y, but it can run
python-lxml fine.

Change-Id: I725471729c8e2f25ce60f1d92e08d87a96e171a5
Reviewed-on: https://gerrit.libreoffice.org/50686
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/bin/gla11y b/bin/gla11y
index 443e4e774760..fa6e7281a0cd 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -35,12 +35,11 @@ try:
 import lxml.etree as ET
 lxml = True
 except ImportError:
+if sys.version_info < (2,7):
+exit()
 import xml.etree.ElementTree as ET
 lxml = False
 
-if sys.version_info < (2,7):
-exit()
-
 progname = os.path.basename(sys.argv[0])
 suppressions = {}
 gen_suppr = None
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Implementing accessibility non-regression check tool

2018-02-27 Thread Samuel Thibault
Hello,

Miklos Vajna, on mar. 27 févr. 2018 14:08:33 +0100, wrote:
> On Thu, Feb 22, 2018 at 05:22:26PM +0100, Samuel Thibault 
> <sthiba...@hypra.fr> wrote:
> > An issue with these is that they do not keep source line numbers of the
> > nodes.  That's really concerning for providing useful information to
> > the programmer.
> 
> Does
> <https://stackoverflow.com/questions/6949395/is-there-a-way-to-get-a-line-number-from-an-elementtree-element/36430270#36430270>
> help?

It's interesting.  One frightening thing however is "we assume the
default XML parser which is expat", and the _start_list (which should
actually be _start with python3) and _end hooks are not even documented.
When the python interpreter is provided by the system you wouldn't know
what would work.  We could put something which hopefully works because
the hooks happen to have the proper names, or at worse not do anything
and just not print line numbers.  I don't know what LO maintainers would
be fine with maintaining :)

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Implementing accessibility non-regression check tool

2018-02-27 Thread Samuel Thibault
Michael Stahl, on mar. 27 févr. 2018 15:23:43 +0100, wrote:
> i'm wondering, not having looked at your tool: if it doesn't print line
> numbers, is it easy to figure out which XML element it warns about?
> 
> would the element contain some unique text or have a unique identifying
> attribute?

It does print the widget class and id (if any, some of them don't have
any unfortunately)

> line number is just one way of doing it, if there's an equivalent way to
> find it with search in the text editor it should be fine, these UI files
> aren't that huge...

Yes, it's just that it can still be inconvenient to find.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: solenv/gbuild

2018-03-02 Thread Samuel Thibault
 solenv/gbuild/UIConfig.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f927fc06b8160c6db134b29dab510e2cd567e3f3
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Fri Mar 2 09:20:43 2018 +0100

gla11y: do not trigger lxml externalpackage build when system-provided

if there was no other external package built already, even just touching
lxml.done would fail.

Change-Id: I8b3ad63477421d797f2d6eb07b88c86041a5a1af
Reviewed-on: https://gerrit.libreoffice.org/50614
Reviewed-by: Rene Engelhard <r...@debian.org>
Tested-by: Rene Engelhard <r...@debian.org>

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index c5a04e33ab56..9a88ffd44498 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -97,6 +97,7 @@ gb_UIConfig_INSTDIR := $(LIBO_SHARE_FOLDER)/config/soffice.cfg
 
 ifneq ($(filter LXML,$(BUILD_TYPE)),)
 gb_UIConfig_LXML_PATH := PYPATH=$${PYPATH:+$$PYPATH:}$(call 
gb_UnpackedTarball_get_dir,lxml)/install ;
+gb_UIConfig_LXML_TARGET := $(call gb_ExternalProject_get_target,lxml)
 endif
 gb_UIConfig_gla11y_SCRIPT := $(SRCDIR)/bin/gla11y
 
@@ -134,7 +135,7 @@ $(call gb_Output_announce,$(2),$(true),UIA,1)
 $(call gb_UIConfig__gla11y_command)
 endef
 
-$(call gb_UIConfig_get_a11yerrors_target,%) : $(call 
gb_ExternalProject_get_target,lxml) $(call 
gb_ExternalExecutable_get_dependencies,python) $(gb_UIConfig_gla11y_SCRIPT)
+$(call gb_UIConfig_get_a11yerrors_target,%) : $(gb_UIConfig_LXML_TARGET) 
$(call gb_ExternalExecutable_get_dependencies,python) 
$(gb_UIConfig_gla11y_SCRIPT)
$(call gb_UIConfig_a11yerrors__command,$@,$*)
 
 gb_UIConfig_get_packagename = UIConfig/$(1)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2018-03-02 Thread Samuel Thibault
 configure.ac |   37 +++--
 1 file changed, 19 insertions(+), 18 deletions(-)

New commits:
commit c2496c09e15625de93d3ed883d3219fdd9d90360
Author: Samuel Thibault <sthiba...@hypra.fr>
Date:   Thu Mar 1 11:11:02 2018 +0100

lxml: Do not build on systems without python dev headers

Building our internal lxml requires python development headers, which we
don't otherwise need if runtime python support is not enabled.

We should also not build it when cross-compiling since we only need it on
the build system.

Change-Id: I63df25ff9f5932ca537dbbd6937b78d153c11d66
Reviewed-on: https://gerrit.libreoffice.org/50560
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/configure.ac b/configure.ac
index 7da2bfd87a8a..59df9857b616 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8141,6 +8141,13 @@ if test $enable_python = system; then
AC_MSG_ERROR([no usable python found])])
 test -n "$PYTHON_CFLAGS" && break
 fi
+
+dnl Check if the headers really work
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
+AC_CHECK_HEADER(Python.h)
+CPPFLAGS="$save_CPPFLAGS"
+
 # let the PYTHON_FOR_BUILD match the same python installation that
 # provides PYTHON_CFLAGS/PYTHON_LDFLAGS for pyuno, which should be
 # better for PythonTests.
@@ -8153,11 +8160,9 @@ if test -z "$PYTHON_FOR_BUILD"; then
 AC_MSG_WARN([No system-provided python lxml, gla11y will only 
report widget classes and ids])
 ;;
 *)
-   if test "$OS" != "IOS"; then
-   if test "$enable_ios_simulator" != "yes"; then
-   BUILD_TYPE="$BUILD_TYPE LXML"
-   fi
-   fi
+if test "$cross_compiling" != yes ; then
+BUILD_TYPE="$BUILD_TYPE LXML"
+fi
 ;;
 esac
 else
@@ -8170,12 +8175,12 @@ else
 AC_MSG_RESULT([no, gla11y will only report widget classes and 
ids])
 ;;
 *)
-   if test "$OS" != "IOS"; then
-   if test "$enable_ios_simulator" != "yes"; then
-   BUILD_TYPE="$BUILD_TYPE LXML"
-AC_MSG_RESULT([no, using internal lxml])
-   fi
-   fi
+if test "$cross_compiling" != yes -a "x$ac_cv_header_Python_h" 
= "xyes"; then
+BUILD_TYPE="$BUILD_TYPE LXML"
+AC_MSG_RESULT([no, using internal lxml])
+else
+AC_MSG_RESULT([no, and system does not provide python 
development headers, gla11y will only report widget classes and ids])
+fi
 ;;
 esac
 fi
@@ -8186,13 +8191,9 @@ case $enable_python in
 system)
 SYSTEM_PYTHON=TRUE
 
-dnl Check if the headers really work
-save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
-AC_CHECK_HEADER(Python.h, [],
-   [AC_MSG_ERROR([Python headers not found. You probably want to set both 
the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])],
-   [])
-CPPFLAGS="$save_CPPFLAGS"
+if test "x$ac_cv_header_Python_h" != "xyes"; then
+   AC_MSG_ERROR([Python headers not found. You probably want to set both 
the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])
+fi
 
 AC_LANG_PUSH(C)
 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: What does weld do for libreoffice

2018-06-20 Thread Samuel Thibault
Caolán McNamara, le mer. 20 juin 2018 12:15:28 +0100, a ecrit:
> Yeah, your tooling is working,

Cool :)

> looks like there's lot of low hanging
> easy to fix issues in the currently suppressed warnings

Yes. I'm just waiting for the last warnings to get enabled before
unleashing the chase :)

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Accessibility implementation / limitation in LO

2018-10-03 Thread Samuel Thibault
Hello,

Jan-Marek Glogowski, le jeu. 27 sept. 2018 20:01:06 +0200, a ecrit:
> Just adding all the new warnings to the suppr files shouldn't be that hard.

Sure, there's even a rule for this: in solenv/gbuild/UIConfig.mk
disable the -s parameter and enable the -g parameter in
gb_UIConfig_gla11y_PARAMETERS, touch bin/gla11y, and run make
UIConfig. That will just regenerate all the suppr files.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Extending subsequent tests with dogtail tests?

2019-02-28 Thread Samuel Thibault
Noel Grandin, le jeu. 28 févr. 2019 15:38:25 +0200, a ecrit:
> On Sun, 24 Feb 2019 at 22:04, Samuel Thibault <[1]sthiba...@hypra.fr> wrote:
> 
> The fact that even the C UI strings may change is a concern indeed. We
> however don't really have another way to identify widgets, do we? (we
> don't want to identify them structurally, that'd be even less stable)
> 
> The LibreOffice python UI tests use IDs that are maintained in the .ui files
> (and are just strings), which are relatively stable.

Right. AIUI they are not exposed to the accessibility interfaces
however, we'll have to fix that.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Extending subsequent tests with dogtail tests?

2019-02-21 Thread Samuel Thibault
Miklos Vajna, le jeu. 21 févr. 2019 09:08:48 +0100, a ecrit:
> Are you aware of
> ?

Sure :)

> Seems there is some overlap between dogtail and uitests.

Indeed, but AIUI the keyboard event synthesis is directly sent to the
expected ui object, so it doesn't check that e.g. when pressing F6
several times in writer, the proper objects get focus. Or would it be
possible to extend it to be able to check the focus?

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Extending subsequent tests with dogtail tests?

2019-03-06 Thread Samuel Thibault
Hello,

Markus Mohrhard, le lun. 25 févr. 2019 00:34:33 +0800, a ecrit:
> On a slightly related note I think that we have already quite a few tests for
> the accessibility UNO layer but as that layer is full of bugs many of the 
> tests
> are disabled. It might be a good idea to work on these tests before actually
> trying to implement more complex tests that depend on lower layers working
> correctly.

I'm not sure which piece you are referring to.  Is that the AWB?  I
indeed see some source code in toolkit/test/accessibility but no
reference to it.

> The focus handling can be easily integrated into the existing UI
> testing infrastructure and might benefit there from some of the concepts that
> should make them more stable

Good :) So could you plan to work on it?

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Extending subsequent tests with dogtail tests?

2019-02-24 Thread Samuel Thibault
Hello,

Markus Mohrhard, le lun. 25 févr. 2019 00:34:33 +0800, a ecrit:
> On Sat, Feb 23, 2019 at 6:24 PM Samuel Thibault <[1]sthiba...@hypra.fr> wrote:
> 
> > That said, we could as well make tests work at both layers. Run them
> > along uitests, thus very frequently, and run them periodically through
> > the accessibility layer on a system which has it.
> 
> I think you most likely want to test them independently if possible
> as I think you'll discover that combining them will lead to hard to diagnose
> problems.

That's why I mentioned trying with both layers.

> Additionally, the target of any test framework has to be that it
> minimizes the number of random test failures and requires as little adoption
> for unrelated code changes as possible.

Sure. That's why we're proposing to follow the blind user testcases,
which we usually don't want to change without some thinking.

> I noticed after quickly looking at your proposed tests is that you use UI
> strings in your tests which I think you want to avoid as much as possible.
> There are several problems with UI strings that make them a bad property 
> during
> testing: they change often, often not even by developers and are localized.
> Especially the second point means that your tests suddenly only work in en-US
> which surely limits a bit the usefulness of the tests. Even more if you plan 
> to
> generate test cases automatically as it means that the tests can only be
> generated with an en-US locale.

Sure, both testing and generating testcases needs to be done in the C
locale.

The fact that even the C UI strings may change is a concern indeed. We
however don't really have another way to identify widgets, do we? (we
don't want to identify them structurally, that'd be even less stable)

That was actually mentioned in

https://gitlab.gnome.org/GNOME/atk/issues/4

we'd need stable identifiers for the expected fields.

> On a slightly related note, please make sure that you are developing against
> python 3. I did not check if you are actually using any pure python2 features
> but at least "#!/usr/bin/python" will get you a python 2 interpreter on most
> systems.

Yes, that's on purpose because Debian doesn't have the python3 package
for dogtail yet :)

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Extending subsequent tests with dogtail tests?

2019-02-23 Thread Samuel Thibault
Noel Grandin, le sam. 23 févr. 2019 12:19:19 +0200, a ecrit:
> However, the current python UI test stuff talks directly to the vcl/ widgets.
> But between the vcl/ widgets and an actual accessibility user lies at least 
> two
> major chunks of code - the generic accessibility/ stuff, and the operating
> system specific bridges.

Yes, that's my concern with testing only at the vcl layer.

That said, we could as well make tests work at both layers. Run them
along uitests, thus very frequently, and run them periodically through
the accessibility layer on a system which has it.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Extending subsequent tests with dogtail tests?

2019-02-20 Thread Samuel Thibault
Hello,

Libreoffice currently uses unit tests to check precise functions, and
junit tests to check the behavior at the programmatic interface.

For accessibility testing, we would like to introduce tests to check the
behavior at the user interface itself, by using dogtail (developped by
Fedora, based on at-spi) to simulate keypresses, mouse clicks, and check
the results.

The idea is that at Hypra, we have a well-established documentation
of what keyboard shortcut sequences blind users would employ to use
libreoffice, and which we should thus make sure always work. The key
sequences might have to be changed if that's for a good reason, but at
least we would know about it and update the documentation accordingly.

I have put a prototype of what we are thinking of on 
https://git.hypra.fr/hypra/regression-testing/tree/master

An example of what it would look like is:

  press('F6')
  menu = app.child('File', 'menu')
  waitFocus(menu)
  
  press('F6')
  new = app.child('New', 'push button')
  waitFocus(new)
  
  press('F6')
  style = app.child('Paragraph Style', 'text')
  waitFocus(style)

etc.

which here allows to check that the F6 shortcut properly gets the menu,
the toolbar, the style, to be focused, etc. 

I have written a "log" script that can generate such testcase code:
a user can run libreoffice and perform a usage scenario, and "log"
will get the interesting events from at-spi (keypresses, focus change,
checkbox status change, etc.) and emit the python code which simulates
keypresses and waits for the results. That way we can easily produce
testcases from our documentation, by just running the use cases
described in it, which are representative of what a blind user needs to
be able to do.

Dogtail depends on atspi, but also on python-cairo, python-gi,
gir1.2-gtk-3.0.  I don't think we really want to add them to external/
just for testing?  Just like, AIUI, junit tests don't run if you don't
have java already available?  So we would just run the tests along junit
tests, on a system which is known to have the required dependencies,
right?  We (Hypra) could then feed libreoffice with such tests, from
our documentation.  We can probably produce dozens of them, which can
probably be tested within something like a few minutes.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Implementing accessibility non-regression check tool

2019-04-20 Thread Samuel Thibault
Hello Caolán,

It seems there is an unwanted effect: for instance 8d526da34810 ("weld
ScChiSquareTestDialog") turns input-range-button and output-range-button
from a foruilo-RefButton to a GtkButton, and a gla11y warning shows up.

In solenv/gbuild, gla11y is told that no labelling warning
should be emitted for foruilo-RefButton widgets because they are
auto-labelled Shrink/Expand, but the welding effort makes these
widgets normal GtkButton, and there is now no way for gla11y
to know that they are auto-labelled, thus the appearance of a
warning.

We could add some marking or put a label overwritten by the
auto-labelling in the .ui, but as discussed before we could as well just
put the suppression rules in solenv/sanitizers/ui/modules/scalc.false
to tell that there is nothing to fix here.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Vector screenshots for the manuals: better quality and more visually attractive

2021-06-01 Thread Samuel Thibault
Hello,

Thorsten Behrens, le mar. 01 juin 2021 11:50:11 +0200, a ecrit:
> Hossein Noorikhah wrote:
> > I have temporarily disabled these assertions and aborts, and by
> > further disabling the autosave, everything was fine, and I could
> > take vector screenshots.
> >
> That's pretty cool, thx for figuring that out! :)
> 
> > The tiny patch is attached.
> >
> You're triggering rather serious bugs, they're I guess worth fixing
> at the root of the issue.

For information, this vector screenshot tool works by getting some
plugin loaded into all gtk applications of the desktop.  The screenshot
tool connects to the plugin loaded in the target application, and makes
it call vectorized gtk rendering, and put it into a pdf file.

Said another way, it is quite hackish since it makes the application
perform its graphical rendering in an uncommon way.  I am thus not very
surprised that it breaks in some corners.  But perhaps this reveals some
root issue in the way LibreOffice uses gtk, yes.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New tests: GTK3 platform accessibility

2023-08-02 Thread Samuel Thibault
Colomban Wendling, le mar. 01 août 2023 19:30:05 +0200, a ecrit:
> Platform accessibility (a11y) conformance tests for the GTK3 VCL [1] have
> been merged a couple days ago.  This is a set of tests validating that the
> a11y exposed to the platform on Linux using the GTK3 VCL is coherent with
> the internal representation in LO.  This can catch (and already had caught)
> issues in the VCL layer not correctly transmitting data over -- and even
> more [2].

Yay, congrats!

Samuel


[Libreoffice-commits] core.git: comphelper/source include/comphelper include/toolkit offapi/com offapi/UnoApi_offapi.mk toolkit/source vcl/unx

2019-05-09 Thread Samuel Thibault (via logerrit)
 comphelper/source/misc/accessiblecontexthelper.cxx|6 +
 include/comphelper/accessiblecontexthelper.hxx|7 +
 include/toolkit/awt/vclxaccessiblecomponent.hxx   |2 
 offapi/UnoApi_offapi.mk   |1 
 offapi/com/sun/star/accessibility/XAccessibleContext2.idl |   56 ++
 toolkit/source/awt/vclxaccessiblecomponent.cxx|   13 +++
 vcl/unx/gtk/a11y/atkwrapper.cxx   |   12 +++
 7 files changed, 95 insertions(+), 2 deletions(-)

New commits:
commit b4009daccd11e416865efd5fd3c205c46691bb12
Author: Samuel Thibault 
AuthorDate: Thu May 2 17:24:30 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 9 13:39:33 2019 +0200

tdf#124400 a11y: add accessible ID

Such ID is not meant to be presented to the user, but to be an ID
which is stable over application development. Typically, this is
the gtkbuilder ID. Such an ID can then be used to identify a given
well-known accessible object independently from the current locale,
user-visible labelling, or dialog structure. This can then be used
for tailored screen reading (e.g. automatically announcing the
content of a well-known object), or for automatic regression testing
(to check the behavior of well-known objects). Uniqueness within
the window is thus desirable when returning a non-empty string.

This adds XAccessibleXContext2 to augment XAccessibleXContext with
getAccessibleId().  The VCL implementation just takes Window::get_id(),
i.e. the gtkbuilder id, which is enough for most use cases for now.

atk_object_wrapper_new then passes it to
atk_object_set_accessible_id() for AT-SPI technologies to pick it up.

Change-Id: Iea0ad08d036e539dbcfec1a9be026c8da8d17357
Reviewed-on: https://gerrit.libreoffice.org/71743
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx 
b/comphelper/source/misc/accessiblecontexthelper.cxx
index 1b6d7f59f547..463c9735f228 100644
--- a/comphelper/source/misc/accessiblecontexthelper.cxx
+++ b/comphelper/source/misc/accessiblecontexthelper.cxx
@@ -196,6 +196,12 @@ namespace comphelper
 }
 
 
+OUString SAL_CALL OAccessibleContextHelper::getAccessibleId(  )
+{
+return OUString();
+}
+
+
 sal_Int32 SAL_CALL OAccessibleContextHelper::getAccessibleIndexInParent(  )
 {
 OExternalLockGuard aGuard( this );
diff --git a/include/comphelper/accessiblecontexthelper.hxx 
b/include/comphelper/accessiblecontexthelper.hxx
index 7af467872faa..f8182526b280 100644
--- a/include/comphelper/accessiblecontexthelper.hxx
+++ b/include/comphelper/accessiblecontexthelper.hxx
@@ -22,7 +22,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -37,7 +37,7 @@ namespace comphelper
 
 
 class OContextHelper_Impl;
-typedef ::cppu::WeakAggComponentImplHelper2 <   
css::accessibility::XAccessibleContext,
+typedef ::cppu::WeakAggComponentImplHelper2 <   
css::accessibility::XAccessibleContext2,
 
css::accessibility::XAccessibleEventBroadcaster
 >   
OAccessibleContextHelper_Base;
 
@@ -91,6 +91,9 @@ namespace comphelper
 virtual css::uno::Reference< 
css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( 
 ) override = 0;
 virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > 
SAL_CALL getAccessibleStateSet(  ) override = 0;
 
+// XAccessibleContext2 - default implementation
+virtual OUString SAL_CALL getAccessibleId(  ) override;
+
 // XAccessibleContext - default implementations
 /** default implementation for retrieving the index of this object 
within the parent
 This basic implementation here returns the index i 
of the child for which
diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx 
b/include/toolkit/awt/vclxaccessiblecomponent.hxx
index 8779f0e14237..377dcbc57ce1 100644
--- a/include/toolkit/awt/vclxaccessiblecomponent.hxx
+++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx
@@ -99,6 +99,7 @@ public:
 sal_Int16 SAL_CALL getAccessibleRole(  ) override;
 OUString SAL_CALL getAccessibleDescription(  ) override;
 OUString SAL_CALL getAccessibleName(  ) override;
+OUString SAL_CALL getAccessibleId(  ) override;
 css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL 
getAccessibleRelationSet(  ) override;
 css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL 
getAccessibleStateSet(  ) override;
 css::lang::Locale SAL_CALL getLocale(  ) override;
@@ -138,6 +139,7 @@ private:
 sal_Int16 getAccessibleRole() => VCL Window::GetAccessibleRole()
 OUString getAccessibleDescription() => VCL Window:

[Libreoffice-commits] core.git: solenv/sanitizers svx/uiconfig

2019-05-10 Thread Samuel Thibault (via logerrit)
 solenv/sanitizers/ui/svx.false  |2 --
 svx/uiconfig/ui/classificationdialog.ui |8 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit d422a9d0cb914260192fbc68305db088af022204
Author: Samuel Thibault 
AuthorDate: Thu May 9 14:39:27 2019 +0200
Commit: Katarina Behrens 
CommitDate: Fri May 10 22:19:19 2019 +0200

tdf#119931 Fix a11y warnings in classificationdialog.ui

Make "Content" a label for the drawing area

Change-Id: I2238ea42d33564d848376e3c33b9d9a46af094ae
Reviewed-on: https://gerrit.libreoffice.org/72045
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 

diff --git a/solenv/sanitizers/ui/svx.false b/solenv/sanitizers/ui/svx.false
index e30560c59517..16af737bb931 100644
--- a/solenv/sanitizers/ui/svx.false
+++ b/solenv/sanitizers/ui/svx.false
@@ -1,6 +1,4 @@
 
svx/uiconfig/ui/classificationdialog.ui://GtkTreeViewColumn[@id='treeviewcolumn3']
 no-labelled-by
-svx/uiconfig/ui/classificationdialog.ui:GtkDialog[@id='AdvancedDocumentClassificationDialog']/GtkBox[@id='dialog-vbox1']/GtkGrid/GtkGrid/GtkLabel
 orphan-label
-svx/uiconfig/ui/classificationdialog.ui://GtkDrawingArea[@id='classificationEditWindow']
 no-labelled-by
 
svx/uiconfig/ui/classificationdialog.ui://GtkTreeViewColumn[@id='treeviewcolumn6']
 no-labelled-by
 
svx/uiconfig/ui/classificationdialog.ui://GtkTreeViewColumn[@id='treeviewcolumn4']
 no-labelled-by
 
diff --git a/svx/uiconfig/ui/classificationdialog.ui 
b/svx/uiconfig/ui/classificationdialog.ui
index e4c9c0299ae6..29690610e250 100644
--- a/svx/uiconfig/ui/classificationdialog.ui
+++ b/svx/uiconfig/ui/classificationdialog.ui
@@ -274,12 +274,15 @@
 True
 3
 
-  
+  
 True
 False
 Content
 0
 0
+
+  
+
   
   
 0
@@ -341,6 +344,9 @@
 True
 GDK_BUTTON_MOTION_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | 
GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK
 True
+
+  
+
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: bin/gla11y solenv/sanitizers

2019-05-13 Thread Samuel Thibault (via logerrit)
 bin/gla11y   |4 ++--
 solenv/sanitizers/ui/cui.suppr   |5 -
 solenv/sanitizers/ui/filter.suppr|2 --
 solenv/sanitizers/ui/modules/scalc.suppr |2 --
 solenv/sanitizers/ui/sfx.suppr   |2 --
 solenv/sanitizers/ui/svx.false   |4 
 solenv/sanitizers/ui/uui.suppr   |1 -
 solenv/sanitizers/ui/xmlsec.suppr|1 -
 8 files changed, 2 insertions(+), 19 deletions(-)

New commits:
commit 7073d17fe5565589bdd3e6438cfa8b4d932acf8b
Author: Samuel Thibault 
AuthorDate: Fri May 10 23:19:08 2019 +0200
Commit: Katarina Behrens 
CommitDate: Mon May 13 16:06:50 2019 +0200

gla11y: whitelist GtkTreeViewColumn as not needing labelling

and remove corresponding suppressions.

Change-Id: I0dd88082ee0af4c5ee82590e894305fa53574c6b
Reviewed-on: https://gerrit.libreoffice.org/72133
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 

diff --git a/bin/gla11y b/bin/gla11y
index 3fed400de699..f93121484648 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -10,7 +10,7 @@
 # This file incorporates work covered by the following license notice:
 #
 #   Copyright (c) 2018 Martin Pieuchot
-#   Copyright (c) 2018 Samuel Thibault 
+#   Copyright (c) 2018-2019 Samuel Thibault 
 #
 #   Permission to use, copy, modify, and distribute this software for any
 #   purpose with or without fee is hereby granted, provided that the above
@@ -145,6 +145,7 @@ widgets_ignored = widgets_toplevel + [
 'GtkTreeSelection',
 
 'GtkListBoxRow',
+'GtkTreeViewColumn',
 
 # Useless to label
 'GtkScrollbar',
@@ -216,7 +217,6 @@ widgets_labels = [
 
 # GtkCellView
 # GtkTreeView
-# GtkTreeViewColumn
 # GtkTextView
 # GtkIconView
 
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 1fce68321a1c..4279ed553003 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -256,7 +256,6 @@ 
cui/uiconfig/ui/insertfloatingframe.ui://GtkLabel[@id='heightlabel'] orphan-labe
 cui/uiconfig/ui/insertfloatingframe.ui://GtkSpinButton[@id='width'] 
no-labelled-by
 cui/uiconfig/ui/insertfloatingframe.ui://GtkSpinButton[@id='height'] 
no-labelled-by
 cui/uiconfig/ui/insertoleobject.ui://GtkEntry[@id='urled'] no-labelled-by
-cui/uiconfig/ui/javastartparametersdialog.ui://GtkTreeViewColumn[@id='treeviewcolumn1']
 no-labelled-by
 cui/uiconfig/ui/javastartparametersdialog.ui://GtkLabel[@id='label6'] 
orphan-label
 cui/uiconfig/ui/lineendstabpage.ui://GtkLabel[@id='FT_LINE_END_STYLE'] 
orphan-label
 cui/uiconfig/ui/lineendstabpage.ui://GtkComboBox[@id='LB_LINEENDS'] 
no-labelled-by
@@ -281,7 +280,6 @@ 
cui/uiconfig/ui/menuassignpage.ui://GtkLabel[@id='rightfunctionlabel'] orphan-la
 cui/uiconfig/ui/menuassignpage.ui://GtkLabel[@id='customizelabel'] orphan-label
 cui/uiconfig/ui/movemenu.ui://GtkLabel[@id='label1'] orphan-label
 cui/uiconfig/ui/movemenu.ui://GtkTreeView[@id='menulist'] no-labelled-by
-cui/uiconfig/ui/movemenu.ui://GtkTreeViewColumn[@id='treeviewcolumn1'] 
no-labelled-by
 cui/uiconfig/ui/multipathdialog.ui://svtlo-SvSimpleTableContainer[@id='paths'] 
no-labelled-by
 cui/uiconfig/ui/multipathdialog.ui://GtkLabel[@id='pathlist'] orphan-label
 cui/uiconfig/ui/newlibdialog.ui://GtkEntry[@id='entry'] duplicate-mnemonic
@@ -464,10 +462,7 @@ 
cui/uiconfig/ui/tsaurldialog.ui://GtkLabel[@id='enteraurl'] orphan-label
 cui/uiconfig/ui/twolinespage.ui://GtkLabel[@id='label29'] orphan-label
 cui/uiconfig/ui/twolinespage.ui://GtkLabel[@id='label30'] orphan-label
 cui/uiconfig/ui/twolinespage.ui://GtkTreeView[@id='startbracket'] 
no-labelled-by
-cui/uiconfig/ui/twolinespage.ui://GtkTreeViewColumn[@id='treeviewcolumn1'] 
no-labelled-by
 cui/uiconfig/ui/twolinespage.ui://GtkTreeView[@id='endbracket'] no-labelled-by
-cui/uiconfig/ui/twolinespage.ui://GtkTreeViewColumn[@id='treeviewcolumn2'] 
no-labelled-by
 cui/uiconfig/ui/wordcompletionpage.ui://GtkTreeView[@id='entries'] 
no-labelled-by
 cui/uiconfig/ui/wordcompletionpage.ui://GtkSpinButton[@id='maxentries'] 
duplicate-mnemonic
 cui/uiconfig/ui/wordcompletionpage.ui://GtkSpinButton[@id='minwordlen'] 
no-labelled-by
-cui/uiconfig/ui/wordcompletionpage.ui://GtkTreeViewColumn[@id='treeviewcolumn2']
 no-labelled-by
diff --git a/solenv/sanitizers/ui/filter.suppr 
b/solenv/sanitizers/ui/filter.suppr
index de80972e87e5..c0199933cfb6 100644
--- a/solenv/sanitizers/ui/filter.suppr
+++ b/solenv/sanitizers/ui/filter.suppr
@@ -23,5 +23,3 @@ 
filter/uiconfig/ui/testxmlfilter.ui://GtkLabel[@id='importxslttemplate'] orphan-
 filter/uiconfig/ui/testxmlfilter.ui://GtkLabel[@id='recentfilename'] 
orphan-label
 filter/uiconfig/ui/warnpdfdialog.ui://GtkLabel[@id='message'] orphan-label
 filter/uiconfig/ui/warnpdfdialog.ui://GtkTreeView[@id='errors'] no-labelled-by
-filter/uiconfig/ui/warnpdfdialog.ui://GtkTreeViewColumn[@id='treeviewcolumn1'] 
no-labelled-by
-filter/uiconfig/ui/warnpdfdialog.ui://GtkTreeViewColumn[@id='treeviewcolumn2

[Libreoffice-commits] core.git: vcl/unx

2019-08-21 Thread Samuel Thibault (via logerrit)
 vcl/unx/gtk/a11y/atkcomponent.cxx |4 
 vcl/unx/gtk/a11y/atkimage.cxx |5 ++---
 vcl/unx/gtk/a11y/atktext.cxx  |3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 8a086a97299c921a0b386f762ff706b6d85e678a
Author: Samuel Thibault 
AuthorDate: Mon Aug 19 18:50:23 2019 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Aug 21 21:17:58 2019 +0200

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 

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 
pComponent
@@ -208,6 +210,8 @@ component_wrapper_get_size (AtkComponent   *component,
 return;
 }
 
+*width = *height = -1;
+
 try
 {
 css::uno::Reference 
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 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 pText
 = getText( text );
 if( pText.is() )
 {
-*x = *y = *width = *height = 0;
 awt::Rectangle aRect = pText->getCharacterBounds( offset );
 
 gint origin_x = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: vcl/unx

2019-10-14 Thread Samuel Thibault (via logerrit)
 vcl/unx/gtk3/a11y/gtk3atkcomponent.cxx |4 
 vcl/unx/gtk3/a11y/gtk3atkimage.cxx |5 ++---
 vcl/unx/gtk3/a11y/gtk3atktext.cxx  |3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 86d08e23f1b20b6582dd944b952b47cc737a7c52
Author: Samuel Thibault 
AuthorDate: Sun Oct 13 17:45:02 2019 +0200
Commit: Michael Stahl 
CommitDate: Mon Oct 14 12:31:35 2019 +0200

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 

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 
pComponent
@@ -208,6 +210,8 @@ component_wrapper_get_size (AtkComponent   *component,
 return;
 }
 
+*width = *height = -1;
+
 try
 {
 css::uno::Reference 
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 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 pText
 = getText( text );
 if( pText.is() )
 {
-*x = *y = *width = *height = 0;
 awt::Rectangle aRect = pText->getCharacterBounds( offset );
 
 gint origin_x = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: solenv/sanitizers

2020-03-01 Thread Samuel Thibault (via logerrit)
 solenv/sanitizers/ui/writerperfect.suppr |2 --
 1 file changed, 2 deletions(-)

New commits:
commit e6ddcd095eff6a8a3a7017e01e10734cc4f3cdce
Author: Samuel Thibault 
AuthorDate: Sat Feb 29 22:54:16 2020 +0100
Commit: Katarina Behrens 
CommitDate: Sun Mar 1 15:56:23 2020 +0100

Drop unused suppressions

Change-Id: Ibeba908d39234b5f3224ffdf6bda0673d6ccaa8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89766
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 

diff --git a/solenv/sanitizers/ui/writerperfect.suppr 
b/solenv/sanitizers/ui/writerperfect.suppr
deleted file mode 100644
index 865780543c7f..
--- a/solenv/sanitizers/ui/writerperfect.suppr
+++ /dev/null
@@ -1,2 +0,0 @@
-writerperfect/uiconfig/ui/exportepub.ui://GtkLabel[@id='generalft'] 
orphan-label
-writerperfect/uiconfig/ui/exportepub.ui://GtkLabel[@id='metadataft'] 
orphan-label
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/gla11y solenv/sanitizers

2020-03-01 Thread Samuel Thibault (via logerrit)
 bin/gla11y   |4 ++--
 solenv/sanitizers/ui/modules/scalc.suppr |8 
 2 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 4c483204edc5ab5da4b40eb92fd69c6d87d11505
Author: Samuel Thibault 
AuthorDate: Sat Feb 29 23:07:11 2020 +0100
Commit: Caolán McNamara 
CommitDate: Sun Mar 1 16:42:14 2020 +0100

gla11y: Fix checking orphan labels

Change-Id: Icd43014f40a655b512b6328f4800906325d9b164
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89767
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/bin/gla11y b/bin/gla11y
index aff0a13172c6..1ae67b173959 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -10,7 +10,7 @@
 # This file incorporates work covered by the following license notice:
 #
 #   Copyright (c) 2018 Martin Pieuchot
-#   Copyright (c) 2018-2019 Samuel Thibault 
+#   Copyright (c) 2018-2020 Samuel Thibault 
 #
 #   Permission to use, copy, modify, and distribute this software for any
 #   purpose with or without fee is hereby granted, provided that the above
@@ -677,7 +677,7 @@ def is_orphan_label(filename, tree, root, obj, orphan_root, 
doprint = False):
 # This label is part of a button
 return False
 
-oid = obj.attrib.get('oid')
+oid = obj.attrib.get('id')
 if oid is not None:
 if oid in labelled_by_elm:
 # Some widget is labelled by us, we are not orphan.
diff --git a/solenv/sanitizers/ui/modules/scalc.suppr 
b/solenv/sanitizers/ui/modules/scalc.suppr
index ebb2152b0ec2..8de4823a7f67 100644
--- a/solenv/sanitizers/ui/modules/scalc.suppr
+++ b/solenv/sanitizers/ui/modules/scalc.suppr
@@ -117,10 +117,6 @@ 
sc/uiconfig/scalc/ui/pivotfielddialog.ui://GtkLabel[@id='label2'] orphan-label
 sc/uiconfig/scalc/ui/pivotfielddialog.ui://GtkLabel[@id='name'] orphan-label
 sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='connect1'] 
missing-label-for
 sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='connect2'] 
no-labelled-by
-sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkLabel[@id='label2'] orphan-label
-sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkLabel[@id='label3'] orphan-label
-sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkLabel[@id='label4'] orphan-label
-sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkLabel[@id='label5'] orphan-label
 sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='field1'] 
missing-label-for
 sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='field2'] 
missing-label-for
 sc/uiconfig/scalc/ui/pivotfilterdialog.ui://GtkComboBoxText[@id='field3'] 
missing-label-for
@@ -150,10 +146,6 @@ 
sc/uiconfig/scalc/ui/retypepassdialog.ui://GtkLabel[@id='docStatusLabel'] orphan
 
sc/uiconfig/scalc/ui/sorttransformationentry.ui:GtkGrid[@id='grid']/GtkBox/GtkLabel
 orphan-label
 sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='connect1'] 
missing-label-for
 sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='connect2'] 
missing-label-for
-sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkLabel[@id='label2'] 
orphan-label
-sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkLabel[@id='label3'] 
orphan-label
-sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkLabel[@id='label4'] 
orphan-label
-sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkLabel[@id='label5'] 
orphan-label
 sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='field1'] 
missing-label-for
 sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='field2'] 
missing-label-for
 sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='field3'] 
missing-label-for
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2020-03-01 Thread Samuel Thibault (via logerrit)
 vcl/unx/gtk3/a11y/gtk3atktext.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 607827d988f7690a52ccb947231441cd1da7
Author: Samuel Thibault 
AuthorDate: Tue Feb 25 22:19:26 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Mar 2 03:23:24 2020 +0100

gtk3 a11y: fix get_text(1,-1)

Even when the end offset is -1, we have to return the text starting a the
given starting position, up to the end, but not necessarily from the
beginning.

Change-Id: I6a79092c683c273eaedb8661545df71b742110ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89486
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/unx/gtk3/a11y/gtk3atktext.cxx 
b/vcl/unx/gtk3/a11y/gtk3atktext.cxx
index 1406ceea5544..f219efb90fef 100644
--- a/vcl/unx/gtk3/a11y/gtk3atktext.cxx
+++ b/vcl/unx/gtk3/a11y/gtk3atktext.cxx
@@ -250,10 +250,13 @@ text_wrapper_get_text (AtkText *text,
 OUString aText;
 sal_Int32 n = pText->getCharacterCount();
 
-if( -1 == end_offset )
-aText = pText->getText();
-else if( start_offset < n )
-aText = pText->getTextRange(start_offset, end_offset);
+if( start_offset < n )
+{
+if( -1 == end_offset )
+aText = pText->getTextRange(start_offset, n - 
start_offset);
+else
+aText = pText->getTextRange(start_offset, end_offset);
+}
 
 ret = g_strdup( OUStringToOString(aText, RTL_TEXTENCODING_UTF8 
).getStr() );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/qt5 winaccessibility/source

2020-05-08 Thread Samuel Thibault (via logerrit)
 vcl/qt5/Qt5AccessibleWidget.cxx |7 ++-
 winaccessibility/source/UAccCOM/AccTextBase.cxx |   45 +++-
 2 files changed, 49 insertions(+), 3 deletions(-)

New commits:
commit 6aef5a1e880262354cf739e461a12a0ef9573fef
Author: Samuel Thibault 
AuthorDate: Thu May 7 14:18:51 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Sat May 9 00:17:59 2020 +0200

tdf#118418 implement scrollSubstringTo() for Qt & windows

Use new accessibility scroll type compatible with IAccessible2.

Change-Id: I0967d1c56425e1e860db34f4b9c17427e531fe02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93636
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index dd062e369c46..0ffdf102a10a 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -30,6 +30,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -900,9 +901,11 @@ void Qt5AccessibleWidget::removeSelection(int /* 
selectionIndex */)
 {
 SAL_INFO("vcl.qt5", "Unsupported 
QAccessibleTextInterface::removeSelection");
 }
-void Qt5AccessibleWidget::scrollToSubstring(int /* startIndex */, int /* 
endIndex */)
+void Qt5AccessibleWidget::scrollToSubstring(int startIndex, int endIndex)
 {
-SAL_INFO("vcl.qt5", "Unsupported 
QAccessibleTextInterface::scrollToSubstring");
+Reference xText(m_xAccessible, UNO_QUERY);
+if (xText.is())
+xText->scrollSubstringTo(startIndex, endIndex, 
AccessibleScrollType_SCROLL_ANYWHERE);
 }
 
 void Qt5AccessibleWidget::selection(int selectionIndex, int* startOffset, int* 
endOffset) const
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx 
b/winaccessibility/source/UAccCOM/AccTextBase.cxx
index 6717ce6fed7f..caf3af18b38b 100644
--- a/winaccessibility/source/UAccCOM/AccTextBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -895,9 +896,51 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CAccTextBase::scrollSubstringToPoint(long, lon
 return E_NOTIMPL;
 }
 
-COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::scrollSubstringTo(long, long, 
IA2ScrollType)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::scrollSubstringTo(long 
startIndex, long endIndex, IA2ScrollType type)
 {
+SolarMutexGuard g;
+
+ENTER_PROTECTED_BLOCK
+
+// #CHECK XInterface#
+if(!pRXText.is())
+return E_FAIL;
+
+AccessibleScrollType lUnoType;
+
+switch(type)
+{
+case IA2_SCROLL_TYPE_TOP_LEFT:
+lUnoType = AccessibleScrollType_SCROLL_TOP_LEFT;
+break;
+case IA2_SCROLL_TYPE_BOTTOM_RIGHT:
+lUnoType = AccessibleScrollType_SCROLL_BOTTOM_RIGHT;
+break;
+case IA2_SCROLL_TYPE_TOP_EDGE:
+lUnoType = AccessibleScrollType_SCROLL_TOP_EDGE;
+break;
+case IA2_SCROLL_TYPE_BOTTOM_EDGE:
+lUnoType = AccessibleScrollType_SCROLL_BOTTOM_EDGE;
+break;
+case IA2_SCROLL_TYPE_LEFT_EDGE:
+lUnoType = AccessibleScrollType_SCROLL_LEFT_EDGE;
+break;
+case IA2_SCROLL_TYPE_RIGHT_EDGE:
+lUnoType = AccessibleScrollType_SCROLL_RIGHT_EDGE;
+break;
+case IA2_SCROLL_TYPE_ANYWHERE:
+lUnoType = AccessibleScrollType_SCROLL_ANYWHERE;
+break;
+default:
+return E_NOTIMPL;
+}
+
+if( GetXInterface()->scrollSubstringTo(startIndex, endIndex, lUnoType) )
+return S_OK;
+
 return E_NOTIMPL;
+
+LEAVE_PROTECTED_BLOCK
 }
 
 /**
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: filter/source

2020-08-04 Thread Samuel Thibault (via logerrit)
 filter/source/graphicfilter/ieps/ieps.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit c39b27a4d0dfc3b75d8486c0d7592c5209fb6b14
Author: Samuel Thibault 
AuthorDate: Tue Aug 4 04:29:48 2020 +0200
Commit: Michael Stahl 
CommitDate: Tue Aug 4 11:37:20 2020 +0200

tdf#135427 Make pstoedit delegate letter placement to us

As pstoedit documents itself, its wmf/emf driver uses a very approximate
interletter spacing, making the text look really awful. But it provides a
-nfw option that delegates the letter placement to the emf reader, and we
happen to be doing a proper job, thus getting a proper vectorized output.

This is not a concern on Windows (and the option is ignored there). The
option is available since version 3.40 (~2005). So we can just always pass
it on.

Change-Id: I8ffd3fbf046b5a80e8011651eeaf060a8f5107e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100035
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx 
b/filter/source/graphicfilter/ieps/ieps.cxx
index 413e6725fc73..a6c764adaff2 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -220,9 +220,14 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 
nBytesRead, Graphic 
 //-usebbfrominput forces pstoedit to take the original ps bounding box
 //as the bounding box as it sees it, instead of calculating its own
 //which also doesn't work for this example
+//
+//Under Linux, positioning of letters within pstoedit is very approximate.
+//Using the -nfw option delegates the positioning to the reader, and we
+//will do a proper job.  The option is ignored on Windows.
 OUString arg1("-usebbfrominput");   //-usebbfrominput use the original ps 
bounding box
 OUString arg2("-f");
-OUString arg3("emf:-OO -drawbb");   //-drawbb mark out the bounding box 
extent with bg pixels
+OUString arg3("emf:-OO -drawbb -nfw"); //-drawbb mark out the bounding box 
extent with bg pixels
+   //-nfw delegate letter placement to 
us
 rtl_uString *args[] =
 {
 arg1.pData, arg2.pData, arg3.pData, input.pData, output.pData
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - filter/source

2020-08-05 Thread Samuel Thibault (via logerrit)
 filter/source/graphicfilter/ieps/ieps.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 2d73afe9a0166f926ca97fd82d3673f7a2d05827
Author: Samuel Thibault 
AuthorDate: Tue Aug 4 04:29:48 2020 +0200
Commit: Xisco Fauli 
CommitDate: Wed Aug 5 10:23:58 2020 +0200

tdf#135427 Make pstoedit delegate letter placement to us

As pstoedit documents itself, its wmf/emf driver uses a very approximate
interletter spacing, making the text look really awful. But it provides a
-nfw option that delegates the letter placement to the emf reader, and we
happen to be doing a proper job, thus getting a proper vectorized output.

This is not a concern on Windows (and the option is ignored there). The
option is available since version 3.40 (~2005). So we can just always pass
it on.

Change-Id: I8ffd3fbf046b5a80e8011651eeaf060a8f5107e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100035
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit c39b27a4d0dfc3b75d8486c0d7592c5209fb6b14)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100053
Reviewed-by: Xisco Fauli 

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx 
b/filter/source/graphicfilter/ieps/ieps.cxx
index 413e6725fc73..a6c764adaff2 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -220,9 +220,14 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 
nBytesRead, Graphic 
 //-usebbfrominput forces pstoedit to take the original ps bounding box
 //as the bounding box as it sees it, instead of calculating its own
 //which also doesn't work for this example
+//
+//Under Linux, positioning of letters within pstoedit is very approximate.
+//Using the -nfw option delegates the positioning to the reader, and we
+//will do a proper job.  The option is ignored on Windows.
 OUString arg1("-usebbfrominput");   //-usebbfrominput use the original ps 
bounding box
 OUString arg2("-f");
-OUString arg3("emf:-OO -drawbb");   //-drawbb mark out the bounding box 
extent with bg pixels
+OUString arg3("emf:-OO -drawbb -nfw"); //-drawbb mark out the bounding box 
extent with bg pixels
+   //-nfw delegate letter placement to 
us
 rtl_uString *args[] =
 {
 arg1.pData, arg2.pData, arg3.pData, input.pData, output.pData
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/gla11y

2020-07-07 Thread Samuel Thibault (via logerrit)
 bin/gla11y |   22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

New commits:
commit 372b109f4d90dca7bb53f93bc597ce1dd8ba5898
Author: Samuel Thibault 
AuthorDate: Sat Jul 4 22:54:55 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Jul 7 14:12:26 2020 +0200

gla11y: improve warning printing

Also print the howto URL in messages about suppressed warnings
When showing suppression lines, also print the suppression file name.

Change-Id: I72da4149c505cec04bf715791f45a2b809d3ce63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97989
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/bin/gla11y b/bin/gla11y
index f2dfbbdf81b2..80d3e54a371c 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -41,6 +41,8 @@ except ImportError:
 import xml.etree.ElementTree as ET
 lxml = False
 
+howto_url = "https://wiki.documentfoundation.org/Development/Accessibility;
+
 # Toplevel widgets
 widgets_toplevel = [
 'GtkWindow',
@@ -1376,7 +1378,7 @@ def main():
 continue
 prefix = line.rstrip()
 suppressions[prefix] = True
-suppressions_to_line[prefix] = line_no
+suppressions_to_line[prefix] = "%s:%u" % (suppr, line_no)
 supprfile.close()
 except IOError:
 pass
@@ -1429,19 +1431,19 @@ def main():
 if errors > 0 or errexists > 0:
 output_buffer += "%s new error%s" % (errors, 's' if errors != 1 else 
'')
 if errexists > 0:
-output_buffer += " (%s suppressed)" % (errexists)
+output_buffer += " (%s suppressed by %s, please fix %s)" % 
(errexists, suppr, 'them' if errexists > 1 else 'it')
 output_buffer += "\n"
 
 if warnings > 0 or warnexists > 0:
 output_buffer += "%s new warning%s" % (warnings, 's' if warnings != 1 
else '')
 if warnexists > 0:
-output_buffer += " (%s suppressed)" % (warnexists)
+output_buffer += " (%s suppressed by %s, please fix %s)" % 
(warnexists, suppr, 'them' if warnexists > 1 else 'it')
 output_buffer += "\n"
 
 if fatals > 0 or fatalexists > 0:
 output_buffer += "%s new fatal%s" % (fatals, 's' if fatals != 1 else 
'')
 if fatalexists > 0:
-output_buffer += " (%s suppressed)" % (fatalexists)
+output_buffer += " (%s suppressed by %s, please fix %s)" % 
(fatalexists, suppr, 'them' if fatalexists > 1 else 'it')
 output_buffer += "\n"
 
 n = 0
@@ -1459,10 +1461,14 @@ def main():
 gen_supprfile.close()
 if outfile is not None:
 outfile.close()
-if fatals > 0 and gen_suppr is None:
-output_buffer += "Explanations are available on 
https://wiki.documentfoundation.org/Development/Accessibility;
-print(output_header.rstrip() + "\n" + output_buffer)
-sys.exit(1)
+
+if gen_suppr is None:
+if output_buffer != "":
+output_buffer += "Explanations are available on " + howto_url + 
"\n"
+
+if fatals > 0:
+print(output_header.rstrip() + "\n" + output_buffer)
+sys.exit(1)
 
 if len(output_buffer) > 0:
 print(output_header.rstrip() + "\n" + output_buffer)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/gla11y

2020-07-07 Thread Samuel Thibault (via logerrit)
 bin/gla11y |   51 ++-
 1 file changed, 50 insertions(+), 1 deletion(-)

New commits:
commit 0a42d1e94ba9c35f2518f0fe08d3bf6eef8ff081
Author: Samuel Thibault 
AuthorDate: Sun Jul 5 22:55:40 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Jul 7 14:11:49 2020 +0200

gla11y: Document global variables

Change-Id: Ic8ed50bdff182bab1104b5a22e667aadfd25c684
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97982
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/bin/gla11y b/bin/gla11y
index d29ee4ac62cc..f2dfbbdf81b2 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -247,34 +247,83 @@ widgets_labels = [
 
 progname = os.path.basename(sys.argv[0])
 
+# This dictionary contains the set of suppression lines as read from the
+# suppression file(s). It is merely indexed by the text of the suppresion line
+# and contains whether the suppressions was unused.
 suppressions = {}
+
+# This dictionary is indexed like suppressions and returns a "file:line" string
+# to report where in the suppression file the suppression was read
 suppressions_to_line = {}
+
+# This dictionary is similar to the suppressions dictionary, but for false
+# positives rather than suppressions
 false_positives = {}
+
+# This dictionary is indexed by the xml id and returns the element object.
 ids = {}
+# This dictionary is indexed by the xml id and returns whether several objects
+# have the same id.
 ids_dup = {}
+
+# This dictionary is indexed by the xml id of an element A and returns the list
+# of objects which are labelled-by A.
 labelled_by_elm = {}
+
+# This dictionary is indexed by the xml id of an element A and returns the list
+# of objects which are label-for A.
 label_for_elm = {}
+
+# This dictionary is indexed by the xml id of an element A and returns the list
+# of objects which have a mnemonic-for A.
 mnemonic_for_elm = {}
 
+# Possibly a file name to put generated suppression lines in
 gen_suppr = None
+# The corresponding opened file
 gen_supprfile = None
+# A prefix to remove from file names in the generated suppression lines
 suppr_prefix = ""
+
+# Possibly an opened file in which our output should also be written to.
 outfile = None
 
+# Whether -p option was set, i.e. print XML class path instead of line number 
in
+# the output
 pflag = False
 
+# Whether we should warn about labels which are orphan
 warn_orphan_labels = True
 
+# Number of errors
 errors = 0
+# Number of suppressed errors
 errexists = 0
+# Number of warnings
 warnings = 0
+# Number of suppressed warnings
 warnexists = 0
+# Number of fatal errors
 fatals = 0
+# Number of suppressed fatal errors
 fatalexists = 0
 
-enables = [ ]
+# List of warnings and errors which are fatal
+#
+# Format of each element: (enabled, type, class)
+# See the is_enabled function: the list is traversed completely, each element
+# can specify whether it enables or disables the warning, possibly the type of
+# warning to be enabled/disabled, possibly the class of XML element for which 
it
+# should be enabled.
+#
+# This mechanism matches the semantic of the parameters on the command line,
+# each of which refining the semantic set by the previous parameters
 dofatals = [ ]
 
+# List of warnings and errors which are enabled
+# Same format as dofatals
+enables = [ ]
+
 # buffers all printed output, so it isn't split in parallel builds
 output_buffer = ""
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/gla11y

2023-10-22 Thread Samuel Thibault (via logerrit)
 bin/gla11y |4 
 1 file changed, 4 insertions(+)

New commits:
commit 34fd462ac5e64ebd79826465c41671c1a6627afd
Author: Samuel Thibault 
AuthorDate: Thu Apr 27 23:23:59 2023 +0200
Commit: Caolán McNamara 
CommitDate: Sun Oct 22 16:33:02 2023 +0200

gla11y: Add link to a white paper describing the rationales of the tool

Change-Id: I0d60cb6b3ee2105d58ea56f3efc5bb5ee856a44a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151147
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/bin/gla11y b/bin/gla11y
index c3ae7be67604..1f4bea984a88 100755
--- a/bin/gla11y
+++ b/bin/gla11y
@@ -26,6 +26,10 @@
 
 # Take LibreOffice (glade) .ui files and check for non accessible widgets
 
+# A white paper documents the rationale of the implementation:
+#
+# https://inria.hal.science/hal-02957129
+
 from __future__ import print_function
 
 import os