summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2015-08-10cppcheck: zerodivCaolán McNamara
Change-Id: Iaf327051d59c39cbd61e1a64bdf1ee5af5cc4f3b
2015-08-05loplugin:unusedmethodsNoel Grandin
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba Reviewed-on: https://gerrit.libreoffice.org/17506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-04-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: Ied02019c6e11287ba574bb861ed7b2a8da1f8083
2015-08-04writerfilter: use std::unique_ptr<> in SettingsTableMiklos Vajna
Change-Id: I0202b18301b4b4a7c82c840df1397a5cbdd695b1
2015-08-03inline some use-once typedefsNoel Grandin
Change-Id: I02cbbba56a2ad83e0ac3d806265a7e0d6a29594d Reviewed-on: https://gerrit.libreoffice.org/17495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03inline some use-once typedefsNoel Grandin
Change-Id: I55cc82c8e180cce371c996690608090b1bfdfda4 Reviewed-on: https://gerrit.libreoffice.org/17494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03new loplugin: refcountingNoel Grandin
This was a feature requested by mmeeks, as a result of tdf#92611. It validates that things that extend XInterface are not directly heap/stack-allocated, but have their lifecycle managed via css::uno::Reference or rtl::Reference. Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692 Reviewed-on: https://gerrit.libreoffice.org/16924 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-31writerfilter: use std::unique_ptr<> in TblStylePrHandlerMiklos Vajna
Change-Id: Ia98b351a3ef14826ab638382fa312734edeb751d
2015-07-30Cleaned up PropertyMap::GetPropertyValues in writerfilter::dmapper.Matthew Pottage
Removed unused variable. Used comphelper::makePropertyValue. Change-Id: I39ec3e51da484a1792bb980b166d5a10c597fe7b Reviewed-on: https://gerrit.libreoffice.org/17383 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-30writerfilter: manual memory management -> boost::optional in PropertyMapMiklos Vajna
Change-Id: Ie8f7ce11ab03d47835cfe224c775324dd79a5e7a
2015-07-30loplugin:unusedmethodsNoel Grandin
Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971 Reviewed-on: https://gerrit.libreoffice.org/17378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-29writerfilter: clean up remaining boost::scoped_ptr<> usageMiklos Vajna
Change-Id: I270c91bec75ff96ac77b550e6adef8d03b07f2b5
2015-07-29writerfilter: use std::unique_ptr<> in StyleSheetTableMiklos Vajna
Change-Id: I38eebe098c87cceb69b9ff4c48e18d3434ad1557
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-28tdf#49893: final fix for blank rectangle problemVasily Melenchuk
removed artifacts from invalid shape: nested shape instruction destination now is not drawn on its own. instead it is merged with outer shape instruction. this helps to avoid drawing semi-ready shapes. Change-Id: I45589cc1b742d878e5914dd3f66a8184ecfd044c Reviewed-on: https://gerrit.libreoffice.org/14584 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-07-28writerfilter: use std::unique_ptr<> in DomainMapperTableManagerMiklos Vajna
Change-Id: Ib5910d3198824d625a96b53a30ad67c69c622642
2015-07-27writerfilter: use std::unique_ptr<> in DomainMapperMiklos Vajna
Change-Id: I569add9792d533bd3bcda5d5cb4023b37bd3f1ed
2015-07-24tdf#90046: RTF import: ensure that a run is started before \footnoteMichael Stahl
Avoids crashing with empty context stacks. Change-Id: I0ee8b457fdbb19b55f5c15876b7253680cde6e23
2015-07-24writerfilter: use std::shared_ptr<> in ThemeTableMiklos Vajna
Change-Id: I9d632ed036b1d94c29adfc79df4c920791b0c0fa
2015-07-23writerfilter: use std::unique_ptr<> in FontTableMiklos Vajna
Change-Id: I8dce4e71c53526605d83710012133784a5cbd7ba
2015-07-22tdf#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. Change-Id: Ibaf91f542e64e5caa7904df97eb6eb52618e0023
2015-07-21loplugin:unusedmethods writerfilterNoel Grandin
Change-Id: I52441115e14da6c1bcd7ba4926a0f3cc0620366e Reviewed-on: https://gerrit.libreoffice.org/17236 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-21Use comphelper::containerToSequence()Miklos Vajna
Change-Id: Ia7cc48f6f1bc041b95164d551e2cbc9ea2dbf2e8
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-15tdf#87539 map MSO washout filter to LO's watermark colormodeJoren De Cuyper
Change-Id: Id28e301a74a729245b20ba6cd2adecf203633f0e Reviewed-on: https://gerrit.libreoffice.org/16048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-07-10cleanup some unnecessary direct usage of the OString/OUString C API.Noel Grandin
Change-Id: I6edee95aae1c169ce70063562a0c1b287e0c4735 Reviewed-on: https://gerrit.libreoffice.org/16861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-10Use std::transformMiklos Vajna
Change-Id: If3b361d4ba7155547316796265cbd3955a4b8071
2015-07-09writerfilter: use std::transform in PropValVector::getValues()Miklos Vajna
Change-Id: I26259b8aca75c1855f0abd98214ed23ce783571a Reviewed-on: https://gerrit.libreoffice.org/16878 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-07-09writerfilter: avoid PropValVector inheriting from an STL containerMiklos Vajna
Change-Id: Ic77b40ef7b518ad34b60530984fb6180d4426e39
2015-07-08Avoid loplugin:staticmethods in non-debug buildStephan Bergmann
Change-Id: I6f480fb205904c7894e73288ecc3297c735a2bd9
2015-07-08writerfilter: remove not needed TableDataHandler interfaceMiklos Vajna
Only DomainMapperTableHandler implemented it, and all clients can use that directly, no need for this abstraction here. Change-Id: I800b9eddcfddee643c725c29d9f15db3c9aab02c
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-06tdf#92481 RTF import: handle \widowctrlMiklos Vajna
Change-Id: I1af1d6bc150c16a2c6b0fe788a41c8c18caee6c6
2015-07-06remove some unnecessary typedefs around uno::ReferenceNoel Grandin
Not very useful these days, since we have the css:: prefix to reduce verbosity. Found with a search like: git grep -nP 'typedef .*uno::Reference.*<.*>\s+\w+;' | grep -v 'std::' Change-Id: I16f41c53837ec5c613545ae45df38b0daddcbadd Reviewed-on: https://gerrit.libreoffice.org/16730 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-03Fix typosAndrea Gelmini
Change-Id: I98b4dfb0f72f315065693335e2f882bb2eed3afe Reviewed-on: https://gerrit.libreoffice.org/16713 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
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-26tdf#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. Change-Id: I1300aa0397a8098df2a3170af795fbba47fd2a9e Reviewed-on: https://gerrit.libreoffice.org/16500 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-06-24tdf#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. Change-Id: I1244269e06c5d190e8340349ddc12ae7b0572a4d
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-22Fix typosAndrea Gelmini
Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b Reviewed-on: https://gerrit.libreoffice.org/16408 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-22Use SAL_WARN{,_IF}Miklos Vajna
Change-Id: Idd4693bd48b4bbe3ebfb5c86922ab0edfeba0def
2015-06-22Use comphelper::containerToSequenceMiklos Vajna
Change-Id: Ib227023eceacbcc3ca303af47794561eab708a39
2015-06-22tdf#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. Change-Id: I6df476b2d6397dfa918111b33854dc2f95fbe81d
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-16rtf: skip binary data also in skip-group modeThorsten Behrens
Since there might be arbitrary rtf markup inside, we rather shouldn't act upon. Change-Id: Ia782d89cb4ce8f34df64a3e0cba16de2db7b7ccf Reviewed-on: https://gerrit.libreoffice.org/16206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>