summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2017-07-10sw: prefix members of SwDrawViewMiklos Vajna
Change-Id: I8d18efcc609dfc2d5154bfae8799f3517bc3e48f Reviewed-on: https://gerrit.libreoffice.org/39738 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-09Added margin feature to the Draw's SideBarpv2k
Change-Id: I53b5430d1563fcceae29418fd5907ac42ea856e7 Reviewed-on: https://gerrit.libreoffice.org/37626 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-07-08tdf#108973 writerfilter: allow textboxes to be in the backgroundJustin Luth
Word appears to use negative z-indexes to indicate behind-text zordering and positive numbers for in-front placement. This was added for shapes in LO4.3, now applying to textboxes also. Change-Id: I3b06fb231329f151ca978f3a68b4d4e89bc28515 Reviewed-on: https://gerrit.libreoffice.org/39671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-07-08tdf#108545 show an icon (DOCX inside DOCX)Szymon Kłos
If DrawAspect is equal "Icon", show an icon not document preview Document is opened in the separate window, not in-place. Change-Id: I3a8d81e7340b29d247f8ac440c06b0420bb65644 Reviewed-on: https://gerrit.libreoffice.org/39440 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-07-07remove nullptr checks on STL search result iteratorsJochen Nitschke
results are in the range of first_iterator to last_iterator. If one of those is nullptr the algorithm would fail anyway. This removes some impossible checks in sw/source/core/unocore/unochart.cxx: SwChartDataProvider::detectArguments. A sorted range still holds the same values and has the same length as the original range. Replacing raw pointers eases reading this code. Change-Id: If96bd11e9167488346a57e9e08507ac42338d3cd Reviewed-on: https://gerrit.libreoffice.org/39683 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07rhbz#739252 sw: fix crash on split tables inside nested sectionsMiklos Vajna
Commit b5e0a143308e976b4165ff6181f4dccc3db0bd31 (tdf#108524 sw: attempt to split section frames inside table cells, take two, 2017-07-03) checked for tables in SwFrame::GetNextSctLeaf() when it considered looking up the next "follow" cell frame. But this is too general, in practice it is only necessary to look for follow cell frames in case the frame in question is in a table, but not in a table-in-section. This at the same time avoids a crash with tables inside nested sections, as it happens in the bugdoc. Change-Id: If648cb477be5492c7158f89934435ca7021a6a63 Reviewed-on: https://gerrit.libreoffice.org/39692 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-07sw: convert SwTextAnnotationField OSL_ENSUREs to assert() and simplifyMichael Stahl
Change-Id: Ica69cd4527f36edd7480d897a28ff814ecbe97a9
2017-07-07sw: WW8 import: avoid inserting annotation mark without SwPostItFieldMichael Stahl
SwFltControlStack::SetAttrInDoc() will insert a RES_FLTR_ANNOTATIONMARK without checking that there is actually a SwPostItField at that position, which triggers the assertion "<AnnotationMark::InitDoc(..)> - annotation field missing!" in AnnotationMark::InitDoc(). This happens when loading "crash-7.doc" which has a different kind of field - a SwPageNameField - at that position. In the WW8 filter, the SwPostItField is inserted in Read_And(), the AnnotationMark in Read_AtnBook(), which look quite orthogonal. Since it doesn't look like a valid document model to have the AnnotationMark without its field, avoid inserting it in the filter. Change-Id: I960d346601522b1a4d8644e538cde174763e99ff
2017-07-07simplify ooxmlw14export codeNoel Grandin
no need to do c_str() everywhere, when we can just work with OString's Change-Id: I4c9e80200c7c4d36abc541ab47b3f3cf1b42e2fb
2017-07-07Revert "use std::vector in BigPtrArray"Noel Grandin
which is causing crashes in the crashtesting in ooo119635-3.docx and ooo119568-2.docx It is definitely some kind of use-after-free error, but the compress and delete logic for BigPtrArray is too hairy for me to debug right now. This reverts commit 1eee0abd459a508a6dcf9e71cbf2c1be3725faa7. Also revert commit 4f743419a04375160437a910254c45dea396f70d "gdb pretty-printers: fix BigPtrArrayPrinter after recent std::isation" Change-Id: Id870876432a060f9347aafb43bf0df692ea24464 Reviewed-on: https://gerrit.libreoffice.org/39684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07sw: convert SwTextInputField OSL_ENSUREs to assert() and simplifyMichael Stahl
Change-Id: I86df59e4b77d2ddc479144f32342113a6e29a725
2017-07-07tdf#108995: take xml:space attribute into accountMike Kaganski
See paragraph 2.10 of XML 1.0 specification and 17.3.3.31 of ECMA-376-1:2016 Change-Id: I7f19d3b9cf2ccce88a5fa03022beeb99facc04fe Reviewed-on: https://gerrit.libreoffice.org/39682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-07-07tdf#77219 writerfilter: allow shapes to be in front of textJustin Luth
In LO4.3, commit 2496eaa5c4535b88b44e4ac034aae6af0c08de0e forced every shape to be "in background". That is not correct. Word appears to use negative z-indexes to indicate behind-text zordering and positive numbers for in-front placement. Change-Id: I4083ae67ef76152e1c0a894d810950d249ac13b4 Reviewed-on: https://gerrit.libreoffice.org/39670 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07coverity#1414682 unnecessary dynamic_castCaolán McNamara
Change-Id: I7a1a7b5601f474fda84eef53009f4d45ae35b158
2017-07-07tdf#108714: Also support paragraph-level (line) breaksMike Kaganski
Change-Id: Ida55015363cac3ae29b82a60a9b9a5f1b39086a2 Reviewed-on: https://gerrit.libreoffice.org/39675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-07-07C++11 remove std::binary_function bases from functorsJochen Nitschke
std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06sw/README: document lists and outlineMichael Stahl
Change-Id: I1f6a7a29a308e13c20e5987902d148ee8d466e31
2017-07-06sw: convert SwNumberTree::IsSane to assert() and simplifyMichael Stahl
Change-Id: Ib2087a53d2a22f5fdafa5c3d0d058dd0ad8ed643
2017-07-06sw: enable some SwNumberTree sanity testing codeMichael Stahl
__SW_NUMBER_TREE_SANITY_CHECK isn't defined anywhere. Change-Id: Ieb8c47d12c47a8a1ffcad0616382e4d2b55024a0
2017-07-06sw: comment cosmeticsMichael Stahl
Change-Id: I572bf8b28738e82e2f207b5201a0c27d9d9b623d
2017-07-06i#61225 sw: fix layout loop with growable single-column sectionsMiklos Vajna
Commit 6ade80cf142664e78954c7544534e9436ceb90c7 (tdf#108524 sw: allow move of frame inside section without columns, 2017-06-16) relaxed lcl_IsInSectionDirectly() used in SwFrame::IsMoveable() to allow move for all section frame contents if it has a single column. That looked safe, as the multiple column case was already allowed. There is one situation where this still causes a problem: when the section has a single column and the section frame is growable -- as in that case we should grow the section frame, not move the contents. So go back to unconditionally allowing multi-column section contents and allow single-column section contents only in case the section frame is now growable. With this, ooo61225-1.sxw from the crashtesting corpus can be opened again without a layout loop. Change-Id: Ib2d3702a33da8e62b9bbf468d558ae16db8aa94b Reviewed-on: https://gerrit.libreoffice.org/39653 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-06crashtesting: 554 crashing documents on export to .docCaolán McNamara
regression from... commit d72e0cadceb0b43928a9b4f18d75c9d5d30afdda Date: Mon Jun 19 15:32:16 2017 +0200 Watermark: tdf#91687 correct size in the .doc hopefully this fix is correct Change-Id: I17512ffdd4db605e79b3adb97551e6f4e3816f2f Reviewed-on: https://gerrit.libreoffice.org/39661 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz#2469 docshell leaks if progress bar is not stoppedCaolán McNamara
Change-Id: I2595833dd3c6c9e05a32b70c880444128d66c4d3 Reviewed-on: https://gerrit.libreoffice.org/39643 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06nLCode is signed, so check for > 0Caolán McNamara
Change-Id: I2e40d020d088679a8f9d197485a782d511012bd5 Reviewed-on: https://gerrit.libreoffice.org/39657 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: Icf43996a57aa4284b309e127431e7406b833d88f Reviewed-on: https://gerrit.libreoffice.org/39642 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: Ia29ccd98c60bb73ce2532e47eefc317de1e87303 Reviewed-on: https://gerrit.libreoffice.org/39641 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: I35dcd9db95cd1bd567202b4cf61c8e166e17c099 Reviewed-on: https://gerrit.libreoffice.org/39640 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: I73806c0fff325159c624e87338aac3bbe61c9382 Reviewed-on: https://gerrit.libreoffice.org/39639 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: Ia5961336fc399b079814cbcf66d47a465f5ba789 Reviewed-on: https://gerrit.libreoffice.org/39638 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: I2542447ed6bf5098829c3d8c77435d39c1cb2e5f Reviewed-on: https://gerrit.libreoffice.org/39637 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: I908114f12257fdd287cce9a108d5fb2dc7b6a8bf Reviewed-on: https://gerrit.libreoffice.org/39636 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: I14a0a2ad39d388d8d96d2100be46b8b4c239e644 Reviewed-on: https://gerrit.libreoffice.org/39635 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: I6c4706e203f82d692630b4953e48050c71235d16 Reviewed-on: https://gerrit.libreoffice.org/39634 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: I9f5640461d09103ed6da4613e7ca520bc54b3c51 Reviewed-on: https://gerrit.libreoffice.org/39633 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz#889: UriReferenceFactory unavailableCaolán McNamara
Change-Id: Id041976e273c0ee2c1862c7a27dd39cfac12aaaf
2017-07-06ofz: fix some leaksCaolán McNamara
Change-Id: I7394f9b9c51fd827c5381119d32f5c75a95feb5c Reviewed-on: https://gerrit.libreoffice.org/39632 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06GSoC: Recent Charaters Toolbar Dropdown ControlAkshay Deep
Change-Id: Ib04d26fa5556e5c32db6799c16d0bbedc45504ec Reviewed-on: https://gerrit.libreoffice.org/38944 Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com> Tested-by: Akshay Deep <akshaydeepiitr@gmail.com> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-07-06ofz: more leaksCaolán McNamara
Change-Id: Ibb388c1596894ea3e9cd3d3ecd5f299aa9ccf8be Reviewed-on: https://gerrit.libreoffice.org/39631 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: fix leakCaolán McNamara
Change-Id: I4cb6f83d7c55f673f31a77efdbd65bcf1e00d741 Reviewed-on: https://gerrit.libreoffice.org/39630 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06ofz: stay inside stringCaolán McNamara
Change-Id: Ia0d0ddfce4ee3d5f8763be6804fe52c514375bb3 Reviewed-on: https://gerrit.libreoffice.org/39629 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06tdf#108524 sw: split section frames inside table cells, non-split text framesMiklos Vajna
Commit f991b842addddeada6dc45c4054deeca5aa7f17b (tdf#108524 sw: attempt to split section frames inside table cells, 2017-06-19) added initial support for multi-page sections inside a table cell, but turns out this only worked in case at the split point there was a long enough paragraph, so it was split into two (a "master" text frame and a "follow" one), and then the follow was moved to the next page by SwContentFrame::MakeAll(), with the MoveFwd() call in the "If a Follow sits next to its Master and doesn't fit, we know it can be moved right now." block. However, if the section contains lots of one-liner text frames, then all of them are masters, so the above code doesn't move them to the next page; so the section frame is still not split. Fix the problem by allowing the move of frames inside table-in-sections in SwSectionFrame::MoveAllowed(), that way SwTextFrame::AdjustFrame() will not set the text frame as undersized, so at the end SwContentFrame::MakeAll() will call MoveFwd() in the "If a column section can't find any space for its first ContentFrame" block. With this the split of text frames in section-in-table frames is consistent regardless if they are of multiple or single lines. Change-Id: Ief9d62da3fd8a5c707e1f9489a92f7a81e7b38ac Reviewed-on: https://gerrit.libreoffice.org/39623 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-06ensure safe GlobalEditData release of xForbiddenCharsTableCaolán McNamara
ensure that when the editeng GlobalEditData dtor is called that the vtable of the xForbiddenCharsTable shared_ptr will point to functions that are callable from editeng. otherwise a shared_ptr created in the sw uwriter cppunit test, but now belonging to GlobalEditData, will have deleter entries pointing to functions in uwriter that have been unloaded and are not available anymore Change-Id: I375a84156c0b1a0f8b24194fc07f0c512f556dbc Reviewed-on: https://gerrit.libreoffice.org/39605 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06silence coverity#1414485 Uninitialized pointer fieldCaolán McNamara
Change-Id: If62f528b1118aee702f364aa448e36230512fac6 Reviewed-on: https://gerrit.libreoffice.org/39572 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06rework as a shared_ptrCaolán McNamara
mostly to try and track down a crash on exit of sw uwriter under windows Change-Id: Id67e93863056da319dd8225038d60a7f5783b103 Reviewed-on: https://gerrit.libreoffice.org/39604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06teach unnecessaryparen plugin about other kinds of statementsNoel Grandin
i.e. do / while / switch Change-Id: Id0985015cc425557f9984734701d56466f8a6088 Reviewed-on: https://gerrit.libreoffice.org/39601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06loplugin unnecessaryparan improvementsNoel Grandin
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e Reviewed-on: https://gerrit.libreoffice.org/39587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05tdf#108873 fix merge data handling in fieldsJan-Marek Glogowski
This is a regression from tdf#70346 / commit 4851cde7b98226b0f82ae2b191c290173e9b06c6 It added the whole DB row as variables to the SwCalc hash set. This works correct for conditionals when hiding sections, but not for conditionals used in fields - actually they break. Previously the field would do a fallback to query the DB again, if no variable was in the dict and the only possible variables in the dict could have been user-defined fields. This handles the added variables correctly for fields. Also fixes a bug to store the DB number values as number variables and adds the record number, as SwCalc::VarLook does. Change-Id: Ib0dbeda68234e671768ede55b2012235a3680276 Reviewed-on: https://gerrit.libreoffice.org/39509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-07-05Fix a bit obscure pointer check.Marco Cecchetti
Change-Id: I843b7e15e6239288359590d2c40c0e6b5f8168ea Reviewed-on: https://gerrit.libreoffice.org/39569 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>