summaryrefslogtreecommitdiff
path: root/sw/inc
AgeCommit message (Collapse)Author
2023-10-27Add flags to STYLEREFSkyler Grey
This commit is part of an implementation for the following STYLEREF flags - Search from bottom to top, which sets the STYLEREF field to search downwards first, or from the bottom of the page in marginals - Hide non numerical, which hides all characters that are not either numbers or punctuation commonly used as delimiters. For example, if your STYLEREF said "Chapter 2.1", this setting would make it say "2.1" This commit implements: - The document model - The layout - The UI Change-Id: I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158349 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-25tdf#139141: Add UNO commands for variable date/time fieldsXisco Fauli
Impress already has both options in the menu Also re-enable test disable with fa569930a0968cdeba4441e19a68e7d78aa25cb4 "Revert "Resolves tdf#139141 - Make variable date/time field the default"" Change-Id: I1cec89b5901073555ffa31d2be24e1e62fbbdcb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158391 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2023-10-25DBG_UTIL implementation differs only by never-wrong assertMike Kaganski
Change-Id: Ifb879d6536c80f00da61707fb0aa0700dcd19bcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158288 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-25vcl,sw: PDF/UA export: produce Ruby and Warichu SEsMichael Stahl
These need to generate multiple elements in SwTextPainter::PaintMultiPortion() and it's not altogether obvious. Change-Id: Ib5fd36c3ea8e15dff93a87bb231c3cc4f78b0089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158398 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-10-25Use std::signed_integral conceptStephan Bergmann
...which, unlike std::is_signed, also requires that T is an integer type, not just any arithmetic type, but which appears to fit well here anyway. But LLVM 12 libc++, which is apparently used by Android builds, only provides a bare-bones <concepts> that lacks std::signed_integral (among others), so for now introduce o3tl/concepts.hxx providing what's missing (incl. std::integral and std::unsigned_integral, for some kind of consistency). Change-Id: I1c37d37fa1b57b5e3bf24c9e44f3973003905cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158406 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-24tdf#156565 sw: PDF/UA export: only one Link ILSE per linkMichael Stahl
The problem is that for a hyperlink, multiple Link SEs are created, but only one Link annotation; the Link SEs all point to the annotation but the annotation can only point to one Link SE. So try to create only one Link SE for a hyperlink, similar to commit ee3c3fcf5c48964f7bc1d64484409f072c614866. This could be further subdivided by Spans when formatting properties change but it looks complicated and rarely needed. Change-Id: I7d158b599ec744b03e78eeca88d717183f2ba1dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158387 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-10-23Revert "Resolves tdf#139141 - Make variable date/time field the default"Heiko Tietze
This reverts commit e37f06f534ac864f9fe8cd20b07a85c36e697d41. and ui test from Ia1a2387e137f8a672a24056b13234d4275a77ca4 Reason for revert: tdf#157337; macros rely on fix field values Change-Id: I7a638330aac9b71432556454c0104479fcd05b4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158041 Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-21Related: tdf#89178 Add an option to avoid converting some fields into textMike Kaganski
... during mail merge. In some modes (generating individual documents; creating PDF) the mail merge process converts all fields into text. But sometimes it is undesirable for fields not involved into mail merge itself: * It is inconsistent with how MS Word behaves; * The generated editable documents could benefit from having other fields kept as fields; * Some fields, when exported to PDF, produce different results: e.g., placeholder fields are output as empty spaces, not as placeholder text. An expert boolean configuration option is added: Office/Writer/FormLetter/ConvertToTextOnlyMMFields; it is false by default, in which case, the behavior is unchanged. When true, all fields in the mail merge document, except for database fields and hidden text fields, are not converted to text during mail merge process. Change-Id: Ibdb505ed3f2762db063bb0a91b674d27ecbc2e7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158306 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-21Make ConvertFieldsToText privateMike Kaganski
Change-Id: Ie3d22b63260d2b2b05a46c5b2a6ca915cf9d4bcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158304 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-20sw floattable: remove now unused FloattableNomargins compat flagMiklos Vajna
This was noop since commit 626fe9ab5ebebc4ef36e35f4aa597c03a3564d22 (tdf#157573 sw floattable: fix incorrect lack of left margin after table, 2023-10-18). Change-Id: I89a197313ac4ffbcff9bbff534e5411085282ac8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158237 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 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-10-18tdf#156114 UNO commands / menu entries to enable PS/CS spotlightJim Raykowski
Change-Id: I2796b595ef961c477dea85c337ad343599aea7cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158055 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-10-17tdf#130088 tdf#119908 smart justify: fix DOCX line count + compat opt.László Németh
Writer typeset DOCX files with more lines/pages, because of new default paragraph justification algorithm of MSO 2013 and newer, which resulted in losing text layout interoperability for new DOCX documents. Add new compatibility option "JustifyLinesWithShrinking" to store also the new type of justification in OpenDocument files. First analysis of the unknown justification algorithm shows up to 2% shrinking of plain justified line. Apply this value to break the lines in the same (or very similar) positions during importing a DOCX file with compatibilityMode >= 15 (created in MSO 2013 or newer), to avoid typesetting more lines and pages. Note: shrinking will be added by the next commits, fixing the temporary exceeding lines. Change-Id: I9a00db888e9af3f6723e4c502158e8e56a00ef02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158063 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-10-16LOK: Navigator: fix expand problemsAttila Szűcs
Save/load content types' expanded status to view, and make sure it is synchronized with client. Treeviews now receive/send collapse event/status from/to client. I've rewritten the way how headings are opened by default (because synch of collapsed status broke that, as sub-headings were not expanded at core side). Change-Id: I80f5b4d99fe5224391a92c4609f94ddbcf37b8ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153771 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit b95750af717e0693a13c3ef35277779e1394e0ae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158016 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-16Revert "Make sure views get new themes on .uno:ChangeTheme"Paris Oplopoios
Seems to cause more issues than it solves, reverting for now This reverts commit 884fd220d0025a92510d3ff4710c8c517c8f271e. Change-Id: If32a9d3bd922afe5611e5258987eec9ec685bc8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157951 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-10-15tdf#143148 use pragma once and removed include guardskhushishikhu
Change-Id: I02ebab47905eaaab0d7f34fa0416b5bbbe8e1b09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157973 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-10-15tdf#156250: sw: Keep comments when spell correction replaces a wordEMartinGube
New method SwEditShell:ReplaceKeepComments for comment preserving spell correction. Change-Id: Ifdb9d5664ab8d457a16ad8f7ec62dd968c89d580 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154761 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-14tdf#157662 SW: redline: accept/reject done for all partsAttila Szűcs
Tracked changes divided into smaller parts when they are overlapping. But if the Author, and Change time, and some more is equal, then they can be combined into 1 change later.. Modified AcceptRedline / RejectRedline, to seek for all these parts that are neightbour to each other, and can be combined, and reject/accept them all at once. Even those that are deepen in the tree. i.e.: insert that have a delete redline too. when rejecting an insert redline, that have a delete redline too, the delete redline is accepted instead. (have the same result.) when accepting an insert redline, that have a delete redline too, The delete redline remains, while the insert is deleted. (=accepted) made some limitations to lessen the probability of regression: No anonym, No table, No seqNo, and dont use it in RejectAll/AcceptAll Added unittest to check that accept/reject handle more redlines at once, but not too many.. Change-Id: Ibd0a39f7847b22b279a797babb30ba162e70a513 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157950 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-13tdf#143148: Use pragma once instead of include guardsFederico Gallo Herosa
Replace include guards in favor of #pragma once. First task for beginners Change-Id: I0ead6e955c953ec0e9113174797ffb8b9938999f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157901 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-10-12sw floattable: add an AllowTextAfterFloatingTableBreak compat flagMiklos Vajna
Word and Writer normally only wrap the anchor text around the split fly frame on the last page, but as <https://bugs.documentfoundation.org/show_bug.cgi?id=61594#c33> points out, Word has an allowTextAfterFloatingTableBreak compat flag that allows wrapping on all pages. Map this to a Writer compat flag for now, which affects all floating tables in the document. The mailing list thread at <https://lists.freedesktop.org/archives/libreoffice/2023-July/thread.html#90670> suggests that possibly there will be demand to control this on a per-frame level: that's not something Word supports, but we could do an OR of the two settings in the future if wanted. This is just the compat flag itself, layout still has to actually handle it. This compat flag is probably quite rare, so only write it to documents if it's true (the default is false). Change-Id: Ibc431f7dc11710926c115d8e03f760b7f0784304 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157855 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11writerfilter: use content controls for text in block SDTsJaume Pujantell
Text inside block SDTs was shown as Text Fields wich ignored properties such as alias and formatting. Now those texts are imported as content controls like in the case of run SDTs. Added the ability for content controls to remember and export the "multiline" property of block SDT text. Some existing tests have been changed due to some different export results. Change-Id: Ice1eb4ca6dd53c99d5abb239371f8ac896c3b6e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156867 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-10-06SdrModel::getUnoModel can use XModel instead of XInterfaceNoel Grandin
Change-Id: Ica10c62066881ba86099d2057ff6fe20e0084a85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-05LOKit: always display hidden chars when showing formatting marksJustin Luth
This is related to the request in tdf#107658 to do the same for core. However, this is something fairly easily doable with an extension in core, so I'm not in favour of forcing one user's opinion over top of status quo. Doing this only for Online. make CppunitTest_sw_tiledrendering \ CPPUNIT_TEST_NAME=testShowHiddenCharsWhenShowFormatting Change-Id: I34bbe50dd4bbff92577b18f8a05d2f8dd67ea771 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157562 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-05SW comments: Provide parent / child relations without position.Gökay Şatır
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com> Change-Id: I7acba74ef0717bc07a675be17fc1909680138f00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157019 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-03replace ErrorInfo with simpler mechanismNoel Grandin
Instead of returning ErrCode class everywhere, return a new class ErrrCodeMsg, which combines an ErrCode with the other parameters that are used to control the error reporting. I do not change everything that uses ErrCode here, I started from SfxBaseController/SfxMedium and worked outwards. This change serves two purposes (1) Replace the extremely whacky ErrorInfo mechanism we were using to smuggle information into the error handler reporting mechanism with a very straightforward approach of just combining it into the error class. (2) Allow us to capture the source location that produced the error, which makes debugging the source of a problem soooo much easier. Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-03sw: improve documentation for SwFormatSurroundMiklos Vajna
Mention which item set is expected to contain this and where is the UI. Change-Id: I63ee57218eb7c4bc9be4430eb90d98bd43739b83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157502 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-03tdf#157370 Bring A11y issue to attention in the document viewJim Raykowski
when issue is clicked on in the A11y sidebar Change-Id: I9122e608e88568fa2deeee91b6cf4616b0f61db8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157200 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-09-28tdf#157492 sw: fix tracked drag & drop of table rowLászló Németh
Selecting table rows by the left row border, and moving them via drag & drop resulted only tracked deletion, but not tracked insertion. See also commit 3e6125c72f8c07c14df42d45571cab44f24e9f70 "tdf#155846 sw tracked table column: fix drag & drop". This reverts also commit 5a1c19624eda0c8b847af0dcee70b82502578ceb "tdf#146965 sw track changes: fix tracked table row moving". Change-Id: I7287e46188eee123b5fd36a5ec7ac5311699840b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157382 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-09-28tdf#155846 sw tracked table column: fix drag & dropLászló Németh
Selecting table columns by the top border, and moving them via drag & drop resulted only tracked deletion, but not tracked insertion. See also commit 912336f3c85d9a631fa0ac0f270bab04b204f619 "tdf#154599 sw: fix crash at drag & drop table columns". Change-Id: Ib392f0700ec8c17a342df435c8bb1883967b0711 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157370 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-09-27reduce allocation when cloning SwAttrSetNoel Grandin
Change-Id: Ic37355cd2a6091576426c48ff694023e24ae6342 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157334 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-27Resolves tdf#155561 - Notification for the overwrite modeHeiko Tietze
Dialog shown when it's enabled for the first time Introduces the registry variable QuerySetInsMode Adds an eye-catching image under res/queryinsmode.png Change-Id: I0131177fb54238d48a671bc9ceb88283f796a526 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153505 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-09-27pass SwAttrSet around explicitlyNoel Grandin
instead of using SfxItemSet and static_cast'ing it everywhere Change-Id: I12d1a6bd2dec7035fa16206ea01346a3a73c1457 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157309 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-24Drop some newly obsolete __GNUC__ version checksStephan Bergmann
...after 6ef2d358ac053ce0f6de9cf0f8f25e8bae66d441 "Adapt Clang and GCC minimum version checks" Change-Id: I5f3bcda2ce8e0e093af3bdd9d2cca741a5b95306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157202 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-19sw: document SwFormatColMiklos Vajna
It's not too obvious that you can have columns directly inside the body text as well, not only inside a UI-level section. Change-Id: I8194aa472fd1d515552dddbe6d14a3d38fa5c1ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157030 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-09-18use more concrete UNO types in swNoel Grandin
Change-Id: I446cf00ac7e320586da2dd0837cf873ca9ab0ca6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157013 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-17remove unnecessary dynamic_cast around SwXTextNoel Grandin
Unusually, we cannot use rtl::Reference to hold SwXText, because rtl::Reference assumes that its pointee is a subclass of OWeakObject, which SwXText is not (and we cannot make it so because the UNO bridge does not support virtual base classes). So we have to use css::uno::Reference<SwXText> and carve out an exception in loplugin:refcounting. Change-Id: If3a1307e30fdcd3b47aa665252be081fb5063400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-13loplugin:unusedmethodsNoel Grandin
Change-Id: I00f228451574ca9f9e352d233c7f326c88e90a95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-12Added parent / child relationship to comments.Gökay Şatır
Adding parent name of a comment into odf file when there is a parent. Also includes: Added test case to comment property test. Change-Id: I033f6574b4875fcb76b16c8b5b9d9f7d55b52cbe Also includes: Add parent / child relations to replied comments. Change-Id: Ia7d95c4e6020b501798a89cbdcae64dc5691437c Change-Id: I08b5ab6eb11adcafcbf3559896d79d41b449b26a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156824 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-09-12sw: document SwFormatFieldMiklos Vajna
Note that SwField is abstract, so in practice this always wraps a subclass, e.g. SwPageNumberField has an actual ExpandImpl() definition. Change-Id: I579cc9f2f9d1f64885512bceabc2fc684b8c3701 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156828 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-09-09SwXFootnoteProperties does not need to implement XAggreggationNoel Grandin
Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } WIP SwXFootnoteProperties Change-Id: Id1e1a0195e770bcbcebd9b55355de230c8641547 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156725 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-08ITEM: preparations for more/easier changes IIArmin Le Grand (allotropia)
Again this is a change to improve understandabilty/changeability of SfxItemSet code plus some cleanups. Still did a callgrind round to check - it slightly got faster. In a start/load(complex SW doc)/ show/shutdown cycle compared with master I get 96.722 mio cycles compared with 99.851 mio in master. Main focus was to isolate two aspects: preparation and cleanup of an Item for usage in an SfxItemSet. For that we now have implCreateItemEntry: to do all needed actions to create/prepare an Item for membership, including evtl. AddRef/Cloning/using ItemPool stuff. implCleanupItemEntry: to do all needed actios to correctly clean that Item up again. All formally accesses distributed over SfxItemSet (and other places) are cleaned-up to use these. The Item-counter in DBG code that I already added helped a lot to do this. Also cleaned up PutImpl to 1st check if action is necessary (Item is already in place) or not, reducing spot to cleanup an Item that was handed over as bPassingOwnership to one place. I also added a 2nd flag, bItemIsSetMember, that tells if the Item given as input is already member of an SfxItemSet, in that case a shortcut can be used (increase AddRef, use). Adapted all places AFAP to use the new container interface (begin(), end(), ...) where useful. Made GetItemState inline and directly use the tooling method. Same for InvalidateItem. Added much more comments to describe what's going on or to hint at problems (check for CAUTION). Removed PutDirect - not needed anymore, probably was there to not get recursive death loop with callbacks in SW. More smaller changes. Checked with all apps, played around. Still, stuff may come up, so I put on gerrit the tests will show and give further hints. At last SfxItemSet is a minefield :-) Had to adapt SfxItemSet::implCreateItemEntry when input Item is a StaticDefaultItem. SfxItemPool::PutImpl needs to be called in that case. Had to correct bItemIsSetMember in all cases if the transfer of SfxPoolItems is between SfxItemSets with different SfxItemPools. This is and will be necessary as long as the Items are stored at the pool. After a hard deep-dive I found the error: m_nCount was not in all cases correct, invalid items get counted. Win build *insists* for initialzation of local var aEntry in SfxItemSet::PutImpl, triggers warning C4701: "potentially uninitialized local variable 'aEntry' used". This is not the case here, but I know of no way to silence the warning in another way, so added an extra-call to begin(). Re-added to use static pool defaults directly, possible After the fix 6d8c6e8d60956fd36094035a526c1a29a902204b, thanks for that. This avoids some cloning of Items. CAUTION: static default items are not *that* static as it seems (or: should be). If they are freed with the Pool (see ::ReleaseDefaults) they will be deleted. If the target pool is different from the source pool static default items from the source pool can be used that then might be deleted (sigh). A solution would be to change all pools to really work on static instances of default items. Another one would be to know here that the targetPool != sourcePool, so maybe extend bItemIsSetMember -> bSamePool. A good test for this is CppunitTest_chart2_uichart/testTdf98690. Until solving/cleaning up we unfortunately *have* to continue to clone static default items... Change-Id: Ibd8dc6d612f594a5ad88c75fcee8726d89a6090c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156306 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-09-08tdf#155503 Add title to document title dialogSamuel Mehrbrodt
Otherwise the title was just "Name" Change-Id: I883d2468c7bd97782b0aef4165a6afe4ff39ce31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156659 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-09-08sw doc model xml dump: show all redline data of a range redlineMiklos Vajna
E.g. Alice does an insert, then Bob does a delete in the middle, then the deletion redline will have 2 redline data, the first will be the delete, the second will be the original insert, show this in the xml dump. Change-Id: Ide9777cdbc8a5460fe28c646104901c968a33382 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156680 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-09-07merge SvxFmDrawPage into SvxDrawPageNoel Grandin
it adds hardly any functionality. Change-Id: I82f5c52148222596d52f1fb41d726733ca1cf40d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156654 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-07Autocorrect: Add option for autoformat bulleted lists after spaceDarshan-upadhyay1110
Enable option in Autocoorect => bulleted lists after pressing space Example: press * or - and space will change into bullets Change-Id: I9741ad4c3eb4123074f06b762b58fe7ffdb44613 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156616 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-09-05DRY use existing method in SwXShape rather than open-codingNoel Grandin
Change-Id: I1dc66d4161411998ab36e454ad168cada2dc7a23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-05SvxDrawPage does not need to use aggregationNoel Grandin
we use custom subclasses when we want to modify behaviour Change-Id: I1aef9e87c76ea97f1868134f5e1ac0e317b5c698 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>