path: root/sw/source
AgeCommit message (Collapse)AuthorFilesLines
12 daystdf#134112 Don't call UNO listeners with SolarMutex lockedStephan Bergmann1-4/+5
Change-Id: I20f616819ce25fa6873872d1f07ae8967a72e9bd Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
12 dayssw: prefix members of SwDocDisplayItem, SwNode2LayoutSaveUpperFrames, ...Miklos Vajna8-100/+99
... SwShadowCursorItem and SwUndoSort See tdf#94879 for motivation. Change-Id: Ic41cd974cc91bf29d73611a7ca920adc9a6551d7 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
13 daysweld date selection widgetCaolán McNamara1-19/+44
Change-Id: If7ea24d85c20f1bda972688e97c7f74b26e533e1 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
13 daysFix typoAndrea Gelmini1-1/+1
Change-Id: If5237578c5a836ff99541faeb9ae8deca0908134 Reviewed-on: Tested-by: Jenkins Reviewed-by: Julien Nabet <>
2020-06-20use JsonWriter for the rest of ITiledRenderableNoel Grandin4-70/+45
and fix bug in buffer reallacotion where mPos pointing at the beginning of the new buffer instead of at the correct index inside it. Change-Id: Ie1ffaa176f6165e2cec85c93adc945312eff38e4 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-06-20indicate popup menu was shownCaolán McNamara1-0/+2
Change-Id: I4d0e8f31fd8c30368497e52c6eb1ba2b7e960bab Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-06-20tdf#101830 sw: highlight empty 'invisible' input fieldsSerge Krot1-0/+23
Change-Id: Ibcf4f7ce88c7bf364510c522e224028aa4737790 Reviewed-on: Tested-by: Jenkins Reviewed-by: Thorsten Behrens <>
2020-06-19tdf#127635 sw_redlinehide: put point at the end of deletionMichael Stahl1-1/+13
SwWrtShell::Insert() is called with a selection, so it first calls DeleteAndJoin() to get rid of the selection. With redlining enabled, this leaves the cursor as it was before, so if the point was at the start it still is at the start, so the following Insert will insert at the start of the selection. But then AutoCorrect wants to do things and it uses TextFrameIndex and ViewToModelPos and gets a result at the end of the delete redline, while the cursor remains at the start of the delete redline. Avoid this by swapping the selection after DeleteAndJoin() (and also DeleteRange() for consistency) so that insertion happens at end of redline (swap "above" DoWithBreaks because it creates temporary PaMs). (regression from sw_redlinehide) Change-Id: Ib5b0475f610c2ce426e9202e9d325dd0cc451d5c Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-19tdf#132326 sw_redlinehide: no frames allowed in Undo SwNodesArrayMichael Stahl1-1/+5
This crashes in SwAccessibleParagraph::GetRealHeadingLevel(); the a11y should have been disposed earlier because the node it's connected to is in the Undo SwNodesArray. When SwUndoDelete::SwUndoDelete() calls SwNodes::MoveNodes(), all existing frames must be destroyed; the MoveNodes() would reset its flag temporarily inside a section, to delay creating the frames inside the section when moving to the live SwNodesArray, but this also prevents the deletion when moving in the other direction. (crash is regression from 723728cd358693b8f4bc9d913541aa4479f2bd48) Change-Id: I13719bf98ea96b8d68db3ee78cf7f4b61a99e7e5 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-19tdf#133924 DOCX export: fix text wraps around frameTibor Nagy1-7/+4
Co-authored-by: Attila Bakos (NISZ) Change-Id: I08f0c8a8f4f554178548ca5fc8d072998a379b32 Reviewed-on: Tested-by: László Németh <> Reviewed-by: László Németh <>
2020-06-19tdf#133701 DOXC export: fix frame distance from textTibor Nagy1-1/+8
Vertical and horizontal minimum distances of frame and the text wrapping around the frame were not exported. Note: different left/right, top/bottom values aren't supported by OOXML hSpace, vSpace, so calculate average values to keep the page layout. Co-authored-by: Attila Bakos (NISZ) Change-Id: Ieef999003bcc6b9bba0a932ee4dd2b5461380c17 Reviewed-on: Tested-by: László Németh <> Reviewed-by: László Németh <>
2020-06-19tdf#133981 sw_redlinehide: oops, InsertCnt_() is missing null...Michael Stahl1-1/+2
... pointer check. (regression from 55576842ec72a748d0bad123d41fa03c89fc136d) Change-Id: I4478c45d10ac516afd6360e4083b00d667c678fb Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-18sw: SelectAll should copy section before table at start of documentMichael Stahl1-0/+5
Change-Id: I51c9c84073a89402e7e4952c346ad13e1d264622 related: tdf#133982 tdf#133990, see bugdoc of the latter Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-18tdf#133990 sw_redlinehide: fix Undo with section before tableMichael Stahl2-2/+15
... at start of document. The section node wasn't included in the PaM passed to SwUndoDelete, so on Undo it called MakeFrames() starting from the contained table node and crashed when reaching the section's end node. Fixed, then it crashes in Redo, because SwDoc::DelSectionFormat() calls SetModified() which calls some event listener which causes EndAllAction() to be called, which by itself is scary and then it crashes because the nodes array contains a bunch of deleted nodes. Not sure if that SetModified() serves any purpose, but it's pointless in Undo. (1st crash is regression from 68880a3004623553bf1920ad8a4a4d2be4bca234) Change-Id: Iafdd073ca9577bf54dd5a8ad2eb8f8f110db93b6 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-18tdf#134021 sw_redlinehide: fix crash if document contains only tableMichael Stahl1-1/+14
This sets the m_bTableDelLastNd flag in SwUndoDelete, so a SwTextNode is created so that there's something in the document, and there are 2 problems with Undo: 1. ~SwIndexReg assert because there's a shell cursor on the text node; could fix this with some PaMCorrAbs() but let's just call DelFullPara() which takes care of that. (this likely isn't possible in the !m_bTableDelLastNd case) 2. no frames are created in MakeFrames() because there's no node in the document with layout frames, so delete it at the end. (regression from 723728cd358693b8f4bc9d913541aa4479f2bd48) Change-Id: I6d8535ae1a2e607d665660f149b344e817bc8ab0 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-18sw: try not to layout in SwShellTableCursor::FillRects()Michael Stahl1-1/+1
This crashes after Undo in tdf#134021 bugdoc, because there's no Action there so a SwTabFrame::RemoveFollowFlowLine() deletes a row and a11y events are sent synchronously, then the a11y code calls back into sw and accesses semi-connected cell frames. Change-Id: I98e8acf4756a44b8776e01d6b831d4b1494792f2 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-18distinguish active dnd-operation case from simple query caseCaolán McNamara2-4/+4
Change-Id: I1d8e95e46b45c71c0c83316ab4f19ba85eddcf75 Reviewed-on: Tested-by: Caolán McNamara <> Reviewed-by: Caolán McNamara <>
2020-06-18tdf#134035 sw: insert long date format for HungarianLászló Németh1-0/+11
in Writer using Insert->Field->Date or the similar toolbar function. Note: the previously used short date format YYYY-MM-DD is rare in Hungarian text documents, and it is no longer mentioned in the last Hungarian orthographic standard (But it's still default in Calc, as standardized by (MSZ) ISO 8601.) Change-Id: I09f2f3314356e84c73a42be9f06ceaa6769e7338 Reviewed-on: Tested-by: Jenkins Reviewed-by: László Németh <>
2020-06-18new json writer for LOKNoel Grandin1-23/+13
we shave about 3 memory copies off in the process, and make the class play nicely with our string types. Change-Id: I1f614fb35b1de499ac99e3b33ac638ad81054bed Reviewed-on: Tested-by: Noel Grandin <> Reviewed-by: Noel Grandin <>
2020-06-18tdf#133982 sw: fix Copy of document that starts with nested tableMichael Stahl1-1/+6
Started to assert with ef8427d12a63127a2eb867637699343d630545dd because a bookmark was created on the wrong node but this never worked. Change-Id: Ife01a3c8041b4c7d08b2d749dde77ced388f7215 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-18tdf#134009 sw: prevent spurious undos in SwColumnFrame::DestroyImpl()Michael Stahl1-0/+3
SwUndoFrameFormatDelete is created for every destroyed column frame. Change-Id: I11e0399487a41c52768175faf3a3699b302ad317 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-18sw: handle TreatSingleColumnBreakAsPageBreak when replacing compat optionsMiklos Vajna1-1/+1
This was added in commit 93d7fc90b57bb08052299c94fa0a28bb8f494a9c (tdf#76349 writer: make 1column-as-page break a compatibility option, 2016-08-30), it's off by default and on for DOCX documents. Change-Id: I60f6d23feb278e8a234f5c571f9b647c2c08c491 Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
2020-06-17uitest: Add support for Writer commentsShiko3-0/+107
Change-Id: I88ed2894c3665fb421c5d8ea0f278c54ccd0d0e1 Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <> Reviewed-by: Markus Mohrhard <>
2020-06-17tdf#134063: sw: redesigned support for tab at zero positionVasily Melenchuk1-9/+6
Initial support for tab position at zero (d2e428d1) was not taking into account hack for tab positions below zero. So previous behavior is restored (search is started from 0) but we also taking into account potential tabs at zero position in SwLineInfo::GetTabStop() Change-Id: I8b315ab69f9a53ac15002a41a81e069ff832f692 Reviewed-on: Tested-by: Jenkins Reviewed-by: Thorsten Behrens <>
2020-06-17tdf#120394: doc import: use list format stringVasily Melenchuk2-127/+33
Since introducion of list level format string there is no need in complex parsing of doc level string and convering it to prefix-number-suffix format. We can just replace there special chars by %n placeholders (used in docx and now in LO) and this should be enough. Change-Id: I4e947939c4d4f393ee7e16c851cf22567d352ac3 Reviewed-on: Tested-by: Jenkins Reviewed-by: Thorsten Behrens <>
2020-06-17tdf#132944 sw_redlinehide: delete of insert redlineMichael Stahl3-3/+48
Because of an existing insert redline with SwComparePosition::Equal this hits the DeleteAndJoin() call in AppendRedline() and so what happens on Undo is that the SwUndoDelete first creates all the layout frames and then the SwUndoRedlineDelete creates the frames a 2nd time. Because this can happen not only for Equal but also Inside case, it appears best to prevent the "inner" Undo from recreating the frames; it's always SwUndoDelete. This is quite hacky... Change-Id: I4438dd09bb6c2edf8154d333de403483768755fd Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-17svx: SVX_ENABLE_FLASH is now unusedMiklos Vajna2-3/+3
It was read by the Writer character blinking UI, which is gone. Change-Id: I97114f0fcfca02e1b2ff53f613d2d78619262f9f Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
2020-06-17tdf#134023 sw ui: stay at footer ONLY when showing controlJustin Luth1-3/+5
This adds a missing piece to LO 6.4's commit 342a5890dbcddccb4013e201e3ff3d9e6967e733 That tdf#84929 commit message suggested: One additional limitation could be added to only apply this if it is dealing with the footer, since in the case of a header there would be no screen-jump. and this bug report shows why that is necessary. I'm not sure why I didn't apply that immediately. Perhaps to help identify situations where the entire concept might be bad? Change-Id: Icea861bec45262eed88c38bb7eea910289c06870 Reviewed-on: Tested-by: Justin Luth <> Reviewed-by: Justin Luth <>
2020-06-16tdf#106234 sw: don't justify after centered tabsLászló Németh1-1/+16
(also after right-aligned and decimal-aligned tabs) before the page break in a justified paragraph. Justify only after left-aligned tabs, like MSO does. Regression from commit 07dcbed5fb6d88f69d84313ddede81c222a5a7a6 (INTEGRATION: CWS fmebugs01 (1.15.104); FILE MERGED 2004/02/09 15:13:57 fme #i13507# Justified alignment for lines containing manual breaks). See also commit 5d7b3475278f59a423c2139ae51f9b4849621890 (INTEGRATION: CWS swqbf34 (1.17.96); FILE MERGED 2005/06/29 12:12:25 fme #i49277# New compatibility option bDoNotJustifyLinesWithManualBreak). Change-Id: Ib92e301aaf46eec283c0850d23549b1b54106068 Reviewed-on: Tested-by: László Németh <> Reviewed-by: László Németh <>
2020-06-16sw: fix type of FieldsToCalc() parameterMichael Stahl5-6/+7
Change-Id: Ic59c65f67c9479c5d43bef4abd67b8e4ee4192b7 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-16Remove some unused includesMiklos Vajna1-1/+0
Change-Id: Iba6d787de4b61c71ce9edbfed748aeae2b7f1f39 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
2020-06-16sw: remove useless SET_CURR_SHELL macroMiklos Vajna40-198/+198
Perhaps it did something useful in the past, but it's better to expand it in its current form. Change-Id: I404e8d274f15a178f519d42a1ecd993c1e530f91 Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
2020-06-16tdf#133145 sw ContinuousEndnotes: fix moving endnotes to a previous pageMiklos Vajna1-0/+18
Regression from commit 4814e8caa5f06c4fe438dfd7d7315e4a2410ea18 (tdf#124601 sw: add ContinuousEndnotes layout compat option, 2019-09-30), the problem was that SwFrame::GetPrevFootnoteLeaf() did not take the new compat flag into account when determining the previous footnote page for endnotes. Do the same pattern here as the cases already handled in the above commit, just try to get the "last but one" and not the "last" page, since we try to move these endnotes to a previous page. Change-Id: I77841a3a0fb68f054941184ee2a8aca0707d2a9c Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
2020-06-15consume tab key press in single-widget dropdownCaolán McNamara1-0/+13
Change-Id: Ie23fa35d29c20910514f3aaad095521f1588702b Reviewed-on: Tested-by: Caolán McNamara <> Reviewed-by: Caolán McNamara <>
2020-06-15tdf#133957 sw: SelectAll should select fly in empty sectionMichael Stahl5-24/+46
Ctrl+A should select everything in the section; if the section is empty, there's no text to select, and then the shell will cancel the selection because SwCursorShell::HasSelection() returns false - so check if there are flys anchored there, which fixes the Copy. To fix Delete, a few more checks for empty selection need to be changed. Change-Id: If54160bdca976ad5f153b89cf8492f4da1e774b7 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-15tdf#132321 tdf#133957 sw: for at-para fly, ignore anchor SwIndexMichael Stahl1-1/+3
... because it's always 0, and not registered at the node; this fixes the case when it's anchored at a non-empty last node of a section. (follow-up to a0d0665060b75c1e7f0234b698c940d2f9d600f8) Change-Id: I627e11e84a2dcfc2944d3c9f3fd22e3c3785e505 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-15tdf#128195 Keep spacing below last paragraph in header (docx)Samuel Mehrbrodt5-2/+39
Add a layout compat option to keep the spacing below the last paragraph in the header in doc/docx files Change-Id: I259511183a8252e04d9951357dbdd4f4832523ec Reviewed-on: Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <>
2020-06-15sw: fix unnecessary copy initializationMiklos Vajna1-2/+2
Change-Id: Ida66ded1de95829f0a053bc6b4be29ea2daa88e2 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
2020-06-15sw: prefix members of FlatFndBox, SwLayoutCache, SwNode2Layout and ...Miklos Vajna8-76/+76
... SwURLStateChanged See tdf#94879 for motivation. Change-Id: Id20c322dc79f385cfa067a999c76938ee5896dcd Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
2020-06-15Add an option to send email encrypted PDF files via mailmerge.Gülşah Köse2-6/+78
Change-Id: I002e054b685bd3367c4183014adc1dbd0843a365 Reviewed-on: Reviewed-by: Gülşah Köse <> Tested-by: Gülşah Köse <>
2020-06-15Return early in ExtendedSelectedAll (sw/crsrsh)Julien Nabet1-2/+3
No need to search if there's a "pEnd" if there's not even a "pStart" Change-Id: I8e26b432d4f32b4803e78fc36006bf6c8c7e913e Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-06-13crashtesting: null deref in SwCellFrame::GetLayoutRowSpanCaolán McNamara1-1/+2
seen with swtextframe_connectfootnote_heap_use_after_free.sample Change-Id: I98da2e67065c5890d74e5f33ffc01329ff75f185 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-06-13Changed the source code location for InspectorShivam Kumar Singh3-0/+103
The Inspector has been instead of defining in svx now defined such that the main implementation is in sw folder whereas there is a common interface in svx. This change has been done as a progressive step towards cleaner code. Change-Id: I49af862f87b4315385c2e275b1079394c326b119 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <> Reviewed-by: Tomaž Vajngerl <>
2020-06-12tdf#131912 sw: fix spell check correct deleting flysMichael Stahl3-26/+24
* SwEditShell::ApplyChangedSentence() should not call DeleteAndJoin() + InsertString() but ReplaceRange() * ReplaceRange() and SwUndoReplace need to set a new flag DelContentType::Replace to tell SwUndoSaveContent::DelContentIndex() not to delete flys but instead record the previous anchor positions * SwUndoReplace::UndoImpl() should also not call DeleteAndJoin() + InsertString(); instead call ReplaceRange() for the start node and then DeleteAndJoin() for any regex "\n" that were inserted (regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5) Change-Id: I485d79510ae233213cb4b208533871934c5e5ec6 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-11tdf#132321 sw: adapt fly at-para deletion to at-char wrt. sectionsMichael Stahl1-2/+2
971205dc2110c1c23ff1db1fc4041e2babf6fa9f changed at-char selection to check that not only the start is at the start of the section or the end is at the end of the section, but that both are true. Let's do this for at-para flys too for consistency, changing what was introduced with 91b2325808a75174f284c48c8b8afc118fad74e4. Change-Id: I1ec93b076d729288ce0809d1cfc24379aa9591ab Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-11tdf#132744 sw: fix subtle difference when checking end of sectionMichael Stahl1-2/+15
In a few places, such as CopyFlyInFlyImpl() and DelFlyInRange(), the passed start/end positions aren't necessarily from a cursor but can be section start/end nodes instead. (regression from 971205dc2110c1c23ff1db1fc4041e2babf6fa9f) Change-Id: I1fb24f1f9d027aa3685ac5a7459891cb8c2b9a41 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-11sw: follow-up: fix other calls of ContentIdxStore::Save(Len())Michael Stahl2-3/+5
Presumably these have the same bug as sw_JoinText(). Change-Id: I77a794be92f36cf2163f819d3941d70e69eb2f27 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-11tdf#101856 copy missing bookmark propertiesSerge Krot5-3/+18
- in case of undo/redo - in case of copying bookmark Change-Id: Ia21f42973b0e7c2cc4abfe2febe9818509aec4d5 Reviewed-on: Tested-by: Thorsten Behrens <> Reviewed-by: Thorsten Behrens <>
2020-06-11crashtesting: sw: fix export of ooo24576-1.doc and ooo79410-1.sxw to odtMichael Stahl1-1/+1
Crashes because an at-char fly has its anchor node deleted, and during deletion of its text frame its SwAnchoredObject is updated, which asserts because of inconsistent anchor node in the fly and mpAnchorFrame; the immediate cause of the inconsistency is that SwNodes::RemoveNode() changed the fly's anchor node. The root cause is that in the sw_JoinText(bJoinPrev=true) code, a fly anchored at the end of the deleted node isn't moved to the surviving node. SwTextNode::JoinPrev() uses different arguments to ContentIdxStore::Save(), so use the same here. The implementation of several ContentIdxStore functions, including ContentIdxStoreImpl::SaveFlys(), ignore positions that are equal to the passed nContent index, so passing in SwTextNode::Len() looks wrong. (crash is regression from 98d1622b3721fe899c4e1faa0b4cc35695253014) Change-Id: I3a4d54258611da6b15223273a187c39770caa8e2 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2020-06-11tdf#132254 sw: fix block selection copy reversed orderMichael Stahl1-2/+2
The problem is that SwEditShell::CopySelToDoc() relies on the passed target SwPosition being after the target range by CopyRange(), but due to an erroneous update of aInsPos in CopyImplImpl() it was at the beginning of the target range. (regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5) Change-Id: Ie0846bd44f9349517878efcca996440bede05611 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>