From aa9cb8e14749e7fb7a83b55a2bb095501f731a18 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 8 Jun 2021 16:18:55 +0200 Subject: -Werror,-Wunused-but-set-variable (Clang 13 trunk) For both aRelNullPt local variables in SwFEShell::ImpEndCreate and SwFEShell::CheckUnboundObjects the (only) reads were removed with 5f7d6695ab561758acb27a93f14e08ee960324d5 "INTEGRATION: CWS swdrawpositioning". (And nIdent in SwFEShell::CheckUnboundObjects thus becomes unused, too.) Change-Id: Ifb4851b4e10b7370f2fc2f25bcdba77d532e77a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116845 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sw/source/core/frmedt/feshview.cxx | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'sw') diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index d0a980fed49b..6e070d448399 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2133,12 +2133,6 @@ bool SwFEShell::ImpEndCreate() GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(bRestore); } - Point aRelNullPt; - if( OBJ_CAPTION == nIdent ) - aRelNullPt = static_cast(rSdrObj).GetTailPos(); - else - aRelNullPt = rBound.TopLeft(); - aSet.Put( aAnch ); aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGH ) ); // OD 2004-03-30 #i26791# - set horizontal position @@ -2826,12 +2820,6 @@ void SwFEShell::CheckUnboundObjects() pPage = pLast; OSL_ENSURE( pPage, "Page not found." ); - // Alien identifier should roll into the default, - // Duplications are possible!! - sal_uInt16 nIdent = - Imp()->GetDrawView()->GetCurrentObjInventor() == SdrInventor::Default ? - Imp()->GetDrawView()->GetCurrentObjIdentifier() : 0xFFFF; - SwFormatAnchor aAnch; { const SwContentFrame *const pAnch = ::FindAnchor(pPage, aPt, true); @@ -2850,13 +2838,6 @@ void SwFEShell::CheckUnboundObjects() RES_SURROUND, RES_ANCHOR>{} ); aSet.Put( aAnch ); - Point aRelNullPt; - - if( OBJ_CAPTION == nIdent ) - aRelNullPt = static_cast(pObj)->GetTailPos(); - else - aRelNullPt = rBound.TopLeft(); - aSet.Put( aAnch ); aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGH ) ); SwFrameFormat* pFormat = getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::DRAW_OBJECT, &aSet ); -- cgit v1.2.3