summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2019-02-11sw: prefix members of SwDBManagerMiklos Vajna2-116/+116
Change-Id: I36c02de94bd7fcbf06e53ce930b6b0e850f2ae31 Reviewed-on: https://gerrit.libreoffice.org/67667 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-11tdf#116851: some rtf files provide param with "-" for "edmins"Julien Nabet1-0/+217
Change-Id: I2a2a189ee727a51aeef5601b39bb288d813fc8f3 Reviewed-on: https://gerrit.libreoffice.org/52610 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-11tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski8-38/+19
Change-Id: I4449fead67459bdcbdc0e9320129e7a5b36aecd9 Reviewed-on: https://gerrit.libreoffice.org/67545 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski2-2/+2
Change-Id: I62cb3b8927d664b3d5359ee6ac7db30d354f4821 Reviewed-on: https://gerrit.libreoffice.org/67496 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski9-35/+20
Change-Id: I67462369d93e9d9ff3c056800947c4b75f71ba5f Reviewed-on: https://gerrit.libreoffice.org/67486 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11using ScopedVclPtr with StartExecuteAsync not goodNoel Grandin1-4/+5
Which doesn't actually make much of a difference in this case because this is a welded dialog, which currently does not preserve a VclPtr owner of such dialogs. Perhaps we should rather fix the SfxTabDialogController::runAsync infrastructure to temporarily (a) preserve an owner for such dialogs (b) disposeAndClear such dialogs at least until we are done with welding? Otherwise this is very confusing. Change-Id: I568eb6813925299663ac3f90749b64076d404d19 Reviewed-on: https://gerrit.libreoffice.org/65708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-10loplugin:indentation in swNoel Grandin144-494/+505
Change-Id: I4936284bff568b6bb47e5df3821f4ddd78260e92 Reviewed-on: https://gerrit.libreoffice.org/67568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08Initialize some OUString with proper valueMatteo Casalin1-4/+5
Change-Id: I2f5676e9973d476aa709f9dfb4a903b09edaafeb Reviewed-on: https://gerrit.libreoffice.org/67336 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-08Replace always true condition with a more likely oneMatteo Casalin1-2/+2
indexOf is always lower than string length since "not found" is encoded as -1. Original code works correctly anyway since the "not found" case lead to copying the whole string, although this copy is completely unnecessary. Change-Id: Ic5dd995dd0c3f974c77b5bf209ad5e994b044385 Reviewed-on: https://gerrit.libreoffice.org/67320 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-08Use indexed getToken()Matteo Casalin1-3/+4
Change-Id: I3c1df346c56bfbd6e885b5ddb78ac3162a8bc32e Reviewed-on: https://gerrit.libreoffice.org/67327 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-08Use indexed getToken()Matteo Casalin1-7/+8
Change-Id: I1fa06283b3c1857c81ec320b98db857a42e91bca Reviewed-on: https://gerrit.libreoffice.org/67333 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-08Use indexed getToken()Matteo Casalin1-2/+3
Change-Id: I7ba78cc8ecf7d2ecface0e69dcacc9bae869c7e6 Reviewed-on: https://gerrit.libreoffice.org/67335 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-08Use indexed getToken()Matteo Casalin1-2/+3
Change-Id: I8ab1c2956739c9b63de807176ca0e3a640d3961f Reviewed-on: https://gerrit.libreoffice.org/67325 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-07tdf#123032 sw, AddVerticalFrameOffsets: fix shape pos after mouse moveMiklos Vajna2-6/+28
Regression from commit 50223ea6e212b60b7d33839c2753c5601fb50f95 (tdf#98987 sw: add AddVerticalFrameOffsets compat mode, 2016-03-31), the problem was that vertical position of the shape was wrong after mouse move, even if we attempted to take fly frames of the paragraph into account. (Similar situation is when saving and loading the file; which is much easier to test.) Fly frames are created as the text frames is formatted, and then SwTextFrame::CalcBaseOfstForFly() can calculate the vertical offset correctly. But in the "move with mouse" case SwToContentAnchoredObjectPosition::CalcPosition() was invoked by the time the old flys of the text frame were already removed, but the new ones were not yet added. Solve the problem by formatting the text frame from SwAnchoredDrawObject::MakeObjPosAnchoredAtPara() (if any of its validity flags are set to false) -- this is expected to be safe, as the object formatter is invoked by SwLayAction::FormatContent(), i.e. there is no recursive SwFrame::Calc() call here. Change-Id: I95851874e3da3f50f304421537c6743e04bdfc7b Reviewed-on: https://gerrit.libreoffice.org/67490 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-07The WindowName param to WordBasic.AppMaximize() is optional and must be an AnyTor Lillqvist1-2/+2
Change-Id: I52d75427fe30945293f347e3f49d21bc2016edae
2019-02-07The parameter to WordBasic.AppShow() is optional and thus has to be an AnyTor Lillqvist1-2/+2
Change-Id: I134101d1be5922051e34352331a49f5706030ff2
2019-02-07[API CHANGE] Synchronize supported Writer document zoom rangesStephan Bergmann1-1/+1
On the one hand, SvxZoomSliderItem/SvxZoomSliderControl as used by SwView's SID_ATTR_ZOOMSLIDER support a range from MINZOOM (20) to MAXZOOM (600) (defined in sw/inc/view.hxx). Setting a zoom value outside that range for one causes the DBG_ASSERT "Looks like the zoom slider item is corrupted" in SvxZoomSliderControl::StateChanged (svx/source/stbctrls/zoomsliderctrl.cxx) to fire, and for another (when setting a too small value) tries to assign a negative value (which wraps around, and gets flagged by Clang's -fsanitize=implicit-signed-integer-truncation) to sal_uInt16 nCurrentZoom at nCurrentZoom = nCurrentZoom - mxImpl->mnMinZoom; in SvxZoomSliderControl::Zoom2Offset (svx/source/stbctrls/zoomsliderctrl.cxx). On the other hand, SwXViewSettings' support of css.text.ViewSettings' ZoomValue property allowed values in the range from 5 to 1000 (cf. SwXViewSettings::_setSingleValue in sw/source/uibase/uno/unomod.cxx), and some JunitTests actually set such values (10, 15) below the MINZOOM value of 20. The incompatible 5--1000 range was there ever since 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import", but looks rather random, so change it to match the 20--600 range instead. (And lets flag this as an [API CHANGE], to be on the safe side.) One of the JunitTests files that needed to be adapted, qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java, oddly mentioned a zoom value of 130% in a comment while using the value 15 in the actual code. (And did so ever since the test code's introduction in 26ebdfc472be16f0eb4110aab0335666d2ba5e62 "NEW: initial version".) Changing the code to 130 would cause JunitTest_sw_unoapi_1 to fail in strange ways, with disposed UNO objects, while changing the code (and comment) to 21 appears to work. Go figure. Change-Id: Id944ffdce501448312e008436e7038bf2aec63ac Reviewed-on: https://gerrit.libreoffice.org/67427 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-07o3tl::make_unique -> std::make_unique in swGabor Kelemen106-368/+270
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I871312c1077439377c67b76112f38b7019fa6fb1 Reviewed-on: https://gerrit.libreoffice.org/67376 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-07complete the univerbation of E-mail to Email in the uiCaolán McNamara12-22/+22
it now looks old-fashioned hyphenated Change-Id: I5b2b905277356c1b986f97de29f82ac1c21b1709 Reviewed-on: https://gerrit.libreoffice.org/66796 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-02-06Remove useless const_castMike Kaganski1-14/+8
Change-Id: I3f8fa4bafd5b3ff5eb549076db16cb73a5dde7e0 Reviewed-on: https://gerrit.libreoffice.org/67458 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-06Enhance tagged PDF export for a11yArmin Le Grand4-20/+35
The current tagged PDF export does not well support quite some internal structures. This includes all apps (Draw/Impress/Writer/Calc) and some areas. -= AlternativeText ('/Alt'): Only writer currently at least adds Title information, but we also have Description (MS does add) and Name. Target is to add this information when available to content frames. Writer did that by manually adding that tag using PDFExtOutDevData::SetAlternateText, but only used Title so far. To make this work as broad as possible, better add this to primitives. There is already a primitive called ObjectInfoPrimitive2D that encapsulates any content adding Name/Title/Description using GroupPrimitive functionality. Changed Writer to use that way. Draw/Impress already uses it, all apps now use graphic paint using primitives, so we have a natural target to encapsulate. Add support to VclMetafileProcessor2D to interpret it and add - if mpPDFExtOutDevData->GetIsExportTaggedPDF() - that data using a combination of Name/Title/Description and add using mpPDFExtOutDevData->SetAlternateText. This works for Draw/Impress/Writer, but not for Calc because Calc does not create more complex data structures, so SetAlternateText does not work (see PDFWriterImpl::setAlternateText for more infos). -= Area tagged ListContent (use 'L', 'LI', 'LBody' PDF tags): To support this in Draw/Impress, we can also use a similar way to support in primitives. For this I evaluated how to add needed OutlineLevel information to the existing (and already used to write 'P') TextHierarchyParagraphPrimitive2D. Added this and now ready to use in VclMetafileProcessor2D ::processTextHierarchyParagraphPrimitive2D. Added now using the OutlineLevel information at the TextHierarchyParagraphPrimitive2D. Made sure there are fallbacks to unchanged old behaviour when no PDF export or no Tagged-PDF used. Creating now '/L', '/LI' and '/LBody' statements as tagged PDF wants us to do. Exported PDF still works well while additionally a verifier as 'PAC 3' shows the expected and wanted structure. This will work now for any text in Draw/Impress and for Draw-Objects using Lists in Calc. Need to check for direct text in Calc cells and Writer - and guess how big the effort would be for these to make it work there, too. -= Area '/Artifact': Target is to avoid too much ScreenReader hassle when Impress uses Pictures/FillPatterns etc. in Background - what means on MasterPage in Impress. Experimented with different possibilities. Decided to use existing StructureTagPrimitive2D and extend for info if encapsulated data is 'Background' data -> on MasterPage. Can be created in ImplRenderPaintProc in method createRedirectedPrimitive2DSeque as needed by checking for MasterPage member (remember: primitives need to be as independent from model data as possible, never include e.g. a SdrObject reference in any way). Tried different ways to use this in VclMetafileProcessor2D processStructureTagPrimitive2D, see comments there. Current best solution is to just *not* create StuctureTag information for these objects. Change-Id: Ib2a578b02c1256758cda6d15ce37799803d8205c
2019-02-06Resolves: tdf#123163 avoid null derefCaolán McNamara1-3/+4
one RemoveDrawObjFromPage is already null-deref protected, do the same for the other Change-Id: Ica5bb2df4a8dbffd8397df76b673adab75bb7aef Reviewed-on: https://gerrit.libreoffice.org/67452 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-06tdf#123194: sw: change used filter for .dotx exportVasily Melenchuk1-1/+1
Now it is "Word 2007-2019 Template" and not "Office Open XML Text Template". Export implementation is focused more on MS variant, rather than OOXML. This is follow-up fix for 0932e4bb9a4e4a25be092dcf87a0119d1894ac30 Change-Id: I30b99bf73c20a3be27c62ca5d871f54b1032efc1 Reviewed-on: https://gerrit.libreoffice.org/67438 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-02-06Ignore RuntimeException in Application.WindowState setterTor Lillqvist1-5/+11
Probably helps VB6 clients. Change-Id: I3a1072e6ededbd0322c4b0dcd0ef4b16ace215d1
2019-02-06Add a dummy implementation of WordBasic.AppCount()Tor Lillqvist1-0/+10
Change-Id: Ia9e78c331d2cb711653ee3e64597ebf2824e0eeb
2019-02-06Add a dummy implementation of WordBasic.AppShow()Tor Lillqvist1-0/+9
Change-Id: I14379c5732c1921b8f52293045d01acf99e0b840
2019-02-06Add a dummy implementation of WordBasic.DocMaximize()Tor Lillqvist1-0/+10
Change-Id: I972f9446560cc8ac51031dbc36fc05d438d150e7
2019-02-06Add a dummy implementation of WordBasic.AppMaximize()Tor Lillqvist1-0/+10
Change-Id: I4606e5a3717c3717d105dd2e63c9fd7d2e1abf83
2019-02-06tdf#123189 DOCX import: skip table bkground colorLászló Németh2-0/+10
settings to keep interoperability, use only cell properties, as MSO. Change-Id: I167eb0e8732fa7dc7f890c2a21d59a15299be8ba Reviewed-on: https://gerrit.libreoffice.org/67429 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-02-05tdf#122878: enable wrap for flys in footerPatrick Jaap4-8/+7
This patch removes the check for a footer node, intoduced by 23f698ecee033612ac3a9f5cfd7674b08bb3ccd1 preserving the behaviour for the connected bug reports i13832 and i24135. Without this check, the wraping becomes enabled for footer objects, too. With this enhencement, the commits 7df33caac85ac90c26e97dedbc201f46dc9e4cb4 d3db6ff43a531ecf1afc858a0a8832353d091644 are directly affected and therefore the unit test is edited. Change-Id: I093add9e251ac97859a66cb8b8563010ef734c2d Reviewed-on: https://gerrit.libreoffice.org/67069 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-05crashtesting: crash on export of ooo37749-1.sxw to rtfCaolán McNamara1-1/+1
since... commit 18bb85aa303c17b7705a9ccb0dd3d76673a1955e Date: Sat Jan 12 12:04:04 2019 +0100 make SwFormat a ::sw::BroadcastingModify - clean up SwSection..Hint: Lazily reusing the Dying HintId is evil - switch the SwChartDataSequence to SvtListener - add some description to RuntimeException Change-Id: I1a83c3d11b8b05699f05e812bc021daa6fadb76a Reviewed-on: https://gerrit.libreoffice.org/67394 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-05recording database fields fixedOliver Specht1-1/+1
Change-Id: I0abe538f37ffe6bb9b3fe0873abbf636ed0a4974 Reviewed-on: https://gerrit.libreoffice.org/67377 Tested-by: Jenkins Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2019-02-05tdf#42949 Fix IWYU warnings in include/svtools/*Gabor Kelemen11-1/+12
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I937ed12f2a96943664087ddcdd035f1347e84a57 Reviewed-on: https://gerrit.libreoffice.org/67102 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-05tdf#121867 DOCX filter: handle page width zoomMiklos Vajna3-1/+31
And other non-fixed zoom types, similar to how DOC does it. Change-Id: Ie84340b4e662d2329b5d3918900adfd0c3e9b8e9 Reviewed-on: https://gerrit.libreoffice.org/67378 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-04Use indexed getToken()Matteo Casalin1-10/+11
Change-Id: Ie8e1a7fdc8c728c7e9e43a444f0d039b2d60b121 Reviewed-on: https://gerrit.libreoffice.org/67309 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-1/+2
Change-Id: I136a1cdb4a1522d78120f12e5f9ea5ced653c1b6 Reviewed-on: https://gerrit.libreoffice.org/67334 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-3/+3
Change-Id: I371ff95ff9d05e0c57844f99c222165e55aa51e8 Reviewed-on: https://gerrit.libreoffice.org/67332 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-3/+4
Change-Id: Icf81629c80b6c39cef98cba3ba98a20089f7b9ef Reviewed-on: https://gerrit.libreoffice.org/67331 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Fix indentationMatteo Casalin1-24/+24
Change-Id: I2ee92b2fcf0fd589663a0141a67a9aabee180159 Reviewed-on: https://gerrit.libreoffice.org/67330 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-8/+9
Change-Id: I1786e75ff12f16450f62f5091981a26c89af2514 Reviewed-on: https://gerrit.libreoffice.org/67329 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use optimized OUString concatenationMatteo Casalin1-75/+39
Change-Id: Ib83b8cf3cbd46008413c71c098fea9946c090766 Reviewed-on: https://gerrit.libreoffice.org/67328 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-2/+3
Change-Id: I7637728bac4b7f0df56c564b204dce08db1298e8 Reviewed-on: https://gerrit.libreoffice.org/67326 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-2/+3
Change-Id: Ic500623b851cd8f4db665aa7c3de7443e0d39a87 Reviewed-on: https://gerrit.libreoffice.org/67324 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-3/+4
Change-Id: Ifd3885d07f7bcad46039560bbb19f48074fb4cd0 Reviewed-on: https://gerrit.libreoffice.org/67323 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-3/+4
Change-Id: I7f27f9a8023102c5e07fb45ed40e06ee862fccde Reviewed-on: https://gerrit.libreoffice.org/67322 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-2/+3
Change-Id: Ic81c216d24eb0b41549f2b82a3888c466d26c5ca Reviewed-on: https://gerrit.libreoffice.org/67321 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-6/+7
Change-Id: Id3f8352fd367645fffb81fe1c08c3be8fb35cb07 Reviewed-on: https://gerrit.libreoffice.org/67319 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin1-3/+3
Change-Id: I613105a14a5e834bd9ac915261303b1e058340dd Reviewed-on: https://gerrit.libreoffice.org/67318 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Reduce temporariesMatteo Casalin1-7/+4
Change-Id: I50c22563c7804efe0dd125468d13e81b41b23702 Reviewed-on: https://gerrit.libreoffice.org/67317 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Check emptiness of last token on indexMatteo Casalin1-3/+2
Change-Id: I4cf0ea849f221270ebe8763d6a55f20dd72ba576 Reviewed-on: https://gerrit.libreoffice.org/67316 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>