summaryrefslogtreecommitdiff
path: root/sw/source
AgeCommit message (Collapse)AuthorFilesLines
2018-10-16tdf#113848 Sidebar: Get user-defined sizes while changing orientationIlhan Yesil1-2/+7
If the orientation of the page is changed, the user defined page sizes are now accessed directly to swap the sizes correctly. Change-Id: I91d256d35dcd910a8c3151a3f9e669413c9a57db Reviewed-on: https://gerrit.libreoffice.org/59577 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 32bf352c61754fe5ef39e0794b5d6dc71be99194) Reviewed-on: https://gerrit.libreoffice.org/61667 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-15sw: fix invalid cast in SwEditWin::RequestHelp()Michael Stahl1-1/+1
This results in a garbage OUString. Change-Id: I03b8030a812d7016df5c29f1341749fbdedf1729 Reviewed-on: https://gerrit.libreoffice.org/61652 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit bf0276f0b53c01ac434fef88e97f6b0dd4c41787) Reviewed-on: https://gerrit.libreoffice.org/61673 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-13Resolves: tdf#120487 postit losing focus triggering recreation of postitCaolán McNamara1-1/+4
Change-Id: Idde6b740bc94de62bbd528b656841ab37e3f3786 Reviewed-on: https://gerrit.libreoffice.org/61682 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-10-04sw: fix copying of PageDesc follows in SwDoc::AppendDocMichael Stahl1-9/+35
The problem in the bugdoc is that there are 2 styles; "First Page" has "Default Style" as the follow, and vice versa. When the "First Page" style is copied, its follow is copied as well, but the follow of the follow doesn't point to the *new* "First PageN" style that was just created, but the original "First Page" one. Change-Id: Ie5b0064581a585a3a545360ea5c05f60652f0d4e Reviewed-on: https://gerrit.libreoffice.org/60993 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit a6a4fa526b8ad19ff6d44a89ee56d4268c8e90be) Reviewed-on: https://gerrit.libreoffice.org/61062 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-21ofz#10523 guard aginst 0 pF->nLCodeCaolán McNamara1-1/+1
Change-Id: I8ef476e06f54ddd57be907488a8a65314abda3ee Reviewed-on: https://gerrit.libreoffice.org/60827 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-09-20sw: fix return value of DocumentRedlineManager::AppendRedline()Michael Stahl1-1/+8
If a footnote is inserted, a redline that includes the start/end node of the footnote is created, but that is not a valid redline (as far as HasValidRange() is concerned), so instead a different redline without start/end nodes is inserted, but pNewRedl is reset and so AppendRedline() returns IGNORED, and then we get an assert in Undo from SwRedlineSaveData::RedlineToDoc(). Change-Id: I92253e1a40ba98e34e0bca601b4e3b6ef3751b08 (cherry picked from commit deacee23d9530350988eef68b0e9bb5cfcf2fde3) Reviewed-on: https://gerrit.libreoffice.org/60750 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-20sw: SwRedlineTable::DeleteAndDestroy() is surprisingly dangerousMichael Stahl1-23/+32
At least with the randomised test, it can happen that deleting one redline will recursively delete other redlines that are located in the hidden content section of the redline, or at least try to and crash because those have already been deleted before. The callers will either delete 1 redline, or delete all of them via DeleteAndDestroyAll(), so put a safer loop into DeleteAndDestroyAll() and have DeleteAndDestroy() only delete 1. Change-Id: I9c4225544a43a4a03f4eb7b6f56e7fe848c8ca54 (cherry picked from commit 471212d464f54054f7419ef1890267d0def852d9) Reviewed-on: https://gerrit.libreoffice.org/60749 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-20sw: fix 0-length delete redlines in SwUndoSaveSection::SaveSectionMichael Stahl1-7/+11
The delete redlines aren't restored properly on Undo because they are squashed into a point by DelBookmarks. (regression from 6af2caab7271e11d9501fd6a597e05194d33fd10) Change-Id: I34ea66b5ab0d441c42570e25ea374cb2d0cfc780 (cherry picked from commit 251b88be7fdca54c38cc7632a85184577f719180) Reviewed-on: https://gerrit.libreoffice.org/60745 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-20sw: fix usage of wrong string in SwUndoOverwrite::RedoImpl()Michael Stahl1-1/+1
At this point the "aDelStr" is in the document, don't use invalid index. Change-Id: I0aae8839e9669e3a474266a345b54a1e7e6db38f (cherry picked from commit a44d7917655dfec3f6a101752c68de8c46aeb822) Reviewed-on: https://gerrit.libreoffice.org/60748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-20sw: avoid asserts from SwSortedObjs::Insert()Michael Stahl1-1/+4
The first frame is almost certainly already inserted in line 2057; This causes "<SwSortedObjs::Insert()> - already contains object". Change-Id: I4a785accdec033865da971bf25d0ebe06ec2e765 (cherry picked from commit 7f406cbacf9c3abc45c7241535472ffab807e2f0) Reviewed-on: https://gerrit.libreoffice.org/60744 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-20StartUndo with END arg should have been EndUndoCaolán McNamara1-1/+1
Change-Id: Iffcb770ef0ebf28e6bdbea044cd0ec8dcffa53e8 Reviewed-on: https://gerrit.libreoffice.org/60806 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-09-20tdf#108402: avoid crash if filter doesn't matchJulien Nabet1-0/+8
See bt https://bugs.documentfoundation.org/attachment.cgi?id=134006 + display warning Change-Id: I38496364c0965015ea54f753f3d3550f317d88d8 Reviewed-on: https://gerrit.libreoffice.org/60413 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 475ea37809b5bec369d02a5ab500fac46ab40f0a) Reviewed-on: https://gerrit.libreoffice.org/60791 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-09-20tdf#119770 nullptr GetGraphic returnCaolán McNamara1-1/+2
Change-Id: I9e76b6704e7f82cd9d200ed6c5802101de264242 Reviewed-on: https://gerrit.libreoffice.org/60685 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-18tdf#119875 sw: fix invalid pos of frame after 0-sized section with laycacheMiklos Vajna1-4/+24
The interesting part of the layout of page 2 is: - frame #40 is a section frame with a text frame which is in a list ("A") - frame #48 is a section frame after that, with the same top=19213 Given that frame #40 has height > 0, they overlap when the page is rendered. What happens is: - frame #40 grows - there are other section frames between #40 and #48 in-between, but they don't have an SwSection - these frames are skipped - then the position of #48 is invalidated So the next time we calculate the position of #48, we look the last skipped (previous) section frame (which still has top=19213, since its position was not invalidated above), and since its height is 0, we conclude that our current top=19213 is valid after all. This is like this since commit 84a3db80b4fd66c6854b3135b5f69b61fd828e62 (initial import, 2000-09-18), so leave the code there that invalidates not only the next frame, but all the way down to the first non-SwSection-less-SwSectionFrame. But instead of just invalidating the last frame, invalidate the in-between SwSection-less-SwSectionFrames as well. In practice this did not cause a problem in case the document has no layout cache. If it does, then the frames are created on pages hinted by the cache, then later moved to their final place. In practice this bug was visible only in this later case. (I.e. such a layout cache can be only created if the machine that saved the document last time does not have the fonts needed by the document installed; and then the document is opened on an other machine which has those fonts.) (cherry picked from commit b5937112d4035fb9ffb472e1bf36567d9c78c820) Conflicts: sw/qa/extras/layout/layout.cxx Change-Id: I02ae9f63d0b4b5e9d014df53ed2cf21a04b15090 Reviewed-on: https://gerrit.libreoffice.org/60590 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-09-17SOSAW080: Derive SdrObjGroup from SdrObjListArmin Le Grand19-88/+37
Also simplify parent/child relationships, get rid of double data (SdrPage/Parent infos in SdrObjects, also in SdrObjList). This is all not needed - when a SdrObject is inserted to a SdrPage, get SdrPage by traveling over parents (no double info, member as soon as inserted, ...). More cleanups/reworks included, will need some more cleanups, too. Stabilizing: SetRectsDirty/DefaultStyleSheet Had to correct the SetRectsDirty stuff for 3D due to going down the hierarchy while the 2D implementation goes the other direction -> endless loops. Added special handling for 3D stuff for now (will be chnaged again when SnapRect is no longer needed at SdrObject level). Also had to adapt how the DefaultStyleSheet is set at incarnated SdrObjects - better: their properties. Since we now always have a SdrModel, it is possible to correctly initialize with the correct default StyleSheet from that SdrModel. This needs to be done after ForceDefaultAttributes and in a way that again deletes Items that are set in the StyleSheet. This leads to an error in CppunitTest_sd_import_tests where I checked tdf100491 - it is okay and thus I change the control instance of the imported, XML-dumped file. The less hard attributes, the better for Styles in general. Cleanup of comments for last two commits Corrected SvxShape::getParent() Needed to get the direct parent, so test for SdrObject first (to get SdrObjGroup/E3DScene), for SdrPage second Fixed CppunitTest_sc_subsequent_export_test Several problems arose. The used SdrCaptionObj was Cloned, but the clone not inserted to a SdrPage. This leads to not being able to access a UNO API imlementation of the SdrPage (SvxPage) on lower levels. It worked before due to SdrObject having a SdrPage* additionally to being added to a SdrPage - this is exactly the main cleanup this change does. Looked for why it is cloned, could see no reasons. The SdrCaptionObj exists during all im/export, not difference to other SdrObjects (that do not get cloned). It is not changed in any way. It *might* be to suppress a crash that happened due to UNO API Service emfio/emfio not being available in the UnitTest scenario. Interestingly it did not crash with the cloned SdrCaptionObj, but the Graphic exported was probably wrong. Fixed by no longer Cloning the SdrCaptionObj and adding emfio/emfio UNO API Service. d139f821a5b39535a3e7b9c6261df7e18f8ae8ac 910e7f4bc628a715fda7545dffaf3369d5e76ea0 ca1de01b723051e09ac37d7ec7bba978beea41c5 3a76da1471dfe75e69847f64a6a3519ad21c8c9c Change-Id: I986586e326b563acebf00d931a7084c6eb09e5f8 Reviewed-on: https://gerrit.libreoffice.org/54689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Reviewed-on: https://gerrit.libreoffice.org/60535 Tested-by: Jenkins
2018-09-10sw: tdf#119742 fix null pointer in SetCursorInHdFtJuergen Funk1-1/+2
In SwWrtShell::ChangeHeaderOrFooter the ChgPageDesc destroys the frames of the header, that's why GetCurrFrame returns null later. Change-Id: I26915237c8b455a5b8ad0bbd5c2de38537dfef08 Reviewed-on: https://gerrit.libreoffice.org/60130 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 77d075facaf4fc8954666ad541ed14f75d964fba) Reviewed-on: https://gerrit.libreoffice.org/60249 Tested-by: Jenkins
2018-09-04ofz#10198 reset uncommitted fly stuff & pams before applying redliningCaolán McNamara1-0/+3
Change-Id: I2a2587ec4590926f7cffc2a4d58a22d9d5f19c99 Reviewed-on: https://gerrit.libreoffice.org/59947 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2018-09-03Resolves: tdf#119607 crash in calling getPropertyState on TextParagraphCaolán McNamara1-2/+5
Change-Id: Ib7091473e3547241e95dc3d3921abf650f288aff Reviewed-on: https://gerrit.libreoffice.org/59825 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-03sw TextGraphicObject: handle XBitmap for GraphicURLMiklos Vajna2-1/+8
This restores compatibility for API users who called getByName() on the bitmap table and expected that the result can be set as a value for the GraphicURL property. Changing the property type to cppu::UnoType<css::uno::Any>::get() is necessary, otherwise scripting languages figure out (via reflection) that the type doesn't match, and SwXFrame::setPropertyValue() is not called. Change-Id: Idd62f109e91dbaebf1138b9038f66c6c648d780e Reviewed-on: https://gerrit.libreoffice.org/58745 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins (cherry picked from commit 587803ba46055d43b5b108be744fdde17aeabc7c) Reviewed-on: https://gerrit.libreoffice.org/59850 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-03sw TextGraphicObject: fix GraphicURL handling in the descriptorMiklos Vajna1-0/+10
Commit dfee7d93b4e863d673c45921f79bb876b5738ea6 (sw: get rid of FN_UNO_GRAPHIC_U_R_L and "GraphicURL" property, 2018-03-08) removed support for string-based graphic references, then a later commit restored the setter. But one scenario (when setting the graphic URL before inserting the text graphic object) was still unsupported for real URL setter; restore that as well. (cherry picked from commit bba0ccd743a3d023e4829155571cdf0318fcb81c) Conflicts: sw/qa/extras/unowriter/unowriter.cxx Change-Id: I52a7f96e820f614d9d031df3ba03c794984ad68b Reviewed-on: https://gerrit.libreoffice.org/59849 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-02tdf#118845: make HiddenPara have higher priority deciding visibilityMike Kaganski3-19/+40
Otherwise, a Database field in a paragraph which is non-empty would force the paragraph to be visible, regardless of HiddenPara field telling it to be hidden. Regression from commit db04be037b611e296ef9f2542322c52ed82d7a2b Change-Id: I21807e22bd339fd1ea0aaa3b382579f688903418 Reviewed-on: https://gerrit.libreoffice.org/59792 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 64cb57c82d9e7f7069821b2e2ef92574ec73ebe2) Reviewed-on: https://gerrit.libreoffice.org/59865 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-31Fix syntaxJulien Nabet1-1/+1
Change-Id: I21cca2e5cd81ee58a59fda077ed40ba02d9f1df3 Reviewed-on: https://gerrit.libreoffice.org/59844 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 49d1a2f70bb8c099f1a950e5ad9f805d252ea342) Reviewed-on: https://gerrit.libreoffice.org/59847 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-08-31tdf#116436 rtf export: add missing table background fillJustin Luth1-5/+23
MS formats only have support for Table and Cell fill. Interestingly, MS Word doesn't let the cells inherit from the Table fill setting, so that value also needs to be written out into every cell. Since Word apparently ignores the table color, I didn't bother trying to search out how to export that in RTF format. (I did add it to DOCX since it was so easy to find.) Change-Id: I7fe7723fb1603bc60608762aea79ff3b8122e073 Reviewed-on: https://gerrit.libreoffice.org/59282 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 1a4bc964f15003c6aaec84989e3e47501b7f72df) Reviewed-on: https://gerrit.libreoffice.org/59667
2018-08-31tdf#91292 docx export: COL_AUTO != cleared fillJustin Luth1-1/+1
required for tdf#90906. If the color was COL_AUTO, then the fill was already marked as NONE, so that doesn't indicate a "change" made by the user since the document opened, and thus the original information shouldn't be tossed. Change-Id: I2e20c228c2a5f61826320798a2f07d94f0da024c Reviewed-on: https://gerrit.libreoffice.org/59442 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 2902771581ccd6465b3e8cdca0aa3fcb6d51ca60) Reviewed-on: https://gerrit.libreoffice.org/59535 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-30tdf#117823 Save mail merge config item in new viewIlhan Yesil1-0/+1
The config object is now saved in a newly created document. Regression from commit id 00fa85e701d4a8984cfa3a24c9b7a3963b031fa0. Change-Id: I2265de1dd69038d447e28dfda2e85c7cf89903c6 Reviewed-on: https://gerrit.libreoffice.org/59728 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 9d847ff825c1c94286e8ab864a88fc5375d9341c) Reviewed-on: https://gerrit.libreoffice.org/59802
2018-08-30Resolves: tdf#119572 addressee/sender formatting swappedCaolán McNamara1-2/+2
Change-Id: Icdb2ca0362711e87edcb952fb52117502d80d328 Reviewed-on: https://gerrit.libreoffice.org/59794 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2018-08-29tdf#119458 reorganize sw background Idle handlingJan-Marek Glogowski2-23/+30
This is the squashed version of the following commits: - ce68889678bc tdf#119458 always start the SwDocIdle - 107f0e6dba57 tdf#119458 fix sw background Idle state handling - 771544544ee1 tdf#119458 fix sw background Idle unblocking - 3bd8316718fd tdf#119458 just wakeup Scheduler on active Idle While the first commit was really wrong, the third is just an optimization to prevent unnecessary wakeups and Idle task interrups from new calls to StartIdling(). The 4th one contains the reset of the Idle state on run, which was probably the main origin of the problem and allows to wake up the Scheduler without moving the Task to the end of the queue. Starting the SwDocIdle in StartIdeling() just reintroduces the bug fixed in commit 401cba4c20fb ("tdf#116370 cleanup Writer idle job handing"), so trading one bug for the other. For the real solution we have to handle two states: 1. The SwDocIdle being active 2. The SwDocIdle being blocked For the first state we can just use the active state of the Idle itself. Since it's not a AutoIdle, it will be turned of, if invoked. Either some Idle handler will want to be run it again or some other thread might start it again, if needed. Since we're now tracking the wanted Idle state via the active task flag, we can drop the explicit mbStartIdleTimer handling. As a result of the first change, we can't stop the Idle anymore when blocking it. But the Idle itself checks its ready state via IsDocIdle() in its UpdateMinPeriod function, so we have to add the blocking state to IsDocIdle(). But we can't handle the correct state when blocking via a tasks mbActive bool, as this also schedules the task and starts the scheduler timer. So reintroduce a bool for the unblock state. This should prevent fdo#73165, which I couldn't reproduce, but just to be sure. More importantly this patch resets the m_bStartOnUnblock when the Idle job actually runs. This run should already determinates if more Idle work needs to be done, and others can still call BeginIdling() to ensure further processing. Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/59536 (cherry picked from commit ce68889678bca3b51c258452f7bfdd21982e4a0d) Reviewed-on: https://gerrit.libreoffice.org/59586 (cherry picked from commit 107f0e6dba57a5b27366a35a5cdb184079546df0) Reviewed-on: https://gerrit.libreoffice.org/59692 (cherry picked from commit 771544544ee13ec98961f93b5313a7d2e29429cd) Reviewed-on: https://gerrit.libreoffice.org/59730 (cherry picked from commit 3bd8316718fdfed454c01a9c4ae6af6beb34437d) Change-Id: I2d4328f31644017b09786ff4cba45cf7643f0a4b (cherry picked from commit f1fb30cf43eda45137ab96177238a29c3725789d) Reviewed-on: https://gerrit.libreoffice.org/59757 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-28tdf#116436 docx export: add missing table background fillJustin Luth1-1/+26
MS formats only have support for Table and Cell fill. Interestingly, MS Word doesn't let the cells inherit from the Table fill setting (even though LO docx import currently does), so that value also needs to be written out into every cell. Change-Id: Ib49fddf52758ff641428de747ea290d1fcb894f3 Reviewed-on: https://gerrit.libreoffice.org/59260 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 8cc753d54ad1834709c5802115580adf65def89e) Reviewed-on: https://gerrit.libreoffice.org/59286 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-28tdf#116436 doc export: add missing table background fillJustin Luth1-18/+18
MS formats only have support for Table and Cell fill. Interestingly, MS Word doesn't let the cells inherit from the Table fill setting, so that value also needs to be written out into every cell. Since Word apparently ignores the table color, I didn't bother trying to search out how to export that in DOC format. (I did add it to DOCX since it was so easy to find.) Change-Id: I8946f07b45f72fed5959369182882a7bf013b1d0 Reviewed-on: https://gerrit.libreoffice.org/59281 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit b576ab5073a8cdf5ca2db04838d255e142f5a896) Reviewed-on: https://gerrit.libreoffice.org/59287 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-25Related rhbz#1618703: Properly handle failure encoding MS fileStephan Bergmann6-18/+42
...when e.g. FIPS mode makes EncryptRC4 (in sw/source/filter/ww8/wrtww8.cxx) fail, but which hadn't been propagated out to SwWW8Writer::WriteStorage (in sw/source/filter/ww8/wrtww8.cxx) Reviewed-on: https://gerrit.libreoffice.org/59518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 229340812f6e6cc8c868915055583f60c82a8cf3) Conflicts: sw/source/filter/ww8/docxexport.cxx ...plus cherry-pick of follow-up 8114f976b897c4717368146a49d5404ef970c77a "coverity#1438527 Nesting level does not match indentation" Change-Id: I1123136ce1a25e181a0a27486954621a2dd095ea Reviewed-on: https://gerrit.libreoffice.org/59572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-23tdf#116370 cleanup Writer idle job handingJan-Marek Glogowski4-16/+16
This prevents the start of the idle job, while processing itself, so the fixed WinSalInstance::AnyInput of commit 3bf6c97029d2 ("tdf#112975 WIN correctly handle VclInputFlags::OTHER") won't report the timer events of the re-started idle job to process. Fixes the early abort of the background job, which resulted in the busy loop of the reported bug and this strange printing behaviour. P.S. I'm not sure, why this was just broken on Windows. Change-Id: I6503dcd925c9a0ed843e794a31eea32a4a4b2889 Reviewed-on: https://gerrit.libreoffice.org/59279 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 401cba4c20fbc930f034168872642428d7459218) Reviewed-on: https://gerrit.libreoffice.org/59315 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-22tdf#119294: reimplement fix for tdf#118859Mike Kaganski1-17/+32
When removing paragraphs with mail mere fields, both field type reference and node reference could get invalid, because field type will be destroyed when its last field is gone; and node will be destroyed if it is in a fly with anchor in another node which gets destroyed. To avoid use-after-delete, we will use an SwClient on field types, thus detecting if a collected field type got destroyed; iterating over fields using SwIterator is safe, because removing a node with fields would update the iterator. Change-Id: Id8b555ef7015b13ab70ebb41845d34c477ac6b31 Reviewed-on: https://gerrit.libreoffice.org/59164 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit c883d5e073d2ac5b2d55126c929d7bf3e6d295e8) Reviewed-on: https://gerrit.libreoffice.org/59175 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-20tdf#118385 Avoid crash on loading documentSzymon Kłos1-1/+1
Change-Id: Ifb18fee79667a5d0284407e84877b0d4d89536d9 Reviewed-on: https://gerrit.libreoffice.org/59173 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 308fbd8cdf9ce0fc3921b6c4c58707609b486fb9) Reviewed-on: https://gerrit.libreoffice.org/59247 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-20tdf#117086 crash on deleted SwFootnoteBossFrameCaolán McNamara1-0/+4
use SwFrameDeleteGuard to lock pOldBoss to exist over the range its directly accessed Change-Id: I68af80114a380f68b86cbc78278fb9e5e87cccce Reviewed-on: https://gerrit.libreoffice.org/59113 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-20ofz#9917 use a WW8SprmIter to find the sprmCaolán McNamara2-27/+14
extend WW8SprmIter to support the needed paramater match feature and drop the custom WW8PLCFx_SEPX::HasSprm logic Change-Id: I5893e04402ed03493add398f0939a578807561ef Reviewed-on: https://gerrit.libreoffice.org/59119 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-20tdf#119224 start and end are expected to exist for the scope of this functionCaolán McNamara1-3/+5
Change-Id: I771bce68a2ac923af6a7d54646a2c59ce6f10f7e Reviewed-on: https://gerrit.libreoffice.org/59179 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-17Resolves: tdf#119013 do not over-aggressively reorder date particlesEike Rathke2-4/+4
In particular not when reading documents as we don't know what the original (default/system) locale was when the date format was created and stored and whether the format's date order actually matched the locale's ordering. Regression from commit 51478cefaa4e265b42e3f67eda0a64767ff3efba CommitDate: Tue Apr 18 17:01:27 2017 +0200 Resolves: tdf#107012 follow date order of the target locale Change-Id: I9d3bdbd512d95ed81ff6459e368a2d7497ec8a2d Reviewed-on: https://gerrit.libreoffice.org/59182 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 5b8007afdb97d416ee7c22bf9226e927d61e9bd3) Reviewed-on: https://gerrit.libreoffice.org/59215 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-17insert->envelope->printer->setup crashesCaolán McNamara1-1/+1
Change-Id: I06d91941eaab0f622b384e9b3379d033890fd92f Reviewed-on: https://gerrit.libreoffice.org/59185 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-16tdf#119252: Revert "Remove < USHRT_MAX check that is presumably no longerStephan Bergmann1-3/+3
...needed" This reverts commit 4a61006255c67bb6f9ac99107093a424a9de441e, as it turns out to actually break things. I'm not quite sure how I came across that code and the attempted fix back then, but at least ASan+UBSan `make check` still works after the revert (and UBSan seems the most likely reason I came across this). I know too little about that Writer table layout code to know whether the original code is actually good, or would need some other fixing, so lets just revert for now. Change-Id: I1e88372a3b688a5fdd4c1bf88033b51287195799 Reviewed-on: https://gerrit.libreoffice.org/59002 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit d9c312d1917bc039bb0354c8c3f5c9dbbb758cf1) Reviewed-on: https://gerrit.libreoffice.org/59039 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-08-16tdf#118058 sw, sections in tables: no split for multiple columnsMiklos Vajna1-1/+15
The original use-case was "group a few paragraphs together" for the split sections inside tables, i.e. it's safe to not split when the section has multiple columns. And the multiple columns case would mean that we don't find where to put the follow section inside a table, resulting in a layout loop. (cherry picked from commit d2d996db4806e84ae0bf6aef1c285b498f2d2867) Conflicts: sw/qa/extras/layout/layout.cxx Change-Id: Ifab220e582439d2e757b5645f3167b55a051a379 Reviewed-on: https://gerrit.libreoffice.org/58983 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-08-16ofz#9908 validate no negative editengine selection positionsCaolán McNamara1-1/+3
Change-Id: I37dace2051518224c55756362facd3edba4a9571 Reviewed-on: https://gerrit.libreoffice.org/59059 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-08-15outer loop unrelated to inner loopCaolán McNamara1-30/+17
since original checkin of... commit 9cddf9da7fb256418e1bc3b4719abb55e3b0604c Date: Tue May 22 15:33:44 2007 +0000 INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED ... 2006/12/13 12:31:03 tl 1.1.2.38: #i71244# update charts in writer where I think this LockUnlockAllCharts chart2 loop was modelled on the previous chart[1] styles loop of e.g. DoUpdateAllCharts which loop over tables. chart2 objects are unrelated to these tables, so remove the outer loop, which then means the ofz#9689 ofz#9856 ofz9874 crashes that made me look at it will get fixed Change-Id: I7d7ba0a2aa257b5aa399f20d902f01306fbaecff Reviewed-on: https://gerrit.libreoffice.org/59111 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2018-08-15tdf#117127 crash on inspecting value describing a tableCaolán McNamara1-10/+12
since... commit f86d0413f7cedf096b285c2eb6698653dd99c21e Date: Mon Mar 30 01:26:21 2015 +0200 SwXCellRange:: and SwXTextTable::getDataArray() do the same which used to have more checks than its replacement Change-Id: Id931882ef7c749ffa18ef3474e3e661ba8614ab0 Reviewed-on: https://gerrit.libreoffice.org/58977 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-14tdf#119130 only have the active postit as a dialog control...Caolán McNamara3-3/+12
in which pressing ctrl+tab cycles between text and button so we don't waste time searching thousands of SwAnnotationWins Change-Id: Iba34882c6588fc9414004f0ed3b2b779f77b30d1 Reviewed-on: https://gerrit.libreoffice.org/58683 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-13Reslves: tdf#119212 sort character setsCaolán McNamara1-0/+2
and save useritem Change-Id: I92f00bd982ab00571148c0e74cd9c8772451a246 Reviewed-on: https://gerrit.libreoffice.org/58922 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-08-10forcepoint73 deleted SwAnchoredObject still referenced in TmpConsiderWrapInflCaolán McNamara6-19/+42
Reviewed-on: https://gerrit.libreoffice.org/58760 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 6d0ea082889c89eb8b408779f2de08da7441ff54) Change-Id: If255723834d049865fcf6fd0eac7768dfcbad2a1 Reviewed-on: https://gerrit.libreoffice.org/58768 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-08tdf#117553 Change navigate behavior when in footnote frameJim Raykowski1-0/+16
This patch changes navigate behavior to move to prev/next footnote text when in footnote frame. Change-Id: If206098d8817b74ab484a1039371c058d321fda2 Reviewed-on: https://gerrit.libreoffice.org/54195 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 215e5adf4977a175bb8cc89dcbd48ef443ac8f10) Reviewed-on: https://gerrit.libreoffice.org/58304 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-07tdf#118859: Avoid trying to remove already removed nodesMike Kaganski1-16/+18
Regression from commit db04be037b611e296ef9f2542322c52ed82d7a2b Change-Id: I530c00f6357b4822654add6e5f2eecb3252b88ae Reviewed-on: https://gerrit.libreoffice.org/58612 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 576fac6f6199a87fb07e4a067abaa18c89b6d7ea) Reviewed-on: https://gerrit.libreoffice.org/58619 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-07tdf#109137 sw textbox: fix initial wrap type of a shape's textboxMiklos Vajna1-0/+2
This was already working for the DOCX import by luck. Make the wrap type explicit, so the ODF import has it correctly. The wrap type for the hidden sw text frame ("textbox of a shape") should be always "through", wrapping is only performed for the surrounding draw shape. (cherry picked from commit 59f5f666a5085ae58a8dd164636a6bea47e6bddc) Conflicts: sw/qa/extras/layout/layout.cxx Change-Id: Ice28cd5b517d544cfab4900dee32f01b534fee26 Reviewed-on: https://gerrit.libreoffice.org/58671 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-07forcepoint#70 give all escher client data objects a common parent classCaolán McNamara3-4/+4
and make NotifyFreeObj a virtual method of SvxMSDffClientData, finding the sc case where the client data was neither SvxMSDffImportData nor ProcessData. make the sc case a XclImpDrawObjClientData whose NotifyFreeObj is a noop Change-Id: I07422e7a3415114674bb1e3c1ef120299adf2dc8 Reviewed-on: https://gerrit.libreoffice.org/58552 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>