summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/CntntIdxStore.cxx
AgeCommit message (Collapse)AuthorFilesLines
2017-08-02tdf#105705 sw: sort bookmarks in ContentIdxStoreImpl::RestoreBkmks()Michael Stahl1-0/+6
The problem here is that the SplitNode() calls in SwRTFReader::Read() destroy the order of the bookmarks, which causes an assert later from the std::lower_bound() when a new mark is created. The 2 marks that cause the problem are: SwPosition (node 5, offset 0) SwPosition (node 5, offset 0), SwPosition (node 5, offset 0) During the 2 SplitNode calls, the second one is corrected by ContentIdxStore and remains on 5, but the first one is not and becomes: SwPosition (node 7, offset 0) ContentIdxStoreImpl::SaveBkmks() does different things when a mark position is exactly on the parameter position: if it has only one position, it is ignored, but if it has a second position, then both its positions are corrected. It is not possible to change the sort order so that marks with one position are sorted behind marks with 2 positions, because while SplitNode() corrects marks "backward", JoinNode() uses ContentIdxStore to correct marks "forward"; hence manually sort the marks. Change-Id: If5b35f18bfd47ffe98c0f67e84d380ca801411a3 (cherry picked from commit f2d2093b2198bd4c65475a60329a5a6a7a8575f1) Reviewed-on: https://gerrit.libreoffice.org/40544 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann1-1/+1
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-07-21Resolves: tdf#95340 orig lcl_ChkUnoCrsrPaM had reversed 'set' to lcl_ChkPaMCaolán McNamara1-19/+10
merge lcl_ChkUnoCrsrPaM and lcl_ChkPaM keeping the original logic, turns out they differed in how they swapped the mark and point Change-Id: Id2575c9690442494c3286a26ab099e8c4c62f884
2016-07-21rename lcl_ChkUnoCrsrPaM and split it up to be like lcl_ChkPaM[Both]Caolán McNamara1-13/+11
Change-Id: I8850031da3901fb3d828c3af20f98ca741fc2a4a
2016-07-21bChkSelDirection is always falseCaolán McNamara1-17/+5
Change-Id: I1aaf2c17d76ac1d69dfcc268ae1b689c0f1c3fa2
2016-07-21update to new naming and castingCaolán McNamara1-9/+8
Change-Id: I389efc2f45f3110932318882faea82ab8565f89a
2016-07-21restore lcl_ChkUnoCrsrPaMCaolán McNamara1-2/+31
Change-Id: Iab155151226f3a7f00ca649bd690c4391ade8a52
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin1-2/+2
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-22Avoid reserved identifiersStephan Bergmann1-1/+1
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-04-01tdf#97966 Drop 'static' keywordsWastack1-3/+3
Including no keywords from extern "C" blocks Change-Id: Ie3160af9decf04ceeda02dc20a6518afaa80f972 Reviewed-on: https://gerrit.libreoffice.org/23677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon1-43/+43
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-12bin/rename-sw-abbreviations.sh run to fix few re-introduced abbrvtns.Jan Holesovsky1-5/+5
Change-Id: I11d282c3be86feb57f5279220d84d8a121df0dbd
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-2/+2
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-10-27Optimised UnoCrsrTbl cleanup for faster doc savingAshod Nakashian1-1/+2
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-5/+5
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-06 tdf#94559: 4th step to remove rtti.hxxOliver Specht1-1/+1
replaced use of PTR_CAST, IS_TYPE, ISA in idl, editeng, sc, sd, sw, sfx2, sot, starmath Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653 Reviewed-on: https://gerrit.libreoffice.org/19132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-07-31sw: replace boost::function with std::functionMichael Stahl1-2/+1
Change-Id: I5a0a0e83366ce518fc74d915bb8c43cc883ff016
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann1-1/+1
Change-Id: I8d27ae80d209159690182ab91e272cf00e9f863d
2015-05-26loplugin:redundantcastStephan Bergmann1-1/+1
Change-Id: Id30d771b85716ab9c51e4c8fde36ad397ab44678
2015-05-26now rename the new CreateUnoCrsr2 to CreateUnoCrsr, as the old stuff is goneBjoern Michaelsen1-1/+1
Change-Id: I82f8ed0560750d4f7bec71ea8bd3c8089b884da7
2015-05-26remove old SwUnoCrsrTbl and CreateUnoCrsrBjoern Michaelsen1-15/+0
Change-Id: I91e4c7f0e0231b7783affdce63c6ab395a4e219b
2015-05-26CntntIdxStore should also handle new unocrsrsBjoern Michaelsen1-0/+18
Change-Id: I37a120f891a07acdc467d0197d112139ec9b8c01
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier1-93/+93
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-11loplugin:cstylecast: nop between pointer types of exactly same spellingStephan Bergmann1-3/+3
Change-Id: I0e42e757a6f7b0c28758193aad8b3cb01607b8b1
2015-05-05loplugin:staticmethodsNoel Grandin1-2/+2
Change-Id: I90dd921077bbfc57200e398e7959306f26c65cfe
2015-02-18boost->stdCaolán McNamara1-3/+3
Change-Id: I412137e7e7b9b2b87f401bc140a9499d1fc012c6
2015-01-16fdo#39440 sw: reduce scope of local variablesMichael Weghorn1-1/+1
This addresses some cppcheck warnings. Change-Id: I4c55c109f81407d5383932e4254e0f5f61d12cd7 Reviewed-on: https://gerrit.libreoffice.org/13939 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-01-05Resolves: fdo#87003 Kill BOOST_FOREACH on masterNathan Yee1-10/+9
use C++11s range-based for() loops instead Conflicts: sd/source/filter/eppt/pptx-epptooxml.cxx Change-Id: I0868eb345932c05b7e40b087035da252b99bf0b9 Reviewed-on: https://gerrit.libreoffice.org/13714 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-12-18Related fdo#86929: Kill FOREACHPAM_START for good (final part)Julien Nabet1-9/+12
Change-Id: I74c6e8633ee5ac477d2f7ac8ee468204076bc886 Reviewed-on: https://gerrit.libreoffice.org/13488 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-04use C++11 iterationBjoern Michaelsen1-7/+7
Change-Id: I887b402cfd0d4556e0e0b4fd45ec6fe061c84e06
2014-12-04unnecessary castBjoern Michaelsen1-1/+1
Change-Id: I9b77a5af763977836058f6bd435a5bdb78fdf522
2014-11-14loplugin: cstylecastNoel Grandin1-4/+4
Change-Id: I7235a67e85c10ec9fefe7f718cda18f633cda97a
2014-08-12Refactored IDocumentLayoutAccess out of SwDoc.Valentin Kettner1-1/+2
Into the new class DocumentLayoutManager. Change-Id: I02d0cfcc63633d0bdab380508b2ef563187fd269
2014-08-12Refactored IDocumentFieldsAccess out of SwDoc.Valentin Kettner1-2/+4
Into the new class DocumentFieldsManager. Removed SwDoc::_MakeFldList because it is not defined anywhere. Also moved a few non interface methods that belong to the manager. Change-Id: Icefd7ca7adcbb05a18d6fae0529fc54150b862fd
2014-07-28use the Redline iteratorBjoern Michaelsen1-3/+3
Change-Id: Ia15e5a376b2a7503f56f183a555e21d1122fe66f
2014-07-26coverity#1228874 Uninitialized scalar variableCaolán McNamara1-1/+1
Change-Id: I784ee8e0de87996e408656ffed5b8326cc0ab74f
2014-07-25remove unused paramsBjoern Michaelsen1-8/+8
Change-Id: I6e297a5972bf6d50f99e0533c6f8b15d552de970
2014-07-25kill SAVEFLY_SPLIT tooBjoern Michaelsen1-5/+5
Change-Id: Iaeecdb35c0eaebea8e879f36a21237c98a2c7ed0
2014-07-25SAVEFLY is a noop, just use a boolBjoern Michaelsen1-2/+2
Change-Id: I32255ca073d52616d3e5c9e80f32471e0a7df3fa
2014-07-25move into the loop and constifyBjoern Michaelsen1-2/+1
Change-Id: I8544755a1b1a32fdf85823e50cf5db6c4909b485
2014-07-25we can do this before the conditionalBjoern Michaelsen1-2/+1
Change-Id: Iedd3404931e578c40726d663e5460e9e3af56832
2014-07-25remove unused headersBjoern Michaelsen1-14/+0
Change-Id: I6829e0780c051a67fbec7c33f6f45dedaf31d7f1
2014-07-25use make_shared hereBjoern Michaelsen1-1/+2
Change-Id: I0535517f39508abb3e0b454081e4a64d375ecbc4
2014-07-25move CntntIdxStore to own fileBjoern Michaelsen1-0/+455
Change-Id: Ic8280478b154b9b132f74e260edea46911cb1803