forcepoint#100 drop SwBorderAttrAccess to allow cache entry to be removed
commit697a695dbddd9bcea60e3c65de7d91e88308e557
authorCaolán McNamara <caolanm@redhat.com>
Sat, 2 Apr 2022 19:20:10 +0000 (2 20:20 +0100)
committerCaolán McNamara <caolanm@redhat.com>
Mon, 4 Apr 2022 18:53:09 +0000 (4 20:53 +0200)
treed121bcaf198a1ddbe7a0854b721346e6f78a7e39
parent4abce69fca83f5c98bb1fc0678cc1ce9cedd4750
forcepoint#100 drop SwBorderAttrAccess to allow cache entry to be removed

for SwBorderAttr which gets deleted during this call

also includes...

Related: forcepoint#100 we don't need pAttrs for the duration of the full scope

similar to the case of

commit 6b1eae0334ba8bad7656a859695551ce51b62f95
Date:   Fri May 18 08:26:14 2001 +0000

    Fix #87058#: Locked boraderattribut

the SwCache object cannot be deleted if its locked, leading to a leak,
we don't need pAttrs for the entire scope here so we can defer to the
end of the scope the reacquire the lock to set pAttrs

and also includes...

Related: forcepoint#100 don't reacquire after every release

instead release when we have to, and only reacquire if necessary
before use of pAttrs

Change-Id: Ie52aab7e5933d76b0c055389798104e4d93f39e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132461
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Caolán McNamara <caolanm@redhat.com>
sw/qa/extras/layout/data/forcepoint100.html [new file with mode: 0644]
sw/qa/extras/layout/layout.cxx
sw/source/core/layout/tabfrm.cxx