summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2018-10-28ofz#11125 pass param len aroundCaolán McNamara2-11/+38
Change-Id: I4b382271df21c58de0e102af6e0b07a88a1d9610 Reviewed-on: https://gerrit.libreoffice.org/62448 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-27tdf#120188 limit the width of the styles combos in the url tabpageCaolán McNamara1-0/+5
Change-Id: Idcc4043b70c30ccc693c9c5ac983bfabe0573862 Reviewed-on: https://gerrit.libreoffice.org/62353 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-26permissionIdAndName is empty in permission-for-user caseCaolán McNamara1-11/+2
merge the two identical branches and make it do what it probably wants to do Change-Id: I38390a18fcd90349c6bd86f14c67850166b6aeaa Reviewed-on: https://gerrit.libreoffice.org/62043 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-25editeng: do not throw from QueryValue implementationMichael Stahl1-0/+6
None of the other QueryValue throw; in case of a problem they return false without initialising the Any. On the one hand, it would be useful to throw an exception for this special property that has now become Write-Only, so that API users get a better hint what is going wrong; on the other hand, it breaks various other things like the various multi-property interfaces that call QueryValue for multiple items (there are 3 such loops in SwAccessibleParagraph alone). (throw was introduced in 7a8ed362eb163ac15a000ba1cfc74b58315800a1) It turns out there is even a test for the exception on ToX. Change-Id: Id60ff43544f7399ce869227bfd6fb933dbaea3be Reviewed-on: https://gerrit.libreoffice.org/61719 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/62331
2018-10-20ofz#10994 move the reset of trailing fly paras to before redline processingCaolán McNamara1-3/+3
Change-Id: I906c29848acc3917f76cb8c21e0bd581e0ded421 Reviewed-on: https://gerrit.libreoffice.org/61821 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-10-19tdf#112520 RTF export: write ZOrder only for toplevel shapesMiklos Vajna4-3/+32
RTF export at the moment exports children of group shapes as a flat shape list. This means that the order inside the group shape is not relevant for the toplevel ZOrder, so just don't write it. (cherry picked from commit 2b920bdc12f3bf3a196ec0d6d59043a68e663e33) Change-Id: I870707cb28c2f177c0e5d9cf5328260e76b661f3 Reviewed-on: https://gerrit.libreoffice.org/61904 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-18Resolves: tdf#120003 missing prefix to link url in .doc importCaolán McNamara1-4/+30
regression from... commit 9b77f8142bf665a47c3a179e3fe3f82623a99f8a Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Apr 6 15:08:45 2017 +0100 ditch ReadRawUniString three argument lclGetString32 variant mistaken for two argument lclGetString32 variant Change-Id: I163aad0de7873487d9f9c8b6c28d162159fe7ad4 Reviewed-on: https://gerrit.libreoffice.org/61887 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2018-10-17tdf#119885: OOXML import: try to get cell paddings as Word doesMike Kaganski3-11/+13
Change-Id: I7abd715b6bb71d6e2e01939c4cf849d94eb6a103 Reviewed-on: https://gerrit.libreoffice.org/61843 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/61877 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
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-10-04tdf#119599 RTF import: fix missing deduplication of font sizeMiklos Vajna2-0/+17
Deciding when to and when not to deduplicate repeated direct formatting of paragraph / character properties is stricky, this bug is about a case when deduplication should happen and did not, since commit 1970a686273c5d4fc1eeb4430283e37085d9f647 (tdf#113408 RTF import style dedup: separate paragraph and character handling, 2017-10-31). Especially that deduplication works in both directions: it should remove properties which are duplicated and also should insert explicit default values for not repeated properties. Fix the problem by making the getDefaultSPRM() aware of the context (which style type it deals with), and then by making sure that only default properties relevant for the given style type are inserted. (cherry picked from commit 49614a9ea971ff7f370f863ce8a2735aab973cee) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx writerfilter/source/rtftok/rtfsprm.cxx Change-Id: I35b6599cc47fa51b8754fd921c61a3b31a283547 Reviewed-on: https://gerrit.libreoffice.org/61237 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-10-01tdf#105444 DOCX import: don't put extra paragraphs in commentsLászló Németh3-9/+10
on Win32, waiting only for \r\n instead of \n in RemoveLastParagraph(). Change-Id: I8921a6a72e8397ed04edb9f339ba3f0bf5bbb98b Reviewed-on: https://gerrit.libreoffice.org/60865 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit bdade7e3fc33c1832c6f6a472443fca8238738d2) Reviewed-on: https://gerrit.libreoffice.org/60896
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 Stahl2-25/+34
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 listener registration of sw::UnoCursorPointerMichael Stahl1-1/+5
Listening at one SwUnoCursor at a time is enough; this triggers asserts added in 1925a57dee73933ffbdb3b57349b757470a8218a from SwNavigationMgr. Change-Id: I791355533214daeb1779cd7d1a6aac7faa1a1472 (cherry picked from commit 503f07caa904ba375e390ad87640115866c3db05) Reviewed-on: https://gerrit.libreoffice.org/60746 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-20tdf#118502 Fix loading of eps images with replacement graphicSamuel Mehrbrodt2-0/+10
Change-Id: Iaf9c8e2ed72115e1f82d2541ae2a1d4803795a46 Reviewed-on: https://gerrit.libreoffice.org/60754 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2018-09-20tdf#64264 DOCX import: fix row count of repeating table headerLászló Németh2-0/+17
by ignoring isolated tblHeader settings, according to the standard. (OOXML 17.4.49 tblHeader (Repeat Table Row on Every New Page) "...if this row [with tblHeader property] is not contiguously connected with the first row of the table (that is, if this table row is not either the first row, or all rows between this row and the first row are not marked as header rows) then this property shall be ignored.") Note: with this fix, in a mixed environment, LibreOffice is able to fix the known problems of MS Word 2013/2016 by removing the isolated tblHeaders during DOCX import/export (such problems in MSO: missing repeating headers in a few pages or in the whole table, despite the correct settings; and non-modifiable repeat header row property in the table settings). Change-Id: I73e8394a75b77c937a4bac37d99ff747ad95a06e Reviewed-on: https://gerrit.libreoffice.org/60765 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit ace6bbf3da9ae27aca87865b6be887a3aed341fc) Reviewed-on: https://gerrit.libreoffice.org/60790 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-19tdf#112356 follow-up: Make the Help button workAdolfo Jayme Barrientos1-0/+1
Change-Id: I7181e07f8d817dd402eec8bd98e8526503455f5e (cherry picked from commit fee5b79543de5e35299b1e3576209c77ef64a4d6) Reviewed-on: https://gerrit.libreoffice.org/60751 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-09-18tdf#118691 DOCX import: fix table loss caused by <w:cr>László Németh2-0/+12
According to the OOXML standard, <w:cr> (carriage return – Unicode character 000D) is equivalent to a break with null type and clear attributes, so we handle it as a <w:br/>, instead of endOfParagraph, fixing losing table paragraphs and tables containing <w:cr/>. Note: It seems, MSO cannot handle carriage return characters in table cells correctly. It shows squares (unknown characters) without line break there. Copying this text to a non-table paragraph in MSO, we get the correct layout with line breaks. Copying this text with carriage return characters back to a table cell, we get squares again. With this LO fix, it will be possible to fix the bad tables edited by MS Word by using LO, because LibreOffice import/export converts all <w:cr>s to <w:br>s (as before, but now without destroying the structure of the tables). Change-Id: Iee42f71e9a00531353582e7127c2c212ea0890d0 Reviewed-on: https://gerrit.libreoffice.org/60585 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit f63a60f56156e4ac17887e6c96d15fb865a2a8eb) Reviewed-on: https://gerrit.libreoffice.org/60655 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-18tdf#119875 sw: fix invalid pos of frame after 0-sized section with laycacheMiklos Vajna3-4/+39
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-11tdf#109229: Set "TextBox" prop before filling textbox-related propsMike Kaganski2-0/+23
Otherwise those properties aren't set, and defaults are used Change-Id: Ib6671c019ff652ec5b59d9cbbf02a4e536a17817 Reviewed-on: https://gerrit.libreoffice.org/60267 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit c3422cd205d8da852f5c310b5f08028d6c4c5eb4) Reviewed-on: https://gerrit.libreoffice.org/60299 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
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-06fix duplicate-mnemonic + no-labelled-byCaolán McNamara1-1/+1
Change-Id: I6d3637bc18317e0ed36c6b477cb8b46aba3c2abc Reviewed-on: https://gerrit.libreoffice.org/60023 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-05tdf#119152 Hide Text Direction dropdown from Columns tab by defaultGabor Kelemen1-1/+1
To restore behavior seen before 6.1 Change-Id: I7dd6b566b4964298a3e08c6c6dd663f87857d038 Reviewed-on: https://gerrit.libreoffice.org/59479 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 4f3dec1104a21d93d400c76ab0ae85083aec8492) Reviewed-on: https://gerrit.libreoffice.org/59955 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
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 Vajna3-1/+41
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 Vajna5-0/+147
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 Kaganski7-22/+115
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 Luth3-5/+39
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-30Resolves: tdf#118382 crash on paste of rtfCaolán McNamara2-5/+12
into an existing document since.... commit deaa16bd24fba4a3a6b072ab2b94542a7dbd41c6 Author: Serge Krot <Serge.Krot@cib.de> Date: Mon Jan 29 12:17:06 2018 +0100 tdf#72942 Do not overwrite styles from the inserted doc During inserting of the text from the external document we should not change original default styles in currently opened document. because missing styles aren't created, so there's exceptons thrown on their use. I see that the m_bIsNewDoc flag is already checked for since... commit 5ebe826caf75e8d00656b3333385bf0bbc05cb27 Author: Miklos Vajna <vmiklos@collabora.co.uk> Date: Fri Oct 4 11:02:59 2013 +0200 fdo#69384 fix impress -> writer copy&paste Regression from 2ade07126971b79c92f729fae5709f2e2e2b495c (fdo#62044 RTF import: don't overwrite existing styles when pasting, 2013-06-04), during paste, if existing style was found, then the intention was to skip that style, but instead we tried to create one. in the body of the following loop, which should mean that existing styles are left alone and only missing styles created if we remove this hunk of the tdf#72942 commit Change-Id: Ia4aedb5e309c991490656061aa20d11ff24f4f9e Reviewed-on: https://gerrit.libreoffice.org/59519 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 1f1e349bbee1b2bff01a850d9a7fe4d6a77c4f29) Reviewed-on: https://gerrit.libreoffice.org/59636 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-29tdf#119458 reorganize sw background Idle handlingJan-Marek Glogowski3-26/+36
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 Luth4-1/+42
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 Luth3-18/+31
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 Glogowski5-35/+37
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>