summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2016-11-17Avoid -fsanitize=enumStephan Bergmann
...when doing Writer "Insert - Table of Contents and Index - Table of Contents, Index or Bibliography...": > sw/source/uibase/inc/cnttab.hxx:58:16: runtime error: load of value 65535, which is not a valid value for type 'TOXTypes' > #0 0x7fbed9c2c9c8 in CurTOXType::operator==(CurTOXType const&) sw/source/uibase/inc/cnttab.hxx:58:16 > #1 0x7fbed9b711b1 in SwTOXEntryTabPage::ActivatePage(SfxItemSet const&) sw/source/ui/index/cnttab.cxx:2071:25 > #2 0x7fc217524056 in SfxTabDialog::ActivatePageHdl(TabControl*) sfx2/source/dialog/tabdlg.cxx:1126:19 > #3 0x7fc217519ac3 in SfxTabDialog::LinkStubActivatePageHdl(void*, TabControl*) sfx2/source/dialog/tabdlg.cxx:1035:1 > #4 0x7fc1f15c0e37 in Link<TabControl*, void>::Call(TabControl*) const include/tools/link.hxx:84:45 > #5 0x7fc1f157cbaa in TabControl::ActivatePage() vcl/source/control/tabctrl.cxx:1601:19 Change-Id: I458e010b10dfdf3e944c389f61595869cc41036f
2016-11-17Avoid -fsanitize=signed-integer-overflowStephan Bergmann
Both Writer: "Table - Insert Table... - Insert", "Table - AutoFormat Styles..."; and Calc: select multiple cells, "Format - AutoFormat Styles..." cause > svx/source/dialog/framelinkarray.cxx:82:29: runtime error: signed integer overflow: -4702111234474983744 + -4702111234474983746 cannot be represented in type 'long' > #0 0x7f84ef0e36ba in svx::frame::lclRecalcCoordVec(std::__debug::vector<long, std::allocator<long> >&, std::__debug::vector<long, std::allocator<long> > const&) svx/source/dialog/framelinkarray.cxx:82:29 > #1 0x7f84ef0e780e in svx::frame::ArrayImpl::GetColPosition(unsigned long) const svx/source/dialog/framelinkarray.cxx:265:9 > #2 0x7f84ef0f95ae in svx::frame::Array::GetColPosition(unsigned long) const svx/source/dialog/framelinkarray.cxx:762:20 > #3 0x7f84ef0f9e56 in svx::frame::Array::GetWidth() const svx/source/dialog/framelinkarray.cxx:787:12 > #4 0x7f852e9df8fd in ScAutoFmtPreview::CalcCellArray(bool) sc/source/ui/miscdlgs/autofmt.cxx:429:32 > #5 0x7f852e9c7740 in ScAutoFmtPreview::Init() sc/source/ui/miscdlgs/autofmt.cxx:407:5 > #6 0x7f852e9c9102 in ScAutoFmtPreview::ScAutoFmtPreview(vcl::Window*) sc/source/ui/miscdlgs/autofmt.cxx:73:5 where -4702111234474983746 = 0xbebebebebebebebe is ASan's uninitialized value stored into ScAutoFmtPreview::mnLableColWidth et al. Those (overflowing, even) computations on uninitialized values appear to be harmless in practice, though, presumably because they are overwritten with "real" values soon after. Change-Id: I487fc4681afe79c4e8532595226cba4c9c0c9b2d
2016-11-17loplugin:unusedfieldsNoel Grandin
Change-Id: Id2dbbf384637223db3d334d95332251832918003 Reviewed-on: https://gerrit.libreoffice.org/30927 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-17chmod -xTor Lillqvist
Change-Id: Ie07ef2f9e9f6d0b31b513afa913b79d9c641e4f1
2016-11-17tdf#103965: set DisableFlags for SID_PARASPACE_INCREASE/DECREASEMike Kaganski
Change-Id: Ic60b987d16e3ef97413a38ec5a1ddd6d1d7f93f8 Reviewed-on: https://gerrit.libreoffice.org/30916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-11-16sw: remove redundant initializer for members in rtfexportMiklos Vajna
Change-Id: I004ebe3bd214a7c35a286f10bb13aef6900f0f87 Reviewed-on: https://gerrit.libreoffice.org/30896 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-16make the element names in dumpAsXml match the class namesNoel Grandin
Change-Id: I955facfe3e901fcb76798dab342f96a67d5ac63f Reviewed-on: https://gerrit.libreoffice.org/30894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16new loplugin finalprotectedNoel Grandin
look for final classes, and make sure they don't have protected members Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4 Reviewed-on: https://gerrit.libreoffice.org/30895 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-15Fix typosSamuel Mehrbrodt
Change-Id: I3e38b1d445c368c28e807202b94c603bd2b2c672 Reviewed-on: https://gerrit.libreoffice.org/30872 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-15loplugin:constantparamNoel Grandin
Change-Id: Iced8ff99d52d55e6b6c3126affafbea6786e94f0 Reviewed-on: https://gerrit.libreoffice.org/30858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-15tdf#82824 DOCX import: fix at-char embedded object handlingMiklos Vajna
The anchor type of embedded object was simply not handled, we always assumed that it's as-char. When it's at-char set the anchor type accordingly, and also set the usual 6 properties determining the position of the anchored object. Change-Id: I3f8bede33c6f1a0bdc4f4d4ea59c4fc805802291 Reviewed-on: https://gerrit.libreoffice.org/30860 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-14Don't AlignToPixel in SwView::SetVisAreaStephan Bergmann
When e.g. inserting a Writer doc in a Calc doc ("Insert - Object - OLE Object... - Create new - LibreOffice 5.3 Text" in Calc), the resulting .ods contains the size of the embedded Writer doc in two places. First as <draw:frame svg:width=... svg:height=... ...> in content.xml, where the size is apparently the original rectangle's size, before it got aligned in SetVisArea. And a second time as <config:config-item config:name="ViewAreaWidth" config:type="long">...</config:config-item> <config:config-item config:name="ViewAreaHeight" config:type="long">...</config:config-item> in Object 1/settings.xml, where the size is apparently the aligned size. When the document is loaded again, at first the first size is used to display the inner Writer doc. But when the inner Writer doc is double-clicked (to make it editable), now the second size is used, and because they don't match, the whole document is erroneously considered modified (ScTabViewShell::ActivateObject -> SfxInPlaceClient::SetObjArea -> SfxInPlaceClient::Invalidate -> ScClient::ViewChanged -> ScDocShell::SetDrawModified -> ScDocShell::SetModified -> SfxObjectShell::SetModified), causing e.g. the "Save" icon to become "active". It is unclear to me whether these calls to AlignToPixel still serve any real purpose; lets see whether removing them causes any issues... Change-Id: I755dd9e8b2406f0b4b41d0f3d1281d6ad4b1b238
2016-11-14This RES_FRM_SIZE item is apparently SwFormatFrameSize, not SvxSizeItemStephan Bergmann
...as reported by -fsanitize=vptr when doing "Format - Page..." in Writer (though both types have a Size member at the same location, so didn't cause any real problems): > sw/source/ui/misc/pgfnote.cxx:283:32: runtime error: downcast of address 0x604000e23f50 which does not point to an object of type 'const SvxSizeItem' > 0x604000e23f50: note: object is of type 'SwFormatFrameSize' > 94 01 00 3d 90 ae ee 90 ff 7e 00 00 06 00 00 00 58 00 00 be d0 2f 00 00 00 00 00 00 e0 3d 00 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SwFormatFrameSize' > #0 0x7efd1c8d01e2 in SwFootNotePage::ActivatePage(SfxItemSet const&) sw/source/ui/misc/pgfnote.cxx:283:32 > #1 0x7efd1c8cbf07 in SwFootNotePage::Reset(SfxItemSet const*) sw/source/ui/misc/pgfnote.cxx:230:5 > #2 0x7f002e149560 in SfxTabDialog::ActivatePageHdl(TabControl*) sfx2/source/dialog/tabdlg.cxx:1117:19 > #3 0x7f002e1400e3 in SfxTabDialog::LinkStubActivatePageHdl(void*, TabControl*) sfx2/source/dialog/tabdlg.cxx:1035:1 > #4 0x7f0008248f37 in Link<TabControl*, void>::Call(TabControl*) const include/tools/link.hxx:84:45 > #5 0x7f0008204caa in TabControl::ActivatePage() vcl/source/control/tabctrl.cxx:1601:19 Change-Id: I73df2438565a7069153b22140197897df810b2aa
2016-11-14loplugin:unusedmethodsNoel Grandin
Checked a couple of them: StandardCheckVisisbilityRedirector is unused since commit b1f8cf37828d5f37527e54774aa4935610aa6325 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Nov 2 10:57:21 2016 +0200 loplugin:singlevalfields SfxQueryStatus is unused since commit 64a708cba9b954afe3331f63c58218eb53b3d0ce Author: Caolán McNamara <caolanm@redhat.com> Date: Sat Nov 5 20:28:27 2016 +0000 Revert "Reverts a commit series that cripple windows ci." Change-Id: If1c9fe26c3ebc573d8c53c8f060b05c27f2711e5 Reviewed-on: https://gerrit.libreoffice.org/30840 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-14warning C4701: potentially uninitialized local variableNoel Grandin
Change-Id: Ic3377b51faa2a83cd78bce43a56f323dc3a70085
2016-11-14sw: prefix members of CellSaveStructMiklos Vajna
Change-Id: I94cd8c0d8f58ec2cfe00c9468e38f7129cd490f1
2016-11-14coverity#703927 Unchecked return valueCaolán McNamara
make these less odd and simply return the thing they selected, rather than a bool that indicates that the rpObj arg was successfully set to non-null, so there's one flag to check not two which both mean the same thing. Change-Id: If70e412f98dea8b7114fb77f26a9c59aab93be50 Reviewed-on: https://gerrit.libreoffice.org/30794 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-13drop extra semicolonsDavid Tardon
Change-Id: Ie6713d1bdf0010e5bc0bb70ca995c4dd36408673
2016-11-13drop useless semicolonsDavid Tardon
Change-Id: I039f8ff491b42ea9c3936bf13922df8095434228
2016-11-13tdf#103268 Activate editing object name function for writer images.Gulsah Kose
Change-Id: Idfe88a3f5b7492dc6ac71fa3791839a000a7483b Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/30759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-11-11the pStream member makes no sense at allCaolán McNamara
maybe the PurgeMedia call in sw was meant to be a PurgeGraphic call originally (PurgeGraphic since removed by... commit a22ac2c218870033822120bf0b0d6cfde6ce799f Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Jul 14 22:06:29 2011 +0100 callcatcher: remove unused methods) PurgeMedia releasing the stream makes no difference to the only place its used which is SvxBrushItem::GetGraphicObject which makes a new one every time anyway. the SvxBrushItem assignment operator doesn't change the stream member of the pImpl which looks utterly nuts, so its a good thing the stream is not reused Change-Id: Ie0dee22a6640a6916908fcddbc3541ba85034217
2016-11-11default dtor is sufficientCaolán McNamara
Change-Id: Ia32b31489eb67f24987852dbadbcc2d3a81a0312
2016-11-11default copy ctor is sufficientCaolán McNamara
Change-Id: I908848590add00d96001e1fdaafedc85ae3d6765
2016-11-11update vclwidget loplugin to find ref-dropping assigmentNoel Grandin
Look for places where we are accidentally assigning a returned-by-value VclPtr<T> to a T*, which generally ends up in a use-after-free. Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9 Reviewed-on: https://gerrit.libreoffice.org/30749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10'make screenshot' use-after-free fixesStephan Bergmann
Change-Id: I4302d0d767a1bf50fd34a78e9aa0ad6d6b0c7a22
2016-11-10'make screenshot' loplugin fixesStephan Bergmann
Change-Id: Ibebcd1c1ebfea0ecdf9d90b6f8bcc8ceb87df456
2016-11-10Resolves: tdf#103809 the argument is a bool* not a VclPtrCaolán McNamara
Change-Id: Ia07f4ff7b243708304186c840135ec1180621fa5
2016-11-10micro optCaolán McNamara
Change-Id: I4ef86a56780cf9ea8fe244a5347a79099bc05979
2016-11-10tdf#67379 - sw: treat clicking h/f-fly the same as any otherJustin Luth
Why should clicking on a frame/image in a header act any differently from a one insde the text body? (The only time frames (or any kind of fly) required a double click occured when switching from inside a header to a body-fly or from inside the body to a h/f-fly. This patch removes that oddball corner-case.) Now all frames are handled with a single click and there will not be an impact on double-clicking anymore. regression caused by 7e2f98d0a0c4a0f36a94353a256e7cc5caa3113b and its prior commit which say: > Header/Footer: fixed click on frames over the header/footer area. > The main problem here was due to the click to show the separator when > there is no header or footer under the frame. That code was just exiting > MouseButtonDown too early, which isn't good. > Now, double-click actually selects a frame anchored in header/footer. confirmed that single-clicking on frames over the header/footer section still shows the header blue-line. Change-Id: I4770cfe7898202929742743931e22de8bf233b03 Reviewed-on: https://gerrit.libreoffice.org/30693 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-11-09crashtesting: crash on layout of ooo107760-1.docCaolán McNamara
this has begun crashing since... commit 8f2dd1df1d6cc94ebbc1149de72bc6d6dffa6533 Author: Khaled Hosny <khaledhosny@eglug.org> Date: Wed Nov 2 23:52:06 2016 +0200 "Enable the new text layout engine by default" but its presumably blameless Change-Id: I5d9bfcd3277ce6b71dce8dced6947ab38b12f148
2016-11-09sw: clean up redundant get() calls on smart pointers in rtfattributeoutputMiklos Vajna
And a few more similar nitpicks. Change-Id: Iac343800171658a9623bcc4d5b7aadaae56830ad
2016-11-09spelling mutext->mutexNoel Grandin
Change-Id: If844c07d0d50d1bb9b0a1877c0fde4a198bcf781
2016-11-09make comphelper::containerToSequence a little smarterNoel Grandin
So we don't have to specify the source and destination type as often. Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624 Reviewed-on: https://gerrit.libreoffice.org/30700 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08reduce copying when decomposing drawinglayer primitivesNoel Grandin
instead of returning a Primitive2DContainer from each method which we are then going to immediately append to another container, pass down a single container by reference which we can append to Change-Id: I0f28a499d2ec54f7111a7044c30099767aa079e1 Reviewed-on: https://gerrit.libreoffice.org/30258 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08tdf#79329 DOCX import: fix missing outer table with floattable at cell startMiklos Vajna
The bug document has a normal table, then its C1 cell starts with a nested table, which is floating. The problem is that converting the nested table to a textframe invalidates the start text range of the C1 cell in the outer table we store, so the conversion of the outer table from text to table fails. This never worked, so to avoid the regression just don't convert inner floating tables to textframes when they're anchored at the cell start. A more general fix in the future can be addressing the actual invalidation of the cell start/end text ranges, and then this specific fix will not be necessary anymore. Change-Id: I12cefa41977cf719b07b0fb3ef9ec423c17ef3b1 Reviewed-on: https://gerrit.libreoffice.org/30685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-08tdf#91222 VclBuilder constructor cleanupmelikeyurtoglu
Change-Id: I2f7e2fd8b9ae45e1aa45cf97750a6107ed9f3036 Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/30673 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07Revert "Reverts a commit series that cripple windows ci."Caolán McNamara
with addition of... - svxlo-SvxColorListBox + svxcorelo-SvxColorListBox This reverts commit db380aab1063e8a5e40111c40ee9f7921aa82601. Change-Id: I3af7aa0abb1a430bce64188244404fcbd480b128 Reviewed-on: https://gerrit.libreoffice.org/30598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-07officecfg: add .uno:SignPDF labelMiklos Vajna
And replace the existing .uno:Signature in the File menus with a submenu that contains .uno:Signature and the new .uno:SignPDF. Change-Id: I801b9332c697985446c64dd208c25dea2494350e
2016-11-07loplugin:unnecessaryvirtual in svx..swNoel Grandin
Change-Id: I4ae8de558550e6577c28b95e0aaed74f00d79c29 Reviewed-on: https://gerrit.libreoffice.org/30650 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07only cond. build stuff that is really new in ICU 58David Tardon
Change-Id: I59598329a7051374177b4d16aa061367b6043982
2016-11-07wrap some more dialog pointers in VclPtrNoel Grandin
and fix a couple of memory leaks in the process, some of them were not being deleted at all Change-Id: Icb5c948662ad3ba878eadfbc807f93cc35cfb228 Reviewed-on: https://gerrit.libreoffice.org/30651 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07sw: prefix members of WW8ScannerBaseMiklos Vajna
Change-Id: I8e0235a8701e0cc0e8ca707b8f3ff2581f2bfcbd Reviewed-on: https://gerrit.libreoffice.org/30648 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-07fix build with ICU < 58David Tardon
Change-Id: I84027f0812e672519ed314639deeb5c0d1069624
2016-11-07Fix thinkos in my previous commitKhaled Hosny
Change-Id: I8f912f5a02933bdfb318dc4f946d4ad7471eb261
2016-11-07tdf#41542 MSWordExport: accommodate image's borderless paddingJustin Luth
Honor the padding value even if the border is not visible. Previously the padding information was just thrown out, and the image scaled to fill the entire image size. The unit test for tdf#77454 needed to be tweaked because surprisingly it has border padding of 1 - which this patch turns into a negative crop. Change-Id: I866d26e00f27221239d3291404f70fb57ac0896d Reviewed-on: https://gerrit.libreoffice.org/30578 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-11-07Make the insert fields dialog not crashMaxim Monastirsky
Change-Id: I6cd802f4ab07a647dcc3e8af49e578b041517006
2016-11-07Extend joining groups with new Unicode additionsKhaled Hosny
Change-Id: I14d65d59794fdf9ed4dce05a8f734d9400f85927
2016-11-07Insert Kashida before final TahKhaled Hosny
Looks like it was missing from the original code, though described here: https://www.microsoft.com/middleeast/msdn/JustifyingText-CSS.aspx Change-Id: Iab283cd8e9cc5aee37836ddb06d5e9b8ce8c18e4
2016-11-06Update commentsKhaled Hosny
Change-Id: Ia63e2f16eb70c4a0cc20fc73f0f2694f1381dac5
2016-11-06tdf#65344: Don’t put Kashida before any final charKhaled Hosny
If we didn’t find any known good position, not inserting Kashida at all is better than inserting it randomly. Change-Id: I075f8414b7f0a0aeb4d27d372c7eae51f4b5c37b