summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/swhtml.cxx
AgeCommit message (Collapse)Author
2018-03-06ofz#5566 sw: HTML import: ignore <DIV> in table structure elementsMichael Stahl
Looking at the HTML4 DTD https://www.w3.org/TR/html4/sgml/dtd.html, inside TABLE only various elements defining the structure of the table allowed, except inside cells (TD and TH elements). DIV in a table but outside cells may cause cursor positions to go off the rails, so better ignore such invalid DIV tags. Reviewed-on: https://gerrit.libreoffice.org/48359 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8b1a83bffe35ae0e71735569512c1586bcb37b25) Reviewed-on: https://gerrit.libreoffice.org/48526 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 7283bdaf9cdc81dbec55c915ecd8c2571478bc4d) Change-Id: Ia6195d80670631669c252d572242874b13642b74
2017-09-29tdf#112679 sw: fix copying of fieldmarksMichael Stahl
Aha, now we know that the reason for the defensive programming in lcl_AssureFieldMarksSet() was that there are actually 2 different use-cases for it: usually a new mark is inserted, so there are no dummy characters and they must be inserted. However when copying text, the dummy characters are copied too, so they must not be inserted, or we get duplicate fieldmarks. This also reverts commit d4036d3a89b65a4912f62e3930eb1a31cd90a16b which fixed the problem only for CHECKBOX_FIELDMARK in a different way. (regression from bb069fe7b8b6a24f9ff4df4c7052961e17ea3a8c) (cherry picked from commit 421a23bb36bbf51edfabc58b7d2cd28ad37719d0) Change-Id: I3c99b8c6d720951655198e682018794337859373 Reviewed-on: https://gerrit.libreoffice.org/42938 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2016-10-24sw: prefix members of SvxCSS1PropertyInfoMiklos Vajna
Change-Id: I9ac5e5f75e76694dd372bcafd87e84a63f61b47c Reviewed-on: https://gerrit.libreoffice.org/30219 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-10-20loplugin:expandablemethodds in sw(part2)Noel Grandin
Change-Id: Idc2118899a8063099b66c0f5db40d8402db063d1 Reviewed-on: https://gerrit.libreoffice.org/30083 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05convert MapUnit to scoped enumNoel Grandin
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-09-08loplugin:constantparam in swNoel Grandin
Change-Id: Ifcb05b7fbca7fc6c8ad82bad38a927ba9f9511bf
2016-08-31Get rid of a pointless indirect function pointer variableNoel Grandin
Change-Id: I542a5fb00a5c972230c072d72a745fddb095f708
2016-08-29Get rid of pointless indirect function pointer variablesTor Lillqvist
Change-Id: Ic8eddec51d59b531ae22421b796a148267b9f3c1
2016-08-17convert SvxBreak to scoped enumNoel Grandin
Change-Id: If8b79ed617e5662550bd73bd1506d047217f2313
2016-07-22Fix typosAndrea Gelmini
Thanks to Carlo Bertoldi for the german translation. Change-Id: I76f554e757318aed4e28b5a05fae0ba15bd46afb Reviewed-on: https://gerrit.libreoffice.org/27355 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2016-07-04remove comphelper::string::removeNoel Grandin
and replace it with OUString/OString::replaceAll Change-Id: I37b1c3b51251dfd9d749d6f1060c75b3a93d7f1a Reviewed-on: https://gerrit.libreoffice.org/26850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-27loplugin:singlevalfields in sw(part2)Noel Grandin
Change-Id: Ic1b186c82a6b37ae0cd8028a60e2ad09233d8e5d Reviewed-on: https://gerrit.libreoffice.org/26665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03Resolves: tdf#93971 freeze on load of specific html docCaolán McNamara
this is similar to commit 6acd5c45c764d81aea1539e66adbfadb51df0aa3 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Jan 21 15:25:03 2015 +0000 Resolves: fdo#87601 specific html doc hangs on load and is a consequence of the old changeover from unsigned shorts for old string class to signed int for new string class Change-Id: I47022c641cbc329d8802765927005d43211b0d88
2016-05-27sw: these all look like intended fall-throughsMichael Stahl
Change-Id: Idfea426b69d07dc6d8eb8d0edb59b0ec0f4ecdf9
2016-05-23loplugin:unusedmethods in swNoel Grandin
Change-Id: I05e224bcc7d2b08cf1349c14e3acf274d422e109 Reviewed-on: https://gerrit.libreoffice.org/25145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-11Mark dubious fallthrough cases as "SAL_FALLTHROUGH; //TODO ???"Stephan Bergmann
Would be great if people knowing about the respective code areas could look into these, and either change them into plain "SAL_FALLTHROUGH;" or "break;". Change-Id: I6bd5e04bbb84452bea57d10946522b456c2ad5f0
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-04-22Avoid reserved identifiersStephan Bergmann
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-03-22loplugin:constantparam in swNoel Grandin
Change-Id: I56925a8fd776b3ee787cc26adbaa08c58dd022c0
2016-02-29loplugin:unuseddefaultparam in sw (part2)Noel Grandin
Change-Id: I7eefd83d7f84c0a6301fd3ba37d77463d809e5f9
2016-02-22loplugin:commaoperator in sw/Noel Grandin
Change-Id: I9b00755707687e4c10c02bf49866571f2c44d8ba
2016-02-19new loplugin: find write-only fieldsNoel Grandin
Change-Id: I0f83939babacf92485420ee63f290a297d7cb717 Reviewed-on: https://gerrit.libreoffice.org/22498 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-31tools: rename FontUnderline to FontLineStyleChris Sherlock
Change-Id: I4750ad8569a1003b2f8c29052f3e25003ee433ca Reviewed-on: https://gerrit.libreoffice.org/21892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-04Cleanup after removing vcl::FontInfo classChris Sherlock
Change-Id: I544eac439cb7277e47a23a90c6fbc45496161c3b
2016-01-03vcl: Excise vcl::FontInfo classChris Sherlock
This may sound crazy, but literally vcl::FontInfo serves no purpose that I can see. The inheritance chain is like this: ┌────────────────────────┐ │ │ │ vcl::Font │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ vcl::FontInfo │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ FontMetric │ │ │ └────────────────────────┘ vcl::FontInfo (which, incidentally, needs to be put into the vcl namespace due to collisions with poppler!) literally does nothing and is acting as a bridge between FontMetric and vcl::Font. Unlike a bridge though, this bridge doesn't actually *do* anything. So I'm removing it, which means one less class to deal with in the vcl fonts world. Change-Id: I32725669c9bca7fbb0846b6a062135464046e4f6 Reviewed-on: https://gerrit.libreoffice.org/21058 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-11-28tdf#94088 add import of HTML inline graphicsArmin Le Grand
Related: fdo#63211 for saving. This one adds the import side, plus fallbacks to use the new FillStyle attributes in HTML im/export in a SvxBrushItem. Also added graphic import for inline graphics. Comment markers inserted at places where functionality may be added in the future when the new FillStyle attributes would be more used in this content. Unit test checks PageBackground and ParagraphBaground import. Change-Id: I3f198677db553ad198e0add3162603a4735398f1 Reviewed-on: https://gerrit.libreoffice.org/20129 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-24loplugin:unusedfields in sw/Noel Grandin
Change-Id: I323a038e5581b00cd3a4ea2f362c66540377759e
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-11-05sw: prefix members of SwHTMLParserMiklos Vajna
Change-Id: I3d4b39a79c49f847c6814215593d86e8d992b38a
2015-10-30sw: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I95ce84f7e82dc03233878de4324f2cb5c282a8aa
2015-10-20loplugin:defaultparamsStephan Bergmann
Change-Id: I11ff551955c1ac291ab576f2f18c2dd410427eda
2015-10-19loplugin:defaultparamsStephan Bergmann
Change-Id: Ib5b0e87064b6dcff03f6b77287a80ee2a03b8799
2015-10-15cppcheck:variableScopeNoel Grandin
Change-Id: I9b671637fbe0f32e695d22b74bfb40a39a9fe884 Reviewed-on: https://gerrit.libreoffice.org/19364 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-06 tdf#94559: 4th step to remove rtti.hxxOliver Specht
replaced use of PTR_CAST, IS_TYPE, ISA in idl, editeng, sc, sd, sw, sfx2, sot, starmath Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653 Reviewed-on: https://gerrit.libreoffice.org/19132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-10-02Fix typosAndrea Gelmini
Change-Id: I724f2b709f7bd417b5a522e063c0a2f2b5c3dad1 Reviewed-on: https://gerrit.libreoffice.org/18987 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-18convert Link<> to typedNoel Grandin
Change-Id: I124ed873862684efe7cab52c26d13c6621d49aab
2015-09-08loplugin:mergeclasses merge SwpHintsArray with SwpHintsNoel Grandin
and clean up the API a little, there were multiple versions of the same accessor with different names. Change-Id: I01e44a7a81c0d67cbb6135a6d196ee106cbf994a
2015-08-28make PostUserEvent Link<> typedNoel Grandin
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-20loplugin: defaultparamsNoel Grandin
Change-Id: I463bbaf86b4a44e8bdf5388404730ab3dcd9b9fe
2015-08-04include: inline some use-once typedefsNoel Grandin
Change-Id: I064e95c72e5f67178cf2875f457adac241cee529
2015-06-25Just continue to next iterationMatteo Casalin
Change-Id: I4040dff95dd1718df4cb555c155f7eea723bd2e3 Reviewed-on: https://gerrit.libreoffice.org/16170 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-23sw: HTML import: Do not mix normal, CTL or CJK attributesMatteo Casalin
The original code used 15 elements for positions, the 'repaired' one lost 10 of them. Also, do not try to be too smart and be verbose, letting the compiler perform optimizations (regression from 1b0f7ee1e04d7b0fe81f7458ae2116615e0f6889) Change-Id: I0a1bc22d1abab083292de17b091c8be872fcee24 Reviewed-on: https://gerrit.libreoffice.org/16169 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-18Fix typosAndrea Gelmini
Change-Id: Ibfa971952cd330ddf430e7e951c5c235d2ae6bd8 Reviewed-on: https://gerrit.libreoffice.org/16314 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-08Use auto, avoid temporaries and unneeded castsMatteo Casalin
Change-Id: I66e69de20e45509de10bc6fe72d0a81bd4805647 Reviewed-on: https://gerrit.libreoffice.org/16168 Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com> Tested-by: Matteo Casalin <matteo.casalin@yahoo.com>
2015-06-02loplugin: loopvartoosmallKatarina Behrens
Change-Id: Icb30dac9cdcba493752623ccafff5f06ccafc31f
2015-05-31Use size_t, auto and range-based for loopsMatteo Casalin
Change-Id: I7f3672928b3d1ee937c7c6c2684b1396425b9fe6
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9