summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8import
AgeCommit message (Collapse)AuthorFilesLines
2021-05-10tdf#120761: sw_ww8import: fix typo in unittestXisco Fauli2-1/+1
Change-Id: Ia8fef7dea598cd2ea1513908f69e0176c057900b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115309 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-09tdf#120768 doc import: z-order background shapes behind othersJustin Luth2-0/+8
Interestingly, there were NO ww8export examples where a background item was attempting to insert itself after a foreground one. I think GENERALLY the order of shapes in a DOC file format is from bottom to top - and so it just worked by accident. Change-Id: If5226b4ad071455d1e3c30e334676cc5932a1064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113837 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-04-09tdf#139495 doc import: prevent negative Int forced into uIntJustin Luth1-0/+4
Don't cast a negative number into a sal_uInt16 and expect good results. (ww8import test) But for bug 139495 (and ww8export3), the problem area is also related to pHdFormat->SetFormatAttr(SwFormatFrameSize... which takes an awt::Size which consists of Longs. So they should accept negative numbers. Likely the result is being treated as a uInt somewhere. And a negative height doesn't mean very much anyway. There seems to be a fundamental difference between Word and LO here. Word sets the page margins, but that is irrelevant to the header/footer, which have their own distance from the edge. In LO, the header starts at the page margin, and the body text must follow the header, (In Word, the body text can start above the header, as seen in the ww8export3 unit test.) [FYI: DOC format (since forever) seems to ignore the header size, allowing the content to at least overlap with the body text, but DOCX doesn't have that. Likely this is #112727# using floating frames hack. So I'd better not keep messing around in here.] Change-Id: Ie7bffec8a3de25958cf1f311ff2c8338d4870d99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113681 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-11-24tdf#42949 Fix new IWYU warnings in directory swGabor Kelemen1-2/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4bb84c3f401aba8a3dede9cec3a7f2187a2ba02a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106473 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel1-2/+2
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20use tools::Long in swNoel1-5/+5
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-08move round-tripables to ww8export #2Justin Luth10-139/+5
This is a followup to much earlier commit a9afa89e953f0f32acf26b143717e7d067cbc75a This serves two purposes. It helps to prevent regressions and it allows focus on features that still don't export properly. A few more DO export, but things like lazy-load are just testing load-related things, so skipped a few that didn't seem to have any value in being round-tripped. Change-Id: I718e3c09074e7b52d8e83dc9a659f6439ce17d3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102073 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-09-05tdf#135672 doc import: fix table widthJustin Luth1-3/+3
On round-tripping, the table was growing on each save. A previous commit handled position creep. Change-Id: I0c8c3b644a5c005252afd761cc164dd001321d65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101188 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-31sw: introduce a Library_swqahelperMiklos Vajna1-5/+11
So it is no longer necessary to define all SwModelTestBase functions inline. Change-Id: Ia1055ff967b3614102275ec92607c85ec063fce7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99820 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-09tdf#133474 DOC import: fix lazy-loading of images with zero sizeMiklos Vajna2-0/+16
DOC typically contains images with a size hint outside the image, but this is optional. Make sure that we load the image in case the size is not available without loading. The effect is that once SwWW8ImplReader::MapWrapIntoFlyFormat() calls SwGrfNode::GetTwipSize(), we always get a valid size. Ideally without loading the graphic. Change-Id: I81536ceb44c6e455e9bf274a5852008443f9d64f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95857 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-15CppUnittest: sw: simplify code. use getShapes and getShapeXisco Fauli1-6/+2
Change-Id: I494349b99a122f67ed1f2881faf1a37e4358c55b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-28tdf#80635 ww8import:1 take float table CENTER to inlined tableJustin Luth2-8/+0
Since SW has problems with floating tables, any unnecessarily floated tables are converted to inline. However, the positioning of the tables is mostly lost. So the choice is either to refuse to inline a strangely positioned table or else to transfer the positioning onto the inlined table. Transferring is easier said than done. But for centered tables, it is easy to copy that. Change-Id: I8a6deaa63c45277c30ffa12613c8ed125a45d607 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91188 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-03-02speedup sw build a littleNoel Grandin1-0/+1
from 11m46 to 11m21 Used ClangBuildAnalyzer to find headers that took a long time to parse (in total, across all modules). (*) moved the boost stuff out of sw/inc/docary into a new header. (*) make sw/inc/ndtxt no longer include doc.hxx Change-Id: Ia1d4ebddb4ddd4ec4ffbc011f4a5e24a42b46d3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-24tdf#130812 DOC import: fix unexpected transparency of textMiklos Vajna2-0/+12
DOC can have black with transparency set to 0xff, and that is meant to be just black. Allow COL_AUTO, though; the rendering will not consider that as transparent anyway. Other than that, DOC does not support text with transparency, it's a DOCX-only feature. Change-Id: I33f61b54b8ebd7958845063ae61900182d6f5e80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89321 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-10tdf#130262 ignore negative wrap distance values in doc prop importPatrick Jaap2-0/+5
Change-Id: I2c06b12c958dfde09adcc2ae4c59532ffde6b6fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88127 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-26tdf#128605 DOC import: fix cont sect break with different top/bottom marginMiklos Vajna2-0/+11
Word has a feature to attach different page margins to sections, and then refer to these section definitions via continuous section breaks. The result is that the margin changes never introduce a page break, and left/right margins are applied instantly, while top/bottom margins are applied from the next page. Now in Writer, either these continuous section breaks are mapped to a page break and all margins show up as expected, or we don't do a page break, and then the number of page breaks are as expected; but you can't have both at the same time till the feature is missing in Writer core. Commit c5ed52b1cd6f22787c94bec035ceecf9e1da3271 (ww8import create a pagedesc if continuous section changes margins (bnc#875383), 2014-07-21) tweaked this decision, so that the DOC import always creates a page break, but left the DOCX import unchanged. Fix the bug by going back to not creating page breaks on top/bottom margin changes: this resolves the scenario and still keeps the original situation fixed, too. Change-Id: Id0e8c3a4ce40db8da024a0a20005eb0445325a1a Reviewed-on: https://gerrit.libreoffice.org/83789 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-09-27Related: tdf#124601 DOC import: always allow floating tables in header/footerMiklos Vajna2-0/+11
So now the DOC import is in sync with the DOCX one, see commit 81ef96a2417c7843dfed0558c920ad3064e58921 (tdf#79639 DOCX import: don't delay text frame conversion of in-header tables, 2015-06-01). The bugdoc used to have 2 additional pages in Writer (compared to Word), it has only 1 after this. Change-Id: I24f0dc28599e608737dc19a0143e72832202a034 Reviewed-on: https://gerrit.libreoffice.org/79682 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-09-27Related: tdf#124601 DOC import: improve fLayoutInCell handlingMiklos Vajna2-0/+8
There were 3 problems here: First, SwWW8ImplReader::IsObjectLayoutInTableCell() should not use m_nProduct to determine the Word version. It depends on an undocumented field of the [MS-DOC] format and the bugdoc shows how it interprets a Word 2007-produced document as a Word 97 one. Instead, parse the cswNew field of the file header, which is a more or less documented way to find out if this file was produced by >=2000 or 97. See e.g. <https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-doc/841b5f72-487e-4fe7-8657-ec90d5af8750> where the Dop structure maps cswNew values to Word versions. Second, parse the fLayoutInCell correctly: it's part of a bitfield, with two variables: a bool and an other one which decides if the bool should be read at all. The bugdoc's case was evaluated as false, so do the proper parsing in that case and leave the existing logic as-is for now. Third, there doesn't seem to be a reason to exclude the wrap-through case for the fLayoutInCell -> follows-text-flow mapping. The bugdoc shows that Word interprects fLayoutInCell the same way for wrap-though objects, too. Change-Id: Iaddd5e522e0380b731899f32a17c14ce4442ac35 Reviewed-on: https://gerrit.libreoffice.org/79629 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-09-17tdf#105330 sw: fix lost cursor on undoing nested table insertMiklos Vajna1-0/+8
This is a regression from commit e4509eea8fc7c07ddff48edf0d4c015c2663d896 (n#751313 SwCallLink: avoid redrawing complete rows without nested tables, 2012-04-20), though manual testing shows that the underlying problem has been addressed in the meantime, so this can be reverted. Over time, some poor tests started to depend on the new behavior so adapt them as necessary: 1) Change back test added in commit 075fc0c0a34875adf2833e5933b4982b9443a373 (testcase for fdo#38414, 2014-03-18) to its original form, that was changed to an export test in commit 086550313260d9fa45b91dc705b21bb9b51ce0b8 (move round-tripables to ooxmlexport, 2016-10-07), as the export of that document still results in data loss of cell content, just happened to pass so far. 2) Explicitly calculate content of text frames in two more tests, which just hoped that by the time they assert, the layout is ready already (but now that the missing notification is restored, it happens that the first pass of the layout doesn't create them; only a later pass, invoked by Idle, which doesn't run during cppunit tests). Change-Id: Ie13d17266cd552f3850848ae980bcfe8776997ac Reviewed-on: https://gerrit.libreoffice.org/79026 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-30tdf#112535 DOC import: fix handling the have contour but no polygon caseMiklos Vajna2-0/+20
In case a graphic has contour enabled, but there is no wrap polygon, that means auto-contour in Writer, and no contour in Word, so handle this difference during DOC import. Regarding the DOCX import -> DOC export -> DOC import scenario, this fixes a regression from commit 628a0f313ed05db0149db680837c99267a77ea3c (DOCX drawingML import: handle SurroundContour shape property, 2014-08-11), though the DOC import part was always broken, I think. Change-Id: I6049fcf5df20736b702de901aef7068826d43f18 (cherry picked from commit 5b7b269c5e32abf4fbb6a664453e422e3667f4a3) Reviewed-on: https://gerrit.libreoffice.org/76566 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-11CppunitTest_sw_ww8import: disable failing assert on WindowsMiklos Vajna1-2/+5
It fails only sometimes, it's yet clear why. Change-Id: I5060c5c8b09c32642b32d85996b84d780a245e97 Reviewed-on: https://gerrit.libreoffice.org/73819 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-06-11tdf#125591 DOC import: lazy-load metafiles with explicit sizeMiklos Vajna1-0/+6
Regression from commit 69b62cfcbd364d7f62142149c2f690104b217ca1 (tdf#125281 DOC import: fix size of lazy-loaded metafiles, 2019-05-27), the problem is that setting the preferred size of a Graphic swaps it in. Avoid this by extending ImportUnloadedGraphic(): if a size hint is provided, then that will be used instead of info from the graphic descriptor (which is usually only meaningful for bitmaps). This way we maintain the correct size and we're back to lazy-loading metafiles from binary MSO files as well. Change-Id: Ide12d12166110e98ea47b5347dd24fb203b22da3 Reviewed-on: https://gerrit.libreoffice.org/73798 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-28tdf#125281 DOC import: fix size of lazy-loaded metafilesMiklos Vajna2-0/+17
Metafiles may have an external header, so once graphic data is read, we need to set the size explicitly. Otherwise the width of the EMF image in the bugdoc will be too small. Change-Id: I2441eda61278b0f4973db5d9aa14618ccd17c397 Reviewed-on: https://gerrit.libreoffice.org/73064 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-18tdf#42949 Fix IWYU warnings in sw/qa/*Gabor Kelemen1-1/+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-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-02-19tdf#110987: Don't mis-detect .doc files as .dotTor Lillqvist2-0/+13
Also add a unit test for that. Change-Id: I86c195cebbe12b2bdf498954956db882f6f0d12b Reviewed-on: https://gerrit.libreoffice.org/68005 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2019-01-12tdf#120145 ww8import: ignoreCols if section is insertedJustin Luth1-2/+14
Otherwise, the column setting is duplicated both in the section and in the page style. Change-Id: I14383c646e709a3653f1054f0d4170a2963529c1 Reviewed-on: https://gerrit.libreoffice.org/66151 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2019-01-06tdf#122425: explicitly remove borders for newly created flysMike Kaganski3-0/+66
After commit d398e9248c183cf988b6d985b342b0cbff93ea02, it's necessary to make sure that each created floating object has proper default border and spacing values (empty and 0), to not inherit frame style's non-0 values unintentionally. This fixes two places for objects in headers/footers. Change-Id: I2632bcd4066609c97aa15e39d69e9089ac691ff2 Reviewed-on: https://gerrit.libreoffice.org/65906 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-12tdf#121734: ww8 import: use direct formatting for floating object framesMike Kaganski2-0/+43
... and don't modify standard frame styles to have no borders and padding. This makes "Frame", "OLE", and "Graphics" frame styles of imported DOC files to have usual settings (for "Frame", it's 1.5 mm padding and all borders set to 0.05 pt black line). All objects that need invisible frame will have them with all necessary settings set explicitly, which allows to copy and paste such frames to other documents without problems. This makes DOC import aligned with DOCX import in this regard. Change-Id: I6f05cf71e63ceccb8e0ddebe23ec41bf69af9b52 Reviewed-on: https://gerrit.libreoffice.org/64992 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-04-20DOC import: lazy-read imagesMiklos Vajna2-0/+8
At least JPEG files are now only loaded when the user scrolls to the relevant page. Also fix the root cause of the EMF lazy-read problem and remove the previous workarounds. Change-Id: I9699927282b99bcb71a0d271a20bbfd56a361ee8 Reviewed-on: https://gerrit.libreoffice.org/53219 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-12tdf#112346: take Word no-wrap limit into account also for ww8Mike Kaganski2-0/+8
This also makes ww8 floating-table conversion decision heuristics somewhat closer to OOXML code. Change-Id: I29ca2ebabd1758ad98e02aaf560cf2f44daec3a8 Reviewed-on: https://gerrit.libreoffice.org/42196 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-31loplugin:oncevarNoel Grandin1-2/+2
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-01Improve suppression of loplugin:redundantcast in CPPUNIT_ASSERTStephan Bergmann1-1/+1
Change-Id: I65f95e7245f08592ea11cc75e1cf34dcbdf16b40
2017-05-11tdf#107773 DOC import: consider page breaks for multi-page floattablesMiklos Vajna2-0/+8
See commit 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de (Related: fdo#61594 SwWW8ImplReader::StartApo: don't always start a frame, 2013-05-13) for the context, this is one more case where having a multi-page floattable as a multi-page one is a better option. The additional condition is that in case there is a break right after the table, then always import the table as a non-floating one, as there won't be any wrapping anyway (due to the break). Change-Id: I3dd4174226cfc1e825c00607221feeed51b7133f Reviewed-on: https://gerrit.libreoffice.org/37513 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-27tdf#106799 WW8: Accept TTP Mark without Cell MarkMike Kaganski2-0/+15
Paragraph mark of inner table (0x0D) sometimes has sprmPFInnerTtp, but no sprmPFInnerTableCell. This still counts as cell end (at least, MS Word treats it that way). Unit test included. Change-Id: I5589cdd486c03ca4567d61882826cc7c245a40c9 Reviewed-on: https://gerrit.libreoffice.org/35763 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-03-10coverity#1402149 Unchecked dynamic_castCaolán McNamara1-0/+1
Change-Id: I73fa2c6d3658e10728492c9766acef1eaadc5ca1
2017-03-07tdf#105570: Treat sprmTTableHeader properly.Vitaliy Anderson2-0/+42
Only take into account sprmTTableHeader if all previous rows had it. Change-Id: I0f81da366c148963503b4aeba778f5d97aa72d26 Reviewed-on: https://gerrit.libreoffice.org/34931 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-03-06doc/docx: make unit test for tdf#99120 round-tripableJustin Luth2-9/+0
When a page description is chained to a non-chained follow, it will only be used for a single page. Thus it might be able to be combined into the follow as a titlePage instead. However, if this page description has distinct even/odd pages, don't merge it as a titlepage. Change-Id: I62237a48c062e7c393a5224285a23597c479c1c9 Reviewed-on: https://gerrit.libreoffice.org/34889 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-03tdf#106291: WW8 import: Properly treat column spansMike Kaganski2-0/+9
Previous code unconditionally treated all cells in merge groups as rows span, thus in some conditions it merged incorrectly when there were cells from same row. The fix is inspired by SwTable::PrepareMerge(). Also, fixed improper adjustment of too narrow cells in WW8TabDesc::CalcDefaults(), which also happens in files where column spans are represented by spanned 1-twip-wide cells. Unit test included. Change-Id: I6c3803635f006dd396805d6847daa4d80c97cad4 Reviewed-on: https://gerrit.libreoffice.org/34820 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-01-23tdf#96277 revert ww8 import: fix upper margin of floating tableJustin Luth2-10/+0
commit 3755c87d0426a499d4755e82d8fbc77caa240764 mis-positions non-textframed floating tables. The patch only worked under very ideal circumstances that cannot be identified during import time. Lots of bug reports indicate real world problems with it. This is a pretty safe revert because the code only processes a document one time, so old documents don't depend on this to work. Change-Id: I3b94d27901a20e46c2f5fd4305041d1d28acf33a Reviewed-on: https://gerrit.libreoffice.org/33322 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-18sw: roundtrip test of OOXML decryption/encryptionTomaž Vajngerl1-1/+1
Change-Id: Idea2a46a692aed666eb8dbc6185ae001d30757c2 Reviewed-on: https://gerrit.libreoffice.org/33228 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-13move round-tripables to ww8exportJustin Luth31-545/+1
This serves two purposes. It helps to prevent regressions and it allows focus on features that still don't export properly. Change-Id: I63ed43bccb2279f889474611ce436e85374e6bc5 Reviewed-on: https://gerrit.libreoffice.org/29704 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-09-29Resolves: tdf#102334 Some hidden text not imported as hidden correctlyCaolán McNamara2-0/+6
began to be a problem since.. commit 705a8c226aee3e68db492083b7cf8b704335328b Author: Caolán McNamara <caolanm@redhat.com> Date: Tue Sep 23 20:35:50 2014 +0100 WW8PLCFMan::AdjustEnds deeply flawed concept wrt change tracking but underlying problem is... commit b3cee382f449aa69213dc21f7b1ba6a5356d2865 Author: Caolán McNamara <caolanm@redhat.com> Date: Mon Jun 27 14:52:41 2011 +0100 Related: #i76955# make this 4+ times faster Change-Id: I1cd42a0f51599efab9352c960a5f496626af7ac0
2016-07-22Resolves: tdf#59896 ww6 plcf generation reversed checkCaolán McNamara2-0/+7
regression since... commit 69e040a59e1c6497b606da8a27e8f605edd041bb Author: Caolán McNamara <caolanm@redhat.com> Date: Sun Jul 17 00:19:00 2011 +0100 check seeks, check available size, pointers to ref Change-Id: Idfcde46959e5693d200a91a619e7196f00f40ca0
2016-05-10Remove default outline indent, fixes tdf#95576Luke Deller2-0/+41
The default document outline style has indents set appropriately for numbered headings. However numbering was disabled in the default outline style 20 years ago (!) so update the indents accordingly. Also revert commit 05fd8cb848ecba425124d61cd76e2f9418d5378c which attempted to work around this issue by explicitly setting a zero indent on the default paragraph styles "Heading 1", "Heading 2", etc, as this is no longer required. This change fixes a DOC import issue tdf#95576 (!) Reference: see this old German comment https://cgit.freedesktop.org/libreoffice/core/tree/sw/source/core/doc/number.cxx?id=84a3db80#%6E647 Change-Id: Id289143ed859861f2584e21969f16f348e215f6f Reviewed-on: https://gerrit.libreoffice.org/24806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-28tdf#74328: loading section page no. as 16 bit unsignedOliver Specht2-0/+14
The sprm sprmSPgnStart97 contains a 16 bit unsigned value. Test included. Change-Id: I300e9a94c13666cf8e71d3613b8f1171c7314cdd Reviewed-on: https://gerrit.libreoffice.org/24431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-04-07tdf#99120 DOC import: fix lack of first share after odd section breakMiklos Vajna2-0/+9
Commit 848b1a05c5c41b5e7ff19c984f60c297a8143990 (fix for bnc#659631, 2011-02-04) made wwSectionManager::InsertSegments() use SwPageDesc::WriteUseOn() directly, instead of going via SwPageDesc::SetUseOn() that takes care of not throwing away the higher share bits of the bitfield. This way the "is first shared" flag of the bitfield got cleared, even when the input document had no title page declared, so first header/footer must be shared. Fix the problem by using SetUseOn() in the DOC import as well when it comes to handling odd/even page section breaks. Change-Id: If167f4582919fa177840ed81e0a53aa379485598 Reviewed-on: https://gerrit.libreoffice.org/23885 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-06tdf#99100 DOC import: handle subset of STYLEREF nativelyMiklos Vajna2-0/+9
Commit 4215bca95511af8e4ee96e3c8f521b35f638aef3 (export 'Chapter' field type as 'StyleRef' into .doc, 2015-08-21) mapped SwChapterField to STYLEREF in the DOC export. This field type was handled as a field mark on import. Instead of always handling it as a field mark, recognize the case when it's the subset we write and we can handle natively, and in that case create an SwChapterField again on import. Leave the complex case unchanged as before and keep using field marks for that. Change-Id: Icfa8c4be6538da5e02e2d5071af30a46ccfa712b
2016-03-09sw testcases: avoid using UI name for default style nameMiklos Vajna1-2/+2
Change-Id: Ic2e08245dd022555ad6308283d406d81141a9124
2015-12-14DOC filter: mark SmartTag support non-experimentalMiklos Vajna2-41/+0
And also relax two import conditions, as it turns out Word accept those. So instead of checking for each offset/length one by one, only check once. It's now as good as the DOCX one, I believe. Change-Id: I1890ef61fdbbd2ab6facaf3e787f75b791adcfdc