summaryrefslogtreecommitdiff
path: root/sw/source/core
AgeCommit message (Collapse)AuthorFilesLines
2016-10-10tdf#101390 Add "Dimesion Line" command to the writer arrowsbox.Gulsah Kose1-0/+10
Change-Id: I238bc37871c029d547b21ce7c8ef3cb0c0ff95b8 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/29669 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek5-26/+26
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-10cppcheck: clarifyConditionJochen Nitschke1-2/+5
Change-Id: I4dfcaec8764699cc1dfd725b9cd1100750ee3d0f Reviewed-on: https://gerrit.libreoffice.org/29629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-07loplugin:staticmethods: swStephan Bergmann3-4/+4
Change-Id: I2b06eb926ebc8ab04883da3272ea239a12e09436
2016-10-06sw: remove unused DbgRectMiklos Vajna1-26/+0
Seems the last user was removed in commit 2513329487f2b39740f3fa16eb1b07d9b191c699 (2004/06/23 12:50:40 cmc 1.7.568.1: #i30554# remove unused code inside #ifdef USED guards). Change-Id: If49b4d34786b091f06df7064c5b0fd649310365d Reviewed-on: https://gerrit.libreoffice.org/29550 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-10-05tdf#103025 sw: don't format header/footer in SwPageFrame::PreparePage()Michael Stahl1-16/+0
This has always been dead code because it used wrong constants FRMTYPE_HEADER|FRMTYPE_FOOTER which is actually Page|Column and SwPageFrame and SwColumnFrame are not direct children of SwPageFrame. Then commit 901e5c3a21a1299d10c44bc844246fe8c329bb82 fixed the constants but somehow the early formatting of header/footer results in wrong expansion of variable text fields, so just remove this code. Change-Id: I0af13168970f26355a1b247e071235166d08b7a4
2016-10-05sw: remove correctMarksAbsolute pre-condition check for now...Michael Stahl1-3/+0
... in case the post-condition check fails it can be added for debugging. Change-Id: Id3ee0895af598080a8bda10e8e9edff883188cbc
2016-10-05loplugin:unnecessaryoverride in swNoel Grandin11-66/+0
Change-Id: I641175c9c17fcc46b582b6487b8207deb343e645
2016-10-05convert MapUnit to scoped enumNoel Grandin27-61/+61
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann20-21/+21
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-04sw: fix assert in MarkManager::deleteMarks()Michael Stahl1-1/+9
On loading tdf89405-1.odt there is a "DdeLink" bookmark and a range annotation at the same position: info:sw.core:17729:1:sw/source/core/doc/docbm.cxx:290: N2sw4mark8BookmarkE __DdeLink__30_388680695 11,11 11,52 info:sw.core:17729:1:sw/source/core/doc/docbm.cxx:290: N2sw4mark7UnoMarkE __UnoMark__16_673019520 11,11 11,11 info:sw.core:17729:1:sw/source/core/doc/docbm.cxx:290: N2sw4mark7UnoMarkE __UnoMark__19_673019520 11,12 11,12 While deleting the annotation's field character at 11,11-11,12 the DdeLink one is moved but the UnoMarks are special-cased and remain where they are, so just do some more sorting in this case. Change-Id: If077329bf675cdf8dd788cc145252a078aba3750
2016-10-04comphelper: move setTiledPainting() from SfxViewShellMiklos Vajna1-2/+2
And make it a static one. The primary point of that member function is to prevent invalidations during paint, and since multiple views are allowed, it wasn't extended to filter out invalidations from all views, not just from the current one. (Same goes for other callback types.) Change-Id: I23e6b2c2ff94227f2b72c481148b2d8279ae2905
2016-10-04loplugin:countusersofdefaultparams in swNoel Grandin20-23/+23
Change-Id: I65beb17816641cff6a07379b7ba234afe26806b3 Reviewed-on: https://gerrit.libreoffice.org/29488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03Fix typosAndrea Gelmini12-16/+16
Change-Id: Ia59d287a015482e9e97b701a6695463a7d235203 Reviewed-on: https://gerrit.libreoffice.org/29439 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-03loplugin:countusersofdefaultparams in sw..vclNoel Grandin3-9/+9
Change-Id: I152df55f5a30e073c66cfd3a64d5090a20cb232d Reviewed-on: https://gerrit.libreoffice.org/29471 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03add more dumpAsXml()Noel Grandin2-0/+4
and make it format the output nicely, so I don't have to use 'xmllint --format' before I can read it. Change-Id: I065ee93193f3c6c7bab87212ab96021fb0d7c5ed Reviewed-on: https://gerrit.libreoffice.org/29407 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03tdf#100726 Improve readability of OUString concatinationChamal1-4/+1
Fixed the issue on sw/source/core/access/accpreview.cxx Change-Id: I74a19129580ca8f7f357d590832cac5a360ba636 Reviewed-on: https://gerrit.libreoffice.org/29455 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-02tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorChamal1-4/+2
Fixed the bug on sw/source/core/access/accpreview.cxx Change-Id: Ia16b03f4e5c377a0715608efbd0730c196b26f4b Reviewed-on: https://gerrit.libreoffice.org/29453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01rearrange SwCalc some moreCaolán McNamara1-19/+44
Change-Id: Ib1ffc112ddd006102b29536f7433a3f16bf63a3f
2016-10-01rearrange SwCalc a littleCaolán McNamara1-22/+18
Change-Id: I42278cf63f3cf2a1c3362fcb8c4eeacab2a9de48
2016-10-01default copy ctor/assignment are sufficientCaolán McNamara1-12/+0
Change-Id: I9076b5705ae213c4170cb313cd5b40b3214e2256
2016-09-30tdf#75757 Remove inheritance from std containerTakeshi Abe6-36/+14
Change-Id: I476c83ea195281f977bb6fa5019f983609ff3a6e Reviewed-on: https://gerrit.libreoffice.org/29347 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-09-29enforce some form of consistent indent hereCaolán McNamara1-71/+80
Change-Id: Ib26aaa29861e940748a31a3df7f8c5f0408e8c13
2016-09-29sw lok: disable pixel alignment of cursor logic valuesMiklos Vajna1-2/+6
It just makes harder for a client to find out if the cursor of one view is at the same position as the cursor of an other view. Change-Id: Ifaebd1c93c45918c87f3c2c3d12bbb3af949184e Reviewed-on: https://gerrit.libreoffice.org/29393 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-09-29sw: remove unnecessary debug code in fetabMiklos Vajna1-9/+0
Change-Id: I78bff9b899a6bbe2ab831a6f0cba60f614609449 Reviewed-on: https://gerrit.libreoffice.org/29379 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-09-28tdf#102073: sw: do not create SwFootnoteNumPortion inside tableMichael Stahl1-0/+2
The SwTextFormatter::WhichFirstPortion() wants to create a new SwFootnoteNumPortion for the first paragraph in every cell, because it doesn't have mpPrev set and SwTextFrame::IsFootnoteNumFrame() is true, and somehow this even causes an infinite loop in the bugdoc because initially nothing more than the footnote number fits inside a line. Just detect that it's inside a table and return false then. Change-Id: I1f010f1242d53d9f99a4d3a4f6fc3cee65aa3958
2016-09-28fftester: cut out middle man in deref null ptr and get addressCaolán McNamara1-4/+4
Change-Id: Iba157f47e847cb2eba1d771a6f357019d68b4f13
2016-09-28sw: fix loplugin:staticanonymousMiklos Vajna1-1/+1
Change-Id: I8e58200129eea0eae37c335265bf634b390da28a
2016-09-28GetSvxShape does the same checks, so use it directlyCaolán McNamara1-7/+2
and drop the worthless unused xShapeTunnel Change-Id: Id9875691e8a01a11a84b0dd08a53fdee517924f4
2016-09-28Resolves: tdf#102358 writer cannot save 3d shape inserted from drawCaolán McNamara1-6/+3
because SwXShape::supportsService always returned true for com.sun.star.drawing.Shape I surmise that getSupportedServiceNames should always list com.sun.star.drawing.Shape as a supported service This went awry with... commit 2f50ce6cfab2871cd879c1429e1938d3642616ef Author: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Date: Thu Dec 5 19:17:18 2013 -0200 fdo#54938: Convert sw to use cppu::supportsService Change-Id: Ic27bf31e5eb991ccceb8b97713d1e50a736709c8 Signed-off-by: Stephan Bergmann <sbergman@redhat.com> Change-Id: I9821a620da8bac3b6b59da976a8c25bb2deafcf1
2016-09-28sw: presumably rEnd != rStart implies rEnd isn't on index 0Michael Stahl1-2/+3
... because only checkbox marks with only one dummy character should have rEnd == rStart; the 2-dummy-character ones have the end position behind the 2nd dummy character, see lcl_AssureFieldMarksSet. ... and "fix" some more "unused variables". Change-Id: I25fb33891c1a74213bbeb2bbd7f3843809ee7273
2016-09-28sw: -Werror=unused-parameterMichael Stahl2-9/+8
Change-Id: I1d437077ac1bf7bf6a53e1348ccbdce7b8b20bc3
2016-09-28sw: remove defensive programming bullshit in lcl_AssureFieldMarksSetMichael Stahl1-21/+9
In CppunitTest_sw_ooxmlfieldexport testFdo81492 a TextFieldmark is inserted at a position where already another TextFieldmark starts. The defensively programmed lcl_AssureFieldMarksSet notices there is aleady a dummy character at the start position, and does not insert another one, but then the dummy character for the end position is inserted, moving the start position index, which puts the start position behind another bookmark. So we end up with a field mark that has a end character but not a start character and an un-sorted m_vAllMarks. Change-Id: Icd15e83471e18f607eb41b2f7b0c2ce61c94ff9f
2016-09-28sw: rStart variable isn't a referenceMichael Stahl1-9/+12
Change-Id: I48c402e3dcd9606d7f40ee2096fa8803d5499d73
2016-09-28sw: make the debug code in docbm.cxx usableMichael Stahl1-32/+28
Change-Id: I45e412e107601947221d679992356b47d29ad4a7
2016-09-28sw: assert that IMarks are MarkBaseMichael Stahl1-4/+4
Change-Id: Id9e61dc624a34012dc7a53e262c76f8d25c4a455
2016-09-28sw: fix sorting in MarkManager::correctMarksAbsolute()Michael Stahl1-0/+2
The recently added tdf90697.rtf caused a libstdc++ assertion about non-sorted m_vAllMarks. This is because a SwXParagraph was disposed, a bookmark on it was moved by correctMarksAbsolute onto the first paragraph in a table, and there was a SwXTextRange with a UnoMark pointing to the SwTableNode, so the sort order was not maintained. So if at least one mark was moved, re-sort the array. Change-Id: I0efc7827c826e696f29f8480bab1044b31ccfe39
2016-09-27sw: Drop unused forward declarationsTakeshi Abe14-20/+0
Change-Id: I2913466f8fa87b3c377a1abf65b8ccc477b73f40 Reviewed-on: https://gerrit.libreoffice.org/29311 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-26remove unused ICoreParagraphStyleNoel Grandin1-10/+0
which was introduced in commit aef1e2dde5e53ba8416a393bbe155ef0c18511a7 Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com> Date: Mon Dec 21 03:55:14 2015 +0100 move SwXStyle entirely into compilation unit but Bjoern can't remember why he introduced it: "Likely best to rip it out now and implement it properly when there is a good testcase for this XML filter scenario ..." Change-Id: Iaef19131d804369436097ab445d6c192587f9d9f Reviewed-on: https://gerrit.libreoffice.org/29297 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-09-26CppunitTest_sw_rtfimport: fix ASan/UBSan build failureMiklos Vajna1-12/+15
pDocShell->GetWrtShell() can be nullptr, even if pDocShell is not. Change-Id: I2d60475abe545c2dbb13ede74d2d65432a3c93a7
2016-09-26sw lok: fix cursor position after inserting a commentMiklos Vajna1-1/+9
Make sure SwVisibleCursor::SetPosAndShow() doesn't emit LOK callbacks till a comment window is active. Need to invoke the unit test from desktop/, as the sw tests have the status bar disabled. Change-Id: Iab26024e9bb4da9c939bbd6cf769ec5c4dcb9a19
2016-09-25avoid coverity#1371166 Missing move assignment operatorCaolán McNamara1-18/+24
Change-Id: I0c5559c71f8a961bbab6fbd3a647aeca4a10b44f
2016-09-23MM account next record fields for progress dialogJan-Marek Glogowski2-1/+33
When calculating the maximum document count, we were not accounting "next record" fields in the document, like in labels etc. Also any selection of records was ignored. Fixes accounting part of tdf#101841. Change-Id: I703d2186d44d2e5426c4af0d4b2d89e0fe820039
2016-09-23tdf#102384 sw: avoid moving cursors of other windows in SwTextNode::Update()Miklos Vajna1-0/+23
There is a list of exceptional SwIndex containers in that member function, like bookmarks, at-char anchored fly frames, etc. If we're growing (so basically in the safe case), don't touch the cursors of other windows, either. This helps to avoid the surprising "I didn't do anything and my cursor moved" behavior. Change-Id: I9941fdcb6b7ad4b6e18a321cecc72fdf73d917fd
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke10-20/+10
There were over 150 places in *::Notify() functions that did some dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast operations come with quite some cost, so avoid if possible. Specifically for ScFormulaCell::Notify() that created a bottleneck in scenarios where cells were notified that already handled a previous notification. In mass operations doing the dynamic_cast before it could be decided whether having to act on it or not this made 2/3 of all time spent in the Notify() call. To get rid of that rename/move SfxSimpleHint to SfxHint and let classes derive from SfxHint instead of SfxSimpleHint. This comes only with a slight cost that an additional sal_uInt32 is transported in such hints, initialized to 0, but this is neglectable compared to the huge gain. For the rare cases where a Notify() actually expects both, an SfxHint (formerly SfxSimpleHint) and a derived hint, this changed order of the dynamic_cast involved so the simple SfxHint::GetId() is handled last. Modules using such combinations can further optimize by treating the simple SfxHint::GetId() first once verified that none of the other derived hints use an ID not equal to zero respectively none of the ID values the simple hint uses. Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce Reviewed-on: https://gerrit.libreoffice.org/29205 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-09-23coverity#1373351 make SetTabRows the same as SetTabColsCaolán McNamara1-4/+10
Change-Id: I9cfe2f3ec96ee72ff2e7657661a003086d301db6
2016-09-23Replace SWRECTFN macro with a classMike Kaganski42-1501/+1506
Change-Id: Ib400c5930be84d26665b0e12a61508c8fbfd7f08 Reviewed-on: https://gerrit.libreoffice.org/29105 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-09-22loplugin:unusedmethods in sc..vclNoel Grandin3-27/+0
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8 Reviewed-on: https://gerrit.libreoffice.org/29183 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22loplugin:unusedmethods unused returnsNoel Grandin1-3/+1
Change-Id: I4da3374e31d3c7407b401d66275da7f56ae83d30 Reviewed-on: https://gerrit.libreoffice.org/29178 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22sw: Clean up forward declarationsTakeshi Abe3-6/+1
Change-Id: I02eb887101f2ebe9eb5abe8e2291f8cf5d79d2ce Reviewed-on: https://gerrit.libreoffice.org/29141 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>