summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2018-10-09use unique_ptr in SfxUndoManager::AddUndoActionNoel Grandin
Change-Id: I11483e3cece12a7373f4276972b4c899edf1ce15 Reviewed-on: https://gerrit.libreoffice.org/61566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09tdf#119993 sw: clear the font cache text glyphs on table col changeMiklos Vajna
This helps not storing pre-computed vcl text layouts which are most probably never re-used anymore. Approximate numbers for memory usage with 10 column resizes for the bugdoc: - old: 310MB -> 454MB - new: 309MB -> 310MB Change-Id: Ifb88b88e1bffe2c2670089930fc2d22ff19576ce Reviewed-on: https://gerrit.libreoffice.org/61562 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-08tdf#120061 Enable Navigator multiple headings selectionJim Raykowski
...on document reopening when Navigator window was previously in Headings/Outline Content Navigation View mode Change-Id: I169df15e81c4e9acf24c0e76d7f720af598c5b93 Reviewed-on: https://gerrit.libreoffice.org/60910 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2018-10-08tdf#58944 DOCX import: workaround for hidden table headersLászló Németh
Repeating table headers consisted of more than 10 table rows switch off table header repetition during DOCX table import to fix non-visible table content and broken tables. Repeating header lines are not visible in MSO, if there is no space for them. OOXML (and ODF) standards don't specify this exception, and unfortunately, it's easy to create tables with invisible repeating headers in MSO, resulting OOXML files with non-standardized layout. To show the same or a similar layout in LibreOffice (instead of a broken table with invisible content), we use a reasonable 10-row limit to apply header repetition, as a workaround. Later it's still possible to switch on header repetition or create a better compatible repeating table header in Writer for (pretty unlikely) tables with really repeating headers consisted of more than 10 table rows. Note: This workaround could help to create standard and more portable OOXML files in a mixed environment. Change-Id: I17fbc0173ec1c4f188a46227b99dde5726530da3 Reviewed-on: https://gerrit.libreoffice.org/60689 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-10-08tdf#108064 OOXML export: convert LO preset dashes to equivalent MSO presetsAdam Kovacs
Change-Id: I967dfdc6a49cf04d98ea9fa9b57bf4669126a585 Reviewed-on: https://gerrit.libreoffice.org/61417 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-10-08cppcheck: duplicateExpressionTernaryJochen Nitschke
HTML_FRMOPTS_MULTICOL_CNTNR is the same as HTML_FRMOPTS_MULTICOL since commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b Date: Mon Sep 18 16:15:01 2000 +0000 initial import in htmlfly.cxx Change-Id: I54d04b77f4f281205d3ca89f36c12ff34ba12c12 Reviewed-on: https://gerrit.libreoffice.org/61522 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-08Related: tdf#120287 sw layout, TabOverMargin: fix left margin handlingMiklos Vajna
The old code only worked when left and first margin was 0; feed the relevant margin to SwTextFormatInfo, so SwTextFormatInfo::GetLineWidth() can compare against the right rectangle. This way TabOverMargin compat flag results in layout that matches the Word behavior for all 3 bugdocs from the bugreport. Change-Id: I6f81ad33b14e95ba4213c8956b3a9790ba6eee84 Reviewed-on: https://gerrit.libreoffice.org/61518 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-10-08sw: prefix members of SwUndoTableNdsChgMiklos Vajna
Change-Id: I70c6a0c9ff6306ba3c703028a732626fd92ad378 Reviewed-on: https://gerrit.libreoffice.org/61515 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-10-07Fix typosAndrea Gelmini
Change-Id: Ia26896cbcd8912f7cad641ea2ecf14c4ddf2d741 Reviewed-on: https://gerrit.libreoffice.org/61489 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-07tdf#120317 Set control layer name if not defaultRegina Henschel
In commit a9ec212c1b545d745285f0ab3119a80713b1d1f2 the internal default name of the layer, which holds form controls, was changed to controls, the same name as used in file format and UNO. Users of the class SdrLayerAdmin have to set the control layer name explicitly in case they want an own, different name. Change-Id: Ia08a85a4d01a75ee2c5115da25b2a409204ccc01 Reviewed-on: https://gerrit.libreoffice.org/61447 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2018-10-07tdf#119900 Fix Navigator Content Navigation View Headings focusJim Raykowski
Change-Id: I884ae9d1f13646782f56a982d3d8dc0bc3aacee0 Reviewed-on: https://gerrit.libreoffice.org/60906 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2018-10-06drop some now unnecessary includesCaolán McNamara
Change-Id: Idb41ddc0ff01333bac6cfce8bdd5e80c3c101de9 Reviewed-on: https://gerrit.libreoffice.org/61478 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-06weld FontWorkGalleryDialogCaolán McNamara
Change-Id: I6a3a2b445d6f79d0c259c69176e1b23de1ff05d3 Reviewed-on: https://gerrit.libreoffice.org/61474 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-06weld SwSelGlossaryDlgCaolán McNamara
Change-Id: I8d8b4a3b7ed461275eb4af86f3fd7709bab30586 Reviewed-on: https://gerrit.libreoffice.org/61476 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-06drop some now unnecessary includeCaolán McNamara
Change-Id: I9db3d9a172a41c70ed343efd76f4c7c8f88b3a3f Reviewed-on: https://gerrit.libreoffice.org/61471 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-06Quieten compiler warningJan-Marek Glogowski
Change-Id: I96d66d09a911d393e7f618e539b9eab5c3d740f9 Reviewed-on: https://gerrit.libreoffice.org/61450 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-10-06loplugin:useuniqueptr in SwHTMLPosFlyFramesNoel Grandin
and add a new method erase_extract to o3tl::sorted_vector, otherwise there is no decent way to extract an element from such a vector without freeing it. Change-Id: I769782c04a54a2d7433e8349c99134f997a54689 Reviewed-on: https://gerrit.libreoffice.org/61345 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-05Fix typoAndrea Gelmini
Change-Id: Ic491b7f63726abe25acb61c619c15967e496094d Reviewed-on: https://gerrit.libreoffice.org/61422 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-05Related: tdf#120287 sw layout, TabOverMargin: fix too wide tab portionMiklos Vajna
What happened is: - the paragraph was split into two lines, at the correct position - but then the first line checked how wide the tab portion can be, and there it concluded that it has a lot of space, so the tab portion was 1418 twips wide, instead of the expected "almost zero" 69 The root of the problem was that first the text break was determined using the TabOverMargin rules (more horizontal space), but later a check validated the result ignoring the TabOverMargin flag (less horizontal space). Fix this inconsistency by using GetLineWidth() in SwTextPortion::Format_() instead of manual calculation. Change-Id: Iaa7144341dfeaa8d177716dd87165598f11fd573 Reviewed-on: https://gerrit.libreoffice.org/61403 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-10-05sw_redlinehide_2: add unit test with char attributesMichael Stahl
Change-Id: I8c5de1f850e3e2dd879bf3ccbedb08615ef0bf44 Reviewed-on: https://gerrit.libreoffice.org/61375 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-05sw_redlinehide_2: add unit test with tableMichael Stahl
Change-Id: Ia0334e08fb70e04e75c1bb6fe1f00a451d4567e3 Reviewed-on: https://gerrit.libreoffice.org/61374 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-05sw_redlinehide_2: add unit test with sectionsMichael Stahl
Change-Id: Ic9957f0a0624da2086e9e1eaded5f3df879e8e9f Reviewed-on: https://gerrit.libreoffice.org/61367 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-05sw_redlinehide_2: import ShowRedlineChanges from flat-odt as wellMichael Stahl
In this case a generic ImportInfo property set is created in XmlFilterAdaptor::importImpl(), so the XMLRedlineImportHelper is responsible for setting this. Change-Id: I6ec7ab2bab3ee10a585af88effb74f465e4bbae1
2018-10-05sw: create RtfExport instances with an uno constructorMiklos Vajna
Change-Id: I08cbfa2b9ccc7bc1c5d1ebeb9e06238472b2fa26 Reviewed-on: https://gerrit.libreoffice.org/61393 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-05sw_redlinehide_2: add unit tests with fly frames in flysMichael Stahl
Change-Id: Iaf56bfc92fe3628c53d2426c9b955610d7dc4c5a Reviewed-on: https://gerrit.libreoffice.org/61261 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-05use std::unique_ptr in sw::IDocumentUndoRedoNoel Grandin
Change-Id: I504706ff1a3fc11a7a06ebe935f9dbc5323aefe8 Reviewed-on: https://gerrit.libreoffice.org/61369 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-05use more std::move in sw/Noel Grandin
Change-Id: Id2f063550db3a3110e4bae8e18d0e7b9a7bf5df3 Reviewed-on: https://gerrit.libreoffice.org/61368 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04sw: switch XAutoTextContainer to use user-dir filesThorsten Behrens
This amends 4967d498c486800b72ba34192c82c232bc0685bd to put .bau files into user dir instead of shared config Change-Id: Ic58b2cb10a62e90deebec9cd8d7dce5ef6218b43 Reviewed-on: https://gerrit.libreoffice.org/61387 Tested-by: Jenkins Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de>
2018-10-04weld SwCreateAddressListDialogCaolán McNamara
Change-Id: I9b8fa8ff001f82904db2478a6c88419294df2855 Reviewed-on: https://gerrit.libreoffice.org/61364 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-04weld SwFindEntryDialogCaolán McNamara
Change-Id: Ia45e4ce13b92fd73fcc8ad52233aa5eccc3cfb6d Reviewed-on: https://gerrit.libreoffice.org/61365 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-04weld SwAddRenameEntryDialogCaolán McNamara
Change-Id: I687486a392450fcf3b92fdc4d7a193b10f829835 Reviewed-on: https://gerrit.libreoffice.org/61363 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-04drop SvMemoryStream::GetBufferNoel Grandin
since it does the same thing as GetData() Change-Id: I18d35aa4e67ad7775987160c021863d0de90179b Reviewed-on: https://gerrit.libreoffice.org/61350 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04tdf#120287 sw layout, TabOverMargin: imply PrinterIndependentLayout=high-resMiklos Vajna
In case an ODT document has the usual layout compat flags enabled (by the DOC/DOCX/RTF imports) to emulate Word behavior, then it's expected that Word will lay out the resulting ODT document similar to Writer. This works most of the time, but in case exact spacing matters, it's important that PrinterIndependentLayout is not disabled, as that doesn't match the Word default and will result in mismatching Writer vs Word layout. Change-Id: I0fbe110a6417ffa5d919fb81236a60bfa1fc30f5 Reviewed-on: https://gerrit.libreoffice.org/61352 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-10-04loplugin:useuniqueptr in SwInsDBColumnsNoel Grandin
Change-Id: Idd159cfd29d487773e478a0cca352fcb77f88a33 Reviewed-on: https://gerrit.libreoffice.org/61340 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04loplugin:useuniqueptr in SwWriteTableColsNoel Grandin
Change-Id: Ib4c95401c3e9e60c1c909080b3381d652c862e62 Reviewed-on: https://gerrit.libreoffice.org/61342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04loplugin:useuniqueptr in SetGetExpFieldsNoel Grandin
and a couple more utility methods to o3tl::sorted_vector to make this easier Change-Id: Iebbbb8899b67fffa1ac98ae46b7fa70a7e35f866 Reviewed-on: https://gerrit.libreoffice.org/61344 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04loplugin:useuniqueptr in HTMLControlsNoel Grandin
Change-Id: I7301fdb1dba6f05b43b114cfb72641958322964d Reviewed-on: https://gerrit.libreoffice.org/61343 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04loplugin:useuniqueptr in SwSeqFieldListNoel Grandin
no need to store such a small structure separately on the heap Change-Id: I36b3ad5250718b7bdf526f5f67219740c69a549a Reviewed-on: https://gerrit.libreoffice.org/61298 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04loplugin:useuniqueptr in SwBlockNamesNoel Grandin
Change-Id: Ib7b0b206439b9b14cbfdf58bc8932281329e7deb Reviewed-on: https://gerrit.libreoffice.org/61346 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04loplugin:useuniqueptr in SwXMLTableColumns_ImplNoel Grandin
Change-Id: Iee894bccfc162bd97093def7eb86d54be9fde13d Reviewed-on: https://gerrit.libreoffice.org/61341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04related tdf#76683 writerfilter: hanging implemented as SignedJustin Luth
despite the documentation that states it must be a positive value, the actual implmentation honors a negative number (as opposed to treating it as a zero, or an absolute). Change-Id: Ie38369ecdf5353b73572dd3533c2efe41adda290 Reviewed-on: https://gerrit.libreoffice.org/59401 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-10-03Related: tdf#120277 inherit from SfxDialogControllerCaolán McNamara
where the dialog originally inherited from SfxModalDialog. Change-Id: Ibe0006de93b0a9f05fb3b6181baf3ba1b4cf04c8 Reviewed-on: https://gerrit.libreoffice.org/61313 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-03sw: py unit tests: EOL and VIM commentSerge Krot
Change-Id: I0ab569a4140a8f866e8022c97b4481a33454c8e8 Reviewed-on: https://gerrit.libreoffice.org/61294 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-10-03fix DOS lineendsThorsten Behrens
Change-Id: Ib6ec8c705beaf97293bd761fa74e66535733121e
2018-10-03no need to call empty() before clear()Noel Grandin
found with git grep -A2 -nP '!.*\.empty()' | grep -B1 -w clear Change-Id: I87013eab9c6988048b891d20577e1f7efbce1b6c Reviewed-on: https://gerrit.libreoffice.org/61295 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-03loplugin:constfields in swNoel Grandin
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f Reviewed-on: https://gerrit.libreoffice.org/61177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-03tdf#108064 OOXML export: keep preset dashes with mso preset linewidthsAdam Kovacs
Change-Id: Ie87544850c494d946ea43b984aeff8666e08d738 Reviewed-on: https://gerrit.libreoffice.org/60874 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-10-03sw: new unit test for XAutoTextContainerSerge Krot
Change-Id: I8c4fba4d576256c4ca3870b521aec999407af4e5 Reviewed-on: https://gerrit.libreoffice.org/60945 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-10-03weld SwSvxNumBulletTabDialogCaolán McNamara
Change-Id: I8ea74dc15bba04c0615e61c069407160a7b95c4c Reviewed-on: https://gerrit.libreoffice.org/61242 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>