summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2018-10-08tdf#58944 DOCX import: workaround for hidden table headersLászló Németh2-0/+17
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 Kovacs2-0/+15
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 Nitschke1-4/+2
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 Kelemen6-0/+6
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 Vajna5-2/+79
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 Vajna2-63/+63
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 Gelmini1-1/+1
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 Henschel1-0/+1
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 Raykowski1-1/+2
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 McNamara2-2/+0
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 McNamara1-14/+7
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 McNamara9-58/+66
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 McNamara3-3/+0
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 Glogowski1-1/+1
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 Grandin4-14/+8
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 Gelmini1-1/+1
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 Vajna3-1/+59
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 Stahl2-0/+344
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 Stahl2-0/+206
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 Stahl2-0/+198
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 Stahl3-3/+27
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 Vajna4-24/+6
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 Stahl1-0/+756
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 Grandin35-360/+318
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 Grandin6-19/+17
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 Behrens1-29/+37
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 McNamara4-108/+126
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 McNamara3-80/+57
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 McNamara4-46/+47
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 Grandin2-2/+2
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 Vajna3-0/+64
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 Grandin2-10/+7
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 Grandin3-21/+18
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 Grandin7-31/+24
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 Grandin3-6/+3
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 Grandin4-41/+34
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 Grandin3-13/+8
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 Grandin1-10/+7
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 Luth1-0/+1
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 McNamara17-29/+29
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 Krot3-0/+6
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 Behrens2-305/+305
Change-Id: Ib6ec8c705beaf97293bd761fa74e66535733121e
2018-10-03no need to call empty() before clear()Noel Grandin8-47/+20
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 Grandin269-856/+848
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 Kovacs1-0/+0
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 Krot2-0/+177
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 McNamara7-59/+213
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>
2018-10-03tdf#76683 writerfilter: TwipMeasure must be positiveJustin Luth2-0/+11
...and the column width must not be negative. The previous column logic ensured that the total width was larger than the reference by adding a fake buffer and then subtracted the difference from the final column. In the case of a zero-width final column, it could become negative. The current logic ensures that the total width is less than the reference width, and then adds the difference (which should be a smaller difference now) to the final column. Regression potential - early columns that need every single twip of bonus space might not fit anymore. On the other hand, ending columns might be fixed... Change-Id: Ie75d455e8ed62dbec5a1b9c901417df8d842ace8 Reviewed-on: https://gerrit.libreoffice.org/59400 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-10-03paintfrm white-spacing adjust: remove obsolete bracketsJustin Luth1-48/+46
doing this in a separate patch to avoid obscuring the changes inside of the other cleanup patch. This simply removes one layer of indenting. Change-Id: I295b2ef59fb8c62db14d18d2e529da6c4c578665 Reviewed-on: https://gerrit.libreoffice.org/61273 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-10-03tdf#41542 sw cleanup: m_bBorderDist was always trueJustin Luth4-26/+11
This was forced to True in LO 5.4, leaving the variable intact in case any problems arose that would make it easier to revert. But now it is time to clean it up and remove the unnecessary logic. I didn't change the indenting because I don't like obscuring the significant changes. I can do that in a followup commit. Change-Id: Iab04a6a8f4ba8ff7151cf7941f655173136258eb Reviewed-on: https://gerrit.libreoffice.org/61270 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>