summaryrefslogtreecommitdiff
path: root/sw/inc/doc.hxx
AgeCommit message (Collapse)AuthorFilesLines
2015-11-25Indentation fixesMiklos Vajna1-1/+1
Change-Id: I82678b037aff5409e54bc50744b1b4b2c8d4d83b
2015-11-24loplugin:unusedfields in sw/Noel Grandin1-8/+1
Change-Id: I0d9c79d0756ef85260d3b69cb1e879d7665bf356
2015-11-12bin/rename-sw-abbreviations.sh run to fix few re-introduced abbrvtns.Jan Holesovsky1-6/+6
Change-Id: I11d282c3be86feb57f5279220d84d8a121df0dbd
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-41/+41
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-11-07Misc tweaks and cleanups.Ashod Nakashian1-2/+2
Streamlined a couple of hotspots and some minor cleanups. Change-Id: I85a9423e03f7e20ce78736a44d668da859a443cd Reviewed-on: https://gerrit.libreoffice.org/19720 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-11-06com::sun::star->css in sw/incNoel Grandin1-17/+15
Change-Id: I6ffdb1deaa32156c65f997a1a1056928b7cd863d Reviewed-on: https://gerrit.libreoffice.org/19803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-27Optimised UnoCrsrTbl cleanup for faster doc savingAshod Nakashian1-1/+12
SwDoc has weak_ptr list to notify UnoCrsr instances when the doc is about to die. These were updated when each UnoCrsr instance was destroyed. The first performance issue is the use of a list. This no doubt is done to avoid the overhead of removing items at arbitrary position from a vector. Performance tests show vector is faster with a large document and ~10k UnoCrsr instances. More important, there is no need to clean up the references as frequently as when each UnoCrsr is destroyed as they are rarely referenced at all. Having outdated references is no issue either. The new logic uses a vector and cleans up only after saving a document and before saving UnoCrsr instances. Saving ODT files is now significantly faster for large documents (100s of pages). Change-Id: I3895d9d80d174cda9c94b94837e2149e9fadcb42 Reviewed-on: https://gerrit.libreoffice.org/19604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-3/+3
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-1/+1
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-02loplugin:unusedmethodsNoel Grandin1-1/+0
Change-Id: Ie1603adf3908fd0668bcbe8f75c6bafa0d0bfd6c Reviewed-on: https://gerrit.libreoffice.org/19072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-27sw table styles: Direct formatting takes precedence over table style.Jan Holesovsky1-2/+3
Make sure we don't reset the direct formatting with the table style when updating. Change-Id: I07b4a687fd0403bd80d73732a66101b967398507
2015-09-27sw table styles: Implement table styles in Writer.Jan Holesovsky1-0/+7
This extends the table auto formats so that SwDoc keeps track of the auto formats used in the document. With this in mind, we can update the format of the table with every operation like adding/removing a line, splitting a table, etc. So far we only have the core functionality, and cover inserting a line in the table; more to come. Based on work of Alex Ivan <alexnivan@yahoo.com> during GSoC 2013 - thank you! Change-Id: I7839147e54c2f976988121a523331def9859f4c2
2015-09-23remove unused Link<> parameterNoel Grandin1-2/+1
Change-Id: I9d8916b69e2e986ee1e30091cb046e7812a68ed1 Reviewed-on: https://gerrit.libreoffice.org/18795 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-18convert Link<> to typedNoel Grandin1-6/+6
Change-Id: I124ed873862684efe7cab52c26d13c6621d49aab
2015-09-17Give drawing objects unique names by defaultCaolán McNamara1-0/+1
when created through the UI, similar to how frames and graphics get names. This way they appear in the navigator by default Change-Id: I5ec92221583494a0908948d6d0c0815980cb7050
2015-09-09convert Link<> to typedNoel Grandin1-1/+1
Change-Id: I2aeda615e39db5a3cd39e168db34425e2912be8b
2015-08-20tdf#93240: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl1-8/+6
Change-Id: I38f9140e565ab2a4d5dc7ad0c1d52837a5b5b67a
2015-08-07sw: use std::unique_ptr in sw-global includesMiklos Vajna1-22/+21
Change-Id: I7b1a313e6c36fd162878cfc9f17ae73f91a72665
2015-07-21loplugin:unusedmethods swNoel Grandin1-18/+0
Change-Id: Ied51535fa169451fc4991237122817a34a59f6fe Reviewed-on: https://gerrit.libreoffice.org/17256 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-13editeng: make Link<> usage typedNoel Grandin1-1/+1
Change-Id: Iec36c7e4f4fbc2ee2ee25d4d0c8488340ba7d8c4 Reviewed-on: https://gerrit.libreoffice.org/16968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-10sw: clean up SwDoc::maPatternNms nonsenseMichael Stahl1-10/+3
Change-Id: I0a166d1b58b23cac96ae27d446d6d8ed2442df8e
2015-07-08Fix typosAndrea Gelmini1-1/+1
Change-Id: I020c7ce4d9aa93cb0292378a410cdb9f7788e920 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-07-04Fix typosAndrea Gelmini1-3/+3
Change-Id: Id9296115f30858e7fd470a199e59343a96d7deec Reviewed-on: https://gerrit.libreoffice.org/16712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-05-26now rename the new CreateUnoCrsr2 to CreateUnoCrsr, as the old stuff is goneBjoern Michaelsen1-2/+2
Change-Id: I82f8ed0560750d4f7bec71ea8bd3c8089b884da7
2015-05-26remove old SwUnoCrsrTbl and CreateUnoCrsrBjoern Michaelsen1-5/+0
Change-Id: I91e4c7f0e0231b7783affdce63c6ab395a4e219b
2015-05-26handle PamCorr also with the new containerBjoern Michaelsen1-1/+1
Change-Id: I2eeb8dbe06d36c2882f443a2bc27bea54b97e3c7
2015-05-26introduce CreateUnoCrsr2 to migrate to sane memory mngmtBjoern Michaelsen1-0/+2
Change-Id: Ia530827daa354555983c3c28c5aeec38bc3dbf11
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier1-231/+231
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-18tdf#89783: Allow more than 64k PageDescsKatarina Behrens1-8/+8
+ adjust related code using the functionality Change-Id: I6fa4ad04137643009ee39522c36d6c9e6f3d2502
2015-05-14tdf#86639 SwEditShell: when setting para style, reset char attrs if neededMiklos Vajna1-1/+1
The old internal RTF filter used to call SwTxtNode::SetAttr() without setting SetAttrMode::NOFORMATATTR, so character attributes which cover the whole node got converted to paragraph attributes. The new UNO filter goes through SwXText::insertTextPortion(), which sets SetAttrMode::NOFORMATATTR, so this doesn't happen. The result of this is that when the UI sets a new paragraph style on the text node, then such character attributes are no longer removed. Given that in RTF you can't really have character properties on a paragraph, going back to the document model produced by the old internal filter doesn't sound like the good direction -- not to mention that changing SwXText::insertTextPortion() this way would be an implicit API change. Fix the problem by tweaking SwEditShell::SetTxtFmtColl() instead, so that it removes these full-text-node character attributes, too. The logic in SwTxtNode::RstTxtAttr() can be extended later if necessary to delete more attributes, but to be on the safe side, just handle the bare minimum necessary to fix the problem for now. Change-Id: I5faa3226fc0f9c18e005da185fe0830d8c393256
2015-05-10Replace IMPL_STATIC_LINK[_TYPED] with more useful variantsStephan Bergmann1-1/+1
Change-Id: I9764e8860ee66cc94456eae879a9fc90d0ad850d
2015-05-09sw: fix assert with frames anchored in redlines on rhbz490395-1.odtMichael Stahl1-5/+0
SwRangeRedline::Show() will move nodes around in the nodes-array, which means that using SwNodeIndex as a key in a map that has a lifetime not limited by the stack is a bad idea, as the map will become unsorted. Remove SwFrmFmtAnchorMap from SwDoc and replace it with new SwNode::m_pAnchoredFlys to do the same mapping. (regression from 738fb2ad77e5a1a4d6e2dc540886a17f4527e4db) Change-Id: I396d92b9d0b2045e98bad6d0b374303cd4e62b59
2015-05-05Use typed Idle::SetIdleHdl LinkStephan Bergmann1-1/+1
Change-Id: I189937950325dc4ef663f7f49cb45f38f8537de9
2015-05-05loplugin:staticmethodsNoel Grandin1-36/+36
Change-Id: I90dd921077bbfc57200e398e7959306f26c65cfe
2015-05-03tdf#89783: Adjust to new GetPos retval (size_t vs. sal_uInt16)Katarina Behrens1-2/+2
Some of the usages of GetPos were just misusing it to find out whether a vector contains given element -- use Contains() in those cases This patch is partially based on work of Christoph Lutz Conflicts: sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8num.cxx Change-Id: I40bedba905e7577ba23f69acee178e0ea7cc1521
2015-05-03tdf#89783: sal_uInt16 replacement by size_t: sectionsVasily Melenchuk1-1/+1
These replacements allow LO to load, save and mail merge documents having more than 65536 sections in total. Change-Id: I0e70889b1edc6e472a39f1f2638ac3c70a0d7058 Signed-off-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-04-30Gradually typed LinkStephan Bergmann1-4/+4
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-30Bin some pointless comments and reduce some vertical whitespaceTor Lillqvist1-1/+0
Bin pointless '// predeclarations' or '// forward declarations' comments. If a programmer doesn't know what a forward declaration is, well, why read C++ source code? Also bin some pointless '// end of namespace foo' comments after namespace blocks just a handful of lines long, and some superfluous vertical whitespace. Change-Id: I2a31c5d73d9b4de8825fb8eb9e7559dbd7303ef9
2015-04-03Resolves: tdf#87548 don't create a new list for each multiselection portionCaolán McNamara1-3/+5
create one list and share it among all the subsections possibly a regression from/triggered by author Oliver-Rainer Wittmann <orw@apache.org> 2014-03-18 14:33:39 (GMT) Resolves: #i124371# When changing the numbering or bullet styling... of a set of paragraph which have more than one different List Style applied create a new List Style and put the paragraphs into a new list. (cherry picked from commit 0087ca89e3905009ed947c651f3dc70f3d61ea93) Change-Id: I9416b97d6afe323ac99150fdcc23f71ecea98a58
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann1-2/+2
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
2015-03-25Typo: formated->formattedJulien Nabet1-1/+1
Change-Id: Iefd4d375a0dfb36732233852f906c6b85dccc2a5
2015-03-06Timer: Adapted all idle includes and enum usesTobias Madl1-0/+1
Change-Id: Id4ef36d6c80ad62306bdbaa7094c2cb0b8ff77da
2015-03-03Drop local FindPageDesc implementationsJan-Marek Glogowski1-1/+3
There are quite some places, which manually walk the vector of SwPageDesc to find the named item. Replace all of them and also drop the duplicated and unused GetPageDesc function. Additionally adds a ContainsPageDesc function, which checks the vector for the SwPageDesc pointer. Change-Id: I7ade35b78d8208dc00ee56a8f83c3ebadaebb8af Reviewed-on: https://gerrit.libreoffice.org/14508 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-02convert SW_CHAIN_ constants to enum classNoel Grandin1-2/+2
Change-Id: If3cd86cbb0b01f975456b93b05232e18ec742828
2015-02-28Extract SwDoc::dumpAsXml() from docnodeMiklos Vajna1-1/+1
Change-Id: I49a35270d6ff2ea5c840a1f4f73d1f6a0701b2d5
2015-02-14related tdf#89004 move to std:set instead of std::vectorUrsache Vladimir1-1/+1
Conflicts: sc/source/core/data/document10.cxx sw/source/core/doc/docfmt.cxx Change-Id: I1312f476607ea3a78b162a7e59323b0a142f6629
2015-02-07loplugin:deletedspecialStephan Bergmann1-2/+1
Change-Id: Ia2b137e0167966a3d0b60f3c642a106834da8f1c
2015-01-29callcatcher: large newly detected unused methods post de-virtualizationCaolán McNamara1-1/+0
i.e lots now able to be detected after... commit b44cbb26efe1d0b0950b1e1613e131b506dc3876 Author: Noel Grandin <noel@peralex.com> Date: Tue Jan 20 12:38:10 2015 +0200 new loplugin: change virtual methods to non-virtual Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
2015-01-26new loplugin: change virtual methods to non-virtualNoel Grandin1-13/+13
Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2015-01-21SwSection::GetFmt const-correctnessStephan Bergmann1-2/+2
...otherwise, wouldn't make sense to have non-const/const overloads anyway. Needs to introduce one const_cast into doctxm.cxx (which already contains quite a handful), otherwise the required changes would turn into too much of an avalanche. Change-Id: I694c7a1df7089d83ee95d35ed09bb864e9703f7c