[Libreoffice-commits] core.git: sw/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 11 07:26:37 UTC 2021
sw/source/core/frmedt/feshview.cxx | 2 --
1 file changed, 2 deletions(-)
New commits:
commit d4a478af9cb3154ca1a2179240750865ee3ede91
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jun 10 13:24:44 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jun 11 09:25:54 2021 +0200
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 at collabora.com>
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 );
More information about the Libreoffice-commits
mailing list