summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/ssfrm.cxx
AgeCommit message (Collapse)AuthorFilesLines
2018-10-03tdf#41542 sw cleanup: m_bBorderDist was always trueJustin Luth1-2/+2
This was forced to True in LO 5.4, leaving the variable intact in case any problems arose that would make it easier to revert. But now it is time to clean it up and remove the unnecessary logic. I didn't change the indenting because I don't like obscuring the significant changes. I can do that in a followup commit. Change-Id: Iab04a6a8f4ba8ff7151cf7941f655173136258eb Reviewed-on: https://gerrit.libreoffice.org/61270 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-09-19sw_redlinehide_2: JoinPrev() may need to move frames on deleted ...Michael Stahl1-2/+9
... prev. Node to the second node, if the two were merged before the Join. Change-Id: I047b6008c5f0bb6e79c63421a4dba09ba8cf3320
2018-09-19sw_redlinehide_2: fix ordering of SplitNode usage of ContentIdxStore 2Michael Stahl1-1/+8
The flys have their anchor positions updated, and that causes lookups from the layout frame to the anchor SwTextFrame, but that isn't updated yet; it looks like the fly restore must be done after adapting the SwTextFrames, while the redline restore must be done before. Also RegisterToNode must call Check only for the 1st node. Change-Id: If87a62108f1bcaf794e5be1cc38dc936f08cd69e
2018-09-19sw_redlinehide_2: show/hide footnotes in redlinesMichael Stahl1-1/+2
This requires some manual work to delete the footnote frames. Change-Id: I2c5efccdd1e97f26e18402b809ca4f893147cba1
2018-09-19sw_redlinehide_2: assert that SwContentFrame is created only when allowedMichael Stahl1-0/+1
Change-Id: I1b42b386eb7323dcbf40d4086276bd0a74d581b9
2018-08-09forcepoint73 deleted SwAnchoredObject still referenced in TmpConsiderWrapInflCaolán McNamara1-0/+1
Change-Id: If255723834d049865fcf6fd0eac7768dfcbad2a1 Reviewed-on: https://gerrit.libreoffice.org/58760 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-09dynamic_cast followed by static_castCaolán McNamara1-2/+2
Change-Id: I931ed8945b4af713ead42e0eca0bb5fb6cb07d9c Reviewed-on: https://gerrit.libreoffice.org/58759 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-08sw_redlinehide: SwContentFrame::DestroyImpl()Michael Stahl1-3/+8
Change-Id: I4539ef0a7dc04de1c87cf6f54ca319dbdc719755
2018-06-08sw_redlinehide: convert to GetDep()Michael Stahl1-1/+1
Change-Id: I3b128fe797e8fd6989821cfd540dc5e630e74d37
2018-06-08sw_redlinehide: use WriterMultiListener to connect SwTextFrameMichael Stahl1-1/+4
... with multiple SwTextNodes in CheckParaRedlineMerge() Change-Id: I57402ca7d2210fc30015b9a7e2e05216e0b8a8eb
2018-06-08sw_redlinehide: reinit m_pMergedPara on split nodeMichael Stahl1-0/+1
Change-Id: I560f1cdb537fa848fdbaf719424d4e6608ceda0d
2018-06-08sw_redlinehide: move SwContentFrame::RegisterToNode to SwTextFrameMichael Stahl1-1/+2
It is only called on SwTextFrame, since other SwContentFrame do not register at SwTextNode but their own node type. Change-Id: I2bbb4571810a407c33f526f6df526727bde67b65
2018-04-07Revert "long->sal_Int32 in tools/gen.hxx"Stephan Bergmann1-14/+14
This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0. As discussed at <https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html> "long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with signed integer overflow, and the original plan was to redo it to consistently use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/> "sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed miserably on Windows, causing odd failures like not writing out Pictures/*.svm streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best approach is to just revert the original commit, at least for now. Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix Library_vclplug_qt5". Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae Reviewed-on: https://gerrit.libreoffice.org/52532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-03long->sal_Int32 in tools/gen.hxxNoel Grandin1-14/+14
which triggered a lot of changes in sw/ Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6 Reviewed-on: https://gerrit.libreoffice.org/48806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21loplugin:changetoolsgen in swNoel Grandin1-12/+12
Change-Id: If07efe4c15cfc28df38a9327856d39313ca78d50 Reviewed-on: https://gerrit.libreoffice.org/50078 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04sw: convert SwFrame::mpDrawObjs to unique_ptrMichael Stahl1-6/+5
Change-Id: I0713e6fb2b3f2cfc3115daafe37ae5380f3e7938
2017-12-19loplugin:unusedmethodsNoel Grandin1-45/+0
Change-Id: I3ffd9142fed98e4df75c2c28f8a025be3e8eb803 Reviewed-on: https://gerrit.libreoffice.org/46687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07SwFrameBorder: Removed IsInverse() from SwFrameArmin Le Grand1-2/+1
IsInverse was always false and never set, elliminating it from SwFrame makes the code cleaner and reduces cases for SwRectFnSet from 5 to 3, making it also more understandable. Cleaned up all the code using it, ran all UnitTests, works well. In question, this single commit can be re-applied. Change-Id: If077c65a6dacd83de61d259cddbb3cd4c5e25a2f
2017-12-07SwFrameBorder: Preparations and renamingsArmin Le Grand1-2/+2
As preparation to restucture the Paint of Borders for SwFrames (Writer), isolated and renamed some of Writer functionality to get a better overview Change-Id: I7b4d5acc84f0c52519c2de0e5a5caa68e75957b5
2017-10-31RotateFlyFrame2: Unified FrameAreaDefinitionArmin Le Grand1-62/+62
Isolated all Frame AreaDefinition and it's layout flags to SwFrameAreaDefinition class which is now base for SwFrame. Adapted calls to get/set and WriteAccess hekper classes accordingly. This allows much deeper understanding what Writer is doing when layouting it's frames and needed when reaction on such changes is necessary Change-Id: I96220a1d140e69c76cc63023aae26e4ed17f3504
2017-10-30Adapted to get methods and WriteAccess helpersArmin Le Grand1-36/+16
Change-Id: Ife3c1b2391ad7beae8c7f31f796b1454709ddd26
2017-10-30Adapted to get/setSwFrame and get/setSwPrintArmin Le Grand1-78/+78
Change-Id: I6cce40ec49dd5bd32d94fe06b9d2dabd368448be
2017-10-30Migrated from SwFrame::PrintWA to setPrintArmin Le Grand1-12/+32
Change-Id: Ieea3b467f296a190de5b5f47721bef148bebf60b
2017-10-30Migrated from SwFrame::FrameWA to setFrameArmin Le Grand1-26/+66
Change-Id: I01f7b828fe2134411cc76639e880da46b415d767
2017-10-30Isolated SwFrame members maFrane and maPrtArmin Le Grand1-64/+64
To gain more control over changes of the Writer layout, isolated mentioned members and replaced all calls with inline methods for read and/or write access. Moved to own class to also identify 'private' accesses reliably. Change-Id: Ib0b7f852f5176744e860e2aad12dd13c9a906d68
2017-06-05Improved loplugin:cstylecast to reference types: swStephan Bergmann1-1/+1
Change-Id: I7206d3325b4bfedb852d559b68dc1678da524b41
2017-04-11tdf#107057 revert the logic of SwFrame::PaintAreaMark Hung1-5/+0
It seems that getting the minimum of all the bottom the window doesn't work when there are merged cells. This reverts commit b13a0a27444ffbf9ef45cb16ad69fdff0dc64306. Change-Id: I39a22a477874794912e44d4f56c2de27bc5e7179 Reviewed-on: https://gerrit.libreoffice.org/36382 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-04-07tdf#106390 improve table in table and table in frame clipping.Mark Hung1-0/+5
Set bottom of PaintArea() with the topmost botom of the upper frames, in case table might be cover by upper frame. Change-Id: Id379469114af2c3c5f844a69b584863f7dd7fd4c Reviewed-on: https://gerrit.libreoffice.org/35237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-08convert SvxShadowLocation to scoped enumNoel Grandin1-1/+1
Change-Id: Ie51995579312328538263172cd3173641df89bca Reviewed-on: https://gerrit.libreoffice.org/34965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-20loplugin:expandablemethodds in sw(part2)Noel Grandin1-3/+3
Change-Id: Idc2118899a8063099b66c0f5db40d8402db063d1 Reviewed-on: https://gerrit.libreoffice.org/30083 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03Fix typosAndrea Gelmini1-1/+1
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-01-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon1-178/+178
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-4/+4
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-10-20loplugin:defaultparamsStephan Bergmann1-1/+1
Change-Id: I11ff551955c1ac291ab576f2f18c2dd410427eda
2015-10-06 tdf#94559: 4th step to remove rtti.hxxOliver Specht1-5/+5
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-10-01tdf#39080 Interactive hide-whitespace modeAshod Nakashian1-1/+1
Support for enabling and disabling hide-whitespace by clicking between page frames. Disabled header and footer decorators when hide-whitepsace is enabled, and page size is trimmed to the contents of each page. Experimental/suggestive mouse pointers added but only tested on Windows. Change-Id: Ia2faeeda9e3e783ffaf5340aa69303a4218892a7 Reviewed-on: https://gerrit.libreoffice.org/18156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-02crashtest: don't crash on layout of ooo70429-[1|2]Caolán McNamara1-0/+1
Invalid read of size 8 at 0x2DF1B82A: SwFlowFrm::HasFollow() const (flowfrm.hxx:163) by 0x2E3F80BF: CalcContent(SwLayoutFrm*, bool, bool) (fly.cxx:1652) by 0x2E49A960: SwSectionFrm::_CheckClipping(bool, bool) (sectfrm.cxx:1037) Address 0x20c1f978 is 248 bytes inside a block of size 288 free'd by 0x2E497284: SwSectionFrm::~SwSectionFrm() (sectfrm.cxx:153) by 0x2E4B0D1C: SwFrm::DestroyFrm(SwFrm*) (ssfrm.cxx:390) by 0x2E4B1485: SwLayoutFrm::DestroyImpl() (ssfrm.cxx:499) by 0x2E4B0CD3: SwFrm::DestroyFrm(SwFrm*) (ssfrm.cxx:388) by 0x2E4B1485: SwLayoutFrm::DestroyImpl() (ssfrm.cxx:499) by 0x2E454CC6: SwPageFrm::DestroyImpl() (pagechg.cxx:270) by 0x2E4B0CD3: SwFrm::DestroyFrm(SwFrm*) (ssfrm.cxx:388) by 0x2E458237: SwFrm::InsertPage(SwPageFrm*, bool) (pagechg.cxx:1226) by 0x2E49CD8B: SwFrm::GetNextSctLeaf(MakePageType) (sectfrm.cxx:1564) by 0x2E3EB912: SwFrm::GetLeaf(MakePageType, bool) (flowfrm.cxx:785) by 0x2E3EE83E: SwFlowFrm::MoveFwd(bool, bool, bool) (flowfrm.cxx:1840) by 0x2E3D7CF0: SwContentFrm::MakeAll(OutputDevice*) (calcmove.cxx:1171) by 0x2E3D2E8B: SwFrm::PrepareMake(OutputDevice*) (calcmove.cxx:277) by 0x2E4CE31C: SwFrm::Calc(OutputDevice*) const (trvlfrm.cxx:1798) by 0x2E56E174: SwTextFrm::CalcFollow(int) (frmform.cxx:282) by 0x2E56F718: SwTextFrm::_AdjustFollow(SwTextFormatter&, int, int, unsigned char) (frmform.cxx:590) by 0x2E5716D3: SwTextFrm::FormatAdjust(SwTextFormatter&, WidowsAndOrphans&, int, bool) (frmform.cxx:1110) by 0x2E570A6E: SwTextFrm::CalcPreps() (frmform.cxx:892) by 0x2E574163: SwTextFrm::Format(OutputDevice*, SwBorderAttrs const*) (frmform.cxx:1767) by 0x2E3D8E4F: SwContentFrm::MakeAll(OutputDevice*) (calcmove.cxx:1337) by 0x2E3D319F: SwFrm::PrepareMake(OutputDevice*) (calcmove.cxx:340) by 0x2E4CE31C: SwFrm::Calc(OutputDevice*) const (trvlfrm.cxx:1798) by 0x2E3F77B7: CalcContent(SwLayoutFrm*, bool, bool) (fly.cxx:1466) by 0x2E49A960: SwSectionFrm::_CheckClipping(bool, bool) (sectfrm.cxx:1037) Change-Id: I089981eda62bff63782338b5210b78f69b6d5f0b
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier1-34/+34
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-04-24sw: merge the SwFrm::Destroy() into SwFrm::DestroyImpl()Michael Stahl1-18/+2
Change-Id: Icbf7246cf87d5f3f5e418df6657c5bb07aa99f4b
2015-04-24related: tdf#90820 refactor SwFrm destructionMichael Stahl1-8/+37
Move all logic out of destructors, so it cannot happen any more that members of a sub-class are accessed from a superclass destructor, when those members are already dead. Logic is now in virtual DestroyImpl() methods. All SwFrms must be deleted with SwFrm::DestroySwFrm(). Change-Id: Icec5b12e12d5a2d955cb5844d7d4f7ac85ab79cd
2015-04-08convert SHADOW_ constants to enum classNoel Grandin1-2/+2
Change-Id: I1d3c144b2438776a31a246a2d0d4fe57b0caeaa3
2015-04-01convert BOX_LINE and BOXINFO_LINE to enum classNoel Grandin1-4/+4
since their usage is intertwined. Also introduce new o3tl utilities enumrange and enumarray to make working with scoped enums a little simpler. Change-Id: I2e1cc65dd7c638e59f17d96dfae504747cad6533
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann1-1/+1
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
2014-12-18sw: prefix SwLayoutFrm membersMichael Stahl1-3/+3
Change-Id: If961ecfe27c6f478f030bab746278b885482b229
2014-12-18fdo#87199: sw: fix root cause of a11y crash when merging cellsMichael Stahl1-6/+0
Commit f9eff2a402a4cd28d7dbfb6ce27cbf96b31e576f is not quite right because it will leave the mpNext chain unreachable; that could perhaps be imporoved by calling RemoveFromLayout(), but... Actually the problem is basically that one of the deleted SwCellFrms points to a SwTableBox with getRowSpan() -1 (because it has been merged) and thus IsInCoveredCell() returns true and that causes ~SwCellFrm() to skip disposing the SwAccessible stuff, so the SwCellFrm is still contained in the SwAccessibleMap. Because it's rather hard to prevent this sort of thing in general, better change SwAccessibleMap::Dispose() to assume that if it found its way into the SwAccessibleMap it should be disposed and removed. Change-Id: Ib4cec6924cb026ae30bdac6857957adf237b4d70
2014-12-18sw: rename SwFrm::Remove to something uniqueMichael Stahl1-1/+1
Change-Id: I4daf01450a4aa8f1d2bc6eae731a735d0d38a074
2014-12-17sw: prefix SwLayoutFrm::pLowerMichael Stahl1-4/+4
Change-Id: I844c00639307c14140ba7e8a1b919e3f2ecdc114
2014-12-15Resolves: fdo#87199 deregister during destroy as lower of upperCaolán McNamara1-0/+6
Change-Id: I7e52bba78a0fbe32814510b44ad049d3504e7164
2014-12-10coverity#738980 Use after freeCaolán McNamara1-9/+17
Change-Id: I30657eb609a9d02217238dd37a3f23e05168569c