summaryrefslogtreecommitdiff
path: root/svx/source/accessibility/AccessibleShape.cxx
AgeCommit message (Collapse)Author
2020-01-09tdf#129887: fix crash during scrolling down documentSerge Krot
regression from tdf#129708 Change-Id: I6c5d7eb90030234e899ab8ce5b3adec33e03962a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86454 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit a3c3f21a742f7c7f587bd63ee2617a150bb39b96) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86460 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-01-07tdf#129708 speed-up: check if we could create outline instead of creation of itSerge Krot
Change-Id: I0629b4e6ccae4ab9be0142fe39c627f2f9a8f5ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86199 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 92ccf53b2a8102299ac2c3e2612bb507d3a79c0f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86278
2019-09-06Fixing "...."Andrea Gelmini
Change-Id: I3424e17cfdfb563fdc5882942031deafae8689fe Reviewed-on: https://gerrit.libreoffice.org/78678 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-26fix impress crash in shape listenerNoel Grandin
after commit ec940941e0bd7db15c5cf7d43df82226e0d849dc Date: Tue Aug 20 17:03:13 2019 +0200 tdf#119388 add new UNO listener/broadcaster grumble grumble stoopid AccessiblePageShape that overrides AccessibleShape but doesn't actually set any shape on it. Also, there appear to multiple copies of something listening to the same shape somewhere, but I didn't track that further. Change-Id: I78713716788dd99b1f56519d960b43e5538c1304 Reviewed-on: https://gerrit.libreoffice.org/78120 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-23tdf#119388 add new UNO listener/broadcasterNoel Grandin
so that we only need to fire each event to the exact shape that wants it, instead of spamming all the shapes. Takes deleting a column from 20s to 10s for me. Note that none of the broadcasters are calling disposing(EventObject), so I did not make XShapeEventListener extend lang::XEventListener. If a memory leak regression points at this commit, possibly I missed something. Change-Id: I2b8db08247d3e0203d41faf77491368168994e4d Reviewed-on: https://gerrit.libreoffice.org/77857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): svxStephan Bergmann
Change-Id: Idbdee862f96a3d9e6baaa7203528a423c017eb80 Reviewed-on: https://gerrit.libreoffice.org/76640 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-09Simplify Sequence iterations in svxArkadiy Illarionov
Use range-based loops, STL and comphelper functions Change-Id: If6d190cf72b8653c1c3fbe9a6a6e47f10f1a6765 Reviewed-on: https://gerrit.libreoffice.org/75255 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-06-11loplugin:virtualdown in AccessibleShapeNoel Grandin
Change-Id: I35c8c4b2c561f3ce4fdc3d94cc74463abbc087f4 Reviewed-on: https://gerrit.libreoffice.org/73769 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-03tdf#39593 use UNO3_GETIMPLEMENTATION* macrosArkadiy Illarionov
Change-Id: I4e9af3b43a5baf19e100f42b3f37a2ade89ada5d Reviewed-on: https://gerrit.libreoffice.org/73320 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-27tdf#42949 Fix IWYU warnings in include/svx/[sS][a-h]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I84fc75e06e61e5391aef6e237c36daad95dedb84 Reviewed-on: https://gerrit.libreoffice.org/72550 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-15tdf#42949 Fix IWYU warnings in include/editeng/[a-e]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I81917d697adf79b1bd0de4cc262d3cd6bc8eb36f Reviewed-on: https://gerrit.libreoffice.org/70710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-14loplugin:sequentialassign in svtools..svxNoel Grandin
Change-Id: I465a2479f347303e6d4faa39cb0a0f05aec3bf07 Reviewed-on: https://gerrit.libreoffice.org/70719 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07log nice exception messages whereever possibleNoel Grandin
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-12o3tl::make_unique -> std::make_unique in svx/Gabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ic91b7170b10299001167e78ade1d24c16ce9319e Reviewed-on: https://gerrit.libreoffice.org/67475 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-10loplugin:indentation in svxNoel Grandin
Change-Id: Ifea8e24fb76025715ab2ff495d3949223584070a Reviewed-on: https://gerrit.libreoffice.org/67567 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-21Simplify containers iterations in svx/source/[a-e]*Arkadiy Illarionov
Use range-based loop or replace with STL functions Change-Id: I7a24407f9e8f38b4903a643210ca4511372d91f2 Reviewed-on: https://gerrit.libreoffice.org/63687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-11tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski
Change-Id: I1027242192dfd2be4918094d59f2a8f8c8fec041 Reviewed-on: https://gerrit.libreoffice.org/63266 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-09-11loplugin:simplifyconstruct in svtools..svxNoel Grandin
Change-Id: Ia20fac7cec01ac658a903f8b001807b2e72dbf3e Reviewed-on: https://gerrit.libreoffice.org/60316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from stoc to svx Change-Id: If562b1aa1d676d2c1cf513e953238abbb846c65c Reviewed-on: https://gerrit.libreoffice.org/58224 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-02pass OutlinerParaObject around by std::unique_ptrNoel Grandin
SdrText::SetOutlinerParaObject was modified to not check for self-assign, and instead assert because the existing check was no longer possible. Fix bug in SdrUndoObjSetText::Undo(), where it was calling SdrText::SetOutlinerParaObject unnecessarily, because NbcSetOutlinerParaObjectForText already does that. Optimise Outliner::GetEmptyParaObject by creating a new constructor for OutlinerParaObject, so we don't need to copy the new object we get back from GetEmptyTextObject, unnecessarily. Change-Id: I57c475583d6c31658c154e24992b3d587bad9841 Reviewed-on: https://gerrit.libreoffice.org/56730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-16AW080: Continued cleanups/remaps/correctionsArmin Le Grand
Change-Id: I953f29e6a8d398e00884a600d6f4ceba880489a5 Reviewed-on: https://gerrit.libreoffice.org/55913 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-04-25tdf#42949 Remove unnecessary localization headers of svxGabor Kelemen
Found by searching for the header names and the localization functions: git grep -l -e \<svx/dialmgr.hxx\> -e \<svx/strings.hrc\> -e svdglob.hxx | xargs grep -c -e SvxResId -e SvxResLocale -e ImpGetResStr | grep :0$ | grep -v /pch Change-Id: I45c979589165086288030031e713d536005a9833 Reviewed-on: https://gerrit.libreoffice.org/53241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-06use more Color in svxNoel Grandin
Change-Id: I78ea8db0d9c882cdc3813ff4fac0cdce9caf6ad1 Reviewed-on: https://gerrit.libreoffice.org/50801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-19loplugin:useuniqueptr in AccessibleShapeNoel Grandin
Change-Id: I4c91ce6eb47f2802313fed22357e5c960cea50b2 Reviewed-on: https://gerrit.libreoffice.org/49931 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: svxStephan Bergmann
Change-Id: I4057fe05983fb2b63b592ffd325894c12b9cb5b2
2017-10-18return early on failureCaolán McNamara
Change-Id: Id96ba954d3056cf982701090cf84ab4b1793b40b Reviewed-on: https://gerrit.libreoffice.org/43489 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-18potential deref of empty xStateSetCaolán McNamara
Change-Id: I83d876b0d966b18cdf85249b7e856e4e4f4dec27 Reviewed-on: https://gerrit.libreoffice.org/43488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-18Resolves: tdf#109282: a11y crash in use after disposeCaolán McNamara
calc, chart in tab 3 with a11y enabled, select chart switch to tab 1, crash cause mpParent has been deleted, IsDisposed is correctly set, but shape accesses parent anyway Change-Id: I6f57a798bfcc82eebb883291cec54e157ff5187b Reviewed-on: https://gerrit.libreoffice.org/43487 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-17remove UL/L suffixes from integer constants in initialiser/call expressionsNoel Grandin
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300 Reviewed-on: https://gerrit.libreoffice.org/41214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara
* 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::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-06-27loplugin:oncevar in svxNoel Grandin
Change-Id: I22a3a13e059ac7d3479f12860564fe3eb1b55e44 Reviewed-on: https://gerrit.libreoffice.org/39282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-28tdf#42949: clean up includes in include/svx/[a-c]* with iwyuJorenz Paragas
Change-Id: I7768f4dbe9892c4264cb16eed87497894aa7494e Reviewed-on: https://gerrit.libreoffice.org/26582 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-02-12Various typos on accessibleJulien Nabet
Change-Id: Id28a4a2cbbcec10a7cc9cb40ad208d575352039b Reviewed-on: https://gerrit.libreoffice.org/34161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-28loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-16svx: remove nonsense exception throwing codeMichael Stahl
Commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366 added code to AccessibleShape::getAccessibleStateSet() that tries to retrieve some state from the parent, but the implementation of the base class AccessibleContextBase::getAccessibleParent() throws if it is already disposed, which is the condition checked just before, so surely this doesn't have any other effect than throw DisposedException, except possibly in the mpText == null case which is already handled in the other branch with identical code. Change-Id: Iaf109f69036437989abbbf914ef32cca1528a97e
2016-12-16tdf#104488 editeng,svx: throw less Accessible exceptionsMichael Stahl
For some of these functions it doesn't make sense to throw DisposedException as they can return a sensible default value. Particularly AccessibleShape::getAccessibleChildCount() was throwing an exception that was never caught. Change-Id: I000149cf9bb0fd13f69650ad8224a8daf26f7bee
2016-12-11OSL_TRACE -> SAL in sfx2..svxNoel Grandin
Change-Id: I78cf8058a5682baa3d7b00a25feeb2d28fb3e66e Reviewed-on: https://gerrit.libreoffice.org/31799 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28coverity#1371262 Missing move assignment operatorCaolán McNamara
Change-Id: Ibb430a683f818add50facc23ac2893b558bff70c
2016-10-27loplugin:expandablemethods in svxNoel Grandin
Change-Id: I0d193ddf07cc0ddc89b6ce2df6eb71d44e49b631 Reviewed-on: https://gerrit.libreoffice.org/30295 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-08-30convert DescriptionGenerator::PropertyType to scoped enumNoel Grandin
Change-Id: Id55ccb4bf0109f1bb6f870b38792e3454b567877
2016-08-25drop enum IAccessibleViewForwarderListener::ChangeTypeNoel Grandin
since only one of it's values was in use, and simplify the ViewForwarderChanged method as a consequence. Change-Id: I00544c9b0a601c01e49519be5bafe192c6f735f6
2016-06-19loplugin:salbool: Implicit conversions from non-Boolean fundamental typesStephan Bergmann
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann
Change-Id: Iadc107a89e6c489bf5261042ec6853a1354c434d
2016-04-12Use const_iterator when possible (svx/accessibility)Julien Nabet
Change-Id: I9bdd0a03f69bb92ed668da2ad596e23164d7f290 Reviewed-on: https://gerrit.libreoffice.org/24022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-03-07loplugin:write only fieldsNoel Grandin
Change-Id: Ia0fb487c5590e096659b81f76c4dc543e184c59c
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>