summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
AgeCommit message (Collapse)AuthorFilesLines
2015-11-28-Werror,-WformatStephan Bergmann1-4/+4
Change-Id: I8ac3c45b83961541c4b5d9b2d5dc7193013d806d
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon41-9879/+9879
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-24loplugin:unusedfields in sw/Noel Grandin1-1/+0
Change-Id: I323a038e5581b00cd3a4ea2f362c66540377759e
2015-11-20SwPageFrm::IsOverHeaderFooterArea: check for IsActive() only laterMiklos Vajna1-3/+3
Checking for a bool is certainly cheaper than a chain of member function calls. Change-Id: I9520194e58e75264f3fcbb413a618e3995f59a4e
2015-11-18tdf#95888 sw: make click to header area show header controls againMiklos Vajna1-2/+4
Regression from commit 54a2c8c006e2f216e9d8c6b0ed625180c843c48b (tdf#39080 Interactive hide-whitespace mode, 2015-08-30), the problem was that SwPageFrm::IsOverHeaderFooterArea() checked if the header is active before accepting that the user clicked in that area. Don't require an active header at least in non-hide-whitespace mode, as the member function is used in the "could there be a header here" sense in SwEditWin::MouseButtonDown() to show the controls that allows actually adding a header. Change-Id: I6f905920113aed1512e333e718a8f26d88a3245d
2015-11-15use initialiser for Sequence<OUString>Noel Grandin1-2/+1
replaced using: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\); .*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g" Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9 Reviewed-on: https://gerrit.libreoffice.org/19969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-14tdf#95775: Allow zero shape width/height; fix setting width/height relationMike Kaganski1-1/+1
Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Reviewed on: https://gerrit.libreoffice.org/19962 Change-Id: Ic91ebf4a18a77704dc1ccd1e1180b42d0bc84c74
2015-11-13sw: loplugin:badstatics: convert static SwViewShell::mpReplaceBmpMichael Stahl1-1/+1
... and mpErrorBmp to actual members (not just in name only). Change-Id: Id02553451f1990dbc111e9c842247764bf7554bc
2015-11-13sw: loplugin:badstatics: actually these are harmlessMichael Stahl1-9/+9
... but there's no point in them being static either. Change-Id: I49931289560da9de7a2e79577e525872d316cc4e
2015-11-13sw: rename some more global variablesMichael Stahl4-29/+29
Change-Id: I6f4d0bb57c5d82984ff29b621dc4570f453be31d
2015-11-13sw: rename some global variablesMichael Stahl1-4/+4
Change-Id: I6520e47198a3da4e72fc77c6a6955afac410c7fa
2015-11-12two methods with the same name that do slightly different thingsCaolán McNamara2-4/+3
depending on constness is a little worrying, lets just use different names Change-Id: I3e7ca96c8c7dc8d58a7415d39b937984961aa619
2015-11-12SwPageFrm::MakeAll RefactoredAshod Nakashian3-103/+61
Browser and Hide Whitespace page height now use SwPageFrm::GetContentHeight, which is const. A few improvements are done for both paths as well. Change-Id: I73a8e920ccfa96d76cbbb002bed6a85f2e636ede Reviewed-on: https://gerrit.libreoffice.org/19730 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-12sw: prefix members of SwLayActionMiklos Vajna1-142/+142
Change-Id: I5f30071bfe4f429a6ce7b2e79e4f1330b73e1e88
2015-11-12WaE: loplugin:literaltoboolconversionTor Lillqvist1-1/+1
Change-Id: Id953a15b3d6167a2983500d21a215662415bc074
2015-11-12coverity#1338595 Dereference before null checkCaolán McNamara1-2/+2
Change-Id: I8f23fb4fe51f64a82e58dcc150aeca964ac6af38
2015-11-12OSL_ENSURE followed by unconditional dereference -> assertCaolán McNamara1-1/+1
Change-Id: Ife08acfd0defbed7f09a3b8dce089f61b0d7e11c
2015-11-12dynamic cast followed by static castCaolán McNamara1-4/+2
Change-Id: I22a2123265da9d6808d9fd1bcb44666810a9311e
2015-11-115th step to remove tools/rtti.hxxOliver Specht9-19/+2
tools/rtti.hxx removed completed the interface of some Sdr.* Items and removed pseudo items Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a Reviewed-on: https://gerrit.libreoffice.org/19837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11Avoid a default parameter that was under-used anyway (loplugin:defaultparams)Tor Lillqvist1-1/+1
Change-Id: I845e2ceab1cf35a021eea23632291111c8f43362
2015-11-10tdf#39080 Hide Whitespace improvementsAshod Nakashian2-12/+93
Moved the page resizing from SwLayoutFrm::Format to SwPageFrm::MakeAll and calculated the new page height more accurately based on the content (stolen from the browser-mode height calculation, to be refactored). This fixes issues with repagination with certain contents. Removed unnecessary ToggleLayoutMode calls and prevented clicking between pages in single-view mode to jump the cursor. Change-Id: I5662dd26efff66d6e95b8fd4dcf8564588adbbb7 Reviewed-on: https://gerrit.libreoffice.org/19699 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann35-980/+980
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-11-07Misc tweaks and cleanups.Ashod Nakashian6-41/+39
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/source/coreNoel Grandin2-4/+4
Change-Id: I30016977f1be8fb53dd239367d043de92a9467d9
2015-11-06coverity#1338232 Explicit null dereferencedCaolán McNamara1-0/+1
Change-Id: I4be589325b89eac129328f98f9db7ce8c741892d
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann2-2/+2
Change-Id: I55970d363ab53eb78d580192006e52d9240d46fb
2015-11-04sw: prefix members of SwCacheObjMiklos Vajna1-1/+1
Change-Id: I416c43f5f6819029e279bc2f5fb696b59917ef06
2015-11-04sw: prefix members of SwOrderIterMiklos Vajna1-29/+29
Change-Id: I9bea22d07a95eb521d9c3729b2aba1694cf02def
2015-11-03Smart pointers for SwBorderAttrAccessAshod Nakashian4-43/+32
The short-lived SwBorderAttrAccess is manually deleted which is not exception safe and can potentially leak. This wraps it in unique_ptr. Change-Id: Ib45c1c36214583e0bf205231f9f793e023d106c7 Reviewed-on: https://gerrit.libreoffice.org/19701 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-03sw: prefix members of SwFrmNotifyMiklos Vajna1-72/+72
Change-Id: Idc0290d82bb51fec0fcc1db003bd48f3cc402a0f
2015-11-02sw: prefix members of SwDrawFrameFormatMiklos Vajna1-4/+4
Change-Id: I0d00ca7727e0756030830cd732655b2a22b900d6
2015-10-29sw: prefix members of SwPosFlyFrmMiklos Vajna1-8/+8
Change-Id: I08a2c2bb8ebd8cb2adf25b23fa57a5c5441fcfea
2015-10-27sw: prefix members of SwSectionFrmMiklos Vajna2-32/+32
Change-Id: I962ee5dc35d5b33c751890ff9d56850897c7d080
2015-10-27sw: prefix members of SwTableFormulaUpdateMiklos Vajna1-1/+1
Change-Id: Id9e18c67a4fa6e3646ac33cd616838819d1f10d8
2015-10-22sw: prefix members of SwCrsrMoveStateMiklos Vajna1-34/+34
Change-Id: Iad3c970b263b8ee847cf6a7d2e05c5336cad9b26
2015-10-21sw: prefix members of SwPageFrmMiklos Vajna4-48/+48
Change-Id: I7587c587a52310dbfee8e79a038495eb26b108b0
2015-10-20new loplugin: badvectorinitNoel Grandin1-1/+1
look for places calling the 1-argument vector fill constructor and then immediately called push_back, which is generally a sign that its leaving empty slots. Change-Id: I34e69b8d09cc48c0d409499faaf192b9f86bc517 Reviewed-on: https://gerrit.libreoffice.org/17525 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-10-20loplugin:defaultparamsStephan Bergmann9-9/+9
Change-Id: I11ff551955c1ac291ab576f2f18c2dd410427eda
2015-10-19loplugin:defaultparamsStephan Bergmann5-11/+10
Change-Id: Ib5b0e87064b6dcff03f6b77287a80ee2a03b8799
2015-10-17tdf#36117 .doc preserve page vertical alignment after RTJustin Luth1-2/+3
MSWord has a page-style vertical alignment (center/bottom/justify) setting that was lost after round-tripping through LibreOffice. Writer does not currently have the ability to vertically align text outside of a frame, but the setting should be preserved for interoperability. Change-Id: I91ae841b91ca2f2dd1b68212fdcdf830c7cef22a Reviewed-on: https://gerrit.libreoffice.org/18480 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2015-10-15cppcheck:variableScopeNoel Grandin3-4/+4
Change-Id: I9b671637fbe0f32e695d22b74bfb40a39a9fe884 Reviewed-on: https://gerrit.libreoffice.org/19364 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-14coverity#1326206 Dereference after null checkCaolán McNamara1-4/+4
Change-Id: I187c182a1645cdd38c81bc72b3c836ab21725173
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann5-13/+13
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12tdf#89165 sw: looping layout in SwHeadFootFrm::FormatSize()Miklos Vajna1-3/+9
FormatObjsAtFrm() returns false, indicating that the result is not perfect, and the caller hopes that formatting all children of the frame again will help. Make sure that in case that assumption turns out to be false, we at least do not loop. The loop limit is enough to make the original i#43771 bugdoc still laid out properly. Change-Id: Ife9bd99a628a72edb922d04e05081971b6adf340
2015-10-08restore FlowFrmJoinLockGuard for surviving layout of ooo77837-1.odtCaolán McNamara1-4/+4
ubsan and valgrind continue to report use after delete of SwSectionFrm with the same error message listed in the original commit of commit c3087d969671e62182eb049850479e77190ccff4 avoid crash on layout of ooo77837-1.odt by attempting to set the parent as un-joinable for the duration of the Cut/Paste in order to ensure it survives the process which introduced FlowFrmJoinLockGuard continue to use lighter weight SwFrmDeleteGuard where we can get away with doing that. Change-Id: Ifb4c69514d074c776ec036987153043d1f715b95
2015-10-07crashtesting: remove old fix for ooo55381-1.sxwCaolán McNamara1-1/+0
this reverts commit 9eb16c85d6af4b73de9a75716c3ff34f929f26b2 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Jun 3 14:15:03 2015 +0100 don't crash on layout of ooo55381-1.sxw The pLay here is getting joined and thus deleted in a stack of FormatLayoutTabs so set it as unjoinable for the duration that we expect pLay to remain valid because ooo31216-2.doc fdo57780-2.doc rhbz193771-1.doc assert when converting it to a more conservative SwFrmDeleteGuard. They would leave the function safely on the early return if the delete was allowed, so go more conservative again and restore to the original logic. ooo55381-1.sxw continues to apparently not fail.
2015-10-06crashtesting: fix failure on scrolling through ooo77837-1.odtCaolán McNamara2-5/+8
Change-Id: Iadb8be29d28c957ac773271904ee5ed86950087d
2015-10-06 tdf#94559: 4th step to remove rtti.hxxOliver Specht19-117/+117
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-05replace remaining FlowFrmJoinLockGuard with SwFrmDeleteGuardCaolán McNamara4-21/+17
Given both tdf#91695 and the remaining crash on novell622972-2.html it seems now safer to replace the remaining FlowFrmJoinLockGuard with SwFrmDeleteGuard and rely on IsDeleteForbidden instead of IsJoinLocked for the crashing layout edge-cases and bundle the IsDeleteForbidden other IsDeleteForbidden users together under SwFrmDeleteGuard Change-Id: I017b6155daa3a6e49c5bee5b21ca4eddcfd5b5c0
2015-10-05crashtesting: intermittent crash on novell622972-2.htmlCaolán McNamara2-1/+8
The pLay here is sometimes getting deleted and then dereferenced afterwards #20 0x00007f0c95395b23 in SwSectionFrm::~SwSectionFrm() #21 0x00007f0c95395b6a in SwSectionFrm::~SwSectionFrm() #22 0x00007f0c953af59d in SwFrm::DestroyFrm(SwFrm*) #23 0x00007f0c95396d4e in SwSectionFrm::MergeNext(SwSectionFrm*) #24 0x00007f0c95397e28 in SwSectionFrm::MakeAll(OutputDevice*) #25 0x00007f0c952d13d5 in SwFrm::PrepareMake(OutputDevice*) #26 0x00007f0c953cca7f in SwFrm::Calc(OutputDevice*) #27 0x00007f0c9532d0ea in SwLayAction::FormatLayout(...) Change-Id: Ib54515bd917333ee9a10f467148d2fe76991cde1