summaryrefslogtreecommitdiff
path: root/writerfilter/source
AgeCommit message (Collapse)Author
2014-04-27writerfilter: fix indentation in rtftokenizerMiklos Vajna
Change-Id: Ia9c609eabc39c3933479eae3d5c4499f11c58528
2014-04-27fix "transparency" of floating tables in docx import (fdo#77723)Luboš Luňák
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
2014-04-26writerfilter: fix indentation in rtfcharsetsMiklos Vajna
Change-Id: Id5592e10b93800560e82b4506cddb1dfcbe1043f
2014-04-26writerfilter: unused appendToInteropGrabBag() versionMiklos Vajna
Change-Id: Ie00332fcaaf3a78516569b010ac2ff7e2c259b28
2014-04-24Blind fix: writerfilter::TableManager used without template parametersTor Lillqvist
Change-Id: I351478d9dbde6f7459145b82a73fb5bb119a6bdb
2014-04-24writerfilter: fix indentation in rtflookaheadMiklos Vajna
Change-Id: Ib012030799ef2602a4b61c38d5ad2374422fe8b8
2014-04-24fdo#39056 fdo#75431 Section Properties if section starts with tableVinaya Mandke
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
2014-04-24add missing modelines to cxx and hxx filesThomas Arnhold
some of them have no copyright header Change-Id: I9c2c0c859dabe231cb29af29290847e7b4aa46a3
2014-04-23handle w:gridBefore by faking cells (fdo#38414)Luboš Luňák
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
2014-04-22writerfilter: fix indentation in rtfskipdestinationMiklos Vajna
Change-Id: I56a306baabdfb46da4b46c5e0c0ce2bbd2369e03
2014-04-22Resolves: rhbz#1089377 crash on loading a specific rtfCaolán McNamara
Change-Id: I26864f3a2247f5d7184f395cfed91eaf92e36295
2014-04-22Accidentally removed "s"Stephan Bergmann
Change-Id: I1b693f767fd7fc1170cd396ee037243fa5a1fffa
2014-04-22loplugin:passstringbyrefStephan Bergmann
Change-Id: Iee0ad3898e109add96daac693633c0921c3d7c97
2014-04-22-Werror,-Wparentheses-equalityStephan Bergmann
Change-Id: I65f41ace03071fdb420736e373684b592ddf5fab
2014-04-22Related: fdo#77600 RTF import: RTFValue::equals: compare attribute contentMiklos Vajna
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
2014-04-22fod#77122 DOCX filter: link between textboxes is not being preservedumeshkadam
Added support for linked textboxes for docx interoperability. Reviewed on: https://gerrit.libreoffice.org/9092 Change-Id: I7db4f5a1783afff53c64908d182788b262f5e863
2014-04-21handle properly page breaks even if a page contains only a frame (fdo#55381)Luboš Luňák
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
2014-04-21writerfilter: fix indentation in rtfsdrimportMiklos Vajna
Change-Id: Ibecedba7a8a6e6b3218f64aefdd05897a6612a71
2014-04-20writerfilter: fix indentation in rtfvalueMiklos Vajna
Change-Id: I40edb3980fe9cf9e88a7bd75b542dc44509fd74b
2014-04-19writerfilter: fix indentation in rtfsprmMiklos Vajna
Change-Id: Id81cb97033e616acf071f386630b49ccb83dfedc
2014-04-19fixincludeguards.sh: writerfilterThomas Arnhold
2014-04-18fdo#75735 RTF import: fix COW when writing a nested structureMiklos Vajna
Regression from a48e2fd9049797110b3b2505c363557284987ca8 (fdo#44736 - convert RTFSprms to a copy-on-write structure., 2012-12-07) Change-Id: I2538f440e29cef6d40db2ea914e4afcbfe411890
2014-04-17fdo#77219 Image property Z-index [behindDoc] not preserved after RTRavindra Vidhate
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
2014-04-16writerfilter: Hide more debug strings we don't need in production builds.Jan Holesovsky
Change-Id: If30d3a94cd3f18bd5c4856d8a88f6c78e0da3e76
2014-04-16fdo#74652 : Extra image gets added to the document body after RT.Tushar Bende
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>
2014-04-15Line spacing is not preserved for styles.PriyankaGaikwad
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>
2014-04-15Properly #ifdef debug-only codeStephan Bergmann
Change-Id: Iebf7ed1fb034ab2c2bee36ca6bf23408bf060d8d
2014-04-14writerfilter: QNameToString is for debugging, avoid using that in real code.Jan Holesovsky
Change-Id: I8462204bb0fe4da8de1d05a42347466e40e54169
2014-04-14Compile the debugging strings in only if we are about to use them.Jan Holesovsky
Saves us tons of string literals. Change-Id: Ieb7ac52e7493d692e7ed56552350b8781ec6b500
2014-04-14fdo#77267 RTF import: pard should reset current paragraph styleMiklos Vajna
Change-Id: I8d78ce262a4e57161325231a78e48750909b1bad
2014-04-14fdo#76741 [DOCX] Table Alignment and width typeVinaya Mandke
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
2014-04-13RTFTokenizer::resolveParse: use SvStream::remainingSize()Miklos Vajna
Change-Id: Ia09c4cf67390e24573174ff701a72f7bac367599
2014-04-12fdo#74599 RTF import: enable StylesNoDefault compat settingMiklos Vajna
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
2014-04-11writerfilter: remove no longer needed WRITERFILTER_WRITERFILTER_DLLPUBLICMiklos Vajna
Change-Id: Idedee38be19bc770518b85af62c9fc2b5b64e822
2014-04-11fdo#76635 : Table borders not preserved after RTRajashri
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>
2014-04-11check that stacks are not empty before top()Caolán McNamara
Change-Id: Iad5b3381b8201c5ac32a5bdf99bd3d5872ea3afc
2014-04-11Introduce twip/mm100 conversion functions instead of duplicated macrosTor Lillqvist
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>
2014-04-11writerfilter: clean up duplicated PROP_PARA_*_MARGIN_*_AUTO_SPACING insertionsMiklos Vajna
Change-Id: If3f7a54a48541935295515bae47233e53c228fe5
2014-04-11fdo#76597: Fix preservation issue of Spacing between paragraphRohit Deshmukh
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>
2014-04-10writerfilter: remove dead doctok detection codeMiklos Vajna
Change-Id: Ib39d54ce37b9e41ab6aff742d7680a7cd76168cd
2014-04-10It's "its", not "it's"Tor Lillqvist
Change-Id: Ieaa787afd7cc622b4750a2ee8f17f6dad934ba63
2014-04-10loplugin:bodynotinblockStephan Bergmann
Change-Id: I7262f0114f3bde17d81e14e0813cc7906e73fceb
2014-04-10fdo#77051: Preservation of Index field flag '\f'.YogeshBharate
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>
2014-04-09WaE: passing OUString by value, rather pass by referenceTor Lillqvist
Change-Id: I2577234385257ed0512403e5c9e34aa71ed5ce1f
2014-04-09fdo#76583 DOCX import: Floating table information is not preserved in RT file.umeshkadam
- 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
2014-04-08WaE: -Werror=maybe-uninitializedCaolán McNamara
Change-Id: Idc72dde52280fd3dc1721ad9f4d8df38017e18f0
2014-04-08fdo76591:-Textbox property (order-> send behind text) is not preserved.Sourav
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>
2014-04-06RTFSprms::set: replace two bool arguments with an enumMiklos Vajna
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
2014-04-05fdo#74823 RTF import: work around wrong table column width on invalid inputMiklos Vajna
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
2014-04-04fdo#76628 RTF import: allow the same font to have multiple encodingsMiklos Vajna
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