summaryrefslogtreecommitdiff
path: root/sw/source/uibase
AgeCommit message (Collapse)Author
2022-05-26tdf#149248 sw offapi xmloff: add option to not hyphenate last wordLászló Németh
Add option to disable automatic hyphenation of the last word of paragraphs for better typography. Note: the same option used e.g. in Adobe InDesign, and a similar one in CSS Text Module Level 4 (hyphenate-limit-last). * Add checkbox to Text Flow in paragraph dialog * Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationNoLastWord) * Add ODF import/export * Add ODF unit test * Add layout test Follow-up to commit 72bd0df107ee47c4d54fa88b4960d32ea03e9f69 "tdf#121658 Add option to not hyphenate words in CAPS". Change-Id: Ida29c65b5a7cbfd7c399c342781531a6fb86f639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134985 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-2591 null derefs seen in crashreporting reportCaolán McNamara
Change-Id: I8114f57cf5a5f74b2debac963813dcf6aac1bd0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134930 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-25sw content controls, date: show a date picker on clickMiklos Vajna
- add a new SwContentControl::GetDateString() that knows how to produce a formatted date, taking the language and the date format into account - add a new SwDateContentControlButton that knows how to open popup a calendar on click and that puts the selected date into SwContentControl::m_oSelectedDate - extend SwWrtShell::GotoContentControl() to consume that selected date & update the document text accordingly - in case SwSelPaintRects::HighlightContentControl() notices a date content control, create an instance of this newly introduced SwDateContentControlButton Change-Id: Ia2cb0fa3aefbf543b8dc2e96bcebb41408eb12c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134926 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-25Advanced Diagram support: Isolated IDiagramHelper, selection visualizationArmin Le Grand (Allotropia)
Moved and isolated IDiagramHelper to own file to get SdrObjGroup smaller and less dependent again, all places adapted. isDiagram() now available at SdrObject directly, adapted and have less places which need to cast for SdrObjGroup for check. Started to add SdrHdl/selection visualization to seleced Diagram. Only as a start, will need to be extended to look good/better, plus evtl. functionality in handles/UI. Corrected error(s) found by failing UnitTests More clang-notes (static, namespace) I nneeded to follow Change-Id: If4675b3270d3ee30259fce49deb017dbbaf5c0c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134825 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-05-25Resolves tdf#146762 - Consistency for list indent and level shortcutsHeiko Tietze
Previously: * Shift + Tab on the first item decreases the indention * Tab on first item increases the indention * Shift + Tab on any item but the first does nothing * Tab on any item but the first demotes the list level * Ctrl + Tab on any item including the first inserts a literal tab New: * Tab on any item demotes the list item (move right) * Shift + Tab on any item demotes the list item (move left) * Ctrl + Tab on any item indents the whole list * Ctrl + Shift + Tab on any item outdents the whole list Change-Id: If64a5103a271d30c10fc903a306c9271e61cae49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134856 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-24Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24sw content controls, date: add doc model & UNO APIMiklos Vajna
This is meant to be a content control (providing rich text), which also has a dropdown-like date picker button. Add a new Date property to track this type, together with date format and date language. This should be enough for the UI to generate a correct date string when the file picker is used. Change-Id: If5d46a804d771e903a688fd73cfaf2d2809b7ab9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134847 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-24tdf#149186: Table of contents editor not showing buttons in Dutch UICaolán McNamara
an alternative approach that doesn't leave things too wide for the English UI Change-Id: I17d87702fcf49e593e87710bde44c1a2cba14a86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134861 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-24tdf#149231 Fix crash on print preview of masterJim Raykowski
caused by commit 1f9a792a391f0811bbb5f570ad5c84d13312c539. Change-Id: Iecfa019b04b84bb70b5e04af51f9f786d7cd9fdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134846 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-05-23Fix typosAndrea Gelmini
Change-Id: I53f00e1914283480600dbe84ee96fb38e3cc8e03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134808 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-05-23sw content controls, picture: add LOK APIMiklos Vajna
- send a LOK_CALLBACK_CONTENT_CONTROL callback with action=change-picture when a file picker should be shown - extend lok::Document::sendContentControlEvent() to be able to replace the placeholder with the selected URL - update gtktiledviewer to work with these Change-Id: Ifb3750803885fc09fc82905b0cf85b2b8ca06e77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134750 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-23tdf#149141 - Writer - Added default object creation when drag size too lowAshSinc
Patch in case consistency is required for suggested Draw/Impress change here : https://gerrit.libreoffice.org/c/core/+/134499 Change-Id: If4f51109633338620cfe836695214df20c3ec577 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134682 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-05-23tdf#144788 follow up fix: Fix null pointer useJim Raykowski
Change-Id: I62c3e337a8ec5391c3f18bb42ce8778acd36451b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134747 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-05-22tdf#144788 follow up: fix SwNavigator footnote trackingJim Raykowski
Changes incorrect handling for both footnote and endnote tracking when either a footnote or an endnote attribute is at the current cursor position to handling for only footnote or endnote. Change-Id: Ib65704ae48298c02cfe557d62d1c002a1859321f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134717 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-05-20sw content controls, picture: add insert UIMiklos Vajna
- handle the picture case in SwWrtShell::InsertContentControl(): insert a placeholder bitmap & create content control around the as-char image - expose this as a new .uno:InsertPictureContentControl command - add the new uno command to the default & MS-compatible menus - rename the SwWrtShell::Insert() overload taking a Graphic to make this a bit more readable Change-Id: I289d6b6a9cd622c585b6cf0ec0c91d6b51ad81ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134681 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-20sw: fix crash in SwHeaderFooterWin::IsEmptyHeaderFooter()Miklos Vajna
Crashreport signature: Fatal signal received: SIGSEGV code: 1 for address: 0x0 program/../program/libswlo.so SwPageFrame::GetPageDesc() const sw/source/core/inc/pagefrm.hxx:144 program/../program/libswlo.so SwHeaderFooterWin::IsEmptyHeaderFooter() const sw/source/uibase/docvw/HeaderFooterWin.cxx:403 program/../program/libswlo.so SwHeaderFooterWin::ShowAll(bool) sw/source/uibase/docvw/HeaderFooterWin.cxx:273 program/../program/libswlo.so SwFrameControl::ShowAll(bool) sw/source/uibase/inc/FrameControl.hxx:49 Change-Id: I3c1a6f46c7a15c2ca1a3db69a14d49abbea8c879 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134656 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-20new loplugin:unnecessary lockingNoel Grandin
off by default, since each warning needs careful inspection Change-Id: I805c1d1cdde531a1afdc76e87b22f879fc3c9753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-19sw: fix assert in SwModule::Notify()Michael Stahl
Apparently it happens when loading a 0-byte file that the SfxObjectShell is still in IsLoading() stage when close() is called. This then causes the SfxEventHintId::LoadFinished event to be emitted during close(), which is not a situation the assert was intended for. Change-Id: I60a260ca1c1e6cbf9502832ba6622de2628763e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134610 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-19sw content controls, dropdown: disable NOP buttons in the property dialogMiklos Vajna
Rename, delete, move up & move down does nothing initially, disable the buttons when their event handler would just do an early return to make this less confusing. Change-Id: I4cfb9750d07b4686440c05901ef72e8ce4de961e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134538 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-19sw content controls, picture: replace placeholder image on clickMiklos Vajna
Previous content control types (rich text, checkbox, dropdown) had the cursor somewhere in the content control and click selected the content control in the placeholder case. The picture case is somewhat different: the content control has a single as-char image, and by the time SwWrtShell::GotoContentControl() is invoked, the picture frame is already selected. All we have to do here is to trigger the file picker to select a replacement and then insert that image to replace the already selected frame's bitmap. Change-Id: Id3ad94ed8f7e13b0ebc2f57327bb8c0b1e374a86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134511 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-18no need to take a lock when returning static dataNoel Grandin
Change-Id: I8d836c4a919056e8b600549f82b0d5dee9ab1a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134536 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-17tdf#148869 sw_redlinehide: fix SwView::ExecSpellPopup()Michael Stahl
How could i forget that MovePara(GoCurrPara, fnParaStart) will move to a previous paragraph when it's already at the start of the current one, it's so intuitive. (regression from commit d814941b31b4f9cc8b6e9bd4ddc5188015529707) Change-Id: Ief9bcd42b7ea78feef50ac42bc93580c29c080b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134468 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-17sw content controls, picture: add doc model & UNO APIMiklos Vajna
This is meant to be a content control (providing rich text), which is also a picture placeholder field. Add a new Picture property to track this type, this way the click handler will be able to present a file picker when showing the placeholder. Change-Id: Ibbd3720fc94d0f17654ec813821d218166c76424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134457 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-16sw content controls, dropdown: edit list items: add modify and deleteMiklos Vajna
Modify is really similar to insert, just we pre-fill the list item properties dialog with old data. Also allow moving items up / down, and eliminate a not needed frame in the inner dialog, which would assert when using the gen backend. With this, the content control dialog is quite complete for dropdowns. Change-Id: I26e77dd881f0a0eea44d2a6137f76fd29ab32fc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134405 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-16Make media object delete when it is cutJim Raykowski
Change-Id: Id586e015e42c23aa455d6f1a5dc42fbda492d2a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134381 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-05-16sw content controls, dropdown: edit list items in the properties dialogMiklos Vajna
- add a weld::TreeView to show existing display name - value pairs - add a button to add a new list item, together with a new SwContentControlListItemDlg to specify the list item properties + write the changed list back to the doc model Change-Id: I9243be84eb0af65437eccfb48c6780787609bc68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134379 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-15tdf#149049 related: fix media object inserts twice in WriterJim Raykowski
Change-Id: Id7a7b845e0255086eb877d21699ddb0b80cc47c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134335 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-13sw content controls, dropdown: add an initial properties dialogMiklos Vajna
- read the doc model: show if a content control is a placeholder or not - work with a shared pointer in the dialog, which avoids lifetime issues in case the content control we edit in one view gets deleted in an other view - write the doc model: set the placeholder mode of the content control based on the checkbox state and mark the doc as modified if any widget is touched when pressing OK - handle command state: allow this dialog only inside content controls Change-Id: Ie0b9075ccd3450dd403cc7f8bbf93fc04de3b234 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134278 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-13add SvStream::ReadLine(OStringBuffer... to reduce OString allocationNoel Grandin
and use it where possible Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134265 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-13sw content controls, dropdown: add LOK APIMiklos Vajna
- expose the available list items in a new "items" key of the LOK_CALLBACK_CONTENT_CONTROL callback - add a new lok::Document::sendContentControlEvent() function to be able to select a list item from the current drop-down - add a new listbox to the gtktiledviewer toolbar to select a content control list item when the cursor is inside a dropdown - add tests for the array API of tools::JsonWriter Change-Id: I47f1333a7815d67952f7c20a9cba1b248886f6dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134256 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-12sw content controls: fixes for the ending dummy charMiklos Vajna
- make sure the DOC/RTF export doesn't write the dummy char as-is - let "enter" only insert a linebreak while inside a content control, to ensure that the starting and ending dummy char stays inside the same text node - let deletion of the dummy character at the end behave the same as the start dummy character: if trying to delete that single character, then just move the cursor, don't delete it - reject document insertion in the middle of a content control, similar to input fields Change-Id: I9b54ef50261e6b17f38eadadacfe1e1111199e96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134239 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-12sw: fix crash in SwDrawShell::Execute()Miklos Vajna
Crashreport signature: SwDrawShell::Execute(SfxRequest&) [clone .cold] include/svx/svdhdl.hxx:194 SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) sfx2/source/control/dispatch.cxx:255 which is a bit tricky to read (probably due to LTO), but what happens here is that the handle index is user input and we look at index up in a list without error handling. This is a problem since commit 7eed711a6115bf892c998cbd73a2c5b706c6f99d (Extended MoveShapeHandle command for Anchors as well, 2021-05-24), which assumed that handle indexes and the handle list can't get out of sync. Fix the problem similar to what commit 48beccf52413981d3d1c525a81a2c57048abe261 (sw: fix crash in SwView::Execute(), 2021-09-03) did at SID_MOVE_SHAPE_HANDLE handler for Writer images (this one is for Draw shapes). This fix just makes sure we don't crash, there may be some deeper reason why the handle index is out of sync with the handle list in the first place. Change-Id: I8f3a25d74082984cedce09362a690f24d7236ba6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134216 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-12sw content controls, dropdown: add insert UIMiklos Vajna
- introduce a SwContentControlListItem::ToString() that tries to use the display text of the list item, otherwise falls back to its value and use it while building the dropdown widget and when inserting selected list item - handle the dropdown case in SwWrtShell::InsertContentControl() - expose this as a new .uno:InsertDropdownContentControl command - mention the new and all previous content control commands in the MS-compatible forms menu as well Change-Id: I075f77933c1466b5258357d5a661e173c34de34f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134215 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-11Advanced Diagram support: UNDO/REDO support for Diagram DataModelArmin Le Grand (Allotropia)
Added support for UNDO/REDO for changes in Diagram ModelData. This is currenly applied/used in the DiagramDialog for it's Add/Remove actions (also supports Cancel of that dialog 1st time ever). But it is defined more general to add/support manipulating actions like clone/change_text etc. Also the UI/dialog at he end will not be/stay modal, so this is a test implemenation how to use it. It uses an extract/apply mechanism to get/set the Diagram ModelData at/for the UNDO action. That may be expanded as needed for additional data in he future. It may also be considered to modify the Connection/Point ModelData to shared_ptr internally completely to avoid copying these at all. OTOH it is not that much data to handle at all. Change-Id: I4702ed908b79a476177fe66c0e3284898c6adda5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134118 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-05-11sw content controls: introduce a word breaking dummy char at the endMiklos Vajna
- this way double-clicking on the last word of a content control or the first word after the content control selects the correct text range, similar to how the same at the start of content control already worked - this allows not touching the expand flag in the SwTextContentControl ctor, which was overwritten by the ODT import (when the content control was at the end of the paragraph) anyway - hide this dummy character when accessing the paragraph content via the UNO API or the text export - still need to audit a few more places in follow-up commits to maintain the invariant that content controls have the same dummy char at the attribute start and end -- somwhat similar to how SwTextInputField does it with CH_TXT_ATR_INPUTFIELDSTART/END Change-Id: I88763d6db84afedbb865b680f040994c4d6ab7d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134151 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-09sw content controls: only try to insert placeholders if there is no selectionMiklos Vajna
The logic is that in case there is no selection, we insert a placeholder like "type here", but if there is a selection, that can be a custom placeholder. Without this fix, we would hit an assertion failure on inserting content control when there is a selection, as the placeholder is empty and operator[](0) is not allowed for empty OUStrings. Change-Id: I8370b8d74415faf0e76dccb574aa29bea1947bb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134041 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-06sw content controls, drop-down: select list item on clickMiklos Vajna
- remember the selected list item in SwDropDownContentControlButton::ListBoxHandler() - extend SwWrtShell::GotoContentControl() to update the document text, somewhat similar to how checkboxes are already handled - improve SwSelPaintRects::HighlightContentControl(): - re-create the vcl widget in case a different content control was selected - adjust position/size and re-show the dropdown button after selecting an item + doc text was updated Change-Id: Id3b89b6132697bfec7046caeb1f0c5fe93e99b37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133915 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-06tdf#128744 sw DOCX: unprotect change tracking with verificationLászló Németh
Unprotect change tracking only by password verification instead of 1) unprotecting without the password or 2) rejecting the correct password. I.e. now 1) clicking on Record changes icon of Track Changes toolbar or Edit->Track Changes->Record asks for a password, and 2) Unprotect Record changes on Security page of File->Properties... accepts the correct password with disabling record changes. Show also "Invalid password!" dialog disabling Record Changes by its icon or menu option, like Properties... dialog window does, if the password is invalid. Note: Still allow to unprotect OpenDocument export of a protected OOXML import document, because that doesn't contain the original password info, only a dummy RedlinePassword. (OpenDocument exports protect Track Changes with the simple RedlineProtectionKey configuration setting, so it's not possible to map the OOXML password info to OpenDocument without extending this.) Follow-up to commit d416250f4f1766e2d596ea3feef6a94b7adf29f4 "tdf#106843 DOCX: forbid disabling protected Record Changes". See also commit bfd7730f4cf002a79dc9c02c23286850fee3f12a "tdf#89383 DOCX import: fix permission for editing". Change-Id: Iafcf4a6b551a7e8485d4311aee889c2522526d71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133894 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04related tdf#148312 Don't search for hyperlinks in ToxContent to trackJim Raykowski
Hyperlinks in ToxContent aren't included in the Navigator content tree Hyperlinks members list. This patch saves some cycles by not searching through the Hyperlinks members list when the hyperlink is in ToxContent. Change-Id: Icc332748f37dee02f0bc5f6fc0500fed51dd1182 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133669 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
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>
2022-05-03sw content controls, drop-down: add doc model & UNO APIMiklos Vajna
Add a new property, which is a list of display-text / value pairs. If the list is non-empty, that implies that the type is a dropdown. This should be enough for the UI to be able to provide a list of choices & update dropdown state on click. Note that in contrast to dropdown field-marks, here each entry has a user-readable string and a machine-readable value. Fieldmarks only had a single value. Change-Id: I22b9f554e2e1a9e84cc7eb7e17772ea1a5775316 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133742 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-03sw: document SwTOXMgrMiklos Vajna
Unlike most other managers, this is now owned by SwDoc: this can be created on the stack when there is a need for it. Then it can do its work and safe to delete when no longer needed. Change-Id: Ief2e8c1172602edada36d330a652f8fe51fc8be2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-03add o3tl::equalsAsciiNoel Grandin
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-02sw content controls, checkbox: add insert UIMiklos Vajna
- extend SwWrtShell::InsertContentControl() to be able to create multiple content control types - a new checkbox content control's content is always a non-checked checkbox - expose this as a new .uno:InsertCheckboxContentControl uno command - add this new command to the bottom of the form menu -- now that we have two types of content controls, have that in a sub-menu Change-Id: I058659600b3face69b89262feb0979fff32521c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133685 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-01use more string_view in variousNoel Grandin
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-30tdf#148432 in LTR UI override the navigator treeview direction for RTL docCaolán McNamara
based on the first page directionality Change-Id: Ifa1a67dd0db53afb125bcea29df83e776f9e65d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133646 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-29tdf#143569 SwNavigator: Make Headings entries from headings in framesJim Raykowski
be in document layout order, not alphabetical order Change-Id: I75328311a7ddbda1eb050135709da20fed5d054a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133359 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-04-29use more string_view in INetURLObjectNoel Grandin
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-28tdf#100680 sw DOCX compatibility: fix wrap of as_char flysAttila Bakos (NISZ)
New DOCX compatibility flag "WordLikeWrapForAsCharFlys" has been introduced which true in case of importing DOCX documents. It modifies the wrapping of long words with as_char anchored flys anchored into the same line, resulting e.g. correct import of poor man's header lines drawn by using underline characters under an image. Note: this example was imported as a broken header line: half of it was there after the left aligned image in the same line, and after the line break, only the other half under the image. Change-Id: I9474900ef778bcf5ddc9d95f39d536d67015f3b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132571 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>