summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2013-09-10Mark as const / staticTakeshi Abe
Change-Id: I9bcf02b270200fd146d2bfee6f15ff1f9ad8888b
2013-09-09fdo#68291 RTF paste: don't set PageDescName during pasteMiklos Vajna
In general, paste should not deal with page styles. In this case, it even caused an additional page break. Change-Id: Ia7c5a9ad844821b6622babfbd94469ec3c04cf0a
2013-09-08CharBrd 9.3: RTF filtersZolnai Tamás
-Use sprm:CBrc attribute for all MS filter (for ooxml too). -Extract general code to FormatCharBorder() method, it selects the border side and decides whether add shadow to the border. -RTF export has a color table, which must be filled with border colors before the actual export.temp Change-Id: Ic3ceae6e19ddc2ed5aaa8de85617f9a592289b4f
2013-09-08CharBrd 9.2: DOCX filtersZolnai Tamás
- Modify HasTextItem() method to able to get character attributes during export. (in this case RES_CHARTR_SHADOW) - Only one side of the border can be exported. Selecting order: (top, left, bottom, right) - During import set all four side and use the Word default shadow type (back, bottom-right, border width wide) Change-Id: I3e1e27a2ef2d77b397f2ca8efe578e09271bcf8c
2013-09-05update pchThomas Arnhold
Change-Id: I6d5e8d3fd69189935a3338fee19b60022f70a7eb
2013-09-04fdo#68787 DOCX import: handle when w:separator is missing for footnotesMiklos Vajna
There were two problems here: 1) OOXML has no way to explicitly disable the footnote separator, what is does is that it omits the <w:separator/> element in that case. We didn't parse that previously -- now we do, and if it's missing, the separator is disabled. 2) The footnote stream isn't read by the importer, only when the main stream references the footnote one, the relevant part of it is parsed. At the moment we always parse the first (special, "separator") entry in the footnote stream, that may be optimized later if it becomes a bottleneck. Change-Id: Ie588270a212fc90fc41095029a362cfd832b24f8
2013-09-03fdo#68607 bnc#816593 DomainMapperTableHandler: don't always start a frameMiklos Vajna
This is a port of commit 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de "Related: fdo#61594 SwWW8ImplReader::StartApo: don't always start a frame" from the WW8 filter to the DOCX one. (regression from edc4861a68e0269b83b17e0ec57912a1ce4220ad) Change-Id: If1bb4a8a3786aacd618585cf859b57ce9be85c51
2013-09-02bnc#816593 DOCX import: ignore page breaks in tablesMiklos Vajna
Change-Id: Ibb250148d41d1929fa17dd993bb71c93c0e09dcf
2013-08-31writerfilter: mark these as staticMiklos Vajna
Change-Id: I240b95e09d3555c0fdcdf6c4b9eb458ad82460e4
2013-08-30fdo#41068: writerfilter: fix image wrap polygon importMichael Stahl
Mainly the problem seems to be that Stein's GCD algorithm requires non-negative input parameters, and the document has this: <wp:lineTo x="-480" y="6104"/> (regression from 86898639d4144a078ed295d0a8bef406868802cb) Change-Id: I8da1272c3caae84f43472aa4acb65ed66dfbd8ae
2013-08-29bnc#816593 DOCX filter: import paragraph spacing from table styleMiklos Vajna
Change-Id: I9dce59ecd8a2d2bfadb8c7273cd46c6c0cf17774
2013-08-28bnc#816593 DOCX import: fix auto table width wrt nested tablesMiklos Vajna
The bugdoc has a table with a single cell, and also a nested table in that cell. Both tables have auto width. The problem was that the width of the outer table was too large. There is a trick in DomainMapperTableManager::startLevel() to get the cell widths at the correct level: do the same in DomainMapperTableManager::endLevel(), and that'll fix the table width problem. (Because with that, the outer table will correctly have access to its cell width.) Change-Id: Ib750f0475364fd7e47c445cb54f2df34f3af085d
2013-08-28bnc#816593 DOCX import: let w:before not overwrite w:beforeAutospacingMiklos Vajna
And do the same for w:after / w:afterAutospacing. The spec says that if w:beforeAutospacing is read, w:before should be ignored, this implies that if we already had w:beforeAutospacing, w:before should not overwrite the already existing top margin. Change-Id: I9437cb5c6fc352a360e27aa279d0a789706c5578
2013-08-28bnc#816593 DOCX import: fix auto para spacing without compat optionMiklos Vajna
Paragraph auto spacing (before and after) without the w:doNotUseHTMLParagraphAutoSpacing compat option was incorrect. Change-Id: I56d6153f7c489de7fceaf6fab7325c42ee8f9cae
2013-08-26WaE: OUString::valueOf in higher debug levelsCaolán McNamara
Change-Id: I2aed7907c79905158714dc1b26ae1aefc1fcccc6
2013-08-26Introduce msfilter::util::findQuotedText()Miklos Vajna
This was in writerfilter, but we'll need it soon in sw as well, so move it down to msfilter. Change-Id: I8efe02b6bbe8f391d9e14857ed58dbae184d5632
2013-08-23DOCX import of picture shadow transparencyMiklos Vajna
Change-Id: I15e09017eccc3f0e5ed8cab9c3de3677c8a580fa
2013-08-22fdo#44689: fix for DOCX import+export of page number start valuePiao Jing Nan
Change-Id: If4940b17bcee0d06fa8dc9bf9faa708cf6d0db1c Signed-off-by: Adam Co <rattles2013@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/5528 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-22fdo#68076 RTF import: default font had priority over the specified oneMiklos Vajna
Regression from 60c17b2873506ed8b068b34840aecda0c1d9bd65. Change-Id: Ie16d611622e6a814d5cbea00c3f992cd9ecba027
2013-08-21DOCX import: fix handling of textframes having shape text ending with a tableMiklos Vajna
Change-Id: I82ef1072bfeb1195152ef7f1ea743653ac102b37
2013-08-21finish deprecation of O(U)String::valueOf()Luboš Luňák
Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-17fdo#44715 RTF import: reset styles in tables on RTF_PARDMiklos Vajna
Commit 4a507f732d82c188ad81b022cbe3037951e58ac3 added an exception to RTF_PARD (reset paragraph properties) handling: when we're inside a table, it should not reset the fact that we're inside a table (which is a paragraph property). However, instead of just re-adding that property, it disabled resetting for all properties, and we had a growing list of exceptions since then. The next thing to add there would be the paragraph attributes, which contains the style information. Instead of growing that ad-hoc list, reset everything again and just re-add the "in table" SPRM. This makes the second and later paragraphs in the A1 cell of the bugdoc have proper font size. Change-Id: I2de80894fcd5da3bf45d221af9a04a307c70a29b
2013-08-16fdo#68084: OOXML import: handle exceptions if stream is missingMichael Stahl
The bugdoc does not have a styles.xml but a stylesWithEffects.xml, whatever that may mean. (the app.xml contains "Microsoft Macintosh Word") Change-Id: If3d11c5d166dcaf3d94129339559787c20e6db46
2013-08-15RTF import/export of paragraph drop shadowMiklos Vajna
Change-Id: I8d2485962947eac8acc9ada384a9c1bd4cb22503
2013-08-15DOCX import: handle custom left cell margin for float table positionMiklos Vajna
Change-Id: I5bc51b739c663d3e123c9d7fb4c2a70f01f8c841
2013-08-15DOCX import: handle w:leftFromText and w:rightFromText for floating tablesMiklos Vajna
Left margin wasn't implemented, that's simple. Right margin of the table was set to the cell margin in commit 53d27a30ce5f2c9f7d37a4089286116854c16215, which turns out to be wrong: it's true that the right margin should be >0, but not because of the cell margin but because of the table margin. The new behavior matches what the binary import always did. Change-Id: Ifc24e4f086c49d5d575defdfca1d27e497fa03dc
2013-08-15DOCX import: handle w:topFromText and w:bottomFromText for floating tablesMiklos Vajna
Change-Id: Ia3a95d785d19f7be750e3723c1c159395ae8476f
2013-08-14Reduce scopeJulien Nabet
Change-Id: I5cbb44df09291b8a1b74e8aa176d6471960b3391
2013-08-14DOCX import: fixed horizontal position of floating tablesMiklos Vajna
In Word, just like normal tables, floating tables should be positioned in a way that the start of the cell text has the same horizontal position as normal paragraph text. To emulate this, first the table should be moved left by the table border distance, then also by the border with / 2; as done for non-floating tables already. Change-Id: I581311fbb08009e6c1839106e8f615d078a4a705
2013-08-14DOCX import: fix table auto width for multiple tablesMiklos Vajna
m_nMaxFixedWidth wasn't reset across tables, so the counted width for the first table in the bugdoc affected the second as well. Regression from 74c5ed19f430327988194cdcd6bdff09591a93fa. Change-Id: I69a5fa402f2e0170a1ea0269fd73e4ad8f7fede1
2013-08-14w:spacing in a paragraph should also apply to as-char objects (bnc#780044)Luboš Luňák
Otherwise global w:spacing will be used even if overriden locally. Change-Id: I01f0a3a323566f6e29faf73bf9d2ba874565eb42
2013-08-13DOCX import of paragraph border drop shadowMiklos Vajna
Change-Id: I566c491d65b65def65b78afb583624d8272027e0
2013-08-13RTF import: handle rotation on groupshapesMiklos Vajna
Change-Id: I7892224a118b6566e26b3ffc472c88f3c7f58620
2013-08-12fdo#63428 writerfilter: fix paste of commented text rangesMiklos Vajna
There were multiple problems here: - xFoo->createTextCursorByRange() got a text range argument, where the text range wasn't from the xFoo text - it was assumed that all XText implements text::XParagraphCursor as well, but this is not true for e.g. comment text - commented text ranges were pasted as normal comments (once again, the insert position wasn't passed around) Change-Id: I9a975a08b08a7f32b1ee71e42f58736cc0dbb09d
2013-08-12OSL_FAIL -> SAL_WARNMiklos Vajna
Change-Id: Ifbf7db8044ee28f5f24c03480391a315358a2db4
2013-08-09fdo#53556 RTF import: fix handling of default shapeTypeMiklos Vajna
It was a customshape, but Word seems to handle the shape as a rectangle when shapeType is missing. This makes the text in the textboxes of the bugdoc wrap properly. Change-Id: I56e044f42ead348bbb79addc36fa13c82a7ffc29
2013-08-09fdo#53556 RTF import of fFilled shape property for drwainglayer shapesMiklos Vajna
The real change is in RTFSdrImport::applyProperty(), the rest is just refactoring to be able to read the "is textframe" property from that method. With this, the transparent big rectangle in the bugdoc no longer hides the text on the first page. Change-Id: I04cca3ade93a63edf608df047bef3bdccf8d3605
2013-08-06compatibility setting for MS Word wrapping text in less space (bnc#822908)Luboš Luňák
The document itself is stupid and uses a SURROUND_THROUGH object with a number of empty lines that make it act is if it in fact was SURROUND_NONE, rather than actually disabling wrapping for the object and be done with it. But the difference was that Word still managed to fit those empty lines next to the object into the little space that was there, while LO already considered the space too small. So keep a compatibility setting for Word documents in order to avoid problems with such lame documents and hopefully that's enough. Change-Id: I7d17b90de381fd86914ce5efd9c5a29fe4850edc
2013-08-06fdo#47440 import RTF_SHPBX/YPAGE for Writer pictures, tooMiklos Vajna
Previously this was only handled for drawinglayer shapes. Change-Id: I7ce440a27ebe44fc867b8a7f4ee62217076677f0
2013-08-05fdo#67498 RTF import: fix missing margins vs continuous section breaksMiklos Vajna
The document had 3 sections, separated by continuous section breaks. Previously only margins from the last section were imported, this way the first page had default margins. Now margins are also applied when we hit continuous section breaks. This way margin values from the last section break affecting the page wins. A later commit could improve this further by setting the minimum of these and setting a section margin for each non-minimal sections. Change-Id: I4d9a4585e795220533909bd1d467d933caaa0d71
2013-07-29cppcheck: Prefer prefix ++/-- operators for non-primitive typesJulien Nabet
Change-Id: If1bd91f28a96bd0eb53e4057e51db900f8b2c52b
2013-07-27fdo#67365 fix RTF import of RTF_QC in table cells wrt unusual group stackMiklos Vajna
Change-Id: I487e1a941f499ab3d0a820c790af051a9b972376
2013-07-27fdo#67365 fix RTF import of inherited cell widthsMiklos Vajna
In theory, this is not needed since 01292f171cc851ba092510f10a97cd293670829e, and in practice it even causes a problem here. Change-Id: Id2c2f3f7815efada138f3f84724af77be3372fc1
2013-07-27fdo#67365 fix RTF import of inherited row props wrt unusual group stackMiklos Vajna
Change-Id: I273d89a0708601a38dd8bda734a72b4c92da2cc4
2013-07-26fdo#66474 DOCX import: fix handling of mixed fixed/auto cell widthsMiklos Vajna
Instead of checking if any cells have fixed width, check if all calls have fixed with. Regression from 74c5ed19f430327988194cdcd6bdff09591a93fa. Change-Id: I58d3d16cbaa2c54a8a1ac309910336c72dcb39b7
2013-07-26RTF import: fix groupshape import when shapes don't contain textMiklos Vajna
Without this, the groupshape itself was created, not it had no child shapes. Change-Id: I5d3276498eb3ffe840f3d42dad16661849596da4
2013-07-26Related: bnc#820504 RTF import: don't anchor shapes TO_PAGEMiklos Vajna
This is the RTF equivalent of f5b7acac624f07fa95835b6054b8d295901bb1dd, which avoided TO_PAGE-anchored shapes in the VML importer. Change-Id: I58a5cdb311ac43ddba00bc441005fb37a4899cee
2013-07-24fdo#66781 : fix bullets with level 0Adam Co
Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I14b0ce9ae096eae4759793a49865eefe16ec1afd Reviewed-on: https://gerrit.libreoffice.org/4818
2013-07-24writerfilter: import w:mirrorIndents as a grab bag propertyMiklos Vajna
Change-Id: I500c6af08326ea226b3774fb1e02709d278fa509
2013-07-24Keep passing XComponentContext into officecfg:: wrapper fns, where availableStephan Bergmann
Change-Id: I10448edd04c6c7e7f03c539bf85aba4e00c7e311