summaryrefslogtreecommitdiffstats
path: root/writerfilter
Commit message (Collapse)AuthorAgeFilesLines
* loplugin:unusedmethodsNoel Grandin2015-10-024-34/+0
| | | | | | | Change-Id: I3d6f1300f4fae2af9e580d1d3b2c2c80fa9e9268 Reviewed-on: https://gerrit.libreoffice.org/19075 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* Fix typosAndrea Gelmini2015-09-291-1/+1
| | | | | | | Change-Id: I4525b43fa823d743b86bf4136c56af35274085e6 Reviewed-on: https://gerrit.libreoffice.org/18995 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
* Fix typosAndrea Gelmini2015-09-294-5/+5
| | | | | | | Change-Id: If2e4adb2ce93c02ee14d831eedf4ef31da04b92d Reviewed-on: https://gerrit.libreoffice.org/18996 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
* bnc#939996 tdf#93919 DOCX import: fix left-from-style and first-from-directMiklos Vajna2015-09-281-0/+5
| | | | | | | | 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. Change-Id: If5534fbd9ee6d41139b0ed3a3df9d0cc5aad3239
* tdf#94456 RTF import: fix list vs paragraph style interaction wrt para indentsMiklos Vajna2015-09-281-3/+3
| | | | | | | | | In case we set the paragraph left/right/first margin just to mimic the list vs paragraph style interaction as Word wants it, never overwrite properties, as they are always meant to be just callbacks in case there is no real hard formatting. Change-Id: Ibdb2834c693d43cf4114453e42628e8f64c0a856
* tdf#90153 DOCX import: fix default sw TextFrame roundtripMiklos Vajna2015-09-281-2/+6
| | | | | | | | | | | | | | | The AnchorType of the shape was at-paragraph, which does not allow line-level VertOrientRelation (which is correct, it would be undefined, what line of the paragraph should be the used). Fix this by changing the AnchorType to at-character in the line-level case, which brings the filter in sync with the DOC one. With this, import of a DOCX file that was created by inserting a TextFrame into an empty document is roundtripped without shifting the shape up considerably. Change-Id: I6d85c38be859d6e730584f2349c857b87496a1d4
* tdf#92124 DOCX import: don't add a dummy Suffix for an empty LabelFollowedByMiklos Vajna2015-09-231-1/+12
| | | | Change-Id: I0c4366ad0a2f81a198860869f670767343a392be
* tdf#92454 DOCX import: allow overriding para prop from num style in para styleMiklos Vajna2015-09-221-0/+7
| | | | | | | | | | | | 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. Change-Id: Iff3b03bcc56e0db3a48452c293acf41c91b8f159
* tdf#94045: negative margins in OOXML reenabledOliver Specht2015-09-111-1/+1
| | | | | | | | | | OOXMLUniversalMeasureValue is an integer value and needs to be converted to a signed integer. unit test included Change-Id: I7fe3fdf4b8b12df55e9cea2a968b9537676687eb Reviewed-on: https://gerrit.libreoffice.org/18496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
* cid#1321599 missing breakMiklos Vajna2015-09-011-0/+1
| | | | Change-Id: Idaf322c53cb8955bb88e18a6d79fd800dc48621d
* Make sure nEnd-nIndex-1 is valid arg to OUString::copyStephan Bergmann2015-08-281-1/+1
| | | | Change-Id: Ie646ae781bcd54be81173db42fe10f61b31ac628
* loplugin:defaultparamsStephan Bergmann2015-08-271-1/+1
| | | | Change-Id: Ifd4c92d2013b5698d9657f599db8af345437b079
* Improving Asian phonetic guide for docx and rtf files.Mark Hung2015-08-278-3/+249
| | | | | | | | | | | | | | | 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>
* loplugin: defaultparamsNoel Grandin2015-08-211-1/+1
| | | | Change-Id: If1d183f32079548645b4974a16161dc997c026b7
* this debugging code can definitely use oslCaolán McNamara2015-08-181-3/+3
| | | | Change-Id: I420e7f242868a25a2f9a473c23c67dfd9a285b7c
* cppcheck: zerodivCaolán McNamara2015-08-101-1/+1
| | | | Change-Id: Iaf327051d59c39cbd61e1a64bdf1ee5af5cc4f3b
* loplugin:unusedmethodsNoel Grandin2015-08-059-66/+1
| | | | | | | Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba Reviewed-on: https://gerrit.libreoffice.org/17506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* -Werror,-Wunused-private-fieldStephan Bergmann2015-08-042-4/+0
| | | | Change-Id: Ied02019c6e11287ba574bb861ed7b2a8da1f8083
* writerfilter: use std::unique_ptr<> in SettingsTableMiklos Vajna2015-08-042-2/+2
| | | | Change-Id: I0202b18301b4b4a7c82c840df1397a5cbdd695b1
* inline some use-once typedefsNoel Grandin2015-08-0311-17/+10
| | | | | | | Change-Id: I02cbbba56a2ad83e0ac3d806265a7e0d6a29594d Reviewed-on: https://gerrit.libreoffice.org/17495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* inline some use-once typedefsNoel Grandin2015-08-031-15/+6
| | | | | | | Change-Id: I55cc82c8e180cce371c996690608090b1bfdfda4 Reviewed-on: https://gerrit.libreoffice.org/17494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* new loplugin: refcountingNoel Grandin2015-08-033-14/+13
| | | | | | | | | | | | | | 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>
* writerfilter: use std::unique_ptr<> in TblStylePrHandlerMiklos Vajna2015-07-312-2/+1
| | | | Change-Id: Ia98b351a3ef14826ab638382fa312734edeb751d
* Cleaned up PropertyMap::GetPropertyValues in writerfilter::dmapper.Matthew Pottage2015-07-301-62/+55
| | | | | | | | | | 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>
* writerfilter: manual memory management -> boost::optional in PropertyMapMiklos Vajna2015-07-302-12/+9
| | | | Change-Id: Ie8f7ce11ab03d47835cfe224c775324dd79a5e7a
* loplugin:unusedmethodsNoel Grandin2015-07-305-17/+0
| | | | | | | Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971 Reviewed-on: https://gerrit.libreoffice.org/17378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* writerfilter: clean up remaining boost::scoped_ptr<> usageMiklos Vajna2015-07-292-4/+4
| | | | Change-Id: I270c91bec75ff96ac77b550e6adef8d03b07f2b5
* writerfilter: use std::unique_ptr<> in StyleSheetTableMiklos Vajna2015-07-292-3/+3
| | | | Change-Id: I38eebe098c87cceb69b9ff4c48e18d3434ad1557
* tdf#91594 misinterprets letters from Symbol font in docx filesMark Hung2015-07-284-39/+38
| | | | | | | | | | | 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>
* tdf#49893: final fix for blank rectangle problemVasily Melenchuk2015-07-281-2/+17
| | | | | | | | | | | 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>
* writerfilter: use std::unique_ptr<> in DomainMapperTableManagerMiklos Vajna2015-07-282-3/+2
| | | | Change-Id: Ib5910d3198824d625a96b53a30ad67c69c622642
* writerfilter: use std::unique_ptr<> in DomainMapperMiklos Vajna2015-07-272-8/+6
| | | | Change-Id: I569add9792d533bd3bcda5d5cb4023b37bd3f1ed
* tdf#90046: RTF import: ensure that a run is started before \footnoteMichael Stahl2015-07-241-0/+1
| | | | | | Avoids crashing with empty context stacks. Change-Id: I0ee8b457fdbb19b55f5c15876b7253680cde6e23
* writerfilter: use std::shared_ptr<> in ThemeTableMiklos Vajna2015-07-242-2/+2
| | | | Change-Id: I9d632ed036b1d94c29adfc79df4c920791b0c0fa
* writerfilter: use std::unique_ptr<> in FontTableMiklos Vajna2015-07-232-2/+1
| | | | Change-Id: I8dce4e71c53526605d83710012133784a5cbd7ba
* tdf#86374 DOCX import: fix btLr text table direction without <w:cantSplit/>Miklos Vajna2015-07-222-2/+10
| | | | | | | | | | | | | | 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
* loplugin:unusedmethods writerfilterNoel Grandin2015-07-2126-275/+1
| | | | | | | Change-Id: I52441115e14da6c1bcd7ba4926a0f3cc0620366e Reviewed-on: https://gerrit.libreoffice.org/17236 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* Use comphelper::containerToSequence()Miklos Vajna2015-07-211-6/+1
| | | | Change-Id: Ia7cc48f6f1bc041b95164d551e2cbc9ea2dbf2e8
* tdf#89702 DOCX import: fix too large bullet characterMiklos Vajna2015-07-211-6/+10
| | | | | | | | | | | | | | | | | 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
* Removed singleton PropertyNameSupplier and replaced it with single function.Matthew Pottage2015-07-1613-797/+669
| | | | | | | | | | | | | | 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>
* tdf#87539 map MSO washout filter to LO's watermark colormodeJoren De Cuyper2015-07-151-3/+2
| | | | | | | Change-Id: Id28e301a74a729245b20ba6cd2adecf203633f0e Reviewed-on: https://gerrit.libreoffice.org/16048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
* cleanup some unnecessary direct usage of the OString/OUString C API.Noel Grandin2015-07-101-10/+5
| | | | | | | Change-Id: I6edee95aae1c169ce70063562a0c1b287e0c4735 Reviewed-on: https://gerrit.libreoffice.org/16861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Use std::transformMiklos Vajna2015-07-101-11/+5
| | | | Change-Id: If3b361d4ba7155547316796265cbd3955a4b8071
* writerfilter: use std::transform in PropValVector::getValues()Miklos Vajna2015-07-091-10/+3
| | | | | | | Change-Id: I26259b8aca75c1855f0abd98214ed23ce783571a Reviewed-on: https://gerrit.libreoffice.org/16878 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* writerfilter: avoid PropValVector inheriting from an STL containerMiklos Vajna2015-07-091-13/+13
| | | | Change-Id: Ic77b40ef7b518ad34b60530984fb6180d4426e39
* Avoid loplugin:staticmethods in non-debug buildStephan Bergmann2015-07-081-0/+2
| | | | Change-Id: I6f480fb205904c7894e73288ecc3297c735a2bd9
* writerfilter: remove not needed TableDataHandler interfaceMiklos Vajna2015-07-083-64/+39
| | | | | | | Only DomainMapperTableHandler implemented it, and all clients can use that directly, no need for this abstraction here. Change-Id: I800b9eddcfddee643c725c29d9f15db3c9aab02c
* tdf#90611 DOCX import: fix missing paragraph style on footnotesMiklos Vajna2015-07-063-1/+18
| | | | | | | | | | | | | | | | | | | | | 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
* tdf#92481 RTF import: handle \widowctrlMiklos Vajna2015-07-063-2/+30
| | | | Change-Id: I1af1d6bc150c16a2c6b0fe788a41c8c18caee6c6
* remove some unnecessary typedefs around uno::ReferenceNoel Grandin2015-07-063-24/+19
| | | | | | | | | | | | | | 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>