summaryrefslogtreecommitdiff
path: root/sw/source/uibase
AgeCommit message (Collapse)Author
2022-04-03tdf#147925 fix view scrolling back to commentJim Raykowski
fixes regression caused by fix done for commit 85057da7f19e8e5d6023c16fa07d138e2b519a66 Change-Id: I427513bd920f4e0047c64210feecfeac22ecfd10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132451 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-04-03tdf#148338: allow single-letter lowest-level domainMike Kaganski
The check that required lowest-level domain name to be at least two characters long, was introduced for #i25107# in 2004 in the commit dfcb4aa47b81ebd9affddefda88bf9b451508221 Author Rüdiger Timm <rt@openoffice.org> Date Mon Sep 20 12:13:22 2004 +0000 INTEGRATION: CWS swmailmerge (1.1.2); FILE ADDED (See also related #i20057# for feature specification.) It didn't mention a rationale behind that check; but obviously, it's unjustified. There are single-letter second-level domain names [1], like 'x.com', and also under many other TLDs. Also the check prevented single-character third-level names like "a.foo.bar", etc. Plus, RFC 5322 (and its predecessors) do not restrict these lengths in 'Addr-Spec Specification' (and RFCs referenced from there). This does not enable dotless domains [2]; if justified, they should be enabled separately. [1] https://en.wikipedia.org/wiki/Single-letter_second-level_domain [2] https://en.wikipedia.org/wiki/Top-level_domain#Dotless_domains Change-Id: I03cc26a90c08b94b9c1f70e0a0f1746192cb7afe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132482 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-02loplugin:stringviewparam convert methods using indexOfNoel Grandin
.. and lastIndexOf, which convert to find and rfind Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-31tdf#148061: Crash when opening report from tdf#148042 (DBG_UTIL only)Julien Nabet
Change-Id: I30dd54547b1f93e55270d7c029168aff3d0e92bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132339 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-29loplugin:unusedfieldsNoel Grandin
Change-Id: Iaf3a0a42e94994eab25f5e9ef8c111362e86fb02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-29cid#1503287 silence Unchecked dynamic_castCaolán McNamara
Change-Id: Id7c6c1ecbfc88c97d5211826fa2d831344dc795c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132245 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-29cid#1503286 Unchecked return valueCaolán McNamara
Change-Id: I701039be73405e354fc64bd6a81999aff44e9e0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-28Recheck sw/ cxx files with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I8a8df68946297fad517b753d73e4373203a45ed6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132150 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-28tdf#146523 Fix editable protected drop-down fieldsHossein
Previously, drop-down fields from a protected section in a Writer document could be edited by double-clicking on them. This patch adds a check to see if the appropriate section is protected or not. This check is done before allowing LibreOffice to open a popup window titled "Drop-down Form Field" for editing the list of possible values. Also, with this patch, menu item "Form > Control Properties..." will no longer do anything for the fields in a protected section. Change-Id: I02a23818bd315abd61118f199c72ac28b7ed1ab4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128256 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-03-25tdf#142447 related: SwNavigator: Copy outlinesJim Raykowski
Change-Id: Ibfc173ab6db3d9cbb1e8c59b515c40f1846f1e42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129542 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-03-25loplugin:unusedfieldsNoel Grandin
Change-Id: Ic34f6ac671cd80375085a3c9f858854ff74e2db2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132116 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-25simplify some TypedWhichId codeNoel Grandin
Change-Id: I7c908bac2217fb1e1a10dbd1fe8fe4d3cb253eff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-24sw fields: add Title uno propertyMiklos Vajna
The use-case is user fields, which are kind of variables in the document. They have a name and a value, but the name might be only readable to an extension or macro, not to the user. In this case, it makes sense to have a way to specify a user-readable tooltip. Be consistent with TextFrames which already have a Title property. Change-Id: I986792f5e55e0b96489347be482d640d155113cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132077 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-24loplugin:constantparamNoel Grandin
Change-Id: I86592be0717c062a918108bf4437074b0f70b372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-24sw clearing breaks: add insert UIMiklos Vajna
Expose SwLineBreakClear in SwBreakDlg and extend SwWrtShell::InsertLineBreak() to be able to insert clearing breaks as well. Change-Id: I17a4c34cb74f1c72d8e208bace25597de0367e17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132024 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-24tdf#147807 SwNavigator: relate Navigate By control to Content treeJim Raykowski
Change-Id: I4f74999b88d425f6d36b03bc5ee88f996f6844c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131874 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-03-18WeldEditView: Just pass new Size object as paramMichael Weghorn
Just pass `aOutputSize` as parameter instead of assigning that to `aSize` again and then passing that one as parameter in `WeldEditView::SetDrawingArea` and overrides in derived classes. `aSize.setHeight(aSize.Height())` can just be dropped as an overly complicated way of keeping the height as it is. In `SidebarTextControl::SetDrawingArea`, `aOutputSize` was already passed as param, so the new value of `aSize` was ignored anyway. Change-Id: I23192d3c5c85e4371a48774b3b8f854beb751b82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131741 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-17sw image dialog: fix fallback width/height for images with relative sizesMiklos Vajna
Make sure that we work with the up to date layout size of the image in the dialog, otherwise 80% shows up as 237%. Also fix SfxMacroTabPage::FillItemSet() to not put anything to the output item set when the macro table is empty, this way clicking OK in the image dialog results in an unmodified document when the user doesn't change anything. Change-Id: I4b987bd3e3818ee737e37ea10861f9043c25bc93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131714 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-17sw: document SwXViewSettingsMiklos Vajna
Which is a bit confusing: there is separation between the views while running, but only one view saves its config to the user profile, it seems. Change-Id: Ie5c5ae782860e1b93dc9096be893acff7e555aac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131674 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-17Notify Navigator when outline content visibility changesJim Raykowski
Change-Id: I1db018216eb37517192f87c5c22cd0b9e6319687 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130472 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-03-16tdf#148032 sw: add redline comment for tracked commentsLászló Németh
Tracked insertion/deletion of comments were shown as plain text insertion/deletion in that case, too, when there is no other text change in the redline (only the invisible placeholder character CH_TXTATR_INWORD of the comment). This was fixed by the new action icons of the Manage Changes dialog window before, but for better accessibility, now redline of a newly inserted/deleted comment gets also a redline comment "Comment added"/"Comment deleted", shown in Manage Changes dialog window with the Comment added/Comment deleted action icons, as suggested by Heiko Tietze. Note: because the redline comment (at least the tracked insertions) are stored in the document, this is a back-compatible solution. Follow-up to commit 128d3b454467e34538903b2eab45e866f976b314 "tdf#73125 sw: add Insert/Delete Comment Manage Changes action icons". Change-Id: I7a9e82ae1b9519e4883956f69de0aafc289f7f99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131659 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-03-16tdf#86395 tdf#104253 tdf#147658 tdf#135043 SwNavigator sort enhancementJim Raykowski
Provides for sorting content members by order in document or alphabetically. The option to sort comment and footnote content types members alphabetically is not done by this patch. Change-Id: If68c08bb0f1035b32cd1dad1d5bd08a340834b49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131448 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-03-14Resolves: tdf#147935 A row may have no newline character, tdf#147496 follow-upEike Rathke
Change-Id: I91672e31e324cdd17c02ca328863b636beeb5e45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131546 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-03-14add TypedWhichId version of QueryStateNoel Grandin
Change-Id: I95b86fc081847da01e06f50a1b2c7e7f5456c638 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131529 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-14sw: fix bug id in commentXisco Fauli
Change-Id: I510a48765b2ad286ddc194f6ca1a96211bcb05f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131528 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-03-13SwNavigator: Gray out Comments members not visible in the documentJim Raykowski
Grays out comment members in the Navigator Comments member list that are in hidden sections and folded outline content. Not showing comment annotation windows will not cause comment member graying. The patch also fixes comments sometimes not showing in the member list after document load due to the document layout of comments not being completed before the comment content array is initially filled. Change-Id: Id3ac664480c36f1a3d072f7658cc9269a55b70aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130471 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-03-13tdf#147929 "undo" may delete the current SwAnnotationShellCaolán McNamara
Change-Id: I69fb7e65e28743aa73e943e02d5029654b5543cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131450 Tested-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-13SwNavigator: make resolved comments visible on Edit... if neededJim Raykowski
Current behavior of comments members context menu item Edit..., when both unresolved and resolved comments visibility options are off, is all unresolved comments show before the cursor is placed in the comment annotation window of the entry in the comments member list which Edit... was selected. If the comment selected to edit is resolved the cursor ends up in limbo. This fix makes resolved comments visible on edit if needed. Change-Id: Idf016493c70a150273fe558e4967284472684db3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131292 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-03-12tdf#73125 sw: add Insert/Delete Comment Manage Changes action iconsLászló Németh
If the listed redline change contains only a comment. Note: filter actions haven't been extended, because tracked comments are still handled as text insertion/deletion, and their redlines joined with the tracked text changes around their placeholder character, i.e. not all tracked comments got new action icons. Change-Id: Ie78e18a48b9a71c3789fca1406e5d87ab95952bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131387 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-03-10Recheck sw headers with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I99558e6b6952b3f2c1ee32dd07354ff659ad9cd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131183 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-09sw_redlinehide: get text from shell, not node in ExecSpellPopup()Michael Stahl
Change-Id: I0160c4927a2f5e71f5025c2162a103f67ed03723 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131209 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-03-09Fix annotation window from being created by Navigate By CommentJim Raykowski
when a text selection is present. Change-Id: Icef331334a8ad7a499477860c6d883f26e909577 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131158 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-03-08sw: document SwXMailMergeMiklos Vajna
I.e. unlike footnotes or bookmarks, this is not specific to an opened document; while the UI only provides the matching menu item only for an opened document. Change-Id: I743bee4848a2da030369b9da55e0aae9bd2a86a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131148 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-07tdf#146562 let toc default size and pos on first launchCaolán McNamara
so only use resize_to_request when the user toggles the checkbutton Change-Id: Ib5fdac56da0441fae482bc9f2120d1d3ce173fe8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131104 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-07sw_redlinehide: more issues with SwEditWin Surrounding functionsMichael Stahl
.. and SwEditWinUIObject. These need to work with TextFrameIndex. Add some functions to SwCursorShell to make it possible. Change-Id: I884c4822a0e7ecf254ea09a893762e1e6d539534 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131042 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-03-07sw_redlinehide: fix crashes in SwEditWin Surrounding functionsMichael Stahl
These foolish functions write into the shell cursor! But the shell cursor's node isn't necessarily the same as before with merged paragraphs, so could crash with out of bounds indexes. Better use Push()/Pop(). Change-Id: I4fd0e2aa915b6c5448772a2c766848607bbf5aaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131041 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-03-07sw: prefix members of DocxAttributeOutput, SwDBTreeList, ...Miklos Vajna
... SwTOXBaseContent and SwURLFieldContent See tdf#94879 for motivation. Change-Id: I6481279dcb680ebba6392bbde3f4736dd270e52a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131092 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-06make CellTextAttr half the sizeLuboš Luňák
It's set for every cell with value. Change-Id: Ie46617a621e6eb16b5f67d92e85bf2155e650fb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131072 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-04cid#1500637 Explicit null dereferencedCaolán McNamara
Change-Id: I813703287faff25a48aa695ccb9c43bf469354d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130996 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-04Advanced Diagram support: Allow reLayout without keeping oox::ShapeArmin Le Grand (Allotropia)
Goal is to minimize dependencies on oox classes. For that pupose I redesigned the Diagram class to work without remembering an oox::Shape at all. For reLayout, a new temporary one is created and used. That was a bit tricky, I needed to find out what data at the oox::Shape is needed to sucessfully do that with the not-originally-imported one. Another necessary change was to move the DiagramFontHeights adapting mechanism away from oox::Shape, too. It fits better to Diagram class. That way it can also be used for reLayout and the oox::Shape gets a little bit smaller, too. This opens the path to move needed Mode-Data Diagam core claasses to other libs where changing/im/exPorting them will be possible. Change-Id: I40bc4b190d2abc797f5c56f9e476d22155d21422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131004 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-03-04Removed duplicated includeAndrea Gelmini
Change-Id: I9c62e12f3b0f88ead3dbd2cdc69b7462cbbe294b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130978 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2022-03-04SwNavigator: speed up footnote endnote content fillJim Raykowski
Reduces the time to fill the footnote endnote content array by avoiding SwFormatFootnote::GetFootnoteText which calls the somewhat time consuming SwTextNode::GetExpandText. Just calling SwTextNode::GetText to get the footnote endnote first paragraph text should be good enough here. Testing with debug and optimized builds on a test document with 6243 footnotes and endnotes shows a relative average differene of 10000 μs between use of lcl_GetFootnoteText, introduced by this patch, versus the current use of SwFormatFootnote::GetFootnoteText. Change-Id: I6a870c0700a3e64348e5550a0fc129eabf1b1d44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130182 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-03-03use SfxItemSet::GetItemIfSet in sw/source/uibaseNoel Grandin
Change-Id: Ic82df8d321ba2eb94957236264c71c5eb9a940a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-02Advanced Diagram support: Extend UI to all applicationsArmin Le Grand (Allotropia)
As a preparation make the currently available minimal UI to interact with Diagrams available to all LO apps Change-Id: Idd0a4c187a295cd264ebd09be2b574a3d2a93e44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130837 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-03-02Advanced Diagram support: Disable enter Diagram (Groups)Armin Le Grand (Allotropia)
Groups which are in Diagram mode should not be entered, to do so disable at UI and - for security reasons - also at the executing mehod. Groups in Diagram mode can still be UnGrouped (which will remove the Diagram status & data) Adapted testRegenerateDiagram() to directly act on the model data to test the same as before. Using triggering of UI events to enter the diagram group object needs reorganization, but model op's will always be possible Change-Id: I199f3821c2a8308a6f015997ce9eaef87623c46a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130541 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-03-02add TypedWhichId version of GetWhichOfScriptNoel Grandin
Change-Id: Ieb93f9525d0cc5b3a23e013f30ddaad6f44890ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130796 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01gtk4: media dimensions are only reliably available asyncCaolán McNamara
this is also the case for the direct gstreamer use in gtk3 but more egregious when abstracted away from it in gtk4 Change-Id: If90069308d67929585722c079c482cd4ad196e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130468 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01Try to fix .bau files being ignoredSamuel Mehrbrodt
In some circumstances it might happen that one .bau file gets replaced with another one, but the "new" one has an older timestamp than the "old" one. In this case, the .bau file will not be recognized as changed. So instead of checking for a newer timestamp, check for a different timestamp. Change-Id: I4248fb283d4399a8501a979cae7e6bcc6d8e8a2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130243 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-02-28SwNavigator: fix cursor positioning on comment context menu 'Edit...'Jim Raykowski
Makes the cursor end up in the selected comment annotation window instead of at the comment anchor position in the document when a comment annotation window has the cursor focus and the Comment context menu item 'Edit...' is selected. Change-Id: Iac87177670a1b74525dd03ecce05135c4b89d692 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130572 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-02-28sw: prefix members of SwNumFormatBase, SwOutlineContent, SwPostItContent ...Miklos Vajna
... and SwRegionContent See tdf#94879 for motivation. Change-Id: Ib7d6f1eb5b96e4cebcc2f17727e876670869cd14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130662 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins