summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport
AgeCommit message (Collapse)AuthorFilesLines
2019-04-18tdf#42949 Fix IWYU warnings in sw/qa/*Gabor Kelemen1-14/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia0c79c2455a3b40384332c8c35215671e257a07f Reviewed-on: https://gerrit.libreoffice.org/70847 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-10writerfilter: implement RTF derived styles defaultingMichael Stahl2-0/+45
It turns out that the situation fixed in commit 1be0a3fa9ebb22b607c54b47739d4467acfed259 also applies to the definition of the styles themselves. To implement the same style import as Word, the style definitions need to be stored twice: once as read from the file, and another time with attributes defaulted and deduplicated vs. the parent style; the second representation is then sent to the domain mapper. To make this easier, add a bool parameter to cloneAndDeduplicate() to disable the implicit pPr dereferencing that happens when creating the hard formatted paragraph properties (this could potentially be cleaned up further if those paragraph properties would use pPr wrapper themselves). Also implement defaulting of line spacing in getDefaultSPRM(). Change-Id: I4810e917697b3af244e5dbdd7f5a45b4767c93fc Reviewed-on: https://gerrit.libreoffice.org/70320 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-04CppunitTest_sw_rtfimport: use CPPUNIT_TEST_FIXTURE()Miklos Vajna1-29/+14
In the single case where the usual DECLARE_... macro is not used. Change-Id: I3c47976a0d78294e345569f28d264f752851d5e6 Reviewed-on: https://gerrit.libreoffice.org/70211 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-29tdf#42949 Fix IWYU warnings in include/sfx2/[n-r]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia2bea9bd4775f4ed5ef0133971106a6c0bfdd1c0 Reviewed-on: https://gerrit.libreoffice.org/69896 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25new loplugin:unoqueryNoel Grandin1-4/+5
look for places we are doing code like: Reference<XProperty>(model, css::uno::UNO_QUERY)->getAsProperty() which might result in a SIGSEGV is the query fails Change-Id: I5cbdbc9e64bd0bed588297c512bf60cbacb9442e Reviewed-on: https://gerrit.libreoffice.org/69044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-12tdf#123104 DOCX import: fix lack of vertical merge due to roundingMiklos Vajna1-1/+1
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-01-29tdf#122430 RTF import: fix lost font size on footnote startMiklos Vajna2-0/+38
This become more visible since commit 49614a9ea971ff7f370f863ce8a2735aab973cee (tdf#119599 RTF import: fix missing deduplication of font size, 2018-09-24) as now incorrect font size from style affects the rendering result. Change-Id: I5b339337f021e2fc359f6fc5f5aa2ed0bcf844b9 Reviewed-on: https://gerrit.libreoffice.org/67034 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-23tdf#90097 rtfimport: rewrite unit test so it run reliablyJustin Luth1-15/+1
Already broken for windows and mac, the numbers changed for me on Ubuntu when switching from gcc5 to gcc7 or gcc8. How it still works on the tinderboxes etc I don't know. Anyway, by removing the obviously irrelevant actual numbers, the test still covers the original intent by ensuring that the top point is farther to the right than the bottom point. Change-Id: Ieeb7cd854847d47a11dc305db82371e2b8f85049 Reviewed-on: https://gerrit.libreoffice.org/66724 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2019-01-18convert POR constants to scoped enumNoel Grandin1-1/+2
Change-Id: Ia146f1f932cf4437e2e7e20722b0957a458979fd Reviewed-on: https://gerrit.libreoffice.org/66514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-27Fix typoAndrea Gelmini1-1/+1
Change-Id: Ic95456c08fa941bd3f4f1b52251c609b3e9efea8 Reviewed-on: https://gerrit.libreoffice.org/65639 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin1-2/+1
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-25tdf#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. Change-Id: I35b6599cc47fa51b8754fd921c61a3b31a283547 Reviewed-on: https://gerrit.libreoffice.org/60946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-07-17tdf#81943 sw RTF import: fix missing wrap in background for in-table shapeMiklos Vajna2-0/+54
Regression from commit 015fd55c94b7b650ed8e572cafaf3b0f903b01b9 (tdf#96275 RTF import: fix anchor of shapes inside tables, 2016-05-10), remember more context when delaying the import of a shape. Change-Id: Idc02868eb3fe5b7637c9fd00c841bf71423adf2b Reviewed-on: https://gerrit.libreoffice.org/57531 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-10sw RTF import: add tests for shape prop posh left/right casesMiklos Vajna2-0/+53
Center was already tested, lcov says. Change-Id: I10707a7a6318f3a8268db365f703485418ce7d51 Reviewed-on: https://gerrit.libreoffice.org/57204 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-03Fix typoAndrea Gelmini1-1/+1
Change-Id: I8f2692a7f917b53c28783599b589fd0a39e3b880 Reviewed-on: https://gerrit.libreoffice.org/56835 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-07-02tdf106792 Get rid of SvxShapePolyPolygonBezierArmin Le Grand1-6/+14
SvxShapePolyPolygonBezier was an implementation for the UNO Shape group of polygons with bezier parts (filled/unfilled/ closed/open), e.g. com.sun.star.drawing.OpenBezierShape. It was differing from SvxShapePolyPolygon just by supporting drawing::PolyPolygonBezierCoords instead of the simple drawing::PointSequenceSequence and some details. This leads to problems - the ShapeType *does change* e.g. when you edit a non-bezier Shape in Draw/Impress and change parts to curve (also when closing, see ShapeTypes above). This is why SvxShape::getShapeType() already detects this identifier by using thze internal ShapePolyType (e.g. OBJ_PATHLINE). So there is no reason to have two separate UNO API imple- mentations for sthe same type of SvxShape at all. Get rid of the extra one and unify this implementation detail. Also cleaned up double basegfx tooling for conversions of UNO API Poly/bezier data and B2DPolygon. Adapted test for "tdf113946.docx", see comment there. Adapted test for "tdf90097.rtf", see comment there. Also needed to use the Linux values, also check comment there. Adapted test for "tdf105127.docx", see comment there. Adapted test for "tdf85232.docx", see comment there. Had to fic a problem with test for "tdf96674.docx"- the adaption of the RotateAngle for line objects goes havoc together with the UNO API when scaling is involved. That old aGeo rotate stuff just kills the existing rotation due to numerical inprecise stuff. The UNP API - in trying not just to apply a rptation, but manipulate the existing one then goes wrong in not re-getting the current rotation value anymore. ARGH! This is the original reason for the ols tdf#96674 task - i doubt that the additional code to make a line not exactly hor/ver is needed. Checked and it is not needed, thus removed the change from tdf#96674 in shape.cxx. Change-Id: I2bb8d4cfe33fee3671f3dad60e5c18609a394f9d Reviewed-on: https://gerrit.libreoffice.org/56614 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-06-02Removed executable permission on data filesAndrea Gelmini2-0/+0
chmod -x for odp, ods and so on Change-Id: I74397d9b8e24575130d2776ed90f4cfc13e1f03c Reviewed-on: https://gerrit.libreoffice.org/52570 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-05-14remove page count check in a test (irrelevant and fragile)Luboš Luňák1-3/+0
If I load this document in LO, either my build or distro build, it has only one page, so the test fails for me only because of the 2-page check. The commit causing this, b904d639a8, has been in for quite a while, so it's apparently something special about my setup, but a) the test doesn't actually require 2 pages for anything, b) the commit mentions that the test is fragile, c) if I manually inspect the .rtf, there's an extra page that I do not see even in Word2013, so the document is possibly a bit broken. One way or another, the page check seems pointless. Change-Id: I18bdf25f71e8eb9225acd667e60f426fca008ee4 Reviewed-on: https://gerrit.libreoffice.org/53380 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-05-09Fix some IWYU warningsMiklos Vajna1-2/+14
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#117403 RTF import: fix lost cell border of merged cellMiklos Vajna2-0/+29
If two source cells have different border types, then Writer takes the second, Word takes the first. So mimic the MSO behavior explicitly in dmapper. Change-Id: I25adc62e024a929216c7b05fec44e1f602f28285 Reviewed-on: https://gerrit.libreoffice.org/53956 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-26tdf#117246 RTF import: don't loose page breaks inside nested groupsMiklos Vajna2-0/+17
Regression from e3f254ab8211fbab7541cde2100a35c875b0c240 (RTF import: fix spurious page breaks at doc end (related: rhbz#1065629), 2014-02-27), the problem was that now we update the parser state to remember the next section break should set the break type of the current section to "next page", but this state should be remembered once the RTF group ends ("}" character), otherwise \page will be represented with a continuous break, i.e. lost. Change-Id: I69a8413f45e17e11d6d676c7bfd13ca7560b4d43 Reviewed-on: https://gerrit.libreoffice.org/53498 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-07Revert "long->sal_Int32 in tools/gen.hxx"Stephan Bergmann1-2/+2
This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0. As discussed at <https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html> "long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with signed integer overflow, and the original plan was to redo it to consistently use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/> "sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed miserably on Windows, causing odd failures like not writing out Pictures/*.svm streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best approach is to just revert the original commit, at least for now. Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix Library_vclplug_qt5". Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae Reviewed-on: https://gerrit.libreoffice.org/52532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-04tdf#116265 RTF import: ignore \fi in para if it repeats invalid \fi from listMiklos Vajna2-0/+36
The 2nd paragraph of the bugdoc has a \fi set, but it has to be ignored. The reason for this is that the \fi is a repeated property from the list definition, but there \levelnumbers has invalid contents, which means its \fi has to be ignored, including their repeated values in paragraph direct formatting. There was already code to insert implicit defaults as paragraph direct formatting based on list properties, this does the opposite: remove paragraph direct formatting based on the list state. This requires tracking the ignored values in a separate structure, since the normal list properties no longer contain the information we need to be able to remove paragraph formatting. (At the moment this tracks only \fi, but can be extended to other properties if it'll be necessary.) Change-Id: Iff542cb76c66b7fc7ae4e07ade84701e24a74f1a Reviewed-on: https://gerrit.libreoffice.org/52352 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-03long->sal_Int32 in tools/gen.hxxNoel Grandin1-2/+2
which triggered a lot of changes in sw/ Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6 Reviewed-on: https://gerrit.libreoffice.org/48806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29Clean up copy/paste (of a function called "paste")Stephan Bergmann1-33/+4
Change-Id: Iea48bb3304e2688b440c5c396ed340ffffa11568 Reviewed-on: https://gerrit.libreoffice.org/52121 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-28Pasted-in document need only be opened for readingStephan Bergmann1-1/+1
Otherwise, if SRCDIR is a read-only tree, CppunitTest_sw_rtfimport would fail with the CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, pStream->GetError()); from <https://gerrit.libreoffice.org/#/c/51992/> "Check successful stream creation". (And before that, it would have more obscurely failed with the CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); in testTdf90260Par failing with 1 vs. 2.) Change-Id: I55fcc932c66e6a4b84cd391f8821257a0de2abb8 Reviewed-on: https://gerrit.libreoffice.org/51993 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-28Check successful filter operationStephan Bergmann1-1/+1
Change-Id: I220905486cc2287f2157f57b537c0df0b325bd36 Reviewed-on: https://gerrit.libreoffice.org/51994 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-28Check successful stream creationStephan Bergmann1-0/+1
Change-Id: Iea7dea13684a15ed1960d2c8562253f5a2e64c34 Reviewed-on: https://gerrit.libreoffice.org/51992 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-20tdf#116269 RTF import: implement reverse deduplication for listsMiklos Vajna2-0/+30
This is the same mechanism that was added in commit 1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF import: override style properties like Word, 2014-06-17), except that here the reference is a list definition, not a paragraph style. Also, this commit only implements the part that inserts explicit defaults for not repeated properties, not the actual deduplication, as that already works at a dmapper level. (Saving the bugdoc as DOCX, it's visible in document.xml that DOCX marks these defaults explicitly: <w:ind w:left="0" w:right="-6" w:firstLine="0"/> but RTF does not, so the right place to fix this is in the tokenizer.) Change-Id: Iec88d9bf1032d1d89194bd272500d6780c3c2224 Reviewed-on: https://gerrit.libreoffice.org/51589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-27tdf#115715 RTF import: ignore zero para indents in styles without parentsMiklos Vajna2-5/+50
The only reason the DOCX equivalent of the bugdoc was imported correctly is that these default zero margins are simply missing from the DOCX markup, suggesting Word ignores them. We now do the same, this way the stripped down document's 3 paragraphs all have different margins as expected. (Also rework the testTdf112211_2 testcase to test the original problem better: I verified that the layout is unchanged before/after this patch.) Change-Id: I88d56c27c19e070e983c3392f99bca96597cd56e Reviewed-on: https://gerrit.libreoffice.org/50391 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-02-06Fix typosAndrea Gelmini1-1/+1
Change-Id: Ifb3aa4f79b9accc34b2010b762e596fadae9fd09 Reviewed-on: https://gerrit.libreoffice.org/49297 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-06tdf#115242 RTF import: order numPr before other paragraph propertiesMiklos Vajna2-0/+48
So that paragraph properties inherited from numbering properties can be properly overwritten with direct formatting, even when we have to take style deduplication into account. The OOXML tokenizer already did this, writerfilter::dmapper::DomainMapper::sprmWithProps()'s NS_ooxml::LN_CT_NumPr_numId depends on this, so adapt the RTF tokenizer accordingly. Change-Id: Iec6026d146f08a9d06266763d01ed626a2d1f3d1 Reviewed-on: https://gerrit.libreoffice.org/49247 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-30tdf#115155 RTF import: fix left indent handling inside list definitionMiklos Vajna2-0/+40
This used to work in the past only because the left indent was also imported as a direct paragraph formatting, but that is not the case since left margin of lists is deduplicated during import after commit c9dee880d88305312094b311abdae155e452bf14 (tdf#104016 RTF import: deduplicate before text indent from numbering, 2017-12-05). Change-Id: I1c9be30700c51ef97fb274e8781d6008db3121d8 Reviewed-on: https://gerrit.libreoffice.org/48855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-28Unit test for tdf#105910, tdf#115276, tdf#115278Mike Kaganski2-0/+148
Change-Id: Id64041090a0be4df847f2962e32011ef2500de0e Reviewed-on: https://gerrit.libreoffice.org/48760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-24tdf#115153 the missing test documentMichael Stahl1-0/+9
Change-Id: I74724ba61aadfad19501a87ab548219ea0a1f236
2018-01-24tdf#115153 writerfilter: RTF import: fix vert orient of Word 6 shapesMichael Stahl1-0/+14
The bugdoc is affected by the change of default vertical alignment; apparently it's not even possible to set the vertical alignment of a Word 6 drawing object (\do) so we have to set the Word default. (regression from c79467ba954987f1d239c594c1e1b3af3f5515f6) Change-Id: I4084a7a7e2a55f864cb569e04632e034d59eefdb
2018-01-17Fix typosAndrea Gelmini1-1/+1
Change-Id: I6f2822e7068754a1b5e70e401247a36b214147e3 Reviewed-on: https://gerrit.libreoffice.org/48079 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-04tdf#42949 Fix some more Include What You Use warningsMiklos Vajna1-2/+0
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a Reviewed-on: https://gerrit.libreoffice.org/47348 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-11Enable RTF import tests on WindowsMike Kaganski1-3/+0
Change-Id: I4c14679d5cb91dc3cf35c3f47cb9120d3ee0f9cf Reviewed-on: https://gerrit.libreoffice.org/46212 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-12-11tdf#114333: consider trleft for 1st cell width on import; don't...Mike Kaganski1-1/+1
... recalculate cell widths by factor pagewidth/tablewidth on export This makes the import and export symmetrical. Unit test included. Some existing unit tests were updated: - testTdf97035: the previous width of B1 cell (3571 twips) was not stable enough on round-trip. Old code saved table with wrong width, and incidentally that made it to output correct width of the cell. New code outputs table width correctly, and drops unneeded cell width adjustment on export, so the rounding error on initial import makes output cell width wrong. We have a cumbersome arithmetics to import cell widths from RTF: 1. In DomainMapperTableManager::sprm (case NS_ooxml::LN_CT_TblGridBase_gridCol) we do convertTwipToMM100 on initial sizes in twips; 2. Then, in DomainMapperTableManager::endOfRowAction, we do rtl::math::round((fGridWidth * 10000) / nFullWidthRelative) on the mm100 sizes (the 10000 is UNO_TABLE_COLUMN_SUM from unotbl.cxx, which allows to measure cell widths in 100ths of percent of table's width instead of absolute sizes) 3. Last, in SwTable::NewSetTabCols, we do lcl_MulDiv64<long>(nNewPos, rParm.nNewWish, nNewWidth) where rParm.nNewWish is table's width in twips (again), and nNewWidth is 10000. So, the three permutations give us twips back, but rounding errors may make result differ from initial value (as in case of cell width 1927 twips and table width 15527 twips, which results in 1926). The unstable width that resulted in roundtrip error was changed by 1. The changed unit test file is checked to still correctly test tdf#97035 - testFdo55525: previously, the testdoc was imported with wrong width (too narrow); that caused rounding error on cell width calculation. Current tested value is more correct. Change-Id: I69112521c35b316ed6df11d5e4ff7336534164bd Reviewed-on: https://gerrit.libreoffice.org/46094 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-11Use platform-specific newline in unit testMike Kaganski1-1/+1
Change-Id: I7ff67ff952ecb2682a163866b91a9f2621dde935 Reviewed-on: https://gerrit.libreoffice.org/46210 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-05tdf#104016 RTF import: deduplicate before text indent from numberingMiklos Vajna2-0/+39
We already deduplicated first line indentation since commit 3915bf2dc877d5f1140798e24933db0f21386a4a (tdf#95376 DOCX import: fix incorrectly indented tab stops, 2016-01-26), the same is necessary for before text indent. Change-Id: I11394881d116f76922c1a706dd14b6a7cdf3c89f Reviewed-on: https://gerrit.libreoffice.org/45844 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-04tdf#97648 ooxmlimport: calculate percentage-based widthsJustin Luth1-4/+2
MSO seems to write 100% width horizontal lines with a "suggested" width of 0, so we need to calculate what the proper width is. A better fix would be to add "percentage-width" support to the shape class itself, but that complex enhancement is way beyond my abilities. Limiting the patch ONLY to shapes with an undefined width because it otherwise slightly increases the size of various other unit tests, and I'm not sure if those are desirable changes or not. The list of the unit tests is documented in the bug report. Change-Id: Ied80beca42a7513b8ea3b94b9c4ea9898e787200 Reviewed-on: https://gerrit.libreoffice.org/42128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-22RTF filter: drop now redundant astyle.optionsMiklos Vajna1-159/+295
I (tried to) keep the RTF filter style consistent locally with astyle in the past, but now that's redundant when we have an enforcing clang-format mechanism in place. So drop the astyle config and switch to clang-format in the RTF filter case. To minimize backport pain, do this shortly before the libreoffice-6-0 branch-off. Change-Id: I708dbeb0b5ad2afacc90029ee5abba9495f4601f
2017-11-21RTF import: add even section break testcaseMiklos Vajna2-0/+22
lcov points out this was not covered so far. Change-Id: I11ff9eb8a819268382e6564be873403c47ec2176 Reviewed-on: https://gerrit.libreoffice.org/45018 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-19tdf#108947 Added Unittest.Thomas Beck2-0/+134
Added different branches for Windows/Linux because of differences in linebreaks. Recommit with ifdef guard for preventing tinderbox failure Change-Id: I08c45e3e653990a47a85aee6f63f063b2f9385a7 Reviewed-on: https://gerrit.libreoffice.org/44677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-14RTF import: add odd section break testcaseMiklos Vajna2-0/+20
lcov points out this was not covered so far. Change-Id: I7c5047b75f6548e7738e6118f8d3c0eb9ed76045 Reviewed-on: https://gerrit.libreoffice.org/44702 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-09Revert "tdf#108947 Added Unittest."Thorsten Behrens2-131/+0
Seems the test doc is fragile under font replacement. This reverts commit 743efc3d4b086d20abd1449bcb73e9bce506c083.
2017-11-09tdf#108947 Added Unittest.Thomas Beck2-0/+131
Added different branches for Windows/Linux because of differences in linebreaks. Change-Id: I17397155292e173bf698fa2680aaaf2711c064cf Reviewed-on: https://gerrit.libreoffice.org/44358 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-10-23loplugin:includeform: swStephan Bergmann1-1/+1
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a