summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2017-10-23loplugin:includeform: swStephan Bergmann
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
2017-10-23tdf#113284 Check vector length before useTamas Bunth
Change-Id: I52b5e6712ba34de0a73bc45ce2262b211b5ac50e Reviewed-on: https://gerrit.libreoffice.org/43725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-10-23Split ooxmlexport8 to avoid too many sections in object file with MSVC2015Tor Lillqvist
sw\qa\extras\ooxmlexport\ooxmlexport8.cxx : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj "Revenge of the CLOOKs," as mst called it. Change-Id: I57faae5ffdf17a8f4a80c6e948a4deed3427af0e
2017-10-23tdf#38778 fix missing run properties export for fields in docxSerge Krot
Not all runs got their text properties written during field export - previously only the first run had them. Adds SwTextNode param to EndRun and EndRuby methods, implementation empty for rtf and doc though. Change-Id: I77f39b40689feb9664044e61824ad3bb97776638 Reviewed-on: https://gerrit.libreoffice.org/43465 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de> Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de>
2017-10-23Resolves: tdf#113336 avoid crash during teardownCaolán McNamara
Change-Id: Icdebd5aca1a2bdaefb904d153ca97a6cc56ac7ff Reviewed-on: https://gerrit.libreoffice.org/43712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-23Resolves: tdf#113356 Missing numbering formats in writer field ui listCaolán McNamara
Change-Id: If1ba30783473b82f08fef3754fcdcf3b4e2951b4 Reviewed-on: https://gerrit.libreoffice.org/43717 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-23Simplify some includesStephan Bergmann
...where the relevant path is already found via -I settings Change-Id: I9cb13b7b648ff2b1983a8b80d5047c4d9da9f515
2017-10-23loplugin:finalclasses in swNoel Grandin
Change-Id: I3b1d689d5eb800a36466376bca735dd31fe4567c Reviewed-on: https://gerrit.libreoffice.org/43639 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23overload std::hash for OUString and OStringNoel Grandin
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-22Remove redundant asserts involving dynamic_castStephan Bergmann
...from SwTypeNumber to itself, which the compiler is free to elide anyway. (SwTypeNumber is a base class, so there's no way to hack this like was done with vcl::Window in 4e7ffc0a69dac31ca7e0f1649f1697a1ff8d6e5f "Avoid compiler eliding#redundant dynamic_cast".) Change-Id: I21185e49bc4fa1803d46e086d863d47eda330acf
2017-10-22tdf#110994 make text-to-text alignment work in standard page mode.Mark Hung
Allow it to align as if there is no grid at all. Change-Id: I784284a05c1f1323e050e74a5d574a9b11189298 Reviewed-on: https://gerrit.libreoffice.org/43005 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-10-22TSCP: wrap paragraph classification in parensAshod Nakashian
Change-Id: Ieb0236d7cde2dfde8758040605c7d83d1b905e7b Reviewed-on: https://gerrit.libreoffice.org/43626 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-10-21loplugin:redundantcast handle dynamic_castNoel Grandin
Change-Id: I7855c76e820efce96778b1c19ec71dffcc4b4abb Reviewed-on: https://gerrit.libreoffice.org/43621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-21coverity#1401307 document checked 'Uncaught exception'Caolán McNamara
markup std::unique_ptr where coverity warns a dtor might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: Icc99cdecf8d8b011e599574f0a05b59efd1c65c2 Reviewed-on: https://gerrit.libreoffice.org/41561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-20tdf#113287 sw split sections in tables: fix missing invalidation on sect delMiklos Vajna
The problem was that the Table1:A2 cell contents was wrapped in a section that was first split, then all the contents was moved to the next page, finally the empty master was also moved to the next page. At this point the master had 0 height, and when it was removed, the follow section frame had invalid positions, including all of its contents. Position invalidation for table contents works by first invalidating the table frame position, which triggers an invalidation chain for both all next frames and the lower frame. Other lower frames are not invalidated, that happens when the first lower is calculated, in SwLayoutFrame::MakeAll(), when the SwLayNotify dtor is executed. This mechanism did not help us here, as the master section frame was already marked for deletion, so SwLayoutFrame::MakeAll() was not called for it, so neither of its next frames were re-positioned. Fix the bug by explicitly invalidating the position of the next frame in SwSectionFrame::MakeAll(), for the "return early, this section will be deleted anyway" case. (The alternative could be to watch out for 0-height sections in the SwLayNotify dtor, but the problem is specific to section frames, so SwSectionFrame is probably a more expected place for this change.) Change-Id: I5ab9475675d25bef7c0647893b1b5909da019f3f Reviewed-on: https://gerrit.libreoffice.org/43604 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-20Fix typosAndrea Gelmini
Change-Id: Ia61b174eb48e0cb80d4b7d404d3b815537ba7cb1 Reviewed-on: https://gerrit.libreoffice.org/43615 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-20RotGrfFlyFrame: Clang error fixArmin Le Grand
Change-Id: Ifae68d4d5a17446f01c97ce2e94cd0419217259e
2017-10-20RotGrfFlyFrame: Added interactive rotation modeArmin Le Grand
The FlyFrames containing a graphic now support an interactive rotation mode. Added a rotation icon to the Toolbar close to right/left 90degree rotation. When activated, works as similar to draw object mode as possible. Shear and move of the rotation center is deactivated since not supported. It uses as much of the existing interaction stuff as possible. Change-Id: Ia1a4e5c064d8576b114c3fcf3a96ccb42c9372bb
2017-10-20RotGrfFlyFrame: Corrected position for CropHandlesArmin Le Grand
Position was taken from OuterBound FlyFrame, even in current master which is wrong. There can be a distance defined between InnerBound and OuterBound that has to be taken into account Change-Id: Id88f99c0b218bd26fa1daa5e8215eced00c0baa6
2017-10-20RotGrfFlyFrame: Implemented Handle Update on rotation changeArmin Le Grand
WIth rotaiton being allowed the handle visualisation may be dependent on this, so it is necessary to refresh their visualisation on rotation chnage, e.g. for crop handles Change-Id: I218e326894999381fc4058b7eba432491a0cf23b
2017-10-20RotGrfFlyFrame: Adapt Crop functionality to rotated GraphicArmin Le Grand
The FlyFrame which may contain a Graphic needs working Crop, interactive and in core. Adapted this to work with now possible rotation, changed common code in svx which has to handle cases for Draw/Impress/Calc and Writer differently. Tried to use as much in common as possible. Additionally furter adaptions to rotation itself. Change-Id: Ia961e9490e2627c74220b186116f5aa4fcabca78
2017-10-20RotGrfFlyFrame: Minimal working rotation solutionArmin Le Grand
This version allows rotation (in 10th degrees) and perserves it over save/load cycles. Rotation of multiples of 90 degree behave close to original except not changing the contained Graphic and being adaptable to all kinds of graphic. The rotated Graphic is displayed centered and under preserved AspectRatio in the available frame space (so no rotation, 180 degree is identical, 90/-90 is identical with 1:1 ratio of the graphic) Change-Id: I54b3385f709ee0d34a55324aca919dcd2ce0c009
2017-10-20RotGrfFlyFrame: Initial adaptionsArmin Le Grand
To allow free rotation of Graphic FlyFrames in Writer, several adaptions are necessary. This change takes care of all needed changes to internally support a freely definable rotation angle for that case. Save/Load round trip is working, the graphic does no longer get modified and added in 90-degree-changed state to the object, the original will be preserved. Support for needed slot in core/ui is implemented. Rotation can be applied from Menus/Toolbars in the known 90/180 degree steps. Added a slot/Button/command to reset rotation in these cases. Added support in Sidebar to rotate using the rotation wheel and/or numeric field. These fields and support added to Image TabPage, too, fully functional. Missing now is a solution for displaying the rotated Graphic. For now, it just gets rotated, but this will not be the final state of this change. Change-Id: I6f3b85ebb5be2b4ad3311c536d54f27a37a494e7 RotGrfFlyFrame: Linux build adaptions Change-Id: I365287ecd6525b1972e8436d61332f7121d88649
2017-10-20sw layout xml dump: show validity flags of SwFrameMiklos Vajna
Change-Id: I48ef2d7b2f88421c90a5128785e21868dc2cef32 Reviewed-on: https://gerrit.libreoffice.org/43589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-10-20sw: fix unusual boolean prefix for pointer in tabfrmMiklos Vajna
Change-Id: I0a0e896c57e8b6d659e0038bbbd89996aedb1147 Reviewed-on: https://gerrit.libreoffice.org/43588 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-10-20sw: drop temporary debug code in sectfrmMiklos Vajna
Change-Id: Ic9a7ecae8533adc76d440525e9f7a7cafa272be8 Reviewed-on: https://gerrit.libreoffice.org/43587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-10-20tdf#55528 ww8export: export table width percentJustin Luth
Confirmed in MSO 2003 and MSO2013. Change-Id: I91362571294c3869ecd7c5fd37d2f781e2655fe6 Reviewed-on: https://gerrit.libreoffice.org/42919 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-10-20coverity#705523 silence Dereference null return valueCaolán McNamara
Change-Id: Ic7719a543b341ca78264a24568b63cc69069c8e5 Reviewed-on: https://gerrit.libreoffice.org/43592 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-20use std::unique_ptr in SwSortOptionsNoel Grandin
Change-Id: I5854e1492388d765a0503193a45f7c0f1bd14004 Reviewed-on: https://gerrit.libreoffice.org/43528 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-20tdf#107111: DOCX export: restore HideTabLeader... attribute after TOXVasily Melenchuk
Previously m_bHideTabLeaderAndPageNumbers value was not restored after TOX finish and so causing visibility problems with following hyperlinks. Change-Id: I4ba5ce1f70e05d706d17d60e1a33a62995701f9e Reviewed-on: https://gerrit.libreoffice.org/43310 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-10-19sw: enable ooxml export tests also for Win32Serge Krot
* seems they work fine these days * also removed magic number from fdo69649 test in favour of getting the value straight from the document Change-Id: Ife9d96eb413740b56b771df0d23e590f44f9452f Reviewed-on: https://gerrit.libreoffice.org/43568 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-10-19tdf#87533 Fixed initialization of writing mode for paragraphSerge Krot
During parsing of the docx the paragraph without w:bidi should take this value from style or from default paragraph properties, Change-Id: Ie33f0d1cd3551c4053a47e6faf7dcac71765db65 tdf#87533 explicitly set writing mode value based on default properties Change-Id: I3fcf514a901f0630d749ba0ddb6361d6db3ce1b5 Reviewed-on: https://gerrit.libreoffice.org/42895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-10-19ofz+ubsan: signed integer overflowCaolán McNamara
Change-Id: Ie291f5f4e705ad3d2aeecc9fa26b1247974e2aa2 Reviewed-on: https://gerrit.libreoffice.org/43545 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-19use std::unique_ptr in SwDocUpdateFieldNoel Grandin
Change-Id: I9d6eba5e2714a29fd3a2ad301298ad8590a4af36 Reviewed-on: https://gerrit.libreoffice.org/43549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-19ofz+ubsan: signed integer overflowCaolán McNamara
Change-Id: Ie75f4ff4c0efe1a1fb67b8d2edf86af9a962110f Reviewed-on: https://gerrit.libreoffice.org/43543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-19ofz+ubsan: signed integer overflowCaolán McNamara
Change-Id: I9ff2a9402b4dd1ed5458ea935a7ceedd525a3397 Reviewed-on: https://gerrit.libreoffice.org/43533 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-19sw: fix odd condition in SwpHints::MergePortions()Michael Stahl
All of the RES_CHRATR_* items are poolable, hence we have (pItem1 != pItem2) == (pItem1->Which() != pItem2->Which() || *pItem1 != *pItem2) Move the redundant check to an assert() so we notice in case somebody adds a new non-poolable RES_CHRATR. Thanks to ccsheller for pointing me to this condition. Change-Id: I9e0634946b8bede3f483bb8997f69de05beae64c
2017-10-19ofz+ubsan: signed integer overflowCaolán McNamara
Change-Id: I950fb60f9bc7d86a2fe6c64a3d8e62d29ab29817 Reviewed-on: https://gerrit.libreoffice.org/43538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-19ofz+ubsan: signed integer overflowCaolán McNamara
Change-Id: I1484897d5c14cc35165b7bec0b840c03024a34e9 Reviewed-on: https://gerrit.libreoffice.org/43519 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-19ofz+ubsan: downcast does not point to SwTextFormatCollCaolán McNamara
sw/source/filter/ww8/ww8par.cxx:1654:20: runtime error: downcast of address 0x000012e4a730 which does not point to an object of type 'const SwTextFormatColl' 0x000012e4a730: note: object is of type 'SwCharFormat' Change-Id: Idc44902b0602af13fbc021c8f40a0c0dca0e46b3 Reviewed-on: https://gerrit.libreoffice.org/43514 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-18ofz+ubsan: signed integer overflowCaolán McNamara
sw/source/filter/ww8/ww8scan.cxx:1816:15: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' Change-Id: I8dc79794c94c512ed1f73ea3f0e251cf2dc960bc Reviewed-on: https://gerrit.libreoffice.org/43505 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-18Fix spacingMuhammet Kara
and use the hungarian prefix 's' for the string. Inconsistent spacing introduced with: 2b5b8fd39c93166d9e6e696c010482413b155f78 Change-Id: Ieee55f51ec6c87b087365f7460097d5cc997a261 Reviewed-on: https://gerrit.libreoffice.org/43405 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2017-10-18ofz+ubsan: signed integer overflow in unused variableCaolán McNamara
Change-Id: Ie95ddfdb002fdb5b6670bb155d2dd0089b719fca
2017-10-18tdf#112808 Disable "Edit Region" command while cursor in an index.Gulsah Kose
Change-Id: Icefa1e42831ad0ba7a9f5346545adac0033ce3e0 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/43456 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-10-18svx: remove pointless duplicate SdrFitToSizeTypeMichael Stahl
Change-Id: I7a59ecfdb8d09ecbc0b760003dbc453ac5646d1c
2017-10-18use rtl::Reference in SwChartDataSequenceNoel Grandin
instead of manual acquire/release Change-Id: I2d827b2f785b34b77adb95ac62afb885bb423879 Reviewed-on: https://gerrit.libreoffice.org/43478 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-18tdf#109306 ooxmlimport: consider table sizes < 10%Justin Luth
Change-Id: I336d5a498f4f4523e03b1316b7adaca21df4de82 Reviewed-on: https://gerrit.libreoffice.org/43385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-10-17tdf#79272 ooxmlimport: support strict dxa tblWidthJustin Luth
This patch is also required for tdf#78508. ECMA-376-1:2016 indicates that MeasurementOrPercent is a union of ST_DecimalNumberOrPercent and ST_UniversalMeasure. For the elements that use MeasurementOrPercent, that is represented as 1/50 of a percent or in Twips. This patch adds support for the ST_UniversalMeasure component of the union. Change-Id: I1bac30707f118a3d1f0eab3c27f8dcec96470592 Reviewed-on: https://gerrit.libreoffice.org/43384 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-10-17tdf#104079 RTF import: fix handling fields inside TOC fieldsMiklos Vajna
The marker trick is not needed for these, but the paragraph margins are lost when using it, so avoid it. Change-Id: I3fc9644cb85138b5473cb1478196ae8538041fb1 Reviewed-on: https://gerrit.libreoffice.org/43446 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-17Fixed duplicated context attributes in a .ui file.Kiyotaka Nishibori
The duplication has generated an invalid .pot file: sw/messages.pot Change-Id: I9b2ce8bb957c1bd3775bc78cbcac4bea9e46ba77 Reviewed-on: https://gerrit.libreoffice.org/43396 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>