summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2013-11-29Related bnc#837302: Don't introduce a redlined delete and the end of doc.Jan Holesovsky
Change-Id: I5c3903a40b69867684707d33acbc92b1f80a93ec
2013-10-02bnc#779620 DOCX import: try harder to convert floating tables to text framesMiklos Vajna
Since 78d1f1c2835b9fae0f91ed771fc1d594c7817502, we convert floating tables to text frames only in case it's possible that there will be wrapping, to give better results for multi-page tables, which are multi-page, and technically floating ones, but that has no effect on the layout. The problem was that we try to do this decision too early, effectively the page width and margins were counted from the default letter size, instead of the actual values, which did not arrive at the time of the decision. Fix this by moving this logic at the section end. Change-Id: Ic1fbceb54c8ec223ed01836fafe6220bb3b2410a (cherry picked from commit bbef85c157169efa958ea1014d91d467cb243e6f) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx
2013-09-03fdo#68607 bnc#816593 DomainMapperTableHandler: don't always start a frameMiklos Vajna
This is a port of commit 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de "Related: fdo#61594 SwWW8ImplReader::StartApo: don't always start a frame" from the WW8 filter to the DOCX one. (regression from edc4861a68e0269b83b17e0ec57912a1ce4220ad) (cherry picked from commit 78d1f1c2835b9fae0f91ed771fc1d594c7817502) Change-Id: If1bb4a8a3786aacd618585cf859b57ce9be85c51
2013-09-03bnc#816593 DOCX import: ignore page breaks in tablesMiklos Vajna
(cherry picked from commit 7d3778e0ef9f54f3c8988f1b84d58e7002d6c625) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: Ibb250148d41d1929fa17dd993bb71c93c0e09dcf Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx
2013-09-03bnc#816593 DOCX filter: import paragraph spacing from table styleMiklos Vajna
(cherry picked from commit 17e904ed66c3caf87e658b9d3a18d7b13f4a0b52) Change-Id: I9dce59ecd8a2d2bfadb8c7273cd46c6c0cf17774
2013-09-03bnc#816593 DOCX import: fix auto table width wrt nested tablesMiklos Vajna
This is a backport of the fix + 3 other commits from master, which were needed to make the testcase pass on -4-1 as well. (cherry picked from commits 74c5ed19f430327988194cdcd6bdff09591a93fa, 824cc4bf4ae9035d4108e8da8e81eb57284f0b54, 53d27a30ce5f2c9f7d37a4089286116854c16215 and 76d1ca523ddcf89cc269fe51c70e66066943ef5a) Change-Id: I62a1f526cf1d4e4056daa1495d61f1b9f5c0b1b2 Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/DomainMapperTableManager.cxx
2013-09-03bnc#816593 docx import: fix incorrect nested table marginsPierre-Eric Pelloux-Prayer
Change-Id: I07f0f47fcbd3d463d7831820cde338d8d59d9b68 (cherry picked from commit 194ba3a2cacbb5438dfcb8fb35167055e01ca251)
2013-09-03bnc#816593 DOCX import: let w:before not overwrite w:beforeAutospacingMiklos Vajna
And do the same for w:after / w:afterAutospacing. The spec says that if w:beforeAutospacing is read, w:before should be ignored, this implies that if we already had w:beforeAutospacing, w:before should not overwrite the already existing top margin. (cherry picked from commit de516780bf2d5f74afe643033bfc528c53013902) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: I9437cb5c6fc352a360e27aa279d0a789706c5578
2013-09-03bnc#816593 DOCX import: fix auto para spacing without compat optionMiklos Vajna
Paragraph auto spacing (before and after) without the w:doNotUseHTMLParagraphAutoSpacing compat option was incorrect. (cherry picked from commit 279ff2e03371542d014bf281e73282ba8080cf6b) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: I56d6153f7c489de7fceaf6fab7325c42ee8f9cae
2013-08-26bnc#834035 Introduce msfilter::util::findQuotedText()Miklos Vajna
This was in writerfilter, but we'll need it soon in sw as well, so move it down to msfilter. Change-Id: I8efe02b6bbe8f391d9e14857ed58dbae184d5632 (cherry picked from commit 750f0ebf97d19d1cf305dabe72d52ad6e90adf70) Conflicts: include/filter/msfilter/util.hxx writerfilter/source/dmapper/DomainMapper_Impl.cxx
2013-08-14w:spacing in a paragraph should also apply to as-char objects (bnc#780044)Luboš Luňák
Otherwise global w:spacing will be used even if overriden locally. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I01f0a3a323566f6e29faf73bf9d2ba874565eb42
2013-08-09n#816593: docx consecutive tables with different tblpPr needs to be splitCédric Bosdonnat
When importing docx with 2 <w:tbl> following each other, we have 2 possible behaviors: either merge them as one table as we did before or split them into two tables. The tables need to be split if they have different floating position properties. This required the ooxml tokenizer to repeat the table properties for each row of the table: or how would we know we don't need to split the table? The basic idea behind this hack is to temporarily store the table position and table properties before saving them. Thus we can compare them at the end of the row and decide to split the table or not. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I2e3e70dfe7386090fe356575ee9d0e81aa031dc4
2013-08-07avoid crash when no table grid is givenLuboš Luňák
The document may contain just <w:tblGrid/> and <w:tblW w:w="0" w:type="auto"/> . It appears we do not handle the auto width properly at all, but at least don't crash. Change-Id: Ibdc9d1ad69c13456acd347a151ec8739bcb98855
2013-08-07fdo#67498 RTF import: fix missing margins vs continuous section breaksMiklos Vajna
The document had 3 sections, separated by continuous section breaks. Previously only margins from the last section were imported, this way the first page had default margins. Now margins are also applied when we hit continuous section breaks. This way margin values from the last section break affecting the page wins. A later commit could improve this further by setting the minimum of these and setting a section margin for each non-minimal sections. Change-Id: I4d9a4585e795220533909bd1d467d933caaa0d71 Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
2013-08-07compatibility setting for MS Word wrapping text in less space (bnc#822908)Luboš Luňák
The document itself is stupid and uses a SURROUND_THROUGH object with a number of empty lines that make it act is if it in fact was SURROUND_NONE, rather than actually disabling wrapping for the object and be done with it. But the difference was that Word still managed to fit those empty lines next to the object into the little space that was there, while LO already considered the space too small. So keep a compatibility setting for Word documents in order to avoid problems with such lame documents and hopefully that's enough. Change-Id: I7d17b90de381fd86914ce5efd9c5a29fe4850edc
2013-08-05fdo#66474 DOCX import: fix handling of mixed fixed/auto cell widthsMiklos Vajna
Instead of checking if any cells have fixed width, check if all calls have fixed with. Regression from 74c5ed19f430327988194cdcd6bdff09591a93fa. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I58d3d16cbaa2c54a8a1ac309910336c72dcb39b7
2013-08-01DOCX import fix for table with auto sizeAdam Co
Reviewed-on: https://gerrit.libreoffice.org/4496 Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: Ic86f4f142e579bdef3e954492e1c1e382a545739
2013-07-18n#825976: handle TOC \h field for illustrations tables in writerfilterCédric Bosdonnat
Change-Id: I9ebc91d5f0e706dc1e316e0aa8494af7aec4da4e
2013-07-10writerfilter: not every field has a Content propertyMichael Stahl
... so don't try to get it unconditionally (but SetExpression does have it). (regression from c7e4264bed4e77daccf2f72063e5e00f1008c3cf) Change-Id: I14d24bd70f569ba0bc4f1e48d56ebf43c1441783 (cherry picked from commit 1c90902cbccd4e4f5946dfc454da351c33c24f71)
2013-07-04n#825976: Fixed the import of Table of FiguresCédric Bosdonnat
Support the TOC \c switch and fixed the SetExpression current presentation property to have updated fields and TOC. Change-Id: I6fbd7cc38cf8ea7f08a0d15d1f39ffe4805dd62b
2013-07-04n#825976: Added common flags support for SEQ field importCédric Bosdonnat
Change-Id: I9a4505cf060880811abfe355b2ebf810cde9a4d6
2013-07-03n#825976: writerfilter initial support of SEQ fieldsCédric Bosdonnat
No switch and no numeric formatting is taken into account ATM, just the defaults, but at least we have the fields properly created. Change-Id: Ib17c5e93199044a05005e4648c7e4cc81baf51dd
2013-07-03n#820503: initial MCE support in writerfilter ooxml tokenizerCédric Bosdonnat
writerfilter OOXML tokenizer was just ignoring the mce elements and thus getting the Choice content and the Fallback one. This initial support drops all mc:Choice contents to read mc:Fallback. At least for drawingML vs VML support, we have a much better support of the fallback. Change-Id: Ic0bf69d0436994e9cfcf38accdd57d17e9f391fe
2013-06-26bnc#823675 RTF import: fix import of numbering bullet associated fontMiklos Vajna
There were multiple problems here: - \f had a special handler for the listlevel destination, \af had not - in case of multiple \f or \af, the first one is used for the bullet font - in case only \af is used for the bullet font, its value should be used for \f as well Change-Id: I6631504c1aa9f2e0792a3469a5fdce5b7bd49518 (cherry picked from commit 55162d7422a3b175c7fe9c175e0dec91b1932b6a) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx
2013-06-24bnc#823655 fix RTF import of freeform shape coordinatesMiklos Vajna
E.g. 0,1 was imported as 1,0, as we did not differentiate between not having the coordinate yet and having it as zero. Change-Id: Ia5fbbcc791dc9c6866ffd4c146793690661d81b4 (cherry picked from commit ddddfe8d6ffa05c467bddb3480e43d7043a3d3c9)
2013-06-24bnc#823655 RTF import: ignore styles without a typeMiklos Vajna
Regression from 29dcdf6b56f8dbc1b7de0478afb04122f8dbf0f9. Change-Id: I970c0e7b3652d7e6f093815b90e04e0c45904b28 (cherry picked from commit c6a941b51b68eb097d4d43323b39ff1aba4c753e)
2013-06-19n#820800: docx import of wrap polyon was based on dest size of pictureCédric Bosdonnat
... instead of the original size of it. Change-Id: Ib251206dd092a7c47343caf50bd05a3dfec1af09
2013-06-19bnc#825305 RTF import of fFilled shape propertyMiklos Vajna
Change-Id: Iaa2ff9d5d1a28aec046f885acecbd1a44c734ec0 (cherry picked from commit 2af60e2eff4e952fff8cac0228b89f16ce3a436e) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/rtftok/rtfsdrimport.cxx
2013-06-18n#820836: dmapper, fixed typos in first page style creationCédric Bosdonnat
Change-Id: I80031cab7c0304311bd5acbb3a2ead48e15594bb
2013-06-17n#820504: default color hidden by Default style in writerfilterCédric Bosdonnat
Setting the font color of the default paragraph style to Auto makes the color set in the Writer defaults (from rPrDefault) ignored. Change-Id: I1dcd92bcd0774f5229785373242899a492ab7b7c
2013-06-13n#816593: Floating table width import fix: adjust the frame widthCédric Bosdonnat
(cherry picked from commit 9f4c8a8bca06b4c2a916a51909367b453fc41a8b) Conflicts: sw/qa/extras/ooxmlimport/data/table_width.docx sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I8212bc5981418f6cbd514bf5002e6a5dbdf53152
2013-06-12bnc#820819 docx import: don't apply complex font size to non-complex fontPierre-Eric Pelloux-Prayer
OOXML spec says: "[szCs] specifies the font size which shall be applied to all complex script characters in the contents of this run when displayed" Change-Id: I0faf599e38ef5a2e2005bb6f98874639be7d8287 Reviewed-on: https://gerrit.libreoffice.org/1454 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz> (cherry picked from commit 73731b01cd65defdf9b42a9754bede3ba84221d7)
2013-06-06add some checks against NULL derefsCaolán McNamara
Change-Id: I85fbf279991ee361ea081d92d9acc84d36677af1 (cherry picked from commit fa671cecd4bb2f38a0a9171cfdbb56efddda1cfa) Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-06-06valgrind: uninit variableCaolán McNamara
Change-Id: I5640291d9e221c9cffd7daec9d46a313fddfaf4e (cherry picked from commit b5d93a58a7f4e23432f18da0946bac04027c23a8) Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-06-05bnc#820509 DOCX import: handle M.d.yyyy date format in w:sdtMiklos Vajna
Change-Id: Iae233c24a9580ffc8ea4680276161a543171f63c (cherry picked from commit 58197c3692df0d0fccb5bc7abddaf6d9667565f6)
2013-06-05bnc#820509 DOCX import: try harder to disable form design modeMiklos Vajna
Previously this only worked if we had indexes in the document as well, but actually these are independent. Change-Id: I28afa60d2606230c901948d4c1da8f5a7c50a9f7 (cherry picked from commit 3d6a7cf3eb7aa966601cbc019d1ad5fafdddd21f)
2013-05-30fdo#64671 Some special RTF characters were not skipped correctlyUrmas
Some special characters, like { and }, were not skipped when they occured as a replacement character for \uN keyword. (cherry picked from commits bfb93ffc6d72d22a833acf9d8c9d166153dad7c0 and ec8e012e980c88c8f24a7de44e44d0319bae2801) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I19b66a290cd9880924774fa89bb29df280e44a3c Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-05-30bnc#817956 DOCX import of page border shadowMiklos Vajna
See the comment in SectionPropertyMap::ApplyBorderToPageStyles() on what and how is mapped. The control flow is like this: BorderHandler::lcl_attribute() notices w:shadow, then PageBordersHandler::lcl_sprm() gets it, passes it to SectionPropertyMap::SetBorder(), finally SectionPropertyMap::ApplyBorderToPageStyles() uses the UNO API. Change-Id: Ib0aef3245f58c62655769357f1f4dd07eef77f62 (cherry picked from commit f0aa209390aea68f4c23cf16df9d1577aaea91b5)
2013-05-30bnc#817956 DOCX import: missing last character of shape textMiklos Vajna
Make sure writerfilter only removes the last character of the text if it's a newline. Change-Id: I96980e2d148ced93363b3147545afdd0dd070e5d (cherry picked from commit 4eaabc45f76aefe82558b283975ab9df3aea7fce)
2013-05-30bnc#817956 DOCX import of document background colorMiklos Vajna
See wwSectionManager::SetSegmentToPageDesc(), this has to be applied to every page style. Change-Id: Iea2707ae665a55eabda3ed7575cf3658f7af5237 (cherry picked from commit 992da0d5cf04497bad55637f6a6ebfcdaec03e16) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx
2013-05-28docx import, fixed croppingSJacobi
Change-Id: I910c2f769e88c5d9d17fc5bf072909b4b7f28ef0 Reviewed-on: https://gerrit.libreoffice.org/2557 Tested-by: Luboš Luňák <l.lunak@suse.cz> Reviewed-by: Joren De Cuyper <joren.libreoffice@telenet.be> Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2013-05-23fdo#64249: make sure we have matching start/end level for table in shapesCédric Bosdonnat
Change-Id: I4928f6a54e6cca9b26c0d2391fc1545688be2375 (cherry picked from commit 9ceda3013a6b7e60e0e56ba540e217fd36a34a0f) Reviewed-on: https://gerrit.libreoffice.org/3907 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-05-23map docx line alignment properly to writer's line-of-text align (bnc#820792)Luboš Luňák
Apparently the top/bottom line of text alignment in writer is backwards compared to all others, while alignment to the top of a page puts an object's top edge at the top of the page, top of line of text puts the object on top of the line (i.e. bottom edge of the object at the line). The handling of NS_rtf::LN_YAlign suggests that swapping bottom and top in the input filter is the right way of handling this. Change-Id: I916c8ea0f2fd00de3e17b16b31433c9b6ba92e64
2013-05-23bnc#819882 DOCX import: backport table-related fixes from libreoffice-4-1Miklos Vajna
6718482c072defe5d885030826fef5ef833732e9 2013-03-28 fixed table width, supporting rel table width, fixed grid handling 84f1fa190fc2b91d21b685f4d0ea99aaeea26fe0 2013-03-28 WaE: -Wsign-compare 584322cbbd063e0a8d2c18a5e6a12f213af56057 2013-03-28 fix failing testcases
2013-05-21bnc#818997 RTF import: don't ignore page breaks between shapesMiklos Vajna
Change-Id: Ief71ba9a3c60356714e73d08e88d0a3105b17b1a (cherry picked from commit b40fe8e5a5037d2745cc7b1c9cc408ce6c79b9d9) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx
2013-05-16bnc#779630 DOCX import: improve w:sdt size guessingMiklos Vajna
The problem was that when border was enabled (and the importer leaves it unchanged, and it's on by default), there was not enough space for the text. Change-Id: I3ce770eb523389bcf7c5e83d4e76155e2c45de6d (cherry picked from commit d0edc4e4c3709a3d0300e0b2b035e10493f583f9)
2013-05-07Fix out-of-bonds Sequence access in NumberingManager with page numberingFridrich Štrba
Change-Id: Ib35fcee1605215fb22ae9838b29fe1d8be5eaf58 (cherry picked from commit 4314e6548356a5d2f1dc45e2aa501e37bd5a794e) Reviewed-on: https://gerrit.libreoffice.org/3739 Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2013-05-07fdo#63685 wp:inline's distT/B/L/R is in EMU's, not twipsMiklos Vajna
Regression from 3d7e168a2a43c2414b0633379102ddb29437e75b. (cherry picked from commit a88ac708403c03d0f950f09ec29c0d5a1e5a85b4) Change-Id: I9ab3f9f41316a01d5a74f3e500bad7a83c8d2dca Reviewed-on: https://gerrit.libreoffice.org/3485 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-05-06fdo#63023 incorrect RTF background color in headerMiklos Vajna
(cherry picked from commits 3d4fef85d05269e613316a7af6245f05d207d76e and 08dc5de900b2e5cca9d9443fc5d4ea7756842af9) Change-Id: I33f5c8a856206860ac9cdb23dd6b5222cb785bf7 Reviewed-on: https://gerrit.libreoffice.org/3461 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-05-02bnc#779630 initial DOCX import of w:sdt's w:dateMiklos Vajna
Also factor out the w:sdt-related methods to a helper class to avoid DomainMapper_Impl become a God object. Change-Id: Ic1a388940bce89688e8558818f92ce9ac997609c (cherry picked from commit 3ec2d26dc2017ac4a27483febfc63328632f352d) Conflicts: sw/CppunitTest_sw_ooxmlimport.mk writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx