summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8import/data
AgeCommit message (Collapse)Author
2015-03-14tdf#89482 fix __refheading__ regression, set only CrossRefs as TOC.Justin Luth
bugfix tdf#68963 marked all __refheading__ bookmarks at TOC, but those crossreferences were deleted if they are not recorded in aReferencedTOCBookmarks. Redesigned the fix to include _Toc in the crossreference name that is auto-generated, which is how MSWord differentiates the markers. Updated the test document to include even more combinations of cross-references and numbered heading references. Change-Id: I3d60d2b528ebfa1ffb108bbfc9e7db2c604af49b Reviewed-on: https://gerrit.libreoffice.org/14822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-01-22fdo#68963 recognize __RefHeading__ bookmarks as TOC in .doc filesJustin Luth
LibreOffice recognizes MS Office Table Of Contents, but LO files saved as .doc didn't show the Cross-Refence heading - it was blank. Now bookmarks using the LO naming convention are also imported as TOC bookmarks from .doc files. Testcase included. Change-Id: Icae5c0de31856ccc75ede9a97c0ea046dd97325f Reviewed-on: https://gerrit.libreoffice.org/14018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-09-16Resolves: fdo#68967 looping layoutCaolán McNamara
RemoveFollowFlowLine() marks the layout invalid, but the next cycle through does everything exactly the same again. Try the same foul horror as nUnSplitted. But at least with a test-case that nails down reproducing the bug if a better fix is needed. Change-Id: Id6698bcb2364bd0253bedd4a7c313e25f705be8d
2014-08-17fix reading a .doc that has frame anchored to the end of page (bnc#787942)Luboš Luňák
MSWord, unlike Writer, can anchor even to a page break (i.e. after the last paragraph). When this document was read, what happended was: - the last paragraph was read and the current position PaM was set to point after it - frame was read and anchored to the PaM - page break was read, making everything following be moved to the next page; including whatever ended up at the PaM position Handle this by checking for this case and inserting an extra empty paragraph before the break. This shouldn't affect layout of the page itself anyway, since the break should leave room for it (and MSWord shows a page break there if control characters are enabled, so there is room). Change-Id: Ia2a13bf5cf1c959b5aa228254365019a00a22679
2014-08-17remove executable bitsThomas Arnhold
Change-Id: Iec785ae538de81325812b1e6fe33115789b39770
2014-07-21ww8import create a pagedesc if continuous section changes margins (bnc#875383)Luboš Luňák
This is similar to what writerfilter does. MSWord can have one page with several different margins, which are saved using continuous sections, which causes all kinds of trouble, because either we treat them as Writer sections, which means we lose some of the data, or we treat them as Writer page styles, which causes spurious page breaks if in the wrong place. Either option has its problems, but here it seems slightly better to go for keeping the data and hoping the page break will be in a place where a break will be anyway. Change-Id: I8f52aa820750da6788ea04180a15ac334f6bf87b
2014-07-21fix floating table over section with several columns (part of bnc#875383)Luboš Luňák
Change-Id: Ic6e75cc2cedb61754b45bc4678a1185f580d5ed6
2014-07-13fdo#81102: fix .doc import of blank even page headerLuke Deller
Honour the "different odd & even pages" header/footer setting from the doc file even if there is no content for an even page header or footer. Conflicts: sw/qa/extras/ww8import/ww8import.cxx Reviewed on: https://gerrit.libreoffice.org/10191 Change-Id: I963f7f7189e399b1d859db0788fbfd291e868c54
2014-07-12fdo#80333: .doc has large black rectangles between paragraphsZolnai Tamás
These black rectangles are character shadows, because checking whether there is a border at all was missing. In Word there is no shadow without a border. Change-Id: Ib3cb4e904fdd33f215c81d7c02762a196f484b1b
2014-07-09fix fdo#77844: header wrongly enabled from .docLuke Deller
The LO page style needs page headers to be turned on if the corresponding .doc file section has a left (=even) page header or a first page header. However this should not be triggered in the case where a first page header is present but hidden due to the "different first page" header option being disabled. This case is fixed by this commit. Change-Id: If3de0df45378587fdbdecc6a091d2f4b60940b43 Reviewed-on: https://gerrit.libreoffice.org/10100 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-06-24fix reading of section margins (bnc#875715)Luboš Luňák
The reason the section ended up with incorrect margins was because that is computed as 'page margin' - 'section offset', and the order of setting these up was backwards: First InsertSection() created the section using the page margin of the old page, and only afterwards SetSwFmtPageDesc() set the page margin that should be used. Change-Id: I18ddcb0b5928879a2297b6caca766eab979abd45
2014-05-26bnc#863018 WW8 import: fix upper margin of multi-page floating tableMiklos Vajna
A vert orient position was already handled in case a floating table was imported as a TextFrame, but in case we didn't do that, the vert orient position was simply lost. Fix this by importing it as the upper margin of the table (assuming that the position is relative from the anchor position). Change-Id: I3e96f3068605fd6313dfb3e55483e1bce6c063a5
2014-04-30tests for msoffice brightness+contrastLuboš Luňák
For commits 1139d618b8bc6ab823a96184bd0f0257980aad24 and 893fe88469dec5b727d96f8ea1b4edb9e88288a7 . Change-Id: Ia59ec5c4226944280c4b585c87179d28303bda4b
2014-04-17remove executable bitAndras Timar
Change-Id: I91f6e861f6d0dbea1b57ac73857e0c706b27f681
2014-04-03bnc#821208 DOC import: fix unwanted char background in numbering char styleMiklos Vajna
Word supports formatting the paragraph parker itself, and we import that as a formatting at a position after the last character (e.g. "foo" will have that formatting at char pos 3, which is ignored by the layout). In addition to this hack, commit 1c22545edf9085b9f2656ca92781158b6b123db3 (Fix issue #i119405: Numbering text style changed after importing the *.doc, 2012-08-24) added a SwTxtNode::TryCharSetExpandToNum() hack to Writer core, where in case such a paragraph marker attribute is set, and the SwTxtNode has a numbering, then also modify the associated character style as well. As that commit already noticed, there are attributes which should not be propagated to that character style. Extend this blacklist to ignore RES_CHRATR_BACKGROUND as well, as Word does. Change-Id: Idcb40d37d8688c76fbd61f28428f6e3bc995f799
2014-03-27Unit test for .doc import of full colour bordersLuke Deller
This test exercises the import component of commit ad51d4952dc30e0d1cdcc6037556cd7c66a61542 which adds support for full colour borders in .doc import/export. Also this test showed that page border import was not actually covered by ad51d4952dc30e0d1cdcc6037556cd7c66a61542, so that omission is fixed here. Change-Id: I6272e9b22415b5af012145e99360c5765d5aec60 Reviewed-on: https://gerrit.libreoffice.org/8759 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-03-26cp#1000044 DOC import: fProtEnabled means document is not totally read-onlyMiklos Vajna
Reading the spec, it seems that we have two cases here: - if lKeyProtDoc is set and fProtEnabled is 1, then editing forms is allowed - if lKeyProtDoc is set, but fProtEnabled is 0, then the document is totally read-only So in the first case avoid the SetModifyPasswordHash() call to allow form field editing. Change-Id: Id0c48e8eb4bde75c5520a7b108fcfada51148faf
2014-03-06cp#1000039 DOC import: ignore symbol charset of the symbol fontMiklos Vajna
Otherwise characters unhandled by our OpenSymbol font (like Arabic 0-9 numbers) won't be rendered using an other font, as no other font provides the symbol charset. Do this in SwWW8ImplReader::GetFontParams(), where we already have font name -> font family mappings for a few well-known fonts. The DOCX filter does the same for quite some time, and that's how Arabic numbers in text using the Symbol font were rendered, instead of little rectangles. Change-Id: Ib794cac19ad7b073e39f3cbd7d4bad3994151c14
2014-03-04bnc#821208 DOC import: don't overwrite WW8Num* character stylesMiklos Vajna
In general we're overwriting styles on import in case we're not pasting. But these WW8Num* character styles are in general not from the document, they are created because Writer needs a character style for each numbering level to handle what's in the DOC file. So, in case there is a character style with the same name as our "character style for numbering" styles, prefer the later ones, as that's intended most likely. Change-Id: I675f867722360aca765bb96b0b43ea47deab9847
2014-01-03cp#2013101510000026: doc export of commented text rangesZolnai Tamás
Change-Id: I2d31da5d659edcbebc682d5604d2db24b5e341fb
2013-12-23sw: chmod -x docx, doc and rtf testcasesMiklos Vajna
Change-Id: I6f6726dd99a3f894ae86de279c74270e19b49d0e
2013-10-15WW8 import: fix handling of sprmPIlfo when sprmPIlvl is missingMiklos Vajna
Commit 542a0d7260e4767d8aff839eb593e748a82ced48 (#100044# Cleanup for optimization defines->enums, 2002-08-14) added the problematic "else" without mentioning the reason, so I assume it's safe to just revert that part. Change-Id: Id90fbdfb1116be458a76c9653fec0633edc34fac
2013-10-15fdo#36868 WW8 import: allow outline numbering and list style in the same ...Miklos Vajna
.. paragraph style The original problem (from a user's point of view) was that the second level of the numbering started from 1.1 instead of 2.1 in the bugdoc. This was fixed by using outline numbering for level 2 as well, but this is problematic in many cases: we want to have outline numbering exactly when outline numbering is enabled for the given paragraph style. So revert the change in SwWW8ImplReader::SetStylesList() and fix it differently: SwWW8ImplReader::RegisterNumFmtOnStyle() explicitly ignores list style if outline numbering is available with no good reason. Both the WW8 format and Writer core allows to have outline numbering and a list style at the same time, so set list style even when outline numbering is available. This fixes the original issue, too -- without introducing nasty fake outline numbering usage. Also add a testcase for the original issue. (regression from e3d5c3e0746916c4056389dd8c2daa6c451c8f6e) Change-Id: Id7d2d67a96a858aee3230110cb518fea51d19d38
2013-08-08bnc#823651 WW8 import: fix paragraph style in empty first page headerMiklos Vajna
The problem was that the first page SwFmtHeader / SwFmtFooter wasn't created in case the header/footer text was empty, even if fTitlePage was set. Change-Id: I5e58419161bcc663e2beb0338b95877469e0fd3c
2013-06-06wwSectionManager: fix import of page bordersMiklos Vajna
Regression from 1e113cb7604e1509e7d598a9be329f1f7b6e9322. According to the spec (see 2.9.181), the first bit disables border of "all but first" pages, the second bit disables the border of first pages. Change-Id: Ie49c9b7b76d34c2a93350481965790976f49d7df
2013-05-13bnc#816593 WW8 import testcaseMiklos Vajna
This always worked, but I almost broke it with 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de. Change-Id: I6b7817830da23afea758d1eb90395aeb01e32f67
2013-05-13bnc#816603 testcaseMiklos Vajna
Make sure that at least full-page-width multi-page floating tables are imported on multiple pages. Change-Id: Ifb974d50c50b1495634ac2652a3ae46235bb5f52
2013-03-12Related: #i120158# add a test-case for tricky am/pm escape problemCaolán McNamara
Change-Id: I4905fb384694c3f1dadccc6d8513c9a050e3f67b
2013-01-21fdo#59530 WW8 import of commented text rangesMiklos Vajna
Change-Id: I3e2928922ebcec8188c1b5416108373c4f26dd62
2012-08-15moving border tests from {rtf,ooxml,ww8}tok to {rtf,ooxml,ww8}importArtur Dorda
Change-Id: I705fc507429c5516e88597bd4db9e2e3dead8d93
2012-07-13sw/qa/extras: rename import tests from *tok to *importMiklos Vajna
odfimport sounds much better as there's no such thing as "odftok" Change-Id: I0a8684377c257f2c40a2e8255f62343d4ff2272a