summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-03-08use more string_viewNoel Grandin
found by tweaking the stringview loplugin Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-26CppunitTest_test_a11y: Missing test dependencyXisco Fauli
Similar to 0249f00aacc008969eb9bca5905dc2fea99e27fe "Missing test dependency" Change-Id: I37813dab57abd589d1cd28f44c0e0940f871c14b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163932 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-02-15disable CppunitTest_test_a11y on WindowsNoel Grandin
keeps crashing on the Windows jenkins boxes Change-Id: I80415432dab9a2967c9a85fcf89f3840eecc91e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163454 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-13UnoApiXmlTest: factor out common codeXisco Fauli
Change-Id: I5c7f76b61a0dab8b4ebd1ac4680a7c25f982680c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163307 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-02-07missing dependency in CppunitTest_test_a11yNoel Grandin
found while doing other builds - if the build ordering is very unlucky, acc is not built when this runs, the dynamic load fails in the accessibility factory fails, and we fall back to using the DummyAccessibilityFactory instead of the real one and the test will crash. Change-Id: Ic16fdbe17d50c6be26b5627a4f515c91e1f7f609 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163091 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-04cid#1591495 Resource leakCaolán McNamara
since: commit 1d7ce421480d9170316533de03feb8d04eb5c767 Date: Tue Jan 30 17:15:07 2024 +0600 tdf#159438: when there's no frame, close previous bookmark first Change-Id: I81a28429041047afbe6f4cea327e6f19e3805cc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162953 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-30tdf#159438: when there's no frame, close previous bookmark firstMike Kaganski
Commit 260d6cc6471444b4ef20ed6673831b0b12f96333 (INTEGRATION: CWS mtg2 (1.30.120); FILE MERGED, 2005-12-21) for #i58438# made sure to process previously opened bookmarks that close at this node, before opening the bookmarks that start here. Commit 76a4305d1e90b6617054dd33036e64f005dbcf04 (sw: fix inconsistent bookmark behavior around at-char/as-char anchored frames, 2017-12-21) re-introduced the problem accidentally: it only intended to handle case when there is an anchored frame here. This change re-instates the correct order (close bookmarks first; then process collapsed ones; then open new bookmarks) in case there's no anchored frames here. To avoid a problem when a non-collapsed bookmark starts and ends at the same point (e.g., its text was deleted), it gets converted to collapsed in lcl_FillBookmark. Thus, testRemoveBookmarkText was fixed in sw/qa/extras/uiwriter/uiwriter4.cxx. There is no reason to keep the separate -begin/-end elements, especially since on the following open/save round-trip, it will become collapsed anyway. Change-Id: Ib555a76f6f776001e12908a1299c24eebf591f6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162743 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-24SfxViewShell::GetFirst lambda is never passed a null pShellCaolán McNamara
it's null checked before the lambda gets called so make this a reference Change-Id: Ib8804a2003cbdc6b7b62d8a38fa514d0ce08128c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162495 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-20this duplicated CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCECaolán McNamara
so use that instead Change-Id: I0a627fdd2f2657a3f23d47f014ff7019cab544f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162330 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-20calc doc with saved zoom in settings causes disjoint invalidations...Caolán McNamara
in multiple views, while the invalidations rectangles should be reported at the same place from each view. on load, ScTabView::SetZoom gets called with the zoom stored in the document settings, which both calls sets Zoom on the ViewData, and then calls ZoomChanged, which syncs the GridWindows MapMode from the ViewData derived GetDrawMapMode(). Later lok sets zoom via setClientArea which leaves the GridWindows MapMode untouched and out of sync with the newly changed ViewData MapMode. Typically then, on e.g. on deleting text in one view then ScViewFunc::DeleteContents or similar is called which calls ScTabView::UpdateCopySourceOverlay which calls ScGridWindow::UpdateCopySourceOverlay and that sets the GridWindow MapMode to the DrawMapMode but then *for lokit* returns early (among a few other unlikely early return cases) while every other similar func restores the orig GridWindow mode before returning. So the view which is used to make the change ends up with GridWindows synced to the ViewData MapMode, which looks like accident. While the other view remains with GridWindows with MapModes unsynced with that views ViewData MapMode. So on invalidate, the view that was used to make the change has GridWindows with MapModes that report the correct rectangle, while the other unsynced view will report an incorrect rectangle, until something happens in that view to get it to exec UpdateCopySourceOverlay and get synced. Here add the sync to ScModelObj::setClientZoom so the two MapModes remain synced once that is called. Change-Id: I2da59f50ae2b0e3ea6b7ef8b54debdab1ee98266 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162312 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162322 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-11cool#7492 sfx2 lok: set language/locale on async sidebar updateMiklos Vajna
Create two Calc views, set the first view language to English, second view language to German. Type in the English view, double-click on a chart in the German view. The sidebar in the German view will have English strings in it. This doesn't happen if there is no typing right after the chart activation in the English view. What happens is that the sidebar update is async, and sfx2::sidebar::SidebarController::notifyContextChangeEvent() gets called, which registers an aync event when it calls AsynchronousCall::RequestCall(). Then later this job gets scheduled, but possibly by that time the active view is the English one, leading to English strings when chart::ColumnChartDialogController::getName() calls SchResId(), which works from the language of the current view. Fix the problem similar to what commit fb7b0b944741e4efae8d92a6e305036aff906c7a (cool#7492 sfx2 lok: just set language/locale on async binding update, 2024-01-09), did: set the language/locale from the current view before executing the async job and restore the old value once we're done. Extract the now duplicated code to a new SfxLokLanguageGuard, so in case more places have a problem with incorrect l10n, then it's meant to be a one-liner to fix further places. Change-Id: I52724a24d93fb753175a3b9b99bc33178519d981 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161920 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-01-11tdf#105844 add test for ODF wholesome encryption with macro signatureMichael Stahl
... plus manifest schema extension. Change-Id: I73721db8620e97bd58556f9a71afcb0a33f6c7e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161898 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-01-03UnoApiTest::loadFromURL -> UnoApiTest::loadFromFileMike Kaganski
The old name was misleading (it doesn't take an URL, but a filename); also, now it's easier to grep for it - doesn't get mixed with vcl::graphic::loadFromURL. Change-Id: Ib88d2194200a6a54d2326971e0306ba39f0c7025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161578 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-19tdf#123864 a11y: Handle new CHECKABLE state in misc placesMichael Weghorn
Add reporting/handling of the CHECKABLE a11y state added in commit d6c6472bbe1c90b733a4d69c4c8528f4de3750d3 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Nov 13 15:53:44 2023 +0100 tdf#123864 a11y: Add new AccessibleStateType::CHECKABLE in various places where it seems pretty straightforward. `VCLXAccessibleMenuItem` is a bit more complex and will be handled separately. Change-Id: I212b8439609d34410413959973163aa7d809cbf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160901 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-12-18Remove duplicate test for PrintControls propertySamuel Mehrbrodt
Change-Id: I9f4a832cab84bd5815e696397fea3b7668386a36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160898 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18[API CHANGE] tdf#158041 Remove unused reverse printing option from swSamuel Mehrbrodt
Change-Id: I8b4597dbafc78e881fe556de8ce8221e50a673bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160777 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18[API CHANGE] tdf#158041 Remove unused drawing printing option from swSamuel Mehrbrodt
Change-Id: I95f81f166ab9d75622c83672101925894b2f2e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160774 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18[API CHANGE] tdf#158041 Remove unused table printing option from swSamuel Mehrbrodt
"for now it was decided that tables should always be printed" -> make this decision from 2015 permanent Change-Id: Ica5958a74ec6766040ab59f2c91224b75df4d807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160766 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-16cid#1545970 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545957 COPY_INSTEAD_OF_MOVE cid#1545944 COPY_INSTEAD_OF_MOVE cid#1545939 COPY_INSTEAD_OF_MOVE cid#1545931 COPY_INSTEAD_OF_MOVE cid#1545926 COPY_INSTEAD_OF_MOVE cid#1545909 COPY_INSTEAD_OF_MOVE cid#1545899 COPY_INSTEAD_OF_MOVE cid#1545896 COPY_INSTEAD_OF_MOVE cid#1545894 COPY_INSTEAD_OF_MOVE cid#1545858 COPY_INSTEAD_OF_MOVE cid#1545823 COPY_INSTEAD_OF_MOVE cid#1545820 COPY_INSTEAD_OF_MOVE cid#1545819 COPY_INSTEAD_OF_MOVE cid#1545772 COPY_INSTEAD_OF_MOVE cid#1545749 COPY_INSTEAD_OF_MOVE cid#1545743 COPY_INSTEAD_OF_MOVE cid#1545739 COPY_INSTEAD_OF_MOVE cid#1545635 COPY_INSTEAD_OF_MOVE cid#1545603 COPY_INSTEAD_OF_MOVE cid#1545602 COPY_INSTEAD_OF_MOVE cid#1545592 COPY_INSTEAD_OF_MOVE cid#1545544 COPY_INSTEAD_OF_MOVE cid#1545532 COPY_INSTEAD_OF_MOVE cid#1545520 COPY_INSTEAD_OF_MOVE cid#1545512 COPY_INSTEAD_OF_MOVE cid#1545490 COPY_INSTEAD_OF_MOVE cid#1545483 COPY_INSTEAD_OF_MOVE cid#1545467 COPY_INSTEAD_OF_MOVE cid#1545461 COPY_INSTEAD_OF_MOVE cid#1545458 COPY_INSTEAD_OF_MOVE cid#1545428 COPY_INSTEAD_OF_MOVE cid#1545394 COPY_INSTEAD_OF_MOVE cid#1545385 COPY_INSTEAD_OF_MOVE cid#1545383 COPY_INSTEAD_OF_MOVE cid#1545366 COPY_INSTEAD_OF_MOVE cid#1545357 COPY_INSTEAD_OF_MOVE Change-Id: I76224326977b4067b94ca3176cad1ca6de17930a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160847 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1546281 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546278 COPY_INSTEAD_OF_MOVE cid#1546276 COPY_INSTEAD_OF_MOVE cid#1546247 COPY_INSTEAD_OF_MOVE cid#1546244 COPY_INSTEAD_OF_MOVE cid#1546243 COPY_INSTEAD_OF_MOVE cid#1546220 COPY_INSTEAD_OF_MOVE cid#1546209 COPY_INSTEAD_OF_MOVE cid#1546207 COPY_INSTEAD_OF_MOVE cid#1546206 COPY_INSTEAD_OF_MOVE cid#1546205 COPY_INSTEAD_OF_MOVE cid#1546197 COPY_INSTEAD_OF_MOVE cid#1546180 COPY_INSTEAD_OF_MOVE cid#1546172 COPY_INSTEAD_OF_MOVE cid#1546165 COPY_INSTEAD_OF_MOVE cid#1546164 COPY_INSTEAD_OF_MOVE cid#1546158 COPY_INSTEAD_OF_MOVE cid#1546151 COPY_INSTEAD_OF_MOVE cid#1546135 COPY_INSTEAD_OF_MOVE cid#1546132 COPY_INSTEAD_OF_MOVE cid#1546129 COPY_INSTEAD_OF_MOVE cid#1546128 COPY_INSTEAD_OF_MOVE cid#1546122 COPY_INSTEAD_OF_MOVE cid#1546117 COPY_INSTEAD_OF_MOVE cid#1546113 COPY_INSTEAD_OF_MOVE cid#1546106 COPY_INSTEAD_OF_MOVE cid#1546099 COPY_INSTEAD_OF_MOVE cid#1546091 COPY_INSTEAD_OF_MOVE cid#1546085 COPY_INSTEAD_OF_MOVE cid#1546069 COPY_INSTEAD_OF_MOVE cid#1546063 COPY_INSTEAD_OF_MOVE cid#1546062 COPY_INSTEAD_OF_MOVE cid#1546058 COPY_INSTEAD_OF_MOVE cid#1546056 COPY_INSTEAD_OF_MOVE cid#1546051 COPY_INSTEAD_OF_MOVE cid#1546040 COPY_INSTEAD_OF_MOVE cid#1546030 COPY_INSTEAD_OF_MOVE cid#1546028 COPY_INSTEAD_OF_MOVE cid#1546015 COPY_INSTEAD_OF_MOVE cid#1546001 COPY_INSTEAD_OF_MOVE Change-Id: Ib954c92a300fc323b29f27880fdf8bc46ed98862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160520 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-04tdf#126084 support writing SVG images into OOXML using the MS OOXML extensionTomaž Vajngerl
SVG files aren't supported in OOXML, but we can write it using the MS OOXML extension, which is supported in the latest MSO versions. For now this only implements the support in the exporter. Change-Id: I688180fb5772f3999c2ee3020bc234f90d57cc2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157237 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-29Extended loplugin:ostr: testStephan Bergmann
Change-Id: I75974611446486415c8b19b3723761ab1bb46c74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160098 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-19Extended loplugin:ostr: testStephan Bergmann
Change-Id: Ia4dfbd1afcf01028d8292ca656979d7017196244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159669 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-28tdf#135586 a11y: Add a new BLOCK_QUOTE a11y roleMichael Weghorn
A block quote role exists in all of WAI-ARIA 1.3 (role "blockquote", [1]), IAccessible2 (`IA2_ROLE_BLOCK_QUOTE`, [2]) and AT-SPI (`ROLE_BLOCK_QUOTE`, [3]). Take over the definition that is the same in WAI-ARIA and IAccessible2: > A section of content that is quoted from another source. The intended use for now is for a Writer paragraph using the "Block Quotation" paragraph style, similar to how the HEADING role is used for paragraphs using a corresponding paragraph style. For gtk3 (ATK) and winaccessibility (IAccessible2), map the new role to the equivalant roles. For macOS and the gtk4 as well as the Qt-based VCL plugins on Linux which currently don't have an equivalent role, fall back to the same role that the PARAGRAPH role is mapped to. This way, the behavior there will remain unchanged once the BLOCK_QUOTE role is used for Writer paragraphs with the corresponding style. In general, treat BLOCK_QUOTE like PARAGRAPH in code applying special handling for the PARAGRAPH role. [1] https://w3c.github.io/aria/#blockquote [2] https://github.com/LinuxA11y/IAccessible2/blob/3d8c7f0b833453f761ded6b12d8be431507bfe0b/api/AccessibleRole.idl#L318 [3] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/7cc4cee53ddbd22631fd110f0e5ce045dec2e411/xml/Accessible.xml#L615-616 Change-Id: I248c183a2e7ec5d6f0a89bf3cb4829bbd8588c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158573 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-26tdf#153519 use new IdleTask::waitUntilIdleDispatchedNoel Grandin
to wait until the Idle inside sw/ has done populating the navigator tree. Which required (*) moving the code down from test/ to vcl/ to avoid circular dependency issues. (*) adding a call SolarMutexGuard before Application::Yield inside IdleTask::waitUntilIdleDispatched (*) exposing the function to python by adding a method to the XToolkitExperimental UNO API Change-Id: Iee418f7a0beb1f5b53addb7fe25823d61720eb3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: testStephan Bergmann
Change-Id: I883d34c9562b48d987a16a0254272f3aeeb4bf5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158242 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19Presumed loplugin:cppunitassertequalsStephan Bergmann
Change-Id: Ib8de8835d7ceb214bbf87d7cebfbb56723e8fb28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158135 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-08make testCondFormatFormulaListenerXLSX reliableCaolán McNamara
Change-Id: Ibd8c9b7831af73967229c578b9dcf7217d800610 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157686 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-07loplugin:ostr: automatic rewriteStephan Bergmann
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-10-06Simplify a bitMike Kaganski
Change-Id: Idb278ea6731793631fe1282820c7e7d3fccf33d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157653 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-06sc: qa: add loadWithParams and SaveWithParamsHenry Castro
Add option to load and save with optional parameters. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I2d735443da11634d072742f1bf6f38f90bced2c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157141 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157569 Tested-by: Jenkins
2023-10-06xmltesttools: add assertXPathDoubleValue that takes a double with deltaIlmari Lauhakangas
and use it to make WmfTest::testSetTextAlignWmf independent of DPI Change-Id: I2048239088a8dcc3e3ab1db96413894b5bcc56d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157377 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-08-27tdf#45904: Move _Footnote Java tests to C++anfanite396
Change-Id: I1e69267a72296f55fac12326ec69d3c29e63561a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156055 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-26tdf#45904: Move _XFootnote Java tests to C++anfanite396
Change-Id: Ibdc28ab8818860b9c94abeac33713607dbcf8df4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155635 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-26tdf#45904: Move _DocumentIndexMark Java tests to C++anfanite396
Change-Id: I144d06ab3abb47134060d554a4016009246aa739 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155163 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Move _XTextRangeCompare Java tests to C++anfanite396
Change-Id: I40390a8b05f0e685a9408f0c486f6129633bc5b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155634 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Move _XAutoTextContainer Java tests to C++anfanite396
Change-Id: Ie6ebc43c52204984cb6196f539c735701d13dc22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155627 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Move _BaseIndexMark Java tests to C++anfanite396
Change-Id: Ie6c09c0cfedbad8168281af354590ab7c9dd374e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155162 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904 Move _NumberingRules Java tests to C++anfanite396
Change-Id: I86d559767204e1e8e1fd232db63f26a5c1ce67da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155089 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-02a11y: Don't always append window type to a11y name in debug buildsMichael Weghorn
Appending " (Type = <number>)" to the accessible name is probably meant for debugging purposes to see what type of window is involved, but doing that by default in debug builds has disadvantages, e.g.: 1) It affects how assistive tooling, like screen readers, handles the accessible objects, therefore the behaviour with a debug build (what a developer working on something experiences) does not necessarily match what happens in non-debug builds (what end users will experience). For instance, when Orca announces the "Update styles" push button in Writer's formatting toolbar, it not only announces the extra type information for the objects in the hierarchy it announces anyway, but announces the panel in addition, since it has a non-empty name due to the appended type information. Announcement without this change in place (from Orca log): INFO:speech:SPEECH OUTPUT: ' (Type = 371) panel.' INFO:speech:SPEECH OUTPUT: 'Formatting (Type = 356) tool bar' INFO:speech:SPEECH OUTPUT: 'Update push button.' Announcement with this change in place: INFO:speech:SPEECH OUTPUT: 'Formatting tool bar' INFO:speech:SPEECH OUTPUT: 'Update push button.' 2) It breaks selecting the object under the mouse cursor in Accerciser at least with the qt6 VCL plugin when the object is in a dialog, because the window name retrieved via the accessibility APIs (with the appended type information) does not match the one retrieved via Wnck [1]. Therefore, don't append the type information by default, but only if environment variable `LIBO_APPEND_WINDOW_TYPE_TO_ACCESSIBLE_NAME` ist set (typically `LIBO_APPEND_WINDOW_TYPE_TO_ACCESSIBLE_NAME=1`, but any value other than "0" will do), so that can still be used for cases where having the type as part of the accessible name is useful. [1] https://gitlab.gnome.org/GNOME/accerciser/-/blob/5af3fdbfb8a7832e434ad6fc7d2ecaad18f2e32e/plugins/quick_select.py#L109 Change-Id: Ie33b14fbdf9731b02c8c620d7a5ac718ef99367d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155094 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-07-27vcl gtk3: Introduce AT-SPI2 tests for the GTK3 accessibility layerColomban Wendling
Add tests for the GTK3 accessibility platform layer. These tests compare the internal LO representation with what is visible to the platform, and thus the user's accessibility tools. In most cases the tests are fairly trivial as LO's internals are not far off AT-SPI2's expectations. There are however notable exceptions like for example the text attributes, that have a wildly different representation and require more complex checks matching what LO's platform layer does, the other way around. These tests use libatspi2 directly, but as the C API is awful to work with regarding resource management, there are wrappers to handle the complexity using RAII. The resulting API is fairly trivial to use. As these tests require using the GTK3 VCL plugin and for the a11y tree to be visible to AT-SPI2, they are run under XVFB using a separate dbus session through dbus-launch. Working on this has already lead to reporting and/or solving some issues: * https://gerrit.libreoffice.org/c/core/+/151303 * https://gerrit.libreoffice.org/c/core/+/151650 * https://gerrit.libreoffice.org/c/core/+/152456 * https://gerrit.libreoffice.org/c/core/+/152457 * https://bugs.documentfoundation.org/show_bug.cgi?id=155625 * https://bugs.documentfoundation.org/show_bug.cgi?id=155705 * https://gerrit.libreoffice.org/c/core/+/152748 Only a subset of the a11y APIs are covered for the moment, but the current state should make it easy to extend upon. Change-Id: I1a047864ce8dc1f1bc3056ad00159f7fd5e5b7d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153069 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-06-29tdf#73537 - sc: show author and creation date in calc commentsBalazs Varga
in temporory mode. Show the author and creation/modification date of the the comment only in temporory mode. In edit mode, or visible mode, shows only the original text. Change-Id: I2c5856e4c6a813dbef4ad55de319f922daa57f67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153358 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-06-27loplugin:stringstatic look for more stringsNoel Grandin
that can be initialised at compile-time instead of runtime Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26new loplugin:constexprliteralNoel Grandin
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-21sc: add CharComplexColor and CellBackgroundComplexColor propertiesTomaž Vajngerl
Change-Id: I30153796a39b2aa3648cb107905974ed6f0f3851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151668 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-05-31SwModelTestBase: get rid of mustValidateXisco Fauli
and remove duplicated save method Change-Id: I9bdf0e28d59ae281fccbafd266b86cdf89c112da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152421 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-05-23Don't even bother to introduce unused variablesStephan Bergmann
With <https://gerrit.libreoffice.org/c/core/+/152157> "More conservative SAL_WARN_UNUSED to avoid -Werror,-Wunused-private-field", these two cases would have started to cause "unused variable declaration [loplugin:casttovoid]" (because the call to isWarnUnusedType in compilerplugins/clang/casttovoid.cxx would no longer return true). Just avoid that by not introducing the variables in the first place. Change-Id: I3d2b085082555d1765fbd32045b5157deb0af67e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152158 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-17use more string_viewNoel Grandin
Change-Id: If4523dc2c89d1fb1c5e11665ee60044834fcecd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150458 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-14loplugin:stringviewparam improvementsNoel Grandin
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>