summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2016-06-29tdf#90697 docx - don't change continuous break into page breakJustin Luth
As soon as you set PROP_PAGE_DESC_NAME, you are inserting that style as a page break. Setting a pagebreak via a continous break was first introduced in commit 50cb1667020494906afaacb68d4163d1eda527cf but the unittest for that commit no longer uses this code. I'm suggesting it be reverted. It really messes up round-tripping when continuous breaks are removed/replaced with hard page breaks. There are a few odd cases where the very first section needs to set the page break via the continuous break, so it hasn't been eliminated completely. Change-Id: I5b0e4bb7612ee9df47e5c49b8c2316dc001b5238 Reviewed-on: https://gerrit.libreoffice.org/26662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-27loplugin:singlevalfields in writerfilter and xmlsecNoel Grandin
Change-Id: I51305ce4a6929b36f41eb7c7c83606ca8c5c89b8 Reviewed-on: https://gerrit.libreoffice.org/26691 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23tdf#99589 - tolower / toupper - dangerous to Turks ...Gökhan Gurbetoğlu
Change-Id: Id3b9abd557f2b8dfc942589362452cbdb0232da9 Reviewed-on: https://gerrit.libreoffice.org/26546 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-16tdf#91684 RTF import: handle fFlipH and fFlipV shape propsMiklos Vajna
Change-Id: I930f99647de00c2e43ef94b1ac0320daa440eae9 Reviewed-on: https://gerrit.libreoffice.org/26349 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-15tdf#42949: clean up includes in include/filter with iwyuJorenz Paragas
Change-Id: Id08a999764bfeeff3bb3409b46f48b278009ccbe Reviewed-on: https://gerrit.libreoffice.org/26238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-15writerfilter: clean up virtual keywords where override already implies thatMiklos Vajna
Change-Id: I04938ceba4e4740535caee396ca8e13ca50a003c Reviewed-on: https://gerrit.libreoffice.org/26288 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-14Related: tdf#91684 RTF import: fix scaling of group shape childrenMiklos Vajna
It was assumed that the child size is in twips, but it's in relative coordinates. Change-Id: I51352180c2e61a70b1a34faad5d73f96121168a8 Reviewed-on: https://gerrit.libreoffice.org/26240 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-09tdf#94698 cleanup Makefiles. Get rid of udkapi and offapiGleb Mishchenko
This patch changes occurences in makefiles from $(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \ udkapi \ offapi \ )) to $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config)) (corrected instead of abandon, jani) Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e Reviewed-on: https://gerrit.libreoffice.org/23426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-07tdf#50821 RTF import: fix handling of \trpaddf{b,l,r,t}Miklos Vajna
The width type is an attribute, not an sprm; this resulted in zero cell margin in the table -> the text overlapped with the border shape. Change-Id: I611feb084a16c76faf281d376e1a4a31e162f53d Reviewed-on: https://gerrit.libreoffice.org/25997 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-06writerfilter: fix excessive whitespaceMiklos Vajna
Change-Id: I87eee678fb3d50adb0a51143f1779d64a780eab0
2016-06-06Convert RunType to scoped enumNoel Grandin
Change-Id: I81732f2db5711109e021838da997c0f25b2ea879 Reviewed-on: https://gerrit.libreoffice.org/25925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31tdf#77349 RTF import: automatically generate names for images if neededMiklos Vajna
The DOC/ODT import can call SwDoc::SetAllUniqueFlyNames() at the end of the process to assign unique names to fly frames which lack a name. Add a similar (but much simpler) feature to the domain mapper to avoid empty image names in the DOCX/RTF import result, so it's easier to click on the items in Writer's navigator. Change-Id: I432fc741f8d75d735e1dfe88daba50ba0797042d Reviewed-on: https://gerrit.libreoffice.org/25705 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-31teach refcounting clang plugin about uno::ReferenceNoel Grandin
uno::Reference is only allowed to used with classes that have a ::static_type member. So convert all those places to rtl::Reference. Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and uno::Reference to make this a little smoother? Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3 Reviewed-on: https://gerrit.libreoffice.org/25516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26loplugin:unusedmethodsNoel Grandin
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda Reviewed-on: https://gerrit.libreoffice.org/25431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26We indeed can't do anything with LN_CT_Font_notTrueType hereJulien Nabet
Avoid this warn:writerfilter:18041:1:writerfilter/source/dmapper/FontTable.cxx:144: FontTable::lcl_sprm: unhandled token: 93155 when testing https://bugs.documentfoundation.org/attachment.cgi?id=125266 Change-Id: I7bc7cea8398b4430a2e67130f5869057ec0cd256 Reviewed-on: https://gerrit.libreoffice.org/25469 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-05-25tdf#74795 RTF import: handle row-level default cell marginsMiklos Vajna
Change-Id: I5bdd7b8624a9e2ac1aef963ccc5ed457ebda3f84 Reviewed-on: https://gerrit.libreoffice.org/25443 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-23writerfilter: use auto where it improves code readabilityMiklos Vajna
for (std::vector< std::pair<Id, RTFValue::Pointer_t> >::const_iterator i = m_pSprms->begin(); i != m_pSprms->end(); ++i) vs for (auto& rSprm : *m_pSprms) and so on. Change-Id: I2b4d975af096fb59815b074cbcb9934bead9e6f0 Reviewed-on: https://gerrit.libreoffice.org/25350 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-20writerfilter: use '= default;'Miklos Vajna
Replace default bodies of these trivial special member functions. Also remove RTFSprms::operator=() as it matches what the compiler would generate anyway. Change-Id: Ib5e30dfdd9b428a6d7800cec056c3f55ca92f4a4 Reviewed-on: https://gerrit.libreoffice.org/25187 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-19loplugin:unusedmethods in writerfilter to xmloffNoel Grandin
Change-Id: If95890eff0f785111e8b511ac1d5481c6910f099 Reviewed-on: https://gerrit.libreoffice.org/25148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18tdf#82073 RTF import: handle \clcbpatrawMiklos Vajna
Quoting the RTF spec: "Same as \clcbpatN for use with table styles." Change-Id: Icdb89bac5b41036dadb1901f18aeb21ef2512908 Reviewed-on: https://gerrit.libreoffice.org/25077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-18clang-tidy modernize-make-sharedNoel Grandin
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a Reviewed-on: https://gerrit.libreoffice.org/25056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-17sw, writerfilter: indentation fixesMiklos Vajna
These files had a consistent style perviously, don't break that. Change-Id: I8d204e78463e7fe302a172a1af6ad3de51997977
2016-05-14crashtesting: Error: attempt to increment a singular iteratorCaolán McNamara
revert commit 96fab0513215cc416e96e1b2089466afd0d2791c Author: Noel Grandin <noel@peralex.com> Date: Thu May 12 10:07:50 2016 +0200 clang-tidy modernize-loop-convert in writerfilter to xmlsecurity for OOXMLPropertySet::resolve which modifies the mProperties it iterates over e.g. fdo67086-1.docx, fdo72640-6.docx etc Change-Id: I14f829d1425d56110c0aa8d42e751bd2f1d3dd2a
2016-05-13clang-tidy modernize-loop-convert in writerfilter to xmlsecurityNoel Grandin
Change-Id: I334411c6b57c028ffb41b5deb72002f9d54038c3 Reviewed-on: https://gerrit.libreoffice.org/24923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10tdf#42949: clean up includes in include/oox/helper with iwyuJorenz Paragas
...and fix the many compiler errors that occurred as a result. Change-Id: I497c326272b2f02737ca3765720d6815b735423b Reviewed-on: https://gerrit.libreoffice.org/24735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-10Fix typosAndrea Gelmini
Change-Id: I1c1894fcf533291b34a662b6efb96dcfa75b92b3 Reviewed-on: https://gerrit.libreoffice.org/24760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
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-05-10tdf#96275 RTF import: fix anchor of shapes inside tablesMiklos Vajna
Table text is buffered, so buffer the shape import as well, otherwise the anchor will precede the buffered text -> incorrect anchor position. Change-Id: I527b898e2cd5fafaf122a20e11df66ba8d3185cf Reviewed-on: https://gerrit.libreoffice.org/24822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-10rtf: m_aStates can be empty in the inner conditionCaolán McNamara
Change-Id: Id262a3019a693f236630b798579f360c9462d12e
2016-05-09writerfilter: extract dispatch{destination,flag,symbol,value} from rtfdocimplMiklos Vajna
These were half of the lines of rtfdocumentimpl. Change-Id: I3f24cd5d23c91bf0d53b898266c187699ae6ee56 Reviewed-on: https://gerrit.libreoffice.org/24790 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-06writerfilter: replace 's_m_' prefixes with just 's_'Miklos Vajna
The intention was to replace m_ with s_ for static members, not to prepend s_ to the existing prefix. Change-Id: If8538061de8b1d22a89c8987201f4cae4ed484df Reviewed-on: https://gerrit.libreoffice.org/24700 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-06teach passstuffbyref plugin to check for..Noel Grandin
unnecessarily passing primitives by const ref. Suggested by Tor Lillqvist Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6 Reviewed-on: https://gerrit.libreoffice.org/24672 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-04use Any constructor instead of temporariesNoel Grandin
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-03tdf#95707 RTF import: handle device-independent bitmapsMiklos Vajna
See <https://msdn.microsoft.com/en-us/library/dd183374%28v=vs.85%29.aspx> for more info about the header structure that has to be prepended to the real data to make our BMP import filter happy. Change-Id: Iabdf4cd169b82ea951d1c1b12432d97d61b7af51 Reviewed-on: https://gerrit.libreoffice.org/24604 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-29tdf#99434: import/export documentProtection-forms from .docx incl. testOliver Specht
the setting <w:documentProtection w:edit="forms"> disables editing of content outside of form controls. Change-Id: I0d11373d9010778ed5798598020e453cde06fa0f Reviewed-on: https://gerrit.libreoffice.org/24365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-04-28Related: tdf#65642 RTF filter: import \pgndecMiklos Vajna
This as a side effect also implements support for DOCX <w:pgNumType w:fmt="decimal" .../>. Change-Id: I747c3f610dc13f614b6f962c2a498c987765ebb6 Reviewed-on: https://gerrit.libreoffice.org/24457 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-27Resolves: tdf#99498 don't overwrite trwWidth value if set on a tableCaolán McNamara
Change-Id: Ia39da999a2de1ca2b8bec5fc7f35d2f9ffe2dd19 Reviewed-on: https://gerrit.libreoffice.org/24430 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26tdf#90097 RTF import: handle fRelFlipV property for line shapesMiklos Vajna
Can be extended later in every direction: fFlipV, fRelFlipH, non-line shapes. See oox::drawingml::Shape::createAndInsert() on why the convertMm100ToTwip() conversion is necessary. Change-Id: Ifee401dd8dd392c2c9ff85cc871ca0169fcf930b Reviewed-on: https://gerrit.libreoffice.org/24385 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-25Some more sal_Bool -> boolStephan Bergmann
Change-Id: I576f264f31fabf58de6cafa28eb7ba5e5f43c148
2016-04-22Avoid reserved identifiersStephan Bergmann
Change-Id: Ie1830e7645b8bb8b8020fdb384471801a1aaca31
2016-04-21Related: tdf#65642 RTF filter: import \pgnlcrmMiklos Vajna
This as a side effect also implements support for DOCX <w:pgNumType w:fmt="lowerRoman" .../>. Change-Id: Ifb524b25236a8bc774690266a4fa205154204109 Reviewed-on: https://gerrit.libreoffice.org/24273 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann
Change-Id: I5f38167cc2fd0104ad388c63f766bda6acae96e2
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14Related: tdf#65642 RTF filter: import \pgnucrmMiklos Vajna
This as a side effect also implements support for DOCX <w:pgNumType w:fmt="upperRoman" .../>. Change-Id: Ibf3bedca03c6c2a2b96eecb36ff6c4cf6e2281b4 Reviewed-on: https://gerrit.libreoffice.org/24073 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-14loplugin:passstuffbyref in writerfilterNoel Grandin
Change-Id: Ia85f5a7a9846802de7a1495e70d16c9e3418dc3e
2016-04-12clang-tidy performance-unnecessary-value-param in writerfilterNoel Grandin
Change-Id: I1f61be80ac1ebe42668580b09a261e7e3af1a403
2016-04-12cleanup: remove unused com/sun/star/uno includesJochen Nitschke
Sequence.h(xx), Any.h(xx) and Type.h(xx) and remove unused using-declarations from these files. Add a few missing includes provided by them. Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4 Reviewed-on: https://gerrit.libreoffice.org/23805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-08tdf#99140 DOCX import: fix table horizontal aligment to be 'from left' ...Miklos Vajna
... when it was 'manual'. Regression from commit c1e563f6efd09cd3463f1b92a3022ae288c92087 (fdo#76741 [DOCX] Table Alignment and width type, 2014-04-04), DOCX import code had to deal with two kinds of horizontal alignment when it came to floating tables: the alignment of the table itself, and the alignment of the float parameters. The problem is, in general it's wanted that the table is aligned according to the floating parameters, but in Writer the "from left" UI setting is described differently for tables and fly frames: tables use LEFT_AND_WIDTH for that, while fly frames use NONE. Fix the problem by touching the default only in case the floating parameters have something that's different from NONE. With this, the width of tables is no longer lost when they are described to be floating ones in the DOCX markup, but FloatingTableConversion() decides to ignore that. Change-Id: Idd41c3e03e6ded8552e9d15b6080e4b45eb18d3d Reviewed-on: https://gerrit.libreoffice.org/23923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-08tdf#99140 DOCX import: fix table at the bottom of the page to span over ...Miklos Vajna
... multiple pages. In short, one more blacklist entry when conversion should not be performed. Change-Id: I764f02cc58ae1b7af802b81e570e4feaf73ee2c1 Reviewed-on: https://gerrit.libreoffice.org/23912 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>