summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2015-10-07tdf#92454 DOCX import: allow overriding para prop from num style in para styleMiklos Vajna
Word has a feature like this: a paragraph style can refer to a numbering style, and both can specify paragraph margins. If that's the case, then the ones from the paragraph style has priority. In Writer, the numbering style has priority, so the only chance for correct import result is to set the margin directly on the paragraph in this case. (cherry picked from commit f4badd9a485f32f787d78431ed673e2932973887) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: Iff3b03bcc56e0db3a48452c293acf41c91b8f159 Reviewed-on: https://gerrit.libreoffice.org/19100 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2015-10-02bnc#939996 tdf#93919 DOCX import: fix left-from-style and first-from-directMiklos Vajna
With this, <w:ind w:hanging="..."/> as direct paragraph formatting and <w:ind w:left="..." w:hanging="..."/> as a numbering level formatting is properly merged, i.e. w:left is not lost, defaulting to 0. (cherry picked from commit 56341e5d496f576dc45fe8e6c44831d780fecb73) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: If5534fbd9ee6d41139b0ed3a3df9d0cc5aad3239 Reviewed-on: https://gerrit.libreoffice.org/18907 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-20tdf#86374 DOCX import: fix btLr text table direction without <w:cantSplit/>Miklos Vajna
Commit 0208ead70a9412ccd554fcef3e9308f8ca17037b (DOCX import: improve btLr table cell support, 2013-02-22) made any table row that has at least one btLr cell fixed height. This causes problems in case a table has a minimal height with lots of content, where the fixed height gives wrong layout, but the minimal height is correct. Fix the problem by only making the row fixed height if <w:cantSplit/> is set (as seen in the old bugdoc), and revert to setting the height type to minimal in any other case. (cherry picked from commit 233a634a112e6dae07dca5fb1296764cb0001503) Conflicts: writerfilter/source/dmapper/TableManager.hxx Change-Id: Ibaf91f542e64e5caa7904df97eb6eb52618e0023 Reviewed-on: https://gerrit.libreoffice.org/17392 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-20tdf#91594 misinterprets letters from Symbol font in docx filesMark Hung
Fix the issue caused by wrong assumption about symbol chracter and symbol font attributes order in writerfilter. Also allow symbols to be displayed if user's language is not Western. Reviewed-on: https://gerrit.libreoffice.org/16543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: I602d9fbfa79c33c90f655dbf5ee22738b6391ae6 Reviewed-on: https://gerrit.libreoffice.org/17456 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-08-03tdf#89702 DOCX import: fix too large bullet characterMiklos Vajna
Commit c1f8437dbed0e8b989e41a345ef7e658a6e8a4cd (fdo#83465 RTF import: handle font of numbering, 2014-09-25), changed the "get the me character style of the current numbering's current level" member function to be successfull even in case we're inside a DOCX run, not when we're inside a DOCX paragraph, but outside runs. While this is necessary for RTF, the side effect of this was that unwanted run properties started to affect the above mentioned character style in case of DOCX. Fix the problem by enabling the "in paragraph and run" looking for RTF only. Change-Id: I610bfce6cec15b918fe547402360f5a894401f7e (cherry picked from commit fc7c1a07d0d5e21a4e1533a0e5b0ac256763f973) Reviewed-on: https://gerrit.libreoffice.org/17380 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2015-08-03tdf#90046: RTF import: ensure that a run is started before \footnoteMichael Stahl
Avoids crashing with empty context stacks. Change-Id: I0ee8b457fdbb19b55f5c15876b7253680cde6e23 (cherry picked from commit a61fd02c819433a1206b3b3e61017ba2d0d3d467) Reviewed-on: https://gerrit.libreoffice.org/17333 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-03tdf#90611 DOCX import: fix missing paragraph style on footnotesMiklos Vajna
One one hand, a problem since commit 330b860205c7ba69dd6603f65324d0f89ad9cd5f (fdo#68787 DOCX import: handle when w:separator is missing for footnotes, 2013-09-04) was that the type attribute from <w:footnote w:type="separator"> resulted in two ooxml:CT_FtnEdn_type tokens, ignoring too many paragraph ends for footnotes, which resulted in missing paragraph style on footnotes. On the other hand, fixing the first problem showed that it wasn't correct that commit 9389cf78e304a5a99bcf1745b9388e14ac36281a (cp#1000018 RTF import: empty para at the end of footnote text got lost, 2013-11-15) unconditionally removed the RemoveLastParagraph() call in DomainMapper_Impl::PopFootOrEndnote(). It turns out that RTF and DOCX have different semantics here, the footnote is always within a <p></p> pair in DOCX, while in RTF a \par at the end of a footnote means an empty paragraph. Fix that by conditionally restoring the removed RemoveLastParagraph() call. (cherry picked from commit 519b34300f73b1e08f6194d6ba49d4fc010cf186) Change-Id: I33020ac761c94addfec8164a17863565e4453b07 Reviewed-on: https://gerrit.libreoffice.org/16879 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-03tdf#89890 DOCX import: fix too large num pic bulletMiklos Vajna
Reading SwWW8ImplReader::CoreLoad()'s "update graphic bullet information" block, it turns out that the numbering picture bullet's height should be independent from the supplied bitmap, and only its aspect ratio should be respected. Reviewed-on: https://gerrit.libreoffice.org/16500 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit eab89b7f024a8c86decdcb3362c40c40a7df37df) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I1300aa0397a8098df2a3170af795fbba47fd2a9e Reviewed-on: https://gerrit.libreoffice.org/16844 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-08tdf#89698 DOCX import: inline picture should have no spacingMiklos Vajna
Commit 3d7e168a2a43c2414b0633379102ddb29437e75b (n#783638 DOCX import of wp:inline's distT/B/L/R attributes, 2012-10-11) was about a picture that had non-zero spacing in LO, but zero in Word. The hope was that the problem is just that the value is not imported. Then commit a88ac708403c03d0f950f09ec29c0d5a1e5a85b4 (fdo#63685 wp:inline's distT/B/L/R is in EMU's, not twips, 2013-04-19) was about a picture that had so large spacing that the picture become invisible. Fixing the unit of the spacing value made the picture visible again. What was missed is that this value is just stored in the doc model, but layout in Word doesn't use it at all till the anchoring is as-char. Given that in LO as-char anchoring supports real spacing, just don't import these values to have the same layout. That's what the WW8 import does, too. (cherry picked from commit 9781a8786da5c32e2250cbe1ae97bd10f84f39bb) Change-Id: I1244269e06c5d190e8340349ddc12ae7b0572a4d Reviewed-on: https://gerrit.libreoffice.org/16786 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-07-08tdf#87348 implement nonsequential and mso-next-textbox textbox chainingJustin Luth
Change-Id: I017049a8f3578ad4c2a1f549be1c683f98c20318 Reviewed-on: https://gerrit.libreoffice.org/16691 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-08tdf#87460 DOCX import: fix missing endnote in floattableMiklos Vajna
Writer doesn't support foot or endnotes in TextFrames, so they are not supported in OOXML floattables, either. In the past, floattables were imported as normal tables, that's how this worked. Restore the old situation till the core limitation is there, so we at least don't regress. (cherry picked from commit 2fe248f2b36d541c0d243a620c217058a50a9d5d) Conflicts: writerfilter/source/dmapper/DomainMapperTableHandler.hxx writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: I4eb62617e3131176f7371e9ca69f11bc9e948a0b Reviewed-on: https://gerrit.libreoffice.org/16690 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-30tdf#92061 RTF import: fix missing body text after footnoteMiklos Vajna
A missing seek in the \footnote handler could result in a situation that the missed text contained a "{" but not its matching "}", which resulted in the parser terminating earlier than the end of the document. (cherry picked from commit 7b08304b55cf2284a3c583426c60baef618ba206) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I6df476b2d6397dfa918111b33854dc2f95fbe81d Reviewed-on: https://gerrit.libreoffice.org/16501 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-18tdf#82553 DOCX import: handle table margin when converting floattablesMiklos Vajna
(cherry picked from commit 292ec5fe8d01af6119325f1a426422bb42e58615) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I7a3a233a34453153b3e1c0fe3d60bb0ede65dc86 Reviewed-on: https://gerrit.libreoffice.org/16248 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-12tdf#90315 RTF import: fix \colsx default valueMiklos Vajna
See SectPageInformation::mnColsx on the libreoffice-3-6 branch + the spec agrees, too. Change-Id: I6f70a125f8d962621f319e3e75e2865e5f126859 (cherry picked from commit e18adb7369d140f33b947668a69da2fa78738e7b) Reviewed-on: https://gerrit.libreoffice.org/16225 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-03tdf#86814 RTF import: fix sometimes lost bold styleMiklos Vajna
The problem was that commit 76c0d0abc89cd8948706083c2660b71a2dad670c (RTF import: adapt getProperties() to createStyleProperties(), 2014-09-07) only made the character style sprms/attributes a flat list, but not the paragraph style ones. Fixing that inconsistency avoids the tokenizer adding unwanted default sprms, which cause the bold sprms go away in the bugdoc. Change-Id: I86bd1b26af18cd968375c9b39be9c8e71d51271f (cherry picked from commit cbe79789a0fc9b80b2fd14a5abfe0973a2cb69dc) Reviewed-on: https://gerrit.libreoffice.org/16051 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-03tdf#70318 tdf#90260 writerfilter: pasted RTF documents may contain no \parMiklos Vajna
This is a squash of 3 commits, as the first doesn't build without the second one. First commit: sw core is not yet adapted, will be done in the next commit. (cherry picked from commit e702c78843e387d83fd9c8fbd1597cbe27e3e656) Second commit: Author: Mike Kaganski <mikekaganski@hotmail.com> tdf#70318: don't forget to clean up second fake paragraph RTF insert is made into an empty paragraph. To do that, two splits are made before the insert, but only one is reverted afterwards. This patch removes the second. Also fixes a memory leak from unreleased heap object The corresponding unit test is corrected. It was incorrect because \par doesn't begin new paragraph; it only ends paragraph. If a RTF is ended with \par } then no newline is added to its end. The old unit test only worked because of the bug fixed by this patch. Correct way of inserting new paragraph in the end of a RTF is \par \par} (cherry picked from commit 0ddd9f9ff45f61013ea18763eca4c68aedce6caa) Third commit: tdf#90260 testcase (cherry picked from commit 8931abc0b9fded1ee78eca6bf28e8d2438a76add) Conflicts: writerfilter/source/filter/RtfFilter.cxx writerfilter/source/rtftok/rtfdocumentfactory.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx sw/source/filter/rtf/swparrtf.cxx Change-Id: If8da12427e0cdaced4c1c1776b9f0b8cbde5c57c 63d50a940d7960beb35f7d774c833ed8499acbef 06a5ff604e6782863c4a2d6e002c9d67d42912fb Reviewed-on: https://gerrit.libreoffice.org/15963 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-03tdf#91074 RTF import: handle \dplineco* for text framesMiklos Vajna
RTFSdrImport::resolve() already had the logic to use the relevant API depending on if the shape is a text frame or not -- extract that to a separate member function and use it from RTFDocumentImpl::popState(), too. (cherry picked from commit ec1a96e79e3e6225706151cb72eb3df763b0598d) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/rtftok/rtfsdrimport.cxx writerfilter/source/rtftok/rtfsdrimport.hxx Change-Id: I663b372244f09f002447ece62587143b2a575795 Reviewed-on: https://gerrit.libreoffice.org/15939 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-03Resolves: tdf#89731 numberingChange feature not available in writerCaolán McNamara
Change-Id: Ie779e78fc3c7ccf717117513d9187697c22cc51a (cherry picked from commit 0123bbbc4d07fd7d6c233f67139984ab3cd4555d) Reviewed-on: https://gerrit.libreoffice.org/15932 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-06-03tdf#91261: DOCX import: snapGrid property of paragraphs are ignoredMark Hung
Fix the situation for OOXML import filter: a) While handling DocGrid type, SnapToChars was treated as None. Now it is implemented as described in the article: http://linpeifeng.blogspot.tw/2007/02/text-grid-enhancement.html Both LinesAndChars and SnapToChars will be translated to Writer grid type "lines and characters", and set SnapToGrid property to false or true accordingly. b) All the imported paragraphs snap to grid because SnapToGrid was appended to grabbag, now it allows SnapToGrid property in paragraph and paragraph styles to be imported properly. Reviewed-on: https://gerrit.libreoffice.org/15732 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit b7c8c337d4ffad55fe111c9634c4c04afce78bad) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I446b4c64c0ed86960896bcd61a1006c9173a757a Reviewed-on: https://gerrit.libreoffice.org/15843 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-01writerfilter: unused fill and CT_Fill resourcesMiklos Vajna
These were added by commit cfc4650c8594334edecc3b50ca54461f6bee2d43 (Added some teaks to 'model.xml', 2014-09-16), but the matching dmapper part is missing, so they aren't useful in practice, and cause a crash on import of crashtest's File_953.docx. Change-Id: I3d1c138534a37dc9ba500f1134ca4bb9ebae0e96 (cherry picked from commit 57d254d42b6e1d836bd21e6fb2e968af2b511c7d) Reviewed-on: https://gerrit.libreoffice.org/15574 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-04-28Related: rhbz#1215060 pass std::exceptions throughCaolán McNamara
Change-Id: Ifb3431a50f92b95dfc1e851f9584533271e69324 Reviewed-on: https://gerrit.libreoffice.org/15519 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-04-23tdf#86182 RTF import: fix handling of \rtlparMiklos Vajna
Commit 558d5c25a0b1d6a937d33291a4b6cd7fca6cb15b (implement RTF_LTRPAR and RTF_RTLPAR, 2011-06-09) was just a guess, this one is the proper mapping. (cherry picked from commit 4ee2a882dddb395a816cd54004b634d57cfb2446) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: I1156ef5ddc34264d761d3e64dd0537bc6ec0ced7 Reviewed-on: https://gerrit.libreoffice.org/15481 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-04-14tdf#75614 RTF import: fix missing text after footnoteMiklos Vajna
(cherry picked from commit cec5f2eab25578a9859134d697c200089c597faa) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I5901094cb603c35a1cd8ac718fd434a9dd55729b Reviewed-on: https://gerrit.libreoffice.org/15270 Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-02-09Related: tdf#88583 writerfilter: import paragraph color as fill attributesMiklos Vajna
In theory this is to be in sync with the ODF import. In practice the old UNO property seems not to have a proper fallback to populate the doc model with the fillattributes, so without this even if the import result is visible, it would be lost on ODF export. Additionally, this detected a bug in SwUnoCursorHelper::makeRedline(), where paragraph format redline tried to use the map of a text portion instead of a paragraph. (cherry picked from commit 24077b2d52ab3d0fd0db5afb25d8b94b62386e3e) Change-Id: I026e38e1990ed2a460624a8d967a16ae3fb6c512 Reviewed-on: https://gerrit.libreoffice.org/14353 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-01-16rhbz#1180114: writerfilter: don't crash on w:customXmlDelRangeStart etc.Michael Stahl
We can't do anything sensible with these CustomXML elements but now we have to handle them because. (regression from 9dbf817fe5c5253fba0831aefa17575ae0ba3af1) Change-Id: If4247890ff9961a77434587802670d28608a7922 (cherry picked from commit f22964e0e622af1168e241f933e5cf98e093ec2b) Reviewed-on: https://gerrit.libreoffice.org/13913 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-12-17fix Windows buildLászló Németh
Change-Id: I690163d7ab6d62c93da33d416e8757311f5d35c1
2014-12-16(related fdo#84685): writerfilter: RTF import: support \tc TOC entryMichael Stahl
Change-Id: Icda252e1f092707728d3a24df50fba7080e759bb (cherry picked from commit 1dd1dfc152c7cbeb374fe4f38b08c6af9cef2c06)
2014-12-16fdo#84685: writerfilter: RTF import: support \xe index entryMichael Stahl
Change-Id: Ia957541a5997961aa86b2eb8537ebd29d3092691 (cherry picked from commit f14e6e06b9e3c82c267649d63512a3538e5ee2f5)
2014-12-14fdo#86761 RTF import: positive border width and fLine=0 means no borderMiklos Vajna
Regression from 01a32b7d074511bed24044dc94e1159aea62722b (fdo#85179 RTF filter: import image border, 2014-10-23), there were a number of problems here: - CppunitTest_sw_htmlexport: revert back to the old behavior, where in case there is no border, we don't set the color of it. - The testcase of the above commit omitted fLine=1 shape property, which is present in the original bugdoc, and only with that should we put a border around the shape. - Let fLine=1 explicitly change the line style from NONE. - dmapper: if line style is NONE, then don't bother setting the border color and width. Change-Id: Iffee41066d42822b699c478821645b9742df3f58 (cherry picked from commit 4568d1d298bf4fc98dcd86384743a04587a2fe6f)
2014-12-08fdo#86750 RTF import: fix table of contents linksMiklos Vajna
Change-Id: I0f3d35a0e64c9ce5646fa63eda317bee42de5540 (cherry picked from commit 4517c94000153eab6c034ea548698953dd93f794)
2014-11-30fdo#72031 RTF import: bogus call to getBestTextEncodingFromLocale()Miklos Vajna
There were two problems here. First, commit bbe3627eece0c3486e7ea11f2f13377aaa3a8fed (rtftok: stop sending sprm:CRgFtc{0,1,2} tokens, 2014-03-05) broke the use-case when the font encoding is 0, but it's present. Before that commit, we parsed the font encoding instantly; after that commit we parse it once we have a font name. If we do that, then we have to have an idea if we have a font encoding. Given that 0 is a valid encoding, use -1 for the "have no encoding" case instead. Second, commit 7839633fb356285652ed96f4bf3f85bcd5b561a4 (fdo#85889 handle pc, pca and mac rtf keywords in writerfilter, 2014-11-24) abused m_nCurrentEncoding, which is meant to be used within the font table only. The problem with this is that this way only the first font will get the encoding, while the spec says it should be used in every context where there is no other explicit encoding. Fix this by setting the default encoding for those 3 control words instead -- and consider the default encoding in getEncoding(). Change-Id: Ia1d71f8ce70f2a53a3770b4840e21362d082e71f (cherry picked from commit fa15d039e3a553da8500c17190d27169a9477cf2)
2014-11-26always pass bookmark name through to domainmapperCaolán McNamara
the rtf doc has three bookmark starts but only two matching bookmark ends. The tokenizer has three starts 0, 1, 2, but 0 is missing an end. Without the end of 0, the mapper never inserts an entry for it, so later inserts the start of rtftok index 1 as mapper index 0, and passing the end for a bare "1" cannot be found by index. If we pass the name then it finds it by name as mapper index 0 and all is well. Change-Id: I344db84e4f1c7d55fca59cdfe692080c7d0b8033 (cherry picked from commit 2b54caceab9d975bffa7e24bf732cb877b16632f) Reviewed-on: https://gerrit.libreoffice.org/13133 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-11-24fdo#85889 handle pc, pca and mac rtf keywords in writerfilterAndras Timar
Change-Id: Ic54f2233a37562bdc516e440af0b4b7973f56342 (cherry picked from commit 7839633fb356285652ed96f4bf3f85bcd5b561a4)
2014-11-22fdo#82006 RTF filter: import \sbauto and \saautoMiklos Vajna
Change-Id: Iabff543c8191fc86dceb9274ea1552f60d73dabd (cherry picked from commit bb77fd64f9219f1b8f990f5041d81cfddd021213)
2014-11-22RTF import: fix handling of multiple \lfolevel control wordsMiklos Vajna
Change-Id: I242853d491c2ef83f192486fa6fe5a3407700047 (cherry picked from commit 74249cb6f4f52b7c10ebaa92f943920f6f94aaf4)
2014-11-20DOCX filter: import <w:startOverride>Miklos Vajna
Change-Id: Id95518c7ea38a974593a1880b4ef581ff49bcb90
2014-11-19Fix rtf outline importing issue.Mark Hung
When importing RTF files, the outline is treated as normal numbering list. Open the tools>chapter, outline doesn't correspond to heading styles correctly. This patch is to handle RTF keyword \s in a \listlevel. The patch use style name as its id so that is consistent with the one already used by StyleSheetEntry. Change-Id: I5ab6602b5ce64ca65ec08e0adb34d60ae7293650 Reviewed-on: https://gerrit.libreoffice.org/12960 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-11-19writerfilter: indentation fixesMiklos Vajna
Change-Id: Ib9bee587931cd020848b033ce4429f36d04e61b1
2014-11-19DOCX import: handle <w:lvlOverride> without <w:lvlText>Miklos Vajna
Change-Id: I0b941bd7a733408655db192b8608ed3987b9c1fc
2014-11-19Resolves: fdo#86451 guard all the tops post popCaolán McNamara
Change-Id: Ic89edb94c6c12a66fd46e0630115a458857cc6cc
2014-11-18Fix outline numbering for ooxml import filter.Mark Hung
Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Reviewed on: https://gerrit.libreoffice.org/12519 Change-Id: Ifd8a562bcee4f57cc99ed3215e6d8d6dd95216b0
2014-11-17fdo#85542: fix DOCX import of overlapping bookmarksBjoern Michaelsen
This was broken by 345a3a394e082595924bf219796627f6c00ae2dd. Kill the static variable and instead have some more state in the implementation. Still not ideal, but at least fixes the regression. Change-Id: I562f7d88a1983bd0ec2e01d6bb1e4a53551d0953 Reviewed-on: https://gerrit.libreoffice.org/12491 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-11-17DOCX import: handle <w:numId> from parent styles as wellMiklos Vajna
Without this, we may miss the <w:numId> of a paragraph and set no numbering style name; and that leads to not restarting numberings when needed. Change-Id: I9a4896266c5b7f1d7cc2adc43b84e227c004da7c
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17loplugin:implicitboolconversionStephan Bergmann
Change-Id: I389fa692e4a8f99d8de21cf0af3f2a7f0ac1a6f5
2014-11-16Improve rtf import filter to handle Chinese suffixes of numbered lists.Mark Hung
Currently rtftok doesn't handle multibyte string as destination text very well. For example, RTF files created by MSO 2010 Traditional Chinese version use CP950 (aka BIG5) for unicode to ansi conversion. When a Chinsese numbered list was picked, the Chinese dot ( unicode 0x3001, big5 0xa142 ), was used by default as a list number suffix. However when it is imported , only a single B (0x42) were left. The theory of the patch is to collect both hex string and normal character with m_aHexBuffer, and convert it into OUString as late as possible. It allows prefixes and suffixes to be imported from RTF files created by MSO 2010 TC correctly. Reviewed on: https://gerrit.libreoffice.org/12435 Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I63062da39bf36ea27ec11e5d0eb1d1abf5018d96
2014-11-16writerfilter: this is expected to be UTF-8Miklos Vajna
Change-Id: I7408be90f1ff552f4bb33e8a89d4b9075634e3e5
2014-11-16fdo#83204 RTF import: handle \pard<para props> after \bkmkstartMiklos Vajna
Change-Id: I4f5f0f653f2ce7782ec1d1fc5ef550a21a9c1d35
2014-11-16writerfilter: these are expected to be UTF-8Miklos Vajna
Change-Id: I8cd2ce341996a219ee885969de3482be422730b3
2014-11-15RTF import: handle right-to-left tablesMiklos Vajna
Change-Id: If2e60557b7551839c344d56cb3a720ae3659e93c