diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-24 13:19:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-24 13:19:39 +0200 |
commit | fe2164949b38a7f73883dbdcb3271b94e5c81744 (patch) | |
tree | d3b8d4ccfd21debfd4c554149eca01fc0f1a7d72 /sw | |
parent | 1d7c589d502fb7f0d874c13e30011ca33a3fb6e4 (diff) |
teach unusedvariablecheck plugin about SfxPoolItem subclasses
which can all be treated as SAL_WARN_UNUSED
The eehtml.cxx change probably fixes some CJK/CTL bug somewhere
Change-Id: I6852129540f316075aee907971ac19418d71dd9a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docfly.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/SwUndoPageDesc.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/svxcss1.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/numpara.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmresultdialogs.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/tabsh.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 3 |
7 files changed, 6 insertions, 10 deletions
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 98ffdae260f3..c89c6360a6d0 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -629,8 +629,6 @@ bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewForm bool bChgAnchor = false, bFrameSz = false; const SwFormatFrameSize aFrameSz( rFormat.GetFrameSize() ); - const SwFormatVertOrient aVert( rFormat.GetVertOrient() ); - const SwFormatHoriOrient aHori( rFormat.GetHoriOrient() ); SwUndoSetFlyFormat* pUndo = nullptr; bool const bUndo = GetIDocumentUndoRedo().DoesUndo(); diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx index e8bdf8bcacbc..d1bb5bb1f8b3 100644 --- a/sw/source/core/undo/SwUndoPageDesc.cxx +++ b/sw/source/core/undo/SwUndoPageDesc.cxx @@ -148,17 +148,20 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld, SwFrameFormat* pFormat = new SwFrameFormat( *rNewHead.GetHeaderFormat() ); // The Ctor of this object will remove the duplicate! SwFormatHeader aFormatHeader(pFormat); + (void)aFormatHeader; if (!rNewDesc.IsHeaderShared()) { pFormat = new SwFrameFormat( *rNewDesc.GetLeft().GetHeader().GetHeaderFormat() ); // The Ctor of this object will remove the duplicate! SwFormatHeader aLeftHeader(pFormat); + (void)aLeftHeader; } if (!rNewDesc.IsFirstShared()) { pFormat = new SwFrameFormat( *rNewDesc.GetFirstMaster().GetHeader().GetHeaderFormat() ); // The Ctor of this object will remove the duplicate! SwFormatHeader aFirstHeader(pFormat); + (void)aFirstHeader; } } // Same procedure for footers... @@ -167,17 +170,20 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld, SwFrameFormat* pFormat = new SwFrameFormat( *rNewFoot.GetFooterFormat() ); // The Ctor of this object will remove the duplicate! SwFormatFooter aFormatFooter(pFormat); + (void)aFormatFooter; if (!rNewDesc.IsFooterShared()) { pFormat = new SwFrameFormat( *rNewDesc.GetLeft().GetFooter().GetFooterFormat() ); // The Ctor of this object will remove the duplicate! SwFormatFooter aLeftFooter(pFormat); + (void)aLeftFooter; } if (!rNewDesc.IsFirstShared()) { pFormat = new SwFrameFormat( *rNewDesc.GetFirstMaster().GetFooter().GetFooterFormat() ); // The Ctor of this object will remove the duplicate! SwFormatFooter aFirstFooter(pFormat); + (void)aFirstFooter; } } diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index f94dabf360ac..5373a5f3a81e 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -937,7 +937,6 @@ void SvxCSS1Parser::MergeStyles( const SfxItemSet& rSrcSet, { SvxLRSpaceItem aLRSpace( static_cast<const SvxLRSpaceItem&>(rTargetSet.Get(aItemIds.nLRSpace)) ); SvxULSpaceItem aULSpace( static_cast<const SvxULSpaceItem&>(rTargetSet.Get(aItemIds.nULSpace)) ); - SvxBoxItem aBox( static_cast<const SvxBoxItem&>(rTargetSet.Get(aItemIds.nBox)) ); rTargetSet.Put( rSrcSet ); diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 487441cf9fb4..8ccffebdccff 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -352,7 +352,6 @@ bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl( SfxStringItem aItem(nId, rStr); SfxUInt16Item aFamily(SID_STYLE_FAMILY, (sal_uInt16)nFamily); SfxUInt16Item aMask( SID_STYLE_MASK, nMask ); - SfxStringItem aUpdName(SID_STYLE_UPD_BY_EX_NAME, rStr); SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr ); const SfxPoolItem* pItems[ 6 ]; sal_uInt16 nCount = 0; diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 2fa7ba337612..53fb96fc7339 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -841,7 +841,6 @@ IMPL_LINK(SwMMResultPrintDialog, PrintHdl_Impl, Button*, pButton, void) SfxObjectShell* pObjSh = pTargetView->GetViewFrame()->GetObjectShell(); SfxGetpApp()->NotifyEvent(SfxEventHint(SfxEventHintId::SwMailMerge, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), pObjSh)); - SfxBoolItem aMergeSilent(SID_SILENT, false); uno::Sequence < beans::PropertyValue > aProps( 2 ); aProps[0]. Name = "MonitorVisible"; @@ -1045,7 +1044,6 @@ IMPL_LINK(SwMMResultEmailDialog, SendDocumentsHdl_Impl, Button*, pButton, void) else return; // back to the dialog } - SfxStringItem aFilterName( SID_FILTER_NAME, pSfxFlt->GetFilterName() ); OUString sEMailColumn = m_pMailToLB->GetSelectEntry(); OSL_ENSURE( !sEMailColumn.isEmpty(), "No email column selected"); Reference< sdbcx::XColumnsSupplier > xColsSupp( xConfigItem->GetResultSet(), UNO_QUERY); diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 8c63736cf151..ce4ae644291e 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -224,7 +224,6 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) SwTabCols aTabCols; rSh.GetTabCols( aTabCols ); - SvxColumnItem aColItem; // Pointer will be deleted after the dialogue execution. SwTableRep* pRep = new SwTableRep( aTabCols ); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 350a7f14cbb0..43383e1c55c0 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -466,9 +466,6 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.Left( CRSR_SKIP_CHARS, true, 1, false ); SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rWrtSh.GetCurAttr( aSet ); - const SvxFontItem &rFont = static_cast<const SvxFontItem &>( aSet.Get( RES_CHRATR_FONT )); - SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(), - rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT ); rWrtSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND ); rWrtSh.ResetSelect(nullptr, false); rWrtSh.EndSelect(); |