/source/nl/librelogo/

/core' title='lo/core Git repository'/>
summaryrefslogtreecommitdiff
path: root/sw/qa/core/fields
AgeCommit message (Collapse)Author
2024-06-06loplugin:ostr in sw/qa/coreNoel Grandin
Change-Id: Iaafc85d9b9042769f30c5662dbc9bf8c0e415312 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168487 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-09document why GatherFields messes up sorted orderJustin Luth
Of course, UNO gets a list of fields through some esoteric broadcast system. This answers the big question in qa swfields about why the sorting order is stable, but wrong. An earlier version of the patchset has the code that would keep the sorted order for at least comments. But it isn't as efficient, and who knows what the implications would be, so I have no intention of making such a generic change. Change-Id: I178fdba7def8522ab5d94bdd61526af77f42c903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166767 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
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-11-02Improve and extend STYLEREF testsSkyler Grey
- I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19, Ib664fec059aa1f7f130acc76c253d5d298fa59f7 and Iad8e8001807f5ceeaedc9665838672695174a936 added STYLEREF flags. This commit adds tests for them - The tests in I35dc36197b62fa53def4745da1d4755ece79ed22 were partly broken due to the fields occasionally being inserted in the wrong place (i.e. at the end of the document), this commit makes sure to move the cursor before inserting a field - The tests in I35dc36197b62fa53def4745da1d4755ece79ed22 were not separated into sections which made it difficult to tell what was being tested. All STYLEREF tests that create documents are now clearly split into arrange/act/assert steps with comments denoting the sections - The tests in I35dc36197b62fa53def4745da1d4755ece79ed22 had a lot of repetition, particularly in creating the document, adding headings, etc. This has been refactored into some helper functions - I35dc36197b62fa53def4745da1d4755ece79ed22 was missing an ODF import test. This commit adds one Follow-Up-To: I25dd7a6940abee5651a784b9059fe23b32547d6c Follow-Up-To: I35dc36197b62fa53def4745da1d4755ece79ed22 Follow-Up-To: I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19 Follow-Up-To: Ib664fec059aa1f7f130acc76c253d5d298fa59f7 Follow-Up-To: Iad8e8001807f5ceeaedc9665838672695174a936 Follow-Up-To: Iecd3e83a6bd3f8c2c6adba5c7eba9ee55b773510 Follow-Up-To: Ifaa67fbc2d53b0d4fb85e7305b2dbdf78cf0a1ad Follow-Up-To: Id991c92b9aeaa054b136f7a3d9c7c8ea0026e514 Change-Id: I941b477c8e860270a400869cb9ea15e5561e402a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158352 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-22Remove duplicated includesAndrea Gelmini
Change-Id: Ifdf7776c7c1abab5dadee8a9bb3301d9d7f4e596 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158320 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-10-20tdf#86790: Add support for a word-style stylerefSkyler Grey
STYLEREF is a field type in Word which changes its content based on nearby paragraphs. For example, upon creating a styleref referencing "Heading 1" you will see the text of the nearest "Heading 1"-styled paragraph that is above the field. This patch implements STYLEREF in Writer as a cross-reference. By using "insert>cross-reference>styles" you'll be presented with a list of styles. Selecting one and clicking "insert" will create a field which has text from the "most relevant" instance of the style. To find the most relevant instance we first search up for paragraphs with the style, and if there are any we take the closest. If there weren't any, we search down for paragraphs with the style. This patch also updates our use of STYLEREF for chapters exported to docx by using it for all chapters not only those in headers and footers. This allows us to approximate more chapter field functionality even when moving between Writer and Word. Finally, this patch adds some tests for STYLEREF: - testTdf86790 tests that the "sample file with STYLEREF" document from tdf#86790 has the correct fields - testStyleRefSearchUp tests that the STYLEREF searches up when there are bits of text both above and below it - testStyleRefSearchDown tests that the STYLEREF searches down when there are bits of text below it only - testMarginalStyleRef tests that the STYLEREF searches from the page top when it is placed in a footer - testFootnotetyleRef tests that the STYLEREF searches from the reference mark when it is placed in a footnote Still TODO: - [ ] Update documentation - [ ] Implement reverse-searching (\l) and nondelimiter suppression (\t) - Probably these 2 will be in a followup patch Change-Id: I25dd7a6940abee5651a784b9059fe23b32547d6c Signed-off-by: Skyler Grey <skyler.grey@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157456 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-17Remove some unused includesMiklos Vajna
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from UnoApiTest. Change-Id: I71b75fa5c880337ff294583b96af09c90b5059c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150514 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-15Refactored SwAuthorityField::GetAuthorityVojtěch Doležal
The current version takes pointer to too complex of a structure, does some insane (and completely pointless) const_casting with it, and isn't very practically usable due to only supporting calculation for format of a default TOX. This refactor solves all these issues. Change-Id: I582be2ecdbd83650c0c30ee9df786feffdc6cb99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147000 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-04SwModelTestBase: make mpTestDocumentPath privateXisco Fauli
in preparation for future inheritance from UnoApiTest Change-Id: Ie5dee5af3609d8490d7d7bad0d6dbc4c8fc17bb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142280 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-08-14rename SwPaM::GetNode to GetPointNode/GetContentNodeNoel Grandin
Using a parameter to select point/mark makes the code much harder to read Change-Id: I4ac8b904ac423e2b99253b7e4b6adc72c8afe1a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-26convert CRSR_SKIP_* to typed enumNoel Grandin
Change-Id: Ia5cb9915fc7ad3238f4386f5ed3e43efc4b74a32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137478 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03Just use Any ctor instead of makeAny in swStephan Bergmann
Change-Id: I2c9023ba8d07314d23ae7a65e670e8748c5e9322 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133766 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-07-26sw: use followby parameter of outline in Chapter fieldVasily Melenchuk
When Chapter field with format "Chapter number and name" is used it does not insert any delimiter between number and name. Best is to use outline/list property LabelFollowBy. But since it is done inside field we are limited with supported characters, so practically only space and nothing are correctly supported. Tab and newline are replaced by space. Change-Id: I4583b7051ae5ad963132980443fa70b5a19354e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119428 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-07-26tdf#143424: support for "Chapter number without separator"Vasily Melenchuk
If LO is using list format strings (this is default behavior since aa5c6d12) it was not able to show just numbering without all formatting, as it used in some fields. Change-Id: Ib4695b8e1c2d7a451522c7e04af2216d16aceefe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119309 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Tested-by: Jenkins
2021-04-16Remove some unused includesMiklos Vajna
See tdf#42949 for motivation. Change-Id: Idf7aa9c902b656c05dc7871675c90dae63289815 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114192 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-11sw tooltip on bibliography fields: add the actual tooltip functionalityMiklos Vajna
- Similar to e.g. SwMacroField::GetMacro(), add a new SwAuthorityField::GetAuthority() that returns a string which is similar to the one-liner text node in the bibliography table for a given bibliography reference. - Base this on the recently added SwAuthorityFieldType::CreateTOXInternational() and SwTOXAuthority::GetText() to share code with sw::ToxTextGenerator::GenerateText() and SwTOXBaseSection::Update(). - Finally extend SwEditWin::RequestHelp() to actually provide the tooltip on mouse hover. Change-Id: I33a58076c6d141566298259e7e4681541fac1055 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110765 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins