summaryrefslogtreecommitdiff
path: root/sw/inc
AgeCommit message (Collapse)Author
2023-04-11introduce SwFrameFormat::IsVisible()Bjoern Michaelsen
- as a replacement for RES_CONTENT_VISIBLE - broadly: if a FrameFormat has at least one Frame, it is visible - however, sections are special and need to recurse into their childs - SwFlyFrameFormat::GetInfo then does not need to override anymore Change-Id: I01c469e7330a7daaccd2be0541af1d83c7d1a424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150038 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-04-10Resolves: tdf#154217 Edit date+time User Field and Set VariableEike Rathke
... instead of the raw numeric value. Change-Id: I256cb4fde1e4ea6b0580b3208c5d4948e2573448 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150169 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-04-06there is no SwClient::SwClientModifyCaolán McNamara
presumbly we want SwClient::SwClientNotify here Change-Id: I826abcc3612246c65449f41cbd82d5cd330a5430 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150105 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-04RES_REFMARKFLD_UPDATE no more (lots of zombie code)Bjoern Michaelsen
- RES_REFMARKFLD_UPDATE is only instantiated in SwEditShell::UpdateOneField - ... which passes it to DocumentFieldsManager::UpdateField, which * puts it in an SwUndoFieldFromDoc into the undo stack * and passes it to UpdateTextNode - SwUndoFieldFromDoc::UpdateField only uses it to pass it back again to DocumentFieldsManager::UpdateField - in UpdateTextNode RES_REFMARKFLD_UPDATE does not trigger any specific code thus: - replace UpdateTextNode with ForceUpdateTextNode - remove the message item from the SwUndoFieldFromDoc ctor - remove the message item as a parameter to DocumentFieldsManager::UpdateField as it was only ever used for RES_REFMARKFLD_UPDATE - remove the instantiation in SwEditShell::UpdateOneField - and finally: remove RES_REFMARKFLD_UPDATE itself Change-Id: I3f7e27a555a24630d6d5a2c1a40db9096195b826 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150004 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-04RES_TBLHEADINGCHG no more ...Bjoern Michaelsen
- replaced LegacyModifyHint by a proper SfxHint - Refactor SwTabFrame for table heading change: * split out Invalidate(SwTabFrameInvFlags) * split out HandleTableHeadlineChange() Change-Id: I374db7a3b16a3062d6ad54c32527ec1056cbc00b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149929 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-04tdf#41652: Variable width NBSPVojtěch Doležal
Adds a flag that when enabled (opt-in for both old and new documents) changes behaviour of NBSP to not be strictly fixed width. This commit also implements this behaviour such that NBSP has always the width of a standard space (0x20) on the given line. This change is only noticeable when the paragraph is justified. Lastly a tilde or a degree character is now shown in place of NBSP when nonprintable characters are enabled, since the gray field alone is not visible in many circumstances. Change-Id: Iabb30b5930ced62691cc4304f60c5e6dc886ed61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149576 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-02Resolves: tdf#154218 Use the proper document's SwCalc locale for formula fieldEike Rathke
... instead of the format's locale to generate the expanded value string to be reinterpreted again. i.e. inherited by SwSetExpField used with Set variable. Change-Id: I0bb545282a50032f2d8d2965020a36e3c5c8914e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149911 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-04-01RES_UPDATEDDETBL no moreBjoern Michaelsen
- SwDDETable doesnt handle the hint anymore (it used to do a ChangeContent triggered by it) - SwDDEFieldType::UpdateDDE doesnt create the hint anymore -- it used to send it via UpdateTextNode, which would call SwTextNode::TriggerNodeUpdate for some types, but not for SwFieldIds::Dde - ... so the hint sent is never received by anyone who cares - SwDDEFieldType::UpdateDDE calls ChangeContent on all DDETables directly in UpdateDDE anyway, so the dead code is likely just obsolete. Change-Id: I85301ef89998508031833f35c4a2c93e7acb112e Change-Id: Iaef54e27869947fb7f57d1575e9e0f59f903befd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149656 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-03-31tdf#154486: Use known name when inserting the table into the documentMike Kaganski
... instead of assinging a unique name at insertion time, then changing to the final value. As discussed in commit 1dd71d79e15bd8098e7c17c8fcea3748592a902f (tdf#154486: use importer-local map to deduplicate table names, 2023-03-31), the lookup for a unique table name has an O(n^2) complexity, and can make loading of thousands tables impossible. This changes import time from 23 s to ~2.5 s, and the time now depends on the number of tables linearly (e.g., 200 000 tables load in ~45 s). Change-Id: I0f2b5e37db2d370bccbc8c3430f895c864d9a4c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149840 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-30SwTableFormulaUpdate: SwMsgPoolItem no moreBjoern Michaelsen
- get rid of legacy call with unused WhichId (TABLEFML_UPDATE) - simplify and inlune ChangeSate, by now only handling TBL_CALC - simplify params for UpdateTableFields (explictly just one SwTable*) Change-Id: Ie356c2a17eab0b557efb54719d33e278b887eef5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149591 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-03-30sw: fix undo comment of FN_UPDATE_FIELDSMiklos Vajna
It's updates, not insert. One has to dispatch .uno:UpdateFields to see this in action, which does something if the document already has exiting reference marks. Change-Id: If5a06d2a81aa2439977c9fc51c3af1ee241f9eb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149738 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-27refactor table splitBjoern Michaelsen
Change-Id: Ifd7e77b29205fa505ed2fe41d08b4253f50a99a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149185 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-03-27refactor table mergeBjoern Michaelsen
Change-Id: Ia4d5b3fc04cc032a182b4bf7f7570fc250ed8504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148739 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-03-26tdf#133089: Use proper Unicode code points for bullet style namesKhaled Hosny
The names introduced in: commit 43c44f7c82fdcf7e5e6eccb0a80d5bb0e1e3a86c Date: Tue Apr 2 08:30:17 2019 +0100 tdf#124471 Change bullet styles names in Style section of Sidebar Use Private Use Area code points from OpenSymbol font for the bullets, but the code in sw/source/core/doc/DocumentStylePoolManager.cxx uses proper non-PUA code points. PUA is problematic because they are “private” as in Unicode does not define how they are interpret, so they are font-specific and many systems will not do font fallback for them because of this. The names now use the non-PUA code points. Change-Id: I462c054cff1ffbdfe66ad8d8172901b23fb4810c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149588 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-03-23sw: fix undo comment of FN_UPDATE_FIELDMiklos Vajna
It's an update and the name was not set. One has to dispatch .uno:UpdateField to see this in action, which does something if the cursor is inside an exiting reference mark. Change-Id: I1701c7c3ab0a395c2346d41fb517d13c9d9c5a3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149350 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-20tdf#136760 sw a11y: Provide page-relative cursor pos via doc attrMichael Weghorn
This introduce 2 new extended accessible attributes "cursor-position-in-page-horizontal" and "cursor-position-in-page-vertical" to expose the page-relative position of the cursor in Writer to assistive technology. This is similar to how the current page number is already exposed (attribute "page-number"). Together with a corresponding pull request for the NVDA screen reader [1], this allows NVDA to announce the position similar to how it is done for Microsoft Word (where the information is not retrieved via the accessibility APIs but the MS Office COM API, s. discussion in the corresponding NVDA issue [2] for more details). (Side note: Currently there is no a11y object for a Writer page in the a11y tree, but "normal" paragraphs are direct children of the document object.) For performance reasons, introduce a new method `SwCursorShell::GetCursorPagePos` to get the position instead of passing the result from `SwCursorShell::GetCursorDocPos` to `SwFEShell::GetRelativePagePosition` to avoid iterating over the doc pages. [1] https://github.com/nvaccess/nvda/pull/14727 [2] https://github.com/nvaccess/nvda/issues/11696 Change-Id: I6fd56c5c7d051840bab836ce5fe525fdc061b376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149051 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-16Update view options string based on themeParis Oplopoios
Update the view options string based on the theme when tiled rendering, and make sure only the currently active view is updated Change-Id: Ib24111848f2926fe7ae858ca2e18e946d980e83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148943 Tested-by: Paris Oplopoios <parisoplop@gmail.com> Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-03-16sw: fix undo comment of FN_DELETE_BOOKMARKSMiklos Vajna
It's bookmarks, not bookmark. One has to dispatch .uno:DeleteBookmarks to see this in action, which does something if the document already contains at least one bookmark. Change-Id: I7678f6bc6a00a95cfd4ecc87e97e8db6d469216d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148945 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-16De-static-izing colors in SwViewOptionParis Oplopoios
The view colors in SwViewOption were static which means that two separate views couldn't have different colors Change-Id: Id595b00ba56bdb210ad1a784cf76e99ead0d6014 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-15Add SwTable::SwitchFormulasToInternalRepresentationBjoern Michaelsen
- and get rid of most of the TBL_BOXPTR stuff it replaces - instead of using a TBL_BOXPTR on UpdateTableFields SwTable::SwitchFormulasToInternalRepresentation should be used - TBL_BOXPTR is not used via UpdateTableFields anymore and an assert assures it will never be Change-Id: I56eca0e339e0d87a60009ea4dd53f4fe96fe639a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148249 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-13tdf#153935 sw: PDF/UA export: guess table headers based on autoformatMichael Stahl
This is a bit of a disaster area because in contrast to SdrTableObj (see commit 0bc96b8805f2cfa2278729a9f3e56a350ddd69ad) the SwTableAutoFormat application doesn't have flags which "special" formattings like "first-row" etc. should be applied to the table. So add a horrible heuristic to guess depending on the content of its formatting attributes. Change-Id: Ie09538d37de6118409b04a4cec6ab46b74c4194d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148793 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-12Drop some const_castMike Kaganski
Change-Id: I34458e6d16a5fddebf3673cc475204c914217a54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148734 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-12Assert that we only order nodes of the same arrayMike Kaganski
Change-Id: Id04aa8177552624078369d33c9e7bcdc783045bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148722 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-11Simplify SwNodeIndexMike Kaganski
Change-Id: Ic3bb99d30445c2c355ec8634651bb308d198f714 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148683 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-10sw: PDF/UA export: produce Lbl tagged elementMichael Stahl
Commit bd66a0201fb6d1a127139287cc8b5bd27e3a92c3 did this for editengine text in shapes, but it turns out it's a little more complicated in sw. The SwTaggedPDFHelper nicely lived stack allocated, but list labels are SwLinePortions inside a paragraph, and they can't be painted separately, so if there's a list label the creation of LBody has to be delayed until that is processed. The SwNumberPortion can't even generate the Lbl itself, because there can be multiple portions, they are broken across lines and at script boundaries, and checking their follow flags is also tricky (see previous commit). Change-Id: I0dd383089a7ca0edddf6f805e79615c611a446f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148556 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-10sw lok: notify clients about view option changesParis Oplopoios
Send a string of the view options to the kit when the view changes Change-Id: I89f65ff1d22a83a54dde35e39eb487edda0b58e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148078 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-09Silence false -Werror=dangling-pointer=Stephan Bergmann
...that hit at least with GCC 13 trunk and --enable-optimized, > In file included from sw/inc/tox.hxx:35, > from sw/inc/doc.hxx:35, > from sw/source/core/inc/AccessibilityCheck.hxx:14, > from sw/source/core/access/AccessibilityCheck.cxx:11: > In constructor ‘sw::ClientIteratorBase::ClientIteratorBase(const SwModify&)’, > inlined from ‘SwIterator<E, S, <anonymous> >::SwIterator(const TSource&) [with TElementType = SwTextFrame; TSource = SwTextNode; sw::IteratorMode eMode = sw::IteratorMode::UnwrapMulti]’ at sw/inc/calbck.hxx:364:68, > inlined from ‘virtual void sw::{anonymous}::FakeCaptionCheck::check(SwNode*)’ at sw/source/core/access/AccessibilityCheck.cxx:937:99: > sw/inc/calbck.hxx:295:32: error: storing the address of local variable ‘aIter’ in ‘sw::ClientIteratorBase::s_pClientIters’ [-Werror=dangling-pointer=] > 295 | s_pClientIters = this; > | ~~~~~~~~~~~~~~~^~~~~~ > sw/source/core/access/AccessibilityCheck.cxx: In member function ‘virtual void sw::{anonymous}::FakeCaptionCheck::check(SwNode*)’: > sw/source/core/access/AccessibilityCheck.cxx:937:14: note: ‘aIter’ declared here > 937 | auto aIter = SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti>(*pTextNode); > | ^~~~~ > sw/inc/calbck.hxx:289:53: note: ‘sw::ClientIteratorBase::s_pClientIters’ declared here > 289 | static SW_DLLPUBLIC ClientIteratorBase* s_pClientIters; > | ^~~~~~~~~~~~~~ (And -Wdangling-pointer is unknown to older GCC versions, so would cause -Werror=pragmas there.) Change-Id: I64e53b52e04ab34da42c7adc54b8d8cb46123dfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148515 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-09add a missing space in formattingSeth Chaiklin
Change-Id: I17263a1a29ba0bb0821d11234d05b55f0697e34c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148496 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-09sw doc model dump: allow invoking this from outside sw/ in a debuggerMiklos Vajna
There is only a single SwDoc instance in many cases, having an easy to access pointer to that is helpful when the backtrace doesn't include a frame in sw/ code. This allows something like 'print SwDoc::s_pLast->dumpAsXml(0)' in gdb, even if e.g. the current frame is xmloff/, without hunting for a parent that is in sw/. Change-Id: Id70baf7919ef6fde7b834704741dab70531e7e2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148522 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-09sw: fix undo comment of FN_UPDATE_BOOKMARKSMiklos Vajna
It's updates, not insert. One has to dispatch .uno:UpdateBookmarks to see this in action, which does something if the document already contains at least one bookmark. Change-Id: I32d259b0b5c18cbbec2969cd189ca7ba4dd0dde4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148487 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-08tdf#136904 tdf#116084 tdf#121176 sw: fix Undo & anonymized w:del in w:insLászló Németh
Undo/Redo crash resulted by the workaround for anonymized w:del in w:ins. Anonymized (no time stamp) redlines are loaded with Epoch time (1970-01-01) since commit 2c51746997478ad5d0e7cc64aa6489769c473d43 "tdf#146171 DOCX: fix loss of change tracking, if no date", so it's possible to fix the original DOCX import problem using this value: don't combine anonymized deletion inside/over anonymized insertion, and remove all the workaround, keeping only their adjusted unit tests, and add new tests for the export fixed finally, which keeps anonymized w:del in anonymized w:ins. Revert commit 2de1fd7d8b8bd42c66190140cc4506df0c3367f1 "tdf#125187 DOCX track changes: fix w:del within w:ins", commit df4f405a153603551f67e289bbaccf9ac39b923c "tdf#121176 DOCX track changes: same size w:del in w:ins" and commit 7a810d6a9fb79a24d00e5dbd8e1223e6f8b09677 "tdf#116084 DOCX track changes: fix w:del within w:ins". Regression from commit 2de1fd7d8b8bd42c66190140cc4506df0c3367f1 "tdf#125187 DOCX track changes: fix w:del within w:ins". See also commit 64dcedcf7c073d1819794d68a33651b14877e1b5 "tdf#147760 tdf#142902 DOCX export: anonymize date and moveFromRangeStart". Change-Id: Id6e41187e7f94154389f24dd525067ac47ec7e58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148479 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-03-08tdf#153712 revise labels for Chapter Info and its related optionsSeth Chaiklin
"Chapter Info" -> "Heading Info" (in Entries tab) add tooltip; revise extended tip "CI" -> "HI" (on Structure widget) and its tooltip "Chapter entry" -> "Heading info" add accelerator change labels in dropdown box to number and contents (consistent with 'Heading' type field variable) add tooltip; revise extended tip Change-Id: Ic937d0db6af28c9fc416e6a960c0f22a69bfbadb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148406 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2023-03-07Improve flow of logic in SwAnnotationWin::ToggleHdlNoel Grandin
and rename the IsProtected method to more accurately reflect what it returns. Certainly the initial flow of logic in this method was very confusing. Change-Id: I4a01c00160a896961fcce97831605d3a6e15cd1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148383 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-07tdf#153396 - Bibliography marks improvementsVojtěch Doležal
Adds option to separate function of "URL" into (listed) "URL" and "Target URL" to allow for more flexibility (in that case if target URL is empty, bibliography mark hyperlink leads to bibliography table row if possible) When writing tests also found and fixed bug where exporting new file with anchor link bibliography mark crashes LO. Change-Id: Ic1b5c8c9590c0338dcfc4fa3a981142bddae0113 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147868 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-07no need to allocate these separatelyNoel Grandin
they are all one or two words in size Change-Id: I9a0f971d72c998c26e567c6abc2f9fe2a734207e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-06The word “fake” is ambiguousAdolfo Jayme Barrientos
Change-Id: I051c42904ff20d9d12f8821fcb7eedb3642276ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148366 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-03-06tdf#154000 tdf#70423 sw: fix crash/freezing with huge text filesLászló Németh
It was not possible to load or edit text files with very long lines any more, because removed wrapping of the lines resulted freezing and crash. This reverts commit 745898eb2af2686ffbdfdc0e44984db67b172a59 "tdf#70423 Remove txtimport break in 10k chars line", keeping only its unit test. Fix also tdf#70423 by increasing the wrap limit from 10000 to 250000 characters, which still permit to load e.g. 50 MB character or longer text lines, and to edit 5 MB or longer text lines without crash or freezing. Details: trying to load a relatively short 76 MB character length text line shows a non-linear slowing down during the load, resulting program crash after freezing 10 minutes. Now this file is opened within seconds again, allowing to modify, select and copy of the text before the full load of the document (with linear speed). Loading a much shorter 5 MB character length text line resulted an unusably slow editing previously: waiting half minutes for changing, selecting or copying text parts. Manual test Create a text file with a 76 MB character long line, and open it: $ seq 10000000 | tr '\n' ' ' >numbers.txt $ soffice numbers.txt Note: the reverted commit had also a paragraph limit exceeded error using unlimited paragraph length, because that is limited in 4 GiB characters since version 4.3, see tdf#30668 and commit ba27366f3d6bc6b209ecd5c5cb79a9ee5315316a "Resolves: #i17171# Writer paragraph cannot be longer than 65534 characters". Change-Id: If91e340a8aac4d4ebc4097b19cfa854b5659da3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148169 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-03-06tdf#153561 rename Heading No. and widget, update tool/extended tipsSeth Chaiklin
"Chapter No." was changed to "Heading No." in e5a744851cb58da1ceeef623799274d73b60b030 to indicate the broader scope of the option in the entry structure. But the option is even broader, because it can also include list numbers of entry texts. This patch updates the "Heading No." widget to "Numbering" and changes its abbreviation from "E#" to "N#" to reflect this broader function. The associated tooltips and extended tips for these widgets are also updated to indicate this fact. Change-Id: I5505b09998cd3cccf61002213c1938a2afc2c607 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148104 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2023-03-05Resolves tdf#153344 - Resize View Mode icon in statusbar to 16pxHeiko Tietze
Also removed the "_10x22/24" from the icons Space between icons now generated per code Change-Id: I061ccc9d46f3a6c8c6d2cbc6acedfa9fc33e472a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148163 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-03Refactor TBL_{REL,}BOXNAME to SwTableBjoern Michaelsen
- because those only modify the fields of that one table - also add lots of const_cast unfortunately, but not because it makes things worse: * this was modifying the table before (thus non-const) * at least now this is a bit more explicit Change-Id: I0174daecabcc6de9b7c9867b24c94659c0dbcafe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-03-02sw: fix undo comment of FN_UPDATE_BOOKMARKMiklos Vajna
It's an update and the name was not set. One has to dispatch .uno:UpdateBookmark to see this in action, which does something if the cursor is inside an exiting bookmark. Change-Id: Ib9c54a28c5410cc001468952cfd8577a9412d664 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148073 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-28tdf#114773: only add space between entry number and textMike Kaganski
Modify the hack from commit ce95e39f8e952159844e9dc04a1df402bb103634 (tdf#44282 fix missing space for numbered lists in TOC, 2016-08-16), which added the space after entry numbers unconditionally. There are other possibilities, like custom separators between the entry number and text (e.g., [E#][T][E][T][#]); or the entry number (maybe with limited depth) used with page number (like in [E#][E][T][E#]-[#]). Generally, when entry number is not immediately followed by entry text, the space is not needed. Additionally, the space is not needed when the number text already ends with a space character. Change-Id: Ifa6c474574bfb74466ab721eca49f421a3750942 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147997 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-25refactor DocPosUpdate, part 2Bjoern Michaelsen
- separate the message send from the field manager to the fields containing no start index from those send from the field to the frames containing an index - use member functions where possible: SwFieldType, SwFormatField, SwTextNode Change-Id: I488e4003b75bf7b0ae700f39e2364d6e34a8bbfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147490 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-02-24Use just plain straight-forward params for UpdatePageFieldsBjoern Michaelsen
- dont wrap parameters in a useless hint as superfluous indirection - note: SwDocPosUpdate receives a special kind of abuse here: * it is used as pNew with pOld being nullptr when send to the document field manager * it is sneakily modified to be the pOld when it is forwarded by the field to the frame via the node - full path of the message before this change: -> passed to the UpdatePageFields as parameter -> wrapped as the pNew there and send to the field types -> passed by the fieldtypes to the fields -> tweaked to be the pOld with pNew being the field itselfby the fields when passed from the field to the node -> passed from the node to the frames Change-Id: I084c3a1abe6871abdb82655cc413902dd16071cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147302 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-02-24tdf#78510 sw: combine items from SwTextNode and SwNumFormatMichael Stahl
Tweak SwTextFormatColl::AreListLevelIndentsApplicable() and SwTextNode::AreListLevelIndentsApplicable() to return a bitmask so that SvxFirstLineIndentItem and SvxTextLeftMarginItem from paragraph or numbering can be freely combined. Particularly confusing was SwTextNode::GetLeftMarginWithNum() and its baffling usage in SwTextMargin::CtorInitTextMargin(); it appears easiest (if unintuitive) to interpret its return value as a delta to be added to the paragraph's items. This fixes the ODF interop problem. It looks like no compat setting is needed because every OOo/LO generated document should have either both fo:text-indent and fo:margin-left on a paragraph style/list level, or neither. Change-Id: If20b2556bb5ab5d915a2aa6633525bb44a9be33b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147166 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-24tdf#78510 sw,cui: split SvxLRSpaceItem for SwTextNode, SwTextFormatCollMichael Stahl
Leave editengine and non-paragraph usages of SvxLRSpaceItem as-is for now. Add new items RES_MARGIN_LEFT etc., order them so that paragraphs can have 3 consecutive items RES_MARGIN_FIRSTLINE..RES_MARGIN_RIGHT and non-paragraphs also have 2-4 consecutive items RES_MARGIN_RIGHT..RES_MARGIN_LEFT (only the 3 paragraph ones are actually used now). The HTML import filter is particularly annoying because it parses CSS stuff into SfxItemSets without knowing where the items will be applied, so it can't know whether to create SvxLeftMarginItem or SvxTextLeftMarginItem... the split items are created in ParseCSS1_* functions and then converted later if necessary. WW8 import has some weird code as well, SwWW8ImplReader::Read_LR() creates 3 items and then something wants to set every item on its own so SwWW8FltControlStack::SetAttrInDoc() turned out rather weird. Convert the paragraph dialog to handle the split items (by mapping them to SID_ATTR_PARA_FIRSTLINESPACE/SID_ATTR_PARA_LEFTSPACE/ SID_ATTR_PARA_RIGHTSPACE), but the SvxRuler looks a bit more confusing so convert in sw shells for now and leave that for later (also unclear if changing these slot items like SID_ATTR_PARA_LRSPACE breaks any ABIs?). Change-Id: I40431821868fd3e1cceba121b5539ff9ae6befbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147024 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-23refactor SwFormatField againBjoern Michaelsen
- strip out some helper functions - split of the "forced update" special case - extract ensuring user fields to be valid Change-Id: Iee9aa5b25ab7d8e7c102f0c0950c47a46966bb19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147269 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-02-23sw: fix undo comment of FN_DELETE_TEXT_FORMFIELDSMiklos Vajna
It's deletes, not an insert. One has to dispatch .uno:DeleteTextFormFields to see this in action. Change-Id: I7c5afa6acc633e0d0a750d97ff6477b9511e816c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147489 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-23tdf#153561 rename "chapter" to "heading"; update/add tool/extended tipSeth Chaiklin
Change-Id: I84cde8117d7eafa4b8656b5b17347a4bd255409e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147369 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>