summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2020-01-25tdf#130137 Replace remaining uses of WNT define checks with _WIN32A_GAN
Change-Id: If95f1ea5a81de62eb4f725e5fcb30ccb8530062a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-25Related: tdf#128942 remove the scrolledwindow frames from all the dialcontrolsCaolán McNamara
Change-Id: I445753ad1eb4d441e5a5e909ae450bda6013a6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87352 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-25Change some #define to constexprStephan Bergmann
...plus loplugin:unnecessaryparen fallout in sw/source/uibase/docvw/edtwin.cxx. Each of the files contained at least one #define that would have caused warnings with upcoming loplugin:unsignedcompare. For consistency, I changed all #defines in those files (using a variable of a specific type if the original #define used a cast to that type, otherwise using 'auto'). Change-Id: I66f71b2d83394c9dc6952ae19df774cdd4d0b76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87374 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-25tdf#129423: Make export tests export-only where applicableShivam Kumar Singh
Change-Id: Iff36608e3f1d643175e47a96333df4cb80a88064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87209 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-25tdf#130155 Writer Navigator crash fix: Check entry to expand has childrenJim Raykowski
Fixes crash/freeze when an entry without children is sent is to SwContentTree::Expand. It forwards to SvTreeListBox::Expand deal with it. Change-Id: Icd3cd1b2d0a949e01a3e02a6fa4cdc08610c8ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87307 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-01-24tdf#130096 Wrap Sidebar update use common .uno commands and layoutandreas kainz
Change-Id: Ie8185169582616179fd96850283836f4e3d60ad1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87309 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-01-24loplugin:makeshared in swNoel Grandin
Change-Id: I6b297b84edda441c4ec6ea9f89ed553a50783bf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87356 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-24DOCX export: fix line spacing when spacing is 0Miklos Vajna
When the input was: <w:pPr> <w:spacing w:line="0" w:lineRule="atLeast"/> </w:pPr> Then we used to write: <w:pPr> <w:spacing w:lineRule="auto"/> </w:pPr> which is clarly wrong. The comment at the end of AttributeOutputBase::ParaLineSpacing() documents the intention reasonably clearly (and is in sync with what's in the DOC and DOCX spec), adapt DocxAttributeOutput::ParaLineSpacing_Impl() accordingly. Change-Id: I60cbc3392a6460ba2760b2c02ae0755726478ec1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87351 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-24Revert "lok: ui: more files to increase the 'step-increment'"Miklos Vajna
This reverts commit 0a64b33617299ece871a947828855b16e2482706. Let's revert this till it's clear how to fix UITest_writer_tests2 to not hang with these changes. Change-Id: I9b40b101ecdad0ccac9a0b52b6a2ef19bd47a38c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87333 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Henry Castro <hcastro@collabora.com>
2020-01-23sw DoNotCaptureDrawObjsOnPage: don't capture wrap-through Writer images, eitherMiklos Vajna
This compat flag was originally added in commit 7961b14c4f9f00696b241e5ad9bf9ba18041fe22 (INTEGRATION: CWS swdrawobjpos203 (1.12.54); FILE MERGED, 2006-03-22) for compatibility with OOo 1.x. Later commit af313fc149f80adb0f1680ca20e19745ccb7fede (tdf#105143 DOCX import: enable DoNotCaptureDrawObjsOnPage layout compat option, 2017-01-06) also turned it on for DOCX documents. One overlooked difference was that the compat flag disables "capturing" of draw objects only, but not wrap-through Writer images. The DOCX case wants the same for wrap-through Writer images as well, since Word does no capturing in either case. Fix the problem by disabling capturing for wrap-through Writer images as well; if this turns out to be too problematic, we can have a dedicated compat flag just for OOo 1.x documents, but that comes at some cost as well. (Need to write the new compat flag to each & every new ODT.) TextBoxes are handled separately (see testTDF91260 in CppunitTest_sw_ooxmlexport8), so leave their handling unchanged. Change-Id: I74f434ed7518d7784c7cba085deb6ff8baf1770a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87289 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-23tdf#128782: Add UItestXisco Fauli
Change-Id: I389d05fa9b1e79af2c01abd920fb4454b96543fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87282 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-01-23lok: ui: more files to increase the 'step-increment'Henry Castro
property to 5. In mobile view, touch spin button should increment by 5 Change-Id: Ib3c8966443d053ab0588fa0c124f0daae31b7ed8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86844 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86854 Tested-by: Henry Castro <hcastro@collabora.com>
2020-01-23weld SvxFontWorkDialogCaolán McNamara
Change-Id: If9da7ad6a834d22f1bcab8d41ce7fe1f80168946 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84774 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-23sw_redlinehide: fix SwScriptInfo hidden textMichael Stahl
A missing update of nOffset in SwScriptInfo::InitScriptInfo(); it must be updated for every extent but it's not for the last one in a node. test case: ab cd Delete "bc", hide "d", but "a" disappears. (regression from 0e26d48ad7f18deac8447a306215f79d5c62be27) Change-Id: I99fb88409e184a61866f908722b4430a53914153 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87201 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-01-23no need for repetitive GetShell()->GetWin() callsCaolán McNamara
Change-Id: I2c0a136db685e67b5981a0162619521d7f2070cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87216 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-23tdf#42949 Fix IWYU warnings in sw/source/ui/[c-u]*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icf4e6f8ea7c751c8d068dbde50ea1b4726d565d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87004 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-22flush out unused MapModesCaolán McNamara
Change-Id: I691143162bf9a26171f3ede3bded34c7fb985244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87207 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-22sw doc model xml dump: show all compat flagsMiklos Vajna
This is handy when they are not in the source document, e.g. DOCX or older ODT and newer compat flag. Change-Id: I62d6623bbe82fca454139ca892929b39fca68dfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87198 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-22rework line style to be a wide toolbar buttonCaolán McNamara
involves converting SvxLineStyleToolBoxControl to a PopupWindowController because chart is doing interesting things in its panel there needs to be a non-standard way to report/detect the selected line style, which is then reused to disable/enable the arrows when none is selected/deselected in non-chart sidebars SvxLineBox becomes a toolbar dropdown instead of a combobox itemwindow linectrl.cxx split into linewidthctrl.cxx and linewidthctrl because SvxLineBox is now needed in svxcore Change-Id: Icf0ef5e612b894a43d389af8a2908138c2e9c580 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87164 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-22tdf#77419 DOCX table import: ignore right white spaceLászló Németh
in table paragraphs in MSO 2010 compatibility mode. Change-Id: I99f11c6a9f7a5735cce06fac433d5acab704cb04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87136 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-01-22use fastparser in SwXMLBodyContext_ImplNoel Grandin
Change-Id: I0745fb6eb0a46b1c564cd0f1c596aed5206549b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87181 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-22tdf#129382: sw: assign names to shape object stylesVasily Melenchuk
Empty style names for drawing object will cause problems with udo/redo which right now refers style names instead of style pointers. Change-Id: If2266f1db04c624dbfdd716b5599d5f6cbb5371e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86520 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-01-22use fastparser for XMLFontStylesContextNoel Grandin
Change-Id: I7b273cdc0f90f2a8c9527d1f19fed97672a74741 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-22sw: add DOCX export for semi-transparent textMiklos Vajna
This is the case when the value is not in the grab-bag, that was already supported. Change-Id: I334333ec441644229540a358d7bf8811373618c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87162 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-21use more FastParser in SvXMLStylesContextNoel Grandin
Change-Id: I05c7314739246a864b16723c13bd8fbb4ef725e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87146 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21Use FastParser in XMLDocumentSettingsContextNoel Grandin
and flatten the pImpl data Change-Id: I8d817cd2af0a3855d10dbfaa580c3379119d5067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87126 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21tdf#103983 VML import: handle <v:textbox style="mso-fit-shape-to-text:t">Miklos Vajna
We used to always always set TextAutoGrowHeight to true, only do that when the matching VML attribute is detected, default to false. This helps the exporter, so it writes the correct markup on save of the bugdoc. Also adapt testGroupshapeChildRotation, which in practice tested the automatic height of the shape. The point of "auto" is that it changes as needed, hardcoding that value in a test is not a great idea. Rather test that the height is no longer automatic (there is no explicit markup in the file, and the default is false). Change-Id: Ie39408b7da53f4923a2ade503e520c704a86bcf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87104 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-21use FastParser in XMLScriptContextNoel Grandin
Change-Id: I7c5f5b77a78307c556ee5718480346ed3dd159fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21sidebar writer table spacing fixandreas kainz
Change-Id: I3dd805f69c9357e9f2b5d773e1a2842f44af5470 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87105 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-01-20tdf#129582 sw: fix copying of flys in header/footer in DOCX/RTF importMichael Stahl
The problem is that the exception for writerfilter in IsDestroyFrameAnchoredAtChar() and IsSelectFrameAnchoredAtPara() is wrong in the case when the header/footer content is copied via SwXText::copyText(); that is, previously the situation was that writerfilter relied on Delete not deleting such flys (for RemoveLastParagraph) but Copy copying them. (regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5 and e75dd1fc992f168f24d66595265a978071cdd277) So restrict the writerfilter hack to delete; this causes a problem with ooxmlexport9 test testTdf100075: it has 2 flys anchored at the same paragraph; writerfilter will insert the content into the body and then convert to fly; when the 2nd one is converted it will copy the 1st fly and anchor it inside the 2nd fly but then unotext.cxx:1719 will reset its anchor to inside the body... Prevent this unwanted copy by relying on the new parameter bCopyText that was introduced in 04b2310aaa094794ceedaa1bb6ff1823a2d29d3e, but change things a bit so that the case that pass in the extra flag isn't the copyText() one that wants the *normal* selection semantics in writerfilter import, but the 2 known places that want the *exceptional* selection semantics in writerfilter import (hopefully there aren't more). This is not ideal and the various bool parameters to CopyRange() plus mbCopyIsMove plus mbIsRedlineMove should probably be consolidated into some flags enum passed to CopyRange(). Change-Id: I638c7fa7ad0b4ec149aa6a1485e32f2c8e29ff5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87072 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-01-20StoreUserCustomValues should be usedCaolán McNamara
Change-Id: I64d41d297c55d36fc14f16945fa1369be990aa3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87074 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ie5e90b3c834a1154ec49dc765a5031f6bdd35923 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87070 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-20tdf#128814 Make Writer Navigator context menus content specificJim Raykowski
Remove content type submenus and place submenu items in root menu Display Outline Level in Outline context menu only. Add Delete/Promote/Demote Chapter and Promote/Demote Level to Outline context menu. Add Rename... to Drawing Objects context menu. Change-Id: I39327d0ed02ab1ee88361e2d6a140ad118e069d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87053 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-01-20sw: fix assert in ToX update on mw00_table_of_contents_templates.docMichael Stahl
... exported to RTF and re-imported: soffice.bin: sw/source/core/txtnode/thints.cxx:1295: bool SwTextNode::InsertHint(SwTextAttr*, SetAttrMode): Assertion `!pAttr->GetEnd() || (*pAttr->GetEnd() <= Len())' failed. The problem is that the text of a HandledTextToken is all whitespace and a hint from 0 to 1 is inserted because mNewPositions.back() is erroneously 1, no idea why it was doing that. (regression from e5345f62bf525b6258736f1ce11a61b5e638e0ff) Change-Id: I6ec290abe50c0f65a3244f0f0bb07e19741e878b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86996 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-01-20sw: prefix members of SwEndNoteInfo and SwFootnoteInfoMiklos Vajna
Change-Id: Ie952701e6cb65cb0d5789b4f98005872286a41ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87052 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-20Simplify getting ISO 8601 date stringMike Kaganski
Change-Id: If381276990199e4459787ffea090f342241237f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87037 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-19tdf#128290 add tblLayout element to docx exportLouis Meyrat
This will disable the automatic table width feature of MS Word, which does not exist in LO. Now, tables in LO-generated docx have the same column width in MS Word Change-Id: I955c8e5667376475e7c41e3b74d88e3513fec561 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86671 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-18tdf#129423: Make export tests export-only where applicableKemal Ayhan
Change-Id: I90e9c8e199ae0e7d6e8f63b3f425847b3f5779d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86574 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-18tdf#130066: reset calendar to today for word completionMike Kaganski
Change-Id: I8a9c34fb0ae9174cace0df25b6b233ae3e0a3af6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87008 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
2020-01-18do not reuse common PCH if switching to Objective C++Luboš Luňák
In those cases gbuild detects flags mismatch between the PCH and the source files (-x objective-c++ -fobjc-exceptions). Change-Id: I88d456f59f95afaf60e252e07151ece6667ed51b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87016 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-18Fix typo in codeAndrea Gelmini
Change-Id: Ic464f818204af4d5e0d6d1a0b1c29cac620f6250 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86588 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-17Resolves: tdf#130045 dial control frame not hidden along with the controlCaolán McNamara
Change-Id: Idcdf3d748849fbe1ba1a6cce278373e349ba1e5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86967 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-17can restore this test againCaolán McNamara
Change-Id: I82f5e8f9ce88d5662d391b0635dfc91b25d6126a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87000 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-17limit table spinbuttons width for sidebarCaolán McNamara
to the same width as the paragraph sidebar spinbuttons Change-Id: I980545b4186b25cb5ada473095ece8c77f99420a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86992 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-17ofz#20169 Integer-overflowCaolán McNamara
runtime error: signed integer overflow: -2147478239 * 127 cannot be represented in type 'int' 72 points in an inch, TWentyInPoint TWIPs in a point, 1440 twips in an inch, 25.4 mm in an inch Change-Id: I4ea1c524cd9a16ab6e58ccf2a19fb8e41d68ffe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86955 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-01-17show degree symbol in DialControl linked spinbuttonsCaolán McNamara
Change-Id: I792755f043109173606a78e947d5dc01f78c6849 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86982 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-17tdf#126795 docx export and TabsRelativeToIndent: added unit testSerge Krot
Change-Id: I233a40133392757978b27666853a1fcef2e00a07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86878 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-01-17Clean up duplicated command dispatch test functionalityMiklos Vajna
Used in both Writer and Calc at 5 different places, so host it in unotest/. Change-Id: I013e6df471deb8693cf4ae62f0958b12e16fda7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86972 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-17weld SvxFrameWindow_ImplCaolán McNamara
which makes .uno:SetBorderStyle in sidebartableedit work again Change-Id: I51faa21530171a47ee78863ddb312e1d9996326c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-17tdf#129924 critical fix: use SvxColorItem instead of SvxBrushItemSerge Krot
Change-Id: I09b1e9fe53315974864c8d6947c7cb861f069a68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86953 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>