summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2017-04-04ofz: guard against bogus sprm lenCaolán McNamara
Change-Id: I9b4074e1024753549f468f427afbfdf9cd01b674
2017-04-04coverity#1403732 Mixing enum typesCaolán McNamara
and coverity#1403735 Mixing enum types coverity#1403737 Mixing enum types Change-Id: I278b7d5116d4157e6aa4483d8eef42325e4bc03b
2017-04-04tdf#106690 DOCX import: fix automatic spacing before/after numbered para blockMiklos Vajna
The context is text nodes with automatic before/after spacing and numbering rules set, like: A * B * C * D E The correct behavior seems to be (though I haven't found this explicitly written in the OOXML spec) to drop spacing between B and C and C and D, but not before B and not after D. Originally no spacing was dropped, then commit c486e875de7c8e845594f5043a37ee8800865782 (tdf#95031 DOCX import: auto spacing inside numbering means no spacing, 2016-10-18) removed spacing around all B/C/D. Fix the problem by checking the numbering rules and automatic after spacing of the previous paragraph, so spacing before B and after D is not removed. Change-Id: Icbdb36e31057ab0e8ac033888cf5cc7c52dad5d0 Reviewed-on: https://gerrit.libreoffice.org/36062 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-04ofz: check anldPap sprm for valid ANLD payload lenCaolán McNamara
Change-Id: Ie034e3b37e01c29cf19fe8ad78b1121f6eadecb2 Reviewed-on: https://gerrit.libreoffice.org/36053 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-04sw: indentation fixesMiklos Vajna
Nested namespaces were always declared in new lines in these files, let's keep the consistency. Change-Id: I1dcfdd2b1f54ec56b3554f3c0095513cec33e49c
2017-04-04make UNO enums scoped for internal LO codeNoel Grandin
this modifies codemaker so that, for an UNO enum, we generate code that effectively looks like: #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR enum class XXX { ONE = 1 }; constexpr auto ONE = XXX_ONE; #else ...the old normal way.. #endif which means that for LO internal code, the enums are scoped. The "constexpr auto" trick acts like an alias so we don't have to use scoped naming everywhere. Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4 Reviewed-on: https://gerrit.libreoffice.org/34546 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03ofz: check anlv text boundsCaolán McNamara
Change-Id: I6288aae2d439cde6a2b95c005a2090f73e21bb7a
2017-04-03ofz: avoid oomCaolán McNamara
Change-Id: Icbd4b98e8a0a4aff967bae22f3f59248ed40598a Reviewed-on: https://gerrit.libreoffice.org/36049 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-03sw: [loplugin:sallogareas]Michael Stahl
Change-Id: I94c552e4b2ae95f57b0c667f6072664eab570042
2017-04-03More integer clean-upStephan Bergmann
...after dbaab58c1442e7f62ef0732376fe5a49840e9fd6 "loplugin:loopvartoosmall". Looks like SwLayHelper::nIndex only needs to be initialized to a very large value (so that 'nIndex < pImpl->size()' will be false), not USHRT_MAX exactly. Change-Id: I209faa00894783c468db1440f5663ea9e8ad3e19
2017-04-03only convert used part of bufferCaolán McNamara
Change-Id: I133a02ae1cbdb4fb32f81db7214d27c66ccd0a8b
2017-04-03don't check on every loopCaolán McNamara
Change-Id: I000a887925db63b5717cc0d062d9da623415f7cc
2017-04-03loplugin:unreffunStephan Bergmann
Change-Id: I7a4fe7240e43faaae3482a084b466fa87e67b6b8
2017-04-03flush writer fontcache after TestImportDOCCaolán McNamara
to get around leak sanitizer Change-Id: I45f0caefc14c35476e92887058031dddd92afb81
2017-04-03these are file urls, so don't need ucbCaolán McNamara
Change-Id: I25beaeab002db1de34be3b5f4a774bd15b71f5d3 Reviewed-on: https://gerrit.libreoffice.org/36045 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-03loplugin:loopvartoosmallStephan Bergmann
Change-Id: Ief96de6eb6f6276681130a6d16c767ab8ceaa3f1
2017-04-03loplugin:sallogareasStephan Bergmann
Change-Id: Idd4f44b66e67d938a1ba2b9c7ff4be0b0009ff53
2017-04-03tdf#106237 sw: do some basic sanity checking on layout-cacheMichael Stahl
The bugdoc, with claimed generator AOO4.1.1 on Windows, contains a bogus layout-cache: debug:26706:1: nType P nIndex 29 2147483647 debug:26706:1: nType P nIndex 66 2147483647 debug:26706:1: nType P nIndex 105 2147483647 debug:26706:1: nType P nIndex 142 2147483647 debug:26706:1: nType P nIndex 178 2147483647 debug:26706:1: nType P nIndex 205 2147483647 debug:26706:1: nType P nIndex 229 2147483647 debug:26706:1: nType T nIndex 314 65535 Due to a loop-control this causes incorrect pagination if CalcLayout() is called only once. It should look like this: debug:26765:1: nType T nIndex 382 65535 debug:26765:1: nType T nIndex 790 65535 In this case we can easily detect that the indexes and types in the layout-cache are bogus by checking against the node types, so do that in SwLayHelper::SwLayHelper(). Change-Id: I7091af49a8c29bf0a11ceff0be9ba84b1f710fdb
2017-04-03ofz: fix leakCaolán McNamara
Change-Id: I93a7b2f77713db5c51734263b78ffc69c899987b
2017-04-03coverity#1403734 Mixing enum typesCaolán McNamara
Change-Id: I46a9a85e7f70502f703ee9fb0f94abd83952d120
2017-04-03sw: prefix members of SwTokenWindowMiklos Vajna
Change-Id: Iab538d4e4943559dc09dc1e947217b0db697620f Reviewed-on: https://gerrit.libreoffice.org/36039 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-03tdf#106897: preset visited/unvisited character style in ListBoxOliver Specht
Change-Id: I9bfa2b8a50340a6b09d8cc50e5313dc45a518472 Reviewed-on: https://gerrit.libreoffice.org/35973 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-04-03sw: indentation fixesMiklos Vajna
Change-Id: I81076414ee335f34bb687f93e89d65343d2f3c57
2017-04-03Avoid redundant inline warning in swcacheArnaud Versini
Change-Id: Ia30d9f406769cab219418d4624e8547a036c4f08 Reviewed-on: https://gerrit.libreoffice.org/36022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03use actual UNO enums in swNoel Grandin
Change-Id: If0f4a6532cc255f632d88d97e6b1a9e57462f5fc Reviewed-on: https://gerrit.libreoffice.org/35969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-02split up doc testing for three major variantsCaolán McNamara
Change-Id: Iac1b5cb1c209ba27d185c8a7ba1e59c663553d77
2017-04-02coverity#1403662 Mixing enum typesCaolán McNamara
Change-Id: Ic5e797c65dfc736a9ef0ab14f3ae563216143947 Reviewed-on: https://gerrit.libreoffice.org/36020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-01add rtf fuzzerCaolán McNamara
Change-Id: I36a6294c158232bef8fceeaf5159527f467f5786
2017-04-01support avoiding config in SwTableAutoFormatTableCaolán McNamara
Change-Id: I9d62efc7f57e8893fc5fbd1a8bec1f7cbbbeb2e7
2017-04-01sw: replace hardcoded uno namesVitaliy Anderson
Change-Id: I4cf8a4f76744b8a6bc25cd5abdd280f98eea9499 Reviewed-on: https://gerrit.libreoffice.org/35889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-31tdf#101846: update spelling on URL changesOliver Specht
call setWrong if URL attributes are applied to force re-spelling Change-Id: I8a5fa20c45cdf1df33975c4d6bee5e2c0f3f272f Reviewed-on: https://gerrit.libreoffice.org/35962 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2017-03-31tdf#106849: don't reduce quality of picture in bullet list.Vitaliy Anderson
An image saved in cache when NS_ooxml::LN_CT_NumPicBullet_pict property is processed should not to be resized. It reduce quality the image. Just set the property "GraphicSize" of current level of the NumRule instead of resize the image when processing NS_ooxml::LN_CT_Lvl_lvlPicBulletId property. Change-Id: I8ac80643decb7794de7a295cc7c2895a5bd24e2d Reviewed-on: https://gerrit.libreoffice.org/35592 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-31use actual UNO enums in svxNoel Grandin
Change-Id: I00f53260667861ca2595892b5605479da3401adb Reviewed-on: https://gerrit.libreoffice.org/35913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31spelling in comments: minmal -> minimalJustin Luth
Change-Id: Ie1947782cd7679c0c979d01ee7776176d771fc04 Reviewed-on: https://gerrit.libreoffice.org/35925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-03-31tdf#106701 tabOverMargin: only affect specified tabstops, not autotabJustin Luth
Change-Id: I15bf3a8555a152cab90380524b4a968f9f95fc37 Reviewed-on: https://gerrit.libreoffice.org/35924 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-03-30tdf#105975 Add Formula field parsing (docx) in SWriterJean-Sebastien Bevilacqua
Introduction ------------ In MSWord, you can create a formula field (starting with =). When you save your file as `docx`, this `FORMULA` field is registered in you file (a field starting with `=`). In its current state, LibreOffice can't parse the `FORMULA` field in `docx` file. Context of this fix ------------------- This fix is entirely located in the `DomainMapper_Impl.cxx` file because it's where the parsing is done. How this fix works ------------------ First, we add `FORMULA` support by adding it to the `aFields[]` variable. Next, to handle the `FORMULA` constant, we add a condition (swith case) in `DomainMapper_Impl::CloseFieldCommand()` to call `handleFieldFormula`. Note ---- In function `lcl_ExtractToken`, if command starts with `=`, it's a `FORMULA` field. Change-Id: If7d25de5413aa3133b22523d8a3f34ab6961adfc Reviewed-on: https://gerrit.libreoffice.org/34334 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-30sw: convert to assert in atrflyin.cxxMichael Stahl
Change-Id: I0cf6615e343b54ee5b4c212fe365dcf16234ff08
2017-03-30Related: tdf#105454 DOCX import: fix unwanted enabled-by-default kerningMiklos Vajna
Similar to DOC, DOCX doesn't enable kerning by default. Change-Id: I070ff5f0d43c27107593d629a1ad681d29d2038c Reviewed-on: https://gerrit.libreoffice.org/35890 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-30tdf#106606: Don't dispose NumPicBullet in sprm handler.Vitaliy Anderson
An image saved in cache once when NS_ooxml::LN_CT_NumPicBullet_pict is processed, may then be used multiple times (for each NumRule that requires it) when NS_ooxml::LN_CT_Lvl_lvlPicBulletId is processed for each of them. If the image was released here for first processing, subsequent rules couldn't find the image in cache and failed to create NumberingType::BITMAP style for the rule. The image is ultimately released in ListsManager::~ListsManager() after it is no more needed. Change-Id: Ib4c351437ba94d5a9d3e2927ccf459ec01f1b15f Reviewed-on: https://gerrit.libreoffice.org/35591 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-29sw: translate german commentsMichael Stahl
Change-Id: I65dd604fac39b8ea39affbc6f336d2618e6d605a
2017-03-29sw: plain-text ASCII export: filter out all CH_TXT_ATR_*Michael Stahl
These control characters are Writer implementation details and should not be available via public interfaces. This filter is also used by SwXTextRange::getString(). Change-Id: If656ee3d451dbefe2f7a905e8b63a44cdb787809
2017-03-29tdf#101627 disable shrinking for footer textboxesPatrick Jaap
the shrinking patch a4dee94afed9ade6ac50237c8d99a6e49d3bebc1 causes problems, if the textboxes are anchored in the footer. Therefore, disable it in this case. For details, see comments in bug tracker. Change-Id: I117a99041ff67c19a9de17803ff7864c62afdb50 Reviewed-on: https://gerrit.libreoffice.org/34517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-29loplugin:unusedmethodsNoel Grandin
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0 Reviewed-on: https://gerrit.libreoffice.org/35834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29convert EViewType to scoped enumNoel Grandin
Change-Id: I5b10aada64408897a56a5932aa28486d7562d617 Reviewed-on: https://gerrit.libreoffice.org/35822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29overline state missing from find/replace by properties dialogCaolán McNamara
Change-Id: I3178fed3ef4ada61cd9ba0becce4732c8043050f
2017-03-29m_bIsAccDocUse is write-onlyCaolán McNamara
Change-Id: Ib0360ddaa21841b7e5921098d14029aec43cc371
2017-03-29expand vis to visible; fix typosdennisroczek
* translate German source code comments * remove bogus surce code comments * remove ascii art * removed old StarOffice/Sun internal bug tracker references * remove left over from commit dcd5dee88e3c1185638b190553bef65c2ef6566f Change-Id: I3c5cce621c43e4a03afb76f4cc5a12065914e5ad Reviewed-on: https://gerrit.libreoffice.org/35404 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-29Fix typosAndrea Gelmini
Change-Id: I379c3f8ca971e6180744fb7270dde9164ebcec1a Reviewed-on: https://gerrit.libreoffice.org/35814 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-28typo: Didn't found -> Didn't findAndras Timar
Change-Id: Idbaca4fe90cb943124cded56d8b031a66e488c1b Reviewed-on: https://gerrit.libreoffice.org/35776 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>