Commit Graph

657 Commits

Author SHA1 Message Date
fa775ed30a 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 <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-02-21 11:35:11 +01:00
7d4584a18f accessibility: Small optimisation in AccessibleTabListBox
Change-Id: Idf351923a57cf608dd4945e3ce639ba8011ecdbb
Reviewed-on: https://gerrit.libreoffice.org/49922
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-19 07:20:58 +01:00
861f819d1b Accessibility : cleanup constructors and destructors.
Change-Id: I63f94f4bb3865d0c2d211567588343e08878342c
Reviewed-on: https://gerrit.libreoffice.org/49282
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-18 16:56:08 +01:00
7faa218231 ofz#6311 still problems with SdrEdgeObj listening to same obj at start as end
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30
Reviewed-on: https://gerrit.libreoffice.org/49821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-16 00:35:10 +01:00
be94207ecb new loplugin:emptyif
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42
Reviewed-on: https://gerrit.libreoffice.org/48128
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19 13:25:54 +01:00
17fbc3f8fd More loplugin:cstylecast: accessibility
Change-Id: I5bc8985586bc13874ba039a60e67cb2d347e6742
2018-01-15 09:07:26 +01:00
b72102d152 More loplugin:cstylecast: accessibility
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I4c85e1362fbe5edf50ebf75955e272b4f6f162e2
2018-01-12 20:30:10 +01:00
101a79cc4d lokdialog: Allow switching language of some of the ResMgr's.
This way, it is possible to have all the strings translated in dialogs even
when different users use different languages.  [It was already possible
to have different languages previously, but not everything in the dialog has
switched - like the buttons at the bottom of the dialogs etc.]

Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9
Reviewed-on: https://gerrit.libreoffice.org/46417
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/46979
Tested-by: Jenkins <ci@libreoffice.org>
2017-12-22 22:39:39 +01:00
3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
a2656563f1 loplugin:unnecessaryparen: Warn about parentheses around literals
...that are not composed of multiple tokens, like ("foo" "bar").  Also don't yet
warn about Boolean literals, which are sometimes wrapped in parentheses to
silence unreachable-code warnings.

To avoid multiple warnings about code like

  f((0))

switch to generally using a set of ParenExpr to keep track of which occurrences
have already been handled.

Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc
Reviewed-on: https://gerrit.libreoffice.org/45317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-27 14:04:40 +01:00
2877aa089d accessibility : AccessibleBrowseBoxBase::isAlive is not thread safe
Change-Id: I243328a662bf37944e1fa718f63a0e509250db15
Reviewed-on: https://gerrit.libreoffice.org/44930
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27 13:02:09 +01:00
14f351529e cosmetics: Drop duplicate semicolon
Change-Id: I96d2ffb903f9ed15070572552c9564b5089df12f
Reviewed-on: https://gerrit.libreoffice.org/44914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-11-20 14:01:44 +01:00
d71bcc4dc5 Fix typos
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91
Reviewed-on: https://gerrit.libreoffice.org/44654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13 08:43:17 +01:00
99872adcfb Remove OAccessibleTextHelper::getCharacter and getTextRange
Change-Id: Ib32e3ca6ba55ab99820a54023041247cea96ab0c
Reviewed-on: https://gerrit.libreoffice.org/44652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13 07:12:38 +01:00
8d4a44d176 Remove OCommonAccessibleText::getText and getCharacterCount.
No need to create helper for those methods.

Change-Id: I0505fe8141b1bad852b7f30aeb69628fb6a90071
Reviewed-on: https://gerrit.libreoffice.org/44649
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13 07:09:02 +01:00
ecc73fa19e accessibility: consistently use "" and <> in include directives
Change-Id: I7b6bd3691c95dff0e80f2fb31fa1ffb10f27b58d
Reviewed-on: https://gerrit.libreoffice.org/43268
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-09 09:05:34 +02:00
2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
83de03e077 Rename GetSelectEntryCount -> GetSelectedEntryCount
Change-Id: I405b347b404ed0acb3b6a0204e0b914a7698ce25
Reviewed-on: https://gerrit.libreoffice.org/42284
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-25 10:00:46 +02:00
d99b65c864 Rename GetSelectEntryPos -> GetSelectedEntryPos
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4
Reviewed-on: https://gerrit.libreoffice.org/42283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:45:38 +02:00
b649e5bf1d Rename GetSelectEntry -> GetSelectedEntry
Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce
Reviewed-on: https://gerrit.libreoffice.org/42282
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:44:00 +02:00
cb315646e2 headString in SvTreeListBox is unused
ever since being added in

    commit b755fb8c0f6b1282f62c12f378c0a5ecac64d490
    Date:   Mon Nov 25 16:15:58 2013 +0000
    Integrate branch of IAccessible2

Change-Id: Iebb8d30d53cc08e7cc35d610f04db8ed6c853b70
2017-09-18 13:47:29 +02:00
5d060fd07a accessibility: remove useless calls to virtual methods.
This also removes a lot of useless recursive locks.

Change-Id: Ifee7dbf2095bf0431eb27e8022e7f5299c46388f
Reviewed-on: https://gerrit.libreoffice.org/42122
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-15 11:28:21 +02:00
dd8a400bbb vcl: remove dead TextAttribHyperLink
couldn't even find a proper ctor beside copy-ctor

since commit e19c00ed76f5d46c3b88d2721b9ac84fcaaed97c
Date:   Wed Jul 13 13:30:48 2011 +0200
    callcatcher: remove unused TextAttrib stuff

Change-Id: Ia7f0bd1dcc725beb8cc53bb82372a4cce3ec68b0
Reviewed-on: https://gerrit.libreoffice.org/41012
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11 13:44:29 +02:00
d347c24036 convert std::map::insert to std::map::emplace
which is considerably less verbose

Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b
Reviewed-on: https://gerrit.libreoffice.org/40978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11 12:38:32 +02:00
88179e3de8 Revert "accessibility: remove useless calls to getAccessibleActionCount."
This reverts commit e2c14a6caabbb6413ae7b1e631a0a89f7b2ba4c7.

Change-Id: I6dc99c8ad9c6f15d6b1273338d96bc7909253ad9
Reviewed-on: https://gerrit.libreoffice.org/40815
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-08-07 01:48:42 +02:00
e2c14a6caa accessibility: remove useless calls to getAccessibleActionCount.
This also removes a lot of useless recursive locks.

Change-Id: Ie7f337683146bb5738f11b8f9194e73437312f03
Reviewed-on: https://gerrit.libreoffice.org/40325
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-05 21:27:14 +02:00
13fac4894f normalize resource locale ctor construction mechanisms
make them all the same and share std::locales more

various OModuleClient, etc, classes go away

Change-Id: I7e3ff01a69332eeacd22e3078f66a60318de62d5
Reviewed-on: https://gerrit.libreoffice.org/40634
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-02 10:36:07 +02:00
b1d829e52e move resmgr to unotools
and the vast majority of translations is to the ui language so default
ctor with that arg

and now drop OModuleResourceClient

Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-08-01 13:42:21 +01:00
aba7307785 Accessibility: simplify VCLXAccessibleEdit::setText.
Change-Id: Ie007d8e005909cfa8a59a25178c5694588443e94
Reviewed-on: https://gerrit.libreoffice.org/40324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-30 20:05:35 +02:00
b09deb0753 loplugin:constparams handle constructors
had to change the structure of the plugin considerably, was too messy to
structure it to do the calculations on a per-function basis

Change-Id: I4edee7735f726101105c607368124a08dba21086
Reviewed-on: https://gerrit.libreoffice.org/40516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 14:51:56 +02:00
00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::resource::OfficeResourceLoader
      com::sun::resource::XResourceBundleLoader
      com::sun::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
3b10ec87e3 loplugin:constparams in accessibility
Change-Id: I9c168295dcd6d4400c0f7c0b30ec22bd018cf93b
Reviewed-on: https://gerrit.libreoffice.org/40203
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20 09:15:39 +02:00
0d8eae9376 Don't call ensureIsAlive after comphelper::OExternalLockGuard.
comphelper::OExternalLockGuard calls ensureIsAlive, no need to call it twice.

Change-Id: I08d2b77dcb4d1e72a69c521bf969cbe1e65d5721
Reviewed-on: https://gerrit.libreoffice.org/39997
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-15 17:27:10 +02:00
a5f0c58cb4 Remove possible race condition in VCLXAccessibleEdit.
Change-Id: Id4738462b62d78fa48c937928a01b293cefdfabc
Reviewed-on: https://gerrit.libreoffice.org/39720
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-07-13 20:27:57 +02:00
8a75aa52ef use more OUString::operator== in a*..chart2
Change-Id: Ifb5608abebffd9687ed55e8c74f9be54a749111d
Reviewed-on: https://gerrit.libreoffice.org/39887
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13 11:02:55 +02:00
2ed9a2b641 Remove useless method OCommonAccessibleText::getText
Change-Id: I4ee2df05ffceaea9d22ec7e2f78dc6e13061b5ef
Reviewed-on: https://gerrit.libreoffice.org/39714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10 09:53:45 +02:00
a758956bb5 accessbility: Don't double lock mutexes in VCLXAccessibleEdit.
Also simplify this class.

Change-Id: I7abccd19287101918a6d9b4636ce2faecf169123
Reviewed-on: https://gerrit.libreoffice.org/39446
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-08 20:14:23 +02:00
a04ccfed42 loplugin:casttovoid: accessibility
Change-Id: I397c1c51c166d57917d2a412ec8f59c8a24936f2
2017-07-02 22:36:06 +02:00
b2b085441d accessibility: fix horrible memory leak in AccessibleTabBarBase
Reproducing tdf#108833 failed because applying the Master Page takes
> 2 hours; the time is spent calling vcl::Window listeners, of which
there were some 39525 after a couple minutes, almost all of which
AccessibleTabBarBase.

AccessibleTabBarBase::WindowEventListener() has an inverted condition
that suppresses the event that is generated from TabBar::Clear()
and thus when DrawViewShell::ResetActualPage() calls Clear() no
AccessibleTabBarPage is removed but then the InsertPage() calls create
duplicate objects that again register as listeners.

The condition is obviously inverted given the CVS commit message:

1.2.88.1
log
@#135353# do not pass VCLEVENT_TABBAR_PAGEREMOVED (all) to objects other than AccessibleTabBarPageList
@
text
a69 8

        if( ( pWinEvent->GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) &&
            ( (sal_uInt16)(sal_IntPtr) pWinEvent->GetData() == TAB_PAGE_NOTFOUND ) &&
            ( dynamic_cast< AccessibleTabBarPageList *> (this) != NULL ) )
        {
            return 0;
        }

Change-Id: I2a3b86bbd0f0251a966f41b316a3b313517df24f
2017-06-30 17:14:56 +02:00
4ab979fce0 Document::retrieveDefaultAttributesImpl did nothing
...ever since dac3b388798e78803a5df77894bfd30cddeb77c3 "INTEGRATION: CWS
a11ysep"

Change-Id: I1bba12e9f6ab69cf561a7eda010cefba91c47a49
2017-06-27 16:07:10 +02:00
7b5fac67fd loplugin:unusedfields in accessibility..comphelper
Change-Id: Ifb68d65fc3e48dd80e3ff2b7a4124468fdda1695
Reviewed-on: https://gerrit.libreoffice.org/39137
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23 09:01:24 +02:00
6ee9f2c188 loplugin:oncevar accessibility..basic
Change-Id: I8fb41b658ef0f6ad1774ea897eace3dc9bb12de6
Reviewed-on: https://gerrit.libreoffice.org/38969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20 07:50:06 +02:00
a3bedb7ae8 use local statics for getUnoTunnelImplementationId
replace uses of double checked locking pattern and
rtl::Static

Change-Id: I479d9d94f652b4fb4c67388405823a5f4e2b6ed4
Reviewed-on: https://gerrit.libreoffice.org/38690
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-13 09:13:37 +02:00
a7532d8f06 Remove VCLExternalSolarLock and IMutex.
Next step is to remove OContextEntryGuard.

Change-Id: I9460fb67fba6f3bfb3c809b730c33f38d225a64e
Reviewed-on: https://gerrit.libreoffice.org/38411
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12 08:45:48 +02:00
f2d40b8ba1 Remove all allocation of VCLExternalSolarLock.
This patch is graciously offered by Arnaud Versini.

Change-Id: I3ed5e1758d09542a2ca0533e3f4a6ceb2dbb6346
Reviewed-on: https://gerrit.libreoffice.org/38404
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05 13:41:38 +02:00
fd26c3199d accessibility: avoid useless allocation of a VCLExternalLock
Change-Id: I4f95d38e0f3d139eded37dac10946084cfd11acd
Reviewed-on: https://gerrit.libreoffice.org/37874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-21 21:00:39 +02:00
0e4a884b81 loplugin:stringcopy: accessibility
Change-Id: I8f6d1ed2b59ca4257884151b69edbbb556497378
2017-05-19 17:19:40 +02:00
3d8400a8d9 loplugin:comparisonwithconstant in accessibility..basegfx
re-running this plugin on these modules now that sberg has improved
the plugin.

Change-Id: I1818b1fa540cf62b81219a4f3ed2dcae8ff0e838
Reviewed-on: https://gerrit.libreoffice.org/37805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19 12:53:42 +02:00
482ef1bfe9 loplugin:comparisonwithconstant in accessibility
Change-Id: I934c78ec8daec656ca656d5c784f80895abfd2e4
Reviewed-on: https://gerrit.libreoffice.org/37666
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-16 11:57:44 +02:00
d17c7a7ec8 accessibility: Remove useless locks.
Change-Id: I61bb14e33db1e32f0eb4c27cbb62e7f37006213f
Reviewed-on: https://gerrit.libreoffice.org/37342
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-14 13:33:03 +02:00