summaryrefslogtreecommitdiff
path: root/sw/qa/inc
AgeCommit message (Collapse)Author
2024-11-19improve loplugin passparamsbyrefNoel Grandin
I think I managed to disable this when I converted it to use the shared plugin infrastructure. So fix that, and then make it much smarter to avoid various false positives. Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-30SwModelTestBase: add getSwTextDoc and use it everywhereXisco Fauli
Change-Id: I09f132a9c79f0aa4c3f4d3ca5f2fed233d0dcb06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175641 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-16SwModelTestBase: Remove unused executeImportExportXisco Fauli
Since b67991ecdb12bfa385496731f192ac081947c779 "CppunitTest_sw_htmlexport: use more CPPUNIT_TEST_FIXTURE()" Change-Id: I572649a1f70180084846aa47446689b331f35f11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175024 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-10-16SwModelTestBase: remove obsolete comment blockXisco Fauli
Change-Id: I4b4383c02cddc26e2f96ab4d252e55ac5f0dc3d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175023 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-16SwModelTestBase: drop isExportedXisco Fauli
Change-Id: I4eb169909abff3eba935e4ad5ff7875b1b122953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175019 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-10-16sw: drop DECLARE_FODFEXPORT_TEST macroXisco Fauli
Change-Id: I0b232aa689ffc70a2cfca1af5ba5529e34060371 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175015 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-09-12SwModelTestBase: remove duplicated code to print execution timeXisco Fauli
This is already handled in class TimingListener in sal/cppunittester/cppunittester.cxx Change-Id: I77d330351d53ef084597e6f46099d1d16f59aae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173258 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-07-30sw: get rid of parseDumpXisco Fauli
So parseLayoutDump is only called once per test Change-Id: Ia199e0a7eeac26fbde94f6450d2aa49828940806 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171219 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-07-30tdf#153040 PDF export: disable export of form fields as PDF forms by defaultMiklos Vajna
Open <https://bugs.documentfoundation.org/attachment.cgi?id=195586>, notice that from "bbb", the middle "b" is bold, export to PDF, none of the "b"s are bold. The reason for this is that by default we map form controls and content controls to fillable PDF forms, which can only contain plain text. Fix the problem by defaulting to not exporting form controls / content controls to PDF forms: most users just want a PDF that is close to what they saw in the edit window -- and the ones who want a fillable PDF form can still opt in. Once the UI checkbox is enabled, we even remember that. Based on <https://gerrit.libreoffice.org/c/core/+/152622>, thanks Justin! Change-Id: Iddb75d1dbd969045321e139154f254c059eebf16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171226 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-07-29sw: get rid of discardDumpedLayoutXisco Fauli
Change parseLayoutDump to make it the only place where the layout is dumped and once it's not needed anymore, discard it Change-Id: Ia89ff569752e1e592209fa4ccb0b4753eee17e2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171075 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-06-13loplugin:ostr in sw/qaNoel Grandin
Change-Id: Ib67997a3f491afaec380ef65bc60588362d9cc3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168812 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-06-06sw: remove unused DECLARE_RTFEXPORT_TEST()Miklos Vajna
Replaced by CPPUNIT_TEST_FIXTURE(). Change-Id: I6966e94bf39f8353ca00287939aa348176e001ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168484 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-03-27CppunitTest_sw_htmlexport: use more CPPUNIT_TEST_FIXTURE()Miklos Vajna
No need to go via Writer-specific macros here. Change-Id: Ic7f0ed5ff16741d14488a19f1e73486690dd685b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165365 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-03-17loplugin:unusedmethodsNoel Grandin
Change-Id: Ib0a72355972662c6b902bca9a527be91fb3e1d17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164930 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-21sw model test base: remove no longer needed postLoad()Miklos Vajna
The only impl was a stub, it was only called at one place. Change-Id: I7b6b6824e871381b1a96b5cecd4a94beb3197310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163677 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
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-07CppunitTest_sw_ooxmllinks: avoid DECLARE_LINKS_EXPORT_TEST completelyMiklos Vajna
No need go via Writer-specific macros. Change-Id: Ic738ff318f94181b093fd948dcf38057b6c7e189 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163067 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-01-29loplugin:unnecessarymethodsNoel Grandin
Change-Id: I3bc2bde431dc71d4a01f7e314c67be31271be9e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162681 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-10sw: remove deprecated SwModelTestBase::getLength()Miklos Vajna
Better to check the body text, not just the length. Change-Id: Ic40f770fff8e27594a6bdb87ce105aeeddf3f14d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161872 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-12-06Remove now unused SwModelTestBase::preTest()Miklos Vajna
Which was a way to place test setup code far from the test itself, so good to get rid of it. Change-Id: I9f88ded958e7b546f0b1ecd7ce025e72a2a5e245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160373 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-07-29Simplify WrapReqifFromTempFile usageMike Kaganski
This function was only ever used together with creation of a memory stream, and parsing the result. So put it all inside. Change-Id: I4d77b9b0519539f774b73936c3f2eacaab481cb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155018 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-12sw: getTestName() can goXisco Fauli
after commit 54d69f55d13ec39e1b2a2a6883b98cd23c6609a4 Author: Miklos Vajna <vmiklos@collabora.com> Date: Tue Jul 11 20:11:25 2023 +0200 CppunitTest_sw_htmlexport: clean up not needed reqif part of preTest() All reqif tests set the filter options explicitly already. Change-Id: Ib7962578ddb2ce002910868c6d6f85ae4a1f6c79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154353 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-12ooxml: import and export border theme colors for various props.Tomaž Vajngerl
This adds support to import and export various border (lines) theme color properties. SvxBoxItem needed to be fixed, because it can happen that the BorderLine is not yet initialised and we already set the border's ComplexColor. Now there is a maTempComplexColor inside SvxBoxItem, which stores the ComplexColor until the specific BorderLine is initialized. In addition add roundtrip test for import and export cycle. Change-Id: Idd307a3adaf364745aed8fc8540bf72ef4948198 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152833 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-01SwModelTestBase: simplify code a bitXisco Fauli
and rename reload method to saveAndReload to unify code and use it everywhere Change-Id: I7c0f4e8d2feb7a0f9ca28df4b6dddd7a11b2e57e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152455 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-01Use OUString for filterMike Kaganski
Change-Id: I45c809cfd4ee9b1c6f479db1ad0a6bf2d479fed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152473 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-31SwModelTestBase: drop mustCalcLayoutOfXisco Fauli
it's not used anywhere since f3294eb1789e9603b5129f0f2d61116fd4853b52 "CppunitTest_sw_htmlexport: remove not needed mustTestImportOf()" Change-Id: Ifb27c176bd64ca3efecb0f9b142b6144c5703556 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152453 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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-04-24sw floattable: remove no longer needed ImportFloatingTableAsSplitFly settingMiklos Vajna
This was useful while developing the DOCX and DOC filters, but those are now enabled by default, so this can be removed. Change-Id: I0ebde6ec5e1a84f368d35b362bd1c3b1aabc9d5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150895 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-12tdf#61594 sw floattable: import floating tables as split flys by defaultMiklos Vajna
To get wider testing. Change-Id: Ic05844c6ae48429feb9a0cd3217a7afce6c902dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150252 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-11sw: remove duplicated codeXisco Fauli
Change-Id: I200061d0624318abdc8f2850661a0b8c0005bfe3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150227 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-03-17sw floattable: unconditionally map <w:tblpPr> to SwFormatFlySplitMiklos Vajna
CppunitTest_sw_ooxmlexport8's testN816593 failed in the SW_FORCE_FLY_SPLIT=1 case because the re-import of the document merged two tables into one. The problem starts earlier, we didn't import the table with a <w:tblpPr> as a floating table, but we should. Fix the problem by never going via m_aPendingFloatingTables in the SW_FORCE_FLY_SPLIT=1 case, since that was only a workaround for layout limitations. This conditionally reverts commit 78d1f1c2835b9fae0f91ed771fc1d594c7817502 (fdo#68607 bnc#816593 DomainMapperTableHandler: don't always start a frame, 2013-09-03). Also add a SwModelTestBase::FlySplitGuard, so it's just a one-liner change to test the SW_FORCE_FLY_SPLIT=1 case from cppunit. The goal is to have this on by default once it's mature enough. Change-Id: I9d94a49f7a0c27dd43e8fd388867c65d6d25f2e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149044 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-03-16XmlTestTools: factor out common codeXisco Fauli
Change-Id: Ie212c86c6c0ac20878be88d88ade5eb1c989942d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148935 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-03-15SwModelTestBase: factor out common codeXisco Fauli
Change-Id: Iab415dadd3bc465d31bf14cbe2f384b9588466a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148929 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-23SwModelTestBase: add selectShape helperXisco Fauli
See discussion in https://gerrit.libreoffice.org/c/core/+/147506 Change-Id: If3f3b471d5053dbc1bf34383e64e9672d026aaae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147515 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-18Remove redundant (and wrong!) explicit template argumentsStephan Bergmann
At least the last one, for css::table::BorderLine2::LineWidth, should have been sal_uInt32 instead of sal_Int32. Change-Id: Iab375988432b6a69172625af86cc25b813f60446 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147268 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-08htmlexport: close li mark not only in xhtmlSzymon Kłos
As commented in sw/source/filter/html/htmlatr.cxx:766 "// OutHTML_NumberBulletListEnd() will end a list item" We have to do it also in HTML not only XHTML so node will be closed and we get correct structure. This is followup for: commit 2466b9fcf20ee61f6fc621298011c0efaa55e7c6 Author: Miklos Vajna <vmiklos@collabora.com> Date: Mon Feb 21 16:38:51 2022 +0100 sw HTML export, XHTML mode: fix lost </li> when last list item is not numbered Change-Id: I99baa59b437572b157df8057445cf6c741f936b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143508 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146651 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-12-01sw: check files are loaded without any warning errorXisco Fauli
Change-Id: Ie48b33a93b7c2201c73418c625b63fdb2f1aec7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143519 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-21qa: remove duplicated operatorsXisco Fauli
it's already defined in include/tools/color.hxx Change-Id: I26eaba4a1279fadd8669e9702b695e02871052d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142512 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-18mustTestImportOf is deadNoel Grandin
since commit a5e416712e9477c496ce5fd4d935133083330ddf CppunitTest_sw_ww8export4: remove not needed mustTestImportOf() Change-Id: I00721babc7cd1a66a5220e33567ad46b62acc681 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-11move password handling from SwModelTestBase to UnoApiTestXisco Fauli
so other places inheriting from UnoApiTest can also import/export protected documents Change-Id: I0e2716204dbb171c9e17e3939b266977e1b96dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142592 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11SwModelTestBase: get rid of getSwXTextDocumentXisco Fauli
no much value in having it around Change-Id: I864f039c0129a922c8d86b5db0a18158f2155add Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142588 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11SwModelTestBase: use createSwDoc everywhereXisco Fauli
In order to unify the code Also call getSwDoc only when it's needed so move it outside createSwDoc Change-Id: I082d46108581e8f2e2e430e854980035f471ceac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142586 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11SwModelTestBase: Check supportsServiceXisco Fauli
Also simplify code a bit Change-Id: I93b277116cd21f9e7e058fdf31e0defab8247f13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142581 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11SwModelTestBase: remove duplicated methodXisco Fauli
Change-Id: I343fe2711e232ffbdec13f0072ee31a7549f7da8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142546 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09UnoApiTest: factor out common codeXisco Fauli
Change-Id: I1d84d8c1e371016a4f4f068af1e9c76635f28cf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142490 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09SwModelTestBase: inherit from UnoApiXmlTestXisco Fauli
it seems setUp/tearDown can also go as well. See the discussion in gerrit. Change-Id: I5e81dcdcb2e070eb4beb737f3cb25c86cb9d042b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142465 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09SwModelTestBase: remove more duplicated codeXisco Fauli
Change-Id: Idf29e7202e777c1fe673f6fdc4f70ff1c2b3b469 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142466 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-08swmodeltestbase: Do not use a default parameter in parseExportXisco Fauli
For better readibility and to help to remove duplicated code in following commits Change-Id: I90745c54492544757e2174412bbb2f16d422a89c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142463 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-08swmodeltestbase: remove duplicated codeXisco Fauli
Change-Id: Icc577cc50248cc8310262a09af5769faea1662b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142460 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-08swmodeltestbase: make mbExported privateXisco Fauli
Change-Id: Idff0960c05f2330ce746147f0b3a2e0aa3b7c6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142410 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>