summaryrefslogtreecommitdiff
path: root/sw/source/filter
AgeCommit message (Collapse)AuthorFilesLines
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 Vajna2-3/+11
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 Kaganski1-9/+0
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-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-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-17SOSAW080: Derive SdrObjGroup from SdrObjListArmin Le Grand7-57/+6
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-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-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-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-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-17Resolves: tdf#119013 do not over-aggressively reorder date particlesEike Rathke1-1/+1
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-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-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>
2018-08-07forcepoint#69 ditch any unclosed m_pPosAfterTOC before dropping cursorCaolán McNamara3-5/+4
Change-Id: I6b56a48f5449b25fe3bdc2e02d3885388b0da74f Reviewed-on: https://gerrit.libreoffice.org/58497 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-07-26related tdf#63561 docx: styles inherit tabstops tooJustin Luth1-1/+5
Add import and export support for style-parent tabstop inheritance. This patch is dependent on GetPropertyFromStyleSheet commit 39171b82b245a7589b9258337a18d6dd281f8ed2 Change-Id: I0245d0e08f140b6cb473c96cffa6f5a4ceff8944 Reviewed-on: https://gerrit.libreoffice.org/57278 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-on: https://gerrit.libreoffice.org/57759 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-25tdf#63561 docx export: "clear" unused inherited tabsJustin Luth1-22/+20
If a style contains tab definitions, then the paragraph inherits these. They are added to any tabs defined at the paragraph level. Unwanted inherited tabs must be explicitly removed. (TODO: LO ought to be inheriting from ALL parents, so the same logic ought to apply to a style's parent tabs, but currently LO does not import that way. So the proof unit test looks different in MSO compared to LO.) Change-Id: Ida8ed2792482655d512c753fdff8d02062d895a8 Reviewed-on: https://gerrit.libreoffice.org/57255 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 859a0389b5639397e9c46cd4828a35793bd194f8) Reviewed-on: https://gerrit.libreoffice.org/57267 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-24forcepoint#51 anchor location deleted before graphic anchor processedCaolán McNamara1-1/+5
try deferring to after anchor stack is cleared Change-Id: Iaa42d19635968d1656e171a7e0c5e473879cd8f3 Reviewed-on: https://gerrit.libreoffice.org/57776 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-07-19tdf#118579 ignore body in body instead of flagging as an errorCaolán McNamara1-3/+1
Change-Id: Ie6626a320a5264aea004f7c57244643798703de8 Reviewed-on: https://gerrit.libreoffice.org/57653 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-18put load of html images (to measure dimensions) under referer controlCaolán McNamara1-1/+15
Change-Id: I1de4a5214ef48394dcafa97e4ea12bb460f2fba2 Reviewed-on: https://gerrit.libreoffice.org/57566 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-07-18tdf#107690 OOXML import/export of setting "Open as read-only"László Németh1-1/+3
Import custom document property _MarkAsFinal as LoadReadonly setting, export LoadReadonly as _MarkAsFinal in DOCX, XLSX and PPTX documents. Before this fix, LibreOffice opened read-only OOXML documents as editable, also saved and exported _MarkAsFinal=true silently, resulting unintented read-only warning info bar in MSO. This commit improves interoperability a lot, because this is a basic document protection of MSO, recommended on its UI. Note: LoadReadonly (on File->Properties...->Security, property "Open file read-only") doesn't show "Edit read-only" info bar from commit 630186ff4e0eba7317e542f8c3eca39ebd068721, but it's still possible to switch on editing by Edit->Edit Mode. MSO shows info bar for _MarkAsFinal. (There is an advantage to hide the info bar in LibreOffice in a mixed environment, to avoid overwriting of press-ready MSO files by LibreOffice.) Note 2: Other differences of LoadReadonly in LO and _MarkAsFinal in MSO: (1) Switching on editing doesn't remove the LoadReadonly property automatically in LO. (2) Saving with LoadReadonly doesn't switch off editing of the actual (still opened) document in LO. (cherry picked from commit 9a5c56a9c4e04589b0a6bb710573922e459d9685 and bbdb6cb8ed0d77eeb2e413b38f29d2084bd8257b (unit tests)) Change-Id: I79897605e1fabe0708cce0b0c6216c152b201fc9 Reviewed-on: https://gerrit.libreoffice.org/56752 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-16tdf#118702: partially revert the fix for tdf#78907Xisco Fauli1-1/+0
This is a regression from 2df0d9d32d05f08ccf673fd0f61f650438511acb Reverting it as the unitest from tdf#78907 still passes. Besides, adding a new unittest for tdf#118702 Finally, adapt ooxmlexport9 and remove pointless assert which fails with: ooxmlexport9.cxx:557:Assertion Test name: testBnc519228OddBreaks::Import_Export_Import equality assertion failed - Expected: <Any: (void)> - Actual : <Any: (string) Converted2> Failures !!! Run: 155 Failure total: 1 Failures: 1 Errors: 0 Change-Id: I486e9489ef6c3978cbcf90f3b9885248f4f92110 Reviewed-on: https://gerrit.libreoffice.org/57338 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit b0e2dbca5164c494a669bd48f8ff058f4c1ad710) Reviewed-on: https://gerrit.libreoffice.org/57389
2018-07-11tdf#86371 sw export: SvxInterLineSpaceRule::Off == single spacingJustin Luth1-2/+2
This affects doc/docx/rtf exporting. Ultimately, this was due to the way the UI works. When you select Single, it just turns spacing off, but doesn't reset the proportional value. If instead of choosing single, you change the proportional percent to 100, then you wouldn't see this problem. I can see why this could be useful in the UI (allowing them to remember the previous proportional value) although it doesn't use it right now... Because it is all based on sw internals, it would be very difficult to create a unit test - not worth the effort. Change-Id: Id17a42878f73266e19219bcd88e2decdaf3b72f2 Reviewed-on: https://gerrit.libreoffice.org/56749 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 59fe3d7d231e4acb0635ac899a0ab2dee6c59289) Reviewed-on: https://gerrit.libreoffice.org/57080
2018-07-10tdf#118412: DOC incorrect bottom page marginLuke Deller1-1/+1
Fix a silly typo when determining if the page has a bottom margin Change-Id: I96857951725d00978c43d850d0e1bc64ab61d965 Reviewed-on: https://gerrit.libreoffice.org/56602 Tested-by: Jenkins Reviewed-by: Luke Deller <luke@deller.id.au> (cherry picked from commit 9f331575ad8d371c95a18e33a245d404e873ca8a) Reviewed-on: https://gerrit.libreoffice.org/57055 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-03tdf#107969: use proper serializer for VML in footnotes/endnotesMike Kaganski1-0/+6
Change-Id: Ie0e062fab0ae1a63094655cc0f6bee958b4c1087 Reviewed-on: https://gerrit.libreoffice.org/55978 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit c67b7d795589aaf8f3396a379ef348bd650cb2dc) Reviewed-on: https://gerrit.libreoffice.org/56754
2018-06-30tdf#118421 ww8export: rotate vertically: not Lines or groupsJustin Luth1-1/+2
Lines and Groups often are exceptions. Normally, the import code swaps vertical rotations also. In the case of lines (from the tests that I observed) lines don't have a rotation value at that point during import, so no correction is made. Grouping always messes things up. Change-Id: I344c5a29f887294b751ffc87c01b30e472cfb4c2 Reviewed-on: https://gerrit.libreoffice.org/56595 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 1cedd88d40a26a55ce433f8b742215aea83a5382) Reviewed-on: https://gerrit.libreoffice.org/56654 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-25tdf#103913 keep ".emf" file extension and mime typeLászló Németh1-17/+2
in documents, don't change them to wmf and image/x-wmf silently, resulting for example, dropping or rejecting modified documents by firewall packet filtering. Reviewed-on: https://gerrit.libreoffice.org/56045 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry-picked from commit 4cb1e86e5217f09e1d98e51e46803a06fb72f5ce) Change-Id: I3b8634ae022c7c026b0ed4ebc345c1c3b3f96337 Reviewed-on: https://gerrit.libreoffice.org/56080 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-18tdf#70838 ww8export: rotate shape vertically = swap width/heightVictor Mireyev1-0/+10
During import, rotation past 45 degrees swaps height and width in SvxMSDffManager::ImportShape, so exporting needs to do the same. restored from abandonment and corrected by Justin Import also adjusts TopLeft position, but position seems to generally be set by other factors on export. Prefer to have an example proof document and not just guess since it seems that position is affected by many factors. Therefore, not doing anything about the position in this commit. Change-Id: I4d67ab0e0da296956190aed3468e0c98f29795b9 Reviewed-on: https://gerrit.libreoffice.org/53902 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Jenkins (cherry picked from commit c14911a80e3b6e66439b1d569e7cd558c6010864) Reviewed-on: https://gerrit.libreoffice.org/55902 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-14Fix top margin in DOC import for tdf#117885Luke Deller1-5/+11
When calculating the height of the top/bottom margin, we take into account whether the DOC section has a header/footer enabled. If the DOC section contains only a first-page header/footer, and the display of first-page header/footer in this section is not enabled, then we must consider the section to have no header/footer. (Also add a test case using the doc supplied by the reporter in tdf#117885) Change-Id: I8040298a2953b3f3fe8dd80bfd62db2304db938e Reviewed-on: https://gerrit.libreoffice.org/55135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 6c68e52532d45c97a83b2396bd40c98ade9b5bb4) Reviewed-on: https://gerrit.libreoffice.org/55465 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2018-05-23tdf#117505 RTF export: fix incorrect header distance for first/follow pagesMiklos Vajna3-1/+15
In case the first and the follow page format has different header distances, the DOC and DOCX import work with the distance from the first page format when they take the last item from the MSWordSections container at the end of the export. RTF writes section info before the document content, and in case there are separate first and follow page formats, then we work with the follow format since commit 20a53cb9e9c7b797c091fe6ac6a34dfb28c61304 (INTEGRATION: CWS limerickfilterteam08 (1.16.32); FILE MERGED, 2003-09-01) as a fix for i#13107. There is no perfect solution here, the sw doc model can store different header distances for first and follow pages, while Word works with a single distance. But RTF/DOCX/DOC import puts the relevant header distance to the first page format and DOCX/DOC export reads the distance from there, so be consistent and do the same in the RTF export as well. This means the DOCX import -> RTF export -> RTF import sequence from the bugreport will result in a correct header distance. Change-Id: I3f1fe3080360702c41d680b8785cc3602e74685e Reviewed-on: https://gerrit.libreoffice.org/54680 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-22ofz#8442 Integer-overflowCaolán McNamara1-2/+7
Change-Id: I8d09ce583abac38420646b60b83f56e02eb48cab Reviewed-on: https://gerrit.libreoffice.org/54656 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-22sw: prefix members of WW8StyleMiklos Vajna3-92/+92
Change-Id: Ib42250d293b7dc5ae5f4dca8687d8052db8da21e Reviewed-on: https://gerrit.libreoffice.org/54653 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-21sw: Ask current datetime only onceTakeshi Abe1-2/+3
Change-Id: I99bed9a09ed1701ce441ddb0a19b5259ab37f135 Reviewed-on: https://gerrit.libreoffice.org/54621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-20tdf#35798: Hide empty Database fields' paragraphs (+ compat option)Mike Kaganski1-0/+26
With this change, Database fields that expand to empty values behave as if they are "Hidden Paragraph" fields. A compatibility option to enable this behaviour is added. The option is enabled by default, and for any non-native documents (for compatibility with other office suites). For existing (F)ODT documents, the option is disabled for those documents that don't have this setting set, to keep the layout of legacy documents. Change-Id: Ic5e8cb15a3a7d1a765a984eef4b0d97666df7dfd Reviewed-on: https://gerrit.libreoffice.org/54552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-05-15cleanup my asserts before branching - they served their purposeJustin Luth1-2/+0
Change-Id: I933ac25dac8d7a20d62535af9690b17503fc159d Reviewed-on: https://gerrit.libreoffice.org/54086 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-05-12silence Werror=class-memaccessCaolán McNamara1-1/+1
Change-Id: I2deac7b7df8d6b099a52b4e9e82ee0dd0c390c16 Reviewed-on: https://gerrit.libreoffice.org/54149 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-10move Java from config_features to already existing config_javaRene Engelhard3-3/+3
Change-Id: I085fab2bcdc5910d1386fc20768fe7063ce3e28e Reviewed-on: https://gerrit.libreoffice.org/54071 Reviewed-by: Rene Engelhard <rene@debian.org> Tested-by: Rene Engelhard <rene@debian.org>
2018-05-10Fix IntelliSense errorMike Kaganski1-0/+1
Change-Id: I521763230761cd408226b0e6ca08889fb6660fb0 Reviewed-on: https://gerrit.libreoffice.org/54062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-05-09Fix some IWYU warningsMiklos Vajna4-7/+31
Change-Id: Iab61e0a7cac2dc89e6b04875a62894b181aa0ff4 Reviewed-on: https://gerrit.libreoffice.org/54016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-08tdf#116977 secured ::Clone methodsArmin Le Grand1-1/+3
Renamed SdrPage::Clone -> SdrPage::CloneSdrPage Renamed SdrObject::Clone -> SdrObject::CloneSdrObject Giving SdrModel is no longer an option, but a must (as reference). This makes future changes more safe by force usage to think about it. Also equals the constructors which already require a target SdrModel. Done the same for ::CloneSdrPage. Change-Id: I06f0129e15140bd8693db27a445037d7e2f7f652 Reviewed-on: https://gerrit.libreoffice.org/53933 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-05-07sw HTML export: ensure <li> is not closed before list item contentMiklos Vajna1-1/+2
Seems to be a regression from commit c30cf5a3d7902018b0a752fa2060b8f2a2caafc2 (sw html: use HtmlWriter in htmlatr in some places, 2014-03-16). Change-Id: If03b77a43cb2f7d1c9c9c62da7eef9ee9c2b5e91 Reviewed-on: https://gerrit.libreoffice.org/53937 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-07sw: prefix members of WW8RStyleMiklos Vajna4-147/+147
Change-Id: Ibc64cdc44d170af11479db47c309faac5665daec Reviewed-on: https://gerrit.libreoffice.org/53927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-05Fix typosAndrea Gelmini1-1/+1
Change-Id: I92078fdece135754744d85424956dbb071f3899e Reviewed-on: https://gerrit.libreoffice.org/53638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-04tdf#117171 DOCX export/import of cardinalText, ordinalTextLászló Németh1-0/+3
and ordinal (indicator) numbering styles. Change-Id: Ia4030c8a170bad67e0b52ec685a49faa77552ccf Reviewed-on: https://gerrit.libreoffice.org/53831 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2018-05-01ofz#7002 Direct-leakCaolán McNamara2-2/+9
Change-Id: I7a4a00663498fe600e8dace95c60210a9f006a6f Reviewed-on: https://gerrit.libreoffice.org/53696 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-01set Referer on link mediadescriptorCaolán McNamara1-3/+8
to allow determining if the source document is from a trusted/untrusted location Change-Id: I780568652d2ef0cc8543c27ba26289277b5d9d0c Reviewed-on: https://gerrit.libreoffice.org/53689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-28loplugin:countusersofdefaultparamsNoel Grandin3-3/+3
Change-Id: I84868b3115c534a8240394283cc3beedf8cb3a80 Reviewed-on: https://gerrit.libreoffice.org/53543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>