summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode
AgeCommit message (Collapse)AuthorFilesLines
2017-12-18convert ND constants to o3tl::typed_flagsNoel Grandin5-71/+72
Reviewed-on: https://gerrit.libreoffice.org/31343 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit b8aa1def37b62091f15bf09529104ca38333d5f5) Change-Id: I5fe3df5515017ec24db1184e8aca823714fcfdb3 (cherry picked from commit 1c4771b5134911c1e0b1211ddaeecabbb3656716)
2017-12-18tdf#42949 Remove unused uno headers from /sw/source/coreBartosz Kosiorek2-2/+0
Change-Id: I0029144d049ad1c5ee3ff4d188ff969b6881712f Reviewed-on: https://gerrit.libreoffice.org/31095 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit c840c49b62b919ec4d0d947fe8cd530a785cf80d) (cherry picked from commit 4e10b49d74bedb12381c195fc53434237cd7dedb)
2017-12-05Fix typosAndrea Gelmini1-1/+1
Reviewed-on: https://gerrit.libreoffice.org/42726 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit e44c188a7353cc183fac8ece0cbf3611d842835e) Change-Id: I879a52820d78d9151ef64dd21612379f617f66e2 Reviewed-on: https://gerrit.libreoffice.org/45454 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 50e37a41acae8597fdb097715f8b76b16bce9f31)
2017-08-11Resolves: tdf#99286 for jpeg dpi use apis that know about MapUnit::MapPixelCaolán McNamara1-15/+3
move the code which can do this from sw to vcl Change-Id: I9940fb80ecdbfe8f70afc500c691288ed0993701 Reviewed-on: https://gerrit.libreoffice.org/40932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 939538e6a8d35c8ab4412908482feb053386bf3d)
2017-02-17tdf#104032: use correct text lengthMike Kaganski1-1/+1
Reviewed-on: https://gerrit.libreoffice.org/30980 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 7c43cba9804e70b23b71783d362401c75f9caa54) Change-Id: I16e6af179be3d7bee947c4054ae4fa6924b298f0
2017-01-26tdf#101828 handle rtf/richtext correctlyOliver Specht1-0/+1
Change-Id: Id894f62a918bd6e6fa59f8d546307343bf2bd4b0 Reviewed-on: https://gerrit.libreoffice.org/32682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 048e30c1f8231e6cd144a9251061f6fa127b353e) Reviewed-on: https://gerrit.libreoffice.org/33567 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-12-13crashtesting: assert on loading certain rtfCaolán McNamara1-1/+1
Change-Id: I17acf270f552571fec898e19fa2d000ec4c00df5 (cherry picked from commit 82f25d5de546225548725e4056fdf1148fe605eb)
2016-12-13Resolves: tdf#103938 replace fix for tdf#78599/tdf#87977Caolán McNamara1-2/+14
i.e. revert commit 162c72d64077d9e0dae820d881ce2b56a5b2040c Author: Caolán McNamara <caolanm@redhat.com> Date: Fri Jan 23 13:17:39 2015 +0000 and commit ad50b9a8636e0ee2f3c80669e8dde96577b26c4e Author: Caolán McNamara <caolanm@redhat.com> Date: Fri Jan 23 15:52:58 2015 +0000 Related: fdo#78599 wrong method and restore the original RegisterToFormat logic, and instead block setting modifications of the document until the explicit SetModified call to avoid the original problem of trying to generate a preview of the document during the section where it cannot be done Change-Id: I9dbec0a371d4d747b780aa271789d50a46eccefd Reviewed-on: https://gerrit.libreoffice.org/31957 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-18includes should be at the top of the fileNoel Grandin1-2/+1
not randomly scattered through the code found with something like: git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include" Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351 Reviewed-on: https://gerrit.libreoffice.org/30952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16make the element names in dumpAsXml match the class namesNoel Grandin2-3/+3
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-15loplugin:constantparamNoel Grandin1-6/+4
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-10-27loplugin:expandablemethods in swNoel Grandin1-1/+1
Change-Id: Ibc9edc28f4041235ab30c026bd3774bd74b7e960 Reviewed-on: https://gerrit.libreoffice.org/30287 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-20simplify some use of typeidNoel Grandin1-2/+2
Change-Id: I92362af5ef25052ec09b10a24c8fe051f6a51134
2016-10-19coverity#1371301 Missing move assignment operatorCaolán McNamara2-2/+2
Change-Id: Ibd6d4b52c24989af6872b4eb3c6c585c1e24a4db
2016-10-18tdf#89307: Removed T* SvRef::opeartor &()Jacek Fraczek1-6/+6
Usage has been replaced with SvRef::get() or removed where applicable. Change-Id: I49f108910b668466134c40940b53fc3ab2acd816 Reviewed-on: https://gerrit.libreoffice.org/29780 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-12convert PD_ constants to typed_flagsNoel Grandin1-2/+2
Change-Id: Ia651dfae33cb1e901f124541a1e12f240d4a7458
2016-10-12convert GET_POOLID constants to scoped enumNoel Grandin2-3/+3
Change-Id: Ifc54789d12d0b024ed28f13ec78b5c10afa902de
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek1-4/+4
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-05convert MapUnit to scoped enumNoel Grandin1-9/+9
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 Bergmann2-2/+2
...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-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke3-3/+0
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 Kaganski2-50/+50
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-21tdf#102233: avoid infinite loop recursion in IsProtect node methodJulien Nabet1-2/+6
See https://bugs.documentfoundation.org/show_bug.cgi?id=102233#c5 Change-Id: Ic985662011b33d4b20b7c60df33c9ecc97326e85 Reviewed-on: https://gerrit.libreoffice.org/28972 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-15sw: clean up useless dbglevel=2 code in swbaslnkMiklos Vajna1-10/+0
Change-Id: Ibb461df36578c700a6299ad35181e26af70ab928
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann2-3/+3
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-08loplugin:constantparam in swNoel Grandin2-28/+6
Change-Id: Ibae4cac28e6ff52298c804519f683017729c07a5
2016-09-08loplugin:constantparam in swNoel Grandin3-7/+6
Change-Id: Ic49d1c3c7b57fb213964ddc21b0f774c762aad94
2016-09-08convert nsRedlineMode_t to typed_flagsNoel Grandin3-17/+17
including fixing a bug in SwXMLExport::exportDoc where it was ORing with a constant from a different type: nsRedlineType_t::REDLINE_INSERT Change-Id: I2bb154c9a35d106e64fd1a8b6e928d0384c9fafe
2016-09-01coverity#1093229 Dereference null return valueCaolán McNamara1-1/+1
Change-Id: I6f9b6c024442f5152b5f2c72fa018f10b4b7866a
2016-09-01coverity#1372379 this can be a real assert cause we deref it afterwardsCaolán McNamara1-1/+1
Change-Id: Ic80132c5fa94d935910c1cfdb03f696b2812676a
2016-09-01coverity#1372376 assert can't have Division or modulo by zeroCaolán McNamara1-3/+3
Change-Id: I0b7615bb5a29e1a275647670351f643784467885
2016-08-30Revert "fftester: empty tabbox protection"Michael Stahl1-2/+1
This reverts commit da8583e9ae9dd7085e463b289533d2eeeccd761c. This should also be covered by commit dc83b3ae470914dbcb08fe1f0a4a4e1a1d3d8e19. Change-Id: I173eb3e7f51288574e4807553200a9ca59a45fef
2016-08-30Revert "fftester: non-contiguous cells"Michael Stahl1-12/+2
This reverts commit 9accbfa0a52433cf03fe186fc69334d387981eb9. ... and the code change of "avoid crashing on load of fdo54724-1.rtf" commit 4ee3eabd0f058b26544c84b2b5aaf5478d921817. It's much simpler to detect early in convertToTable that there is a row with no cells in it, which should not be allowed. Change-Id: Iff6d235b29514edd57cc55addeefb24242595d88
2016-08-30fftester: non-contiguous cellsCaolán McNamara1-2/+12
Change-Id: I1bf57f6e365b9e99a1893b5333e043ac6bc7b476
2016-08-30Let OUStringLiteral1 take its arg as ctor arg, not template argStephan Bergmann2-3/+3
...which makes it more flexible, can now also be used on non-const arguments. The drawback of the argument no longer being a compile-time constant is remedied by making the ctor constexpr. Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
2016-08-29Get rid of pointless indirect function pointer variablesTor Lillqvist2-5/+5
Change-Id: Ic8eddec51d59b531ae22421b796a148267b9f3c1
2016-08-29Adapt loplugin:stringconstant to improved OUStringLiteral1Stephan Bergmann2-3/+3
Change-Id: Ibc5128df8bcf8cb5f2f09551c0de6dfdb46bdee0 Reviewed-on: https://gerrit.libreoffice.org/28447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-29Fix SwDoc::AppendDoc for trailing sectionsJan-Marek Glogowski1-15/+24
We already treat the StartOfContent node special in the CopyRange function to prevent merging of SwTextNodes. For trailing sections, we have to expand the code to treat EndOfContent special too, because the supplied SwPaM range is handled as [mark, point[, so it previously missed the section end node, which resulted in "unhiding" the last section, if it was the last node in the document. Change-Id: Ie094e2a0182647a49c9ba45d08a7dd2cabe667c6
2016-08-27fftester: empty tabbox protectionCaolán McNamara1-0/+2
Change-Id: I56b0845205d6968355b3327721bf9ca0930903e1
2016-08-18cppcheck: noCopyConstructorCaolán McNamara1-0/+4
Change-Id: Id5323cb6f52666f85965e11b07e4f2bca8af4e78
2016-08-18cppcheck: passedByValueCaolán McNamara1-2/+2
Change-Id: I3ffcfe1294a1cbb06aadd3a1a79e9259876e38cc
2016-08-16GSoC Writer Table Styles; Update by exampleJakub Trzebiatowski1-0/+29
+ Added possibility to update style by example. + Fixed SwTableAutoFormat::GetBoxFormat Change-Id: I80d9334ceda0ef7e0984fb54731850034b44cd44 Reviewed-on: https://gerrit.libreoffice.org/28063 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-08-10GSoC Writer Table Styles; Create by example; fix undoJakub Trzebiatowski1-0/+58
- Create style by example, tracked by undo; - Fixed delete style, now is tracked by undo Change-Id: Ic39b549b0b970b1b15001d527a82fb26e4a630aa Reviewed-on: https://gerrit.libreoffice.org/27990 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-29sw undo: implement SfxUndoAction::GetViewShellId() interfaceMiklos Vajna1-2/+2
With this, it's possible to tell which view shell created which undo actions. It's visible only in the doc model xml dump only, though. Change-Id: Ia76d218a1d8b578aaad00ab733c772b10dda39f0 Reviewed-on: https://gerrit.libreoffice.org/27693 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-19clang-tidy performance-unnecessary-value-param in swStephan Bergmann2-2/+2
Change-Id: I6cd0d28dade01366b087aebff894b6f003d87b31
2016-07-08loplugin:redundantcast: redundant static_casts in swStephan Bergmann3-7/+7
Change-Id: I09c1ebaf5742e983ee05942a4c7c17c6aa5179cc
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann2-2/+2
Change-Id: I7e7cdfa5efaf18bb47d40947d4e1d91a2c9b5a57
2016-06-27loplugin:singlevalfields in sw(part4)Noel Grandin1-1/+1
Change-Id: I73d94ae89edb2e6f37cfa087a0d85b5a90df4a8a Reviewed-on: https://gerrit.libreoffice.org/26679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30tdf#98226: fix undo of table AutoFormatMichael Stahl1-1/+6
The new call to SwTable::SetTableStyleName() was not recorded in SwUndoTableAutoFormat and hence persisted even after Undo. (regression from 73f4a06c0bce51c7c8b9ae9adfdc7ffac27d06b4) Change-Id: Ia7f769dafa62f02ff8e4b0596b48266190c7a69b