summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-10 13:24:44 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-06-11 09:25:54 +0200
commitd4a478af9cb3154ca1a2179240750865ee3ede91 (patch)
tree9c8e051727db74985e6f4aba76349e184fb6f327
parent2f6f533b76d6dd12a8d8356eedbb3f497be41739 (diff)
Remove duplicate code
The two > aSet.Put( aAnch ); had been like that ever since at least 84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import", but only now aa9cb8e14749e7fb7a83b55a2bb095501f731a18 "-Werror,-Wunused-but-set-variable (Clang 13 trunk)" removed the lines of code between them (and which should not have changed neither aSet nor aAnch as a side effect, which could have explained the putative duplication), making the duplication stick out. Lets assume this was an error ever since, and that just one call is enough. Change-Id: Ie1ad54fb31212849f242eea77bc9e436b6fd92f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116980 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
1 files changed, 0 insertions, 2 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 6e070d448399..ee37c1d08423 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2837,8 +2837,6 @@ void SwFEShell::CheckUnboundObjects()
SfxItemSet aSet( GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_ANCHOR>{} );
aSet.Put( aAnch );
-
- aSet.Put( aAnch );
aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGH ) );
SwFrameFormat* pFormat = getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::DRAW_OBJECT, &aSet );