summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2020-02-12clang-analyzer-deadcode.DeadStoresNoel Grandin
Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-12tdf#126700 allow replacing the default documentsJan-Marek Glogowski
Per default, a document opened by a user action will always open in a new frame. For tdf#83722, this behaviour was extended to documents created from templates. But this currently also affects the default factory templates, if these are replaced by a config setting with a real template, which was not intentional. So this patch introduces a new MediaDescriptor property, which allows to mark a document as replaceable and automatically sets it for factory default documents. If this property is set to true, a document just acts as a placeholder while it's unmodified. I.e. the next opened document from its frame will close and replace it. Change-Id: I45ffa8709f7cdda949fac78f3b363f120f0c4a03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88257 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-02-11UI test for tdf#128739Artur Neumann
cut, paste and undo with documents containing fieldmarks and bookmarks Change-Id: I4ee8edf061f7cdb08ae90bee32ac07b6a0980cc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84054 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-02-11make Base install via packagekit also confgurable (like fonts/langpacks)Rene Engelhard
Change-Id: I72f98e89d1c8e92f10da8e3843956658d035528d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87907 Tested-by: Rene Engelhard <rene@debian.org> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-02-11tdf#130494: DOCX import: limit paragraph-level character propertyLászló Németh
expansion for the whole table paragraph based on the last character context. regression from 2ab481b038b62b1ff576ac4d49d03c1798cd7f84 (tdf#90069 DOCX: fix character style of new table rows) Change-Id: I49da23c268436488ff1537771869c38108113c12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88199 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-11DOCX import: fix margins of inline shapes with effects, imported as Draw shapesMiklos Vajna
Effects have an extent, and unhandled effects (like this blurred shadow) need to take space in the margin of the shape to make sure they use the correct amount of space in the layout. This was working in general, but not in case the importer decided to import the shape as Draw shape + the shape was inline. (And also disable a new CppunitTest_sw_uibase_shells test on Windows, which is only stable on Linux, it seems.) Change-Id: I9d0531d9393d8c2cd274e6f54bbbfe8024bf270f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88427 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-11Writer Sidebar Wrap section update for better alignment and fitandreas kainz
Change-Id: I9bb3054f5e55346f09828e5ce7220445794c5880 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88411 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-02-11related: tdf#106742 sw: DOCX import/export: fix default of table indentMichael Stahl
There's a compatibilityMode in word/settings.xml in DOCX files: https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/90138c4d-eb18-4edc-aa6c-dfb799cb1d0d If a document doesn't contain compatibilityMode, then the default is 12, but the code for table indent import/export assumed that the default is 15, so loading an ODF document and exporting as DOCX results in wrong table indent when loaded in Word. (regression from 9a31d1c83e08600507689dc18f6f0973bc7e4389) Change-Id: I3ce32286473640e5b7e12b487aef5f123bfb8d12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88408 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-10refactor PostIt access to SwFormatFields in ...Bjoern Michaelsen
- SwTextShell::ExecField() - PostItManager Change-Id: I7eabf0a7d8170d0dacf3069925abfe1a91a4a9f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88334 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-10weld SvxFmAbsRecWin item windowCaolán McNamara
Change-Id: I6a11d8ba226b28447e2ab04925090491d6953132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88348 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-10sw/qa: fix libxml2 parser error for testChineseMark Hung
in htmlexport CUT on Windows with tradtional Chinese as the system locale. Libxml2 complaints about encoding: Entity: line 2: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xB4 0x49 0xA4 0xE5 - By default SvxHtmlOptions::GetTextEncoding() uses SvtSysLocale::GetBestMimeEncoding() to decide the decoding, where osl_getThreadTextEncoding() is used. That results in big5 if you're using Windows with tradtional Chinese as the system Locale. - libxml2 expects the xml begins with "<?xm", and guesses the encoding based on first 4 bytes of the content. So it always falls back to utf8 in our test. Change-Id: I48be9bf552ab6ea76f8baea7e48a8c02a7e8c2cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88260 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-10sw: prefix members of SwExtTextInput, SwLineNumberInfo, SwWriter and ...Miklos Vajna
... SwgReaderOption See tdf#94879 for motivation. Change-Id: Ib44eaa1adbc731499d22b0bf538380b8bc0cc4eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88357 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-10tdf#90834: Turn in-line version control comments into good commentsPelin Kuran
Change-Id: I366badf234f00536cd208a516eff9667f99d2f86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87719 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-10sw: DOCX export: fix rotated text fieldsMichael Stahl
The rotation works in RTF export and DOC export, but not DOCX. If a text field is rotated via SvxCharRotateItem, the w:eastAsianLayout element gets written on the run that contains the fldChar begin, but not the subsequent 4 runs that are written via DoWriteFieldRunProperties(), because it doesn't write m_pEastAsianLayoutAttrList. It's not clear why that function manually writes a subset of the run properties instead of simply calling WriteCollectedRunProperties() to get all of them. Change-Id: I6d8cacda4b62a6f6fdc77885149e7de8666e7200 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88196 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-10tdf#130262 ignore negative wrap distance values in doc prop importPatrick Jaap
Change-Id: I2c06b12c958dfde09adcc2ae4c59532ffde6b6fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88127 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-10use FindFormatForField some moreBjoern Michaelsen
Change-Id: I96dc7599d755c035d4079d1bbe6b6c21201034d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88335 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-10Remove unused variable sWordMuhammet Kara
Change-Id: I56e7c23ae309df112392327a381a4104091222be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88351 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-09Simplify SwTableField::GetNodeOfFormula()Bjoern Michaelsen
... by using the new SwFormatType::FindFormatForField() Change-Id: If0492ca04ed836d89bcfcc56572859ba04e084b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88273 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-09Fix typoAndrea Gelmini
Change-Id: Ice5f07206708b688f76110fab996717118f95d0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88339 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-09Current color isn't highlighted in the table cell background toolbar dropdownMaxim Monastirsky
Change-Id: I32e29d8697a5b6ba914b7ccc030e840b31c38b74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88307 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-02-08Resolves: tdf#130513 sfxlo-OptionalBox isn't in sfxCaolán McNamara
its in vcl not sfx, so under windows its not actually created by the builder as the factory method isn't found in sfx. While under linux the method is found anyway despite the wrong lib name. seeing as its in vcl, keep it there. The factory method isn't needed when its in vcl and rename the .ui name to VclOptionalBox Change-Id: If279477d2e4cbb50d202d528c293b471134de30c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88279 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-08introduce SwFieldType::FindFormatForField and use it (once)Bjoern Michaelsen
Change-Id: Id7136b936c0585e7013f3d06ad97436b51522da3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88264 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-08tdf#130475 Remove mysterious grab focusJim Raykowski
Grabing focus at this location in SwFormatTablePage::DeactivatePage prevents adjacent tab pages from keeping focus on their tab when keyboard navigating the dialog. Change-Id: Ie90722572569ac0cd5251682a19727c91e2a326d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88162 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-08tdf#130482 sw: fix text alignment in shape textMiklos Vajna
Regression from commit a3c7a8282ddd08c7ed4a15d23089d09e418f8fae (jsdialogs: apply .uno:Color and CharBackColor to floating text frames, 2019-11-08), the problem was that the original code populated aNewAttr, while SetAttrToMarked() was only invoked in case there were arguments. Fix this by making pNewAttrs a copy, so lcl_convertStringArguments() can work on it in place, and then restore the old code that copied from pNewAttrs to aNewAttr. This fixes the no-arguments case and keeps the lcl_convertStringArguments() case working. Change-Id: If7bf2d7b21e48d513a512ec6127b61ee74635ef5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88227 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-07DOCX export: fix handling of section starts that originally had page marginsMiklos Vajna
This is similar to commit 26f2a9e1a10a22e864e71ee7c94934821703e021 (DOCX export: fix handling of section starts that originally had headers, 2020-02-06), except here the top margin has to taken from that follow page style, not the header. Without this, it can happen that the page number in the original Writer doc model and the exported Word result do not match. This required reworking WriteNextStyleHeaderFooter(), which assumed that the header/footer status is already calculated by the time its called. But the page margin code runs earlier, so we need to make that decision earlier, even when the header/footer status is not yet calculated. Change-Id: Ife7396603702d2048d544aa46f96acfa337a041a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88211 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-07SwFormatField::Modify no more (folded into SwClientNotify)Bjoern Michaelsen
- refactor out field formatting * make direct calls explicit with new UpdateTextNode() call * try to bring at least some sanity to the event handler Change-Id: I40a39ddf70476b7fa0bf5e157fb263e863bb1d20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87927 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-07tdf#130380 Chart: Fix area chart data labels positionTünde Tóth
Regression from commit: f8966bb398cf0623be841c618b123866801a063c (tdf#130031 Chart OOXML import: fix area chart data label position) Change-Id: Iafcbacb0ecf6f8a175adbf0782ee3e3a1185a726 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87881 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2020-02-07rename GetBaseOfstForFly->GetBaseOffsetForFlyNoel Grandin
Change-Id: Ieeeaa53d916e192e7219d7d3d405584a22249e7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88181 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-07tdf#123873 DOCX IMPORT: fix unhandled textwrap for objectsBakos Attila
The OLE objects (in this case charts) had bad wrap option setting and this lead to misplaced objects. Now this parameter is set according to the file. Change-Id: I506be91b6801f0ffc3942e514f81119d895fdcb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88091 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2020-02-07sw: fix misnamed m_IsFootnoteInfoMichael Stahl
Silly copypasta in f3bb701223953df02f005b98d2eee13e82016bd7 Change-Id: Idf20017a7eb180e6a9f429e6976cea8c13cff066 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88194 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-02-07tdf#99693 Add Highlighting tab for WriterMaxim Monastirsky
Works with shapes and comments. Change-Id: Ic2e4b3cf7decce493426bed1ec077cc97ea17bb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88173 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-02-07weld URLBox ItemWindowCaolán McNamara
Change-Id: I7dad000404a188e2f5588b90d73ea9b1236bd301 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88183 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-07Fix typoAndrea Gelmini
Change-Id: I44241cf4c81543ad2a3091e3b19639f63e016cd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88193 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-07weld SwZoomBox_ImplCaolán McNamara
Change-Id: I3cf7046eeb5bf58afc8d1db06fd50d42c6131d40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88145 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-07remove unnecessary includeCaolán McNamara
Change-Id: I205966f40472d187c63717ddf6e8153584c6b284 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88141 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-07weld SwJumpToSpecificBox_ImplCaolán McNamara
Change-Id: I4c140bccf821b6ee0ce0e734cebae722267f5430 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88140 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-07sw: improve DOCX export of footnote separatorMichael Stahl
Don't only check the width of the line, but also the line style and the thickness (0 is not visible). Also there isn't a separate continuationSeparator in sw, so it should depend on the same condition as the separator. Unfortuantely Word doesn't support different separators per section. Change-Id: I55cb3d82ff20c7a21f7d256ec8ba4a43f1e71faa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88131 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-07test: move component context from subclasses to BootstrapFixtureMiklos Vajna
To avoid duplication. Change-Id: I0ee7c26d5d55bd868ead04c77e7f4ef2582f90e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88138 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-07remove use of macro DeclPrimitive2DIDBlock in everywhereTomaž Vajngerl
Change-Id: I3fcba604ee3bc95274700ae7406f27e292cd09ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88154 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-02-06DOCX export: fix handling of section starts that originally had headersMiklos Vajna
Both the DOC import (in wwSectionManager::InsertSegments()) and DOCX import (in SectionPropertyMap::CloseSectionGroup()) have a mechanism to try to attach changed headers/footers from a continuous section break somewhere, so they are not lost. This means that even if the rendering of such documents is OK, explicit code is needed to undo the effect of the importer at export time, or those headers will be lost. Start doing this for the DOCX export case when the headers/footers are placed at the "previous-in-practice" paragraph, more cases (handled at the import side) can be added later. Change-Id: Ic2304a74919d18da3ba9cb4afe301e0247a50dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88103 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-06the svtlo-FontNameBox entries are hiddenCaolán McNamara
and nothing interacts with them so they can be removed from the notebook .ui without effect Change-Id: I85e46ee8539e83776c4ce107a715d9eeccf6222c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-06tdf#129881 missing sections in link sectionNoel Grandin
actually this is a regression from commit 2b77d9dba51e1c3841428f3343e9186ca9c446ae Date: Wed Nov 6 11:19:12 2019 +0200 convert SwXMLSectionList to FastParser the commit mentioned in the bug report was fixed by caolan, and then I broke it again with the above commit Change-Id: If6d3dad7baadcdfcc73d87d1e9d6a91c9f65a6e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-06cid#1458160 Dereference before null checkCaolán McNamara
since... commit 6e2ed4ea934851f82611c3352b9551046fda89d0 Date: Mon Jan 20 11:55:02 2020 +0300 sw: set unique name for fontwork object and style on insertion Change-Id: I0030425c77bba9a8fe720002114c2b9076c93c4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88078 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-06merge FillTypeLB with SvxFillTypeBoxCaolán McNamara
Change-Id: Ia6229e8cc04c88e6740a12648c50cf5efca3bbd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88067 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-06rename SvtFontSizeBox back to FontSizeBoxCaolán McNamara
Change-Id: I2ec0c6dd376f3a192a62dc97f7454af946e2a5ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88065 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-06sw: read-only/protected content dialog was missing on Delete/BackspaceMichael Stahl
If SwWrtShell::DelRight()/DelLeft() are called without an active selection, they select 1 character to the right/left, but then they don't check if the selection is read-only, so then SwEditShell::Delete() calls HasReadonlySel() and silently returns. Pop up the dialog in this case too, for consistency. Change-Id: I3d72f136f4d132de3f8a6f3cc2aab493ced95a28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88055 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-06tdf#45589 sw: don't paint field shading for bookmarksMichael Stahl
Maybe it looks better without. Change-Id: Id603fbef361574cafbe2ec9f625ac54fea27a0f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88039 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-06drop newly unused FontSizeBoxCaolán McNamara
Change-Id: I8a84ce74888e1d3c468251ddd3633aedf6339a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88064 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-06the "grouped" notebook svtlo-FontSizeBox's are all hiddenCaolán McNamara
they don't appear in the notebook and there is nothing actually using them Change-Id: I570f156e937f1cbc12620da17d684e66c063425f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88062 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-02-06rename SetOfst -> SetOffsetNoel Grandin
Change-Id: Ic33454dbbbe9c189eb5eebda2c25c6cff3251c84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88027 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>