summaryrefslogtreecommitdiffstats
path: root/writerfilter
Commit message (Collapse)AuthorAgeFilesLines
* bnc#816593 DOCX import: fix auto table width wrt nested tablesMiklos Vajna2013-08-281-0/+9
| | | | | | | | | | | | | | 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
* bnc#816593 DOCX import: let w:before not overwrite w:beforeAutospacingMiklos Vajna2013-08-281-2/+4
| | | | | | | | | 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
* bnc#816593 DOCX import: fix auto para spacing without compat optionMiklos Vajna2013-08-281-4/+3
| | | | | | | Paragraph auto spacing (before and after) without the w:doNotUseHTMLParagraphAutoSpacing compat option was incorrect. Change-Id: I56d6153f7c489de7fceaf6fab7325c42ee8f9cae
* WaE: OUString::valueOf in higher debug levelsCaolán McNamara2013-08-261-1/+1
| | | | Change-Id: I2aed7907c79905158714dc1b26ae1aefc1fcccc6
* Introduce msfilter::util::findQuotedText()Miklos Vajna2013-08-261-24/+4
| | | | | | | This was in writerfilter, but we'll need it soon in sw as well, so move it down to msfilter. Change-Id: I8efe02b6bbe8f391d9e14857ed58dbae184d5632
* DOCX import of picture shadow transparencyMiklos Vajna2013-08-231-1/+3
| | | | Change-Id: I15e09017eccc3f0e5ed8cab9c3de3677c8a580fa
* fdo#44689: fix for DOCX import+export of page number start valuePiao Jing Nan2013-08-221-0/+13
| | | | | | | | 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>
* fdo#68076 RTF import: default font had priority over the specified oneMiklos Vajna2013-08-221-2/+3
| | | | | | Regression from 60c17b2873506ed8b068b34840aecda0c1d9bd65. Change-Id: Ie16d611622e6a814d5cbea00c3f992cd9ecba027
* DOCX import: fix handling of textframes having shape text ending with a tableMiklos Vajna2013-08-212-0/+14
| | | | Change-Id: I82ef1072bfeb1195152ef7f1ea743653ac102b37
* finish deprecation of O(U)String::valueOf()Luboš Luňák2013-08-2110-26/+26
| | | | | | | Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
* fdo#44715 RTF import: reset styles in tables on RTF_PARDMiklos Vajna2013-08-171-9/+5
| | | | | | | | | | | | | | | | | | 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
* fdo#68084: OOXML import: handle exceptions if stream is missingMichael Stahl2013-08-161-2/+11
| | | | | | | 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
* RTF import/export of paragraph drop shadowMiklos Vajna2013-08-151-0/+3
| | | | Change-Id: I8d2485962947eac8acc9ada384a9c1bd4cb22503
* DOCX import: handle custom left cell margin for float table positionMiklos Vajna2013-08-154-21/+24
| | | | Change-Id: I5bc51b739c663d3e123c9d7fb4c2a70f01f8c841
* DOCX import: handle w:leftFromText and w:rightFromText for floating tablesMiklos Vajna2013-08-153-11/+18
| | | | | | | | | | | 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
* DOCX import: handle w:topFromText and w:bottomFromText for floating tablesMiklos Vajna2013-08-153-4/+16
| | | | Change-Id: Ia3a95d785d19f7be750e3723c1c159395ae8476f
* Reduce scopeJulien Nabet2013-08-141-2/+1
| | | | Change-Id: I5cbb44df09291b8a1b74e8aa176d6471960b3391
* DOCX import: fixed horizontal position of floating tablesMiklos Vajna2013-08-144-11/+37
| | | | | | | | | | | | 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
* DOCX import: fix table auto width for multiple tablesMiklos Vajna2013-08-141-0/+2
| | | | | | | | | 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
* w:spacing in a paragraph should also apply to as-char objects (bnc#780044)Luboš Luňák2013-08-141-0/+9
| | | | | | Otherwise global w:spacing will be used even if overriden locally. Change-Id: I01f0a3a323566f6e29faf73bf9d2ba874565eb42
* DOCX import of paragraph border drop shadowMiklos Vajna2013-08-135-8/+24
| | | | Change-Id: I566c491d65b65def65b78afb583624d8272027e0
* RTF import: handle rotation on groupshapesMiklos Vajna2013-08-135-7/+32
| | | | Change-Id: I7892224a118b6566e26b3ffc472c88f3c7f58620
* fdo#63428 writerfilter: fix paste of commented text rangesMiklos Vajna2013-08-121-4/+9
| | | | | | | | | | | | | 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
* OSL_FAIL -> SAL_WARNMiklos Vajna2013-08-121-2/+2
| | | | Change-Id: Ifbf7db8044ee28f5f24c03480391a315358a2db4
* fdo#53556 RTF import: fix handling of default shapeTypeMiklos Vajna2013-08-091-0/+7
| | | | | | | | 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
* fdo#53556 RTF import of fFilled shape property for drwainglayer shapesMiklos Vajna2013-08-092-11/+20
| | | | | | | | | | | 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
* compatibility setting for MS Word wrapping text in less space (bnc#822908)Luboš Luňák2013-08-063-0/+5
| | | | | | | | | | | | | 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
* fdo#47440 import RTF_SHPBX/YPAGE for Writer pictures, tooMiklos Vajna2013-08-062-9/+18
| | | | | | Previously this was only handled for drawinglayer shapes. Change-Id: I7ce440a27ebe44fc867b8a7f4ee62217076677f0
* fdo#67498 RTF import: fix missing margins vs continuous section breaksMiklos Vajna2013-08-052-19/+30
| | | | | | | | | | | | | 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
* cppcheck: Prefer prefix ++/-- operators for non-primitive typesJulien Nabet2013-07-291-1/+1
| | | | Change-Id: If1bd91f28a96bd0eb53e4057e51db900f8b2c52b
* fdo#67365 fix RTF import of RTF_QC in table cells wrt unusual group stackMiklos Vajna2013-07-271-0/+1
| | | | Change-Id: I487e1a941f499ab3d0a820c790af051a9b972376
* fdo#67365 fix RTF import of inherited cell widthsMiklos Vajna2013-07-271-2/+0
| | | | | | | | In theory, this is not needed since 01292f171cc851ba092510f10a97cd293670829e, and in practice it even causes a problem here. Change-Id: Id2c2f3f7815efada138f3f84724af77be3372fc1
* fdo#67365 fix RTF import of inherited row props wrt unusual group stackMiklos Vajna2013-07-271-0/+5
| | | | Change-Id: I273d89a0708601a38dd8bda734a72b4c92da2cc4
* fdo#66474 DOCX import: fix handling of mixed fixed/auto cell widthsMiklos Vajna2013-07-261-4/+11
| | | | | | | | Instead of checking if any cells have fixed width, check if all calls have fixed with. Regression from 74c5ed19f430327988194cdcd6bdff09591a93fa. Change-Id: I58d3d16cbaa2c54a8a1ac309910336c72dcb39b7
* RTF import: fix groupshape import when shapes don't contain textMiklos Vajna2013-07-262-1/+5
| | | | | | | Without this, the groupshape itself was created, not it had no child shapes. Change-Id: I5d3276498eb3ffe840f3d42dad16661849596da4
* Related: bnc#820504 RTF import: don't anchor shapes TO_PAGEMiklos Vajna2013-07-261-0/+2
| | | | | | | This is the RTF equivalent of f5b7acac624f07fa95835b6054b8d295901bb1dd, which avoided TO_PAGE-anchored shapes in the VML importer. Change-Id: I58a5cdb311ac43ddba00bc441005fb37a4899cee
* fdo#66781 : fix bullets with level 0Adam Co2013-07-241-2/+12
| | | | | | | | Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I14b0ce9ae096eae4759793a49865eefe16ec1afd Reviewed-on: https://gerrit.libreoffice.org/4818
* writerfilter: import w:mirrorIndents as a grab bag propertyMiklos Vajna2013-07-245-11/+40
| | | | Change-Id: I500c6af08326ea226b3774fb1e02709d278fa509
* Keep passing XComponentContext into officecfg:: wrapper fns, where availableStephan Bergmann2013-07-241-1/+1
| | | | Change-Id: I10448edd04c6c7e7f03c539bf85aba4e00c7e311
* fdo#46037: no more comphelper/configurationhelper.hxx in fpickerJulien Nabet2013-07-241-1/+1
| | | | | | | Change-Id: I571e0271d9432118d886561e140d689b2d1b8713 Reviewed-on: https://gerrit.libreoffice.org/5042 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
* Revert "fdo#46037: no more comphelper/configurationhelper.hxx in fpicker"Fridrich Štrba2013-07-241-1/+1
| | | | | | | | | | This reverts commit 7cbf9c9e0a34937783dfa7f78d460dcf70504841. Revert "Trying to fix the windows build" This reverts commit d1f58e5ea695e823e931aad1bfb1d7b4bf17634c. Change-Id: I67d00ec010a834e27b0e79b0afd92c5a2e7d47d6
* Trying to fix the windows buildFridrich Štrba2013-07-241-1/+1
| | | | Change-Id: I19d17a490c9af3d14a315a92ae2af86cc2e92d51
* fdo#46037: no more comphelper/configurationhelper.hxx in writerfilterJulien Nabet2013-07-233-20/+3
| | | | | | | Change-Id: If2500bf09f8bb23f70d46d8dbef5d8bbf9fc3fb3 Reviewed-on: https://gerrit.libreoffice.org/5041 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
* fdo#64637 RTF import: handle multiple RTF_COMPANYMiklos Vajna2013-07-231-2/+7
| | | | | | | | Instead of unconditionally calling addProperty(), first check the existence with hasPropertyByName() and call setPropertyValue() instead, if necessary. Change-Id: Ie0a075bbfe6eaa1f66726c456105dcdef9001d30
* fdo#66145: fix for FirstIsShared flagAdam Co2013-07-223-0/+7
| | | | | | | Change-Id: Id8cc3829ccd5806295b0f240a570dc1d66ed0c87 Reviewed-on: https://gerrit.libreoffice.org/5002 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
* n#825976: handle TOC \h field for illustrations tables in writerfilterCédric Bosdonnat2013-07-221-39/+63
| | | | | Change-Id: I9ebc91d5f0e706dc1e316e0aa8494af7aec4da4e (cherry picked from commit 43f7bc96c0117a77610bfa5e1edfa870123f56f1)
* writerfilter: make sure the redline stack always has at least one elementMiklos Vajna2013-07-221-0/+5
| | | | | | | | One element is pushed to that stack in the constructor, so calling top() on it always OK, as long as we check during pop() that the stack won't be empty. Change-Id: I010bd77897ab2a3684e7d9c5c0450e7bda626fc0
* fdo#65632 RTF import: send NS_ooxml::LN_trackchange only once for one rangeMiklos Vajna2013-07-182-3/+13
| | | | | | | | | | | | | | | The problem was that in case we had {\deleted foo\b bar} then both "foo" and "bar" triggered a trackchange, but "}" only ended one, resulting in overlapping redline ranges. This was cought by core, but caused a performance problem. For the first bugdoc, before: real 3m57.803s after: real 0m3.072s Change-Id: Ibf6f2db30109f0b9a2571d2e4fb3cc76294f68d1
* Related: fdo#65632 DOCX import: make start/end of trackchange both be an sprmMiklos Vajna2013-07-173-7/+9
| | | | | | | | | The end is an attribute since 0211e8bc457a12570988f4aee7dea42c2fc6d56f, but this just confuses dmapper. With this, the DOCX version of the bugdoc can now be imported without getting an exception in DomainMapper_Impl::CreateRedline(). Change-Id: If820b43a267a62ecdc323eef49bf13d576165269
* Related: fdo#65632 DOCX filter: fix import of non-redlined footnoteMiklos Vajna2013-07-172-9/+16
| | | | Change-Id: Ie1a86e6b59c43c3ee54076d5d68aa3fca0d6a515