summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapperTableManager.cxx
AgeCommit message (Collapse)AuthorFilesLines
2020-07-21tdf#134709 writerfilter: consider gridAfter for table bordersJustin Luth1-3/+1
When the table itself defines borders, those borders should apply to the last cell in each row - even if some grids are skipped with gridAfter. (i.e. it won't be a straight line on the right side). This commit depends on an earlier commit doing this for gridBefore. Prior to this, gridAfter was never actually sent to DomainMapper, so it was always at its initialized value of zero, and it was only handled in the ooxml handlers. So the bulk of this patch is setting up the foundational parts of gridAfter - duplicating what was recently changed in LO 7.1 for gridBefore. Change-Id: Ieaf965fecf618eeaf41c7e8403b536c396138804 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98692 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-11NFC writerfilter: cleanup gridAfter dead codeJustin Luth1-3/+3
Since commit 1d1748d14 in 2016, DomainMapper has never processed property LN_CT_TrPrBase_gridAfter, and so it has always been its initialized value of zero. However, gridAfter still DOES create fake cells in ooxml. With recent changes, those fake cells are now included in nGrids (i.e. they have a gridspan of 1) and so the nGrids + m_nGridAfter would no longer be appropriate in case gridAfter is ever processed again with + <ref name="CT_DecimalNumber"/> - <ref name="CT_TrPrBaseGridAfter"/> The row SHOULD know about gridAfter, so I'm not removing the foundational bits, even though they are currently still unused. Change-Id: I9b8b1006d528590c4621ce86564e007399b07d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98533 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-08tdf#129452 writerfilter: preserve gridSpans longer than currentRowJustin Luth1-32/+10
It is a fairly common thing for table operations to compare items in the same column (like merged cells for example). In order to determine column information, each row's (gridBefore - change-id Ie305477f0e3468a4a923095d76f520d97fe99ffe - and) merged cells need to be known. So save that information in the cell data - and don't just throw it away after the current row has been analyzed. Good grief. Change-Id: Ibfdac336bbb1f7303c7e585a85c94be37ad6f916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97433 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-07tdf#129452 writerfilter: preserve gridBefore longer than currentRowJustin Luth1-19/+7
It is a fairly common thing for table operations to need to compare items in the same column (like merged cells for example). In order to determine column information, each row's gridBefore (and merged cells) need to be known. So save that information in the row data - and don't just throw it away after the current row has been analyzed. Good grief. Change-Id: Ie305477f0e3468a4a923095d76f520d97fe99ffe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97432 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-02tdf#133735 DOCX: fix paragraph settings of nested tablesLászló Németh1-0/+3
First row of a nested tables lost its paragraph settings, by dropping the collected paragraph data of the unfinished row. Regression from commit 81ce88aa80f8e7cde4fdc5b211e9500a3599643c (tdf#132514 DOCX import: fix lost table style with footer) Change-Id: I17d81d0906f424fe35237ac285e8ad27090bcab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97645 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-03loplugin:simplifypointertobool improveNoel Grandin1-2/+2
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin1-3/+3
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-04tdf#132514 DOCX import: fix lost table style with footerLászló Németh1-0/+17
Table paragraphs collected for table style processing were mixed when both body text and footer contain tables, i.e. clearing paragraph vector at processing the first table resulted missing paragraph vector and table style processing for the other one. Now tables in footer, also nested tables collect their paragraphs in separated table paragraph vectors. Regression from commit 6c5da2cd7af5c2d90e4d8e9635ba8c9989c87923 (tdf#119054 DOCX: fix not table style based bottom margin). Change-Id: Ib8568d8379cfb7da869120cdc7fe12895252d661 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93415 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-04-07tdf#131819 DOCX import: fix fixed size nested tableLászló Németh1-0/+6
Auto width nested table with fixed width cells is imported as fixed width table to keep the original cell widths, which define the width of the table, too. Partial revert of commit bed818c5d5e92a0b189f25e18495fc205d949128 (tdf#104876 writerfilter: m_bTableSizeTypeInserted = false here). Change-Id: If58c58a792853e1084ff1d8f9bf6ef74a593b1bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91764 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-03-15cid#1460667 rework to avoid Assign instead of compareCaolán McNamara1-5/+13
Change-Id: Icda6543d674b826ec344d3f1570b5463df9dcf29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90535 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-15!pCellWidths->empty() check means pCellWidths->size() > 0 is always trueCaolán McNamara1-1/+1
Change-Id: I45ea2c5095c2082c5b1a885047f3cbbcd3d6e1c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90534 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-11tdf#59274 DOCX import: fix tables with incomplete gridLászló Németh1-1/+36
Fix layout of "auto" width tables with incomplete grids, where table width is defined by cells of an arbitrary table row, not necessarily the first row, and last cells of the rows can be wider, than their saved values. Change-Id: I68bc8f1a4f57f3c64d0e83c585f2be129d9b5a84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90261 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-25tdf#123757 DOCX import: separate different style tablesLászló Németh1-5/+19
to avoid of losing table layout, color etc. during their prohibited combination into one table: table style of the second table overwrote the table style of the first table, or without table style, the second table was overwritten by the table style of the first table. Change-Id: I0a2663d41f7d019e7b329198944a300260025b65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89416 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann1-3/+3
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-20tdf#42949 Fix IWYU warnings in writerfilter/Gabor Kelemen1-7/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I47ff7eecabc87081eb953c5970a3cbd56c86d728 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88897 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-06DOCX import: don't give up on floating tables in headers completelyMiklos Vajna1-5/+5
This reverts commit 213d6390a2cc59d174173f4359c161625a9c4bdc (tdf#108272 DOCX table-only header: fix SAX parser error, 2020-02-03), except its testcase and replaces it with a better fix that does not import all floating-table-in-header as non-floating tables. See the new testcase, which is 1 pages in Word, it was 3 pages in Writer, and with the better fix it's now 1 pages in Writer as well. Change-Id: Ica3500120f12222d7cf766d55c17d78164865026 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88037 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-04tdf#108272 DOCX table-only header: fix SAX parser errorLászló Németh1-5/+5
Floating tables in table-only headers are imported as non-floating ones after a SAX parser error. Now we import them as non-floating ones from the beginning to avoid of the parser error. Change-Id: I0a816a7af642f402a25ed53d9766b1e8b82db789 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87874 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin1-3/+2
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-24loplugin:makeshared in svgio..writerperfectNoel Grandin1-3/+3
Change-Id: I0f8de0f78c7a8fb78d47ee5dfed09019b4eb5288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-15tdf#94801 DOCX import: fix table width loss by roundingLászló Németh1-2/+6
up the converted sum of table grid values. Small table width loss (< 1/100 mm) could result big layout differences, based on different line breaking etc. When table width is calculated by sum of table grid widths, now there is only a single conversion to 1/100 mm at the end, with rounding up the width instead of rounding down. Preventing regressions, both grid and cell width values are stored in the original twip now, instead of converting them to 1/100 mm one by one. Change-Id: I6f0755b6604f4976b8ecb25255c76fe6afd5e35b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86718 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2020-01-04tdf#129475 DOCX: fix gridAfter with shape-only cellsLászló Németh1-19/+9
and in last row of tables, i.e. regressions caused by the following commit. This reverts commit b2c6d2d961a6113d0f111fab45ae12a40d389a23 (fdo#38414 tdf#44986: DOCX table import: handle gridBefore/After), except some unit testing. Change-Id: Icb2d65b7a0766cf8dd00511cde500af3f94d2a94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86125 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-12-13loplugin:expandablemethodsNoel Grandin1-7/+2
Change-Id: I333d91ea5ce78c82e9bb107f934614efc7bfb8f7 Reviewed-on: https://gerrit.libreoffice.org/85078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-08fdo#38414 tdf#44986: DOCX table import: handle gridBefore/AfterLászló Németh1-9/+19
without serious regressions, ie. losing the import of complex forms with multiple or nested tables. Complete the fix for tdf#116194 (DOCX import: fix missing tables with w:gridBefore) with handling gridAfter on DomainMapper level. This consists of also rejections (except their unit tests) of commit cf33af732ed0d3d553bb74636e3b14c55d44c153 (handle w:gridBefore by faking cells (fdo#38414)) and commit 1d1748d143ab4270a2ca1b5117852b1b1bb4c526 (Related: tdf#44986 DOCX import: handle w:gridAfter by faking cells) Change-Id: I31fa1de03bcdf42424fa5507fb5a3e06aa47107d Reviewed-on: https://gerrit.libreoffice.org/84517 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-12-08tdf#116194 DOCX import: fix missing tables with w:gridBeforeLászló Németh1-10/+27
Regression from the commit cf33af732ed0d3d553bb74636e3b14c55d44c153 "handle w:gridBefore by faking cells (fdo#38414)" This patch replaces the previous fix with a better solution, fixing tdf#38414 on the proposed DomainMapper level. (Note: to reject the old fix completely, its follow-up commit w:gridAfter will be handled in a similar way.) Now the related regressions, tdf#111679, tdf#120512 and the complex forms of tdf#116194, tdf120256 and tdf#122608 are fixed, too. Change-Id: Id25f5fb4d9021c87ee8c82782b2038e6fb255673 Reviewed-on: https://gerrit.libreoffice.org/84263 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann1-3/+3
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-27tdf#76586 fix table width of auto-width nested tablesLászló Németh1-2/+10
when they have (sometimes incorrect) fixed cell widths. Change-Id: I98bf37bfce72b84eed14e354520e4741ae2ddada Reviewed-on: https://gerrit.libreoffice.org/83787 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-09tdf124367 DOCX import: fix rounding error in table cell widthsBakos Attila1-2/+2
Follow-up of commit 29cbbad64088354425c606f9eb6c267bdf7731dc (DOCX import: fix rounding error in table cell widths), its revert in commit e502463fa9a601963aa9f5a8783eb1318de36c13 (tdf#123104 DOCX import: fix lack of vertical merge due to rounding) and commit 44e44239de35c1548809c96e13bfa9d64c7ca441 (tdf#120315 DOCX import: fix cells merged vertically). Change-Id: Id85e8fd25dba26af77fe2fd3024db2ae834b5052 Reviewed-on: https://gerrit.libreoffice.org/82072 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
2019-11-04tdf#120315 DOCX import: fix cells merged verticallyBakos Attila1-4/+3
Due to rounding mistake cells weren't merged vertically, when their horizontal positions are different a little bit. Change-Id: I10623719a3759b35fcd04b154590b8ac6ec3ac45 Reviewed-on: https://gerrit.libreoffice.org/81604 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-10-03tdf#81100 DOCX import: repeat header according to table styleLászló Németh1-0/+9
Table style based repeating table header wasn't repeated, only direct table formatting. Change-Id: I119e6d32bf22c6c85a84aa42ae4cd6c5f60166b2 Reviewed-on: https://gerrit.libreoffice.org/80053 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-08-27Fix typosAndrea Gelmini1-1/+1
Change-Id: If2fcd9aaf920f30b49a7bb828ba174939b13a3e7 Reviewed-on: https://gerrit.libreoffice.org/78091 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-24loplugin:returnconstval in test..writerfilterNoel Grandin1-2/+2
Change-Id: Iea7d15f0a54921514cc4b71c5dc8caaa2ee573c8 Reviewed-on: https://gerrit.libreoffice.org/78063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-12tdf#124344 sw btlr writing mode, DOCX import: fix vertical alignmentMiklos Vajna1-7/+0
The hack added in commit 3325e0f206ce864730468c3556ce06760042c157 (bnc#865381 DOCX import: handle w:jc=center inside w:textDirection=btLr, 2014-07-02) is no longer needed, actually just reverting it fixes the problem, as then layout does the right thing. No need to center paragraph adjustment to any kind of vertical orientation, now that we have proper layout support. Change-Id: I6aa74f5289a014c148fbd7c7ab03ec885d931daf Reviewed-on: https://gerrit.libreoffice.org/70610 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25We can simply use DBG_UTIL now after efc29fbb6d458f5fd3660a36e2ff1592608fcbacTor Lillqvist1-14/+14
Change-Id: I74cce2d3fb4661ea9a44d0b166ca98dfade53056 Reviewed-on: https://gerrit.libreoffice.org/69604 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-12tdf#123104 DOCX import: fix lack of vertical merge due to roundingMiklos Vajna1-1/+2
Regression from commit 29cbbad64088354425c606f9eb6c267bdf7731dc (DOCX import: fix rounding error in table cell widths, 2014-11-07), which changed truncation to rounding for the twips -> 1/10000th of relative width conversion during import, but left export unchanged. But adapting the export is not that easy: one part would be the std::unique() call in WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows() to not require exact comparison, but doing so has it own side effects (multiple failing tests). So just revert the mentioned commit, as a minor rounding error is much better than a broken vertical merge. And once it's clear how to adapt export at the same time, this rounding on the import side can be re-introduced. Change-Id: I9e01ea5cc2c2f8aabe1e21cb8118c9c0e2c45494 Reviewed-on: https://gerrit.libreoffice.org/69065 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-09loplugin:singlevalfieldsNoel Grandin1-4/+0
Change-Id: I7f9ff0fc58adf51eae7fef5ce925b91b8d1f4922 Reviewed-on: https://gerrit.libreoffice.org/68940 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin1-3/+3
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin1-3/+3
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin1-3/+3
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-15sw btlr writing mode: implement DOCX filterMiklos Vajna1-14/+1
Replace the old trick with character-level rotation with the usage of the new writing direction. This means that finally table cells with btlr text direction and multiple paragraphs show all content, not only the first paragraph, as before (seen as data loss by users). Change-Id: I094f36fa6ba0701579e487e8e0212707987b1b2f Reviewed-on: https://gerrit.libreoffice.org/67870 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-11loplugin:indentation in writerfilter..xmloffNoel Grandin1-11/+11
Change-Id: Ibda157508e92ab5fb222daf79a38941c30a8057e Reviewed-on: https://gerrit.libreoffice.org/67611 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin1-4/+4
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-01tdf#58944: comment DOCX table header row limit betterLászló Németh1-10/+10
Change-Id: I725dce3754d5234c4f1398ef5392e72e0249d70f Reviewed-on: https://gerrit.libreoffice.org/64388 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2018-11-10Replace deprecated boost::optional::reset(val) with operator =Mike Kaganski1-2/+2
Change-Id: I7340a561e0df0c781fd834388deb4b9f83800f9b Reviewed-on: https://gerrit.libreoffice.org/63221 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin1-2/+2
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08tdf#58944 DOCX import: workaround for hidden table headersLászló Németh1-2/+20
Repeating table headers consisted of more than 10 table rows switch off table header repetition during DOCX table import to fix non-visible table content and broken tables. Repeating header lines are not visible in MSO, if there is no space for them. OOXML (and ODF) standards don't specify this exception, and unfortunately, it's easy to create tables with invisible repeating headers in MSO, resulting OOXML files with non-standardized layout. To show the same or a similar layout in LibreOffice (instead of a broken table with invisible content), we use a reasonable 10-row limit to apply header repetition, as a workaround. Later it's still possible to switch on header repetition or create a better compatible repeating table header in Writer for (pretty unlikely) tables with really repeating headers consisted of more than 10 table rows. Note: This workaround could help to create standard and more portable OOXML files in a mixed environment. Change-Id: I17fbc0173ec1c4f188a46227b99dde5726530da3 Reviewed-on: https://gerrit.libreoffice.org/60689 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-09-29Simplify containers iterations in w*Arkadiy Illarionov1-16/+7
Use range-based loop or replace with STL functions. Change-Id: Ie1e169f9d2d44e188180164bd1f93af43740425d Reviewed-on: https://gerrit.libreoffice.org/61141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-20tdf#64264 DOCX import: fix row count of repeating table headerLászló Németh1-1/+1
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>
2018-09-11ofz#10228 Integer-overflowCaolán McNamara1-2/+2
Change-Id: Ifb7e6ad6f5ffe71c3c5bb7cca9cb3b27bff7943a Reviewed-on: https://gerrit.libreoffice.org/60308 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-06ofz#10228 Integer-overflowCaolán McNamara1-1/+2
Change-Id: I09cb2e8f4af7d34c32accf2590695799d0613d62 Reviewed-on: https://gerrit.libreoffice.org/60070 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-23loplugin:unusedfieldsNoel Grandin1-1/+0
Change-Id: I1827262ad95942cacff589929f9436f8383cf142 Reviewed-on: https://gerrit.libreoffice.org/57642 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>