From dfafa053945aa9ffea347c4b9a98f255b15016bf Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 8 Jun 2021 15:21:44 +0200 Subject: -Werror,-Wunused-but-set-variable (Clang 13 trunk) The only read of nChgFormatLevel (spelled "nChgFmtLevel" back then) back at 84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import" was in a > #ifndef NUM_RELSPACE block that was removed with f917bb6900bad2c9382374a2cbc5678b278dde2e "INTEGRATION: CWS swnumtree". It apparently was dead code, as sw/inc/sw.mk had included > CDEFS+=-DNUM_RELSPACE ever since at least 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import" (which was later removed with 58003f28fc09cb2021e145afa0d0d692a7a402a7 "INTEGRATION: CWS writercorehandoff" when all its remaining uses were also removed in that CWS writercorehandoff). Change-Id: I5972e2c949d21970e7f3f98a0a61600265ccb66b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116844 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- sw/source/core/doc/docnum.cxx | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'sw') diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 2420532c5bee..586324391888 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1185,16 +1185,6 @@ bool SwDoc::ReplaceNumRule( const SwPosition& rPos, if ( !aTextNodeList.empty() ) { SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : nullptr ); - sal_uInt16 nChgFormatLevel = 0; - for( sal_uInt8 n = 0; n < MAXLEVEL; ++n ) - { - const SwNumFormat& rOldFormat = pOldRule->Get( n ), - & rNewFormat = pNewRule->Get( n ); - - if( rOldFormat.GetAbsLSpace() != rNewFormat.GetAbsLSpace() || - rOldFormat.GetFirstLineOffset() != rNewFormat.GetFirstLineOffset() ) - nChgFormatLevel |= ( 1 << n ); - } const SwTextNode* pGivenTextNode = rPos.nNode.GetNode().GetTextNode(); SwNumRuleItem aRule( rNewRule ); -- cgit v1.2.3