summaryrefslogtreecommitdiffstats
path: root/writerfilter
Commit message (Collapse)AuthorAgeFilesLines
* fdo#74599 RTF import: enable StylesNoDefault compat settingMiklos Vajna2014-04-122-3/+3
| | | | | | | | | | | The Writer 'Heading 3' paragraph style is gray by default, but (just like in case of DOCX) that shouldn't have any influence on the RTF import result. Fix this by moving the compat setting from the DOCX filter implementation to the common dmapper. Change-Id: I86c7cf1a66f82b438ce8379467773a88c9e229af
* writerfilter: remove no longer needed WRITERFILTER_WRITERFILTER_DLLPUBLICMiklos Vajna2014-04-1134-70/+4
| | | | Change-Id: Idedee38be19bc770518b85af62c9fc2b5b64e822
* fdo#76635 : Table borders not preserved after RTRajashri2014-04-111-5/+9
| | | | | | | | | | | | | | | | | The document containing a custom table is getting crashed. In the document the user has created his own costume table styles and in the created custom table style the user has set repeat first row as header property. The corresponding tag for this property is 'tblHeader' LO was adding this property as a part of cellProperties in DomainMapperTableHandler.cxx. But it is a part of a Row Property. That is why there was a crash @ open. In DomainMapperTableHandler.cxx : 'endTableGetCellProperties' tblHeader property is removed from style as it is not allowed for a cell. Change-Id: I83cd369aa4497ec3f4b567174f23ddee9be2864e Reviewed-on: https://gerrit.libreoffice.org/8848 Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
* test cases for CVE-2014-1761Caolán McNamara2014-04-112-0/+0
| | | | Change-Id: I8fa160818e5981090aadea7d4691b8acc61f0b40
* check that stacks are not empty before top()Caolán McNamara2014-04-111-1/+6
| | | | Change-Id: Iad5b3381b8201c5ac32a5bdf99bd3d5872ea3afc
* Introduce twip/mm100 conversion functions instead of duplicated macrosTor Lillqvist2014-04-113-31/+29
| | | | | | | Change-Id: Ib689e35b417e0e9016cd6a239c986e0603a99d62 Reviewed-on: https://gerrit.libreoffice.org/8837 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* writerfilter: clean up duplicated PROP_PARA_*_MARGIN_*_AUTO_SPACING insertionsMiklos Vajna2014-04-111-4/+2
| | | | Change-Id: If3f7a54a48541935295515bae47233e53c228fe5
* fdo#76597: Fix preservation issue of Spacing between paragraphRohit Deshmukh2014-04-111-2/+12
| | | | | | | Change-Id: I458bed111893a8d2fef79b11e28263a5bd2ed9cf Reviewed-on: https://gerrit.libreoffice.org/8842 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
* writerfilter: remove dead doctok detection codeMiklos Vajna2014-04-101-41/+13
| | | | Change-Id: Ib39d54ce37b9e41ab6aff742d7680a7cd76168cd
* It's "its", not "it's"Tor Lillqvist2014-04-103-3/+3
| | | | Change-Id: Ieaa787afd7cc622b4750a2ee8f17f6dad934ba63
* loplugin:bodynotinblockStephan Bergmann2014-04-101-1/+1
| | | | Change-Id: I7262f0114f3bde17d81e14e0813cc7906e73fceb
* fdo#77051: Preservation of Index field flag '\f'.YogeshBharate2014-04-103-0/+10
| | | | | | | | | | | | | | | | | | Problem Description: - In LibreOffice, the index field flag '\f' was not getting preserved after roundtrip as there was no support for it. - '\f' field flag is used for Specific Entry Type. ex. In our case it is "Syn" Implementation: - Provided import & export support for Index field flag '\f' and added UT for the same. Change-Id: I97c2456dd73c8bdf89ab105f8cac71bf7e2ad164 Reviewed-on: https://gerrit.libreoffice.org/8839 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
* WaE: passing OUString by value, rather pass by referenceTor Lillqvist2014-04-092-2/+3
| | | | Change-Id: I2577234385257ed0512403e5c9e34aa71ed5ce1f
* fdo#76583 DOCX import: Floating table information is not preserved in RT file.umeshkadam2014-04-093-1/+13
| | | | | | | | | | | | | | | | | | - Earlier the table width was compared with the text area to decide if the fly has to be created for the floating table. - In most of the cases such floating tables were the ones which did not have any text around them and not importing such tables as fly made sense. - But there are some scenarios where in the floating tables have width greater than the text area but are positioned in a way such that they begin before left margin and end before the right margin moreover they appear to be really floating (unlike in first scenario) as they have text around them since there is still room for the text. - Handled this scenario and added a UT. Reviewed on: https://gerrit.libreoffice.org/8840 Change-Id: I7ea25e04ed7c6315e4e4fe4b67badf451c30cd0c
* writerfilter: remove no longer needed WRITERFILTER_*TOK_DLLPUBLICMiklos Vajna2014-04-082-20/+2
| | | | Change-Id: I1dc7a935e3004b0ce0b0f943405b2a79992fa982
* WaE: -Werror=maybe-uninitializedCaolán McNamara2014-04-081-1/+1
| | | | Change-Id: Idc72dde52280fd3dc1721ad9f4d8df38017e18f0
* fdo76591:-Textbox property (order-> send behind text) is not preserved.Sourav2014-04-081-1/+16
| | | | | | | | | | Z-Index was not handledin LO for vml. I have made the changes to handle that using aGrabBag. Change-Id: I2af3b2974c8eb699bc6a7b743dc438584d6517ac Reviewed-on: https://gerrit.libreoffice.org/8833 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
* RTFSprms::set: replace two bool arguments with an enumMiklos Vajna2014-04-063-44/+45
| | | | | | | | The primary motivation is that the two bools allow 4 combinations, but we only handle 3 of them. Also, caller code is much more readable, now that a non-default overwrite mode is written explicitly. Change-Id: Iedf7dee1ab2d33de849aef6d7a51138d35048e5a
* fdo#74823 RTF import: work around wrong table column width on invalid inputMiklos Vajna2014-04-052-7/+54
| | | | | | | | This scenario is not a valid one, Word doesn't handle it, either -- but the old LO 3.4 parser did. So add minimal support for it to avoid the regression. Change-Id: Icc2e8d3bf314e9cadda57956668033aa6d092457
* fdo#76628 RTF import: allow the same font to have multiple encodingsMiklos Vajna2014-04-042-15/+14
| | | | | | | | | | | | | Commit bbe3627eece0c3486e7ea11f2f13377aaa3a8fed (rtftok: stop sending sprm:CRgFtc{0,1,2} tokens, 2014-03-05) dropped support for case when a font name is used in multiple entries in the font table, but with different encodings. Turns out that this is a valid use-case, so revert back to the old behavior where the key of the encoding table is the font index, not the font name. Change-Id: I048dff58af801d704fd4bc75a6a4dcb0f03bf185
* oox: Do not overwrite table style propertiesJacobo Aragunde Pérez2014-04-031-1/+29
| | | | | | | | | | | | | | | | | | | Some table properties can be defined by the table style but cells can overwrite them in their cell properties section. Our exporter was writing all the cell properties in all cases, regardless of them being defined by the theme or not, and we shouldn't do that if we want the document to work properly in Word. To fix the issue I store the style-defined cell properties (the format of all four borders) in the table grab bag. The exporter recovers them and compares with the cell properties before writing them; if the cell property matches the stlye-defined one, we don't write it to the document. An existing unit test was slightly modified to check that the actual cell properties are not being skipped. Change-Id: I3aa12d76fb8f73d3fd300f254d19e1683fb6146c
* TyposJulien Nabet2014-04-031-1/+1
| | | | Change-Id: Ia406e2efb1eb2685eeffdf07dcc5fad4fc2b6e94
* writerfilter: DEBUG_PROTOCOL is never definedMiklos Vajna2014-04-035-322/+0
| | | | Change-Id: I0f6de2041237282c770bd3926140836008d7d12b
* writerfilter: unused WRITERFILTER_OOXML_DLLPUBLICMiklos Vajna2014-04-033-10/+4
| | | | Change-Id: I3f14017d6816d59b951c947827ca9497f2cd97fc
* oox: Preserve table style.Jacobo Aragunde Pérez2014-04-033-0/+13
| | | | | | | | | | | | | | | | | Table style is a property that defines a set of background and line attributes for cells. These attributes depend on theme settings (e.g. theme colors). We added a grabbag to the table object to save the table style name. We detect that name on export and write it back to the document. Finally, modified an existing unit test to check this attribute too. TODO: To get the table style working properly after a roundtrip, we must preserve it and also check that its values are not being overwritten by different cell or table properties. Change-Id: Id0e022a389561960c21ab874db33649499735024
* oox: Preserve cell theme color.Jacobo Aragunde Pérez2014-04-033-4/+8
| | | | | | | | | | | | | | | | | | | | | When some background color is set to a table cell, it is stored in the cell properties tag <tcPr> like this: <w:shd w:fill="ECD2B6" w:color="auto" w:themeFill="accent6" w:themeFillTint="66" w:val="clear"/> The theme-related attributes in w:shd were not being preserved. To fix this I added an InteropGrabBag to the cell properties object, which is filled with the attributes of w:shd to be checked on export. The exporter checks if the cell color is still the original color that was imported from the file, if it is not it means the user has manually changed it during the edition and the new color is written instead. Finally, added a unit test for theme attributes on tables. Change-Id: Ica8091b5eb4075e51912a255650a1d9d64f5767a
* writerfilter: unused Exception classMiklos Vajna2014-04-021-54/+0
| | | | Change-Id: I127ef1183a2c146471668680965fa3d72f6a8f81
* writerfilter: unused SubSequence classMiklos Vajna2014-04-021-247/+0
| | | | Change-Id: Ib52309202714e67af78ef5a47f519779d849931c
* unused WRITERFILTER_RESOURCEMODEL_DLLPUBLICMiklos Vajna2014-04-0211-29/+23
| | | | Change-Id: Ia09cd8738e7bfbb942690efb193c0de30e93f69c
* fdo#76586 Table column separators from individual cell widthsVinaya Mandke2014-04-021-2/+8
| | | | | | | | | | | | | | | In the test file Table Grid had only one value for entire table width while there are two cells in a table row. So the table was not imported with the correct Column Separators. Added fix to calculate column seperators from cell widths if unable to calculate from Table Grid, and all the cells have individual cell widths and there are no after and before cells. Change-Id: I466737437a18d3373e75fea5ad56c9e31eb149ec Reviewed-on: https://gerrit.libreoffice.org/8767 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
* Explicitly mark overriding destructors as "virtual"Stephan Bergmann2014-04-016-10/+10
| | | | | | | | It appears that the C++ standard allows overriding destructors to be marked "override," but at least some MSVC versions complain about it, so at least make sure such destructors are explicitly marked "virtual." Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
* oox, writerfilter: add missing headers for C++ containersDouglas Mencken2014-03-317-1/+7
| | | | | Change-Id: Ied05627a0b5fdb8e5fd4a1b071ce32d901f07961 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* writerfilter: unused sprmcodetostr*Miklos Vajna2014-03-302-40/+0
| | | | Change-Id: Ia35b098033c92fdc7d2313d12b01324ef7232b1f
* coverity#736006 Unchecked dynamic_castMiklos Vajna2014-03-291-1/+2
| | | | Change-Id: Id4b0f5e6e4369a850bc159992540e024a4c37c3c
* coverity#705083 Unchecked dynamic_castMiklos Vajna2014-03-291-3/+4
| | | | Change-Id: I58e7be8d7b78ba83356e169290c289f246e93057
* coverity#705082 Unchecked dynamic_castMiklos Vajna2014-03-291-3/+4
| | | | Change-Id: Ic4665f2cbd2bfc4b65a0f3d9d746e344d4f3bef8
* coverity#736005 Unchecked dynamic_castMiklos Vajna2014-03-291-0/+2
| | | | Change-Id: Ieca4f06f3ca4fecb8a0e87e7528f8583a549013c
* coverity#1194911 Unchecked dynamic_castMiklos Vajna2014-03-291-1/+1
| | | | Change-Id: I1e7f4bcd8f54219d86ad7a003469d5a486090f47
* coverity#705071 Unchecked dynamic_castMiklos Vajna2014-03-291-1/+2
| | | | Change-Id: Ic7b120daf4d5456ed882ffa3724c53d1246e7b4d
* coverity#705070 Unchecked dynamic_castMiklos Vajna2014-03-291-2/+4
| | | | Change-Id: Ibb4cf1e8bd002d4c36030f5567e1a16f86ea1668
* coverity#736004 Unchecked dynamic_castMiklos Vajna2014-03-291-0/+2
| | | | Change-Id: Icca4946543409adb0ac6f7bf78915f8ef5b0fa40
* coverity#736003 Unchecked dynamic_castMiklos Vajna2014-03-291-1/+3
| | | | Change-Id: Ie7451b1c96437df444198152230190d07689c1f1
* coverity#705068 Unchecked dynamic_castMiklos Vajna2014-03-291-1/+1
| | | | Change-Id: I3573618670d5975d02ec67e3314d734be05fcbe5
* coverity#736001 Unchecked dynamic_castMiklos Vajna2014-03-291-1/+2
| | | | Change-Id: I39622eb9c0d5f91c910b9c828beead2d1763af0e
* coverity#1194902 Unchecked dynamic_castMiklos Vajna2014-03-291-1/+2
| | | | Change-Id: I7a7c8d365e9f90096c98120e448a5571ca5e54a5
* coverity#1194901 Unchecked dynamic_castMiklos Vajna2014-03-291-1/+2
| | | | Change-Id: I63f91359f4232c5897de77905b3375e9c2f30d2e
* writerfilter: remove unused genclass.xslMiklos Vajna2014-03-291-710/+0
| | | | Change-Id: I4a76c13fb01e728613211ae3e4959f75a151ff33
* Work around MSC "'override' cannot be used with 'inline'" bugStephan Bergmann2014-03-271-4/+4
| | | | Change-Id: Ibf7094c750c665cf14a104091e8ff148d743bccc
* Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann2014-03-2751-454/+454
| | | | | | | ...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
* apparently some table .docx properties shouldn't be < 0Luboš Luňák2014-03-263-3/+10
| | | | | | | | Somewhat related to 10b4da63e3143108ba75891e9e98fdaa2f7953ab , a similar doc has negative value inside w:tblCellMar, which MSO seems to ignore (altering the value has no visible effect), so ignore it as well. Change-Id: I846e9b55fea0d4e66f03ce615584516360b8b7dd