summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapper_Impl.cxx
AgeCommit message (Collapse)Author
2015-08-27loplugin:defaultparamsStephan Bergmann
Change-Id: Ifd4c92d2013b5698d9657f599db8af345437b079
2015-08-27Improving Asian phonetic guide for docx and rtf files.Mark Hung
RTF import, export, and ooxml export for ruby text are implemented. tdf#49073 - FILEOPEN: Furigana (ruby text) and characters with them are missing in opened .docx files. tdf#50786 - [TASK, METABUG] FILEOPEN, FILESAVE, FORMATTING : Japanese ruby-character handling is broken Change-Id: I4a5c30bad180241e3344e9da7efe7da4369fb325 Reviewed-on: https://gerrit.libreoffice.org/17241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-10cppcheck: zerodivCaolán McNamara
Change-Id: Iaf327051d59c39cbd61e1a64bdf1ee5af5cc4f3b
2015-07-28tdf#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. Change-Id: I602d9fbfa79c33c90f655dbf5ee22738b6391ae6 Reviewed-on: https://gerrit.libreoffice.org/16543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-07-21tdf#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
2015-07-16Removed singleton PropertyNameSupplier and replaced it with single function.Matthew Pottage
Measurements showed that the "optimisation" of caching PropertyIds and their string equivalent leads to an increase of approx. 6 times in the total overall time spent in PropertyNameSupplier::getName(eId), when running the unit tests. PropertyNameSupplier was the only PropertyNameSupplier (no derived classes). This means that getPropertyName can easily provide the same functionality. Change-Id: I933b67c11d4cc35395a0c70e15f1c24ac9842ab0 Reviewed-on: https://gerrit.libreoffice.org/16665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-06tdf#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. Change-Id: I33020ac761c94addfec8164a17863565e4453b07
2015-07-02tdf#87348 implement mso-next-textbox vml-style textbox chaining importJustin Luth
Change-Id: Ic62769cf5bb1589dd4de3a66b3d7dd896e5b5711 Reviewed-on: https://gerrit.libreoffice.org/16366 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-06-26tdf#87348 allow non-sequentially processed textboxes to be linkedJustin Luth
The existing code design ONLY allowed textboxes to be linked if they were basically processed sequentially or reverse sequentially. It appears that the processing is actually based on the order that the textboxes were created, which is usually sequential but not necessarily. Change-Id: Ieb7b37d4cbd4b3a5b5d474803abccfa198a5864b Reviewed-on: https://gerrit.libreoffice.org/16353 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-06-26loplugin:stringconstant: handle OUString+=OUString(literal)Stephan Bergmann
Change-Id: If9324bfb77d5f98ce6f968e0aa095f285ef7583f
2015-06-23Revert "Typo: iff->if"Julien Nabet
This reverts commit cf92da3d6e1de14756efe3f1ee79f393a2f3787d. iff can mean "if and only if" so not a typo
2015-06-23Typo: iff->ifJulien Nabet
Change-Id: I3fc60856b5a56e71d70b55c89323be074bdec3b3
2015-06-23tdf#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. Change-Id: I4eb62617e3131176f7371e9ca69f11bc9e948a0b
2015-06-16Fix typosAndrea Gelmini
Change-Id: Ieaf67cf597e05dbae5affa153af907fda4462a41 Reviewed-on: https://gerrit.libreoffice.org/16295 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-11convert expressions like 'size() == 0' to 'empty()'Noel Grandin
Change-Id: Ia5c8c0f38a347f398d587970a22e03f29ffd37af
2015-05-27Resolves: tdf#89731 numberingChange feature not available in writerCaolán McNamara
Change-Id: Ie779e78fc3c7ccf717117513d9187697c22cc51a
2015-05-19TagLogger can be staticNoel Grandin
since we only ever instantiate one of them Change-Id: I48b3b976b4f33044c4bf6542ac5cce58f26e6244 Reviewed-on: https://gerrit.libreoffice.org/15759 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-05-18writerfilter: avoid unnecessary roundtrip to css::uno::SequenceMiklos Vajna
Just pass over an std::vector instead of getAsConstPropertyValueList() and comphelper::sequenceToContainer(). Change-Id: I584c44918b526cbed99abdbbf069c4bbf27ac887
2015-05-18writerfilter: avoid manual reallocMiklos Vajna
Change-Id: I5ce8b00736fed6d4fb307c6384deca4718e770a3
2015-05-12tdf#90260 writerfilter: pasted RTF documents may contain no \parMiklos Vajna
sw core is not yet adapted, will be done in the next commit. Change-Id: If8da12427e0cdaced4c1c1776b9f0b8cbde5c57c
2015-05-04tdf#91077 don't import shapes from discarded DOCX header/footerLászló Németh
Change-Id: I674eadb84fc870031244a61f5c07d2cdf18a8dd1
2015-04-26DomainMapper_Impl::finishParagraph: refactor to avoid manual reallocMiklos Vajna
Change-Id: Ia52a2e3d6d98cfcc33a307ddcfc218a8426058dd Reviewed-on: https://gerrit.libreoffice.org/15538 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-11writerfilter: no need to spell out com::sun::star, css is enoughMiklos Vajna
Change-Id: I7dfcb041509508969135a325bdef709de7a8218f Reviewed-on: https://gerrit.libreoffice.org/15247 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-03-04V813: Decreased performanceCaolán McNamara
Change-Id: Ica2563d9e8da15e19eb38246d4de54a1fcb75655
2015-02-14indentation fixesMiklos Vajna
Change-Id: I93bf9ab7ed32e60b735ad04b5da3de3c9aea6501
2015-02-06fdo#75757: Remove inheritance from std::vectorMatthew Pottage
Deprecated comphelper/sequenceasvector.hxx. Rewritten code using it. Using instead the functions containerToSequence and sequenceToContainer, found in include/comphelper/sequence.hxx. One class that inherits from it (in framework/inc/stdtypes.h), and the code using that has been left. Signed-off-by: Michael Stahl <mstahl@redhat.com> Conflicts: writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/TblStylePrHandler.hxx writerfilter/source/dmapper/WrapPolygonHandler.hxx Change-Id: Ice61c94ffb052e389281aebb7cdf185134221061
2015-01-19fdo#39440 reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: If7ad3584b3124ed0b337836071af1a5bd0451d85 Reviewed-on: https://gerrit.libreoffice.org/13972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-14rhbz#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
2015-01-05Some loplugin:revisibility clean-upStephan Bergmann
Stumbled across such redundant visibility re-specifications when looking at the odd case of cppu_unsatisfied_iquery_msg declared CPPU_DLLPUBLIC in cppu/source/cppu/cppu_opt.cxx and used in inline code in include/com/sun/star/uno/Reference.hxx with only a declaration lacking CPPU_DLLPUBLIC visible, and wondering how that actually works on Windows. However, this plugin is probably not worth it being run all the time, so committing it to compilerplugins/clang/store/. Change-Id: Ibc3c4e7499213de1b419ce7eb85455cb832e1510
2015-01-05WaE: passing class rtl::OUString by value, rather pass by referenceTor Lillqvist
Change-Id: I6a6b24706ed07c5de9870604b6fe5e382ca776c8
2015-01-04fdo#79738: FILEOPEN: Number lines in footer not compatible with MSOCharu Tyagi
Reviewed on: https://gerrit.libreoffice.org/13539 Change-Id: I309f9cfc31420e350acc05be7ff422c8aefad782
2014-12-21writerfilter: hardcoded cFieldStart/Sep/EndMiklos Vajna
Change-Id: If7278418e1c7f8b8f812ce0b01720f8666e9ae5a
2014-12-21writerfilter: refactor to get rid of remaining scary PositionHandler staticsMiklos Vajna
Change-Id: I954504ad6b730866504a470b8d966fdfe1d58550
2014-12-21writerfilter: refactor to get rid of savedPositionOffset{V,H} staticsMiklos Vajna
Which are extremely scary, allowing a shape position from one doc to appear in an other if two writerfilter import is in progress at the same time. This partially reverts 8fa1a0874765ea7db57e496f1d92731b9ab09280 (read wp:positionOffset, wp:alignV and wp:alignH properly (bnc#513579), 2011-05-04). Change-Id: I0fcddf88fa56f5f9288e47bcd100c38ee9cf2f13
2014-12-19Support for docx import of fixed date and time fields.Eilidh McAdam
If a field is fixed, mark it as such and parse value to seed it. This is the other half of the docx filter improvement for fdo#59886. Reviewed on: https://gerrit.libreoffice.org/13431 Change-Id: Id00c454921cd386589e04b9572f4040898625a6f
2014-12-19Small fix for docx date field format import.Eilidh McAdam
The standard allows for arbitrary amounts of whitespace between tokens. MSO outputs with a space between \@ and ", LO doesn't. To account for this, any whitespace between these tokens is stripped and parsing assumes a command looks like: DATE \@"some format". Change-Id: I2620780da3ee873af6f35e236c7c34a073aebe73 Reviewed-on: https://gerrit.libreoffice.org/13430 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-12-18writerfilter: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: I42d89d0cc8bf9e9a0918345147ae2f64b5aabf58
2014-12-13Avoid '#include "../'Miklos Vajna
Change-Id: I1ae598269b81095dc7d6ad83044f228d1297bfb8
2014-12-10revert writer won't allow us to enter multiple CrossRefBookmarkCaolán McNamara
i.e. commit af64f430181088460d5c574683dd1fdfd377ebcd Date: Mon Dec 8 16:11:41 2014 +0000 writer won't allow us to enter multiple CrossRefBookmarks on the same node e.g. fdo63164-1.docx and loads more like that, and the .docx genuinely has multiple bookmarks at the same place, so just allow the first one and discard the following ones in favour of commit 7a12360e1f2c0a5bc0927131a750740d35cfd1ab Date: Wed Dec 10 14:56:27 2014 +0100 sw: don't assert when SwXBookmark creates duplicate CrossRef*Bookmark The bugdoc of fdo#87110 has a couple such duplicates. Check for it and let SwXBookmark throw an IllegalArgumentException. but leave test doc in place Change-Id: Ib0bfc991684b2c9c4f1959a17c49bf1c0179be79
2014-12-10stray fprintfCaolán McNamara
Change-Id: I9046c57440b6adb83204d0f596b1cb8467405dfa
2014-12-09writerfilter: no need to include QNameToString in dmapperMiklos Vajna
All dmapper handler classes inherit from LoggedProperties, which takes care of logging already, and QNameToString is only useful to turn the numerical IDs into dmapper token strings. Change-Id: I437f2c815293caeda0dabbe65cf9458ae5a60566
2014-12-08writer won't allow us to enter multiple CrossRefBookmarks on the same nodeCaolán McNamara
e.g. fdo63164-1.docx and loads more like that, and the .docx genuinely has multiple bookmarks at the same place, so just allow the first one and discard the following ones Change-Id: Ida2f5d79fdef4ed3e2d8c1e96ca6a086004f6c7d
2014-12-08fdo#86750 RTF import: fix table of contents linksMiklos Vajna
Change-Id: I0f3d35a0e64c9ce5646fa63eda317bee42de5540
2014-12-07writerfilter: util.hxx is used only inside dmapperMiklos Vajna
Change-Id: Ia3736c32c460b466649f10f4790c30d0d25f8c5e
2014-11-28DOCX import: ignore <w:tblpPr> in shape textMiklos Vajna
Floating tables are kind of anchored objects, which are not supported in shape text by Word, so we should ignore their flotation on import as well. Note that there is no need for a setIsInShape(false) in PopShapeContext() as we pop the whole table manager from the stack anyway. Change-Id: Ie9e88d2c83c0c34a01922e6e89f69f6089585b4b
2014-11-21writerfilter: remove strange SAL_DEBUG linesMiklos Vajna
Ideally the git hook makes impossible to add these. Change-Id: Ifa06ddde41ad4f23368ae401c1aa58a43fd14e12
2014-11-21DOCX import: first page header should always set default headers as wellMiklos Vajna
writerfilter imports a section with first and default headers / footers as two page styles: a first page one and a follow one. In case we nominally have a header on the first page only, we still need to enable it in the follow page style as well, otherwise on export when we recognize the first + follow chain as a single section, we'll end up with a header that looses its header margin. Change-Id: I4923daffefb243d2de4805a9931150ce4d9a6c81
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-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37