summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)AuthorFilesLines
2015-12-22writerfilter: can use a plain instance for the table sequence hereMiklos Vajna2-16/+12
Change-Id: I34dc9cad5e7fb95eee2b0587e0a6b731571d6933
2015-12-21loplugin:unusedfields writerfilter,writerperfectNoel Grandin7-27/+10
Change-Id: I8863fcdb0751d2f1becea5b2487d4070e4fd4195
2015-12-20move saveInteropProperties from writerfilter to ooxMichael Stahl2-44/+5
Change-Id: I4f9769ad496198d2d002775dee4ee0a2f08d6f3b
2015-12-15writerfilter: set a BaseURL on embedded math objectsMichael Stahl5-9/+20
Change-Id: I9a500e079c892e281bdfee9627641f118261e0f8
2015-12-09tdf#95755: Don't discard table properties in endOfRowAction()Mike Kaganski1-14/+12
In the beginning of endOfRowAction(), the current value of m_aTmpTableProperties.back( ) is stored in a temporary variable. Then, the width of table may be put into m_aTmpTableProperties.back( ). In the end, this temp variable is assigned to TableManager::mState.mTableProps and the m_aTmpTableProperties.back( ) is reset. In the middle, the m_aTmpTableProperties.back( ) may be replaced in endLevel()/startLevel() sequence (if new table is started). In that case, the width calculations go to a different object than stored in temp var. Consequently, that value will be discarded and replaced with initial stored in temp var. Fixed that by directly operating with temp var instead of m_aTmpTableProperties.back( ). Also, the value of m_nCell was not kept over endLevel()/startLevel() sequence and that prevented from calculating width. Fixed that. Also, removed leftovers from commit cbd0fbc287051f918e4adb32b3e9b58dfbf8059d. Change-Id: If85dbb715e7c60f60043f9d60d6a3c3d02277add Reviewed-on: https://gerrit.libreoffice.org/20052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-08writerfilter: loplugin:stringconstantMiklos Vajna1-2/+2
Change-Id: Idb0865f4d0db6c4eda33810ab2ef4cff49bc85d1
2015-12-08tdf#54584: adjust skip-slash condition, allow unterminated quoteMike Kaganski2-9/+29
Experimenting with different non-alpha characters in front of field, most of them aren't allowed and result in field not recognized by MS Word: #$%&'()*+,-./:;<>?@[]^_`{|}~ Besides, if backslash "\" is followed by another backslash or space, it is illegal, too. This patch takes care of it. On the other side, not closing quotes is allowed by MS Word. This patch allows this, too. The patch does not handle another allowed field code "=2+2". This should be done in another commit. Change-Id: I842fe59c026b68977e61a7ae0b5495c02803ad83 Reviewed-on: https://gerrit.libreoffice.org/20435 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-07tdf#54584: allow backslash before field type in RTF and DOCXMike Kaganski1-0/+7
In some RTF and DOCX files, field type may be prepended with backslash. It seems not strictly standard-conformant (at least not to [MS-RTF]). Still, MS Word reads these fields OK. This patch allows LO to read them, too. Change-Id: I1f6bbdd9d57adbea8882d078761dd97298ca03b3 Reviewed-on: https://gerrit.libreoffice.org/20420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-07loplugin:overrideNoel Grandin1-6/+6
Change-Id: I0b7fa4d669a6bbf26c8cbf08ef009686919c9a60
2015-12-07loplugin:mergeclasses OOXMLPropertyImpl into OOXMLPropertyNoel Grandin4-86/+51
Change-Id: I1447cfc76c529332450c90a21b6525d3103fe852
2015-12-07loplugin:mergeclasses, merge OOXMLPropertyImpl into OOXMLPropertyNoel Grandin9-382/+320
Change-Id: I73eb7e664c0a53f135c06c3d8ea450bd9493c780
2015-12-04Wingdi RGB macro handling improvedAshod Nakashian1-59/+7
Improved the isolation of windows headers. Specifically, RGB macro is better handled now. Change-Id: I0eeea16d0de9da3455810c80b0715f7b54ae8c3f Reviewed-on: https://gerrit.libreoffice.org/20039 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-12-03Use comphelper::containerToSequence()Miklos Vajna2-10/+4
Change-Id: I774864241bc15fcfd08cd2becbf34aae0349a9d8
2015-12-02DOCX import: handle <w:smartTag>Miklos Vajna4-4/+77
These can be sort of arbitrary key-value pairs around one or multiple runs, handle the following subset: - when they appear at a paragraph context -> we assume they are annotations on the paragraph - when the smart tag's URI/element is RDF -> we map these to RDF metadata statements on paragraphs - when the attribute name's namespace is known, because in ODF we need to specify both a path and a type (namespace) for the RDF graph, and OOXML only provides a namespace As a start, recognize the TSCP BAF namespace from <https://www.tscp.org/wp-content/uploads/2013/08/TSCP_BAFv1.pdf>. Change-Id: Ib188b1395e7ec7e0441b4f12f86cfef99fb9f096
2015-12-02tdf#94043 RTF filter: implement column separator handlingMiklos Vajna1-0/+3
Change-Id: I9d74642156d7bb79577671bae24346c75178c5c7
2015-12-01DOCX import: initialize RDF metadata before importing document propertiesMiklos Vajna1-0/+18
With this, it is possible to import part of the document as RDF statements later when parsing document.xml. Previously SfxBaseModel member functions like getMetadataGraphsWithType() and addMetadataFile() failed, as they tried to find the already imported document in UCB, which failed, as the import was still in progress. To prevent that, do the same as the ODT import in XMLReader::Read(), part "RDF metadata". Change-Id: Ia15af9bb0681cbc25fe745742c24af82cd213e5d
2015-12-01DOCX import: tokenize <w:smartTag>Miklos Vajna6-1/+129
Change-Id: I2c408a25880ad0e87f0b5a246a350e45c8378ce5
2015-12-01Related: tdf#94043 DOCX import: fix column separator handlingMiklos Vajna1-3/+9
See wwSectionManager::SetCols() for the DOC import equivalent of this code, if line width is 0, then there will be still no visible line. Change-Id: Ifb0dc596e252a60cdac575fff2894aced1580c69
2015-11-30loplugin:overrideStephan Bergmann1-1/+1
Change-Id: I0a79e1376c65a2d06e37ac5d6e0aa9f66234d753
2015-11-30loplugin:mergeclasses, OOXMLTableImpl into OOXMLTableNoel Grandin5-33/+23
Change-Id: I28f6d317ca02cf23341358f9520de273af603bd7
2015-11-27Use comphelper::containerToSequence()Miklos Vajna1-4/+3
Change-Id: Ic4a8521192e07f6851ebff47e83f41c5b1c7d8ce
2015-11-26Use comphelper::containerToSequence()Miklos Vajna1-4/+3
Change-Id: I8c8277d47c2ab0e2bf5fad68bbfc45dea71d6c34
2015-11-25crashtesting: failure on File_1404.docxCaolán McNamara1-0/+2
Change-Id: Id984cc1f5954be38fbe3a1a15bfe811d7cdfe99d
2015-11-25Indentation fixesMiklos Vajna1-1/+1
Change-Id: I82678b037aff5409e54bc50744b1b4b2c8d4d83b
2015-11-24loplugin:unusedfields in writerfilter/Noel Grandin10-130/+74
Change-Id: I32348ef0aed955ab799ba90a59f4b511becb67e8
2015-11-23tdf#60351: Use Wrap Polygon also for PROP_SIZE_PIXELMike Kaganski3-11/+52
Since commit 2b5bf2f1c57d6585ec898c4c44a74c5b47f09ab9 "graphic import improved" from 2006-11-20 by Oliver Specht, there is an unused code reading pixel size (PROP_SIZE_PIXEL) of an image in a part of GraphicImport::createGraphicObject() that imports the wrap polygon. When there's no PROP_SIZE100th_M_M in graphic, the imported wrap polygon was simply dropped, and then automatic contour was generated for graphic. Now we import contour correctly in this case. Also, as paragraph background overlaps non-opaque graphics, we need to set opaque to true regardless of behindDoc value of wp:anchor. Change-Id: Ifa5eec9f8ccaf5ba051732b6e4f965ae8606a1cf Reviewed-on: https://gerrit.libreoffice.org/20103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-11-19use comphelper::containerToSequenceNoel Grandin4-36/+7
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-19Simplify writerfilter::dmapper::DomainMapper_Impl::appendGrabBag()Miklos Vajna1-7/+1
Change-Id: I65c893fa8ab8ea6dfb061127c9b0bd31c906ed30
2015-11-18Use comphelper::containerToSequenceMiklos Vajna1-6/+2
Change-Id: Iecb443605fe53de91703207d3253da5d8a586f4c
2015-11-17Assume that this code wants to append a number, not a characterStephan Bergmann1-1/+1
The original code in 2638faa2e834c2da4c195224fd88d32c29b3d0cc "writerfilter08ooo330: applied patch for writerfilter08" used OUString::valueOf, which 64b993e046f23baaacaff1572b7d2a816588b5ef "finish deprecation of O(U)String::valueOf()" changed to a OUString ctor instead of OUString::number (as that change did for almost all other cases), but without giving a rationale for this particular case. But as nUnique starts out as zero, so in the first round would append a NUL character to "DOCX-Standard", it looks plausible that this code should add a number after all. Change-Id: I47136486e28b946fa334a416d1d2fe20ad616ff0
2015-11-16tdf#83300 DOCX import: 'TOC Heading' should not be 'keep with next' by defaultMiklos Vajna1-1/+0
On one hand, neither our binary DOC import, nor Word maps the "TOC Heading" style to something special, and that's how the DOCX import added that property to some paragraphs in the document, moving the as-char picture from the first to the second page. OTOH, the DOCX export filter has a lcl_guessQFormat() function that explicitly assumes that such a style name exists in Writer document models, so again it doesn't make sense to handle this style name with special care. Change-Id: I3af548930f9683695fc3ad56b486e013f107d61a
2015-11-16Use comphelper::containerToSequenceMiklos Vajna1-4/+4
Change-Id: I76d25ef32a154d92f7ea9b9d0aa3af09908873d2
2015-11-15Fast PCH generator and optimized PCH filesAshod Nakashian1-168/+77
Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-13tdf#95188: enable import of shapes in footnotes in .docxOliver Specht1-0/+2
substreams require a Model and a DrawPage Change-Id: I701cf6e2283f84f18b9a0c06a4ce0aa8be934bf3 Reviewed-on: https://gerrit.libreoffice.org/19951 Reviewed-by: Oliver Specht <oliver.specht@cib.de> Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann2-2/+2
Change-Id: Ide85499515bd73f70bca356909683b43cd62f1d1
2015-11-10tdf#95071: fix spacing calculations for border with page offsetMike Kaganski1-5/+5
With commit ebf767eeb2a169ba533e1b2ffccf16f41d95df35, some previously hidden bugs manifested themselves, this is one of them. The margin size calculated incorrectly when border offset was from page. The border is drawn from the margin inwards, so the margin should be equal to OOXML w:space attribute, and border distance should be OOXML page margin - border distance - border width. Incorrect calculation gave negative margin, with IllegalArgumentException thrown in SfxItemPropertySet::setPropertyValue. Change-Id: Ifcf4a348e975df53410933aab3684d17f68b688c Reviewed-on: https://gerrit.libreoffice.org/19586 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-11-05use uno::Reference::set method instead of assignmentNoel Grandin6-37/+31
Change-Id: I31a69a997098eb1807361b8049c3312a4f287d75
2015-10-29tdf#94835: crash while loading RTF with \dppolygon token fixedOliver Specht1-0/+4
RTF token \dppolygon now creates a PolyPolygonShape test included Change-Id: I065eaac0ca1b8a59f02c3198363180ab244a3942 Reviewed-on: https://gerrit.libreoffice.org/19665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-10-26tdf#59454 RTF import: handle section break right before a tableMiklos Vajna1-0/+18
DOCX import could handle this situation, as commit 2e8aad6d45c53d554ccaf26de998ede708cfc289 (fdo#39056 fdo#75431 Section Properties if section starts with table, 2014-04-18) added support for this situation, in case NS_ooxml::LN_tblStart/End is emitted by the tokenizer. Fix the problem by sending these tokens in the RTF tokenizer as well, at least for non-nested tables. Change-Id: Ifedb121754634529c27820dd5175e7f9e24019e1
2015-10-22writerfilter: it's enough if dmapper gives the media descriptor to its implMiklos Vajna3-9/+6
Change-Id: Ia973799453d9ede60be3699ff8973e31605f06ef
2015-10-21more removal of com::sun::star typedefsNoel Grandin3-4/+2
Change-Id: Ia73f1b4f1dcfa3f0936359e744afe76e02dcd2eb
2015-10-20loplugin:defaultparamsStephan Bergmann1-18/+18
Change-Id: Ic6ff01ec54fde1c6ac9f8b52d2cbca3ee4085b51
2015-10-19loplugin:defaultparamsStephan Bergmann1-2/+2
Change-Id: I55ca691207b73397f58843c64677b2a9a6ce44b0
2015-10-19writerfilter: dmapper ctor can read TextInsertModeRange directlyMiklos Vajna6-13/+5
Change-Id: If17ae09266134b4bc410eab1a1b2f5139ba93a12
2015-10-19tdf#94374 DOCX import: allow insert -> object -> documentMiklos Vajna1-1/+2
Change-Id: I977930d59ef1ae9ae8bd2dfa9a7f3816c46d982c
2015-10-19tdf#36117 .docx preserve page vertical alignment after RTJustin Luth3-0/+27
Change-Id: I90174f7a98e9bd01f45ee668f127356ff3e0e4ed Reviewed-on: https://gerrit.libreoffice.org/18481 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann49-426/+426
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann3-4/+4
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-08tdf#94049 RTF import: add missing check for empty shape when popping stateMiklos Vajna1-3/+6
Change-Id: I3c9a5f89df721618bb60b8932b69a371bb6f3ff1
2015-10-07tdf#90810: skip breaks outside of the requested footnoteOliver Specht1-2/+5
the footnote stream is parsed completely at each footnote insertion (line) breaks outside of the requested footnote need to be skipped test include Change-Id: I78de7774b7daf44c2b8980115870082fc56924bd Reviewed-on: https://gerrit.libreoffice.org/19228 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>