summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2017-01-09New loplugin:externvar: swStephan Bergmann
Change-Id: If850989ee513d29ed373df0c6dd9905ec694026c
2017-01-09tdf#101828 handle rtf/richtext correctlyOliver Specht
Change-Id: Id894f62a918bd6e6fa59f8d546307343bf2bd4b0 Reviewed-on: https://gerrit.libreoffice.org/32682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-01-08These don't have to be staticMaxim Monastirsky
Change-Id: I448d1f2f292ce379cbce0083dc2c5230a7f6ce1b
2017-01-07coverity#1358841 Explicit null dereferencedCaolán McNamara
Change-Id: I1c4cff09a7c549e9a14886c1460a7e2c2c74f757
2017-01-07use proper message passingBjoern Michaelsen
Change-Id: I5655dd4c07769d3c9832a3e7246e750cd2f1908d Reviewed-on: https://gerrit.libreoffice.org/32806 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-07Typo: Postion->PortionJulien Nabet
Found thanks to Buovjaga Change-Id: I8859cbec896c4019a5137d801f753ad87287a369 Reviewed-on: https://gerrit.libreoffice.org/32809 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-07Typo: Acess->AccessJulien Nabet
Found thanks to Buovjaga Change-Id: I73e36f50a1fd393859ba775ab084a488047864a3 Reviewed-on: https://gerrit.libreoffice.org/32810 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-07coverity#1398369 Unchecked dynamic_castCaolán McNamara
Change-Id: I33b5a2343eb7701a478c8d039d818e679471d4c0
2017-01-07dynamic cast followed by static castCaolán McNamara
Change-Id: I425692130bd7ef6b8a9ebce3592c1976fa44dafc
2017-01-06tdf#105009 sw: fix a11y crash when removing drawing objectMichael Stahl
SwFrame::RemoveDrawObj() calls SwAnchoredObject::ChgAnchorFrame(0) so the SwAnchoredDrawObj has no anchor frame later when SwAccessibleMap::InvalidateCursorPosition() asks for the parent. (regression from 76c549eb01dcb7b5bf28a271ce00e386f3d388ba) Change-Id: Id55cb5fc41a4e37e863498265d1565e1621d508e
2017-01-06tdf#105143 DOCX import: enable DoNotCaptureDrawObjsOnPage layout compat optionMiklos Vajna
Because that's what Word does to show only part of the shape in the bugdoc. Change-Id: Ic5cb84cace9237671d71eda0c64e9dadfe244cb9 Reviewed-on: https://gerrit.libreoffice.org/32782 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-06tdf#105127 VML import: handle <v:shape style="flip:..." path="...">Miklos Vajna
I don't see an easy way to implement this via UNO, so use the internal API. As to the internal API usage, SdrEditView::MirrorMarkedObjVertical() (for UI) and SvxMSDffManager::ImportShape() (for WW8 import) are example client code. Change-Id: I9bf27788db32fd35d6b56e0f1a240c4b7abc5604
2017-01-06No need to check isEmpty() before clearingStephan Bergmann
Change-Id: I75b077cbc2d100964d4157220561d53c1b235199
2017-01-06tdf104061 - looking for test documentsJustin Luth
This fixes the specific test document here, but likely there need to be other qualifiers such as "if the table is the first node in the section". Likely this commit will be reverted. We will use Milos' document tester to hunt for the side-effects of this patch - which should give us a good set of test documents. Change-Id: I7d3a2168556c82bc4758ad665da319d55df4ba2b Reviewed-on: https://gerrit.libreoffice.org/32759 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
2017-01-05refactor and simplify AppendAllObjs with a circular bufferBjoern Michaelsen
- do not iterate repeatedly over objects already handled - filter out AS_PAGE and AS_CHAR before looping - use circular buffer as we are only ever removing, never adding formats to handle, so we can get away with one alloc Change-Id: I0244bda6db4704891111f6c6a8630a72bede68e6 Reviewed-on: https://gerrit.libreoffice.org/32747 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-05Related: tdf#105093 sw PDF export: handle embedded videosMiklos Vajna
Use vcl::PDFExtOutDevData::SetScreenStream() for embedded media to make sure that vnd.sun.star.Package: URLs don't end up in PDF out literally. Acrobat Reader obviously doesn't understand that protocol. Change-Id: I384891b3ef2dcea25bbf591bd210ccf899d30a61
2017-01-05use proper message passingBjoern Michaelsen
- checking the type of Format hopefully allows skipping contact checks Change-Id: I11690e4ec1e94b809b0ec13f2d9b4e3a22ded213 Reviewed-on: https://gerrit.libreoffice.org/32729 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-05use GetZOrnderHint instead of duplicationBjoern Michaelsen
Change-Id: I78f428e9ddc50df60f7e9652015d49f3cf7b3286 Reviewed-on: https://gerrit.libreoffice.org/32746 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-05Replace side-effect--only uses of makeStringAndClear() with setLength(0)Stephan Bergmann
Change-Id: Iaf8011f1bd6a10b324653899b7f51458f7d0b68a
2017-01-05tdf#49102 - remove list numbering from merged cellsJustin Luth
The hidden cells in a vertical merge retained their numbered list properties. It is possible in LO's UI to create a table similar to this by numbering the cells first, and then merging them. So this behaviour also needs to be prevented in a future patch. Change-Id: I0c3ae50aada3fa03e624b1d4212b2776b7559036 Reviewed-on: https://gerrit.libreoffice.org/32512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-05sw: indentation fixesMiklos Vajna
Change-Id: If996c17dbfee2302a1d0f58428b088a953abcc9f
2017-01-05Base SvxLineEndWindow on ToolbarPopupMaxim Monastirsky
Fixes size and position issues under gtk3/wayland Change-Id: I357a5935e2b44fd3d5effde8cf7d3499e26384db
2017-01-04sw: more implicit int conversions in SwEndNoteOptionPageMichael Stahl
Change-Id: I66033eeff8ebb636d5f55d61102a0f30f3353f85
2017-01-04sw: remove the silly casting in SwEndNoteOptionPageMichael Stahl
... by fixing the size of SwFootnoteNum so it can be forward declared. Change-Id: I1a9d32a1ec7e7201de1910407d32020b75fb7342
2017-01-04tdf#43370 docfnote.cxx: return correct FTNNUM for GetNumberingJustin Luth
way back in 2001 commit a7afc46b3766e4000ae5a9b8a914ede36bbd2991 removed the option to select per-chapter footnote-numbering for footnotes placed at the end of the document (or perhaps chapter since the variable is called FTNPOS_CHAPTER, but the UI refers to it as document). So only "Per Document" remained. However the function GetNumbering was never updated to reflect that fact that 2 options were removed from the list now, instead of one. So, the UI reported the choice as "Per Page", the only dropdown choice available was "Per Document", and the actual implemented choice was "Per Chapter". How's that for a mess? Change-Id: Ib8dc3d07c0ef62d39afdd2a1c78c14527649c6df Reviewed-on: https://gerrit.libreoffice.org/32700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-04Clean up ~SwXAutoTextEntryStephan Bergmann
The "DocShell must be cleared..." comment was a leftover from 2613afee051fee15ac78b06f611da493989f893c "INTEGRATION: CWS sw008", pertained to code that had been moved into implFlushDocument. The extra code block and accompanying "Thus, an own block..." comment are just nonsense. Change-Id: I7e60b488c609796d86bedf518218b06c612e494d
2017-01-04tdf#104085 Replace number format code literal with ooxml enumeration.Mark Hung
Liberals of Number format code (NFC) were no longer recognized by dmapper after it had been removed in d30a8ec448bcd08c6a52a37d6ae41a4b71c235da. Replace them with enumeration. Change-Id: I3ed1e09d9f3987fce95bd708b9c0b0568d3f15f9 Reviewed-on: https://gerrit.libreoffice.org/32527 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-01-04SwXAutoTextEntry needs a disposal protocolStephan Bergmann
SwXAutoTextEntry::GetBodyText calls SwGlossaries::EditGroupDoc to create a Sw[Web]GlosDocShell (which it then stores in xDocSh), and there must be a call to that shell's DoClose to clean up its resources. However, if a reference to the SwXAutoTextEntry is still held during XDesktop::terminate (as can happen in JunitTest_sw_unoapi_1, where such a reference is held from Java, thus arbitrarily delaying destruction of the SwXAutoTextEntry until the JVM does GC), SwXAutoTextEntry::Notify's PrepareCloseDoc case will release xDocSh without calling DoClose, so an eventual ~SwXAutoTextEntry will not call DoClose either. (And calling DoClose from withing SwXAutoTextEntry::Notify would cause a crash, as it would destroy the SwGlosDocShell recursively from within its SfxBroadcaster::Broadcast call.) So introduce a disposal protocol for XAutoTextEntry and call it at least in the place that caused the resource leak in JunitTest_sw_unoapi_1. For lack of a better inerface, reuse css.lang.XComponent for that protocol, even though this scenario doesn't involve breaking cyclic references among UNO objects caused by listener patterns. Change-Id: Id6501b84e562950e40b83e0b1afd1b3184807856
2017-01-04tdf#99616 writerfilter: hideMark shouldn't force min sizeJustin Luth
hideMark in Word does not force the minimum possible row size, but simply ignores any cell marker styles/sizings. So an empty row then takes on the "at least" size defined for the row. Change-Id: Id24a52f2a360a5040c2eed5c17757c0d32d03520 Reviewed-on: https://gerrit.libreoffice.org/32380 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-04Related: tdf#104841 sw PDF export: handle linked videos on non-first pagesMiklos Vajna
Be explicit about the page number, this way a video on the second page doesn't end up as an annotation for the first page. (In the Impress case each slide is exported separately, so there this wasn't a problem.) Change-Id: I83ba9cb4a3b2a6734bd88a138654e391199651c6 Reviewed-on: https://gerrit.libreoffice.org/32696 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-03tdf#97361: Changed method calls in check_indexed_property_valueskerem
Change-Id: Ia3afaf2abd0f0a56ccb56d4f967117f1adc52fb2 Reviewed-on: https://gerrit.libreoffice.org/32357 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-03tdf#97361: Changed naming in check_fields and check_tablekerem
Change-Id: I2a0cf6d6b663e00cd67447089f65512667b18f3a Reviewed-on: https://gerrit.libreoffice.org/32297 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-03tdf#97361: Changed method calls in check_flieskerem
Change-Id: I6148ffccd4284cfc72fed2c7f4538054a5aaf24c Reviewed-on: https://gerrit.libreoffice.org/32358 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-03TyposJulien Nabet
Change-Id: I487db955caff589b9f62c50b83067628bb768d50 Reviewed-on: https://gerrit.libreoffice.org/32460 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-01-03Related: tdf#104841 sw PDF export: handle linked videosMiklos Vajna
This is the sw-specific part only, the real work is done by the common CreateScreen() / SetScreenURL() API added for sd earlier. Change-Id: Ief9fd80082960ddd1f92f413eac79577621551ce Reviewed-on: https://gerrit.libreoffice.org/32687 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-03tdf#104492: Fix bad docx opening and bad layoutDimitri Bouron
The problem seems to be the table's repeated rows value which is setted to max table rows in some docx file. Decreasing repeated rows value by one avoids loops but renders a bad layout. Table continuity is lost and lots of rows are hidden. So I set repeated rows value directly to one in order to avoid bad layout. Change-Id: If4adc33febe088a866b704e87e49339710e5aaf5 Reviewed-on: https://gerrit.libreoffice.org/32349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-03tdf#104744 RTF import: fix unexpected zero para left margin wrt style dedupMiklos Vajna
See commit 1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF import: override style properties like Word, 2014-06-17) for the details on style override in RTF. Here the problem was that we added an unneeded "reset to 0" property, the opposite situation that commit 657c6cc3acec0528209a8584b838cd6de581c437 (tdf#104228 RTF import: fix override of style left/right para margin, 2016-12-13) was fixing (there a "reset to 0" was missing). Change-Id: I37f079b9cb4773214d2531c2e34920b3b8927211
2017-01-03use proper message passingBjoern Michaelsen
Change-Id: Id0ac2e87344fdab4db97357158c5cc60eed70898 Reviewed-on: https://gerrit.libreoffice.org/32663 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-03tdf#49102 - UI: remove list numbering from merged cellsJustin Luth
The hidden cells in a vertical merge retained their numbered list properties while the document was loaded (bad). However, on closing and reopening, the hidden cells no longer had any numbering (good). This patch immediately removes the numbering, so that the working copy matches the saved copy. Now vertical merging works the same way as horizontal merging already worked. Change-Id: Ia37151031eab4fd57bf958e9cddf6dce06dafc3c Reviewed-on: https://gerrit.libreoffice.org/32518 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-03tdf#97361 Use join() for string concatenationJustn Lavoie
The PEP8 suggest to use join() instead of + operator for string concatenation. Change-Id: I35325cc73845a450f5c8ce40b7594e6d57ad6f45 Reviewed-on: https://gerrit.libreoffice.org/32504 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-02sw: prefix members of FndBox_Miklos Vajna
Change-Id: I05a4bc59e178d0e94e88540ab71fc6c46040490b
2017-01-02Prefer prefix ++/-- operators for non-primitive types.Muhammet Kara
Change-Id: I9be657cd0b5ed964db8db2ca28fd2874ae5406aa cppcheck: performance Reviewed-on: https://gerrit.libreoffice.org/32431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-02tdf#104876 writerfilter: m_bTableSizeTypeInserted = false hereJustin Luth
fixes commit cbd0fbc287051f918e4adb32b3e9b58dfbf8059d which removed the insertion code with the explanation saying we should simply not do anything, and that'll lead to the right behavior, don't try to be smart and try to set TABLE_WIDTH here but still left the flag set, falsely indicating that the tableSizeType had been inserted. Change-Id: I0720083c992d1d03a5fe259d5b4b177a0c8108f8 TODO: the table size still isn't correct. Reviewed-on: https://gerrit.libreoffice.org/32385 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-12-31tdf#89329 pImpl changed to unique_ptrG_Zoltan
In mailmrge.cxx/mailmrge.hxx manula allocated pImpl pointer is changed to std::unique_ptr. Change-Id: Icb973cdb449e59184a24c359c0ca9fe2da4a8ebd Reviewed-on: https://gerrit.libreoffice.org/32464 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-12-30cleanup tailing backslashesJochen Nitschke
Change-Id: Idb4bfc97e7d758c58118742affd9a9345c7a99f2 Reviewed-on: https://gerrit.libreoffice.org/32491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-30Workaround strange sw test makefilesMatúš Kukan
Include ooxmlexport_setup.mk only once in Module_sw.mk, so that gbuildtojson can properly set last included makefile for test jsons. Change-Id: Ie8ed3296ae97cf4a33d652599673f389b224993e Reviewed-on: https://gerrit.libreoffice.org/32502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org>
2016-12-30use proper message passingBjoern Michaelsen
- also skip extra GetMaster() null-check as it is only used for nullchecked dynamic_casts Change-Id: Iab51a6a3d5e40aa96f8f252d4ef5dce7d805549f Reviewed-on: https://gerrit.libreoffice.org/32466 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-12-29Close XConnection when doneStephan Bergmann
Change-Id: Icea70da002f88752603ad21482975d1707d29520
2016-12-29TypoTor Lillqvist
Change-Id: I303e993429e40147579c77623b554ef10d87dbfb
2016-12-28tdf#89329 pImpl changed to unique_ptrG_Zoltan
In dbtree.cxx and dbtree.hxx manual allocated pImpl is changed to std::unique_ptr. Change-Id: I19e76147f79733139c2535269431eeb94f85f557 Reviewed-on: https://gerrit.libreoffice.org/32463 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>