summaryrefslogtreecommitdiffstats
path: root/writerfilter
Commit message (Collapse)AuthorAgeFilesLines
* Typo: becase -> becauseJulien Nabet2014-04-281-1/+1
| | | | Change-Id: I065a581ea02e5f8892e44c7e97903297a40cde18
* writerfilter: fix indentation in rtftokenizerMiklos Vajna2014-04-272-137/+142
| | | | Change-Id: Ia9c609eabc39c3933479eae3d5c4499f11c58528
* fix "transparency" of floating tables in docx import (fdo#77723)Luboš Luňák2014-04-271-1/+3
| | | | | | | | | Normal tables do not have any fill background on their own, i.e. it's possible to see e.g. an image in the background, so if we put a table inside a frame in order to make it floating, make the frame transparent in order to achieve the same result. Change-Id: I77b1c8f847af5355c4238bfa089d760dd6121a69
* writerfilter: fix indentation in rtfcharsetsMiklos Vajna2014-04-262-14/+19
| | | | Change-Id: Id5592e10b93800560e82b4506cddb1dfcbe1043f
* writerfilter: unused appendToInteropGrabBag() versionMiklos Vajna2014-04-262-9/+0
| | | | Change-Id: Ie00332fcaaf3a78516569b010ac2ff7e2c259b28
* Blind fix: writerfilter::TableManager used without template parametersTor Lillqvist2014-04-241-1/+1
| | | | Change-Id: I351478d9dbde6f7459145b82a73fb5bb119a6bdb
* writerfilter: fix indentation in rtflookaheadMiklos Vajna2014-04-242-39/+43
| | | | Change-Id: Ib012030799ef2602a4b61c38d5ad2374422fe8b8
* fdo#39056 fdo#75431 Section Properties if section starts with tableVinaya Mandke2014-04-245-3/+108
| | | | | | | | | | | | | | | | | | | | | | Section properties are not imported if the section starts with a table for DOCX, and also for a few RTF files with combination of tables and section breaks. SwXBodyText::createTextCursorByRange is not able to find the start of section and hence section properties are not applied. As a workaround added an empty paragraph at the beginning of every section which has the the first element as a table. And then removed it when the section ends ( DomainMapper::lcl_endSectionGroup is called). Also handled to add the paragraph earlier, if there is a bookmark so that the bookmark is not attached to the dummy paragraph. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/9097 Change-Id: I717ba40e22b055d974bc83d4414aeb2945e16d26
* add missing modelines to cxx and hxx filesThomas Arnhold2014-04-241-0/+3
| | | | | | some of them have no copyright header Change-Id: I9c2c0c859dabe231cb29af29290847e7b4aa46a3
* handle w:gridBefore by faking cells (fdo#38414)Luboš Luňák2014-04-234-2/+96
| | | | | | | | | | | | | | | | Docx's w:gridBefore means that there should be this given space in the table grid before any cells come. But writer requires tables to be rectangular, so the space needs to be faked using cells without border. So far so good, but now reality in the form of the retarded overdesigned writerfilter comes. The internal representation of table data (and not just one actually) is pretty non-obvious and hard to modify, seems to be modelled just to follow the parser data the way it comes. Moreover dmapper gets notified of w:gridBefore only after cells in the row have been already processed. So after futile attempts to add the fake cells somehow in dmapper I've eventually given up and hacked up input handling to fake input as if the fake cells were actually there (which was tedious to find out as well, but at least it's reasonably doable). Change-Id: I7107e13f28dd3f7093688782f64238167cead76f
* writerfilter: fix indentation in rtfskipdestinationMiklos Vajna2014-04-222-21/+25
| | | | Change-Id: I56a306baabdfb46da4b46c5e0c0ce2bbd2369e03
* Resolves: rhbz#1089377 crash on loading a specific rtfCaolán McNamara2014-04-223-13/+1759
| | | | Change-Id: I26864f3a2247f5d7184f395cfed91eaf92e36295
* Accidentally removed "s"Stephan Bergmann2014-04-221-1/+1
| | | | Change-Id: I1b693f767fd7fc1170cd396ee037243fa5a1fffa
* loplugin:passstringbyrefStephan Bergmann2014-04-221-1/+1
| | | | Change-Id: Iee0ad3898e109add96daac693633c0921c3d7c97
* -Werror,-Wparentheses-equalityStephan Bergmann2014-04-221-2/+2
| | | | Change-Id: I65f41ace03071fdb420736e373684b592ddf5fab
* Related: fdo#77600 RTF import: RTFValue::equals: compare attribute contentMiklos Vajna2014-04-223-0/+14
| | | | | | | Previously only the number of nested sprms / attributes was compared. With this, the font of the bugdoc is correctly Arial, not Times. Change-Id: I351de414b6734336b31c1334dbd2349072f16002
* fod#77122 DOCX filter: link between textboxes is not being preservedumeshkadam2014-04-223-3/+105
| | | | | | | | | Added support for linked textboxes for docx interoperability. Reviewed on: https://gerrit.libreoffice.org/9092 Change-Id: I7db4f5a1783afff53c64908d182788b262f5e863
* handle properly page breaks even if a page contains only a frame (fdo#55381)Luboš Luňák2014-04-212-7/+24
| | | | | | | | | | | | | | | | The test document has 4 pages which only contain frames, first 3 pages (sections) have <p> block with <framePr> and another <p> with just <sectPr>, and the second paragraph would be removed, thus there would be no nodes on which to actually set the page style and they would be set on nodes for the previous page, overwriting its page style. The last page does not have its own <p> at all, so it needs to be faked. The changes in finishParagraph() are because of e.g. the comments-nested.odt sw test, which there causes exception because of unknown property ParaStyleName (comments do not use those it seems) and the code is skipped over (which is probably a bug on its own, but it's unrelated to this change otherwise). Change-Id: I9d37f992407a9b649c710d2a031ec4447fb11771
* writerfilter: fix indentation in rtfsdrimportMiklos Vajna2014-04-212-155/+160
| | | | Change-Id: Ibecedba7a8a6e6b3218f64aefdd05897a6612a71
* writerfilter: fix indentation in rtfvalueMiklos Vajna2014-04-202-107/+109
| | | | Change-Id: I40edb3980fe9cf9e88a7bd75b542dc44509fd74b
* writerfilter: fix indentation in rtfsprmMiklos Vajna2014-04-192-76/+96
| | | | Change-Id: Id81cb97033e616acf071f386630b49ccb83dfedc
* fixincludeguards.sh: writerfilterThomas Arnhold2014-04-1976-196/+196
|
* fdo#75735 RTF import: fix COW when writing a nested structureMiklos Vajna2014-04-183-3/+7
| | | | | | | Regression from a48e2fd9049797110b3b2505c363557284987ca8 (fdo#44736 - convert RTFSprms to a copy-on-write structure., 2012-12-07) Change-Id: I2538f440e29cef6d40db2ea914e4afcbfe411890
* fdo#77219 Image property Z-index [behindDoc] not preserved after RTRavindra Vidhate2014-04-171-6/+25
| | | | | | | | | | | Problem description: For the images who has the "Text wrapping" property set as Behind Text is not preserved after saving the file in DOCX format using LO. Reviewed on: https://gerrit.libreoffice.org/9065 Change-Id: Ic8555103909c0f1ed1cb58fba4dc2ef2f84cc9dd
* writerfilter: Hide more debug strings we don't need in production builds.Jan Holesovsky2014-04-164-1/+7
| | | | Change-Id: If30d3a94cd3f18bd5c4856d8a88f6c78e0da3e76
* fdo#74652 : Extra image gets added to the document body after RT.Tushar Bende2014-04-161-0/+10
| | | | | | | | | | | | | | | | | | Description: There was a problem for some documents, that when opened in LibreOffice extra image was getting added to the first page of the doc and same could be noticed even in RoundTripped doc. The root cause was if picture bullet is added to the doc and there is no <w:lvlPicBulletId> tag in <w:lvl> of <w:abstractNum> then removal of extra added graphic object from document body was getting missed because currently that is handled in ListsManager::lcl_sprm() inside "case NS_ooxml::LN_CT_Lvl_lvlPicBulletId". Checking if there is any remaining item in m_aNumPicBullets when LO hits the ListsManager destructor. If there is any calling dispose() for all of them. Change-Id: Ibfc3c93b68ff7d6ef0909fe789dda6db67ac11e2 Reviewed-on: https://gerrit.libreoffice.org/8940 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
* Line spacing is not preserved for styles.PriyankaGaikwad2014-04-151-1/+2
| | | | | | | | | | | | | | Description : In StyleSheetTable.cxx, while setting the property "ParaInteropGrabBag" throws an exception. Hence rest of the properties are not set. Implimentation : Skip that property so that rest of the properties will not be lost. Change-Id: Id488de71bc5f893a7401420d9e63e4405b90f760 Reviewed-on: https://gerrit.libreoffice.org/8902 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
* Properly #ifdef debug-only codeStephan Bergmann2014-04-151-0/+2
| | | | Change-Id: Iebf7ed1fb034ab2c2bee36ca6bf23408bf060d8d
* update_pchThomas Arnhold2014-04-141-2/+13
| | | | Change-Id: I099bff66a7796a5cf18e37e445467bdfb33de602
* writerfilter: QNameToString is for debugging, avoid using that in real code.Jan Holesovsky2014-04-147-16/+47
| | | | Change-Id: I8462204bb0fe4da8de1d05a42347466e40e54169
* Compile the debugging strings in only if we are about to use them.Jan Holesovsky2014-04-142-4/+4
| | | | | | Saves us tons of string literals. Change-Id: Ieb7ac52e7493d692e7ed56552350b8781ec6b500
* fdo#77267 RTF import: pard should reset current paragraph styleMiklos Vajna2014-04-141-0/+3
| | | | Change-Id: I8d78ce262a4e57161325231a78e48750909b1bad
* fdo#76741 [DOCX] Table Alignment and width typeVinaya Mandke2014-04-141-1/+17
| | | | | | | | | | | | | | | | | | | | There are two issue related to table in the saved(exported) file - the table alignment in saved file is "left" instead of "center" - the table width type in properties is "auto" instead of "dxa" In the issue file alignment was specified in w:tblpXSpec="center" and so were missed at import. Added support to fetch HORI_ORIENT from frame properties if its not set in Table Properties The ::GetTablePageSize returns 0 if the table width is FIXED. Modified it to return the tableWidth in such case. Conflicts: writerfilter/source/dmapper/DomainMapperTableHandler.cxx Reviewed on: https://gerrit.libreoffice.org/8846 Change-Id: I02a3af5e9d8ef3746c4d6bec0a07a24e01cc12a4
* RTFTokenizer::resolveParse: use SvStream::remainingSize()Miklos Vajna2014-04-131-3/+1
| | | | Change-Id: Ia09c4cf67390e24573174ff701a72f7bac367599
* 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